updateLookupTable method
Updates an existing lookup table by replacing all of its content with new CSV data or CloudWatch Logs query results. After the update completes, queries that use this table use the new data.
This is a full replacement operation. All existing content is replaced.
You must specify either tableBody or queryId,
but not both.
May throw AccessDeniedException.
May throw InvalidParameterException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
May throw ValidationException.
Parameter lookupTableArn :
The ARN of the lookup table to update.
Parameter description :
An updated description of the lookup table.
Parameter kmsKeyId :
The ARN of the KMS key to use to encrypt the lookup table data. You can
use this parameter to add, update, or remove the KMS key. To remove the
KMS key and use an Amazon Web Services-owned key instead, specify an empty
string.
Parameter queryId :
The ID of a completed or cancelled CloudWatch Logs query whose results
replace the lookup table content. A cancelled query replaces the content
with the partial results that were available when the query was stopped.
You must specify either tableBody or queryId,
but not both.
Parameter tableBody :
The new CSV content to replace the existing data. The first row must be a
header row with column names. The content must use UTF-8 encoding and not
exceed 10 MB.
You must specify either tableBody or queryId,
but not both.
Implementation
Future<UpdateLookupTableResponse> updateLookupTable({
required String lookupTableArn,
String? description,
String? kmsKeyId,
String? queryId,
String? tableBody,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Logs_20140328.UpdateLookupTable'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'lookupTableArn': lookupTableArn,
if (description != null) 'description': description,
if (kmsKeyId != null) 'kmsKeyId': kmsKeyId,
if (queryId != null) 'queryId': queryId,
if (tableBody != null) 'tableBody': tableBody,
},
);
return UpdateLookupTableResponse.fromJson(jsonResponse.body);
}