Class: RenderCFN::SQS
Instance Method Summary collapse
- #dependsOn(name) ⇒ Object
-
#initialize(arguments) ⇒ SQS
constructor
A new instance of SQS.
- #redrivePolicy(queueTarget, maxRecvCount) ⇒ Object
Methods inherited from AwsObject
Constructor Details
#initialize(arguments) ⇒ SQS
Returns a new instance of SQS.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/renderCFN/sqs.rb', line 5 def initialize( arguments) @name = "#{arguments[:name]}" @title = "#{arguments[:title]}" @awsObject = { @title => { 'Type' => 'AWS::SQS::Queue', 'Properties' => { 'QueueName' => arguments[:name], 'DelaySeconds' => arguments[:delaySeconds], 'MaximumMessageSize' => arguments[:maximumMessageSize], 'MessageRetentionPeriod' => arguments[:messageRetentionPeriod], 'ReceiveMessageWaitTimeSeconds' => arguments[:receiveMessageWaitTimeSeconds], 'VisibilityTimeout' => arguments[:visibilityTimeout] }, 'DependsOn' => [] } } end |
Instance Method Details
#dependsOn(name) ⇒ Object
31 32 33 |
# File 'lib/renderCFN/sqs.rb', line 31 def dependsOn(name) @awsObject[@title]['DependsOn'].push(name) end |
#redrivePolicy(queueTarget, maxRecvCount) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/renderCFN/sqs.rb', line 24 def redrivePolicy( queueTarget, maxRecvCount) @awsObject[@title]['Properties']['RedrivePolicy'] = { 'deadLetterTargetArn' => queueTarget, 'maxReceiveCount' => maxRecvCount } end |