getLogFields method
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.
May throw InvalidParameterException.
May throw OperationAbortedException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
Parameter dataSourceName :
The name of the data source to retrieve log fields for.
Parameter dataSourceType :
The type of the data source to retrieve log fields for.
Implementation
Future<GetLogFieldsResponse> getLogFields({
required String dataSourceName,
required String dataSourceType,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Logs_20140328.GetLogFields'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'dataSourceName': dataSourceName,
'dataSourceType': dataSourceType,
},
);
return GetLogFieldsResponse.fromJson(jsonResponse.body);
}