Updates the DataSourceName of a DataSource.
You can use the GetDataSource operation to view the contents of the updated data element.
Parameters:
-
data_source_id
(EntityId)
–
The ID assigned to the DataSource during creation.
-
data_source_name
(EntityName)
–
A new user-supplied name or description of the DataSource that will replace the current description.
Raises:
Source code in docs_src/capo_machine_learning/_services/async_machine_learning.py
| async def update_data_source(
self,
data_source_id: "capo_machine_learning.types.entity_id.EntityId",
data_source_name: "capo_machine_learning.types.entity_name.EntityName",
*,
config_overrides: Optional[AsyncMachineLearningClientConfig] = None,
) -> "capo_machine_learning.types.update_data_source_output.UpdateDataSourceOutput":
"""<p>Updates the <code>DataSourceName</code> of a <code>DataSource</code>.</p> <p>You can use the <code>GetDataSource</code> operation to view the contents of the updated data element.</p>
Args:
data_source_id: <p>The ID assigned to the <code>DataSource</code> during creation.</p>
data_source_name: <p>A new user-supplied name or description of the <code>DataSource</code> that will replace the current description. </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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_machine_learning.types.update_data_source_input.UpdateDataSourceInput]",
) -> AsyncOperationResponse[
"capo_machine_learning.types.update_data_source_output.UpdateDataSourceOutput"
]:
import capo_machine_learning._operations.amazon_ml_20141212.update_data_source
(
output,
http_response,
) = await capo_machine_learning._operations.amazon_ml_20141212.update_data_source.async_update_data_source(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateDataSource")
)
input_: capo_machine_learning.types.update_data_source_input.UpdateDataSourceInput = {
"data_source_id": data_source_id,
"data_source_name": data_source_name,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|