Class: Route53ARecord::Handler
- Inherits:
-
Object
- Object
- Route53ARecord::Handler
- Defined in:
- lib/route53_a_record/handler.rb
Instance Attribute Summary collapse
-
#overwrite ⇒ Object
Returns the value of attribute overwrite.
Instance Method Summary collapse
- #create(resource_a_record) ⇒ Object
- #delete(resource_a_record) ⇒ Object
-
#initialize(access_key_id, secret_access_key, overwrite = true) ⇒ Handler
constructor
A new instance of Handler.
Constructor Details
#initialize(access_key_id, secret_access_key, overwrite = true) ⇒ Handler
Returns a new instance of Handler.
7 8 9 10 11 |
# File 'lib/route53_a_record/handler.rb', line 7 def initialize(access_key_id, secret_access_key, overwrite = true) @access_key_id = access_key_id @secret_access_key = secret_access_key @overwrite = overwrite end |
Instance Attribute Details
#overwrite ⇒ Object
Returns the value of attribute overwrite.
5 6 7 |
# File 'lib/route53_a_record/handler.rb', line 5 def overwrite @overwrite end |
Instance Method Details
#create(resource_a_record) ⇒ Object
13 14 15 16 |
# File 'lib/route53_a_record/handler.rb', line 13 def create(resource_a_record) action = action_based_on_overwrite aws_client.change_resource_record_sets(a_record_change_hash(action, resource_a_record)) end |
#delete(resource_a_record) ⇒ Object
18 19 20 |
# File 'lib/route53_a_record/handler.rb', line 18 def delete(resource_a_record) aws_client.change_resource_record_sets(a_record_change_hash("DELETE", resource_a_record)) end |