Skip to content

list_service_indexes

list_service_indexes(
    *,
    config_overrides: Optional[ResourceExplorer2ClientConfig] = None,
    regions: Optional[RegionList] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> ListServiceIndexesOutput

Lists all Resource Explorer indexes across the specified Amazon Web Services Regions. This operation returns information about indexes including their ARNs, types, and Regions.

Parameters:

  • regions (Optional[RegionList], default: None ) –

    A list of Amazon Web Services Regions to include in the search for indexes. If not specified, indexes from all Regions are returned.

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

    The maximum number of index results to return in a single response. Valid values are between 1 and 100.

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

    The pagination token from a previous ListServiceIndexes response. Use this token to retrieve the next set of results.

Raises:

Source code in docs_src/capo_resource_explorer_2/_services/resource_explorer2.py
def list_service_indexes(
    self,
    *,
    config_overrides: Optional[ResourceExplorer2ClientConfig] = None,
    regions: Optional[
        "capo_resource_explorer_2.types.region_list.RegionList"
    ] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> "capo_resource_explorer_2.types.list_service_indexes_output.ListServiceIndexesOutput":
    """<p>Lists all Resource Explorer indexes across the specified Amazon Web Services Regions. This operation returns information about indexes including their ARNs, types, and Regions.</p>

    Args:
        regions: <p>A list of Amazon Web Services Regions to include in the search for indexes. If not specified, indexes from all Regions are returned.</p>
        max_results: <p>The maximum number of index results to return in a single response. Valid values are between <code>1</code> and <code>100</code>.</p>
        next_token: <p>The pagination token from a previous <code>ListServiceIndexes</code> response. Use this token to retrieve the next set of results.</p>

    Raises:
        capo_resource_explorer_2.errors.access_denied_exception.AccessDeniedException: <p>The credentials that you used to call this operation don't have the minimum required permissions.</p>
        capo_resource_explorer_2.errors.internal_server_exception.InternalServerException: <p>The request failed because of internal service error. Try your request again later.</p>
        capo_resource_explorer_2.errors.throttling_exception.ThrottlingException: <p>The request failed because you exceeded a rate limit for this operation. For more information, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/quotas.html">Quotas for Resource Explorer</a>.</p>
        capo_resource_explorer_2.errors.validation_exception.ValidationException: <p>You provided an invalid value for one of the operation's parameters. Check the syntax for the operation, and try again.</p>
        capo_resource_explorer_2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_resource_explorer_2.types.list_service_indexes_input.ListServiceIndexesInput]",
    ) -> OperationResponse[
        "capo_resource_explorer_2.types.list_service_indexes_output.ListServiceIndexesOutput"
    ]:
        import capo_resource_explorer_2._operations.resource_explorer.list_service_indexes

        output, http_response = (
            capo_resource_explorer_2._operations.resource_explorer.list_service_indexes.list_service_indexes(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListServiceIndexes")
    )
    input_: capo_resource_explorer_2.types.list_service_indexes_input.ListServiceIndexesInput = {}
    if regions is not None:
        input_["regions"] = regions
    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