Amazon Bedrock Bedrock Resource Policy API

The Bedrock Resource Policy API from Amazon Bedrock — 2 operation(s) for bedrock resource policy.

GitHub OpenAPI

Operations 6

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

DELETE /resource-policy/{resourceArn} Delete a model or agent resource policy · Delete Resource Policy #
Ask an LLM
“How do I remove the resource policy from a Bedrock model or agent?”
“Can I revoke cross-account access by deleting a model's resource policy?”
Tell an agent destructive · confirm first
Delete the resource policy on Bedrock resource {resourceArn}.
Remove the policy document from model or agent {resourceArn}.
GET /resource-policy/{resourceArn} Get a model or agent resource policy · Get Resource Policy #
Ask an LLM
“What resource policy is attached to a Bedrock model or agent?”
“Can I read the policy document for a Bedrock resource by its ARN?”
Tell an agent
Get the resource policy for Bedrock resource {resourceArn}.
Show the policy document attached to model or agent {resourceArn}.
POST /resource-policy Add a resource policy to a model or agent · Put Resource Policy #
Ask an LLM
“How do I attach a resource policy to a Bedrock model or agent?”
“Can I set a policy document on a model by its ARN?”
Tell an agent
Add resource policy {resourcePolicy} to Bedrock resource {resourceArn}.
Attach policy {resourcePolicy} to model or agent {resourceArn}.
DELETE /resourcepolicy/{resourceArn} Remove a knowledge base resource policy · Delete Resource Policy #
Ask an LLM
“How do I revoke cross-account access to a knowledge base?”
“Can I delete a knowledge base's resource policy by its ARN?”
Tell an agent destructive · confirm first
Delete the resource policy from knowledge base {resourceArn}.
Remove knowledge base {resourceArn}'s policy if revision {expectedRevisionId} is current.
GET /resourcepolicy/{resourceArn} Get a knowledge base resource policy · Get Resource Policy #
Ask an LLM
“What resource policy is attached to a Bedrock knowledge base?”
“Can I read a knowledge base's policy document by its ARN?”
Tell an agent
Get the resource policy for knowledge base {resourceArn}.
Show the policy document attached to knowledge base {resourceArn}.
PUT /resourcepolicy/{resourceArn} Attach a resource policy to a knowledge base · Put Resource Policy #
Ask an LLM
“How do I allow other AWS accounts to access a knowledge base?”
“Can I attach a JSON policy to a knowledge base by its ARN?”
Tell an agent
Attach resource policy {policy} to knowledge base {resourceArn}.
Set policy {policy} on knowledge base {resourceArn} if revision {expectedRevisionId} is current.

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-bedrock:amazon-bedrock-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-bedrock-resource-policy-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Bedrock Resource Policy API
  version: '2023-04-20'
  description: Generated from AWS's published Smithy model for Amazon Bedrock. 6 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://bedrock.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /resource-policy/{resourceArn}:
    delete:
      operationId: DeleteResourcePolicy
      summary: Delete Resource Policy
      description: Deletes a previously created Bedrock resource policy.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteResourcePolicyResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationException'
      parameters:
      - name: resourceArn
        in: path
        required: true
        schema:
          type: string
        description: The ARN of the Bedrock resource to which this resource policy applies.
      tags:
      - Resource Policy
    get:
      operationId: GetResourcePolicy
      summary: Get Resource Policy
      description: Gets the resource policy document for a Bedrock resource
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetResourcePolicyResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationException'
      parameters:
      - name: resourceArn
        in: path
        required: true
        schema:
          type: string
        description: The ARN of the Bedrock resource to which this resource policy applies.
      tags:
      - Resource Policy
  /resource-policy:
    post:
      operationId: PutResourcePolicy
      summary: Put Resource Policy
      description: Adds a resource policy for a Bedrock resource.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PutResourcePolicyResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '400':
          description: ConflictException; ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                resourceArn:
                  type: string
                  description: The ARN of the Bedrock resource to which this resource policy applies.
                resourcePolicy:
                  type: string
                  description: The JSON string representing the Bedrock resource policy.
              required:
              - resourceArn
              - resourcePolicy
      tags:
      - Resource Policy
  /resourcepolicy/{resourceArn}:
    delete:
      operationId: DeleteResourcePolicy
      summary: Delete Resource Policy
      description: Removes the resource policy associated with a knowledge base. After deletion, other AWS accounts can no
        longer access the knowledge base using cross-account permissions.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BedrockAgentDeleteResourcePolicyResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '409':
          description: ConflictException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BedrockAgentValidationException'
      parameters:
      - name: resourceArn
        in: path
        required: true
        schema:
          type: string
        description: The Amazon Resource Name (ARN) of the knowledge base to remove the resource policy from.
      - name: expectedRevisionId
        in: query
        schema:
          type: string
        description: The expected revision identifier of the resource policy. Use this to prevent conflicts when multiple
          users update the same policy concurrently.
      tags:
      - Resource Policy
      servers:
      - url: https://bedrock-agent.{region}.amazonaws.com
        variables:
          region:
            default: us-east-1
    get:
      operationId: GetResourcePolicy
      summary: Get Resource Policy
      description: Retrieves the resource policy associated with a knowledge base.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BedrockAgentGetResourcePolicyResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BedrockAgentValidationException'
      parameters:
      - name: resourceArn
        in: path
        required: true
        schema:
          type: string
        description: The Amazon Resource Name (ARN) of the knowledge base to retrieve the resource policy for.
      tags:
      - Resource Policy
      servers:
      - url: https://bedrock-agent.{region}.amazonaws.com
        variables:
          region:
            default: us-east-1
    put:
      operationId: PutResourcePolicy
      summary: Put Resource Policy
      description: Associates a resource policy with a knowledge base. A resource policy allows other AWS accounts to access
        the knowledge base. For more information, see Cross-account access for knowledge bases.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BedrockAgentPutResourcePolicyResponse'
        '403':
          description: AccessDeniedException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '409':
          description: ConflictException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictException'
        '500':
          description: InternalServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerException'
        '404':
          description: ResourceNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundException'
        '429':
          description: ThrottlingException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThrottlingException'
        '400':
          description: ValidationException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BedrockAgentValidationException'
      parameters:
      - name: resourceArn
        in: path
        required: true
        schema:
          type: string
        description: The Amazon Resource Name (ARN) of the knowledge base to attach the resource policy to.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                policy:
                  type: string
                  description: The JSON-formatted resource policy to associate with the knowledge base.
                expectedRevisionId:
                  type: string
                  description: The expected revision identifier of the resource policy. Use this to prevent conflicts when
                    multiple users update the same policy concurrently. Specify the revisionId from the most recent GetResourcePolicy
                    or PutResourcePolicy response.
              required:
              - policy
      tags:
      - Resource Policy
      servers:
      - url: https://bedrock-agent.{region}.amazonaws.com
        variables:
          region:
            default: us-east-1
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: bedrock
  schemas:
    AccessDeniedException:
      type: object
      properties:
        message:
          type: string
    BedrockAgentDeleteResourcePolicyResponse:
      type: object
      properties:
        resourceArn:
          type: string
          description: The ARN of the knowledge base that the resource policy was removed from.
        revisionId:
          type: string
          description: The revision identifier after the resource policy was deleted.
      required:
      - resourceArn
    BedrockAgentGetResourcePolicyResponse:
      type: object
      properties:
        resourceArn:
          type: string
          description: The ARN of the knowledge base that the resource policy is associated with.
        policy:
          type: string
          description: The JSON-formatted resource policy associated with the knowledge base.
        revisionId:
          type: string
          description: The revision identifier of the resource policy.
      required:
      - resourceArn
      - policy
      - revisionId
    BedrockAgentPutResourcePolicyResponse:
      type: object
      properties:
        resourceArn:
          type: string
          description: The ARN of the knowledge base that the resource policy was attached to.
        revisionId:
          type: string
          description: The revision identifier of the resource policy. Use this value in the expectedRevisionId field of a
            subsequent PutResourcePolicy or DeleteResourcePolicy request.
      required:
      - resourceArn
      - revisionId
    BedrockAgentValidationException:
      type: object
      properties:
        message:
          type: string
        fieldList:
          type: array
          items:
            $ref: '#/components/schemas/ValidationExceptionField'
          description: A list of objects containing fields that caused validation errors and their corresponding validation
            error messages.
    ConflictException:
      type: object
      properties:
        message:
          type: string
    DeleteResourcePolicyResponse:
      type: object
      properties: {}
    GetResourcePolicyResponse:
      type: object
      properties:
        resourcePolicy:
          type: string
          description: The JSON string representing the Bedrock resource policy.
    InternalServerException:
      type: object
      properties:
        message:
          type: string
    PutResourcePolicyResponse:
      type: object
      properties:
        resourceArn:
          type: string
          description: The ARN of the Bedrock resource to which this resource policy applies.
    ResourceNotFoundException:
      type: object
      properties:
        message:
          type: string
    ThrottlingException:
      type: object
      properties:
        message:
          type: string
    ValidationException:
      type: object
      properties:
        message:
          type: string
    ValidationExceptionField:
      type: object
      properties:
        name:
          type: string
          description: The name of the field.
        message:
          type: string
          description: A message describing why this field failed validation.
      required:
      - name
      - message
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/bedrock/service/2023-04-20/bedrock-2023-04-20.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)
  sources:
  - https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/bedrock/service/2023-04-20/bedrock-2023-04-20.json
  - https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/bedrock-agent/service/2023-06-05/bedrock-agent-2023-06-05.json