DnsRecordType

class aws_cdk.aws_servicediscovery.DnsRecordType(value)

Bases: Enum

ExampleMetadata

lit=test/integ.service-with-cname-record.lit.ts infused

Example:

import aws_cdk.core as cdk
import aws_cdk.aws_servicediscovery as servicediscovery

app = cdk.App()
stack = cdk.Stack(app, "aws-servicediscovery-integ")

namespace = servicediscovery.PublicDnsNamespace(stack, "Namespace",
    name="foobar.com"
)

service = namespace.create_service("Service",
    name="foo",
    dns_record_type=servicediscovery.DnsRecordType.CNAME,
    dns_ttl=cdk.Duration.seconds(30)
)

service.register_cname_instance("CnameInstance",
    instance_cname="service.pizza"
)

app.synth()

Attributes

A

An A record.

AAAA

An AAAA record.

A_AAAA

Both an A and AAAA record.

CNAME

A CNAME record.

SRV

A Srv record.