class ApiGatewayDomain
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Route53.Targets.ApiGatewayDomain |
Java | software.amazon.awscdk.services.route53.targets.ApiGatewayDomain |
Python | aws_cdk.aws_route53_targets.ApiGatewayDomain |
TypeScript (source) | @aws-cdk/aws-route53-targets » ApiGatewayDomain |
Implements
IAlias
Defines an API Gateway domain name as the alias target.
Use the ApiGateway
class if you wish to map the alias to an REST API with a
domain name defined through the RestApiProps.domainName
prop.
Example
declare const hostedZoneForExampleCom: any;
declare const domainName: apigateway.DomainName;
import * as route53 from '@aws-cdk/aws-route53';
import * as targets from '@aws-cdk/aws-route53-targets';
new route53.ARecord(this, 'CustomDomainAliasRecord', {
zone: hostedZoneForExampleCom,
target: route53.RecordTarget.fromAlias(new targets.ApiGatewayDomain(domainName))
});
Initializer
new ApiGatewayDomain(domainName: IDomainName)
Parameters
- domainName
IDomain
Name
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.