Amazon IoT Core Policies API

The Policies API from Amazon IoT Core — 4 operation(s) for policies.

GitHub OpenAPI
Business capability
Identity & Access Management BC-620.20

Operations 9

POST /policies/{policyName} Create Policy #
DELETE /policies/{policyName} Delete Policy #
GET /policies/{policyName} Get Policy #
GET /policies List Policies #
POST /policies/{policyName}/version Create Policy Version #
GET /policies/{policyName}/version List Policy Versions #
DELETE /policies/{policyName}/version/{policyVersionId} Delete Policy Version #
GET /policies/{policyName}/version/{policyVersionId} Get Policy Version #
PATCH /policies/{policyName}/version/{policyVersionId} Set Default Policy Version #

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-iot-core:amazon-iot-core-policies-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-iot-core-policies-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: AWS IoT Policies API
  version: '2015-05-28'
  description: Generated from AWS's published Smithy model for AWS IoT. 9 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://iot.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /policies/{policyName}:
    post:
      operationId: CreatePolicy
      summary: Create Policy
      description: Creates an IoT policy. The created policy is the default version for the policy. This operation creates
        a policy version with a version identifier of 1 and sets 1 as the policy's default version. Requires permission to
        access the CreatePolicy action.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePolicyResponse'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException; MalformedPolicyException; ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '409':
          description: ResourceAlreadyExistsException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceAlreadyExistsException'
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePolicyRequest'
      tags:
      - Policies
    delete:
      operationId: DeletePolicy
      summary: Delete Policy
      description: Deletes the specified policy. A policy cannot be deleted if it has non-default versions or it is attached
        to any certificate. To delete a policy, use the DeletePolicyVersion action to delete all non-default versions of the
        policy; use the DetachPolicy action to detach the policy from any certificate; and then use the DeletePolicy action
        to delete the policy. When a policy is deleted using DeletePolicy, its default version is deleted with it. Because
        of the distributed nature of Amazon Web Services, it can take up to five minutes after a policy is detached before
        it's ready to be deleted. Requires permission to access the DeletePolicy action.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: string
        '409':
          description: DeleteConflictException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteConflictException'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException; ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeletePolicyRequest'
      tags:
      - Policies
    get:
      operationId: GetPolicy
      summary: Get Policy
      description: Gets information about the specified policy with the policy document of the default version. Requires permission
        to access the GetPolicy action.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPolicyResponse'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException; ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetPolicyRequest'
      tags:
      - Policies
  /policies:
    get:
      operationId: ListPolicies
      summary: List Policies
      description: Lists your policies. Requires permission to access the ListPolicies action.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPoliciesResponse'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException; ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListPoliciesRequest'
      tags:
      - Policies
  /policies/{policyName}/version:
    post:
      operationId: CreatePolicyVersion
      summary: Create Policy Version
      description: Creates a new version of the specified IoT policy. To update a policy, create a new policy version. A managed
        policy can have up to five versions. If the policy has five versions, you must use DeletePolicyVersion to delete an
        existing version before you create a new one. Optionally, you can set the new version as the policy's default version.
        The default version is the operative version (that is, the version that is in effect for the certificates to which
        the policy is attached). Requires permission to access the CreatePolicyVersion action.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePolicyVersionResponse'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException; MalformedPolicyException; ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedException'
        '409':
          description: VersionsLimitExceededException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VersionsLimitExceededException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePolicyVersionRequest'
      tags:
      - Policies
    get:
      operationId: ListPolicyVersions
      summary: List Policy Versions
      description: Lists the versions of the specified policy and identifies the default version. Requires permission to access
        the ListPolicyVersions action.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPolicyVersionsResponse'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException; ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListPolicyVersionsRequest'
      tags:
      - Policies
  /policies/{policyName}/version/{policyVersionId}:
    delete:
      operationId: DeletePolicyVersion
      summary: Delete Policy Version
      description: Deletes the specified version of the specified policy. You cannot delete the default version of a policy
        using this action. To delete the default version of a policy, use DeletePolicy. To find out which version of a policy
        is marked as the default version, use ListPolicyVersions. Requires permission to access the DeletePolicyVersion action.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: string
        '409':
          description: DeleteConflictException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteConflictException'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException; ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeletePolicyVersionRequest'
      tags:
      - Policies
    get:
      operationId: GetPolicyVersion
      summary: Get Policy Version
      description: Gets information about the specified policy version. Requires permission to access the GetPolicyVersion
        action.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPolicyVersionResponse'
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException; ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetPolicyVersionRequest'
      tags:
      - Policies
    patch:
      operationId: SetDefaultPolicyVersion
      summary: Set Default Policy Version
      description: Sets the specified version of the specified policy as the policy's default (operative) version. This action
        affects all certificates to which the policy is attached. To list the principals the policy is attached to, use the
        ListPrincipalPolicies action. Requires permission to access the SetDefaultPolicyVersion action.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: string
        '500':
          description: InternalFailureException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalFailureException'
        '400':
          description: InvalidRequestException; ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
        '401':
          description: UnauthorizedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetDefaultPolicyVersionRequest'
      tags:
      - Policies
components:
  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: iot
  schemas:
    CreatePolicyRequest:
      type: object
      properties:
        policyName:
          type: string
          description: The policy name.
        policyDocument:
          type: string
          description: The JSON document that describes the policy. policyDocument must have a minimum length of 1, with a
            maximum length of 2048, excluding whitespace.
        tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
          description: 'Metadata which can be used to manage the policy. For URI Request parameters use format: ...key1=value1&key2=value2...
            For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." For the cli-input-json file
            use format: "tags": "key1=value1&key2=value2..."'
      required:
      - policyName
      - policyDocument
    CreatePolicyResponse:
      type: object
      properties:
        policyName:
          type: string
          description: The policy name.
        policyArn:
          type: string
          description: The policy ARN.
        policyDocument:
          type: string
          description: The JSON document that describes the policy.
        policyVersionId:
          type: string
          description: The policy version ID.
    CreatePolicyVersionRequest:
      type: object
      properties:
        policyName:
          type: string
          description: The policy name.
        policyDocument:
          type: string
          description: The JSON document that describes the policy. Minimum length of 1. Maximum length of 2048, excluding
            whitespace.
        setAsDefault:
          type: boolean
          description: Specifies whether the policy version is set as the default. When this parameter is true, the new policy
            version becomes the operative version (that is, the version that is in effect for the certificates to which the
            policy is attached).
      required:
      - policyName
      - policyDocument
    CreatePolicyVersionResponse:
      type: object
      properties:
        policyArn:
          type: string
          description: The policy ARN.
        policyDocument:
          type: string
          description: The JSON document that describes the policy.
        policyVersionId:
          type: string
          description: The policy version ID.
        isDefaultVersion:
          type: boolean
          description: Specifies whether the policy version is the default.
    DeleteConflictException:
      type: object
      properties:
        message:
          type: string
          description: The message for the exception.
    DeletePolicyRequest:
      type: object
      properties:
        policyName:
          type: string
          description: The name of the policy to delete.
      required:
      - policyName
    DeletePolicyVersionRequest:
      type: object
      properties:
        policyName:
          type: string
          description: The name of the policy.
        policyVersionId:
          type: string
          description: The policy version ID.
      required:
      - policyName
      - policyVersionId
    GetPolicyRequest:
      type: object
      properties:
        policyName:
          type: string
          description: The name of the policy.
      required:
      - policyName
    GetPolicyResponse:
      type: object
      properties:
        policyName:
          type: string
          description: The policy name.
        policyArn:
          type: string
          description: The policy ARN.
        policyDocument:
          type: string
          description: The JSON document that describes the policy.
        defaultVersionId:
          type: string
          description: The default policy version ID.
        creationDate:
          type: string
          format: date-time
          description: The date the policy was created.
        lastModifiedDate:
          type: string
          format: date-time
          description: The date the policy was last modified.
        generationId:
          type: string
          description: The generation ID of the policy.
    GetPolicyVersionRequest:
      type: object
      properties:
        policyName:
          type: string
          description: The name of the policy.
        policyVersionId:
          type: string
          description: The policy version ID.
      required:
      - policyName
      - policyVersionId
    GetPolicyVersionResponse:
      type: object
      properties:
        policyArn:
          type: string
          description: The policy ARN.
        policyName:
          type: string
          description: The policy name.
        policyDocument:
          type: string
          description: The JSON document that describes the policy.
        policyVersionId:
          type: string
          description: The policy version ID.
        isDefaultVersion:
          type: boolean
          description: Specifies whether the policy version is the default.
        creationDate:
          type: string
          format: date-time
          description: The date the policy was created.
        lastModifiedDate:
          type: string
          format: date-time
          description: The date the policy was last modified.
        generationId:
          type: string
          description: The generation ID of the policy version.
    InternalFailureException:
      type: object
      properties:
        message:
          type: string
          description: The message for the exception.
    InvalidRequestException:
      type: object
      properties:
        message:
          type: string
          description: The message for the exception.
    ListPoliciesRequest:
      type: object
      properties:
        marker:
          type: string
          description: The marker for the next set of results.
        pageSize:
          type: integer
          description: The result page size.
        ascendingOrder:
          type: boolean
          description: Specifies the order for results. If true, the results are returned in ascending creation order.
    ListPoliciesResponse:
      type: object
      properties:
        policies:
          type: array
          items:
            $ref: '#/components/schemas/Policy'
          description: The descriptions of the policies.
        nextMarker:
          type: string
          description: The marker for the next set of results, or null if there are no additional results.
    ListPolicyVersionsRequest:
      type: object
      properties:
        policyName:
          type: string
          description: The policy name.
      required:
      - policyName
    ListPolicyVersionsResponse:
      type: object
      properties:
        policyVersions:
          type: array
          items:
            $ref: '#/components/schemas/PolicyVersion'
          description: The policy versions.
    Policy:
      type: object
      properties:
        policyName:
          type: string
          description: The policy name.
        policyArn:
          type: string
          description: The policy ARN.
    PolicyVersion:
      type: object
      properties:
        versionId:
          type: string
          description: The policy version ID.
        isDefaultVersion:
          type: boolean
          description: Specifies whether the policy version is the default.
        createDate:
          type: string
          format: date-time
          description: The date and time the policy was created.
    ResourceAlreadyExistsException:
      type: object
      properties:
        message:
          type: string
          description: The message for the exception.
        resourceId:
          type: string
          description: The ID of the resource that caused the exception.
        resourceArn:
          type: string
          description: The ARN of the resource that caused the exception.
    ResourceNotFoundException:
      type: object
      properties:
        message:
          type: string
          description: The message for the exception.
    ServiceUnavailableException:
      type: object
      properties:
        message:
          type: string
          description: The message for the exception.
    SetDefaultPolicyVersionRequest:
      type: object
      properties:
        policyName:
          type: string
          description: The policy name.
        policyVersionId:
          type: string
          description: The policy version ID.
      required:
      - policyName
      - policyVersionId
    Tag:
      type: object
      properties:
        Key:
          type: string
          description: The tag's key.
        Value:
          type: string
          description: The tag's value.
      required:
      - Key
    UnauthorizedException:
      type: object
      properties:
        message:
          type: string
          description: The message for the exception.
    VersionsLimitExceededException:
      type: object
      properties:
        message:
          type: string
          description: The message for the exception.
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/iot/service/2015-05-28/iot-2015-05-28.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)