Class: Chef::Provider::AwsSqsQueue
Constant Summary
Chef::Provisioning::AWSDriver::AWSProvider::AWSResource
Instance Attribute Summary
#purging
Instance Method Summary
collapse
#action_handler, #converge_by, #region, #whyrun_supported?
Instance Method Details
#create_aws_object ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/chef/provider/aws_sqs_queue.rb', line 6
def create_aws_object
options = AWSResource.lookup_options(new_resource.options || {}, resource: new_resource)
option_sqs = {}
option_sqs[:queue_name] = new_resource.name if new_resource.name
option_sqs[:attributes] = options
converge_by "create SQS queue #{new_resource.name} in #{region}" do
retry_with_backoff(::Aws::SQS::Errors::QueueDeletedRecently) do
new_resource.driver.sqs.create_queue(option_sqs)
end
end
end
|
#destroy_aws_object(queue) ⇒ Object
20
21
22
23
24
|
# File 'lib/chef/provider/aws_sqs_queue.rb', line 20
def destroy_aws_object(queue)
converge_by "delete SQS queue #{new_resource.name} in #{region}" do
new_resource.driver.sqs.delete_queue(queue_url: queue.queue_url)
end
end
|
#update_aws_object(queue) ⇒ Object
18
|
# File 'lib/chef/provider/aws_sqs_queue.rb', line 18
def update_aws_object(queue); end
|