Returns a paginated list of all policy store aliases in the calling Amazon Web Services account.
Parameters:
-
next_token
(Optional[NextToken], default:
None
)
–
Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.
-
max_results
(Optional[MaxResults], default:
None
)
–
Specifies the total number of results that you want included in each response. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next set of results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.
If you do not specify this parameter, the operation defaults to 5 policy store aliases per response. You can specify a maximum of 50 policy store aliases per response.
-
filter
(Optional[PolicyStoreAliasFilter], default:
None
)
–
Specifies a filter to narrow the results. You can filter by policyStoreId to list only the policy store aliases associated with a specific policy store.
Raises:
-
AccessDeniedException
–
You don't have sufficient access to perform this action.
-
InternalServerException
–
The request failed because of an internal error. Try your request again later
-
ThrottlingException
–
The request failed because it exceeded a throttling quota.
-
ValidationException
–
The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.
The possible reasons include the following:
-
UnrecognizedEntityType
The policy includes an entity type that isn't found in the schema.
-
UnrecognizedActionId
The policy includes an action id that isn't found in the schema.
-
InvalidActionApplication
The policy includes an action that, according to the schema, doesn't support the specified principal and resource.
-
UnexpectedType
The policy included an operand that isn't a valid type for the specified operation.
-
IncompatibleTypes
The types of elements included in a set, or the types of expressions used in an if...then...else clause aren't compatible in this context.
-
MissingAttribute
The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.
-
UnsafeOptionalAttributeAccess
The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the has (presence of attribute test) operator in the Cedar Policy Language Guide.
-
ImpossiblePolicy
Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.
-
WrongNumberArguments
The policy references an extension type with the wrong number of arguments.
-
FunctionArgumentValidationError
Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
ListPolicyStoreAliases - Example 1
The following example lists all policy store aliases in the AWS account in the AWS Region in which you call the operation.
>>> client.list_policy_store_aliases()
ListPolicyStoreAliases - Example 2
The following example lists all policy store aliases associated with the policy store with ID C7v5xMplfFH3i3e4Jrzb1a
>>> client.list_policy_store_aliases(filter={'policyStoreId': 'C7v5xMplfFH3i3e4Jrzb1a'})
Source code in docs_src/capo_verifiedpermissions/_services/verified_permissions.py
| def list_policy_store_aliases(
self,
*,
config_overrides: Optional[VerifiedPermissionsClientConfig] = None,
next_token: Optional[
"capo_verifiedpermissions.types.next_token.NextToken"
] = None,
max_results: Optional[
"capo_verifiedpermissions.types.max_results.MaxResults"
] = None,
filter: Optional[
"capo_verifiedpermissions.types.policy_store_alias_filter.PolicyStoreAliasFilter"
] = None,
) -> "capo_verifiedpermissions.types.list_policy_store_aliases_output.ListPolicyStoreAliasesOutput":
"""<p>Returns a paginated list of all policy store aliases in the calling Amazon Web Services account.</p>
Args:
next_token: <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
max_results: <p>Specifies the total number of results that you want included in each response. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next set of results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p> <p>If you do not specify this parameter, the operation defaults to 5 policy store aliases per response. You can specify a maximum of 50 policy store aliases per response.</p>
filter: <p>Specifies a filter to narrow the results. You can filter by <code>policyStoreId</code> to list only the policy store aliases associated with a specific policy store.</p>
Raises:
capo_verifiedpermissions.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
capo_verifiedpermissions.errors.internal_server_exception.InternalServerException: <p>The request failed because of an internal error. Try your request again later</p>
capo_verifiedpermissions.errors.throttling_exception.ThrottlingException: <p>The request failed because it exceeded a throttling quota.</p>
capo_verifiedpermissions.errors.validation_exception.ValidationException: <p>The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.</p> <p>The possible reasons include the following:</p> <ul> <li> <p> <b>UnrecognizedEntityType</b> </p> <p>The policy includes an entity type that isn't found in the schema.</p> </li> <li> <p> <b>UnrecognizedActionId</b> </p> <p>The policy includes an action id that isn't found in the schema.</p> </li> <li> <p> <b>InvalidActionApplication</b> </p> <p>The policy includes an action that, according to the schema, doesn't support the specified principal and resource.</p> </li> <li> <p> <b>UnexpectedType</b> </p> <p>The policy included an operand that isn't a valid type for the specified operation.</p> </li> <li> <p> <b>IncompatibleTypes</b> </p> <p>The types of elements included in a <code>set</code>, or the types of expressions used in an <code>if...then...else</code> clause aren't compatible in this context.</p> </li> <li> <p> <b>MissingAttribute</b> </p> <p>The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before attempting to access its value. For more information, see the <a href="https://docs.cedarpolicy.com/policies/syntax-operators.html#has-presence-of-attribute-test">has (presence of attribute test) operator</a> in the <i>Cedar Policy Language Guide</i>.</p> </li> <li> <p> <b>UnsafeOptionalAttributeAccess</b> </p> <p>The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before attempting to access its value. For more information, see the <a href="https://docs.cedarpolicy.com/policies/syntax-operators.html#has-presence-of-attribute-test">has (presence of attribute test) operator</a> in the <i>Cedar Policy Language Guide</i>.</p> </li> <li> <p> <b>ImpossiblePolicy</b> </p> <p>Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.</p> </li> <li> <p> <b>WrongNumberArguments</b> </p> <p>The policy references an extension type with the wrong number of arguments.</p> </li> <li> <p> <b>FunctionArgumentValidationError</b> </p> <p>Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.</p> </li> </ul>
capo_verifiedpermissions.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
ListPolicyStoreAliases - Example 1
The following example lists all policy store aliases in the AWS account in the AWS Region in which you call the operation.
>>> client.list_policy_store_aliases()
ListPolicyStoreAliases - Example 2
The following example lists all policy store aliases associated with the policy store with ID C7v5xMplfFH3i3e4Jrzb1a
>>> client.list_policy_store_aliases(filter={'policyStoreId': 'C7v5xMplfFH3i3e4Jrzb1a'})
"""
def _handler(
req: "OperationRequest[capo_verifiedpermissions.types.list_policy_store_aliases_input.ListPolicyStoreAliasesInput]",
) -> OperationResponse[
"capo_verifiedpermissions.types.list_policy_store_aliases_output.ListPolicyStoreAliasesOutput"
]:
import capo_verifiedpermissions._operations.verified_permissions.list_policy_store_aliases
output, http_response = (
capo_verifiedpermissions._operations.verified_permissions.list_policy_store_aliases.list_policy_store_aliases(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListPolicyStoreAliases")
)
input_: capo_verifiedpermissions.types.list_policy_store_aliases_input.ListPolicyStoreAliasesInput = {}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
if filter is not None:
input_["filter"] = filter
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|