@Stability(value=Stable)
public static interface CfnService.DnsRecordProperty
extends software.amazon.jsii.JsiiSerializable
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.servicediscovery.*;
DnsRecordProperty dnsRecordProperty = DnsRecordProperty.builder()
.ttl(123)
.type("type")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnService.DnsRecordProperty.Builder
A builder for
CfnService.DnsRecordProperty |
static class |
CfnService.DnsRecordProperty.Jsii$Proxy
An implementation for
CfnService.DnsRecordProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnService.DnsRecordProperty.Builder |
builder() |
Number |
getTtl()
The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record.
|
String |
getType()
The type of the resource, which indicates the type of value that Route 53 returns in response to DNS queries.
|
@Stability(value=Stable) @NotNull Number getTtl()
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_NAMEattribute when you submit a RegisterInstance request, theTTLvalue 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.
@Stability(value=Stable) @NotNull String getType()
You can specify values for Type in the following combinations:
AAAAAA and AAAASRVCNAME
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:
WEIGHTED for the value of RoutingPolicy .CNAME for Type and settings for HealthCheckConfig . If you do, the request will fail with an InvalidInput error.SRV record. The value for an SRV record uses the following values:
priority weight port service-hostname
Note the following about the values:
priority and weight are both set to 1 and can't be changed.port comes from the value that you specify for the AWS_INSTANCE_PORT attribute when you submit a RegisterInstance request.service-hostname is a concatenation of the following values:InstanceId when you register an instance.
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.
@Stability(value=Stable) static CfnService.DnsRecordProperty.Builder builder()
Copyright © 2022. All rights reserved.