Skip to main content

policy_generation_assets

Creates, updates, deletes, gets or lists a policy_generation_assets resource.

Overview

Namepolicy_generation_assets
TypeResource
Idaws.bedrock_agentcore_control.policy_generation_assets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
definitionobjectRepresents 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.
findingsarrayAnalysis 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_idstringThe 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_fragmentstringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
list_policy_generation_assetsselectpolicy_generation_id, policy_engine_id, regionnextToken, maxResultsRetrieves 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.

NameDatatypeDescription
policy_engine_idstringThe 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_idstringThe 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.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe 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.
nextTokenstringA 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

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 }}'
;