updateProvisionedModelThroughput method

Future<void> updateProvisionedModelThroughput({
  1. required String provisionedModelId,
  2. String? desiredModelId,
  3. String? desiredProvisionedModelName,
})

Updates the name or associated model for a Provisioned Throughput. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter provisionedModelId : The Amazon Resource Name (ARN) or name of the Provisioned Throughput to update.

Parameter desiredModelId : 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:

  • The base model from which the custom model was customized.
  • Another custom model that was customized from the same base model as the custom model.

Parameter desiredProvisionedModelName : The new name for this Provisioned Throughput.

Implementation

Future<void> updateProvisionedModelThroughput({
  required String provisionedModelId,
  String? desiredModelId,
  String? desiredProvisionedModelName,
}) async {
  final $payload = <String, dynamic>{
    if (desiredModelId != null) 'desiredModelId': desiredModelId,
    if (desiredProvisionedModelName != null)
      'desiredProvisionedModelName': desiredProvisionedModelName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/provisioned-model-throughput/${Uri.encodeComponent(provisionedModelId)}',
    exceptionFnMap: _exceptionFns,
  );
}