Class: AWSCDK::Route53::AaaaRecordProps

Inherits:
RecordSetOptions
  • Object
show all
Defined in:
route53/aaaa_record_props.rb

Overview

Construction properties for a AaaaRecord.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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, target:) ⇒ AaaaRecordProps

Returns a new instance of AaaaRecordProps.

Parameters:

  • zone (AWSCDK::Route53::IHostedZone)

    The hosted zone in which to define the new record.

  • cidr_routing_config (AWSCDK::Route53::CIDRRoutingConfig, nil) (defaults to: nil)

    The object that is specified in resource record set object when you are linking a resource record set to a CIDR location.

  • comment (String, nil) (defaults to: nil)

    A comment to add on the record.

  • delete_existing (Boolean, nil) (defaults to: nil)

    Whether to delete the same record set in the hosted zone if it already exists (dangerous!).

  • failover (AWSCDK::Route53::Failover, nil) (defaults to: nil)

    Failover configuration for the record set.

  • geo_location (AWSCDK::Route53::GeoLocation, nil) (defaults to: nil)

    The geographical origin for this record to return DNS records based on the user's location.

  • health_check (AWSCDK::Route53::IHealthCheck, nil) (defaults to: nil)

    The health check to associate with the record set.

  • multi_value_answer (Boolean, nil) (defaults to: nil)

    Whether to return multiple values, such as IP addresses for your web servers, in response to DNS queries.

  • record_name (String, nil) (defaults to: nil)

    The subdomain name for this record. This should be relative to the zone root name.

  • region (String, nil) (defaults to: nil)

    The Amazon EC2 Region where you created the resource that this resource record set refers to.

  • set_identifier (String, nil) (defaults to: nil)

    A string used to distinguish between different records with the same combination of DNS name and type.

  • ttl (AWSCDK::Duration, nil) (defaults to: nil)

    The resource record cache time to live (TTL).

  • weight (Numeric, nil) (defaults to: nil)

    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.

  • target (AWSCDK::Route53::RecordTarget)

    The target.



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/aaaa_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, target:)
  @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?
  @target = target
  Jsii::Type.check_type(@target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfcm91dGU1My5SZWNvcmRUYXJnZXQifQ==")), "target")
end

Instance Attribute Details

#cidr_routing_configAWSCDK::Route53::CIDRRoutingConfig? (readonly)

Note:

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/aaaa_record_props.rb', line 63

def cidr_routing_config
  @cidr_routing_config
end

#commentString? (readonly)

Note:

Default: no comment

A comment to add on the record.

Returns:

  • (String, nil)


68
69
70
# File 'route53/aaaa_record_props.rb', line 68

def comment
  @comment
end

#delete_existingBoolean? (readonly)

Deprecated.

This property is dangerous and can lead to unintended record deletion in case of deployment failure.

Note:

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_existing is set to true as soon as the resource is added to the stack. Changing an existing Record Set's delete_existing property from false -> true after deployment will delete the record!

Returns:

  • (Boolean, nil)


83
84
85
# File 'route53/aaaa_record_props.rb', line 83

def delete_existing
  @delete_existing
end

#failoverAWSCDK::Route53::Failover? (readonly)

Note:

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/aaaa_record_props.rb', line 95

def failover
  @failover
end

#geo_locationAWSCDK::Route53::GeoLocation? (readonly)

The geographical origin for this record to return DNS records based on the user's location.



99
100
101
# File 'route53/aaaa_record_props.rb', line 99

def geo_location
  @geo_location
end

#health_checkAWSCDK::Route53::IHealthCheck? (readonly)

Note:

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/aaaa_record_props.rb', line 106

def health_check
  @health_check
end

#multi_value_answerBoolean? (readonly)

Note:

Default: false

Whether to return multiple values, such as IP addresses for your web servers, in response to DNS queries.

Returns:

  • (Boolean, nil)


111
112
113
# File 'route53/aaaa_record_props.rb', line 111

def multi_value_answer
  @multi_value_answer
end

#record_nameString? (readonly)

Note:

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.".

Returns:

  • (String, nil)


122
123
124
# File 'route53/aaaa_record_props.rb', line 122

def record_name
  @record_name
end

#regionString? (readonly)

Note:

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/aaaa_record_props.rb', line 135

def region
  @region
end

#set_identifierString? (readonly)

Note:

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.

Returns:

  • (String, nil)


144
145
146
# File 'route53/aaaa_record_props.rb', line 144

def set_identifier
  @set_identifier
end

#targetAWSCDK::Route53::RecordTarget (readonly)

The target.



164
165
166
# File 'route53/aaaa_record_props.rb', line 164

def target
  @target
end

#ttlAWSCDK::Duration? (readonly)

Note:

Default: Duration.minutes(30)

The resource record cache time to live (TTL).

Returns:



149
150
151
# File 'route53/aaaa_record_props.rb', line 149

def ttl
  @ttl
end

#weightNumeric? (readonly)

Note:

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/aaaa_record_props.rb', line 160

def weight
  @weight
end

#zoneAWSCDK::Route53::IHostedZone (readonly)

The hosted zone in which to define the new record.



55
56
57
# File 'route53/aaaa_record_props.rb', line 55

def zone
  @zone
end

Class Method Details

.jsii_propertiesObject



166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'route53/aaaa_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",
    :target => "target",
  }
end

Instance Method Details

#to_jsiiObject



185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# File 'route53/aaaa_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,
    "target" => @target,
  })
  result.compact
end