@Stability(value=Stable) public static final class CfnService.DnsRecordProperty.Builder extends Object implements software.amazon.jsii.Builder<CfnService.DnsRecordProperty>
CfnService.DnsRecordProperty| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
CfnService.DnsRecordProperty |
build()
Builds the configured instance.
|
CfnService.DnsRecordProperty.Builder |
ttl(Number ttl)
Sets the value of
CfnService.DnsRecordProperty.getTtl() |
CfnService.DnsRecordProperty.Builder |
type(String type)
Sets the value of
CfnService.DnsRecordProperty.getType() |
@Stability(value=Stable) public CfnService.DnsRecordProperty.Builder ttl(Number ttl)
CfnService.DnsRecordProperty.getTtl()ttl - The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record. This parameter is required.
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.
this@Stability(value=Stable) public CfnService.DnsRecordProperty.Builder type(String type)
CfnService.DnsRecordProperty.getType()type - The type of the resource, which indicates the type of value that Route 53 returns in response to DNS queries. This parameter is required.
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.
this@Stability(value=Stable) public CfnService.DnsRecordProperty build()
build in interface software.amazon.jsii.Builder<CfnService.DnsRecordProperty>CfnService.DnsRecordPropertyNullPointerException - if any required attribute was not providedCopyright © 2022. All rights reserved.