Discovers available fields for a specific data source and type. The response includes any field modifications introduced through pipelines, such as new fields or changed field types.
Parameters:
-
data_source_name
(DataSourceName)
–
The name of the data source to retrieve log fields for.
-
data_source_type
(DataSourceType)
–
The type of the data source to retrieve log fields for.
Raises:
Source code in docs_src/capo_cloudwatch_logs/_services/async_cloud_watch_logs.py
| async def get_log_fields(
self,
data_source_name: "capo_cloudwatch_logs.types.data_source_name.DataSourceName",
data_source_type: "capo_cloudwatch_logs.types.data_source_type.DataSourceType",
*,
config_overrides: Optional[AsyncCloudWatchLogsClientConfig] = None,
) -> "capo_cloudwatch_logs.types.get_log_fields_response.GetLogFieldsResponse":
"""<p>Discovers available fields for a specific data source and type. The response includes any field modifications introduced through pipelines, such as new fields or changed field types. </p>
Args:
data_source_name: <p>The name of the data source to retrieve log fields for.</p>
data_source_type: <p>The type of the data source to retrieve log fields for.</p>
Raises:
capo_cloudwatch_logs.errors.invalid_parameter_exception.InvalidParameterException: <p>A parameter is specified incorrectly.</p>
capo_cloudwatch_logs.errors.operation_aborted_exception.OperationAbortedException: <p>Multiple concurrent requests to update the same resource were in conflict.</p>
capo_cloudwatch_logs.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
capo_cloudwatch_logs.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service cannot complete the request.</p>
capo_cloudwatch_logs.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cloudwatch_logs.types.get_log_fields_request.GetLogFieldsRequest]",
) -> AsyncOperationResponse[
"capo_cloudwatch_logs.types.get_log_fields_response.GetLogFieldsResponse"
]:
import capo_cloudwatch_logs._operations.logs_20140328.get_log_fields
(
output,
http_response,
) = await capo_cloudwatch_logs._operations.logs_20140328.get_log_fields.async_get_log_fields(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetLogFields")
)
input_: capo_cloudwatch_logs.types.get_log_fields_request.GetLogFieldsRequest = {
"data_source_name": data_source_name,
"data_source_type": data_source_type,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|