Amazon IoT Core Policies API

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

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).
Business capability
Identity & Access Management BC-620.20

Operations 9

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /policies/{policyName} Create an IoT policy · Create Policy #
Ask an LLM
“How do I create a new IoT policy with a JSON document?”
“Can I attach tags when creating a policy?”
Tell an agent
Create IoT policy {policyName} with document {policyDocument}.
Create policy {policyName} with document {policyDocument} and tags {tags}.
DELETE /policies/{policyName} Delete an IoT policy · Delete Policy #
Ask an LLM
“How do I delete an IoT policy?”
“Why can't I delete a policy that still has non-default versions or attached certificates?”
Tell an agent destructive · confirm first
Delete IoT policy {policyName}.
Remove the policy {policyName} from my account.
GET /policies/{policyName} Get an IoT policy and its default version · Get Policy #
Ask an LLM
“What does a given IoT policy allow, and which version is its default?”
“Can I fetch a policy's document by name?”
Tell an agent
Show policy {policyName}.
Get the default version of IoT policy {policyName}.
GET /policies List IoT policies · List Policies #
Ask an LLM
“Which IoT policies exist in my account?”
“Can I list policies in ascending order?”
Tell an agent
List my IoT policies.
List policies in ascending order {isAscendingOrder}.
POST /policies/{policyName}/version Create a new version of an IoT policy · Create Policy Version #
Ask an LLM
“How do I add a new version to an existing IoT policy?”
“Can I make a new policy version the default?”
Tell an agent
Create a new version of policy {policyName} with document {policyDocument}.
Add version {policyDocument} to policy {policyName} and set it as default: {setAsDefault}.
GET /policies/{policyName}/version List versions of an IoT policy · List Policy Versions #
Ask an LLM
“What versions exist for a given IoT policy?”
“Which version of a policy is the default?”
Tell an agent
List versions of policy {policyName}.
Show which version of IoT policy {policyName} is default.
DELETE /policies/{policyName}/version/{policyVersionId} Delete a non-default IoT policy version · Delete Policy Version #
Ask an LLM
“How do I delete an old version of an IoT policy?”
“Can I delete the default version of a policy with this call?”
Tell an agent destructive · confirm first
Delete version {policyVersionId} of policy {policyName}.
Remove non-default policy version {policyVersionId} from {policyName}.
GET /policies/{policyName}/version/{policyVersionId} Get one version of an IoT policy · Get Policy Version #
Ask an LLM
“What does a specific version of an IoT policy look like?”
“Can I fetch a single policy version by its ID?”
Tell an agent
Get version {policyVersionId} of policy {policyName}.
Show the document of policy version {policyVersionId} for {policyName}.
PATCH /policies/{policyName}/version/{policyVersionId} Make a policy version the default · Set Default Policy Version #
Ask an LLM
“How do I make a new policy version the operative one?”
“Does changing the default policy version affect certificates already attached to it?”
Tell an agent
Set version {policyVersionId} of policy {policyName} as the default.
Make policy {policyName} default version {policyVersionId}.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. 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'
      parameters:
      - name: policyName
        in: path
        required: true
        schema:
          type: string
        description: The policy name.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                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:
              - policyDocument
      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'
      parameters:
      - name: policyName
        in: path
        required: true
        schema:
          type: string
        description: The name of the policy to delete.
      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'
      parameters:
      - name: policyName
        in: path
        required: true
        schema:
          type: string
        description: The name of the policy.
      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'
      parameters:
      - name: marker
        in: query
        schema:
          type: string
        description: The marker for the next set of results.
      - name: pageSize
        in: query
        schema:
          type: integer
        description: The result page size.
      - name: isAscendingOrder
        in: query
        schema:
          type: boolean
        description: Specifies the order for results. If true, the results are returned in ascending creation order.
      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'
      parameters:
      - name: policyName
        in: path
        required: true
        schema:
          type: string
        description: The policy name.
      - name: setAsDefault
        in: query
        schema:
          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).
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                policyDocument:
                  type: string
                  description: The JSON document that describes the policy. Minimum length of 1. Maximum length of 2048, excluding
                    whitespace.
              required:
              - policyDocument
      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'
      parameters:
      - name: policyName
        in: path
        required: true
        schema:
          type: string
        description: The policy name.
      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'
      parameters:
      - name: policyName
        in: path
        required: true
        schema:
          type: string
        description: The name of the policy.
      - name: policyVersionId
        in: path
        required: true
        schema:
          type: string
        description: The policy version ID.
      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'
      parameters:
      - name: policyName
        in: path
        required: true
        schema:
          type: string
        description: The name of the policy.
      - name: policyVersionId
        in: path
        required: true
        schema:
          type: string
        description: The policy version ID.
      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'
      parameters:
      - name: policyName
        in: path
        required: true
        schema:
          type: string
        description: The policy name.
      - name: policyVersionId
        in: path
        required: true
        schema:
          type: string
        description: The policy version ID.
      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:
    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.
    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.
    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.
    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.
    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.
    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.
    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)