CloudFormation / Client / create_generated_template
create_generated_template#
- CloudFormation.Client.create_generated_template(**kwargs)#
- Creates a template from existing resources that are not already managed with CloudFormation. You can check the status of the template generation using the - DescribeGeneratedTemplateAPI action.- See also: AWS API Documentation - Request Syntax- response = client.create_generated_template( Resources=[ { 'ResourceType': 'string', 'LogicalResourceId': 'string', 'ResourceIdentifier': { 'string': 'string' } }, ], GeneratedTemplateName='string', StackName='string', TemplateConfiguration={ 'DeletionPolicy': 'DELETE'|'RETAIN', 'UpdateReplacePolicy': 'DELETE'|'RETAIN' } ) - Parameters:
- Resources (list) – - 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 - UpdateGeneratedTemplateAPI action.- (dict) – - A resource included in a generated template. This data type is used with the - CreateGeneratedTemplateand- UpdateGeneratedTemplateAPI actions.- ResourceType (string) – [REQUIRED] - The type of the resource, such as - AWS::DynamoDB::Table. For the list of supported resources, see Resource type support for imports and drift detection in the CloudFormation User Guide
- LogicalResourceId (string) – - The logical resource id for this resource in the generated template. 
- ResourceIdentifier (dict) – [REQUIRED] - A list of up to 256 key-value pairs that identifies the scanned resource. The key is the name of one of the primary identifiers for the resource. (Primary identifiers are specified in the - primaryIdentifierlist in the resource schema.) The value is the value of that primary identifier. For example, for a- AWS::DynamoDB::Tableresource, the primary identifiers is- TableNameso the key-value pair could be- "TableName": "MyDDBTable". For more information, see primaryIdentifier in the CloudFormation Command Line Interface (CLI) User Guide.- (string) – - (string) – 
 
 
 
 
- GeneratedTemplateName (string) – - [REQUIRED] - The name assigned to the generated template. 
- StackName (string) – An optional name or ARN of a stack to use as the base stack for the generated template. 
- TemplateConfiguration (dict) – - The configuration details of the generated template, including the - DeletionPolicyand- UpdateReplacePolicy.- DeletionPolicy (string) – - The - DeletionPolicyassigned to resources in the generated template. Supported values are:- DELETE- delete all resources when the stack is deleted.
- RETAIN- retain all resources when the stack is deleted.
 - For more information, see DeletionPolicy attribute in the CloudFormation User Guide. 
- UpdateReplacePolicy (string) – - The - UpdateReplacePolicyassigned to resources in the generated template. Supported values are:- DELETE- delete all resources when the resource is replaced during an update operation.
- RETAIN- retain all resources when the resource is replaced during an update operation.
 - For more information, see UpdateReplacePolicy attribute in the CloudFormation User Guide. 
 
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'GeneratedTemplateId': 'string' } - Response Structure- (dict) – - GeneratedTemplateId (string) – - The ID of the generated template. 
 
 
 - Exceptions- CloudFormation.Client.exceptions.AlreadyExistsException
- CloudFormation.Client.exceptions.LimitExceededException
- CloudFormation.Client.exceptions.ConcurrentResourcesLimitExceededException