Updates the BatchPredictionName of a BatchPrediction.
You can use the GetBatchPrediction operation to view the contents of the updated data element.
Parameters:
-
batch_prediction_id
(EntityId)
–
The ID assigned to the BatchPrediction during creation.
-
batch_prediction_name
(EntityName)
–
A new user-supplied name or description of the BatchPrediction.
Raises:
Source code in docs_src/capo_machine_learning/_services/machine_learning.py
| def update_batch_prediction(
self,
batch_prediction_id: "capo_machine_learning.types.entity_id.EntityId",
batch_prediction_name: "capo_machine_learning.types.entity_name.EntityName",
*,
config_overrides: Optional[MachineLearningClientConfig] = None,
) -> "capo_machine_learning.types.update_batch_prediction_output.UpdateBatchPredictionOutput":
"""<p>Updates the <code>BatchPredictionName</code> of a <code>BatchPrediction</code>.</p> <p>You can use the <code>GetBatchPrediction</code> operation to view the contents of the updated data element.</p>
Args:
batch_prediction_id: <p>The ID assigned to the <code>BatchPrediction</code> during creation.</p>
batch_prediction_name: <p>A new user-supplied name or description of the <code>BatchPrediction</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.update_batch_prediction_input.UpdateBatchPredictionInput]",
) -> OperationResponse[
"capo_machine_learning.types.update_batch_prediction_output.UpdateBatchPredictionOutput"
]:
import capo_machine_learning._operations.amazon_ml_20141212.update_batch_prediction
output, http_response = (
capo_machine_learning._operations.amazon_ml_20141212.update_batch_prediction.update_batch_prediction(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateBatchPrediction")
)
input_: capo_machine_learning.types.update_batch_prediction_input.UpdateBatchPredictionInput = {
"batch_prediction_id": batch_prediction_id,
"batch_prediction_name": batch_prediction_name,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|