Class CfnService.DnsRecordProperty
A complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.ServiceDiscovery
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DnsRecordProperty : Object, CfnService.IDnsRecordProperty
Syntax (vb)
Public Class DnsRecordProperty
Inherits Object
Implements CfnService.IDnsRecordProperty
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ServiceDiscovery;
var dnsRecordProperty = new DnsRecordProperty {
Ttl = 123,
Type = "type"
};
Synopsis
Constructors
Dns |
Properties
Ttl | The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record. |
Type | The type of the resource, which indicates the type of value that Route 53 returns in response to DNS queries. |
Constructors
DnsRecordProperty()
public DnsRecordProperty()
Properties
Ttl
The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record.
public double Ttl { get; set; }
Property Value
System.
Remarks
Alias records don't include a TTL because Route 53 uses the TTL for the AWS resource that an alias record routes traffic to. If you include the AWS_ALIAS_DNS_NAME
attribute when you submit a RegisterInstance request, the TTL
value is ignored. Always specify a TTL for the service; you can use a service to register instances that create either alias or non-alias records.
Type
The type of the resource, which indicates the type of value that Route 53 returns in response to DNS queries.
public string Type { get; set; }
Property Value
System.
Remarks
You can specify values for Type
in the following combinations:
If you want AWS Cloud Map to create a Route 53 alias record when you register an instance, specify A
or AAAA
for Type
.
You specify other settings, such as the IP address for A
and AAAA
records, when you register an instance. For more information, see RegisterInstance .
The following values are supported:
priority weight port service-hostname
Note the following about the values:
For example, if the value of InstanceId
is test
, the name of the service is backend
, and the name of the namespace is example.com
, the value of service-hostname
is:
test.backend.example.com
If you specify settings for an SRV
record and if you specify values for AWS_INSTANCE_IPV4
, AWS_INSTANCE_IPV6
, or both in the RegisterInstance
request, AWS Cloud Map automatically creates A
and/or AAAA
records that have the same name as the value of service-hostname
in the SRV
record. You can ignore these records.