Class Fog::AWS::CloudFormation::Real
In: lib/fog/aws/cloud_formation.rb
lib/fog/aws/requests/cloud_formation/create_stack.rb
lib/fog/aws/requests/cloud_formation/delete_stack.rb
lib/fog/aws/requests/cloud_formation/describe_stack_events.rb
lib/fog/aws/requests/cloud_formation/describe_stack_resources.rb
lib/fog/aws/requests/cloud_formation/describe_stacks.rb
lib/fog/aws/requests/cloud_formation/get_template.rb
lib/fog/aws/requests/cloud_formation/update_stack.rb
lib/fog/aws/requests/cloud_formation/validate_template.rb
Parent: Object

Methods

Included Modules

Fog::AWS::CredentialFetcher::ConnectionMethods

Public Class methods

Initialize connection to CloudFormation

Notes

options parameter must include values for :aws_access_key_id and :aws_secret_access_key in order to create a connection

Examples

  cf = CloudFormation.new(
   :aws_access_key_id => your_aws_access_key_id,
   :aws_secret_access_key => your_aws_secret_access_key
  )

Parameters

  • options<~Hash> - config arguments for connection. Defaults to {}.

Returns

Public Instance methods

Create a stack

Parameters

  • stack_name<~String>: name of the stack to create
  • options<~Hash>:
    • TemplateBody<~String>: structure containing the template body

    or (one of the two Template parameters is required)

    • TemplateURL<~String>: URL of file containing the template body
    • DisableRollback<~Boolean>: Controls rollback on stack creation failure, defaults to false
    • NotificationARNs<~Array>: List of SNS topics to publish events to
    • Parameters<~Hash>: Hash of providers to supply to template
    • TimeoutInMinutes<~Integer>: Minutes to wait before status is set to CREATE_FAILED
    • Capabilities<~Array>: List of capabilties the stack is granted. Currently CAPABILITY_IAM for allowing the creation of IAM resources

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_CreateStack.html

Delete a stack

Parameters

  • stack_name<~String>: name of the stack to create

Returns

  • response<~Excon::Response>:

See Also

docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_DeleteStack.html

Describe stack events

Parameters

  • stack_name<~String>: stack name to return events for
  • options<~Hash>:
    • NextToken<~String>: identifies the start of the next list of events, if there is one

Returns

  • response<~Excon::Response>:
    • body<~Hash>:
      • ‘StackEvents’<~Array> - Matching resources
        • event<~Hash>:
          • ‘EventId’<~String> -
          • ‘StackId’<~String> -
          • ‘StackName’<~String> -
          • ‘LogicalResourceId’<~String> -
          • ‘PhysicalResourceId’<~String> -
          • ‘ResourceType’<~String> -
          • ‘Timestamp’<~Time> -
          • ‘ResourceStatus’<~String> -
          • ‘ResourceStatusReason’<~String> -

See Also

docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_DescribeStackEvents.html

Describe stack resources

Parameters

  • options<~Hash>:
    • ‘PhysicalResourceId’<~String>: name or unique identifier that corresponds to a physical instance ID

    or (one of PhysicalResourceId and StackName is required)

    • ‘StackName’<~String>: only return events related to this stack name
    • ‘LogicalResourceId’<~String>: logical name of the resource as specified in the template

Returns

  • response<~Excon::Response>:
    • body<~Hash>:
      • ‘StackResources’<~Array> - Matching resources
        • resource<~Hash>:
          • ‘StackId’<~String> -
          • ‘StackName’<~String> -
          • ‘LogicalResourceId’<~String> -
          • ‘PhysicalResourceId’<~String> -
          • ‘ResourceType’<~String> -
          • ‘Timestamp’<~Time> -
          • ‘ResourceStatus’<~String> -

See Also

docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_DescribeStackResources.html

Describe stacks

Parameters

  • options<~Hash>:
    • ‘StackName’<~String>: name of the stack to describe

Returns

  • response<~Excon::Response>:
    • body<~Hash>:
      • ‘Stacks’<~Array> - Matching stacks
        • stack<~Hash>:
          • ‘StackName’<~String> -
          • ‘StackId’<~String> -
          • ‘CreationTime’<~String> -
          • ‘StackStatus’<~String> -
          • ‘DisableRollback’<~String> -
          • ‘Outputs’<~Array> -

See Also

docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_DescribeStacks.html

Describe stacks

Parameters

  • stack_name<~String> - stack name to get template from

Returns

  • response<~Excon::Response>:
    • body<~Hash>:
      • ‘TemplateBody’<~String> - structure containing the template body (json)

See Also

docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_GetTemplate.html

Update a stack

Parameters

  • stack_name<~String>: name of the stack to update
  • options<~Hash>:
    • TemplateBody<~String>: structure containing the template body

    or (one of the two Template parameters is required)

    • TemplateURL<~String>: URL of file containing the template body
    • Parameters<~Hash>: Hash of providers to supply to template
    • Capabilities<~Array>: List of capabilties the stack is granted. Currently CAPABILITY_IAM for allowing the creation of IAM resources

Returns

  • response<~Excon::Response>:
    • body<~Hash>:
      • ‘StackId’<~String> - Id of the stack being updated

See Also

docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_UpdateStack.html

Describe stacks

Parameters

  • options<~Hash>:
    • ‘TemplateBody’<~String> - template structure
    • ‘TemplateURL’<~String> - template url

Returns

  • response<~Excon::Response>:
    • body<~Hash>:
      • ‘Description’<~String> - description found within the template
      • ‘Parameters’<~String> - list of template parameter structures

See Also

docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_ValidateTemplate.html

[Validate]