CloudWatchLogs / Client / get_log_fields
get_log_fields¶
- CloudWatchLogs.Client.get_log_fields(**kwargs)¶
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.
See also: AWS API Documentation
Request Syntax
response = client.get_log_fields( dataSourceName='string', dataSourceType='string' )
- Parameters:
dataSourceName (string) –
[REQUIRED]
The name of the data source to retrieve log fields for.
dataSourceType (string) –
[REQUIRED]
The type of the data source to retrieve log fields for.
- Return type:
dict
- Returns:
Response Syntax
{ 'logFields': [ { 'logFieldName': 'string', 'logFieldType': { 'type': 'string', 'element': {'... recursive ...'}, 'fields': {'... recursive ...'} } }, ] }
Response Structure
(dict) –
logFields (list) –
The list of log fields for the specified data source, including field names and their data types.
(dict) –
Represents a log field with its name and data type information for a specific data source.
logFieldName (string) –
The name of the log field.
logFieldType (dict) –
The data type information for the log field.
type (string) –
The data type of the log field.
element (dict) –
For array or collection types, specifies the element type information.
fields (list) –
For complex types, contains the nested field definitions.
Exceptions