Update Generated Template
cloudformation_update_generated_template | R Documentation |
Updates a generated template¶
Description¶
Updates a generated template. This can be used to change the name, add
and remove resources, refresh resources, and change the DeletionPolicy
and UpdateReplacePolicy
settings. You can check the status of the
update to the generated template using the describe_generated_template
API action.
Usage¶
cloudformation_update_generated_template(GeneratedTemplateName,
NewGeneratedTemplateName, AddResources, RemoveResources,
RefreshAllResources, TemplateConfiguration)
Arguments¶
GeneratedTemplateName
[required] The name or Amazon Resource Name (ARN) of a generated template.
NewGeneratedTemplateName
An optional new name to assign to the generated template.
AddResources
An optional list of resources to be added to the generated template.
RemoveResources
A list of logical ids for resources to remove from the generated template.
RefreshAllResources
If
true
, update the resource properties in the generated template with their current live state. This feature is useful when the resource properties in your generated a template does not reflect the live state of the resource properties. This happens when a user update the resource properties after generating a template.TemplateConfiguration
The configuration details of the generated template, including the
DeletionPolicy
andUpdateReplacePolicy
.
Value¶
A list with the following syntax:
Request syntax¶
svc$update_generated_template(
GeneratedTemplateName = "string",
NewGeneratedTemplateName = "string",
AddResources = list(
list(
ResourceType = "string",
LogicalResourceId = "string",
ResourceIdentifier = list(
"string"
)
)
),
RemoveResources = list(
"string"
),
RefreshAllResources = TRUE|FALSE,
TemplateConfiguration = list(
DeletionPolicy = "DELETE"|"RETAIN",
UpdateReplacePolicy = "DELETE"|"RETAIN"
)
)
Examples¶
## Not run:
# This example updates a generated template with a new name.
svc$update_generated_template(
GeneratedTemplateName = "JazzyTemplate",
NewGeneratedTemplateName = "JazzierTemplate"
)
# This example removes resources from a generated template
svc$update_generated_template(
GeneratedTemplateName = "JazzyTemplate",
RemoveResources = list(
"LogicalResourceId1",
"LogicalResourceId2"
)
)
# This example adds resources to a generated template
svc$update_generated_template(
AddResources = list(
list(
ResourceIdentifier = list(
BucketName = "jazz-bucket"
),
ResourceType = "AWS::S3::Bucket"
),
list(
ResourceIdentifier = list(
DhcpOptionsId = "random-id123"
),
ResourceType = "AWS::EC2::DHCPOptions"
)
),
GeneratedTemplateName = "JazzyTemplate"
)
## End(Not run)