Class: AwsUtils::Route53AddResourceRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/awsutils/r53addrr.rb

Instance Method Summary collapse

Constructor Details

#initializeRoute53AddResourceRecord

def parse_opts



22
23
24
# File 'lib/awsutils/r53addrr.rb', line 22

def initialize
  @opts = parse_opts
end

Instance Method Details

#connectionObject



9
10
11
# File 'lib/awsutils/r53addrr.rb', line 9

def connection
  @connection ||= Fog::DNS::AWS.new
end

#parse_optsObject

def connection



13
14
15
16
17
18
19
20
# File 'lib/awsutils/r53addrr.rb', line 13

def parse_opts
  opts = Trollop::options do
    opt :name, "The name", :short => 'n', :type => String, :required => true
    opt :type, "Record type (e.g. CNAME or A)", :short => 'T', :type => String, :required => true
    opt :ttl, "Time-to-live", :short => 't', :type => String, :default => "300"
    opt :value, "Record Value", :short => 'v', :type => String, :required => true
  end # opts = Trollop::options
end