list_principals_for_policy
async
¶
list_principals_for_policy(
account_id: AwsAccountId,
policy_arn: PolicyArn,
*,
config_overrides: Optional[AsyncQuickSightClientConfig] = 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/async_quick_sight.py
15260 15261 15262 15263 15264 15265 15266 15267 15268 15269 15270 15271 15272 15273 15274 15275 15276 15277 15278 15279 15280 15281 15282 15283 15284 15285 15286 15287 15288 15289 15290 15291 15292 15293 15294 15295 15296 15297 15298 15299 15300 15301 15302 15303 15304 15305 15306 15307 15308 15309 15310 15311 15312 15313 15314 15315 15316 15317 15318 15319 15320 15321 15322 15323 15324 15325 15326 15327 15328 15329 | |