Skip to content

list_instances

list_instances(
    *,
    config_overrides: Optional[SSOAdminClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[Token] = None,
) -> ListInstancesResponse

Lists the details of the organization and account instances of IAM Identity Center that were created in or visible to the account calling this API.

Parameters:

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

    The maximum number of results to display for the instance.

  • 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/sso_admin.py
def list_instances(
    self,
    *,
    config_overrides: Optional[SSOAdminClientConfig] = 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_instances_response.ListInstancesResponse":
    """<p>Lists the details of the organization and account instances of IAM Identity Center that were created in or visible to the account calling this API. </p>

    Args:
        max_results: <p>The maximum number of results to display for the instance.</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.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.
    """

    def _handler(
        req: "OperationRequest[capo_sso_admin.types.list_instances_request.ListInstancesRequest]",
    ) -> OperationResponse[
        "capo_sso_admin.types.list_instances_response.ListInstancesResponse"
    ]:
        import capo_sso_admin._operations.swb_external_service.list_instances

        output, http_response = (
            capo_sso_admin._operations.swb_external_service.list_instances.list_instances(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListInstances")
    )
    input_: capo_sso_admin.types.list_instances_request.ListInstancesRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output