Amazon CloudTrail Cloudtrail Resource Policy API

The Cloudtrail Resource Policy API from Amazon CloudTrail — 3 operation(s) for cloudtrail resource policy.

GitHub OpenAPI

Operations 3

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 /#DeleteResourcePolicy Delete a resource-based policy · Delete Resource Policy #
Ask an LLM
“Can I remove the resource-based policy from an event data store or channel?”
“What happens to cross-account access when I delete a resource policy?”
Tell an agent destructive · confirm first
Delete the resource policy on {ResourceArn}.
Remove the resource-based policy attached to {ResourceArn}.
POST /#GetResourcePolicy Get a resource-based policy · Get Resource Policy #
Ask an LLM
“Which accounts are allowed to access my CloudTrail Lake dashboard or channel?”
“Can I see the JSON policy document attached to an event data store?”
Tell an agent
Show the resource policy on {ResourceArn}.
Get the policy document attached to {ResourceArn}.
POST /#PutResourcePolicy Attach a resource-based policy · Put Resource Policy #
Ask an LLM
“How do I let another account ingest into my CloudTrail Lake channel?”
“Can I attach a permission policy to a dashboard?”
Tell an agent
Attach policy {ResourcePolicy} to {ResourceArn}.
Set the resource-based policy of {ResourceArn} to {ResourcePolicy}.

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-cloudtrail:amazon-cloudtrail-resource-policy-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-cloudtrail-resource-policy-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: AWS CloudTrail Resource Policy API
  version: '2013-11-01'
  description: Generated from AWS's published Smithy model for AWS CloudTrail. 3 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://cloudtrail.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /#DeleteResourcePolicy:
    post:
      operationId: DeleteResourcePolicy
      summary: Delete Resource Policy
      description: Deletes the resource-based policy attached to the CloudTrail event data store, dashboard, or channel.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/DeleteResourcePolicyResponse'
        '409':
          description: ConflictException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ConflictException'
        '400':
          description: OperationNotPermittedException; ResourceARNNotValidException; ResourceNotFoundException; ResourceTypeNotSupportedException;
            UnsupportedOperationException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/OperationNotPermittedException'
        '404':
          description: ResourcePolicyNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ResourcePolicyNotFoundException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - CloudTrail_20131101.DeleteResourcePolicy
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/DeleteResourcePolicyRequest'
      tags:
      - Resource Policy
  /#GetResourcePolicy:
    post:
      operationId: GetResourcePolicy
      summary: Get Resource Policy
      description: Retrieves the JSON text of the resource-based policy document attached to the CloudTrail event data store,
        dashboard, or channel.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/GetResourcePolicyResponse'
        '400':
          description: OperationNotPermittedException; ResourceARNNotValidException; ResourceNotFoundException; ResourceTypeNotSupportedException;
            UnsupportedOperationException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/OperationNotPermittedException'
        '404':
          description: ResourcePolicyNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ResourcePolicyNotFoundException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - CloudTrail_20131101.GetResourcePolicy
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/GetResourcePolicyRequest'
      tags:
      - Resource Policy
  /#PutResourcePolicy:
    post:
      operationId: PutResourcePolicy
      summary: Put Resource Policy
      description: Attaches a resource-based permission policy to a CloudTrail event data store, dashboard, or channel. For
        more information about resource-based policies, see CloudTrail resource-based policy examples in the CloudTrail User
        Guide.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/PutResourcePolicyResponse'
        '409':
          description: ConflictException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ConflictException'
        '400':
          description: OperationNotPermittedException; ResourceARNNotValidException; ResourceNotFoundException; ResourcePolicyNotValidException;
            ResourceTypeNotSupportedException; UnsupportedOperationException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/OperationNotPermittedException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - CloudTrail_20131101.PutResourcePolicy
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/PutResourcePolicyRequest'
      tags:
      - Resource Policy
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: cloudtrail
  schemas:
    ConflictException:
      type: object
      properties:
        Message:
          type: string
          description: Brief description of the exception returned by the request.
    DeleteResourcePolicyRequest:
      type: object
      properties:
        ResourceArn:
          type: string
          description: 'The Amazon Resource Name (ARN) of the CloudTrail event data store, dashboard, or channel you''re deleting
            the resource-based policy from. Example event data store ARN format: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
            Example dashboard ARN format: arn:aws:cloudtrail:us-east-1:123456789012:dashboard/exampleDash Example channel
            ARN format: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890'
      required:
      - ResourceArn
    DeleteResourcePolicyResponse:
      type: object
      properties: {}
    GetResourcePolicyRequest:
      type: object
      properties:
        ResourceArn:
          type: string
          description: 'The Amazon Resource Name (ARN) of the CloudTrail event data store, dashboard, or channel attached
            to the resource-based policy. Example event data store ARN format: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
            Example dashboard ARN format: arn:aws:cloudtrail:us-east-1:123456789012:dashboard/exampleDash Example channel
            ARN format: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890'
      required:
      - ResourceArn
    GetResourcePolicyResponse:
      type: object
      properties:
        ResourceArn:
          type: string
          description: 'The Amazon Resource Name (ARN) of the CloudTrail event data store, dashboard, or channel attached
            to resource-based policy. Example event data store ARN format: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
            Example dashboard ARN format: arn:aws:cloudtrail:us-east-1:123456789012:dashboard/exampleDash Example channel
            ARN format: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890'
        ResourcePolicy:
          type: string
          description: A JSON-formatted string that contains the resource-based policy attached to the CloudTrail event data
            store, dashboard, or channel.
        DelegatedAdminResourcePolicy:
          type: string
          description: The default resource-based policy that is automatically generated for the delegated administrator of
            an Organizations organization. This policy will be evaluated in tandem with any policy you submit for the resource.
            For more information about this policy, see Default resource policy for delegated administrators.
    OperationNotPermittedException:
      type: object
      properties:
        Message:
          type: string
          description: Brief description of the exception returned by the request.
    PutResourcePolicyRequest:
      type: object
      properties:
        ResourceArn:
          type: string
          description: 'The Amazon Resource Name (ARN) of the CloudTrail event data store, dashboard, or channel attached
            to the resource-based policy. Example event data store ARN format: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
            Example dashboard ARN format: arn:aws:cloudtrail:us-east-1:123456789012:dashboard/exampleDash Example channel
            ARN format: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890'
        ResourcePolicy:
          type: string
          description: A JSON-formatted string for an Amazon Web Services resource-based policy. For example resource-based
            policies, see CloudTrail resource-based policy examples in the CloudTrail User Guide.
      required:
      - ResourceArn
      - ResourcePolicy
    PutResourcePolicyResponse:
      type: object
      properties:
        ResourceArn:
          type: string
          description: 'The Amazon Resource Name (ARN) of the CloudTrail event data store, dashboard, or channel attached
            to the resource-based policy. Example event data store ARN format: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
            Example dashboard ARN format: arn:aws:cloudtrail:us-east-1:123456789012:dashboard/exampleDash Example channel
            ARN format: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890'
        ResourcePolicy:
          type: string
          description: The JSON-formatted string of the Amazon Web Services resource-based policy attached to the CloudTrail
            event data store, dashboard, or channel.
        DelegatedAdminResourcePolicy:
          type: string
          description: The default resource-based policy that is automatically generated for the delegated administrator of
            an Organizations organization. This policy will be evaluated in tandem with any policy you submit for the resource.
            For more information about this policy, see Default resource policy for delegated administrators.
    ResourcePolicyNotFoundException:
      type: object
      properties:
        Message:
          type: string
          description: Brief description of the exception returned by the request.
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/cloudtrail/service/2013-11-01/cloudtrail-2013-11-01.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)