listTableOptimizerRuns method

Future<ListTableOptimizerRunsResponse> listTableOptimizerRuns({
  1. required String catalogId,
  2. required String databaseName,
  3. required String tableName,
  4. required TableOptimizerType type,
  5. int? maxResults,
  6. String? nextToken,
})

Lists the history of previous optimizer runs for a specific table.

May throw AccessDeniedException. May throw EntityNotFoundException. May throw InternalServiceException. May throw InvalidInputException. May throw ThrottlingException. May throw ValidationException.

Parameter catalogId : The Catalog ID of the table.

Parameter databaseName : The name of the database in the catalog in which the table resides.

Parameter tableName : The name of the table.

Parameter type : The type of table optimizer.

Parameter maxResults : The maximum number of optimizer runs to return on each call.

Parameter nextToken : A continuation token, if this is a continuation call.

Implementation

Future<ListTableOptimizerRunsResponse> listTableOptimizerRuns({
  required String catalogId,
  required String databaseName,
  required String tableName,
  required TableOptimizerType type,
  int? maxResults,
  String? nextToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSGlue.ListTableOptimizerRuns'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'CatalogId': catalogId,
      'DatabaseName': databaseName,
      'TableName': tableName,
      'Type': type.value,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListTableOptimizerRunsResponse.fromJson(jsonResponse.body);
}