updateEndpoint method
Updates information about the specified endpoint.
May throw InvalidRequestException. May throw TooManyRequestsException. May throw ResourceInUseException. May throw ResourceLimitExceededException. May throw ResourceNotFoundException. May throw ResourceUnavailableException. May throw InternalServerException.
Parameter desiredInferenceUnits
:
The desired number of inference units to be used by the model using this
endpoint. Each inference unit represents of a throughput of 100 characters
per second.
Parameter endpointArn
:
The Amazon Resource Number (ARN) of the endpoint being updated.
Implementation
Future<void> updateEndpoint({
required int desiredInferenceUnits,
required String endpointArn,
}) async {
ArgumentError.checkNotNull(desiredInferenceUnits, 'desiredInferenceUnits');
_s.validateNumRange(
'desiredInferenceUnits',
desiredInferenceUnits,
1,
1152921504606846976,
isRequired: true,
);
ArgumentError.checkNotNull(endpointArn, 'endpointArn');
_s.validateStringLength(
'endpointArn',
endpointArn,
0,
256,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Comprehend_20171127.UpdateEndpoint'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DesiredInferenceUnits': desiredInferenceUnits,
'EndpointArn': endpointArn,
},
);
}