Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
Parameters:
-
provisioned_model_id
(ProvisionedModelId)
–
The Amazon Resource Name (ARN) or name of the Provisioned Throughput to update.
-
desired_provisioned_model_name
(Optional[ProvisionedModelName], default:
None
)
–
The new name for this Provisioned Throughput.
-
desired_model_id
(Optional[ModelIdentifier], default:
None
)
–
The Amazon Resource Name (ARN) of the new model to associate with this Provisioned Throughput. You can't specify this field if this Provisioned Throughput is associated with a base model.
If this Provisioned Throughput is associated with a custom model, you can specify one of the following options:
Raises:
Source code in docs_src/capo_bedrock/_services/bedrock.py
| def update_provisioned_model_throughput(
self,
provisioned_model_id: "capo_bedrock.types.provisioned_model_id.ProvisionedModelId",
*,
config_overrides: Optional[BedrockClientConfig] = None,
desired_provisioned_model_name: Optional[
"capo_bedrock.types.provisioned_model_name.ProvisionedModelName"
] = None,
desired_model_id: Optional[
"capo_bedrock.types.model_identifier.ModelIdentifier"
] = None,
) -> "capo_bedrock.types.update_provisioned_model_throughput_response.UpdateProvisionedModelThroughputResponse":
"""<p>Updates the name or associated model for a Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html">Provisioned Throughput</a> in the <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html">Amazon Bedrock User Guide</a>.</p>
Args:
provisioned_model_id: <p>The Amazon Resource Name (ARN) or name of the Provisioned Throughput to update.</p>
desired_provisioned_model_name: <p>The new name for this Provisioned Throughput.</p>
desired_model_id: <p>The Amazon Resource Name (ARN) of the new model to associate with this Provisioned Throughput. You can't specify this field if this Provisioned Throughput is associated with a base model.</p> <p>If this Provisioned Throughput is associated with a custom model, you can specify one of the following options:</p> <ul> <li> <p>The base model from which the custom model was customized.</p> </li> <li> <p>Another custom model that was customized from the same base model as the custom model.</p> </li> </ul>
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_provisioned_model_throughput_request.UpdateProvisionedModelThroughputRequest]",
) -> OperationResponse[
"capo_bedrock.types.update_provisioned_model_throughput_response.UpdateProvisionedModelThroughputResponse"
]:
import capo_bedrock._operations.amazon_bedrock_control_plane_service.update_provisioned_model_throughput
output, http_response = (
capo_bedrock._operations.amazon_bedrock_control_plane_service.update_provisioned_model_throughput.update_provisioned_model_throughput(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateProvisionedModelThroughput")
)
input_: capo_bedrock.types.update_provisioned_model_throughput_request.UpdateProvisionedModelThroughputRequest = {
"provisioned_model_id": provisioned_model_id
}
if desired_provisioned_model_name is not None:
input_["desired_provisioned_model_name"] = desired_provisioned_model_name
if desired_model_id is not None:
input_["desired_model_id"] = desired_model_id
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|