list_policies¶
Operation¶
list_policies
¶
list_policies(request: ListPoliciesInput | ListPoliciesInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ListPoliciesInputDict]) -> ListPoliciesOutput
Retrieves a list of policies within the AgentCore Policy engine. This operation supports pagination and filtering to help administrators manage and discover policies across policy engines. Results can be filtered by policy engine or resource associations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ListPoliciesInput | ListPoliciesInputDict | 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[ListPoliciesInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
ListPoliciesOutput
|
An instance of |
list_policies
async
¶
list_policies(request: ListPoliciesInput | ListPoliciesInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ListPoliciesInputDict]) -> ListPoliciesOutput
Retrieves a list of policies within the AgentCore Policy engine. This operation supports pagination and filtering to help administrators manage and discover policies across policy engines. Results can be filtered by policy engine or resource associations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
ListPoliciesInput | ListPoliciesInputDict | 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[ListPoliciesInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
ListPoliciesOutput
|
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.
ListPoliciesInputDict
¶
Bases: TypedDict
Dictionary form of ListPoliciesInput.
Attributes¶
max_results
instance-attribute
¶
max_results: int | None
The maximum number of policies to return in a single response. If not specified, the default is 10 policies per page, with a maximum of 100 per page.
next_token
instance-attribute
¶
next_token: str | None
A pagination token returned from a previous ListPolicies call. Use this token to retrieve the next page of results when the response is paginated.
policy_engine_id
instance-attribute
¶
The identifier of the policy engine whose policies to retrieve.
target_resource_scope
instance-attribute
¶
target_resource_scope: str | None
Optional filter to list policies that apply to a specific resource scope or resource type. This helps narrow down policy results to those relevant for particular Amazon Web Services resources, agent tools, or operational contexts within the policy engine ecosystem.
ListPoliciesInput
dataclass
¶
Bases: _SerdeShape
Dataclass for ListPoliciesInput structure.
Attributes¶
max_results
class-attribute
instance-attribute
¶
max_results: int | None = ...
The maximum number of policies to return in a single response. If not specified, the default is 10 policies per page, with a maximum of 100 per page.
next_token
class-attribute
instance-attribute
¶
next_token: str | None = ...
A pagination token returned from a previous ListPolicies call. Use this token to retrieve the next page of results when the response is paginated.
policy_engine_id
class-attribute
instance-attribute
¶
policy_engine_id: str | None = ...
The identifier of the policy engine whose policies to retrieve.
target_resource_scope
class-attribute
instance-attribute
¶
target_resource_scope: str | None = ...
Optional filter to list policies that apply to a specific resource scope or resource type. This helps narrow down policy results to those relevant for particular Amazon Web Services resources, agent tools, or operational contexts within the policy engine ecosystem.
Output¶
ListPoliciesOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for ListPoliciesOutput structure.
Attributes¶
next_token
class-attribute
instance-attribute
¶
next_token: str | None = ...
A pagination token that can be used in subsequent ListPolicies calls to retrieve additional results. This token is only present when there are more results available.
policies
instance-attribute
¶
An array of policy objects that match the specified criteria. Each policy object contains the policy metadata, status, and key identifiers for further operations.
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.