Class: Chef::Resource::AwsRoute53HostedZone
- Inherits:
-
Provisioning::AWSDriver::AWSResourceWithEntry
- Object
- LWRPBase
- Provisioning::AWSDriver::SuperLWRP
- Provisioning::AWSDriver::AWSResource
- Provisioning::AWSDriver::AWSResourceWithEntry
- Chef::Resource::AwsRoute53HostedZone
- Defined in:
- lib/chef/resource/aws_route53_hosted_zone.rb
Constant Summary collapse
- DEFAULTABLE_ATTRS =
[:ttl, :type]
Constants inherited from Provisioning::AWSDriver::AWSResource
Provisioning::AWSDriver::AWSResource::NOT_PASSED
Instance Method Summary collapse
- #aws_object ⇒ Object
-
#get_record_sets_from_aws(hosted_zone_id, opts = {}) ⇒ Object
since this is used exactly once, it could plausibly be inlined in #aws_object.
- #record_sets(&block) ⇒ Object
Methods inherited from Provisioning::AWSDriver::AWSResourceWithEntry
#delete_managed_entry, #get_id_from_managed_entry, #save_managed_entry, #to_s
Methods inherited from Provisioning::AWSDriver::AWSResource
#action, #action=, #aws_object_id, get_aws_object, get_aws_object_id, #initialize, lookup_options
Methods inherited from Provisioning::AWSDriver::SuperLWRP
Constructor Details
This class inherits a constructor from Chef::Provisioning::AWSDriver::AWSResource
Instance Method Details
#aws_object ⇒ Object
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/chef/resource/aws_route53_hosted_zone.rb', line 59 def aws_object driver, id = get_driver_and_id result = driver.route53_client.get_hosted_zone(id: id).hosted_zone if id rescue nil if result result.resource_record_sets = get_record_sets_from_aws(result.id).resource_record_sets result else nil end end |
#get_record_sets_from_aws(hosted_zone_id, opts = {}) ⇒ Object
since this is used exactly once, it could plausibly be inlined in #aws_object.
71 72 73 74 |
# File 'lib/chef/resource/aws_route53_hosted_zone.rb', line 71 def get_record_sets_from_aws(hosted_zone_id, opts={}) params = { hosted_zone_id: hosted_zone_id }.merge(opts) driver.route53_client.list_resource_record_sets(params) end |
#record_sets(&block) ⇒ Object
51 52 53 54 55 56 57 |
# File 'lib/chef/resource/aws_route53_hosted_zone.rb', line 51 def record_sets(&block) if block_given? @record_sets_block = block else @record_sets_block end end |