Class: AWS::CloudFormation::Client

Inherits:
AWS::Core::QueryClient show all
Defined in:
lib/aws/cloud_formation/client.rb

Overview

Client class for AWS CloudFormation.

Instance Attribute Summary

Attributes inherited from AWS::Core::Client

#config

Instance Method Summary collapse

Methods inherited from AWS::Core::Client

#initialize, #log_warning, #operations, operations, #with_http_handler, #with_options

Constructor Details

This class inherits a constructor from AWS::Core::Client

Instance Method Details

#cancel_update_stack(options = {}) ⇒ Core::Response

Calls the CancelUpdateStack API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :stack_name - required - (String) The name or the unique identifier associated with the stack.

Returns:



# File 'lib/aws/cloud_formation/client.rb', line 38

#create_stack(options = {}) ⇒ Core::Response

Calls the CreateStack API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :stack_name - required - (String) The name associated with the stack. The name must be unique within your AWS account. Must contain only alphanumeric characters (case sensitive) and start with an alpha character. Maximum length of the name is 255 characters.
    • :template_body - (String) Structure containing the template body. (For more information, go to the AWS CloudFormation User Guide.) Conditional: You must pass TemplateBody or TemplateURL. If both are passed, only TemplateBody is used.
    • :template_url - (String) Location of file containing the template body. The URL must point to a template (max size: 307,200 bytes) located in an S3 bucket in the same region as the stack. For more information, go to the AWS CloudFormation User Guide. Conditional: You must pass TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.
    • :parameters - (Array) A list of Parameter structures that specify input parameters for the stack.
      • :parameter_key - (String) The key associated with the parameter.
      • :parameter_value - (String) The value associated with the parameter.
    • :disable_rollback - (Boolean) Set to true to disable rollback of the stack if stack creation failed. You can specify either DisableRollback or OnFailure, but not both. Default: false
    • :timeout_in_minutes - (Integer) The amount of time that can pass before the stack status becomes CREATE_FAILED; if DisableRollback is not set or is set to false , the stack will be rolled back.
    • :notification_arns - (Array) The Simple Notification Service (SNS) topic ARNs to publish stack related events. You can find your SNS topic ARNs using the SNS console or your Command Line Interface (CLI).
    • :capabilities - (Array) The list of capabilities that you want to allow in the stack. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter; otherwise, this action returns an InsufficientCapabilities error. IAM resources are the following: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::Policy, AWS::IAM::User, and AWS::IAM::UserToGroupAddition.
    • :on_failure - (String) Determines what action will be taken if stack creation fails. This must be one of: DO_NOTHING, ROLLBACK, or DELETE. You can specify either OnFailure or DisableRollback, but not both. Default: ROLLBACK Valid values include:
      • DO_NOTHING
      • ROLLBACK
      • DELETE
    • :tags - (Array) A set of user-defined Tags to associate with this stack, represented by key/value pairs. Tags defined for the stack are propogated to EC2 resources that are created as part of the stack. A maximum number of 10 tags can be specified.
      • :key - (String) Required. A string used to identify this tag. You can specify a maximum of 128 characters for a tag key. Tags owned by Amazon Web Services (AWS) have the reserved prefix: aws:.
      • :value - (String) Required. A string containing the value for this tag. You can specify a maximum of 256 characters for a tag value.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :stack_id - (String)


# File 'lib/aws/cloud_formation/client.rb', line 45

#delete_stack(options = {}) ⇒ Core::Response

Calls the DeleteStack API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :stack_name - required - (String) The name or the unique identifier associated with the stack.

Returns:



# File 'lib/aws/cloud_formation/client.rb', line 109

#describe_stack_events(options = {}) ⇒ Core::Response

Calls the DescribeStackEvents API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :stack_name - (String) The name or the unique identifier associated with the stack. Default: There is no default value.
    • :next_token - (String) String that identifies the start of the next list of events, if there is one. Default: There is no default value.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :stack_events - (Array)
      • :stack_id - (String)
      • :event_id - (String)
      • :stack_name - (String)
      • :logical_resource_id - (String)
      • :physical_resource_id - (String)
      • :resource_type - (String)
      • :timestamp - (Time)
      • :resource_status - (String)
      • :resource_status_reason - (String)
      • :resource_properties - (String)
    • :next_token - (String)


# File 'lib/aws/cloud_formation/client.rb', line 116

#describe_stack_resource(options = {}) ⇒ Core::Response

Calls the DescribeStackResource API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :stack_name - required - (String) The name or the unique identifier associated with the stack. Default: There is no default value.
    • :logical_resource_id - required - (String) The logical name of the resource as specified in the template. Default: There is no default value.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :stack_resource_detail - (Hash)
      • :stack_name - (String)
      • :stack_id - (String)
      • :logical_resource_id - (String)
      • :physical_resource_id - (String)
      • :resource_type - (String)
      • :last_updated_timestamp - (Time)
      • :resource_status - (String)
      • :resource_status_reason - (String)
      • :description - (String)
      • :metadata - (String)


# File 'lib/aws/cloud_formation/client.rb', line 140

#describe_stack_resources(options = {}) ⇒ Core::Response

Calls the DescribeStackResources API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :stack_name - (String) The name or the unique identifier associated with the stack. Required: Conditional. If you do not specify StackName, you must specify PhysicalResourceId. Default: There is no default value.
    • :logical_resource_id - (String) The logical name of the resource as specified in the template. Default: There is no default value.
    • :physical_resource_id - (String) The name or unique identifier that corresponds to a physical instance ID of a resource supported by AWS CloudFormation. For example, for an Amazon Elastic Compute Cloud (EC2) instance, PhysicalResourceId corresponds to the InstanceId. You can pass the EC2 InstanceId to DescribeStackResources to find which stack the instance belongs to and what other resources are part of the stack. Required: Conditional. If you do not specify PhysicalResourceId, you must specify StackName. Default: There is no default value.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :stack_resources - (Array)
      • :stack_name - (String)
      • :stack_id - (String)
      • :logical_resource_id - (String)
      • :physical_resource_id - (String)
      • :resource_type - (String)
      • :timestamp - (Time)
      • :resource_status - (String)
      • :resource_status_reason - (String)
      • :description - (String)


# File 'lib/aws/cloud_formation/client.rb', line 164

#describe_stacks(options = {}) ⇒ Core::Response

Calls the DescribeStacks API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :stack_name - (String) The name or the unique identifier associated with the stack. Default: There is no default value.
    • :next_token - (String)

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :stacks - (Array)
      • :stack_id - (String)
      • :stack_name - (String)
      • :description - (String)
      • :parameters - (Array)
      • :parameter_key - (String)
      • :parameter_value - (String)
      • :creation_time - (Time)
      • :last_updated_time - (Time)
      • :stack_status - (String)
      • :stack_status_reason - (String)
      • :disable_rollback - (Boolean)
      • :notification_arns - (Array)
      • :timeout_in_minutes - (Integer)
      • :capabilities - (Array)
      • :outputs - (Array)
      • :output_key - (String)
      • :output_value - (String)
      • :description - (String)
      • :tags - (Array)
      • :key - (String)
      • :value - (String)
    • :next_token - (String)


# File 'lib/aws/cloud_formation/client.rb', line 196

#estimate_template_cost(options = {}) ⇒ Core::Response

Calls the EstimateTemplateCost API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :template_body - (String) Structure containing the template body. (For more information, go to the AWS CloudFormation User Guide.) Conditional: You must pass TemplateBody or TemplateURL. If both are passed, only TemplateBody is used.
    • :template_url - (String) Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. For more information, go to the AWS CloudFormation User Guide. Conditional: You must pass TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.
    • :parameters - (Array) A list of Parameter structures that specify input parameters.
      • :parameter_key - (String) The key associated with the parameter.
      • :parameter_value - (String) The value associated with the parameter.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :url - (String)


# File 'lib/aws/cloud_formation/client.rb', line 229

#get_template(options = {}) ⇒ Core::Response

Calls the GetTemplate API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :stack_name - required - (String) The name or the unique identifier associated with the stack.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :template_body - (String)


# File 'lib/aws/cloud_formation/client.rb', line 252

#list_stack_resources(options = {}) ⇒ Core::Response

Calls the ListStackResources API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :stack_name - required - (String) The name or the unique identifier associated with the stack. Default: There is no default value.
    • :next_token - (String) String that identifies the start of the next list of stack resource summaries, if there is one. Default: There is no default value.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :stack_resource_summaries - (Array)
      • :logical_resource_id - (String)
      • :physical_resource_id - (String)
      • :resource_type - (String)
      • :last_updated_timestamp - (Time)
      • :resource_status - (String)
      • :resource_status_reason - (String)
    • :next_token - (String)


# File 'lib/aws/cloud_formation/client.rb', line 262

#list_stacks(options = {}) ⇒ Core::Response

Calls the ListStacks API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :next_token - (String) String that identifies the start of the next list of stacks, if there is one. Default: There is no default value.
    • :stack_status_filter - (Array) Stack status to use as a filter. Specify one or more stack status codes to list only stacks with the specified status codes. For a complete list of stack status codes, see the StackStatus parameter of the Stack data type.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :stack_summaries - (Array)
      • :stack_id - (String)
      • :stack_name - (String)
      • :template_description - (String)
      • :creation_time - (Time)
      • :last_updated_time - (Time)
      • :deletion_time - (Time)
      • :stack_status - (String)
      • :stack_status_reason - (String)
    • :next_token - (String)


# File 'lib/aws/cloud_formation/client.rb', line 283

#update_stack(options = {}) ⇒ Core::Response

Calls the UpdateStack API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :stack_name - required - (String) The name or stack ID of the stack to update. Must contain only alphanumeric characters (case sensitive) and start with an alpha character. Maximum length of the name is 255 characters.
    • :template_body - (String) Structure containing the template body. (For more information, go to the AWS CloudFormation User Guide.) Conditional: You must pass TemplateBody or TemplateURL. If both are passed, only TemplateBody is used.
    • :template_url - (String) Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. For more information, go to the AWS CloudFormation User Guide. Conditional: You must pass TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.
    • :parameters - (Array) A list of Parameter structures that specify input parameters for the stack.
      • :parameter_key - (String) The key associated with the parameter.
      • :parameter_value - (String) The value associated with the parameter.
    • :capabilities - (Array) The list of capabilities that you want to allow in the stack. If your stack contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter; otherwise, this action returns an InsufficientCapabilities error. IAM resources are the following: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::Policy, AWS::IAM::User, and AWS::IAM::UserToGroupAddition.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :stack_id - (String)


# File 'lib/aws/cloud_formation/client.rb', line 307

#validate_template(options = {}) ⇒ Core::Response

Calls the ValidateTemplate API operation.

Parameters:

  • options (Hash) (defaults to: {})
    • :template_body - (String) String containing the template body. (For more information, go to the AWS CloudFormation User Guide.) Conditional: You must pass TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.
    • :template_url - (String) Location of file containing the template body. The URL must point to a template (max size: 307,200 bytes) located in an S3 bucket in the same region as the stack. For more information, go to the AWS CloudFormation User Guide. Conditional: You must pass TemplateURL or TemplateBody. If both are passed, only TemplateBody is used.

Returns:

  • (Core::Response)

    The #data method of the response object returns a hash with the following structure:

    • :parameters - (Array)
      • :parameter_key - (String)
      • :default_value - (String)
      • :no_echo - (Boolean)
      • :description - (String)
    • :description - (String)
    • :capabilities - (Array)
    • :capabilities_reason - (String)


# File 'lib/aws/cloud_formation/client.rb', line 341