CloudFormationClient.get_template
rboto-cloudformation==0.4.0 · Service index · Types
Model summary (excerpt): Returns the template body for a specified stack. You can get the template for running or deleted stacks. For deleted stacks, GetTemplate returns the template for up to 90 days after the stack has been deleted. If the template doesn't exist, a ValidationError is returned.
Install and imports
from rboto import CloudFormationClient
from rboto_cloudformation.types import (
GetTemplateOutput,
TemplateStage,
)
Signature
async def get_template(
*,
stack_name: str | None = None,
change_set_name: str | None = None,
template_stage: TemplateStage | None = None,
) -> GetTemplateOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
stack_name |
No | The name or the unique stack ID that's associated with the stack, which aren't always interchangeable: Running stacks: You can specify either the stack's name or its unique stack ID. Deleted stacks: You must specify the unique stack ID. |
change_set_name |
No | The name or Amazon Resource Name (ARN) of a change set for which CloudFormation returns the associated template. If you specify a name, you must also specify the StackName . |
template_stage |
No | For templates that include transforms, the stage of the template that CloudFormation returns. To get the user-submitted template, specify Original . To get the template after CloudFormation has processed all transforms, specify Processed . If the template doesn't include transforms, Original and Processed return the same template. By default, CloudFormation specifies Processed . |
Output
GetTemplateOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
template_body |
str | None |
Always present | — |
stages_available |
list[TemplateStageOutput] | None |
Always present | TemplateStageOutput |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
GetTemplateOutput, TemplateStage
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_cloudformation.exceptions:
Other service failures use the service base error; credential, transport and timeout failures use shared errors.