list_principals_for_policy
¶
list_principals_for_policy(
account_id: AwsAccountId,
policy_arn: PolicyArn,
*,
config_overrides: Optional[QuickSightClientConfig] = None,
principal_type: Optional[PrincipalType] = None,
max_results: Optional[ListPrincipalsForPolicyRequestMaxResultsInteger] = None,
next_token: Optional[ListPrincipalsForPolicyRequestNextTokenString] = None,
) -> ListPrincipalsForPolicyResponse
Lists the Amazon Quick Sight principals that have a governance policy. This operation returns paginated results. A page can contain fewer results than MaxResults, or none, and still include a NextToken. Continue to call the operation until the response doesn't include a NextToken. We recommend that you use pagination to make sure that the operation returns quickly and successfully.
Results are eventually consistent and might not reflect recent changes. If the policy has no assignments, the response contains an empty Principals list. If the policy doesn't exist, the request fails with a ResourceNotFoundException.
Parameters:
-
account_id(AwsAccountId) –The ID of the Amazon Web Services account that contains the policy.
-
policy_arn(PolicyArn) –The ARN of the policy.
-
principal_type(Optional[PrincipalType], default:None) –An optional filter that limits the results to principals of the specified type. If you don't specify a value, the operation returns principals of all types. You can specify one of the following values:
-
USER– An Amazon Quick Sight user. -
GROUP– An Amazon Quick Sight group. -
ACCOUNT– The Amazon Quick Sight account.
-
-
max_results(Optional[ListPrincipalsForPolicyRequestMaxResultsInteger], default:None) –The maximum number of results to return in a single call. Valid range is 1–100. If you don't specify a value, the operation returns up to 100 results.
-
next_token(Optional[ListPrincipalsForPolicyRequestNextTokenString], default:None) –The token returned by a previous call. Use it to get the next page of results.
Raises:
-
AccessDeniedException–You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon Quick Sight service, that your policies have the correct permissions, and that you are using the correct credentials.
-
InternalFailureException–An internal failure occurred.
-
ResourceNotFoundException–One or more resources can't be found.
-
ThrottlingException–Access is throttled.
-
ValidationException–The input fails to satisfy the constraints specified by the service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_quicksight/_services/quick_sight.py
15051 15052 15053 15054 15055 15056 15057 15058 15059 15060 15061 15062 15063 15064 15065 15066 15067 15068 15069 15070 15071 15072 15073 15074 15075 15076 15077 15078 15079 15080 15081 15082 15083 15084 15085 15086 15087 15088 15089 15090 15091 15092 15093 15094 15095 15096 15097 15098 15099 15100 15101 15102 15103 15104 15105 15106 15107 15108 15109 15110 15111 15112 15113 15114 15115 15116 15117 15118 15119 | |