Amazon CloudFormation Templates API

Operations for working with CloudFormation templates

Business capability
IT Infrastructure Management BC-600.50

Operations 5

GET /?Action=ValidateTemplate Amazon CloudFormation Validate a template #
POST /?Action=ValidateTemplate Validate Template #
GET /?Action=GetTemplate Amazon CloudFormation Get template #
POST /?Action=GetTemplate Get Template #
GET /?Action=GetTemplateSummary Amazon CloudFormation Get template summary #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-cloudformation:amazon-cloudformation-templates-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-cloudformation-templates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Amazon Cloudformation Templates API
  version: '2010-05-15'
  description: 'Operations tagged Templates across 2 of this provider''s published API definitions: amazon-cloudformation-openapi.yml, amazon-cloudformation-templates-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://cloudformation.amazonaws.com
  description: Amazon CloudFormation regional endpoint
- url: https://cloudformation.{region}.amazonaws.com
  description: Amazon CloudFormation regional endpoint
  variables:
    region:
      default: us-east-1
      description: The AWS region
tags:
- name: Templates
  description: Operations for working with CloudFormation templates
paths:
  /?Action=ValidateTemplate:
    get:
      operationId: ValidateTemplate
      summary: Amazon CloudFormation Validate a template
      description: Validates a specified template. CloudFormation first checks if the template is valid JSON or YAML. If both checks fail, CloudFormation returns a template validation error.
      parameters:
      - name: Action
        in: query
        required: true
        schema:
          type: string
          enum:
          - ValidateTemplate
      - name: Version
        in: query
        required: true
        schema:
          type: string
          default: '2010-05-15'
      - name: TemplateBody
        in: query
        description: Structure containing the template body.
        schema:
          type: string
      - name: TemplateURL
        in: query
        description: Location of file containing the template body.
        schema:
          type: string
          format: uri
      responses:
        '200':
          description: Successful response
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ValidateTemplateOutput'
        '400':
          description: Client error
        '500':
          description: Server error
      tags:
      - Templates
      security:
      - aws_auth: []
    post:
      operationId: post?Action=ValidateTemplate
      summary: Validate Template
      description: 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.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ValidateTemplateOutput_2'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: ValidateTemplate
                  Version:
                    type: string
                    const: '2010-05-15'
              - $ref: '#/components/schemas/ValidateTemplateInput'
      tags:
      - Templates
      security:
      - aws_auth: []
      x-operation-id-source: normalized
      x-operation-id-original: ValidateTemplate
    servers:
    - url: https://cloudformation.amazonaws.com
      description: Amazon CloudFormation regional endpoint
    - url: https://cloudformation.{region}.amazonaws.com
      description: Amazon CloudFormation regional endpoint
      variables:
        region:
          default: us-east-1
          description: The AWS region
  /?Action=GetTemplate:
    get:
      operationId: GetTemplate
      summary: Amazon CloudFormation Get template
      description: Returns the template body for a specified stack. You can get the template for running or deleted stacks.
      parameters:
      - name: Action
        in: query
        required: true
        schema:
          type: string
          enum:
          - GetTemplate
      - name: Version
        in: query
        required: true
        schema:
          type: string
          default: '2010-05-15'
      - name: StackName
        in: query
        description: The name or the unique stack ID.
        schema:
          type: string
      - name: ChangeSetName
        in: query
        description: The name or Amazon Resource Name (ARN) of a change set.
        schema:
          type: string
      - name: TemplateStage
        in: query
        description: The stage of the template that is returned.
        schema:
          type: string
          enum:
          - Original
          - Processed
      responses:
        '200':
          description: Successful response
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/GetTemplateOutput'
        '400':
          description: Client error
        '500':
          description: Server error
      tags:
      - Templates
      security:
      - aws_auth: []
    post:
      operationId: post?Action=GetTemplate
      summary: Get Template
      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.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/GetTemplateOutput_2'
        '404':
          description: ChangeSetNotFoundException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ChangeSetNotFoundException'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: GetTemplate
                  Version:
                    type: string
                    const: '2010-05-15'
              - $ref: '#/components/schemas/GetTemplateInput'
      tags:
      - Templates
      security:
      - aws_auth: []
      x-operation-id-source: normalized
      x-operation-id-original: GetTemplate
    servers:
    - url: https://cloudformation.amazonaws.com
      description: Amazon CloudFormation regional endpoint
    - url: https://cloudformation.{region}.amazonaws.com
      description: Amazon CloudFormation regional endpoint
      variables:
        region:
          default: us-east-1
          description: The AWS region
  /?Action=GetTemplateSummary:
    get:
      operationId: GetTemplateSummary
      summary: Amazon CloudFormation Get template summary
      description: 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.
      parameters:
      - name: Action
        in: query
        required: true
        schema:
          type: string
          enum:
          - GetTemplateSummary
      - name: Version
        in: query
        required: true
        schema:
          type: string
          default: '2010-05-15'
      - name: TemplateBody
        in: query
        description: Structure containing the template body.
        schema:
          type: string
      - name: TemplateURL
        in: query
        description: Location of file containing the template body.
        schema:
          type: string
          format: uri
      - name: StackName
        in: query
        description: The name or the stack ID.
        schema:
          type: string
      - name: StackSetName
        in: query
        description: The name or unique ID of the stack set.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/GetTemplateSummaryOutput'
        '400':
          description: Client error
        '500':
          description: Server error
      tags:
      - Templates
      security:
      - aws_auth: []
    servers:
    - url: https://cloudformation.amazonaws.com
      description: Amazon CloudFormation regional endpoint
    - url: https://cloudformation.{region}.amazonaws.com
      description: Amazon CloudFormation regional endpoint
      variables:
        region:
          default: us-east-1
          description: The AWS region
components:
  schemas:
    GetTemplateSummaryOutput:
      type: object
      properties:
        Parameters:
          type: array
          items:
            type: object
            properties:
              ParameterKey:
                type: string
              DefaultValue:
                type: string
              ParameterType:
                type: string
              NoEcho:
                type: boolean
              Description:
                type: string
              ParameterConstraints:
                type: object
                properties:
                  AllowedValues:
                    type: array
                    items:
                      type: string
        Description:
          type: string
        Capabilities:
          type: array
          items:
            type: string
        ResourceTypes:
          type: array
          items:
            type: string
        Version:
          type: string
        Metadata:
          type: string
    GetTemplateOutput:
      type: object
      properties:
        TemplateBody:
          type: string
          description: Structure containing the template body.
        StagesAvailable:
          type: array
          items:
            type: string
            enum:
            - Original
            - Processed
    ValidateTemplateOutput:
      type: object
      properties:
        Parameters:
          type: array
          items:
            type: object
            properties:
              ParameterKey:
                type: string
              DefaultValue:
                type: string
              NoEcho:
                type: boolean
              Description:
                type: string
        Description:
          type: string
        Capabilities:
          type: array
          items:
            type: string
        CapabilitiesReason:
          type: string
    ValidateTemplateInput:
      type: object
      properties:
        TemplateBody:
          type: string
          description: '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.'
        TemplateURL:
          type: string
          description: '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.'
    ValidateTemplateOutput_2:
      type: object
      properties:
        Parameters:
          type: array
          items:
            $ref: '#/components/schemas/TemplateParameter'
          description: A list of TemplateParameter structures.
        Description:
          type: string
          description: The description found within the template.
        Capabilities:
          type: array
          items:
            type: string
            enum:
            - CAPABILITY_IAM
            - CAPABILITY_NAMED_IAM
            - CAPABILITY_AUTO_EXPAND
          description: 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.
        CapabilitiesReason:
          type: string
          description: The list of resources that generated the values in the Capabilities response element.
        DeclaredTransforms:
          type: array
          items:
            type: string
          description: A list of the transforms that are declared in the template.
    GetTemplateInput:
      type: object
      properties:
        StackName:
          type: string
          description: '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.'
        ChangeSetName:
          type: string
          description: 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.
        TemplateStage:
          type: string
          enum:
          - Original
          - Processed
          description: 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.
    GetTemplateOutput_2:
      type: object
      properties:
        TemplateBody:
          type: string
          description: Structure that contains the template body. CloudFormation returns the same template that was used when the stack was created.
        StagesAvailable:
          type: array
          items:
            type: string
            enum:
            - Original
            - Processed
          description: 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.
    TemplateParameter:
      type: object
      properties:
        ParameterKey:
          type: string
          description: The name associated with the parameter.
        DefaultValue:
          type: string
          description: The default value associated with the parameter.
        NoEcho:
          type: boolean
          description: Flag indicating whether the parameter should be displayed as plain text in logs and UIs.
        Description:
          type: string
          description: User defined description associated with the parameter.
    ChangeSetNotFoundException:
      type: object
      properties:
        Message:
          type: string
  securitySchemes:
    aws_auth:
      type: apiKey
      name: Authorization
      in: header
      description: AWS Signature Version 4 authentication
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: cloudformation
x-refined-from:
- amazon-cloudformation-openapi.yml
- amazon-cloudformation-templates-api-openapi.yml