deleteEndpoint method

Future<void> deleteEndpoint({
  1. required String endpointArn,
})

Deletes a model-specific endpoint for a previously-trained custom model. All endpoints must be deleted in order for the model to be deleted.

May throw InvalidRequestException. May throw ResourceInUseException. May throw ResourceNotFoundException. May throw TooManyRequestsException. May throw InternalServerException.

Parameter endpointArn : The Amazon Resource Number (ARN) of the endpoint being deleted.

Implementation

Future<void> deleteEndpoint({
  required String endpointArn,
}) async {
  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.DeleteEndpoint'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'EndpointArn': endpointArn,
    },
  );
}