Class: ShyoboiDdns::Providers::Route53

Inherits:
Object
  • Object
show all
Defined in:
lib/shyoboi-ddns/providers/route53.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hosted_zone_id) ⇒ Route53

Returns a new instance of Route53.



14
15
16
# File 'lib/shyoboi-ddns/providers/route53.rb', line 14

def initialize(hosted_zone_id)
  @hosted_zone_id = hosted_zone_id
end

Instance Attribute Details

#access_key_idObject

Returns the value of attribute access_key_id.



4
5
6
# File 'lib/shyoboi-ddns/providers/route53.rb', line 4

def access_key_id
  @access_key_id
end

#secret_access_keyObject

Returns the value of attribute secret_access_key.



4
5
6
# File 'lib/shyoboi-ddns/providers/route53.rb', line 4

def secret_access_key
  @secret_access_key
end

Instance Method Details

#update(domain, ip) ⇒ Object



18
19
20
21
22
23
# File 'lib/shyoboi-ddns/providers/route53.rb', line 18

def update(domain, ip)
  r53.client.change_resource_record_sets(
    hosted_zone_id: @hosted_zone_id,
    change_batch: {changes: [change(domain, ip)]}
  )
end