Class: ApartmentAcmeClient::DnsApi::Route53
- Inherits:
-
Object
- Object
- ApartmentAcmeClient::DnsApi::Route53
- Defined in:
- lib/apartment_acme_client/dns_api/route53.rb
Overview
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
the DNS TXT record label (full label, including domain).
-
#record_type ⇒ Object
readonly
will be TXT.
-
#requested_domain ⇒ Object
readonly
The domain being requested for DNS update e.g.
-
#values ⇒ Object
readonly
array of value keys to be written (for wildcard certs, you’ll have one for *.example.com, and one for example.com) e.g.
Instance Method Summary collapse
-
#initialize(requested_domain:, dns_record_label:, record_type:, values:) ⇒ Route53
constructor
A new instance of Route53.
-
#write_record ⇒ Object
NOTE: If you get error like:.
Constructor Details
#initialize(requested_domain:, dns_record_label:, record_type:, values:) ⇒ Route53
Returns a new instance of Route53.
22 23 24 25 26 27 |
# File 'lib/apartment_acme_client/dns_api/route53.rb', line 22 def initialize(requested_domain:, dns_record_label:, record_type:, values:) @requested_domain = requested_domain @label = dns_record_label @record_type = record_type @values = values end |
Instance Attribute Details
#label ⇒ Object (readonly)
the DNS TXT record label (full label, including domain)
12 13 14 |
# File 'lib/apartment_acme_client/dns_api/route53.rb', line 12 def label @label end |
#record_type ⇒ Object (readonly)
will be TXT
15 16 17 |
# File 'lib/apartment_acme_client/dns_api/route53.rb', line 15 def record_type @record_type end |
#requested_domain ⇒ Object (readonly)
The domain being requested for DNS update e.g. “site.example.com”
9 10 11 |
# File 'lib/apartment_acme_client/dns_api/route53.rb', line 9 def requested_domain @requested_domain end |
#values ⇒ Object (readonly)
array of value keys to be written (for wildcard certs, you’ll have one for *.example.com, and one for example.com) e.g. [“One”, “Two”]
20 21 22 |
# File 'lib/apartment_acme_client/dns_api/route53.rb', line 20 def values @values end |
Instance Method Details
#write_record ⇒ Object
NOTE: If you get error like:
“Invalid Resource Record: FATAL problem: InvalidCharacterString (Value should be enclosed in quotation marks) encountered with <value>”
this means that the “Value” should include escape quotes. e.g. values: [“"Something"”, “"Other Thing"”]
37 38 39 |
# File 'lib/apartment_acme_client/dns_api/route53.rb', line 37 def write_record route53.change_resource_record_sets() end |