Skip to content

list_permission_sets_provisioned_to_account async

list_permission_sets_provisioned_to_account(
    instance_arn: InstanceArn,
    account_id: AccountId,
    *,
    config_overrides: Optional[AsyncSSOAdminClientConfig] = None,
    provisioning_status: Optional[ProvisioningStatus] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[Token] = None,
) -> ListPermissionSetsProvisionedToAccountResponse

Lists all the permission sets that are provisioned to a specified Amazon Web Services account.

Parameters:

  • instance_arn (InstanceArn) –

    The ARN of the IAM Identity Center instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.

  • account_id (AccountId) –

    The identifier of the Amazon Web Services account from which to list the assignments.

  • provisioning_status (Optional[ProvisioningStatus], default: None ) –

    The status object for the permission set provisioning operation.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of results to display for the assignment.

  • next_token (Optional[Token], default: None ) –

    The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.

Raises:

Source code in docs_src/capo_sso_admin/_services/async_sso_admin.py
async def list_permission_sets_provisioned_to_account(
    self,
    instance_arn: "capo_sso_admin.types.instance_arn.InstanceArn",
    account_id: "capo_sso_admin.types.account_id.AccountId",
    *,
    config_overrides: Optional[AsyncSSOAdminClientConfig] = None,
    provisioning_status: Optional[
        "capo_sso_admin.types.provisioning_status.ProvisioningStatus"
    ] = None,
    max_results: Optional["capo_sso_admin.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_sso_admin.types.token.Token"] = None,
) -> "capo_sso_admin.types.list_permission_sets_provisioned_to_account_response.ListPermissionSetsProvisionedToAccountResponse":
    """<p>Lists all the permission sets that are provisioned to a specified Amazon Web Services account.</p>

    Args:
        instance_arn: <p>The ARN of the IAM Identity Center instance under which the operation will be executed. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
        account_id: <p>The identifier of the Amazon Web Services account from which to list the assignments.</p>
        provisioning_status: <p>The status object for the permission set provisioning operation.</p>
        max_results: <p>The maximum number of results to display for the assignment.</p>
        next_token: <p>The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.</p>

    Raises:
        capo_sso_admin.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_sso_admin.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception, or failure with an internal server.</p>
        capo_sso_admin.errors.resource_not_found_exception.ResourceNotFoundException: <p>Indicates that a requested resource is not found.</p>
        capo_sso_admin.errors.throttling_exception.ThrottlingException: <p>Indicates that the principal has crossed the throttling limits of the API operations.</p>
        capo_sso_admin.errors.validation_exception.ValidationException: <p>The request failed because it contains a syntax error.</p>
        capo_sso_admin.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sso_admin.types.list_permission_sets_provisioned_to_account_request.ListPermissionSetsProvisionedToAccountRequest]",
    ) -> AsyncOperationResponse[
        "capo_sso_admin.types.list_permission_sets_provisioned_to_account_response.ListPermissionSetsProvisionedToAccountResponse"
    ]:
        import capo_sso_admin._operations.swb_external_service.list_permission_sets_provisioned_to_account

        (
            output,
            http_response,
        ) = await capo_sso_admin._operations.swb_external_service.list_permission_sets_provisioned_to_account.async_list_permission_sets_provisioned_to_account(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListPermissionSetsProvisionedToAccount")
    )
    input_: capo_sso_admin.types.list_permission_sets_provisioned_to_account_request.ListPermissionSetsProvisionedToAccountRequest = {
        "instance_arn": instance_arn,
        "account_id": account_id,
    }
    if provisioning_status is not None:
        input_["provisioning_status"] = provisioning_status
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output