AWS SDK Version 3 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.

Container for the parameters to the CreateGeneratedTemplate operation. Creates a template from existing resources that are not already managed with CloudFormation. You can check the status of the template generation using the DescribeGeneratedTemplate API action.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.CloudFormation.AmazonCloudFormationRequest
      Amazon.CloudFormation.Model.CreateGeneratedTemplateRequest

Namespace: Amazon.CloudFormation.Model
Assembly: AWSSDK.CloudFormation.dll
Version: 3.x.y.z

Syntax

C#
public class CreateGeneratedTemplateRequest : AmazonCloudFormationRequest
         IAmazonWebServiceRequest

The CreateGeneratedTemplateRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property GeneratedTemplateName System.String

Gets and sets the property GeneratedTemplateName.

The name assigned to the generated template.

Public Property Resources System.Collections.Generic.List<Amazon.CloudFormation.Model.ResourceDefinition>

Gets and sets the property Resources.

An optional list of resources to be included in the generated template.

If no resources are specified,the template will be created without any resources. Resources can be added to the template using the UpdateGeneratedTemplate API action.

Public Property StackName System.String

Gets and sets the property StackName.

An optional name or ARN of a stack to use as the base stack for the generated template.

Public Property TemplateConfiguration Amazon.CloudFormation.Model.TemplateConfiguration

Gets and sets the property TemplateConfiguration.

The configuration details of the generated template, including the DeletionPolicy and UpdateReplacePolicy.

Examples

This example creates a generated template with a resources file.

To create a generated template


var client = new AmazonCloudFormationClient();
var response = client.CreateGeneratedTemplate(new CreateGeneratedTemplateRequest 
{
    GeneratedTemplateName = "JazzyTemplate",
    Resources = new List<ResourceDefinition> {
        new ResourceDefinition {
            ResourceIdentifier = new Dictionary<string, string> {
                { "BucketName", "jazz-bucket" }
            },
            ResourceType = "AWS::S3::Bucket"
        },
        new ResourceDefinition {
            ResourceIdentifier = new Dictionary<string, string> {
                { "DhcpOptionsId", "random-id123" }
            },
            ResourceType = "AWS::EC2::DHCPOptions"
        }
    }
});

string generatedTemplateId = response.GeneratedTemplateId;

            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

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