Skip to content

get_lookup_data

get_lookup_data(
    identifier: LookupIdentifier,
    *,
    config_overrides: Optional[CloudWatchOmniClientConfig] = None,
) -> GetLookupDataResponse

Returns the content of the specified lookup table as CSV.

Parameters:

  • identifier (LookupIdentifier) –

    The id of the lookup table whose content to return.

Raises:

Examples:

Read a lookup table's content The following example returns every row of a lookup table as CSV, led by a header record of the column names. Payloads are shown as JSON; on the wire they are CBOR-encoded.

>>> client.get_lookup_data(identifier='3k7f2m9qx4pd8w1n6v0b5j2tz')
Source code in docs_src/capo_cloudwatchomni/_services/cloud_watch_omni.py
def get_lookup_data(
    self,
    identifier: "capo_cloudwatchomni.types.lookup_identifier.LookupIdentifier",
    *,
    config_overrides: Optional[CloudWatchOmniClientConfig] = None,
) -> "capo_cloudwatchomni.types.get_lookup_data_response.GetLookupDataResponse":
    """Returns the content of the specified lookup table as CSV.

    Args:
        identifier: The id of the lookup table whose content to return.

    Raises:
        capo_cloudwatchomni.errors.access_denied_exception.AccessDeniedException: The caller is not authorized to perform this action.
        capo_cloudwatchomni.errors.internal_server_exception.InternalServerException: An unexpected error occurred while processing the request.
        capo_cloudwatchomni.errors.resource_not_found_exception.ResourceNotFoundException: The specified resource does not exist.
        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:
        Read a lookup table's content
        The following example returns every row of a lookup table as CSV, led by a header record of the column names. Payloads are shown as JSON; on the wire they are CBOR-encoded.

        >>> client.get_lookup_data(identifier='3k7f2m9qx4pd8w1n6v0b5j2tz')
    """

    def _handler(
        req: "OperationRequest[capo_cloudwatchomni.types.get_lookup_data_request.GetLookupDataRequest]",
    ) -> OperationResponse[
        "capo_cloudwatchomni.types.get_lookup_data_response.GetLookupDataResponse"
    ]:
        import capo_cloudwatchomni._operations.cloud_watch_omni_frontend.get_lookup_data

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

    def _redact_output(
        output: "capo_cloudwatchomni.types.get_lookup_data_response.GetLookupDataResponse",
    ) -> dict[str, Any]:
        import capo_cloudwatchomni.types.get_lookup_data_response

        return capo_cloudwatchomni.types.get_lookup_data_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetLookupData", redact_output=_redact_output),
    )
    input_: capo_cloudwatchomni.types.get_lookup_data_request.GetLookupDataRequest = {
        "identifier": identifier
    }

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