get_policy_generation¶
Operation¶
get_policy_generation
async
¶
get_policy_generation(input: GetPolicyGenerationInput, plugins: list[Plugin] | None = None) -> GetPolicyGenerationOutput
Retrieves information about a policy generation request within the AgentCore Policy system. Policy generation converts natural language descriptions into Cedar policy statements using AI-powered translation, enabling non-technical users to create policies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
GetPolicyGenerationInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
GetPolicyGenerationOutput
|
An instance of |
Input¶
GetPolicyGenerationInput
dataclass
¶
Dataclass for GetPolicyGenerationInput structure.
Attributes¶
policy_engine_id
class-attribute
instance-attribute
¶
policy_engine_id: str | None = None
The identifier of the policy engine associated with the policy generation request. This provides the context for the generation operation and schema validation.
policy_generation_id
class-attribute
instance-attribute
¶
policy_generation_id: str | None = None
The unique identifier of the policy generation request to be retrieved. This must be a valid generation ID from a previous StartPolicyGeneration call.
Output¶
GetPolicyGenerationOutput
dataclass
¶
Dataclass for GetPolicyGenerationOutput structure.
Attributes¶
created_at
instance-attribute
¶
created_at: datetime
The timestamp when the policy generation request was created. This is used for tracking and auditing generation operations and their lifecycle.
findings
class-attribute
instance-attribute
¶
findings: str | None = None
The findings and results from the policy generation process. This includes any issues, recommendations, validation results, or insights from the generated policies.
name
instance-attribute
¶
name: str
The customer-assigned name for the policy generation request. This helps identify and track generation operations across multiple requests.
policy_engine_id
instance-attribute
¶
policy_engine_id: str
The identifier of the policy engine associated with this policy generation. This confirms the policy engine context for the generation operation.
policy_generation_arn
instance-attribute
¶
policy_generation_arn: str
The Amazon Resource Name (ARN) of the policy generation. This globally unique identifier can be used for tracking, auditing, and cross-service references.
policy_generation_id
instance-attribute
¶
policy_generation_id: str
The unique identifier of the policy generation request. This matches the generation ID provided in the request and serves as the tracking identifier.
resource
instance-attribute
¶
resource: Resource
The resource information associated with the policy generation. This provides context about the target resources for which the policies are being generated.
status
instance-attribute
¶
status: PolicyGenerationStatus
The current status of the policy generation. This indicates whether the generation is in progress, completed successfully, or failed during processing.
status_reasons
instance-attribute
¶
status_reasons: list[str]
Additional information about the generation status. This provides details about any failures, warnings, or the current state of the generation process.
updated_at
instance-attribute
¶
updated_at: datetime
The timestamp when the policy generation was last updated. This tracks the progress of the generation process and any status changes.