---
title: "POST /policy-engines/{policyEngineId}/policies"
method: POST
path: "/policy-engines/{policyEngineId}/policies"
---

# POST /policy-engines/{policyEngineId}/policies

`POST /policy-engines/{policyEngineId}/policies`

Creates a policy within the AgentCore Policy system. Policies provide real-time, deterministic control over agentic interactions with AgentCore Gateway. Using the Cedar policy language, you can define fine-grained policies that specify which interactions with Gateway tools are permitted based on input parameters and OAuth claims, ensuring agents operate within defined boundaries and business rules. The policy is validated during creation against the Cedar schema generated from the Gateway's tools' input schemas, which defines the available tools, their parameters, and expected data types. This is an asynchronous operation. Use the <a href="https://docs.aws.amazon.com/bedrock-agentcore-control/latest/APIReference/API_GetPolicy.html">GetPolicy</a> operation to poll the <code>status</code> field to track completion.

## Path parameters

- `policyEngineId` string, required

## Request body

- object
  - `name` string, required — The customer-assigned immutable name for the policy. Must be unique within the account. This name is used for policy identification and cannot be changed after creation.
  - `definition` object, required — Represents the definition structure for policies within the AgentCore Policy system. This structure encapsulates different policy formats and languages that can be used to define access control rules.
    - `cedar` object — The Cedar policy definition within the policy definition structure. This contains the Cedar policy statement that defines the authorization logic using Cedar's human-readable, analyzable policy language. Cedar policies specify principals (who can access), actions (what operations are allowed), resources (what can be accessed), and optional conditions for fine-grained control. Cedar provides a formal policy language designed for authorization with deterministic evaluation, making policies testable, reviewable, and auditable. All Cedar policies follow a default-deny model where actions are denied unless explicitly permitted, and forbid policies always override permit policies.
      - `statement` string, required — The Cedar policy statement that defines the authorization logic. This statement follows Cedar syntax and specifies principals, actions, resources, and conditions that determine when access should be allowed or denied.
    - `policyGeneration` object — The generated policy asset information within the policy definition structure. This contains information identifying a generated policy asset from the AI-powered policy generation process within the AgentCore Policy system. Each asset contains a Cedar policy statement generated from natural language input, along with associated metadata and analysis findings to help users evaluate and select the most appropriate policy option.
      - `policyGenerationId` string, required — The unique identifier for this policy generation request.
      - `policyGenerationAssetId` string, required — The unique identifier for this generated policy asset within the policy generation request.
    - `policy` object — An AgentCore policy statement that defines the access control rules. The statement can be a Cedar policy or a guardrails definition.
      - `statement` string, required — The body of the AgentCore policy statement. Contains the policy logic, which can be a Cedar policy or a guardrails definition.
  - `description` string, password — A human-readable description of the policy's purpose and functionality (1-4,096 characters). This helps policy administrators understand the policy's intent, business rules, and operational scope. Use this field to document why the policy exists, what business requirement it addresses, and any special considerations for maintenance. Clear descriptions are essential for policy governance, auditing, and troubleshooting.
  - `validationMode` 'FAIL_ON_ANY_FINDINGS' | 'IGNORE_ALL_FINDINGS' — The validation mode for the policy creation. Determines how Cedar analyzer validation results are handled during policy creation. FAIL_ON_ANY_FINDINGS (default) runs the Cedar analyzer to validate the policy against the Cedar schema and tool context, failing creation if the analyzer detects any validation issues to ensure strict conformance. IGNORE_ALL_FINDINGS runs the Cedar analyzer but allows policy creation even if validation issues are detected, useful for testing or when the policy schema is evolving. Use FAIL_ON_ANY_FINDINGS for production policies to ensure correctness, and IGNORE_ALL_FINDINGS only when you understand and accept the analyzer findings.
  - `enforcementMode` 'ACTIVE' | 'LOG_ONLY' — The enforcement mode for a policy. Run this policy in <code>LOG_ONLY</code> mode to collect data on how it affects your application. Once you are satisfied with the data gathered, switch the policy to <code>ACTIVE</code>.
  - `clientToken` string — A unique, case-sensitive identifier to ensure the idempotency of the request. The AWS SDK automatically generates this token, so you don't need to provide it in most cases. If you retry a request with the same client token, the service returns the same response without creating a duplicate policy.

## Response `202`

Success

- CreatePolicyResponse
  - `policyId` string, required — The unique identifier for the created policy. This is a system-generated identifier consisting of the user name plus a 10-character generated suffix, used for all subsequent policy operations.
  - `name` string, required — The customer-assigned name of the created policy. This matches the name provided in the request and serves as the human-readable identifier for the policy.
  - `policyEngineId` string, required — The identifier of the policy engine that manages this policy. This confirms the policy engine assignment and is used for policy evaluation routing.
  - `createdAt` string, date-time, required — The timestamp when the policy was created. This is automatically set by the service and used for auditing and lifecycle management.
  - `updatedAt` string, date-time, required — The timestamp when the policy was last updated. For newly created policies, this matches the createdAt timestamp.
  - `policyArn` string, required — The Amazon Resource Name (ARN) of the created policy. This globally unique identifier can be used for cross-service references and IAM policy statements.
  - `status` 'CREATING' | 'ACTIVE' | 'UPDATING' | 'DELETING' | 'CREATE_FAILED' | 'UPDATE_FAILED' | 'DELETE_FAILED', required — The current status of the policy. A status of <code>ACTIVE</code> indicates the policy is ready for use.
  - `enforcementMode` 'ACTIVE' | 'LOG_ONLY' — The enforcement mode of the created policy.
  - `definition` object, required — The Cedar policy statement that was created. This is the validated policy definition that will be used for agent behavior control and access decisions.
    - `cedar` object — The Cedar policy definition within the policy definition structure. This contains the Cedar policy statement that defines the authorization logic using Cedar's human-readable, analyzable policy language. Cedar policies specify principals (who can access), actions (what operations are allowed), resources (what can be accessed), and optional conditions for fine-grained control. Cedar provides a formal policy language designed for authorization with deterministic evaluation, making policies testable, reviewable, and auditable. All Cedar policies follow a default-deny model where actions are denied unless explicitly permitted, and forbid policies always override permit policies.
      - `statement` string, required — The Cedar policy statement that defines the authorization logic. This statement follows Cedar syntax and specifies principals, actions, resources, and conditions that determine when access should be allowed or denied.
    - `policyGeneration` object — The generated policy asset information within the policy definition structure. This contains information identifying a generated policy asset from the AI-powered policy generation process within the AgentCore Policy system. Each asset contains a Cedar policy statement generated from natural language input, along with associated metadata and analysis findings to help users evaluate and select the most appropriate policy option.
      - `policyGenerationId` string, required — The unique identifier for this policy generation request.
      - `policyGenerationAssetId` string, required — The unique identifier for this generated policy asset within the policy generation request.
    - `policy` object — An AgentCore policy statement that defines the access control rules. The statement can be a Cedar policy or a guardrails definition.
      - `statement` string, required — The body of the AgentCore policy statement. Contains the policy logic, which can be a Cedar policy or a guardrails definition.
  - `description` string, password — The human-readable description of the policy's purpose and functionality. This helps administrators understand and manage the policy.
  - `statusReasons` String[], required — Additional information about the policy status. This provides details about any failures or the current state of the policy creation process.

## Other responses

- `480` — ServiceQuotaExceededException
- `481` — AccessDeniedException
- `482` — ValidationException
- `483` — ConflictException
- `484` — ThrottlingException
- `485` — ResourceNotFoundException
- `486` — InternalServerException

---

[API](https://skmtc.net/aws/apis/bedrock-agentcore-control.md) · [All operations](https://skmtc.net/aws/apis/bedrock-agentcore-control/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/bedrock-agentcore-control/revisions/0ebde766792b/schema)
