AWS::Route53::RecordSet¶
Resource Type definition for AWS::Route53::RecordSet.
Generated by cfn-typegen --out cfn_types AWS::Route53::RecordSet into cfn_types/route53.py:
# Generated by cfn-typegen from the CloudFormation registry schemas. Do not edit.
# fmt: off
# ruff: noqa
"""AWS::Route53 resources."""
from typing import Any, Literal, NotRequired, Unpack
from typing_extensions import TypedDict
from cfn_typed.base import DeletionPolicy, DependsOn, ResourceAttrs, UpdateReplacePolicy, build
from cfn_typed.intrinsics import Expr
CONSTRAINTS:dict[str,Any]={
'AWS::Route53::RecordSet':{'HealthCheckId':{'L':64},'AliasTarget':{'P':{'HostedZoneId':{'L':44},'DNSName':{'L':1024}}},'Comment':{'L':256},'HostedZoneName':{'L':256},'ResourceRecords':{'T':{'L':4000}},'HostedZoneId':{'L':44},'SetIdentifier':{'l':0,'L':128},'Name':{'L':1024},'CidrRoutingConfig':{'P':{'CollectionId':{'p':"^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$"},'LocationName':{'p':"[0-9A-Za-z_\\-\\*]+",'l':1,'L':16}}},'Failover':{'e':["PRIMARY","SECONDARY"]},'GeoLocation':{'P':{'ContinentCode':{'l':2,'L':2},'CountryCode':{'l':1,'L':2},'SubdivisionCode':{'l':1,'L':3}}}},
}
ATTRIBUTES:dict[str,Any]={"AWS::Route53::RecordSet":["HostedZoneId","Name","SetIdentifier","Type"]}
RULES:dict[str,Any]={"AWS::Route53::RecordSet":[[[],"o",[["HostedZoneId"],["HostedZoneName"]]],[["GeoLocation"],"o",[["ContinentCode"],["CountryCode"]]]]}
Nested types (6)
These are defined above the properties in the generated module.
class RecordSetAliasTarget(TypedDict, closed=True):
HostedZoneId: Expr[str]
'The value used depends on where you want to route traffic.'
DNSName: Expr[str]
'The value that you specify depends on where you want to route queries.'
EvaluateTargetHealth: NotRequired[Expr[bool]]
'When EvaluateTargetHealth is true, an alias resource record set inherits the health of the referenced AWS resource, such as an ELB load balancer or another r...'
class RecordSetCidrRoutingConfig(TypedDict, closed=True):
CollectionId: Expr[str]
'The CIDR collection ID.'
LocationName: Expr[str]
'The CIDR collection location name.'
class RecordSetGeoLocation(TypedDict, closed=True):
ContinentCode: NotRequired[Expr[str]]
'For geolocation resource record sets, a two-letter abbreviation that identifies a continent.'
CountryCode: NotRequired[Expr[str]]
'For geolocation resource record sets, the two-letter code for a country.'
SubdivisionCode: NotRequired[Expr[str]]
'For geolocation resource record sets, the two-letter code for a state of the United States.'
class RecordSetProps(TypedDict, closed=True):
'Resource Type definition for AWS::Route53::RecordSet.'
HealthCheckId: NotRequired[Expr[str]]
'If you want Amazon Route 53 to return this resource record set in response to a DNS query only when the status of a health check is healthy, include the Heal...'
AliasTarget: NotRequired[Expr[RecordSetAliasTarget]]
'Alias resource record sets only: Information about the AWS resource, such as a CloudFront distribution or an Amazon S3 bucket, that you want to route traffic...'
Comment: NotRequired[Expr[str]]
'Optional: Any comments you want to include about a change batch request.'
HostedZoneName: NotRequired[Expr[str]]
'The name of the hosted zone that you want to create records in.'
ResourceRecords: NotRequired[Expr[list[Expr[str]]]]
'One or more values that correspond with the value that you specified for the Type property.'
HostedZoneId: NotRequired[Expr[str]]
'The ID of the hosted zone that you want to create records in.'
SetIdentifier: NotRequired[Expr[str]]
'An identifier that differentiates among multiple resource record sets that have the same combination of name and type.'
TTL: NotRequired[Expr[str]]
'The resource record cache time to live (TTL), in seconds.'
Weight: NotRequired[Expr[int]]
'Among resource record sets that have the same combination of DNS name and type, a value that determines the proportion of DNS queries that Amazon Route 53 re...'
Name: Expr[str]
'The name of the record that you want to create, update, or delete.'
Type: Expr[str]
'The DNS record type.'
CidrRoutingConfig: NotRequired[Expr[RecordSetCidrRoutingConfig]]
'The object that is specified in resource record set object when you are linking a resource record set to a CIDR location.'
Failover: NotRequired[Expr[str]]
'To configure failover, you add the Failover element to two resource record sets.'
Region: NotRequired[Expr[str]]
'The Amazon EC2 Region where you created the resource that this resource record set refers to.'
GeoLocation: NotRequired[Expr[RecordSetGeoLocation]]
'A complex type that lets you control how Amazon Route 53 responds to DNS queries based on the geographic origin of the query.'
MultiValueAnswer: NotRequired[Expr[bool]]
'To route traffic approximately randomly to multiple resources, such as web servers, create one multivalue answer record for each resource and specify true fo...'
class RecordSet(ResourceAttrs):
'Resource Type definition for AWS::Route53::RecordSet.'
Type: Literal['AWS::Route53::RecordSet']
Properties: RecordSetProps
def record_set(
*,
depends_on: DependsOn | None = None,
deletion_policy: DeletionPolicy | None = None,
update_replace_policy: UpdateReplacePolicy | None = None,
condition: str | None = None,
metadata: dict[str, Any] | None = None,
**props: Unpack[RecordSetProps],
) -> RecordSet:
return build('AWS::Route53::RecordSet', props, depends_on, deletion_policy, update_replace_policy, condition, metadata)