class Path53::ChangeSet
Constants
- ChangeRequest
- HostedZone
Attributes
zone[R]
Public Class Methods
new(zone, changes = Set.new)
click to toggle source
# File lib/path53/change_set.rb, line 25 def initialize(zone, changes = Set.new) @zone = zone @changes = changes self end
Public Instance Methods
add(change)
click to toggle source
# File lib/path53/change_set.rb, line 32 def add(change) @changes.add change self end
apply!()
click to toggle source
# File lib/path53/change_set.rb, line 65 def apply! route53.change_resource_record_sets(self.to_request).change_info.id end
batch(&block)
click to toggle source
# File lib/path53/change_set.rb, line 58 def batch(&block) self.tap do |this| this.instance_eval(&block) end end
remove(change)
click to toggle source
# File lib/path53/change_set.rb, line 44 def remove(change) @changes.delete change self end
Also aliased as: rem
reset!()
click to toggle source
# File lib/path53/change_set.rb, line 52 def reset! @changes = Set.new self end
to_request(comment: nil)
click to toggle source
# File lib/path53/change_set.rb, line 70 def to_request(comment: nil) { hosted_zone_id: zone.id, change_batch: { changes: changes(@changes.to_a) }.tap { |batch| batch.merge! comment: comment if comment } } end
Private Instance Methods
route53()
click to toggle source
# File lib/path53/change_set.rb, line 81 def route53 @route53 ||= Aws::Route53::Client.new end