class Roadworker::Route53Wrapper::HostedzoneWrapper
Attributes
Public Class Methods
Source
# File lib/roadworker/route53-wrapper.rb, line 80 def initialize(hosted_zone, vpcs, options) @hosted_zone = hosted_zone @vpcs = vpcs @options = options end
Public Instance Methods
Source
# File lib/roadworker/route53-wrapper.rb, line 118 def associate_vpc(vpc) log(:info, "Associate #{vpc.inspect}", :green, @hosted_zone.name) unless @options.dry_run @options.route53.associate_vpc_with_hosted_zone( hosted_zone_id: @hosted_zone.id, vpc: vpc, ) end end
Source
# File lib/roadworker/route53-wrapper.rb, line 98 def delete if @options.force log(:info, 'Delete Hostedzone', :red, @hosted_zone.name) change_batch = Batch.new(self, health_checks: @options.health_checks, logger: @options.logger, dry_run: @options.dry_run) self.rrsets.each do |record| change_batch.delete(record) end change_batch.request!(@options.route53) unless @options.dry_run @options.route53.delete_hosted_zone(id: @hosted_zone.id) @options.updated = true end else log(:info, 'Undefined Hostedzone (pass `--force` if you want to remove)', :yellow, @hosted_zone.name) end end
Source
# File lib/roadworker/route53-wrapper.rb, line 128 def disassociate_vpc(vpc) log(:info, "Disassociate #{vpc.inspect}", :red, @hosted_zone.name) unless @options.dry_run @options.route53.disassociate_vpc_from_hosted_zone( hosted_zone_id: @hosted_zone.id, vpc: vpc, ) end end
Source
# File lib/roadworker/route53-wrapper.rb, line 94 def find_resource_record_set(name, type, set_identifier) resource_record_sets.to_h[[name, type, set_identifier]] end
@return [Roadworker::Route53Wrapper::ResourceRecordSetWrapper]
Source
# File lib/roadworker/route53-wrapper.rb, line 88 def resource_record_sets @resource_record_sets ||= ResourceRecordSetCollectionWrapper.new(@hosted_zone, @options) end
Also aliased as: rrsets
Private Instance Methods
Source
# File lib/roadworker/route53-wrapper.rb, line 140 def method_missing(method_name, *args) @hosted_zone.send(method_name, *args) end