Skip to content

list_lookups

list_lookups(
    *,
    config_overrides: Optional[CloudWatchOmniClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> ListLookupsResponse

Lists the lookup tables in the caller's account and Region. Returns a summary for each table. Content is not included.

Parameters:

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

    The maximum number of lookup tables to return per page.

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

    A token to retrieve the next page of results.

Raises:

Examples:

List the lookup tables in an account and Region The following example returns a page of lookup table summaries. Content is not included. A nextToken is returned when more results are available. Payloads are shown as JSON; on the wire they are CBOR-encoded.

>>> client.list_lookups(max_results=10)
Source code in docs_src/capo_cloudwatchomni/_services/cloud_watch_omni.py
def list_lookups(
    self,
    *,
    config_overrides: Optional[CloudWatchOmniClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> "capo_cloudwatchomni.types.list_lookups_response.ListLookupsResponse":
    """Lists the lookup tables in the caller's account and Region. Returns a summary for each table. Content is not included.

    Args:
        max_results: The maximum number of lookup tables to return per page.
        next_token: A token to retrieve the next page of results.

    Raises:
        capo_cloudwatchomni.errors.internal_server_exception.InternalServerException: An unexpected error occurred while processing the request.
        capo_cloudwatchomni.errors.throttling_exception.ThrottlingException: The request was throttled due to exceeding the allowed request rate.
        capo_cloudwatchomni.errors.validation_exception.ValidationException: A parameter is specified incorrectly.
        capo_cloudwatchomni.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        List the lookup tables in an account and Region
        The following example returns a page of lookup table summaries. Content is not included. A nextToken is returned when more results are available. Payloads are shown as JSON; on the wire they are CBOR-encoded.

        >>> client.list_lookups(max_results=10)
    """

    def _handler(
        req: "OperationRequest[capo_cloudwatchomni.types.list_lookups_request.ListLookupsRequest]",
    ) -> OperationResponse[
        "capo_cloudwatchomni.types.list_lookups_response.ListLookupsResponse"
    ]:
        import capo_cloudwatchomni._operations.cloud_watch_omni_frontend.list_lookups

        output, http_response = (
            capo_cloudwatchomni._operations.cloud_watch_omni_frontend.list_lookups.list_lookups(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListLookups")
    )
    input_: capo_cloudwatchomni.types.list_lookups_request.ListLookupsRequest = {}
    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