CreateMLEndpoint - Neptune Data API

CreateMLEndpoint

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.

Request Syntax

POST /ml/endpoints HTTP/1.1 Content-type: application/json { "id": "string", "instanceCount": number, "instanceType": "string", "mlModelTrainingJobId": "string", "mlModelTransformJobId": "string", "modelName": "string", "neptuneIamRoleArn": "string", "update": boolean, "volumeEncryptionKMSKey": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

id

A unique identifier for the new inference endpoint. The default is an autogenerated timestamped name.

Type: String

Required: No

instanceCount

The minimum number of Amazon EC2 instances to deploy to an endpoint for prediction. The default is 1

Type: Integer

Required: No

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.

Type: String

Required: No

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.

Type: String

Required: No

mlModelTransformJobId

The job Id of the completed model-transform job. You must supply either the mlModelTrainingJobId or the mlModelTransformJobId.

Type: String

Required: No

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.

Type: String

Required: No

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.

Type: String

Required: No

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.

Type: Boolean

Required: No

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.

Type: String

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "arn": "string", "creationTimeInMillis": number, "id": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

arn

The ARN for the new inference endpoint.

Type: String

creationTimeInMillis

The endpoint creation time, in milliseconds.

Type: Long

id

The unique ID of the new inference endpoint.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

BadRequestException

Raised when a request is submitted that cannot be processed.

HTTP Status Code: 400

ClientTimeoutException

Raised when a request timed out in the client.

HTTP Status Code: 408

ConstraintViolationException

Raised when a value in a request field did not satisfy required constraints.

HTTP Status Code: 400

IllegalArgumentException

Raised when an argument in a request is not supported.

HTTP Status Code: 400

InvalidArgumentException

Raised when an argument in a request has an invalid value.

HTTP Status Code: 400

InvalidParameterException

Raised when a parameter value is not valid.

HTTP Status Code: 400

MissingParameterException

Raised when a required parameter is missing.

HTTP Status Code: 400

MLResourceNotFoundException

Raised when a specified machine-learning resource could not be found.

HTTP Status Code: 404

PreconditionsFailedException

Raised when a precondition for processing a request is not satisfied.

HTTP Status Code: 400

TooManyRequestsException

Raised when the number of requests being processed exceeds the limit.

HTTP Status Code: 429

UnsupportedOperationException

Raised when a request attempts to initiate an operation that is not supported.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: