PolicyGeneration¶
Structure Class¶
PolicyGeneration
dataclass
¶
Represents a policy generation request within the AgentCore Policy system. Tracks the AI-powered conversion of natural language descriptions into Cedar policy statements, enabling users to author policies by describing authorization requirements in plain English. The generation process analyzes the natural language input along with the Gateway's tool context and Cedar schema to produce one or more validated policy options. Each generation request tracks the status of the conversion process and maintains findings about the generated policies, including validation results and potential issues. Generated policy assets remain available for one week after successful generation, allowing time to review and create policies from the generated options.
Attributes¶
created_at
instance-attribute
¶
created_at: datetime
The timestamp when this policy generation request was created.
findings
class-attribute
instance-attribute
¶
findings: str | None = None
Findings and insights from this policy generation process.
policy_engine_id
instance-attribute
¶
policy_engine_id: str
The identifier of the policy engine associated with this generation request.
policy_generation_arn
instance-attribute
¶
policy_generation_arn: str
The ARN of this policy generation request.
policy_generation_id
instance-attribute
¶
policy_generation_id: str
The unique identifier for this policy generation request.
resource
instance-attribute
¶
resource: Resource
The resource information associated with this policy generation.
status
instance-attribute
¶
status: PolicyGenerationStatus
The current status of this policy generation request.
status_reasons
instance-attribute
¶
status_reasons: list[str]
Additional information about the generation status.
updated_at
instance-attribute
¶
updated_at: datetime
The timestamp when this policy generation was last updated.