Skip to content

Create Generated Template

cloudformation_create_generated_template R Documentation

Creates a template from existing resources that are not already managed with CloudFormation

Description

Creates a template from existing resources that are not already managed with CloudFormation. You can check the status of the template generation using the describe_generated_template API action.

Usage

cloudformation_create_generated_template(Resources,
  GeneratedTemplateName, StackName, TemplateConfiguration)

Arguments

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 update_generated_template API action.

GeneratedTemplateName

[required] The name assigned to the generated template.

StackName

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

TemplateConfiguration

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

Value

A list with the following syntax:

list(
  GeneratedTemplateId = "string"
)

Request syntax

svc$create_generated_template(
  Resources = list(
    list(
      ResourceType = "string",
      LogicalResourceId = "string",
      ResourceIdentifier = list(
        "string"
      )
    )
  ),
  GeneratedTemplateName = "string",
  StackName = "string",
  TemplateConfiguration = list(
    DeletionPolicy = "DELETE"|"RETAIN",
    UpdateReplacePolicy = "DELETE"|"RETAIN"
  )
)

Examples

## Not run: 
# This example creates a generated template with a resources file.
svc$create_generated_template(
  GeneratedTemplateName = "JazzyTemplate",
  Resources = list(
    list(
      ResourceIdentifier = list(
        BucketName = "jazz-bucket"
      ),
      ResourceType = "AWS::S3::Bucket"
    ),
    list(
      ResourceIdentifier = list(
        DhcpOptionsId = "random-id123"
      ),
      ResourceType = "AWS::EC2::DHCPOptions"
    )
  )
)

## End(Not run)