Class: AWSCDK::ServiceDiscovery::CfnService::DNSConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ServiceDiscovery::CfnService::DNSConfigProperty
- Defined in:
- service_discovery/cfn_service.rb
Overview
A complex type that contains information about the Amazon Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.
Instance Attribute Summary collapse
-
#dns_records ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::ServiceDiscovery::CfnService::DNSRecordProperty>
readonly
An array that contains one
DnsRecordobject for each Route 53 DNS record that you want AWS Cloud Map to create when you register an instance. -
#namespace_id ⇒ String?
readonly
Use NamespaceId in Service instead..
-
#routing_policy ⇒ String?
readonly
The routing policy that you want to apply to all Route 53 DNS records that AWS Cloud Map creates when you register an instance and specify this service.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dns_records:, namespace_id: nil, routing_policy: nil) ⇒ DNSConfigProperty
constructor
A new instance of DNSConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(dns_records:, namespace_id: nil, routing_policy: nil) ⇒ DNSConfigProperty
Returns a new instance of DNSConfigProperty.
668 669 670 671 672 673 674 675 |
# File 'service_discovery/cfn_service.rb', line 668 def initialize(dns_records:, namespace_id: nil, routing_policy: nil) @dns_records = dns_records Jsii::Type.check_type(@dns_records, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2VydmljZWRpc2NvdmVyeS5DZm5TZXJ2aWNlLkRuc1JlY29yZFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "dnsRecords") @namespace_id = namespace_id Jsii::Type.check_type(@namespace_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "namespaceId") unless @namespace_id.nil? @routing_policy = routing_policy Jsii::Type.check_type(@routing_policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "routingPolicy") unless @routing_policy.nil? end |
Instance Attribute Details
#dns_records ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::ServiceDiscovery::CfnService::DNSRecordProperty> (readonly)
An array that contains one DnsRecord object for each Route 53 DNS record that you want AWS Cloud Map to create when you register an instance.
The record type of a service can't be updated directly and can only be changed by deleting the service and recreating it with a new
DnsConfig.
683 684 685 |
# File 'service_discovery/cfn_service.rb', line 683 def dns_records @dns_records end |
#namespace_id ⇒ String? (readonly)
Use NamespaceId in Service instead..
The ID of the namespace to use for DNS configuration.
690 691 692 |
# File 'service_discovery/cfn_service.rb', line 690 def namespace_id @namespace_id end |
#routing_policy ⇒ String? (readonly)
The routing policy that you want to apply to all Route 53 DNS records that AWS Cloud Map creates when you register an instance and specify this service.
If you want to use this service to register instances that create alias records, specify
WEIGHTEDfor the routing policy.
You can specify the following values:
- MULTIVALUE - If you define a health check for the service and the health check is healthy, Route 53 returns the applicable value for up to eight instances.
For example, suppose that the service includes configurations for one A record and a health check. You use the service to register 10 instances. Route 53 responds to DNS queries with IP addresses for up to eight healthy instances. If fewer than eight instances are healthy, Route 53 responds to every DNS query with the IP addresses for all of the healthy instances.
If you don't define a health check for the service, Route 53 assumes that all instances are healthy and returns the values for up to eight instances.
For more information about the multivalue routing policy, see Multivalue Answer Routing in the Route 53 Developer Guide .
- WEIGHTED - Route 53 returns the applicable value from one randomly selected instance from among the instances that you registered using the same service. Currently, all records have the same weight, so you can't route more or less traffic to any instances.
For example, suppose that the service includes configurations for one A record and a health check. You use the service to register 10 instances. Route 53 responds to DNS queries with the IP address for one randomly selected instance from among the healthy instances. If no instances are healthy, Route 53 responds to DNS queries as if all of the instances were healthy.
If you don't define a health check for the service, Route 53 assumes that all instances are healthy and returns the applicable value for one randomly selected instance.
For more information about the weighted routing policy, see Weighted Routing in the Route 53 Developer Guide .
715 716 717 |
# File 'service_discovery/cfn_service.rb', line 715 def routing_policy @routing_policy end |
Class Method Details
.jsii_properties ⇒ Object
717 718 719 720 721 722 723 |
# File 'service_discovery/cfn_service.rb', line 717 def self.jsii_properties { :dns_records => "dnsRecords", :namespace_id => "namespaceId", :routing_policy => "routingPolicy", } end |
Instance Method Details
#to_jsii ⇒ Object
725 726 727 728 729 730 731 732 733 |
# File 'service_discovery/cfn_service.rb', line 725 def to_jsii result = {} result.merge!({ "dnsRecords" => @dns_records, "namespaceId" => @namespace_id, "routingPolicy" => @routing_policy, }) result.compact end |