ARecordProps

class aws_cdk.aws_route53.ARecordProps(*, zone, comment=None, record_name=None, ttl=None, target)

Bases: RecordSetOptions

Construction properties for a ARecord.

Parameters:
  • zone (IHostedZone) – The hosted zone in which to define the new record.

  • comment (Optional[str]) – A comment to add on the record. Default: no comment

  • record_name (Optional[str]) – The domain name for this record. Default: zone root

  • ttl (Optional[Duration]) – The resource record cache time to live (TTL). Default: Duration.minutes(30)

  • target (RecordTarget) – The target.

ExampleMetadata:

infused

Example:

import aws_cdk.aws_apigateway as apigw

# zone: route53.HostedZone
# rest_api: apigw.LambdaRestApi


route53.ARecord(self, "AliasRecord",
    zone=zone,
    target=route53.RecordTarget.from_alias(targets.ApiGateway(rest_api))
)

Attributes

comment

A comment to add on the record.

Default:

no comment

record_name

The domain name for this record.

Default:

zone root

target

The target.

ttl

The resource record cache time to live (TTL).

Default:

Duration.minutes(30)

zone

The hosted zone in which to define the new record.