deleteConnection method
Deletes a connection from the Data Catalog.
May throw EntityNotFoundException. May throw OperationTimeoutException.
Parameter connectionName
:
The name of the connection to delete.
Parameter catalogId
:
The ID of the Data Catalog in which the connection resides. If none is
provided, the AWS account ID is used by default.
Implementation
Future<void> deleteConnection({
required String connectionName,
String? catalogId,
}) async {
ArgumentError.checkNotNull(connectionName, 'connectionName');
_s.validateStringLength(
'connectionName',
connectionName,
1,
255,
isRequired: true,
);
_s.validateStringLength(
'catalogId',
catalogId,
1,
255,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.DeleteConnection'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ConnectionName': connectionName,
if (catalogId != null) 'CatalogId': catalogId,
},
);
}