Class: AWS::Route53::ResourceRecordSetCollection
- Inherits:
-
Object
- Object
- AWS::Route53::ResourceRecordSetCollection
- Includes:
- Core::Collection::WithLimitAndNextToken
- Defined in:
- lib/aws/route_53/resource_record_set_collection.rb
Overview
Create new resource record set
rrsets = AWS::Route53::HostedZone.new(hosted_zone_id).rrsets
rrset = rrsets.create('foo.example.com.', 'A', :ttl => 300, :resource_records => [{:value => '127.0.0.1'}])
Find existing resource record set
rrsets = AWS::Route53::HostedZone.new(hosted_zone_id).rrsets
rrset = rrsets['foo.example.com.', 'A']
Instance Attribute Summary collapse
- #hosted_zone_id ⇒ String readonly
Instance Method Summary collapse
-
#[](name, type, set_identifier = nil) ⇒ ResourceRecordSet
Find resource record set by its name, type and identifier.
-
#create(name, type, options = {}) ⇒ ResourceRecordSet
Create new resource record set.
Methods included from Core::Collection
#each, #each_batch, #enum, #first, #in_groups_of, #page
Instance Attribute Details
#hosted_zone_id ⇒ String (readonly)
41 42 43 |
# File 'lib/aws/route_53/resource_record_set_collection.rb', line 41 def hosted_zone_id @hosted_zone_id end |
Instance Method Details
#[](name, type, set_identifier = nil) ⇒ ResourceRecordSet
Find resource record set by its name, type and identifier.
48 49 50 |
# File 'lib/aws/route_53/resource_record_set_collection.rb', line 48 def [] name, type, set_identifier = nil ResourceRecordSet.new(name, type, :set_identifier => set_identifier, :hosted_zone_id => hosted_zone_id, :config => config) end |
#create(name, type, options = {}) ⇒ ResourceRecordSet
Create new resource record set.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/aws/route_53/resource_record_set_collection.rb', line 57 def create name, type, = {} batch = ChangeBatch.new(hosted_zone_id, :comment => [:comment], :config => config) batch << CreateRequest.new(name, type, ) change_info = batch.call() if change_info ResourceRecordSet.new(name, type, :set_identifier => [:set_identifier], :change_info => change_info, :hosted_zone_id => hosted_zone_id, :config => config) end end |