Skip to content

list_telemetry_fields

list_telemetry_fields(
    data_set_name: str,
    *,
    config_overrides: Optional[CloudWatchOmniClientConfig] = None,
    telemetry_type: Optional[TelemetryType] = None,
    start_time: Optional[datetime] = None,
    end_time: Optional[datetime] = None,
    next_token: Optional[str] = None,
) -> ListTelemetryFieldsResponse

Lists fields available for telemetry queries. Returns a list of fields included in the specified dataset, granular to telemetry type. Returned field names reflect the exact stored casing and are case-sensitive when referenced in query expressions; the query engine does not normalize identifier case.

Parameters:

  • data_set_name (str) –

    The name of the dataset to list fields for.

  • telemetry_type (Optional[TelemetryType], default: None ) –

    The type of telemetry to filter fields by.

  • start_time (Optional[datetime], default: None ) –

    Inclusive start of the lookback window. When omitted, the service defaults to the configured lookback before endTime.

  • end_time (Optional[datetime], default: None ) –

    Inclusive end of the lookback window. When omitted, the service defaults to the current time.

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

    A token to retrieve the next page of results. Reserved for future pagination; the service does not paginate at this time and returns null.

Raises:

Examples:

List fields for a dataset The following example lists the log fields available in the specified dataset. Payloads are shown as JSON; on the wire they are CBOR-encoded.

>>> client.list_telemetry_fields(data_set_name='default', telemetry_type='LOGS')
Source code in docs_src/capo_cloudwatchomni/_services/cloud_watch_omni.py
def list_telemetry_fields(
    self,
    data_set_name: str,
    *,
    config_overrides: Optional[CloudWatchOmniClientConfig] = None,
    telemetry_type: Optional[
        "capo_cloudwatchomni.types.telemetry_type.TelemetryType"
    ] = None,
    start_time: Optional[datetime.datetime] = None,
    end_time: Optional[datetime.datetime] = None,
    next_token: Optional[str] = None,
) -> "capo_cloudwatchomni.types.list_telemetry_fields_response.ListTelemetryFieldsResponse":
    """Lists fields available for telemetry queries. Returns a list of fields included in the specified dataset, granular to telemetry type. Returned field names reflect the exact stored casing and are case-sensitive when referenced in query expressions; the query engine does not normalize identifier case.

    Args:
        data_set_name: The name of the dataset to list fields for.
        telemetry_type: The type of telemetry to filter fields by.
        start_time: Inclusive start of the lookback window. When omitted, the service defaults to the configured lookback before endTime.
        end_time: Inclusive end of the lookback window. When omitted, the service defaults to the current time.
        next_token: A token to retrieve the next page of results. Reserved for future pagination; the service does not paginate at this time and returns null.

    Raises:
        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:
        List fields for a dataset
        The following example lists the log fields available in the specified dataset. Payloads are shown as JSON; on the wire they are CBOR-encoded.

        >>> client.list_telemetry_fields(data_set_name='default', telemetry_type='LOGS')
    """

    def _handler(
        req: "OperationRequest[capo_cloudwatchomni.types.list_telemetry_fields_request.ListTelemetryFieldsRequest]",
    ) -> OperationResponse[
        "capo_cloudwatchomni.types.list_telemetry_fields_response.ListTelemetryFieldsResponse"
    ]:
        import capo_cloudwatchomni._operations.cloud_watch_omni_frontend.list_telemetry_fields

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTelemetryFields")
    )
    input_: capo_cloudwatchomni.types.list_telemetry_fields_request.ListTelemetryFieldsRequest = {
        "data_set_name": data_set_name
    }
    if telemetry_type is not None:
        input_["telemetry_type"] = telemetry_type
    if start_time is not None:
        input_["start_time"] = start_time
    if end_time is not None:
        input_["end_time"] = end_time
    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