createMLEndpoint method
Creates a new Neptune ML inference endpoint that lets you query one specific model that the model-training process constructed. See Managing inference endpoints using the endpoints command.
When invoking this operation in a Neptune cluster that has IAM authentication enabled, the IAM user or role making the request must have a policy attached that allows the neptune-db:CreateMLEndpoint IAM action in that cluster.
May throw BadRequestException.
May throw ClientTimeoutException.
May throw ConstraintViolationException.
May throw IllegalArgumentException.
May throw InvalidArgumentException.
May throw InvalidParameterException.
May throw MissingParameterException.
May throw MLResourceNotFoundException.
May throw PreconditionsFailedException.
May throw TooManyRequestsException.
May throw UnsupportedOperationException.
Parameter id :
A unique identifier for the new inference endpoint. The default is an
autogenerated timestamped name.
Parameter instanceCount :
The minimum number of Amazon EC2 instances to deploy to an endpoint for
prediction. The default is 1
Parameter instanceType :
The type of Neptune ML instance to use for online servicing. The default
is ml.m5.xlarge. Choosing the ML instance for an inference
endpoint depends on the task type, the graph size, and your budget.
Parameter mlModelTrainingJobId :
The job Id of the completed model-training job that has created the model
that the inference endpoint will point to. You must supply either the
mlModelTrainingJobId or the
mlModelTransformJobId.
Parameter mlModelTransformJobId :
The job Id of the completed model-transform job. You must supply either
the mlModelTrainingJobId or the
mlModelTransformJobId.
Parameter modelName :
Model type for training. By default the Neptune ML model is automatically
based on the modelType used in data processing, but you can
specify a different model type here. The default is rgcn for
heterogeneous graphs and kge for knowledge graphs. The only
valid value for heterogeneous graphs is rgcn. Valid values
for knowledge graphs are: kge, transe,
distmult, and rotate.
Parameter neptuneIamRoleArn :
The ARN of an IAM role providing Neptune access to SageMaker and Amazon S3
resources. This must be listed in your DB cluster parameter group or an
error will be thrown.
Parameter update :
If set to true, update indicates that this is an
update request. The default is false. You must supply either
the mlModelTrainingJobId or the
mlModelTransformJobId.
Parameter volumeEncryptionKMSKey :
The Amazon Key Management Service (Amazon KMS) key that SageMaker uses to
encrypt data on the storage volume attached to the ML compute instances
that run the training job. The default is None.
Implementation
Future<CreateMLEndpointOutput> createMLEndpoint({
String? id,
int? instanceCount,
String? instanceType,
String? mlModelTrainingJobId,
String? mlModelTransformJobId,
String? modelName,
String? neptuneIamRoleArn,
bool? update,
String? volumeEncryptionKMSKey,
}) async {
final $payload = <String, dynamic>{
if (id != null) 'id': id,
if (instanceCount != null) 'instanceCount': instanceCount,
if (instanceType != null) 'instanceType': instanceType,
if (mlModelTrainingJobId != null)
'mlModelTrainingJobId': mlModelTrainingJobId,
if (mlModelTransformJobId != null)
'mlModelTransformJobId': mlModelTransformJobId,
if (modelName != null) 'modelName': modelName,
if (neptuneIamRoleArn != null) 'neptuneIamRoleArn': neptuneIamRoleArn,
if (update != null) 'update': update,
if (volumeEncryptionKMSKey != null)
'volumeEncryptionKMSKey': volumeEncryptionKMSKey,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/ml/endpoints',
exceptionFnMap: _exceptionFns,
);
return CreateMLEndpointOutput.fromJson(response);
}