list_account_assignments_for_principal
¶
list_account_assignments_for_principal(
instance_arn: InstanceArn,
principal_id: PrincipalId,
principal_type: PrincipalType,
*,
config_overrides: Optional[SSOAdminClientConfig] = None,
filter: Optional[ListAccountAssignmentsFilter] = None,
next_token: Optional[Token] = None,
max_results: Optional[MaxResults] = None,
) -> ListAccountAssignmentsForPrincipalResponse
Retrieves a list of the IAM Identity Center associated Amazon Web Services accounts that the principal has access to. This action must be called from the management account containing your organization instance of IAM Identity Center. This action is not valid for account instances of IAM Identity Center.
Parameters:
-
instance_arn(InstanceArn) –Specifies the ARN of the instance of IAM Identity Center that contains the principal.
-
principal_id(PrincipalId) –Specifies the principal for which you want to retrieve the list of account assignments.
-
principal_type(PrincipalType) –Specifies the type of the principal.
-
filter(Optional[ListAccountAssignmentsFilter], default:None) –Specifies an Amazon Web Services account ID number. Results are filtered to only those that match this ID number.
-
next_token(Optional[Token], default:None) –Specifies that you want to receive the next page of results. Valid only if you received a
NextTokenresponse 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'sNextTokenresponse 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
NextTokenresponse element is returned with a value (not null). Include the specified value as theNextTokenrequest 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 checkNextTokenafter every operation to ensure that you receive all of the results.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
InternalServerException–The request processing has failed because of an unknown error, exception, or failure with an internal server.
-
ResourceNotFoundException–Indicates that a requested resource is not found.
-
ThrottlingException–Indicates that the principal has crossed the throttling limits of the API operations.
-
ValidationException–The request failed because it contains a syntax error.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_sso_admin/_services/sso_admin.py
2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 | |