Class: AWSCDK::Route53::CnameRecordProps
- Inherits:
-
RecordSetOptions
- Object
- RecordSetOptions
- AWSCDK::Route53::CnameRecordProps
- Defined in:
- route53/cname_record_props.rb
Overview
Construction properties for a CnameRecord.
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.
-
#domain_name ⇒ String
readonly
The domain name of the target that this record should point to.
-
#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, domain_name:) ⇒ CnameRecordProps
constructor
A new instance of CnameRecordProps.
- #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, domain_name:) ⇒ CnameRecordProps
Returns a new instance of CnameRecordProps.
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 48 49 50 |
# File 'route53/cname_record_props.rb', line 21 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, domain_name:) @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? @domain_name = domain_name Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainName") 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.
63 64 65 |
# File 'route53/cname_record_props.rb', line 63 def cidr_routing_config @cidr_routing_config end |
#comment ⇒ String? (readonly)
Default: no comment
A comment to add on the record.
68 69 70 |
# File 'route53/cname_record_props.rb', line 68 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!
83 84 85 |
# File 'route53/cname_record_props.rb', line 83 def delete_existing @delete_existing end |
#domain_name ⇒ String (readonly)
The domain name of the target that this record should point to.
164 165 166 |
# File 'route53/cname_record_props.rb', line 164 def domain_name @domain_name 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.
95 96 97 |
# File 'route53/cname_record_props.rb', line 95 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.
99 100 101 |
# File 'route53/cname_record_props.rb', line 99 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.
106 107 108 |
# File 'route53/cname_record_props.rb', line 106 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.
111 112 113 |
# File 'route53/cname_record_props.rb', line 111 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.".
122 123 124 |
# File 'route53/cname_record_props.rb', line 122 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.
135 136 137 |
# File 'route53/cname_record_props.rb', line 135 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.
144 145 146 |
# File 'route53/cname_record_props.rb', line 144 def set_identifier @set_identifier end |
#ttl ⇒ AWSCDK::Duration? (readonly)
Default: Duration.minutes(30)
The resource record cache time to live (TTL).
149 150 151 |
# File 'route53/cname_record_props.rb', line 149 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.
160 161 162 |
# File 'route53/cname_record_props.rb', line 160 def weight @weight end |
#zone ⇒ AWSCDK::Route53::IHostedZone (readonly)
The hosted zone in which to define the new record.
55 56 57 |
# File 'route53/cname_record_props.rb', line 55 def zone @zone end |
Class Method Details
.jsii_properties ⇒ Object
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'route53/cname_record_props.rb', line 166 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", :domain_name => "domainName", } end |
Instance Method Details
#to_jsii ⇒ Object
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'route53/cname_record_props.rb', line 185 def to_jsii result = {} result.merge!(super) 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, "domainName" => @domain_name, }) result.compact end |