Module: CfnCli::CfnClient
- Included in:
- CloudFormation, Stack
- Defined in:
- lib/cfncli/cfn_client.rb
Instance Attribute Summary collapse
-
#retry_backoff ⇒ Object
Returns the value of attribute retry_backoff.
-
#retry_limit ⇒ Object
Returns the value of attribute retry_limit.
-
#stub_responses ⇒ Object
Returns the value of attribute stub_responses.
Instance Method Summary collapse
-
#cfn ⇒ Object
Clouformation Resource This is used to interact with the CloudFormation API the stubbed responses in the unit tests.
-
#cfn_client ⇒ Object
CloudFormation client.
Instance Attribute Details
#retry_backoff ⇒ Object
Returns the value of attribute retry_backoff.
8 9 10 |
# File 'lib/cfncli/cfn_client.rb', line 8 def retry_backoff @retry_backoff end |
#retry_limit ⇒ Object
Returns the value of attribute retry_limit.
7 8 9 |
# File 'lib/cfncli/cfn_client.rb', line 7 def retry_limit @retry_limit end |
#stub_responses ⇒ Object
Returns the value of attribute stub_responses.
6 7 8 |
# File 'lib/cfncli/cfn_client.rb', line 6 def stub_responses @stub_responses end |
Instance Method Details
#cfn ⇒ Object
Note:
this uses a class variable for the client and the resource so they can share
Clouformation Resource This is used to interact with the CloudFormation API the stubbed responses in the unit tests.
25 26 27 28 |
# File 'lib/cfncli/cfn_client.rb', line 25 def cfn @@resource ||= Aws::CloudFormation::Resource.new(client: cfn_client) @@resource end |
#cfn_client ⇒ Object
CloudFormation client
12 13 14 15 16 17 18 |
# File 'lib/cfncli/cfn_client.rb', line 12 def cfn_client ||= {} [:retry_limit] = @retry_limit if @retry_limit [:retry_backoff] = @retry_backoff if @retry_backoff [:stub_responses] = @stub_responses || false @@client ||= Aws::CloudFormation::Client.new(**) end |