Listing AWS Resources using AWS CloudFormation - AWS SDK for .NET (version 3)

This documentation is for version 3.0 of the AWS SDK for .NET, which is mostly centered around .NET Framework and ASP.NET 4.x, Windows, and Visual Studio.

The latest version of the documentation at is mostly centered around .NET Core and ASP.NET Core. In addition to Windows and Visual Studio, it gives equal consideration to cross-platform development.

Listing AWS Resources using AWS CloudFormation

The AWS SDK for .NET supports AWS CloudFormation, which creates and provisions AWS infrastructure deployments predictably and repeatedly. For more information, see AWS CloudFormation Getting Started Guide.

The following example shows how to use the low-level APIs to list accessible resources in AWS CloudFormation.

// using Amazon.CloudFormation; // using Amazon.CloudFormation.Model; var client = new AmazonCloudFormationClient(); var request = new DescribeStacksRequest(); var response = client.DescribeStacks(request); foreach (var stack in response.Stacks) { Console.WriteLine("Stack: {0}", stack.StackName); Console.WriteLine(" Status: {0}", stack.StackStatus); Console.WriteLine(" Created: {0}", stack.CreationTime); var ps = stack.Parameters; if (ps.Any()) { Console.WriteLine(" Parameters:"); foreach (var p in ps) { Console.WriteLine(" {0} = {1}", p.ParameterKey, p.ParameterValue); } } }

For related API reference information, see Amazon.CloudFormation and Amazon.CloudFormation.Model in the AWS SDK for .NET API Reference.