v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-141531,219979.8 KB

Initiates the AI-powered generation of Cedar policies from natural language descriptions within the AgentCore Policy system. This feature enables both technical and non-technical users to create policies by describing their authorization requirements in plain English, which is then automatically translated into formal Cedar policy statements. The generation process analyzes the natural language input along with the Gateway's tool context to produce validated policy options. Generated policy assets are automatically deleted after 7 days, so you should review and create policies from the generated assets within this timeframe. Once created, policies are permanent and not subject to this expiration. Generated policies should be reviewed and tested in log-only mode before deploying to production. Use this when you want to describe policy intent naturally rather than learning Cedar syntax, though generated policies may require refinement for complex scenarios.

post/policy-engines/{policyEngineId}/policy-generations

Path parameters

policyEngineIdstring required

The identifier of the policy engine that provides the context for policy generation. This engine's schema and tool context are used to ensure generated policies are valid and applicable.

Request body

namestring required

A customer-assigned name for the policy generation request. This helps track and identify generation operations, especially when running multiple generations simultaneously.

clientTokenstring

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 starting a duplicate generation.

Response

Success

policyEngineIdstring required

The identifier of the policy engine associated with the started policy generation.

policyGenerationIdstring required

The unique identifier assigned to the policy generation request for tracking progress.

namestring required

The customer-assigned name for the policy generation request.

policyGenerationArnstring required

The ARN of the created policy generation request.

createdAtstring date-time required

The timestamp when the policy generation request was created.

updatedAtstring date-time required

The timestamp when the policy generation was last updated.

status'GENERATING' | 'GENERATED' | 'GENERATE_FAILED' | 'DELETE_FAILED' required

The initial status of the policy generation request.

findingsstring

Initial findings from the policy generation process.

statusReasonsString[] required

Additional information about the generation status.