Updates a custom model deployment with a new custom model. This allows you to deploy updated models without creating new deployment endpoints.
Parameters:
-
model_arn
(CustomModelArn)
–
ARN of the new custom model to deploy. This replaces the currently deployed model.
-
custom_model_deployment_identifier
(CustomModelDeploymentIdentifier)
–
Identifier of the custom model deployment to update with the new custom model.
Raises:
Source code in docs_src/capo_bedrock/_services/bedrock.py
| def update_custom_model_deployment(
self,
model_arn: "capo_bedrock.types.custom_model_arn.CustomModelArn",
custom_model_deployment_identifier: "capo_bedrock.types.custom_model_deployment_identifier.CustomModelDeploymentIdentifier",
*,
config_overrides: Optional[BedrockClientConfig] = None,
) -> "capo_bedrock.types.update_custom_model_deployment_response.UpdateCustomModelDeploymentResponse":
"""<p> Updates a custom model deployment with a new custom model. This allows you to deploy updated models without creating new deployment endpoints. </p>
Args:
model_arn: <p> ARN of the new custom model to deploy. This replaces the currently deployed model. </p>
custom_model_deployment_identifier: <p> Identifier of the custom model deployment to update with the new custom model. </p>
Raises:
capo_bedrock.errors.access_denied_exception.AccessDeniedException: <p>The request is denied because of missing access permissions.</p>
capo_bedrock.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
capo_bedrock.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
capo_bedrock.errors.throttling_exception.ThrottlingException: <p>The number of requests exceeds the limit. Resubmit your request later.</p>
capo_bedrock.errors.validation_exception.ValidationException: <p>Input validation failed. Check your request parameters and retry the request.</p>
capo_bedrock.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_bedrock.types.update_custom_model_deployment_request.UpdateCustomModelDeploymentRequest]",
) -> OperationResponse[
"capo_bedrock.types.update_custom_model_deployment_response.UpdateCustomModelDeploymentResponse"
]:
import capo_bedrock._operations.amazon_bedrock_control_plane_service.update_custom_model_deployment
output, http_response = (
capo_bedrock._operations.amazon_bedrock_control_plane_service.update_custom_model_deployment.update_custom_model_deployment(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateCustomModelDeployment")
)
input_: capo_bedrock.types.update_custom_model_deployment_request.UpdateCustomModelDeploymentRequest = {
"model_arn": model_arn,
"custom_model_deployment_identifier": custom_model_deployment_identifier,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|