Amazon AWS SDK Guide de l'utilisateur Page 49 : AWS CloudFormation Programming with the AWS SDK for .NET

/ 155
Table des matières

AWS CloudFormation Programming with the

AWS SDK for .NET

The AWS SDK for .NET supports AWS CloudFormation, which creates and provision AWS infrastructure
deployments predictably and repeatedly. For more information, see
AWS CloudFormation
.
The following information introduces you to the AWS CloudFormation programming models in the SDK
for .NET.

Programming Models

The SDK for .NET provides two programming models for working with AWS CloudFormation. These
programming models are known as the
low-level
and
resource
models.The following information describes
these models, how to use them, and why you would want to use them.

Low-Level APIs

The SDK for .NET provides low-level APIs for programming with AWS CloudFormation. These low-level
APIs typically consist of sets of matching request-and-response objects that correspond to HTTP-based
API calls focusing on their corresponding service-level constructs.
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);
}
}
}
Version v2.0.0
45
AWS SDK for .NET Developer Guide
AWS CloudFormation

Fichier PDF · ·

Imprimer

Imprimer le document

Partage

Questions sur Amazon AWS SDK

Pas encore de questions sur ce manuel. Posez la première.

Poser une question

Nous répondons à partir du manuel et indiquons la page. La question est publiée sur le site après vérification.

Toutes les questions et réponses ›

Produits connexes et manuels pour Logiciel Amazon AWS SDK