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.
Parameters:
-
data_source_id
(EntityId)
–
A user-supplied ID that uniquely identifies the DataSource.
Raises:
Source code in docs_src/capo_machine_learning/_services/machine_learning.py
| def delete_data_source(
self,
data_source_id: "capo_machine_learning.types.entity_id.EntityId",
*,
config_overrides: Optional[MachineLearningClientConfig] = None,
) -> "capo_machine_learning.types.delete_data_source_output.DeleteDataSourceOutput":
"""<p>Assigns the DELETED status to a <code>DataSource</code>, rendering it unusable.</p> <p>After using the <code>DeleteDataSource</code> operation, you can use the <a>GetDataSource</a> operation to verify that the status of the <code>DataSource</code> changed to DELETED.</p> <p> <b>Caution:</b> The results of the <code>DeleteDataSource</code> operation are irreversible.</p>
Args:
data_source_id: <p>A user-supplied ID that uniquely identifies the <code>DataSource</code>.</p>
Raises:
capo_machine_learning.errors.internal_server_exception.InternalServerException: <p>An error on the server occurred when trying to process a request.</p>
capo_machine_learning.errors.invalid_input_exception.InvalidInputException: <p>An error on the client occurred. Typically, the cause is an invalid input value.</p>
capo_machine_learning.errors.resource_not_found_exception.ResourceNotFoundException: <p>A specified resource cannot be located.</p>
capo_machine_learning.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_machine_learning.types.delete_data_source_input.DeleteDataSourceInput]",
) -> OperationResponse[
"capo_machine_learning.types.delete_data_source_output.DeleteDataSourceOutput"
]:
import capo_machine_learning._operations.amazon_ml_20141212.delete_data_source
output, http_response = (
capo_machine_learning._operations.amazon_ml_20141212.delete_data_source.delete_data_source(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteDataSource")
)
input_: capo_machine_learning.types.delete_data_source_input.DeleteDataSourceInput = {
"data_source_id": data_source_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|