get_policy¶
Operation¶
get_policy
¶
get_policy(request: GetPolicyInput | GetPolicyInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetPolicyInputDict]) -> GetPolicyOutput
Retrieves detailed information about a specific policy within the AgentCore Policy system. This operation returns the complete policy definition, metadata, and current status, allowing administrators to review and manage policy configurations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
GetPolicyInput | GetPolicyInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[GetPolicyInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
GetPolicyOutput
|
An instance of |
get_policy
async
¶
get_policy(request: GetPolicyInput | GetPolicyInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetPolicyInputDict]) -> GetPolicyOutput
Retrieves detailed information about a specific policy within the AgentCore Policy system. This operation returns the complete policy definition, metadata, and current status, allowing administrators to review and manage policy configurations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
GetPolicyInput | GetPolicyInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[GetPolicyInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
GetPolicyOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
Output¶
GetPolicyOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for GetPolicyOutput structure.
Attributes¶
created_at
instance-attribute
¶
created_at: datetime
The timestamp when the policy was originally created.
definition
instance-attribute
¶
definition: PolicyDefinition
The Cedar or Dogwood policy statement that defines the access control rules. This contains the actual policy logic used for agent behavior control and access decisions.
description
class-attribute
instance-attribute
¶
description: str | None = ...
The human-readable description of the policy's purpose and functionality. This helps administrators understand and manage the policy.
enforcement_mode
class-attribute
instance-attribute
¶
enforcement_mode: str = ...
The current enforcement mode of the policy.
name
instance-attribute
¶
name: str
The customer-assigned name of the policy. This is the human-readable identifier that was specified when the policy was created.
policy_arn
instance-attribute
¶
policy_arn: str
The Amazon Resource Name (ARN) of the policy. This globally unique identifier can be used for cross-service references and IAM policy statements.
policy_engine_id
instance-attribute
¶
policy_engine_id: str
The identifier of the policy engine that manages this policy. This confirms the policy engine context for the retrieved policy.
policy_id
instance-attribute
¶
policy_id: str
The unique identifier of the retrieved policy. This matches the policy ID provided in the request and serves as the system identifier for the policy.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.
status_reasons
instance-attribute
¶
Additional information about the policy status. This provides details about any failures or the current state of the policy.