updateMarketplaceModelEndpoint method

Future<UpdateMarketplaceModelEndpointResponse> updateMarketplaceModelEndpoint({
  1. required String endpointArn,
  2. required EndpointConfig endpointConfig,
  3. String? clientRequestToken,
})

Updates the configuration of an existing endpoint for a model from Amazon Bedrock Marketplace.

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

Parameter endpointArn : The Amazon Resource Name (ARN) of the endpoint you want to update.

Parameter endpointConfig : The new configuration for the endpoint, including the number and type of instances to use.

Parameter clientRequestToken : A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This token is listed as not required because Amazon Web Services SDKs automatically generate it for you and set this parameter. If you're not using the Amazon Web Services SDK or the CLI, you must provide this token or the action will fail.

Implementation

Future<UpdateMarketplaceModelEndpointResponse>
    updateMarketplaceModelEndpoint({
  required String endpointArn,
  required EndpointConfig endpointConfig,
  String? clientRequestToken,
}) async {
  final $payload = <String, dynamic>{
    'endpointConfig': endpointConfig,
    'clientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/marketplace-model/endpoints/${Uri.encodeComponent(endpointArn)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateMarketplaceModelEndpointResponse.fromJson(response);
}