CloudFormation / Client / get_template_summary
get_template_summary#
- CloudFormation.Client.get_template_summary(**kwargs)#
Returns information about a new or existing template. The
GetTemplateSummary
action is useful for viewing parameter information, such as default parameter values and parameter types, before you create or update a stack or stack set.You can use the
GetTemplateSummary
action when you submit a template, or you can get template information for a stack set, or a running or deleted stack.For deleted stacks,
GetTemplateSummary
returns the template information for up to 90 days after the stack has been deleted. If the template doesn’t exist, aValidationError
is returned.See also: AWS API Documentation
Request Syntax
response = client.get_template_summary( TemplateBody='string', TemplateURL='string', StackName='string', StackSetName='string', CallAs='SELF'|'DELEGATED_ADMIN', TemplateSummaryConfig={ 'TreatUnrecognizedResourceTypesAsWarnings': True|False } )
- Parameters:
TemplateBody (string) –
Structure containing the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes. For more information about templates, see Template anatomy in the CloudFormation User Guide.
Conditional: You must specify only one of the following parameters:
StackName
,StackSetName
,TemplateBody
, orTemplateURL
.TemplateURL (string) –
Location of file containing the template body. The URL must point to a template (max size: 460,800 bytes) that’s located in an Amazon S3 bucket or a Systems Manager document. For more information about templates, see Template anatomy in the CloudFormation User Guide. The location for an Amazon S3 bucket must start with
https://
.Conditional: You must specify only one of the following parameters:
StackName
,StackSetName
,TemplateBody
, orTemplateURL
.StackName (string) –
The name or the stack ID that’s associated with the stack, which aren’t always interchangeable. For running stacks, you can specify either the stack’s name or its unique stack ID. For deleted stack, you must specify the unique stack ID.
Conditional: You must specify only one of the following parameters:
StackName
,StackSetName
,TemplateBody
, orTemplateURL
.StackSetName (string) –
The name or unique ID of the stack set from which the stack was created.
Conditional: You must specify only one of the following parameters:
StackName
,StackSetName
,TemplateBody
, orTemplateURL
.CallAs (string) –
[Service-managed permissions] Specifies whether you are acting as an account administrator in the organization’s management account or as a delegated administrator in a member account.
By default,
SELF
is specified. UseSELF
for stack sets with self-managed permissions.If you are signed in to the management account, specify
SELF
.If you are signed in to a delegated administrator account, specify
DELEGATED_ADMIN
. Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see Register a delegated administrator in the CloudFormation User Guide.
TemplateSummaryConfig (dict) –
Specifies options for the
GetTemplateSummary
API action.TreatUnrecognizedResourceTypesAsWarnings (boolean) –
If set to
True
, any unrecognized resource types generate warnings and not an error. Any unrecognized resource types are returned in theWarnings
output parameter.
- Return type:
dict
- Returns:
Response Syntax
{ 'Parameters': [ { 'ParameterKey': 'string', 'DefaultValue': 'string', 'ParameterType': 'string', 'NoEcho': True|False, 'Description': 'string', 'ParameterConstraints': { 'AllowedValues': [ 'string', ] } }, ], 'Description': 'string', 'Capabilities': [ 'CAPABILITY_IAM'|'CAPABILITY_NAMED_IAM'|'CAPABILITY_AUTO_EXPAND', ], 'CapabilitiesReason': 'string', 'ResourceTypes': [ 'string', ], 'Version': 'string', 'Metadata': 'string', 'DeclaredTransforms': [ 'string', ], 'ResourceIdentifierSummaries': [ { 'ResourceType': 'string', 'LogicalResourceIds': [ 'string', ], 'ResourceIdentifiers': [ 'string', ] }, ], 'Warnings': { 'UnrecognizedResourceTypes': [ 'string', ] } }
Response Structure
(dict) –
The output for the GetTemplateSummary action.
Parameters (list) –
A list of parameter declarations that describe various properties for each parameter.
(dict) –
The ParameterDeclaration data type.
ParameterKey (string) –
The name that’s associated with the parameter.
DefaultValue (string) –
The default value of the parameter.
ParameterType (string) –
The type of parameter.
NoEcho (boolean) –
Flag that indicates whether the parameter value is shown as plain text in logs and in the Amazon Web Services Management Console.
Description (string) –
The description that’s associate with the parameter.
ParameterConstraints (dict) –
The criteria that CloudFormation uses to validate parameter values.
AllowedValues (list) –
A list of values that are permitted for a parameter.
(string) –
Description (string) –
The value that’s defined in the
Description
property of the template.Capabilities (list) –
The capabilities found within the template. If your template contains IAM resources, you must specify the
CAPABILITY_IAM
orCAPABILITY_NAMED_IAM
value for this parameter when you use the CreateStack or UpdateStack actions with your template; otherwise, those actions return anInsufficientCapabilities
error.For more information, see Acknowledging IAM Resources in CloudFormation Templates.
(string) –
CapabilitiesReason (string) –
The list of resources that generated the values in the
Capabilities
response element.ResourceTypes (list) –
A list of all the template resource types that are defined in the template, such as
AWS::EC2::Instance
,AWS::Dynamo::Table
, andCustom::MyCustomInstance
.(string) –
Version (string) –
The Amazon Web Services template format version, which identifies the capabilities of the template.
Metadata (string) –
The value that’s defined for the
Metadata
property of the template.DeclaredTransforms (list) –
A list of the transforms that are declared in the template.
(string) –
ResourceIdentifierSummaries (list) –
A list of resource identifier summaries that describe the target resources of an import operation and the properties you can provide during the import to identify the target resources. For example,
BucketName
is a possible identifier property for anAWS::S3::Bucket
resource.(dict) –
Describes the target resources of a specific type in your import template (for example, all
AWS::S3::Bucket
resources) and the properties you can provide during the import to identify resources of that type.ResourceType (string) –
The template resource type of the target resources, such as
AWS::S3::Bucket
.LogicalResourceIds (list) –
The logical IDs of the target resources of the specified
ResourceType
, as defined in the import template.(string) –
ResourceIdentifiers (list) –
The resource properties you can provide during the import to identify your target resources. For example,
BucketName
is a possible identifier property forAWS::S3::Bucket
resources.(string) –
Warnings (dict) –
An object containing any warnings returned.
UnrecognizedResourceTypes (list) –
A list of all of the unrecognized resource types. This is only returned if the
TemplateSummaryConfig
parameter has theTreatUnrecognizedResourceTypesAsWarning
configuration set toTrue
.(string) –
Exceptions
CloudFormation.Client.exceptions.StackSetNotFoundException