policy_generation_assets
Creates, updates, deletes, gets or lists a policy_generation_assets resource.
Overview
| Name | policy_generation_assets |
| Type | Resource |
| Id | aws.bedrock_agentcore_control.policy_generation_assets |
Fields
The following fields are returned by SELECT queries:
- list_policy_generation_assets
| Name | Datatype | Description |
|---|---|---|
definition | object | 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. |
findings | array | Analysis findings and insights related to this specific generated policy asset. These findings may include validation results, potential issues, or recommendations for improvement to help users evaluate the quality and appropriateness of the generated policy. |
policy_generation_asset_id | string | The unique identifier for this generated policy asset within the policy generation request. This ID can be used to reference specific generated policy options when creating actual policies from the generation results. (pattern: <code>[A-Za-z][A-Za-z0-9_]*-[a-z0-9_]{10}</code>) |
raw_text_fragment | string | The portion of the original natural language input that this generated policy asset addresses. This helps users understand which part of their policy description was translated into this specific Cedar policy statement, enabling better policy selection and refinement. When a single natural language input describes multiple authorization requirements, the generation process creates separate policy assets for each requirement, with each asset's rawTextFragment showing which requirement it addresses. Use this mapping to verify that all parts of your natural language input were correctly translated into Cedar policies. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_policy_generation_assets | select | policy_generation_id, policy_engine_id, region | nextToken, maxResults | Retrieves a list of generated policy assets from a policy generation request within the AgentCore Policy system. This operation returns the actual Cedar policies and related artifacts produced by the AI-powered policy generation process, allowing users to review and select from multiple generated policy options. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
policy_engine_id | string | The unique identifier of the policy engine associated with the policy generation request. This provides the context for the generation operation and ensures assets are retrieved from the correct policy engine. |
policy_generation_id | string | The unique identifier of the policy generation request whose assets are to be retrieved. This must be a valid generation ID from a previous StartPolicyGeneration call that has completed processing. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of policy generation assets to return in a single response. If not specified, the default is 10 assets per page, with a maximum of 100 per page. This helps control response size when dealing with policy generations that produce many alternative policy options. |
nextToken | string | A pagination token returned from a previous ListPolicyGenerationAssets call. Use this token to retrieve the next page of assets when the response is paginated due to large numbers of generated policy options. |
SELECT examples
- list_policy_generation_assets
Retrieves a list of generated policy assets from a policy generation request within the AgentCore Policy system. This operation returns the actual Cedar policies and related artifacts produced by the AI-powered policy generation process, allowing users to review and select from multiple generated policy options.
SELECT
definition,
findings,
policy_generation_asset_id,
raw_text_fragment
FROM aws.bedrock_agentcore_control.policy_generation_assets
WHERE policy_generation_id = '{{ policy_generation_id }}' -- required
AND policy_engine_id = '{{ policy_engine_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;