AWS neptune documentation change
Summary
Added comprehensive examples for starting Neptune loader jobs using AWS CLI, SDK (boto3), awscurl, and curl commands with various configuration parameters.
Security assessment
This change expands documentation with multiple implementation examples for the start-loader-job API. No security vulnerabilities are mentioned or addressed. The examples include standard parameters like IAM role ARNs and region settings, which are normal operational configurations. The note about AWS credentials is routine guidance, not a security update.
Diff
diff --git a/neptune/latest/userguide/load-api-reference-load-examples.md b/neptune/latest/userguide/load-api-reference-load-examples.md index b8dbd466c..8a266723c 100644 --- a//neptune/latest/userguide/load-api-reference-load-examples.md +++ b//neptune/latest/userguide/load-api-reference-load-examples.md @@ -12,0 +13 @@ The following is a request sent via HTTP POST using the `curl` command. It loads +AWS CLI @@ -14 +15,49 @@ The following is a request sent via HTTP POST using the `curl` command. It loads - curl -X POST \ + + + aws neptunedata start-loader-job \ + --endpoint-url https://your-neptune-endpoint:port \ + --source "s3://bucket-name/object-key-name" \ + --format "csv" \ + --iam-role-arn "ARN for the IAM role you are using" \ + --s3-bucket-region "region" \ + --no-fail-on-error \ + --parallelism "MEDIUM" \ + --no-update-single-cardinality-properties \ + --no-queue-request + +For more information, see [start-loader-job](https://docs.aws.amazon.com/cli/latest/reference/neptunedata/start-loader-job.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.start_loader_job( + source='s3://bucket-name/object-key-name', + format='csv', + iamRoleArn='ARN for the IAM role you are using', + s3BucketRegion='region', + failOnError=False, + parallelism='MEDIUM', + updateSingleCardinalityProperties=False, + queueRequest=False + ) + + print(response) + +awscurl + + + + awscurl https://your-neptune-endpoint:port/loader \ + --region us-east-1 \ + --service neptune-db \ + -X POST \ @@ -16,2 +65,22 @@ The following is a request sent via HTTP POST using the `curl` command. It loads - https://your-neptune-endpoint:port/loader -d ' - { + -d '{ + "source" : "s3://bucket-name/object-key-name", + "format" : "csv", + "iamRoleArn" : "ARN for the IAM role you are using", + "region" : "region", + "failOnError" : "FALSE", + "parallelism" : "MEDIUM", + "updateSingleCardinalityProperties" : "FALSE", + "queueRequest" : "FALSE" + }' + +###### 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 + + + + curl -X POST https://your-neptune-endpoint:port/loader \ + -H 'Content-Type: application/json' \ + -d '{