amazonka-cloudformation-2.0: Amazon CloudFormation SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.CloudFormation.GetTemplate

Description

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.

Synopsis

Creating a Request

data GetTemplate Source #

The input for a GetTemplate action.

See: newGetTemplate smart constructor.

Constructors

GetTemplate' 

Fields

  • changeSetName :: Maybe Text

    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.

  • stackName :: Maybe Text

    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.

    Default: There is no default value.

  • templateStage :: Maybe TemplateStage

    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.

Instances

Instances details
ToHeaders GetTemplate Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

Methods

toHeaders :: GetTemplate -> [Header] #

ToPath GetTemplate Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

ToQuery GetTemplate Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

AWSRequest GetTemplate Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

Associated Types

type AWSResponse GetTemplate #

Generic GetTemplate Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

Associated Types

type Rep GetTemplate :: Type -> Type #

Read GetTemplate Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

Show GetTemplate Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

NFData GetTemplate Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

Methods

rnf :: GetTemplate -> () #

Eq GetTemplate Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

Hashable GetTemplate Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

type AWSResponse GetTemplate Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

type Rep GetTemplate Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

type Rep GetTemplate = D1 ('MetaData "GetTemplate" "Amazonka.CloudFormation.GetTemplate" "amazonka-cloudformation-2.0-2g2oPzedi5AcwbDRlNZfB" 'False) (C1 ('MetaCons "GetTemplate'" 'PrefixI 'True) (S1 ('MetaSel ('Just "changeSetName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "stackName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "templateStage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe TemplateStage)))))

newGetTemplate :: GetTemplate Source #

Create a value of GetTemplate with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

GetTemplate, getTemplate_changeSetName - 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.

GetTemplate, getTemplate_stackName - 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.

Default: There is no default value.

$sel:templateStage:GetTemplate', getTemplate_templateStage - 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.

Request Lenses

getTemplate_changeSetName :: Lens' GetTemplate (Maybe Text) Source #

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.

getTemplate_stackName :: Lens' GetTemplate (Maybe Text) Source #

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.

Default: There is no default value.

getTemplate_templateStage :: Lens' GetTemplate (Maybe TemplateStage) Source #

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.

Destructuring the Response

data GetTemplateResponse Source #

The output for GetTemplate action.

See: newGetTemplateResponse smart constructor.

Constructors

GetTemplateResponse' 

Fields

  • stagesAvailable :: Maybe [TemplateStage]

    The stage of the template that you can retrieve. For stacks, the Original and Processed templates are always available. For change sets, the Original template is always available. After CloudFormation finishes creating the change set, the Processed template becomes available.

  • templateBody :: Maybe Text

    Structure containing the template body. (For more information, go to Template Anatomy in the CloudFormation User Guide.)

    CloudFormation returns the same template that was used when the stack was created.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic GetTemplateResponse Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

Associated Types

type Rep GetTemplateResponse :: Type -> Type #

Read GetTemplateResponse Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

Show GetTemplateResponse Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

NFData GetTemplateResponse Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

Methods

rnf :: GetTemplateResponse -> () #

Eq GetTemplateResponse Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

type Rep GetTemplateResponse Source # 
Instance details

Defined in Amazonka.CloudFormation.GetTemplate

type Rep GetTemplateResponse = D1 ('MetaData "GetTemplateResponse" "Amazonka.CloudFormation.GetTemplate" "amazonka-cloudformation-2.0-2g2oPzedi5AcwbDRlNZfB" 'False) (C1 ('MetaCons "GetTemplateResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "stagesAvailable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [TemplateStage])) :*: (S1 ('MetaSel ('Just "templateBody") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newGetTemplateResponse Source #

Create a value of GetTemplateResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:stagesAvailable:GetTemplateResponse', getTemplateResponse_stagesAvailable - The stage of the template that you can retrieve. For stacks, the Original and Processed templates are always available. For change sets, the Original template is always available. After CloudFormation finishes creating the change set, the Processed template becomes available.

GetTemplateResponse, getTemplateResponse_templateBody - Structure containing the template body. (For more information, go to Template Anatomy in the CloudFormation User Guide.)

CloudFormation returns the same template that was used when the stack was created.

$sel:httpStatus:GetTemplateResponse', getTemplateResponse_httpStatus - The response's http status code.

Response Lenses

getTemplateResponse_stagesAvailable :: Lens' GetTemplateResponse (Maybe [TemplateStage]) Source #

The stage of the template that you can retrieve. For stacks, the Original and Processed templates are always available. For change sets, the Original template is always available. After CloudFormation finishes creating the change set, the Processed template becomes available.

getTemplateResponse_templateBody :: Lens' GetTemplateResponse (Maybe Text) Source #

Structure containing the template body. (For more information, go to Template Anatomy in the CloudFormation User Guide.)

CloudFormation returns the same template that was used when the stack was created.