ApiGateway
- class aws_cdk.aws_route53_targets.ApiGateway(api)
Bases:
ApiGatewayDomain
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 theApiGatewayDomain
class.- ExampleMetadata:
infused
Example:
import aws_cdk.aws_route53 as route53 import aws_cdk.aws_route53_targets as targets # api: apigateway.RestApi # hosted_zone_for_example_com: Any route53.ARecord(self, "CustomDomainAliasRecord", zone=hosted_zone_for_example_com, target=route53.RecordTarget.from_alias(targets.ApiGateway(api)) )
- Parameters:
api (
RestApiBase
)
Methods
- bind(_record, _zone=None)
Return hosted zone ID and DNS name, usable for Route53 alias targets.
- Parameters:
_record (
IRecordSet
)_zone (
Optional
[IHostedZone
])
- Return type: