batchDeleteConnection method

Future<BatchDeleteConnectionResponse> batchDeleteConnection({
  1. required List<String> connectionNameList,
  2. String? catalogId,
})

Deletes a list of connection definitions from the Data Catalog.

May throw InternalServiceException. May throw OperationTimeoutException.

Parameter connectionNameList : A list of names of the connections to delete.

Parameter catalogId : The ID of the Data Catalog in which the connections reside. If none is provided, the AWS account ID is used by default.

Implementation

Future<BatchDeleteConnectionResponse> batchDeleteConnection({
  required List<String> connectionNameList,
  String? catalogId,
}) async {
  ArgumentError.checkNotNull(connectionNameList, 'connectionNameList');
  _s.validateStringLength(
    'catalogId',
    catalogId,
    1,
    255,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSGlue.BatchDeleteConnection'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ConnectionNameList': connectionNameList,
      if (catalogId != null) 'CatalogId': catalogId,
    },
  );

  return BatchDeleteConnectionResponse.fromJson(jsonResponse.body);
}