class ApiGateway
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Route53.Targets.ApiGateway |
Java | software.amazon.awscdk.services.route53.targets.ApiGateway |
Python | aws_cdk.aws_route53_targets.ApiGateway |
TypeScript (source) | @aws-cdk/aws-route53-targets » ApiGateway |
Implements
IAlias
Extends
Api
Defines an API Gateway REST API as the alias target. Requires that the domain name will be defined through RestApiProps.domainName
.
You can direct the alias to any apigateway.DomainName
resource through the
ApiGatewayDomain
class.
Example
import * as route53 from '@aws-cdk/aws-route53';
import * as targets from '@aws-cdk/aws-route53-targets';
declare const api: apigateway.RestApi;
declare const hostedZoneForExampleCom: any;
new route53.ARecord(this, 'CustomDomainAliasRecord', {
zone: hostedZoneForExampleCom,
target: route53.RecordTarget.fromAlias(new targets.ApiGateway(api))
});
Initializer
new ApiGateway(api: RestApiBase)
Parameters
- api
Rest
Api Base
Methods
Name | Description |
---|---|
bind(_record, _zone?) | Return hosted zone ID and DNS name, usable for Route53 alias targets. |
bind(_record, _zone?)
public bind(_record: IRecordSet, _zone?: IHostedZone): AliasRecordTargetConfig
Parameters
- _record
IRecord
Set - _zone
IHosted
Zone
Returns
Return hosted zone ID and DNS name, usable for Route53 alias targets.