putExternalModel method

Future<void> putExternalModel({
  1. required ModelInputConfiguration inputConfiguration,
  2. required String invokeModelEndpointRoleArn,
  3. required String modelEndpoint,
  4. required ModelEndpointStatus modelEndpointStatus,
  5. required ModelSource modelSource,
  6. required ModelOutputConfiguration outputConfiguration,
  7. List<Tag>? tags,
})

Creates or updates an Amazon SageMaker model endpoint. You can also use this action to update the configuration of the model endpoint, including the IAM role and/or the mapped variables.

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

Parameter inputConfiguration : The model endpoint input configuration.

Parameter invokeModelEndpointRoleArn : The IAM role used to invoke the model endpoint.

Parameter modelEndpoint : The model endpoints name.

Parameter modelEndpointStatus : The model endpoint’s status in Amazon Fraud Detector.

Parameter modelSource : The source of the model.

Parameter outputConfiguration : The model endpoint output configuration.

Parameter tags : A collection of key and value pairs.

Implementation

Future<void> putExternalModel({
  required ModelInputConfiguration inputConfiguration,
  required String invokeModelEndpointRoleArn,
  required String modelEndpoint,
  required ModelEndpointStatus modelEndpointStatus,
  required ModelSource modelSource,
  required ModelOutputConfiguration outputConfiguration,
  List<Tag>? tags,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSHawksNestServiceFacade.PutExternalModel'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'inputConfiguration': inputConfiguration,
      'invokeModelEndpointRoleArn': invokeModelEndpointRoleArn,
      'modelEndpoint': modelEndpoint,
      'modelEndpointStatus': modelEndpointStatus.value,
      'modelSource': modelSource.value,
      'outputConfiguration': outputConfiguration,
      if (tags != null) 'tags': tags,
    },
  );
}