AWS SDK Version 2 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

.NET Framework 3.5
 
Implementation for accessing CloudFormation AWS CloudFormation

AWS CloudFormation enables you to create and manage AWS infrastructure deployments predictably and repeatedly. AWS CloudFormation helps you leverage AWS products such as Amazon EC2, EBS, Amazon SNS, ELB, and Auto Scaling to build highly-reliable, highly scalable, cost effective applications without worrying about creating and configuring the underlying AWS infrastructure.

With AWS CloudFormation, you declare all of your resources and dependencies in a template file. The template defines a collection of resources as a single unit called a stack. AWS CloudFormation creates and deletes all member resources of the stack together and manages all dependencies between the resources for you.

For more information about this product, go to the CloudFormation Product Page.

Amazon CloudFormation makes use of other AWS products. If you need additional technical information about a specific AWS product, you can find the product's technical documentation at http://docs.aws.amazon.com/documentation/.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonServiceClient
    Amazon.CloudFormation.AmazonCloudFormationClient

Namespace: Amazon.CloudFormation
Assembly: AWSSDK.dll
Version: (assembly version)

Syntax

C#
public class AmazonCloudFormationClient : AmazonServiceClient
         IAmazonCloudFormation, IDisposable

The AmazonCloudFormationClient type exposes the following members

Constructors

NameDescription
Public Method AmazonCloudFormationClient() Constructs AmazonCloudFormationClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
             
Public Method AmazonCloudFormationClient(RegionEndpoint) Constructs AmazonCloudFormationClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
             
Public Method AmazonCloudFormationClient(AmazonCloudFormationConfig) Constructs AmazonCloudFormationClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
             
Public Method AmazonCloudFormationClient(AWSCredentials) Constructs AmazonCloudFormationClient with AWS Credentials
Public Method AmazonCloudFormationClient(AWSCredentials, RegionEndpoint) Constructs AmazonCloudFormationClient with AWS Credentials
Public Method AmazonCloudFormationClient(AWSCredentials, AmazonCloudFormationConfig) Constructs AmazonCloudFormationClient with AWS Credentials and an AmazonCloudFormationClient Configuration object.
Public Method AmazonCloudFormationClient(string, string) Constructs AmazonCloudFormationClient with AWS Access Key ID and AWS Secret Key
Public Method AmazonCloudFormationClient(string, string, RegionEndpoint) Constructs AmazonCloudFormationClient with AWS Access Key ID and AWS Secret Key
Public Method AmazonCloudFormationClient(string, string, AmazonCloudFormationConfig) Constructs AmazonCloudFormationClient with AWS Access Key ID, AWS Secret Key and an AmazonCloudFormationClient Configuration object.
Public Method AmazonCloudFormationClient(string, string, string) Constructs AmazonCloudFormationClient with AWS Access Key ID and AWS Secret Key
Public Method AmazonCloudFormationClient(string, string, string, RegionEndpoint) Constructs AmazonCloudFormationClient with AWS Access Key ID and AWS Secret Key
Public Method AmazonCloudFormationClient(string, string, string, AmazonCloudFormationConfig) Constructs AmazonCloudFormationClient with AWS Access Key ID, AWS Secret Key and an AmazonCloudFormationClient Configuration object.

Methods

NameDescription
Public Method BeginCancelUpdateStack(CancelUpdateStackRequest, AsyncCallback, object) Initiates the asynchronous execution of the CancelUpdateStack operation.
Public Method BeginContinueUpdateRollback(ContinueUpdateRollbackRequest, AsyncCallback, object) Initiates the asynchronous execution of the ContinueUpdateRollback operation.
Public Method BeginCreateStack(CreateStackRequest, AsyncCallback, object) Initiates the asynchronous execution of the CreateStack operation.
Public Method BeginDeleteStack(DeleteStackRequest, AsyncCallback, object) Initiates the asynchronous execution of the DeleteStack operation.
Public Method BeginDescribeAccountLimits(DescribeAccountLimitsRequest, AsyncCallback, object) Initiates the asynchronous execution of the DescribeAccountLimits operation.
Public Method BeginDescribeStackEvents(DescribeStackEventsRequest, AsyncCallback, object) Initiates the asynchronous execution of the DescribeStackEvents operation.
Public Method BeginDescribeStackResource(DescribeStackResourceRequest, AsyncCallback, object) Initiates the asynchronous execution of the DescribeStackResource operation.
Public Method BeginDescribeStackResources(DescribeStackResourcesRequest, AsyncCallback, object) Initiates the asynchronous execution of the DescribeStackResources operation.
Public Method BeginDescribeStacks(DescribeStacksRequest, AsyncCallback, object) Initiates the asynchronous execution of the DescribeStacks operation.
Public Method BeginEstimateTemplateCost(EstimateTemplateCostRequest, AsyncCallback, object) Initiates the asynchronous execution of the EstimateTemplateCost operation.
Public Method BeginGetStackPolicy(GetStackPolicyRequest, AsyncCallback, object) Initiates the asynchronous execution of the GetStackPolicy operation.
Public Method BeginGetTemplate(GetTemplateRequest, AsyncCallback, object) Initiates the asynchronous execution of the GetTemplate operation.
Public Method BeginGetTemplateSummary(GetTemplateSummaryRequest, AsyncCallback, object) Initiates the asynchronous execution of the GetTemplateSummary operation.
Public Method BeginListStackResources(ListStackResourcesRequest, AsyncCallback, object) Initiates the asynchronous execution of the ListStackResources operation.
Public Method BeginListStacks(ListStacksRequest, AsyncCallback, object) Initiates the asynchronous execution of the ListStacks operation.
Public Method BeginSetStackPolicy(SetStackPolicyRequest, AsyncCallback, object) Initiates the asynchronous execution of the SetStackPolicy operation.
Public Method BeginSignalResource(SignalResourceRequest, AsyncCallback, object) Initiates the asynchronous execution of the SignalResource operation.
Public Method BeginUpdateStack(UpdateStackRequest, AsyncCallback, object) Initiates the asynchronous execution of the UpdateStack operation.
Public Method BeginValidateTemplate(ValidateTemplateRequest, AsyncCallback, object) Initiates the asynchronous execution of the ValidateTemplate operation.
Public Method CancelUpdateStack(CancelUpdateStackRequest) Cancels an update on the specified stack. If the call completes successfully, the stack rolls back the update and reverts to the previous stack configuration. You can cancel only stacks that are in the UPDATE_IN_PROGRESS state.
Public Method ContinueUpdateRollback(ContinueUpdateRollbackRequest) For a specified stack that is in the UPDATE_ROLLBACK_FAILED state, continues rolling it back to the UPDATE_ROLLBACK_COMPLETE state. Depending on the cause of the failure, you can manually fix the error and continue the rollback. By continuing the rollback, you can return your stack to a working state (the UPDATE_ROLLBACK_COMPLETE state), and then try to update the stack again.

A stack goes into the UPDATE_ROLLBACK_FAILED state when AWS CloudFormation cannot roll back all changes after a failed stack update. For example, you might have a stack that is rolling back to an old database instance that was deleted outside of AWS CloudFormation. Because AWS CloudFormation doesn't know the database was deleted, it assumes that the database instance still exists and attempts to roll back to it, causing the update rollback to fail.

Public Method CreateStack(CreateStackRequest) Creates a stack as specified in the template. After the call completes successfully, the stack creation starts. You can check the status of the stack via the DescribeStacks API.
Public Method DeleteStack(DeleteStackRequest) Deletes a specified stack. Once the call completes successfully, stack deletion starts. Deleted stacks do not show up in the DescribeStacks API if the deletion has been completed successfully.
Public Method DescribeAccountLimits(DescribeAccountLimitsRequest) Retrieves your account's AWS CloudFormation limits, such as the maximum number of stacks that you can create in your account.
Public Method DescribeStackEvents(DescribeStackEventsRequest) Returns all stack related events for a specified stack. For more information about a stack's event history, go to Stacks in the AWS CloudFormation User Guide. You can list events for stacks that have failed to create or have been deleted by specifying the unique stack identifier (stack ID).
Public Method DescribeStackResource(DescribeStackResourceRequest) Returns a description of the specified resource in the specified stack.

For deleted stacks, DescribeStackResource returns resource information for up to 90 days after the stack has been deleted.

Public Method DescribeStackResources(DescribeStackResourcesRequest) Returns AWS resource descriptions for running and deleted stacks. If StackName is specified, all the associated resources that are part of the stack are returned. If PhysicalResourceId is specified, the associated resources of the stack that the resource belongs to are returned. Only the first 100 resources will be returned. If your stack has more resources than this, you should use ListStackResources instead.

For deleted stacks, DescribeStackResources returns resource information for up to 90 days after the stack has been deleted.

You must specify either StackName or PhysicalResourceId, but not both. In addition, you can specify LogicalResourceId to filter the returned result. For more information about resources, the LogicalResourceId and PhysicalResourceId, go to the AWS CloudFormation User Guide.

A ValidationError is returned if you specify both StackName and PhysicalResourceId in the same request.
Public Method DescribeStacks() Returns the description for the specified stack; if no stack name was specified, then it returns the description for all the stacks created.
Public Method DescribeStacks(DescribeStacksRequest) Returns the description for the specified stack; if no stack name was specified, then it returns the description for all the stacks created.
Public Method Dispose() Inherited from Amazon.Runtime.AmazonServiceClient.
Public Method EndCancelUpdateStack(IAsyncResult) Finishes the asynchronous execution of the CancelUpdateStack operation.
Public Method EndContinueUpdateRollback(IAsyncResult) Finishes the asynchronous execution of the ContinueUpdateRollback operation.
Public Method EndCreateStack(IAsyncResult) Finishes the asynchronous execution of the CreateStack operation.
Public Method EndDeleteStack(IAsyncResult) Finishes the asynchronous execution of the DeleteStack operation.
Public Method EndDescribeAccountLimits(IAsyncResult) Finishes the asynchronous execution of the DescribeAccountLimits operation.
Public Method EndDescribeStackEvents(IAsyncResult) Finishes the asynchronous execution of the DescribeStackEvents operation.
Public Method EndDescribeStackResource(IAsyncResult) Finishes the asynchronous execution of the DescribeStackResource operation.
Public Method EndDescribeStackResources(IAsyncResult) Finishes the asynchronous execution of the DescribeStackResources operation.
Public Method EndDescribeStacks(IAsyncResult) Finishes the asynchronous execution of the DescribeStacks operation.
Public Method EndEstimateTemplateCost(IAsyncResult) Finishes the asynchronous execution of the EstimateTemplateCost operation.
Public Method EndGetStackPolicy(IAsyncResult) Finishes the asynchronous execution of the GetStackPolicy operation.
Public Method EndGetTemplate(IAsyncResult) Finishes the asynchronous execution of the GetTemplate operation.
Public Method EndGetTemplateSummary(IAsyncResult) Finishes the asynchronous execution of the GetTemplateSummary operation.
Public Method EndListStackResources(IAsyncResult) Finishes the asynchronous execution of the ListStackResources operation.
Public Method EndListStacks(IAsyncResult) Finishes the asynchronous execution of the ListStacks operation.
Public Method EndSetStackPolicy(IAsyncResult) Finishes the asynchronous execution of the SetStackPolicy operation.
Public Method EndSignalResource(IAsyncResult) Finishes the asynchronous execution of the SignalResource operation.
Public Method EndUpdateStack(IAsyncResult) Finishes the asynchronous execution of the UpdateStack operation.
Public Method EndValidateTemplate(IAsyncResult) Finishes the asynchronous execution of the ValidateTemplate operation.
Public Method EstimateTemplateCost(EstimateTemplateCostRequest) Returns the estimated monthly cost of a template. The return value is an AWS Simple Monthly Calculator URL with a query string that describes the resources required to run the template.
Public Method GetStackPolicy(GetStackPolicyRequest) Returns the stack policy for a specified stack. If a stack doesn't have a policy, a null value is returned.
Public Method GetTemplate(GetTemplateRequest) Returns the template body for a specified stack. You can get the template for running or deleted stacks.

For deleted stacks, GetTemplate returns the template for up to 90 days after the stack has been deleted.

If the template does not exist, a ValidationError is returned.
Public Method GetTemplateSummary(GetTemplateSummaryRequest) Returns information about a new or existing template. The GetTemplateSummary action is useful for viewing parameter information, such as default parameter values and parameter types, before you create or update a stack.

You can use the GetTemplateSummary action when you submit a template, or you can get template information for a running or deleted stack.

For deleted stacks, GetTemplateSummary returns the template information for up to 90 days after the stack has been deleted. If the template does not exist, a ValidationError is returned.

Public Method ListStackResources(ListStackResourcesRequest) Returns descriptions of all resources of the specified stack.

For deleted stacks, ListStackResources returns resource information for up to 90 days after the stack has been deleted.

Public Method ListStacks() Returns the summary information for stacks whose status matches the specified StackStatusFilter. Summary information for stacks that have been deleted is kept for 90 days after the stack is deleted. If no StackStatusFilter is specified, summary information for all stacks is returned (including existing stacks and stacks that have been deleted).
Public Method ListStacks(ListStacksRequest) Returns the summary information for stacks whose status matches the specified StackStatusFilter. Summary information for stacks that have been deleted is kept for 90 days after the stack is deleted. If no StackStatusFilter is specified, summary information for all stacks is returned (including existing stacks and stacks that have been deleted).
Public Method SetStackPolicy(SetStackPolicyRequest) Sets a stack policy for a specified stack.
Public Method SignalResource(SignalResourceRequest) Sends a signal to the specified resource with a success or failure status. You can use the SignalResource API in conjunction with a creation policy or update policy. AWS CloudFormation doesn't proceed with a stack creation or update until resources receive the required number of signals or the timeout period is exceeded. The SignalResource API is useful in cases where you want to send signals from anywhere other than an Amazon EC2 instance.
Public Method UpdateStack(UpdateStackRequest) Updates a stack as specified in the template. After the call completes successfully, the stack update starts. You can check the status of the stack via the DescribeStacks action.

To get a copy of the template for an existing stack, you can use the GetTemplate action.

For more information about creating an update template, updating a stack, and monitoring the progress of the update, see Updating a Stack.

Public Method ValidateTemplate() Validates a specified template.
Public Method ValidateTemplate(ValidateTemplateRequest) Validates a specified template.

Events

NameDescription
Event AfterResponseEvent Inherited from Amazon.Runtime.AmazonServiceClient.
Event BeforeRequestEvent Inherited from Amazon.Runtime.AmazonServiceClient.
Event ExceptionEvent Inherited from Amazon.Runtime.AmazonServiceClient.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

.NET for Windows Store apps:
Supported in: Windows 8.1, Windows 8

.NET for Windows Phone:
Supported in: Windows Phone 8.1