Class: AWSCDK::Route53::RecordSetOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Route53::RecordSetOptions
- Defined in:
- route53/record_set_options.rb
Overview
Options for a RecordSet.
Direct Known Subclasses
ARecordAttrs, ARecordProps, AaaaRecordProps, CaaAmazonRecordProps, CaaRecordProps, CnameRecordProps, DsRecordProps, HttpsRecordProps, MxRecordProps, NsRecordProps, RecordSetProps, SrvRecordProps, SvcbRecordProps, TxtRecordProps, ZoneDelegationRecordProps
Instance Attribute Summary collapse
-
#cidr_routing_config ⇒ AWSCDK::Route53::CIDRRoutingConfig?
readonly
The object that is specified in resource record set object when you are linking a resource record set to a CIDR location.
-
#comment ⇒ String?
readonly
A comment to add on the record.
-
#delete_existing ⇒ Boolean?
readonly
deprecated
Deprecated.
This property is dangerous and can lead to unintended record deletion in case of deployment failure.
-
#failover ⇒ AWSCDK::Route53::Failover?
readonly
Failover configuration for the record set.
-
#geo_location ⇒ AWSCDK::Route53::GeoLocation?
readonly
The geographical origin for this record to return DNS records based on the user's location.
-
#health_check ⇒ AWSCDK::Route53::IHealthCheck?
readonly
The health check to associate with the record set.
-
#multi_value_answer ⇒ Boolean?
readonly
Whether to return multiple values, such as IP addresses for your web servers, in response to DNS queries.
-
#record_name ⇒ String?
readonly
The subdomain name for this record.
-
#region ⇒ String?
readonly
The Amazon EC2 Region where you created the resource that this resource record set refers to.
-
#set_identifier ⇒ String?
readonly
A string used to distinguish between different records with the same combination of DNS name and type.
-
#ttl ⇒ AWSCDK::Duration?
readonly
The resource record cache time to live (TTL).
-
#weight ⇒ Numeric?
readonly
Among resource record sets that have the same combination of DNS name and type, a value that determines the proportion of DNS queries that Amazon Route 53 responds to using the current resource record set.
-
#zone ⇒ AWSCDK::Route53::IHostedZone
readonly
The hosted zone in which to define the new record.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(zone:, cidr_routing_config: nil, comment: nil, delete_existing: nil, failover: nil, geo_location: nil, health_check: nil, multi_value_answer: nil, record_name: nil, region: nil, set_identifier: nil, ttl: nil, weight: nil) ⇒ RecordSetOptions
constructor
A new instance of RecordSetOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(zone:, cidr_routing_config: nil, comment: nil, delete_existing: nil, failover: nil, geo_location: nil, health_check: nil, multi_value_answer: nil, record_name: nil, region: nil, set_identifier: nil, ttl: nil, weight: nil) ⇒ RecordSetOptions
Returns a new instance of RecordSetOptions.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'route53/record_set_options.rb', line 20 def initialize(zone:, cidr_routing_config: nil, comment: nil, delete_existing: nil, failover: nil, geo_location: nil, health_check: nil, multi_value_answer: nil, record_name: nil, region: nil, set_identifier: nil, ttl: nil, weight: nil) @zone = zone Jsii::Type.check_type(@zone, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfcm91dGU1My5JSG9zdGVkWm9uZSJ9")), "zone") @cidr_routing_config = cidr_routing_config Jsii::Type.check_type(@cidr_routing_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfcm91dGU1My5DaWRyUm91dGluZ0NvbmZpZyJ9")), "cidrRoutingConfig") unless @cidr_routing_config.nil? @comment = comment Jsii::Type.check_type(@comment, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "comment") unless @comment.nil? @delete_existing = delete_existing Jsii::Type.check_type(@delete_existing, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "deleteExisting") unless @delete_existing.nil? @failover = failover Jsii::Type.check_type(@failover, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfcm91dGU1My5GYWlsb3ZlciJ9")), "failover") unless @failover.nil? @geo_location = geo_location Jsii::Type.check_type(@geo_location, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfcm91dGU1My5HZW9Mb2NhdGlvbiJ9")), "geoLocation") unless @geo_location.nil? @health_check = health_check Jsii::Type.check_type(@health_check, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfcm91dGU1My5JSGVhbHRoQ2hlY2sifQ==")), "healthCheck") unless @health_check.nil? @multi_value_answer = multi_value_answer Jsii::Type.check_type(@multi_value_answer, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "multiValueAnswer") unless @multi_value_answer.nil? @record_name = record_name Jsii::Type.check_type(@record_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "recordName") unless @record_name.nil? @region = region Jsii::Type.check_type(@region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "region") unless @region.nil? @set_identifier = set_identifier Jsii::Type.check_type(@set_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "setIdentifier") unless @set_identifier.nil? @ttl = ttl Jsii::Type.check_type(@ttl, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "ttl") unless @ttl.nil? @weight = weight Jsii::Type.check_type(@weight, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "weight") unless @weight.nil? end |
Instance Attribute Details
#cidr_routing_config ⇒ AWSCDK::Route53::CIDRRoutingConfig? (readonly)
Default: - No CIDR routing configured
The object that is specified in resource record set object when you are linking a resource record set to a CIDR location.
A LocationName with an asterisk “*” can be used to create a default CIDR record. CollectionId is still required for default record.
60 61 62 |
# File 'route53/record_set_options.rb', line 60 def cidr_routing_config @cidr_routing_config end |
#comment ⇒ String? (readonly)
Default: no comment
A comment to add on the record.
65 66 67 |
# File 'route53/record_set_options.rb', line 65 def comment @comment end |
#delete_existing ⇒ Boolean? (readonly)
This property is dangerous and can lead to unintended record deletion in case of deployment failure.
Default: false
Whether to delete the same record set in the hosted zone if it already exists (dangerous!).
This allows you to deploy a new record set while minimizing the downtime because the new record set will be created immediately after the existing one is deleted. It also avoids "manual" actions to delete existing record sets.
N.B.: this feature is dangerous, use with caution! It can only be used safely when
delete_existingis set totrueas soon as the resource is added to the stack. Changing an existing Record Set'sdelete_existingproperty fromfalse -> trueafter deployment will delete the record!
80 81 82 |
# File 'route53/record_set_options.rb', line 80 def delete_existing @delete_existing end |
#failover ⇒ AWSCDK::Route53::Failover? (readonly)
Default: - No failover configuration
Failover configuration for the record set.
To configure failover, you add the Failover element to two resource record sets. For one resource record set, you specify PRIMARY as the value for Failover; for the other resource record set, you specify SECONDARY.
You must also include the HealthCheckId element for PRIMARY configurations.
92 93 94 |
# File 'route53/record_set_options.rb', line 92 def failover @failover end |
#geo_location ⇒ AWSCDK::Route53::GeoLocation? (readonly)
The geographical origin for this record to return DNS records based on the user's location.
96 97 98 |
# File 'route53/record_set_options.rb', line 96 def geo_location @geo_location end |
#health_check ⇒ AWSCDK::Route53::IHealthCheck? (readonly)
Default: - No health check configured
The health check to associate with the record set.
Route53 will return this record set in response to DNS queries only if the health check is passing.
103 104 105 |
# File 'route53/record_set_options.rb', line 103 def health_check @health_check end |
#multi_value_answer ⇒ Boolean? (readonly)
Default: false
Whether to return multiple values, such as IP addresses for your web servers, in response to DNS queries.
108 109 110 |
# File 'route53/record_set_options.rb', line 108 def multi_value_answer @multi_value_answer end |
#record_name ⇒ String? (readonly)
Default: zone root
The subdomain name for this record. This should be relative to the zone root name.
For example, if you want to create a record for acme.example.com, specify "acme".
You can also specify the fully qualified domain name which terminates with a ".". For example, "acme.example.com.".
119 120 121 |
# File 'route53/record_set_options.rb', line 119 def record_name @record_name end |
#region ⇒ String? (readonly)
Default: - Do not set latency based routing
The Amazon EC2 Region where you created the resource that this resource record set refers to.
The resource typically is an AWS resource, such as an EC2 instance or an ELB load balancer, and is referred to by an IP address or a DNS domain name, depending on the record type.
When Amazon Route 53 receives a DNS query for a domain name and type for which you have created latency resource record sets, Route 53 selects the latency resource record set that has the lowest latency between the end user and the associated Amazon EC2 Region. Route 53 then returns the value that is associated with the selected resource record set.
132 133 134 |
# File 'route53/record_set_options.rb', line 132 def region @region end |
#set_identifier ⇒ String? (readonly)
Default: - Auto generated string
A string used to distinguish between different records with the same combination of DNS name and type.
It can only be set when either weight or geoLocation is defined.
This parameter must be between 1 and 128 characters in length.
141 142 143 |
# File 'route53/record_set_options.rb', line 141 def set_identifier @set_identifier end |
#ttl ⇒ AWSCDK::Duration? (readonly)
Default: Duration.minutes(30)
The resource record cache time to live (TTL).
146 147 148 |
# File 'route53/record_set_options.rb', line 146 def ttl @ttl end |
#weight ⇒ Numeric? (readonly)
Default: - Do not set weighted routing
Among resource record sets that have the same combination of DNS name and type, a value that determines the proportion of DNS queries that Amazon Route 53 responds to using the current resource record set.
Route 53 calculates the sum of the weights for the resource record sets that have the same combination of DNS name and type. Route 53 then responds to queries based on the ratio of a resource's weight to the total.
This value can be a number between 0 and 255.
157 158 159 |
# File 'route53/record_set_options.rb', line 157 def weight @weight end |
#zone ⇒ AWSCDK::Route53::IHostedZone (readonly)
The hosted zone in which to define the new record.
52 53 54 |
# File 'route53/record_set_options.rb', line 52 def zone @zone end |
Class Method Details
.jsii_properties ⇒ Object
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'route53/record_set_options.rb', line 159 def self.jsii_properties { :zone => "zone", :cidr_routing_config => "cidrRoutingConfig", :comment => "comment", :delete_existing => "deleteExisting", :failover => "failover", :geo_location => "geoLocation", :health_check => "healthCheck", :multi_value_answer => "multiValueAnswer", :record_name => "recordName", :region => "region", :set_identifier => "setIdentifier", :ttl => "ttl", :weight => "weight", } end |
Instance Method Details
#to_jsii ⇒ Object
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'route53/record_set_options.rb', line 177 def to_jsii result = {} result.merge!({ "zone" => @zone, "cidrRoutingConfig" => @cidr_routing_config, "comment" => @comment, "deleteExisting" => @delete_existing, "failover" => @failover, "geoLocation" => @geo_location, "healthCheck" => @health_check, "multiValueAnswer" => @multi_value_answer, "recordName" => @record_name, "region" => @region, "setIdentifier" => @set_identifier, "ttl" => @ttl, "weight" => @weight, }) result.compact end |