Amazon IAM Iam Policy Version API

The Iam Policy Version API from Amazon IAM — 4 operation(s) for iam policy version.

Business capability
Identity & Access Management BC-620.20

Operations 4

POST /?Action=CreatePolicyVersion Create Policy Version #
POST /?Action=DeletePolicyVersion Delete Policy Version #
POST /?Action=GetPolicyVersion Get Policy Version #
POST /?Action=ListPolicyVersions List Policy Versions #

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-iam:amazon-iam-policy-version-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-iam-policy-version-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AWS Identity and Access Management Policy Version API
  version: '2010-05-08'
  description: Generated from AWS's published Smithy model for AWS Identity and Access Management. 4 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://iam.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
tags:
- name: Policy Version
paths:
  /?Action=CreatePolicyVersion:
    post:
      operationId: CreatePolicyVersion
      summary: Create Policy Version
      description: Creates a new version of the specified managed policy. To update a managed policy, you create a new policy version. A managed policy can have up to five versions. If the policy has five versions, you must delete an existing version using DeletePolicyVersion before you create a new version. Optionally, you can set the new version as the policy's default version. The default version is the version that is in effect for the IAM users, groups, and roles to which the policy is attached. For more information about managed policy versions, see Versioning for managed policies in the IAM User Guide.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/CreatePolicyVersionResponse'
        '400':
          description: InvalidInputException; MalformedPolicyDocumentException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/InvalidInputException'
        '409':
          description: LimitExceededException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/LimitExceededException'
        '404':
          description: NoSuchEntityException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/NoSuchEntityException'
        '500':
          description: ServiceFailureException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ServiceFailureException'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: CreatePolicyVersion
                  Version:
                    type: string
                    const: '2010-05-08'
              - $ref: '#/components/schemas/CreatePolicyVersionRequest'
      tags:
      - Policy Version
  /?Action=DeletePolicyVersion:
    post:
      operationId: DeletePolicyVersion
      summary: Delete Policy Version
      description: Deletes the specified version from the specified managed policy. You cannot delete the default version from a policy using this operation. To delete the default version from a policy, use DeletePolicy. To find out which version of a policy is marked as the default version, use ListPolicyVersions. For information about versions for managed policies, see Versioning for managed policies in the IAM User Guide.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                type: string
        '409':
          description: DeleteConflictException; LimitExceededException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/DeleteConflictException'
        '400':
          description: InvalidInputException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/InvalidInputException'
        '404':
          description: NoSuchEntityException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/NoSuchEntityException'
        '500':
          description: ServiceFailureException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ServiceFailureException'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: DeletePolicyVersion
                  Version:
                    type: string
                    const: '2010-05-08'
              - $ref: '#/components/schemas/DeletePolicyVersionRequest'
      tags:
      - Policy Version
  /?Action=GetPolicyVersion:
    post:
      operationId: GetPolicyVersion
      summary: Get Policy Version
      description: Retrieves information about the specified version of the specified managed policy, including the policy document. Policies returned by this operation are URL-encoded compliant with RFC 3986. You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the decode method of the java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs provide similar functionality, and some SDKs do this decoding automatically. To list the available versions for a policy, use ListPolicyVersions. This operation retrieves information about managed policies. To retrieve information about an inline policy that is embedded in a user, group, or role, use GetUserPolicy, GetGroupPolicy, or GetRolePolicy. For more information about the types of policies, see Managed policies and inline policies in the IAM User Guide. For more information about managed policy versions, see Versioning for managed policies in the IAM User Guide.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/GetPolicyVersionResponse'
        '400':
          description: InvalidInputException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/InvalidInputException'
        '404':
          description: NoSuchEntityException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/NoSuchEntityException'
        '500':
          description: ServiceFailureException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ServiceFailureException'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: GetPolicyVersion
                  Version:
                    type: string
                    const: '2010-05-08'
              - $ref: '#/components/schemas/GetPolicyVersionRequest'
      tags:
      - Policy Version
  /?Action=ListPolicyVersions:
    post:
      operationId: ListPolicyVersions
      summary: List Policy Versions
      description: Lists information about the versions of the specified managed policy, including the version that is currently set as the policy's default version. For more information about managed policies, see Managed policies and inline policies in the IAM User Guide.
      responses:
        '200':
          description: Success
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ListPolicyVersionsResponse'
        '400':
          description: InvalidInputException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/InvalidInputException'
        '404':
          description: NoSuchEntityException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/NoSuchEntityException'
        '500':
          description: ServiceFailureException
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/ServiceFailureException'
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
              - type: object
                required:
                - Action
                - Version
                properties:
                  Action:
                    type: string
                    const: ListPolicyVersions
                  Version:
                    type: string
                    const: '2010-05-08'
              - $ref: '#/components/schemas/ListPolicyVersionsRequest'
      tags:
      - Policy Version
components:
  schemas:
    DeletePolicyVersionRequest:
      type: object
      properties:
        PolicyArn:
          type: string
          description: The Amazon Resource Name (ARN) of the IAM policy from which you want to delete a version. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
        VersionId:
          type: string
          description: The policy version to delete. This parameter allows (through its regex pattern) a string of characters that consists of the lowercase letter 'v' followed by one or two digits, and optionally followed by a period '.' and a string of letters and digits. For more information about managed policy versions, see Versioning for managed policies in the IAM User Guide.
      required:
      - PolicyArn
      - VersionId
    GetPolicyVersionRequest:
      type: object
      properties:
        PolicyArn:
          type: string
          description: The Amazon Resource Name (ARN) of the managed policy that you want information about. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
        VersionId:
          type: string
          description: Identifies the policy version to retrieve. This parameter allows (through its regex pattern) a string of characters that consists of the lowercase letter 'v' followed by one or two digits, and optionally followed by a period '.' and a string of letters and digits.
      required:
      - PolicyArn
      - VersionId
    ListPolicyVersionsRequest:
      type: object
      properties:
        PolicyArn:
          type: string
          description: The Amazon Resource Name (ARN) of the IAM policy for which you want the versions. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
        Marker:
          type: string
          description: Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the Marker element in the response that you received to indicate where the next call should start.
        MaxItems:
          type: integer
          description: Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the IsTruncated response element is true. If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the IsTruncated response element returns true, and Marker contains a value to include in the subsequent call that tells the service where to continue from.
      required:
      - PolicyArn
    NoSuchEntityException:
      type: object
      properties:
        message:
          type: string
    GetPolicyVersionResponse:
      type: object
      properties:
        PolicyVersion:
          $ref: '#/components/schemas/PolicyVersion'
    CreatePolicyVersionResponse:
      type: object
      properties:
        PolicyVersion:
          $ref: '#/components/schemas/PolicyVersion'
    InvalidInputException:
      type: object
      properties:
        message:
          type: string
    LimitExceededException:
      type: object
      properties:
        message:
          type: string
    CreatePolicyVersionRequest:
      type: object
      properties:
        PolicyArn:
          type: string
          description: The Amazon Resource Name (ARN) of the IAM policy to which you want to add a new version. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
        PolicyDocument:
          type: string
          description: The JSON policy document that you want to use as the content for this new version of the policy. You must provide policies in JSON format in IAM. However, for CloudFormation templates formatted in YAML, you can provide the policy in JSON or YAML format. CloudFormation always converts a YAML policy to JSON format before submitting it to IAM. The maximum length of the policy document that you can pass in this operation, including whitespace, is listed below. To view the maximum character counts of a managed policy with no whitespaces, see IAM and STS character quotas. The regex pattern used to v
        SetAsDefault:
          type: boolean
          description: Specifies whether to set this version as the policy's default version. When this parameter is true, the new policy version becomes the operative version. That is, it becomes the version that is in effect for the IAM users, groups, and roles that the policy is attached to. For more information about managed policy versions, see Versioning for managed policies in the IAM User Guide.
      required:
      - PolicyArn
      - PolicyDocument
    PolicyVersion:
      type: object
      properties:
        Document:
          type: string
          description: The policy document. The policy document is returned in the response to the GetPolicyVersion and GetAccountAuthorizationDetails operations. It is not returned in the response to the CreatePolicyVersion or ListPolicyVersions operations. The policy document returned in this structure is URL-encoded compliant with RFC 3986. You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the decode method of the java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs provide similar functionality.
        VersionId:
          type: string
          description: The identifier for the policy version. Policy version identifiers always begin with v (always lowercase). When a policy is created, the first policy version is v1.
        IsDefaultVersion:
          type: boolean
          description: Specifies whether the policy version is set as the policy's default version.
        CreateDate:
          type: string
          format: date-time
          description: The date and time, in ISO 8601 date-time format, when the policy version was created.
    DeleteConflictException:
      type: object
      properties:
        message:
          type: string
    ListPolicyVersionsResponse:
      type: object
      properties:
        Versions:
          type: array
          items:
            $ref: '#/components/schemas/PolicyVersion'
          description: A list of policy versions. For more information about managed policy versions, see Versioning for managed policies in the IAM User Guide.
        IsTruncated:
          type: boolean
          description: A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more items. Note that IAM might return fewer than the MaxItems number of results even when there are more results available. We recommend that you check IsTruncated after every call to ensure that you receive all your results.
        Marker:
          type: string
          description: When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.
    ServiceFailureException:
      type: object
      properties:
        message:
          type: string
  securitySchemes:
    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: iam
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/582e55931c45b944739742a2c1620b6026dd2d13/models/iam/service/2010-05-08/iam-2010-05-08.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)