deleteDataSource method
Assigns the DELETED status to a DataSource
, rendering it
unusable.
After using the DeleteDataSource
operation, you can use the
GetDataSource operation to verify that the status of the
DataSource
changed to DELETED.
Caution: The results of the DeleteDataSource
operation
are irreversible.
May throw InvalidInputException. May throw ResourceNotFoundException. May throw InternalServerException.
Parameter dataSourceId
:
A user-supplied ID that uniquely identifies the DataSource
.
Implementation
Future<DeleteDataSourceOutput> deleteDataSource({
required String dataSourceId,
}) async {
ArgumentError.checkNotNull(dataSourceId, 'dataSourceId');
_s.validateStringLength(
'dataSourceId',
dataSourceId,
1,
64,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonML_20141212.DeleteDataSource'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DataSourceId': dataSourceId,
},
);
return DeleteDataSourceOutput.fromJson(jsonResponse.body);
}