AWS neptune documentation change
Summary
Added comprehensive examples for Neptune ML endpoints API operations using AWS CLI, SDK (Python), awscurl, and curl. Updated endpoint URL format from placeholder '(your Neptune endpoint)' to 'your-neptune-endpoint:port' and added detailed parameter documentation for create, update, get, delete, and list operations.
Security assessment
The changes are purely documentation improvements adding usage examples and clarifying API syntax. There is no evidence of addressing a security vulnerability, weakness, or incident. The changes focus on improving developer experience by providing multiple implementation examples and correcting parameter names (e.g., changing 'model-training' to 'model-transform' in some places). No security features, authentication methods, or vulnerability mitigations are introduced.
Diff
diff --git a/neptune/latest/userguide/machine-learning-api-endpoints.md b/neptune/latest/userguide/machine-learning-api-endpoints.md index 3d0249932..badbce59b 100644 --- a//neptune/latest/userguide/machine-learning-api-endpoints.md +++ b//neptune/latest/userguide/machine-learning-api-endpoints.md @@ -14,0 +15,52 @@ A Neptune ML `endpoints` command for creating an inference endpoint from a model +AWS CLI + + + + aws neptunedata create-ml-endpoint \ + --endpoint-url https://your-neptune-endpoint:port \ + --id "(a unique ID for the new endpoint)" \ + --ml-model-training-job-id "(the model-training job-id of a completed job)" + +For more information, see [create-ml-endpoint](https://docs.aws.amazon.com/cli/latest/reference/neptunedata/create-ml-endpoint.html) in the AWS CLI Command Reference. + +SDK + + + + import boto3 + from botocore.config import Config + + client = boto3.client( + 'neptunedata', + endpoint_url='https://your-neptune-endpoint:port', + config=Config(read_timeout=None, retries={'total_max_attempts': 1}) + ) + + response = client.create_ml_endpoint( + id='(a unique ID for the new endpoint)', + mlModelTrainingJobId='(the model-training job-id of a completed job)' + ) + + print(response) + +awscurl + + + + awscurl https://your-neptune-endpoint:port/ml/endpoints \ + --region us-east-1 \ + --service neptune-db \ + -X POST \ + -H 'Content-Type: application/json' \ + -d '{ + "id" : "(a unique ID for the new endpoint)", + "mlModelTrainingJobId": "(the model-training job-id of a completed job)" + }' + +###### Note + +This example assumes that your AWS credentials are configured in your environment. Replace `us-east-1` with the Region of your Neptune cluster. + +curl + + @@ -17 +69 @@ A Neptune ML `endpoints` command for creating an inference endpoint from a model - -X POST https://(your Neptune endpoint)/ml/endpoints + -X POST https://your-neptune-endpoint:port/ml/endpoints \ @@ -25,0 +78,55 @@ A Neptune ML `endpoints` command for updating an existing inference endpoint fro +AWS CLI + + + + aws neptunedata create-ml-endpoint \ + --endpoint-url https://your-neptune-endpoint:port \ + --id "(a unique ID for the new endpoint)" \ + --update \ + --ml-model-training-job-id "(the model-training job-id of a completed job)" + +For more information, see [create-ml-endpoint](https://docs.aws.amazon.com/cli/latest/reference/neptunedata/create-ml-endpoint.html) in the AWS CLI Command Reference. + +SDK + + + + import boto3 + from botocore.config import Config + + client = boto3.client( + 'neptunedata', + endpoint_url='https://your-neptune-endpoint:port', + config=Config(read_timeout=None, retries={'total_max_attempts': 1}) + ) + + response = client.create_ml_endpoint( + id='(a unique ID for the new endpoint)', + update=True, + mlModelTrainingJobId='(the model-training job-id of a completed job)' + ) + + print(response) + +awscurl + + + + awscurl https://your-neptune-endpoint:port/ml/endpoints \ + --region us-east-1 \ + --service neptune-db \ + -X POST \ + -H 'Content-Type: application/json' \ + -d '{ + "id" : "(a unique ID for the new endpoint)", + "update" : "true", + "mlModelTrainingJobId": "(the model-training job-id of a completed job)" + }' + +###### Note + +This example assumes that your AWS credentials are configured in your environment. Replace `us-east-1` with the Region of your Neptune cluster. + +curl + + @@ -28 +135 @@ A Neptune ML `endpoints` command for updating an existing inference endpoint fro - -X POST https://(your Neptune endpoint)/ml/endpoints + -X POST https://your-neptune-endpoint:port/ml/endpoints \ @@ -37,0 +145,52 @@ A Neptune ML `endpoints` command for creating an inference endpoint from a model +AWS CLI + + + + aws neptunedata create-ml-endpoint \ + --endpoint-url https://your-neptune-endpoint:port \ + --id "(a unique ID for the new endpoint)" \ + --ml-model-transform-job-id "(the model-transform job-id of a completed job)" + +For more information, see [create-ml-endpoint](https://docs.aws.amazon.com/cli/latest/reference/neptunedata/create-ml-endpoint.html) in the AWS CLI Command Reference. + +SDK + + + + import boto3 + from botocore.config import Config + + client = boto3.client( + 'neptunedata', + endpoint_url='https://your-neptune-endpoint:port', + config=Config(read_timeout=None, retries={'total_max_attempts': 1}) + ) + + response = client.create_ml_endpoint( + id='(a unique ID for the new endpoint)', + mlModelTransformJobId='(the model-transform job-id of a completed job)' + ) + + print(response) + +awscurl + + + + awscurl https://your-neptune-endpoint:port/ml/endpoints \ + --region us-east-1 \ + --service neptune-db \ + -X POST \ + -H 'Content-Type: application/json' \ + -d '{ + "id" : "(a unique ID for the new endpoint)", + "mlModelTransformJobId": "(the model-transform job-id of a completed job)" + }' + +###### Note + +This example assumes that your AWS credentials are configured in your environment. Replace `us-east-1` with the Region of your Neptune cluster. + +curl + + @@ -40 +199 @@ A Neptune ML `endpoints` command for creating an inference endpoint from a model - -X POST https://(your Neptune endpoint)/ml/endpoints + -X POST https://your-neptune-endpoint:port/ml/endpoints \ @@ -44 +203 @@ A Neptune ML `endpoints` command for creating an inference endpoint from a model - "mlModelTransformJobId": "(the model-training job-id of a completed job)" + "mlModelTransformJobId": "(the model-transform job-id of a completed job)" @@ -48,0 +208,55 @@ A Neptune ML `endpoints` command for updating an existing inference endpoint fro +AWS CLI + + + + aws neptunedata create-ml-endpoint \ + --endpoint-url https://your-neptune-endpoint:port \ + --id "(a unique ID for the new endpoint)" \ + --update \ + --ml-model-transform-job-id "(the model-transform job-id of a completed job)" + +For more information, see [create-ml-endpoint](https://docs.aws.amazon.com/cli/latest/reference/neptunedata/create-ml-endpoint.html) in the AWS CLI Command Reference. + +SDK + + + + import boto3 + from botocore.config import Config + + client = boto3.client( + 'neptunedata',