Class: AwsUtils::Route53AddResourceRecord

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

Instance Method Summary collapse

Constructor Details

#initializeRoute53AddResourceRecord

Returns a new instance of Route53AddResourceRecord.



20
21
22
# File 'lib/awsutils/r53addrr.rb', line 20

def initialize
  @opts = parse_opts
end

Instance Method Details

#connectionObject



7
8
9
# File 'lib/awsutils/r53addrr.rb', line 7

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

#parse_optsObject



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

def parse_opts
  Optimist.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
end