class ZAWS::Services::Route53::HostedZone
Public Class Methods
new(shellout, aws)
click to toggle source
# File lib/zaws/services/route53/hosted_zone.rb, line 10 def initialize(shellout, aws) @shellout=shellout @aws=aws end
Public Instance Methods
view(viewtype, textout=nil, verbose=nil)
click to toggle source
# File lib/zaws/services/route53/hosted_zone.rb, line 15 def view(viewtype, textout=nil, verbose=nil) comline="aws --output #{viewtype} route53 list-hosted-zones" zones=@shellout.cli(comline, verbose) textout.puts(zones) if textout return zones end
view_records(viewtype, textout=nil, verbose=nil, zonename)
click to toggle source
# File lib/zaws/services/route53/hosted_zone.rb, line 22 def view_records(viewtype, textout=nil, verbose=nil, zonename) zones=JSON.parse(view('json', nil, verbose)) zone_id=nil zones["HostedZones"].each { |x| zone_id = ("#{x["Name"]}"=="#{zonename}") ? x["Id"] : nil } if zone_id comline="aws --output #{viewtype} route53 list-resource-record-sets --hosted-zone-id #{zone_id}" records=@shellout.cli(comline, verbose) textout.puts(records) if textout return records end end