validate_template¶
Operation¶
validate_template
async
¶
validate_template(input: ValidateTemplateInput, plugins: list[Plugin] | None = None) -> ValidateTemplateOutput
Validates a specified template. CloudFormation first checks if the template is valid JSON. If it isn't, CloudFormation checks if the template is valid YAML. If both these checks fail, CloudFormation returns a template validation error.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
ValidateTemplateInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
ValidateTemplateOutput
|
An instance of |
Input¶
ValidateTemplateInput
dataclass
¶
Bases: _SerdeShape
The input for ValidateTemplate action.
Attributes¶
template_body
class-attribute
instance-attribute
¶
template_body: str | None = ...
Structure that contains the template body with a minimum length of 1 byte and a maximum length of 51,200 bytes.
Conditional: You must pass TemplateURL or TemplateBody. If both are
passed, only TemplateBody is used.
template_url
class-attribute
instance-attribute
¶
template_url: str | None = ...
The URL of a file that contains the template body. The URL must point to
a template (max size: 1 MB) that is located in an Amazon S3 bucket or a
Systems Manager document. The location for an Amazon S3 bucket must
start with https://.
Conditional: You must pass TemplateURL or TemplateBody. If both are
passed, only TemplateBody is used.
Output¶
ValidateTemplateOutput
dataclass
¶
Bases: _SerdeShape
The output for ValidateTemplate action.
Attributes¶
capabilities
class-attribute
instance-attribute
¶
The capabilities found within the template. If your template contains IAM resources, you must specify the CAPABILITY_IAM or CAPABILITY_NAMED_IAM value for this parameter when you use the CreateStack or UpdateStack actions with your template; otherwise, those actions return an InsufficientCapabilities error.
For more information, see Acknowledging IAM resources in CloudFormation templates.
capabilities_reason
class-attribute
instance-attribute
¶
capabilities_reason: str | None = ...
The list of resources that generated the values in the Capabilities
response element.
declared_transforms
class-attribute
instance-attribute
¶
A list of the transforms that are declared in the template.
description
class-attribute
instance-attribute
¶
description: str | None = ...
The description found within the template.
parameters
class-attribute
instance-attribute
¶
parameters: list[TemplateParameter] | None = ...
A list of TemplateParameter structures.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.