AWS CloudFormation Stack Policies API

Operations for getting and setting stack policies.

Operations 2

POST /?Action=GetStackPolicy Retrieve a Stack Policy #
POST /?Action=SetStackPolicy Set a Stack Policy #

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/cloudformation-stack-policies-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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

cloudformation-stack-policies-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AWS CloudFormation Stack Policies API
  description: AWS CloudFormation gives you an easy way to model a collection of related AWS and third-party resources, provision them quickly and consistently, and manage them throughout their lifecycles. It uses templates to define stacks of resources and provides API operations for creating, updating, and deleting stacks. The API uses a query-style interface where all operations are submitted as POST requests with an Action parameter.
  version: '2010-05-15'
  contact:
    name: AWS Support
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  x-logo:
    url: https://aws.amazon.com/cloudformation/logo.png
servers:
- url: https://cloudformation.{region}.amazonaws.com
  description: AWS CloudFormation Regional Endpoint
  variables:
    region:
      default: us-east-1
      description: AWS region
      enum:
      - us-east-1
      - us-east-2
      - us-west-1
      - us-west-2
      - eu-west-1
      - eu-west-2
      - eu-central-1
      - ap-southeast-1
      - ap-southeast-2
      - ap-northeast-1
security:
- AWS_Signature_V4: []
tags:
- name: Stack Policies
  description: Operations for getting and setting stack policies.
paths:
  /?Action=GetStackPolicy:
    post:
      operationId: getStackPolicy
      summary: Retrieve a Stack Policy
      description: Returns the stack policy for a specified stack. If a stack does not have a policy, a null value is returned.
      tags:
      - Stack Policies
      parameters:
      - $ref: '#/components/parameters/VersionParam'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - StackName
              properties:
                StackName:
                  type: string
            examples:
              GetstackpolicyRequestExample:
                summary: Default getStackPolicy request
                x-microcks-default: true
                value:
                  StackName: example_value
      responses:
        '200':
          description: Stack policy returned.
          content:
            application/xml:
              schema:
                type: object
                properties:
                  GetStackPolicyResult:
                    type: object
                    properties:
                      StackPolicyBody:
                        type: string
              examples:
                Getstackpolicy200Example:
                  summary: Default getStackPolicy 200 response
                  x-microcks-default: true
                  value:
                    GetStackPolicyResult:
                      StackPolicyBody: example_value
        '400':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/InternalError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /?Action=SetStackPolicy:
    post:
      operationId: setStackPolicy
      summary: Set a Stack Policy
      description: Sets a stack policy for a specified stack. A stack policy controls whether changes to stack resources are allowed during updates.
      tags:
      - Stack Policies
      parameters:
      - $ref: '#/components/parameters/VersionParam'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - StackName
              properties:
                StackName:
                  type: string
                StackPolicyBody:
                  type: string
                  description: Stack policy body (1-16,384 bytes).
                StackPolicyURL:
                  type: string
                  description: Location of the stack policy in S3.
                  format: uri
            examples:
              SetstackpolicyRequestExample:
                summary: Default setStackPolicy request
                x-microcks-default: true
                value:
                  StackName: example_value
                  StackPolicyBody: example_value
                  StackPolicyURL: https://www.example.com
      responses:
        '200':
          description: Stack policy set successfully.
        '400':
          $ref: '#/components/responses/ValidationError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        Error:
          type: object
          properties:
            Type:
              type: string
            Code:
              type: string
            Message:
              type: string
          example: example_value
        RequestId:
          type: string
          example: '500123'
  parameters:
    VersionParam:
      name: Version
      in: query
      required: true
      schema:
        type: string
        default: '2010-05-15'
      description: The API version. Fixed to 2010-05-15.
  responses:
    InternalError:
      description: An internal service error occurred.
      content:
        application/xml:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationError:
      description: The input fails to satisfy the constraints specified by the service.
      content:
        application/xml:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFoundError:
      description: The specified resource was not found.
      content:
        application/xml:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    AWS_Signature_V4:
      type: apiKey
      name: Authorization
      in: header
      description: AWS Signature Version 4 authentication.