CfnRecordSetPropsMixin
- class aws_cdk.mixins_preview.aws_route53.mixins.CfnRecordSetPropsMixin(props, *, strategy=None)
Bases:
MixinInformation about the record that you want to create.
The
AWS::Route53::RecordSettype can be used as a standalone resource or as an embedded property in theAWS::Route53::RecordSetGrouptype. Note that someAWS::Route53::RecordSetproperties are valid only when used withinAWS::Route53::RecordSetGroup.For more information, see ChangeResourceRecordSets in the Amazon Route 53 API Reference .
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-route53-recordset.html
- CloudformationResource:
AWS::Route53::RecordSet
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_route53 import mixins as route53_mixins cfn_record_set_props_mixin = route53_mixins.CfnRecordSetPropsMixin(route53_mixins.CfnRecordSetMixinProps( alias_target=route53_mixins.CfnRecordSetPropsMixin.AliasTargetProperty( dns_name="dnsName", evaluate_target_health=False, hosted_zone_id="hostedZoneId" ), cidr_routing_config=route53_mixins.CfnRecordSetPropsMixin.CidrRoutingConfigProperty( collection_id="collectionId", location_name="locationName" ), comment="comment", failover="failover", geo_location=route53_mixins.CfnRecordSetPropsMixin.GeoLocationProperty( continent_code="continentCode", country_code="countryCode", subdivision_code="subdivisionCode" ), geo_proximity_location=route53_mixins.CfnRecordSetPropsMixin.GeoProximityLocationProperty( aws_region="awsRegion", bias=123, coordinates=route53_mixins.CfnRecordSetPropsMixin.CoordinatesProperty( latitude="latitude", longitude="longitude" ), local_zone_group="localZoneGroup" ), health_check_id="healthCheckId", hosted_zone_id="hostedZoneId", hosted_zone_name="hostedZoneName", multi_value_answer=False, name="name", region="region", resource_records=["resourceRecords"], set_identifier="setIdentifier", ttl="ttl", type="type", weight=123 ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Route53::RecordSet.- Parameters:
props (
Union[CfnRecordSetMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['aliasTarget', 'cidrRoutingConfig', 'comment', 'failover', 'geoLocation', 'geoProximityLocation', 'healthCheckId', 'hostedZoneId', 'hostedZoneName', 'multiValueAnswer', 'name', 'region', 'resourceRecords', 'setIdentifier', 'ttl', 'type', 'weight']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AliasTargetProperty
- class CfnRecordSetPropsMixin.AliasTargetProperty(*, dns_name=None, evaluate_target_health=None, hosted_zone_id=None)
Bases:
objectAlias records only: Information about the AWS resource, such as a CloudFront distribution or an Amazon S3 bucket, that you want to route traffic to.
When creating records for a private hosted zone, note the following:
Creating geolocation alias and latency alias records in a private hosted zone is allowed but not supported.
For information about creating failover records in a private hosted zone, see Configuring Failover in a Private Hosted Zone .
- Parameters:
dns_name (
Optional[str]) –Alias records only: The value that you specify depends on where you want to route queries:. - Amazon API Gateway custom regional APIs and edge-optimized APIs - Specify the applicable domain name for your API. You can get the applicable value using the AWS CLI command get-domain-names : - For regional APIs, specify the value of
regionalDomainName. - For edge-optimized APIs, specify the value ofdistributionDomainName. This is the name of the associated CloudFront distribution, such asda1b2c3d4e5.cloudfront.net. .. epigraph:: The name of the record that you’re creating must match a custom domain name for your API, such asapi.example.com. - Amazon Virtual Private Cloud interface VPC endpoint - Enter the API endpoint for the interface endpoint, such asvpce-123456789abcdef01-example-us-east-1a.elasticloadbalancing.us-east-1.vpce.amazonaws.com. For edge-optimized APIs, this is the domain name for the corresponding CloudFront distribution. You can get the value ofDnsNameusing the AWS CLI command describe-vpc-endpoints . - CloudFront distribution - Specify the domain name that CloudFront assigned when you created your distribution. Your CloudFront distribution must include an alternate domain name that matches the name of the record. For example, if the name of the record is acme.example.com , your CloudFront distribution must include acme.example.com as one of the alternate domain names. For more information, see Using Alternate Domain Names (CNAMEs) in the Amazon CloudFront Developer Guide . You can’t create a record in a private hosted zone to route traffic to a CloudFront distribution. .. epigraph:: For failover alias records, you can’t specify a CloudFront distribution for both the primary and secondary records. A distribution must include an alternate domain name that matches the name of the record. However, the primary and secondary records have the same name, and you can’t include the same alternate domain name in more than one distribution. - Elastic Beanstalk environment - If the domain name for your Elastic Beanstalk environment includes the region that you deployed the environment in, you can create an alias record that routes traffic to the environment. For example, the domain namemy-environment. *us-west-2* .elasticbeanstalk.comis a regionalized domain name. .. epigraph:: For environments that were created before early 2016, the domain name doesn’t include the region. To route traffic to these environments, you must create a CNAME record instead of an alias record. Note that you can’t create a CNAME record for the root domain name. For example, if your domain name is example.com, you can create a record that routes traffic for acme.example.com to your Elastic Beanstalk environment, but you can’t create a record that routes traffic for example.com to your Elastic Beanstalk environment. For Elastic Beanstalk environments that have regionalized subdomains, specify theCNAMEattribute for the environment. You can use the following methods to get the value of the CNAME attribute: - AWS Management Console : For information about how to get the value by using the console, see Using Custom Domains with AWS Elastic Beanstalk in the AWS Elastic Beanstalk Developer Guide . - Elastic Beanstalk API : Use theDescribeEnvironmentsaction to get the value of theCNAMEattribute. For more information, see DescribeEnvironments in the AWS Elastic Beanstalk API Reference . - AWS CLI : Use thedescribe-environmentscommand to get the value of theCNAMEattribute. For more information, see describe-environments in the AWS CLI . - ELB load balancer - Specify the DNS name that is associated with the load balancer. Get the DNS name by using the AWS Management Console , the ELB API, or the AWS CLI . - AWS Management Console : Go to the EC2 page, choose Load Balancers in the navigation pane, choose the load balancer, choose the Description tab, and get the value of the DNS name field. If you’re routing traffic to a Classic Load Balancer, get the value that begins with dualstack . If you’re routing traffic to another type of load balancer, get the value that applies to the record type, A or AAAA. - Elastic Load Balancing API : UseDescribeLoadBalancersto get the value ofDNSName. For more information, see the applicable guide: - Classic Load Balancers: DescribeLoadBalancers - Application and Network Load Balancers: DescribeLoadBalancers - CloudFormation Fn::GetAtt intrinsic function : Use the Fn::GetAtt intrinsic function to get the value ofDNSName: - Classic Load Balancers . - Application and Network Load Balancers . - AWS CLI : Usedescribe-load-balancersto get the value ofDNSName. For more information, see the applicable guide: - Classic Load Balancers: describe-load-balancers - Application and Network Load Balancers: describe-load-balancers - Global Accelerator accelerator - Specify the DNS name for your accelerator: - Global Accelerator API : To get the DNS name, use DescribeAccelerator . - AWS CLI : To get the DNS name, use describe-accelerator . - Amazon S3 bucket that is configured as a static website - Specify the domain name of the Amazon S3 website endpoint that you created the bucket in, for example,s3-website.us-east-2.amazonaws.com. For more information about valid values, see the table Amazon S3 Website Endpoints in the Amazon Web Services General Reference . For more information about using S3 buckets for websites, see Getting Started with Amazon Route 53 in the Amazon Route 53 Developer Guide. - Another Route 53 record - Specify the value of theNameelement for a record in the current hosted zone. .. epigraph:: If you’re creating an alias record that has the same name as the hosted zone (known as the zone apex), you can’t specify the domain name for a record for which the value ofTypeisCNAME. This is because the alias record must have the same type as the record that you’re routing traffic to, and creating a CNAME record for the zone apex isn’t supported even for an alias record.evaluate_target_health (
Union[bool,IResolvable,None]) –Applies only to alias, failover alias, geolocation alias, latency alias, and weighted alias resource record sets: When
EvaluateTargetHealthistrue, an alias resource record set inherits the health of the referenced AWS resource, such as an ELB load balancer or another resource record set in the hosted zone. Note the following: - CloudFront distributions - You can’t setEvaluateTargetHealthtotruewhen the alias target is a CloudFront distribution. - Elastic Beanstalk environments that have regionalized subdomains - If you specify an Elastic Beanstalk environment inDNSNameand the environment contains an ELB load balancer, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. (An environment automatically contains an ELB load balancer if it includes more than one Amazon EC2 instance.) If you setEvaluateTargetHealthtotrueand either no Amazon EC2 instances are healthy or the load balancer itself is unhealthy, Route 53 routes queries to other available resources that are healthy, if any. If the environment contains a single Amazon EC2 instance, there are no special requirements. - ELB load balancers - Health checking behavior depends on the type of load balancer: - Classic Load Balancers : If you specify an ELB Classic Load Balancer inDNSName, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. If you setEvaluateTargetHealthtotrueand either no EC2 instances are healthy or the load balancer itself is unhealthy, Route 53 routes queries to other resources. - Application and Network Load Balancers : If you specify an ELB Application or Network Load Balancer and you setEvaluateTargetHealthtotrue, Route 53 routes queries to the load balancer based on the health of the target groups that are associated with the load balancer: - For an Application or Network Load Balancer to be considered healthy, every target group that contains targets must contain at least one healthy target. If any target group contains only unhealthy targets, the load balancer is considered unhealthy, and Route 53 routes queries to other resources. - A target group that has no registered targets is considered unhealthy. .. epigraph:: When you create a load balancer, you configure settings for Elastic Load Balancing health checks; they’re not Route 53 health checks, but they perform a similar function. Do not create Route 53 health checks for the EC2 instances that you register with an ELB load balancer. - API Gateway APIs - There are no special requirements for settingEvaluateTargetHealthtotruewhen the alias target is an API Gateway API. However, because API Gateway is highly available by design,EvaluateTargetHealthprovides no operational benefit and Route 53 health checks are recommended instead for failover scenarios. - S3 buckets - There are no special requirements for settingEvaluateTargetHealthtotruewhen the alias target is an S3 bucket. However, because S3 buckets are highly available by design,EvaluateTargetHealthprovides no operational benefit and Route 53 health checks are recommended instead for failover scenarios. - VPC interface endpoints - There are no special requirements for settingEvaluateTargetHealthtotruewhen the alias target is a VPC interface endpoint. However, because VPC interface endpoints are highly available by design,EvaluateTargetHealthprovides no operational benefit and Route 53 health checks are recommended instead for failover scenarios. - Other records in the same hosted zone - If the AWS resource that you specify inDNSNameis a record or a group of records (for example, a group of weighted records) but is not another alias record, we recommend that you associate a health check with all of the records in the alias target. For more information, see What Happens When You Omit Health Checks? in the Amazon Route 53 Developer Guide . .. epigraph:: WhileEvaluateTargetHealthcan be set totruefor highly available AWS services (such as S3 buckets, VPC interface endpoints, and API Gateway), these services are designed for high availability and rarely experience outages that would be detected by this feature. For failover scenarios with these services, consider using Route 53 health checks that monitor your application’s ability to access the service instead. For more information and examples, see Amazon Route 53 Health Checks and DNS Failover in the Amazon Route 53 Developer Guide .hosted_zone_id (
Optional[str]) –Alias resource records sets only : The value used depends on where you want to route traffic:. - Amazon API Gateway custom regional APIs and edge-optimized APIs - Specify the hosted zone ID for your API. You can get the applicable value using the AWS CLI command get-domain-names : - For regional APIs, specify the value of
regionalHostedZoneId. - For edge-optimized APIs, specify the value ofdistributionHostedZoneId. - Amazon Virtual Private Cloud interface VPC endpoint - Specify the hosted zone ID for your interface endpoint. You can get the value ofHostedZoneIdusing the AWS CLI command describe-vpc-endpoints . - CloudFront distribution - SpecifyZ2FDTNDATAQYW2. This is always the hosted zone ID when you create an alias record that routes traffic to a CloudFront distribution. .. epigraph:: Alias records for CloudFront can’t be created in a private zone. - Elastic Beanstalk environment - Specify the hosted zone ID for the region that you created the environment in. The environment must have a regionalized subdomain. For a list of regions and the corresponding hosted zone IDs, see AWS Elastic Beanstalk endpoints and quotas in the Amazon Web Services General Reference . - ELB load balancer - Specify the value of the hosted zone ID for the load balancer. Use the following methods to get the hosted zone ID: - Service Endpoints table in the “Elastic Load Balancing Endpoints and Quotas” topic in the Amazon Web Services General Reference : Use the value that corresponds with the region that you created your load balancer in. Note that there are separate columns for Application and Classic Load Balancers and for Network Load Balancers. - AWS Management Console : Go to the Amazon EC2 page, choose Load Balancers in the navigation pane, select the load balancer, and get the value of the Hosted zone field on the Description tab. - Elastic Load Balancing API : UseDescribeLoadBalancersto get the applicable value. For more information, see the applicable guide: - Classic Load Balancers: Use DescribeLoadBalancers to get the value ofCanonicalHostedZoneNameID. - Application and Network Load Balancers: Use DescribeLoadBalancers to get the value ofCanonicalHostedZoneID. - CloudFormation Fn::GetAtt intrinsic function : Use the Fn::GetAtt intrinsic function to get the applicable value: - Classic Load Balancers: Get CanonicalHostedZoneNameID . - Application and Network Load Balancers: Get CanonicalHostedZoneID . - AWS CLI : Usedescribe-load-balancersto get the applicable value. For more information, see the applicable guide: - Classic Load Balancers: Use describe-load-balancers to get the value ofCanonicalHostedZoneNameID. - Application and Network Load Balancers: Use describe-load-balancers to get the value ofCanonicalHostedZoneID. - Global Accelerator accelerator - SpecifyZ2BJ6XQ5FK7U4H. - An Amazon S3 bucket configured as a static website - Specify the hosted zone ID for the region that you created the bucket in. For more information about valid values, see the table Amazon S3 Website Endpoints in the Amazon Web Services General Reference . - Another Route 53 record in your hosted zone - Specify the hosted zone ID of your hosted zone. (An alias record can’t reference a record in a different hosted zone.)
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_route53 import mixins as route53_mixins alias_target_property = route53_mixins.CfnRecordSetPropsMixin.AliasTargetProperty( dns_name="dnsName", evaluate_target_health=False, hosted_zone_id="hostedZoneId" )
Attributes
- dns_name
.
Amazon API Gateway custom regional APIs and edge-optimized APIs - Specify the applicable domain name for your API. You can get the applicable value using the AWS CLI command get-domain-names :
For regional APIs, specify the value of
regionalDomainName.For edge-optimized APIs, specify the value of
distributionDomainName. This is the name of the associated CloudFront distribution, such asda1b2c3d4e5.cloudfront.net.
The name of the record that you’re creating must match a custom domain name for your API, such as
api.example.com.Amazon Virtual Private Cloud interface VPC endpoint - Enter the API endpoint for the interface endpoint, such as
vpce-123456789abcdef01-example-us-east-1a.elasticloadbalancing.us-east-1.vpce.amazonaws.com. For edge-optimized APIs, this is the domain name for the corresponding CloudFront distribution. You can get the value ofDnsNameusing the AWS CLI command describe-vpc-endpoints .CloudFront distribution - Specify the domain name that CloudFront assigned when you created your distribution.
Your CloudFront distribution must include an alternate domain name that matches the name of the record. For example, if the name of the record is acme.example.com , your CloudFront distribution must include acme.example.com as one of the alternate domain names. For more information, see Using Alternate Domain Names (CNAMEs) in the Amazon CloudFront Developer Guide .
You can’t create a record in a private hosted zone to route traffic to a CloudFront distribution. .. epigraph:
For failover alias records, you can't specify a CloudFront distribution for both the primary and secondary records. A distribution must include an alternate domain name that matches the name of the record. However, the primary and secondary records have the same name, and you can't include the same alternate domain name in more than one distribution.
Elastic Beanstalk environment - If the domain name for your Elastic Beanstalk environment includes the region that you deployed the environment in, you can create an alias record that routes traffic to the environment. For example, the domain name
my-environment. *us-west-2* .elasticbeanstalk.comis a regionalized domain name.
For environments that were created before early 2016, the domain name doesn’t include the region. To route traffic to these environments, you must create a CNAME record instead of an alias record. Note that you can’t create a CNAME record for the root domain name. For example, if your domain name is example.com, you can create a record that routes traffic for acme.example.com to your Elastic Beanstalk environment, but you can’t create a record that routes traffic for example.com to your Elastic Beanstalk environment.
For Elastic Beanstalk environments that have regionalized subdomains, specify the
CNAMEattribute for the environment. You can use the following methods to get the value of the CNAME attribute:AWS Management Console : For information about how to get the value by using the console, see Using Custom Domains with AWS Elastic Beanstalk in the AWS Elastic Beanstalk Developer Guide .
Elastic Beanstalk API : Use the
DescribeEnvironmentsaction to get the value of theCNAMEattribute. For more information, see DescribeEnvironments in the AWS Elastic Beanstalk API Reference .AWS CLI : Use the
describe-environmentscommand to get the value of theCNAMEattribute. For more information, see describe-environments in the AWS CLI .ELB load balancer - Specify the DNS name that is associated with the load balancer. Get the DNS name by using the AWS Management Console , the ELB API, or the AWS CLI .
AWS Management Console : Go to the EC2 page, choose Load Balancers in the navigation pane, choose the load balancer, choose the Description tab, and get the value of the DNS name field.
If you’re routing traffic to a Classic Load Balancer, get the value that begins with dualstack . If you’re routing traffic to another type of load balancer, get the value that applies to the record type, A or AAAA.
Elastic Load Balancing API : Use
DescribeLoadBalancersto get the value ofDNSName. For more information, see the applicable guide:Classic Load Balancers: DescribeLoadBalancers
Application and Network Load Balancers: DescribeLoadBalancers
CloudFormation Fn::GetAtt intrinsic function : Use the Fn::GetAtt intrinsic function to get the value of
DNSName:AWS CLI : Use
describe-load-balancersto get the value ofDNSName. For more information, see the applicable guide:Classic Load Balancers: describe-load-balancers
Application and Network Load Balancers: describe-load-balancers
Global Accelerator accelerator - Specify the DNS name for your accelerator:
Global Accelerator API : To get the DNS name, use DescribeAccelerator .
AWS CLI : To get the DNS name, use describe-accelerator .
Amazon S3 bucket that is configured as a static website - Specify the domain name of the Amazon S3 website endpoint that you created the bucket in, for example,
s3-website.us-east-2.amazonaws.com. For more information about valid values, see the table Amazon S3 Website Endpoints in the Amazon Web Services General Reference . For more information about using S3 buckets for websites, see Getting Started with Amazon Route 53 in the Amazon Route 53 Developer Guide.Another Route 53 record - Specify the value of the
Nameelement for a record in the current hosted zone.
If you’re creating an alias record that has the same name as the hosted zone (known as the zone apex), you can’t specify the domain name for a record for which the value of
TypeisCNAME. This is because the alias record must have the same type as the record that you’re routing traffic to, and creating a CNAME record for the zone apex isn’t supported even for an alias record.- See:
- Type:
*Alias records only
- Type:
The value that you specify depends on where you want to route queries
- evaluate_target_health
When
EvaluateTargetHealthistrue, an alias resource record set inherits the health of the referenced AWS resource, such as an ELB load balancer or another resource record set in the hosted zone.
Note the following:
CloudFront distributions - You can’t set
EvaluateTargetHealthtotruewhen the alias target is a CloudFront distribution.Elastic Beanstalk environments that have regionalized subdomains - If you specify an Elastic Beanstalk environment in
DNSNameand the environment contains an ELB load balancer, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. (An environment automatically contains an ELB load balancer if it includes more than one Amazon EC2 instance.) If you setEvaluateTargetHealthtotrueand either no Amazon EC2 instances are healthy or the load balancer itself is unhealthy, Route 53 routes queries to other available resources that are healthy, if any.
If the environment contains a single Amazon EC2 instance, there are no special requirements.
ELB load balancers - Health checking behavior depends on the type of load balancer:
Classic Load Balancers : If you specify an ELB Classic Load Balancer in
DNSName, Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances that are registered with the load balancer. If you setEvaluateTargetHealthtotrueand either no EC2 instances are healthy or the load balancer itself is unhealthy, Route 53 routes queries to other resources.Application and Network Load Balancers : If you specify an ELB Application or Network Load Balancer and you set
EvaluateTargetHealthtotrue, Route 53 routes queries to the load balancer based on the health of the target groups that are associated with the load balancer:For an Application or Network Load Balancer to be considered healthy, every target group that contains targets must contain at least one healthy target. If any target group contains only unhealthy targets, the load balancer is considered unhealthy, and Route 53 routes queries to other resources.
A target group that has no registered targets is considered unhealthy.
When you create a load balancer, you configure settings for Elastic Load Balancing health checks; they’re not Route 53 health checks, but they perform a similar function. Do not create Route 53 health checks for the EC2 instances that you register with an ELB load balancer.
API Gateway APIs - There are no special requirements for setting
EvaluateTargetHealthtotruewhen the alias target is an API Gateway API. However, because API Gateway is highly available by design,EvaluateTargetHealthprovides no operational benefit and Route 53 health checks are recommended instead for failover scenarios.S3 buckets - There are no special requirements for setting
EvaluateTargetHealthtotruewhen the alias target is an S3 bucket. However, because S3 buckets are highly available by design,EvaluateTargetHealthprovides no operational benefit and Route 53 health checks are recommended instead for failover scenarios.VPC interface endpoints - There are no special requirements for setting
EvaluateTargetHealthtotruewhen the alias target is a VPC interface endpoint. However, because VPC interface endpoints are highly available by design,EvaluateTargetHealthprovides no operational benefit and Route 53 health checks are recommended instead for failover scenarios.Other records in the same hosted zone - If the AWS resource that you specify in
DNSNameis a record or a group of records (for example, a group of weighted records) but is not another alias record, we recommend that you associate a health check with all of the records in the alias target. For more information, see What Happens When You Omit Health Checks? in the Amazon Route 53 Developer Guide .
While
EvaluateTargetHealthcan be set totruefor highly available AWS services (such as S3 buckets, VPC interface endpoints, and API Gateway), these services are designed for high availability and rarely experience outages that would be detected by this feature. For failover scenarios with these services, consider using Route 53 health checks that monitor your application’s ability to access the service instead.For more information and examples, see Amazon Route 53 Health Checks and DNS Failover in the Amazon Route 53 Developer Guide .
- See:
- Type:
*Applies only to alias, failover alias, geolocation alias, latency alias, and weighted alias resource record sets
- hosted_zone_id
.
Amazon API Gateway custom regional APIs and edge-optimized APIs - Specify the hosted zone ID for your API. You can get the applicable value using the AWS CLI command get-domain-names :
For regional APIs, specify the value of
regionalHostedZoneId.For edge-optimized APIs, specify the value of
distributionHostedZoneId.Amazon Virtual Private Cloud interface VPC endpoint - Specify the hosted zone ID for your interface endpoint. You can get the value of
HostedZoneIdusing the AWS CLI command describe-vpc-endpoints .CloudFront distribution - Specify
Z2FDTNDATAQYW2. This is always the hosted zone ID when you create an alias record that routes traffic to a CloudFront distribution.
Alias records for CloudFront can’t be created in a private zone.
Elastic Beanstalk environment - Specify the hosted zone ID for the region that you created the environment in. The environment must have a regionalized subdomain. For a list of regions and the corresponding hosted zone IDs, see AWS Elastic Beanstalk endpoints and quotas in the Amazon Web Services General Reference .
ELB load balancer - Specify the value of the hosted zone ID for the load balancer. Use the following methods to get the hosted zone ID:
Service Endpoints table in the “Elastic Load Balancing Endpoints and Quotas” topic in the Amazon Web Services General Reference : Use the value that corresponds with the region that you created your load balancer in. Note that there are separate columns for Application and Classic Load Balancers and for Network Load Balancers.
AWS Management Console : Go to the Amazon EC2 page, choose Load Balancers in the navigation pane, select the load balancer, and get the value of the Hosted zone field on the Description tab.
Elastic Load Balancing API : Use
DescribeLoadBalancersto get the applicable value. For more information, see the applicable guide:Classic Load Balancers: Use DescribeLoadBalancers to get the value of
CanonicalHostedZoneNameID.Application and Network Load Balancers: Use DescribeLoadBalancers to get the value of
CanonicalHostedZoneID.CloudFormation Fn::GetAtt intrinsic function : Use the Fn::GetAtt intrinsic function to get the applicable value:
Classic Load Balancers: Get CanonicalHostedZoneNameID .
Application and Network Load Balancers: Get CanonicalHostedZoneID .
AWS CLI : Use
describe-load-balancersto get the applicable value. For more information, see the applicable guide:Classic Load Balancers: Use describe-load-balancers to get the value of
CanonicalHostedZoneNameID.Application and Network Load Balancers: Use describe-load-balancers to get the value of
CanonicalHostedZoneID.Global Accelerator accelerator - Specify
Z2BJ6XQ5FK7U4H.An Amazon S3 bucket configured as a static website - Specify the hosted zone ID for the region that you created the bucket in. For more information about valid values, see the table Amazon S3 Website Endpoints in the Amazon Web Services General Reference .
Another Route 53 record in your hosted zone - Specify the hosted zone ID of your hosted zone. (An alias record can’t reference a record in a different hosted zone.)
- See:
- Type:
Alias resource records sets only
- Type:
The value used depends on where you want to route traffic
CidrRoutingConfigProperty
- class CfnRecordSetPropsMixin.CidrRoutingConfigProperty(*, collection_id=None, location_name=None)
Bases:
objectThe object that is specified in resource record set object when you are linking a resource record set to a CIDR location.
A
LocationNamewith an asterisk “*” can be used to create a default CIDR record.CollectionIdis still required for default record.- Parameters:
collection_id (
Optional[str]) – The CIDR collection ID.location_name (
Optional[str]) – The CIDR collection location name.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_route53 import mixins as route53_mixins cidr_routing_config_property = route53_mixins.CfnRecordSetPropsMixin.CidrRoutingConfigProperty( collection_id="collectionId", location_name="locationName" )
Attributes
- collection_id
The CIDR collection ID.
- location_name
The CIDR collection location name.
CoordinatesProperty
- class CfnRecordSetPropsMixin.CoordinatesProperty(*, latitude=None, longitude=None)
Bases:
objectA complex type that lists the coordinates for a geoproximity resource record.
- Parameters:
latitude (
Optional[str]) – Specifies a coordinate of the north–south position of a geographic point on the surface of the Earth (-90 - 90).longitude (
Optional[str]) – Specifies a coordinate of the east–west position of a geographic point on the surface of the Earth (-180 - 180).
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_route53 import mixins as route53_mixins coordinates_property = route53_mixins.CfnRecordSetPropsMixin.CoordinatesProperty( latitude="latitude", longitude="longitude" )
Attributes
- latitude
Specifies a coordinate of the north–south position of a geographic point on the surface of the Earth (-90 - 90).
- longitude
Specifies a coordinate of the east–west position of a geographic point on the surface of the Earth (-180 - 180).
GeoLocationProperty
- class CfnRecordSetPropsMixin.GeoLocationProperty(*, continent_code=None, country_code=None, subdivision_code=None)
Bases:
objectA complex type that contains information about a geographic location.
- Parameters:
continent_code (
Optional[str]) – For geolocation resource record sets, a two-letter abbreviation that identifies a continent. Route 53 supports the following continent codes:. - AF : Africa - AN : Antarctica - AS : Asia - EU : Europe - OC : Oceania - NA : North America - SA : South America Constraint: SpecifyingContinentCodewith eitherCountryCodeorSubdivisionCodereturns anInvalidInputerror.country_code (
Optional[str]) – For geolocation resource record sets, the two-letter code for a country. Route 53 uses the two-letter country codes that are specified in ISO standard 3166-1 alpha-2 .subdivision_code (
Optional[str]) – For geolocation resource record sets, the two-letter code for a state of the United States. Route 53 doesn’t support any other values forSubdivisionCode. For a list of state abbreviations, see Appendix B: Two–Letter State and Possession Abbreviations on the United States Postal Service website. If you specifysubdivisioncode, you must also specifyUSforCountryCode.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_route53 import mixins as route53_mixins geo_location_property = route53_mixins.CfnRecordSetPropsMixin.GeoLocationProperty( continent_code="continentCode", country_code="countryCode", subdivision_code="subdivisionCode" )
Attributes
- continent_code
.
AF : Africa
AN : Antarctica
AS : Asia
EU : Europe
OC : Oceania
NA : North America
SA : South America
Constraint: Specifying
ContinentCodewith eitherCountryCodeorSubdivisionCodereturns anInvalidInputerror.- See:
- Type:
For geolocation resource record sets, a two-letter abbreviation that identifies a continent. Route 53 supports the following continent codes
- country_code
For geolocation resource record sets, the two-letter code for a country.
Route 53 uses the two-letter country codes that are specified in ISO standard 3166-1 alpha-2 .
- subdivision_code
For geolocation resource record sets, the two-letter code for a state of the United States.
Route 53 doesn’t support any other values for
SubdivisionCode. For a list of state abbreviations, see Appendix B: Two–Letter State and Possession Abbreviations on the United States Postal Service website.If you specify
subdivisioncode, you must also specifyUSforCountryCode.
GeoProximityLocationProperty
- class CfnRecordSetPropsMixin.GeoProximityLocationProperty(*, aws_region=None, bias=None, coordinates=None, local_zone_group=None)
Bases:
object(Resource record sets only): A complex type that lets you specify where your resources are located.
Only one of
LocalZoneGroup,Coordinates, orAWS Regionis allowed per request at a time.For more information about geoproximity routing, see Geoproximity routing in the Amazon Route 53 Developer Guide .
- Parameters:
aws_region (
Optional[str]) – The AWS Region the resource you are directing DNS traffic to, is in.bias (
Union[int,float,None]) – The bias increases or decreases the size of the geographic region from which Route 53 routes traffic to a resource. To useBiasto change the size of the geographic region, specify the applicable value for the bias: - To expand the size of the geographic region from which Route 53 routes traffic to a resource, specify a positive integer from 1 to 99 for the bias. Route 53 shrinks the size of adjacent regions. - To shrink the size of the geographic region from which Route 53 routes traffic to a resource, specify a negative bias of -1 to -99. Route 53 expands the size of adjacent regions.coordinates (
Union[IResolvable,CoordinatesProperty,Dict[str,Any],None]) – Contains the longitude and latitude for a geographic region.local_zone_group (
Optional[str]) – Specifies an AWS Local Zone Group. A local Zone Group is usually the Local Zone code without the ending character. For example, if the Local Zone isus-east-1-bue-1athe Local Zone Group isus-east-1-bue-1. You can identify the Local Zones Group for a specific Local Zone by using the describe-availability-zones CLI command: This command returns:"GroupName": "us-west-2-den-1", specifying that the Local Zoneus-west-2-den-1abelongs to the Local Zone Groupus-west-2-den-1.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_route53 import mixins as route53_mixins geo_proximity_location_property = route53_mixins.CfnRecordSetPropsMixin.GeoProximityLocationProperty( aws_region="awsRegion", bias=123, coordinates=route53_mixins.CfnRecordSetPropsMixin.CoordinatesProperty( latitude="latitude", longitude="longitude" ), local_zone_group="localZoneGroup" )
Attributes
- aws_region
The AWS Region the resource you are directing DNS traffic to, is in.
- bias
The bias increases or decreases the size of the geographic region from which Route 53 routes traffic to a resource.
To use
Biasto change the size of the geographic region, specify the applicable value for the bias:To expand the size of the geographic region from which Route 53 routes traffic to a resource, specify a positive integer from 1 to 99 for the bias. Route 53 shrinks the size of adjacent regions.
To shrink the size of the geographic region from which Route 53 routes traffic to a resource, specify a negative bias of -1 to -99. Route 53 expands the size of adjacent regions.
- coordinates
Contains the longitude and latitude for a geographic region.
- local_zone_group
Specifies an AWS Local Zone Group.
A local Zone Group is usually the Local Zone code without the ending character. For example, if the Local Zone is
us-east-1-bue-1athe Local Zone Group isus-east-1-bue-1.You can identify the Local Zones Group for a specific Local Zone by using the describe-availability-zones CLI command:
This command returns:
"GroupName": "us-west-2-den-1", specifying that the Local Zoneus-west-2-den-1abelongs to the Local Zone Groupus-west-2-den-1.