We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.Neptunedata

Inherits:
AWS.Service show all
Identifier:
neptunedata
API Version:
2023-08-01
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

The Amazon Neptune data API provides SDK support for more than 40 of Neptune's data operations, including data loading, query execution, data inquiry, and machine learning. It supports the Gremlin and openCypher query languages, and is available in all SDK languages. It automatically signs API requests and greatly simplifies integrating Neptune into your applications.

Sending a Request Using Neptunedata

var neptunedata = new AWS.Neptunedata();
neptunedata.cancelGremlinQuery(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the Neptunedata object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var neptunedata = new AWS.Neptunedata({apiVersion: '2023-08-01'});

You can also set the API version globally in AWS.config.apiVersions using the neptunedata service identifier:

AWS.config.apiVersions = {
  neptunedata: '2023-08-01',
  // other service API versions
};

var neptunedata = new AWS.Neptunedata();

Version:

  • 2023-08-01

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.Neptunedata(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a Neptunedata object

var neptunedata = new AWS.Neptunedata({apiVersion: '2023-08-01'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.Neptunedata.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.Neptunedata.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Neptunedata.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

cancelGremlinQuery(params = {}, callback) ⇒ AWS.Request

Cancels a Gremlin query. See Gremlin query cancellation for more information.

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:CancelQuery IAM action in that cluster.

Service Reference:

Examples:

Calling the cancelGremlinQuery operation

var params = {
  queryId: 'STRING_VALUE' /* required */
};
neptunedata.cancelGremlinQuery(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • queryId — (String)

      The unique identifier that identifies the query to be canceled.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The status of the cancelation

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

cancelLoaderJob(params = {}, callback) ⇒ AWS.Request

Cancels a specified load job. This is an HTTP DELETE request. See Neptune Loader Get-Status API for more information.

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:CancelLoaderJob IAM action in that cluster..

Service Reference:

Examples:

Calling the cancelLoaderJob operation

var params = {
  loadId: 'STRING_VALUE' /* required */
};
neptunedata.cancelLoaderJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • loadId — (String)

      The ID of the load job to be deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The cancellation status.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

cancelMLDataProcessingJob(params = {}, callback) ⇒ AWS.Request

Cancels a Neptune ML data processing job. See The dataprocessing 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:CancelMLDataProcessingJob IAM action in that cluster.

Service Reference:

Examples:

Calling the cancelMLDataProcessingJob operation

var params = {
  id: 'STRING_VALUE', /* required */
  clean: true || false,
  neptuneIamRoleArn: 'STRING_VALUE'
};
neptunedata.cancelMLDataProcessingJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • id — (String)

      The unique identifier of the data-processing job.

    • neptuneIamRoleArn — (String)

      The ARN of an IAM role that provides Neptune access to SageMaker and Amazon S3 resources. This must be listed in your DB cluster parameter group or an error will occur.

    • clean — (Boolean)

      If set to TRUE, this flag specifies that all Neptune ML S3 artifacts should be deleted when the job is stopped. The default is FALSE.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The status of the cancellation request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

cancelMLModelTrainingJob(params = {}, callback) ⇒ AWS.Request

Cancels a Neptune ML model training job. See Model training using the modeltraining 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:CancelMLModelTrainingJob IAM action in that cluster.

Service Reference:

Examples:

Calling the cancelMLModelTrainingJob operation

var params = {
  id: 'STRING_VALUE', /* required */
  clean: true || false,
  neptuneIamRoleArn: 'STRING_VALUE'
};
neptunedata.cancelMLModelTrainingJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • id — (String)

      The unique identifier of the model-training job to be canceled.

    • neptuneIamRoleArn — (String)

      The ARN of an IAM role that provides Neptune access to SageMaker and Amazon S3 resources. This must be listed in your DB cluster parameter group or an error will occur.

    • clean — (Boolean)

      If set to TRUE, this flag specifies that all Amazon S3 artifacts should be deleted when the job is stopped. The default is FALSE.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The status of the cancellation.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

cancelMLModelTransformJob(params = {}, callback) ⇒ AWS.Request

Cancels a specified model transform job. See Use a trained model to generate new model artifacts.

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:CancelMLModelTransformJob IAM action in that cluster.

Service Reference:

Examples:

Calling the cancelMLModelTransformJob operation

var params = {
  id: 'STRING_VALUE', /* required */
  clean: true || false,
  neptuneIamRoleArn: 'STRING_VALUE'
};
neptunedata.cancelMLModelTransformJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • id — (String)

      The unique ID of the model transform job to be canceled.

    • neptuneIamRoleArn — (String)

      The ARN of an IAM role that provides Neptune access to SageMaker and Amazon S3 resources. This must be listed in your DB cluster parameter group or an error will occur.

    • clean — (Boolean)

      If this flag is set to TRUE, all Neptune ML S3 artifacts should be deleted when the job is stopped. The default is FALSE.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        the status of the cancelation.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

cancelOpenCypherQuery(params = {}, callback) ⇒ AWS.Request

Cancels a specified openCypher query. See Neptune openCypher status endpoint for more information.

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:CancelQuery IAM action in that cluster.

Service Reference:

Examples:

Calling the cancelOpenCypherQuery operation

var params = {
  queryId: 'STRING_VALUE', /* required */
  silent: true || false
};
neptunedata.cancelOpenCypherQuery(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • queryId — (String)

      The unique ID of the openCypher query to cancel.

    • silent — (Boolean)

      If set to TRUE, causes the cancelation of the openCypher query to happen silently.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The cancellation status of the openCypher query.

      • payload — (Boolean)

        The cancelation payload for the openCypher query.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createMLEndpoint(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createMLEndpoint operation

var params = {
  id: 'STRING_VALUE',
  instanceCount: 'NUMBER_VALUE',
  instanceType: 'STRING_VALUE',
  mlModelTrainingJobId: 'STRING_VALUE',
  mlModelTransformJobId: 'STRING_VALUE',
  modelName: 'STRING_VALUE',
  neptuneIamRoleArn: 'STRING_VALUE',
  update: true || false,
  volumeEncryptionKMSKey: 'STRING_VALUE'
};
neptunedata.createMLEndpoint(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • id — (String)

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

    • mlModelTrainingJobId — (String)

      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.

    • mlModelTransformJobId — (String)

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

    • update — (Boolean)

      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.

    • neptuneIamRoleArn — (String)

      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.

    • modelName — (String)

      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.

    • instanceType — (String)

      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.

    • instanceCount — (Integer)

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

    • volumeEncryptionKMSKey — (String)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • id — (String)

        The unique ID of the new inference endpoint.

      • arn — (String)

        The ARN for the new inference endpoint.

      • creationTimeInMillis — (Integer)

        The endpoint creation time, in milliseconds.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteMLEndpoint(params = {}, callback) ⇒ AWS.Request

Cancels the creation of a Neptune ML inference endpoint. 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:DeleteMLEndpoint IAM action in that cluster.

Service Reference:

Examples:

Calling the deleteMLEndpoint operation

var params = {
  id: 'STRING_VALUE', /* required */
  clean: true || false,
  neptuneIamRoleArn: 'STRING_VALUE'
};
neptunedata.deleteMLEndpoint(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • id — (String)

      The unique identifier of the inference endpoint.

    • neptuneIamRoleArn — (String)

      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.

    • clean — (Boolean)

      If this flag is set to TRUE, all Neptune ML S3 artifacts should be deleted when the job is stopped. The default is FALSE.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The status of the cancellation.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deletePropertygraphStatistics(params = {}, callback) ⇒ AWS.Request

Deletes statistics for Gremlin and openCypher (property graph) data.

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:DeleteStatistics IAM action in that cluster.

Service Reference:

Examples:

Calling the deletePropertygraphStatistics operation

neptunedata.deletePropertygraphStatistics(function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • statusCode — (Integer)

        The HTTP response code: 200 if the delete was successful, or 204 if there were no statistics to delete.

      • status — (String)

        The cancel status.

      • payload — (map)

        The deletion payload.

        • active — (Boolean)

          The current status of the statistics.

        • statisticsId — (String)

          The ID of the statistics generation run that is currently occurring.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteSparqlStatistics(params = {}, callback) ⇒ AWS.Request

Deletes SPARQL statistics

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:DeleteStatistics IAM action in that cluster.

Service Reference:

Examples:

Calling the deleteSparqlStatistics operation

neptunedata.deleteSparqlStatistics(function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • statusCode — (Integer)

        The HTTP response code: 200 if the delete was successful, or 204 if there were no statistics to delete.

      • status — (String)

        The cancel status.

      • payload — (map)

        The deletion payload.

        • active — (Boolean)

          The current status of the statistics.

        • statisticsId — (String)

          The ID of the statistics generation run that is currently occurring.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

executeFastReset(params = {}, callback) ⇒ AWS.Request

The fast reset REST API lets you reset a Neptune graph quicky and easily, removing all of its data.

Neptune fast reset is a two-step process. First you call ExecuteFastReset with action set to initiateDatabaseReset. This returns a UUID token which you then include when calling ExecuteFastReset again with action set to performDatabaseReset. See Empty an Amazon Neptune DB cluster using the fast reset API.

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:ResetDatabase IAM action in that cluster.

Service Reference:

Examples:

Calling the executeFastReset operation

var params = {
  action: initiateDatabaseReset | performDatabaseReset, /* required */
  token: 'STRING_VALUE'
};
neptunedata.executeFastReset(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • action — (String)

      The fast reset action. One of the following values:

      • initiateDatabaseReset   –   This action generates a unique token needed to actually perform the fast reset.

      • performDatabaseReset   –   This action uses the token generated by the initiateDatabaseReset action to actually perform the fast reset.

      Possible values include:
      • "initiateDatabaseReset"
      • "performDatabaseReset"
    • token — (String)

      The fast-reset token to initiate the reset.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The status is only returned for the performDatabaseReset action, and indicates whether or not the fast reset rquest is accepted.

      • payload — (map)

        The payload is only returned by the initiateDatabaseReset action, and contains the unique token to use with the performDatabaseReset action to make the reset occur.

        • token — (String)

          A UUID generated by the database in the initiateDatabaseReset action, and then consumed by the performDatabaseReset to reset the database.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

executeGremlinExplainQuery(params = {}, callback) ⇒ AWS.Request

Executes a Gremlin Explain query.

Amazon Neptune has added a Gremlin feature named explain that provides is a self-service tool for understanding the execution approach being taken by the Neptune engine for the query. You invoke it by adding an explain parameter to an HTTP call that submits a Gremlin query.

The explain feature provides information about the logical structure of query execution plans. You can use this information to identify potential evaluation and execution bottlenecks and to tune your query, as explained in Tuning Gremlin queries. You can also use query hints to improve query execution plans.

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 one of the following IAM actions in that cluster, depending on the query:

Note that the neptune-db:QueryLanguage:Gremlin IAM condition key can be used in the policy document to restrict the use of Gremlin queries (see Condition keys available in Neptune IAM data-access policy statements).

Service Reference:

Examples:

Calling the executeGremlinExplainQuery operation

var params = {
  gremlinQuery: 'STRING_VALUE' /* required */
};
neptunedata.executeGremlinExplainQuery(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • gremlinQuery — (String)

      The Gremlin explain query string.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • output — (Buffer(Node.js), Typed Array(Browser))

        A text blob containing the Gremlin explain result, as described in Tuning Gremlin queries.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

executeGremlinProfileQuery(params = {}, callback) ⇒ AWS.Request

Executes a Gremlin Profile query, which runs a specified traversal, collects various metrics about the run, and produces a profile report as output. See Gremlin profile API in Neptune for details.

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:ReadDataViaQuery IAM action in that cluster.

Note that the neptune-db:QueryLanguage:Gremlin IAM condition key can be used in the policy document to restrict the use of Gremlin queries (see Condition keys available in Neptune IAM data-access policy statements).

Service Reference:

Examples:

Calling the executeGremlinProfileQuery operation

var params = {
  gremlinQuery: 'STRING_VALUE', /* required */
  chop: 'NUMBER_VALUE',
  indexOps: true || false,
  results: true || false,
  serializer: 'STRING_VALUE'
};
neptunedata.executeGremlinProfileQuery(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • gremlinQuery — (String)

      The Gremlin query string to profile.

    • results — (Boolean)

      If this flag is set to TRUE, the query results are gathered and displayed as part of the profile report. If FALSE, only the result count is displayed.

    • chop — (Integer)

      If non-zero, causes the results string to be truncated at that number of characters. If set to zero, the string contains all the results.

    • serializer — (String)

      If non-null, the gathered results are returned in a serialized response message in the format specified by this parameter. See Gremlin profile API in Neptune for more information.

    • indexOps — (Boolean)

      If this flag is set to TRUE, the results include a detailed report of all index operations that took place during query execution and serialization.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • output — (Buffer(Node.js), Typed Array(Browser))

        A text blob containing the Gremlin Profile result. See Gremlin profile API in Neptune for details.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

executeGremlinQuery(params = {}, callback) ⇒ AWS.Request

This commands executes a Gremlin query. Amazon Neptune is compatible with Apache TinkerPop3 and Gremlin, so you can use the Gremlin traversal language to query the graph, as described under The Graph in the Apache TinkerPop3 documentation. More details can also be found in Accessing a Neptune graph with Gremlin.

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 enables one of the following IAM actions in that cluster, depending on the query:

Note that the neptune-db:QueryLanguage:Gremlin IAM condition key can be used in the policy document to restrict the use of Gremlin queries (see Condition keys available in Neptune IAM data-access policy statements).

Service Reference:

Examples:

Calling the executeGremlinQuery operation

var params = {
  gremlinQuery: 'STRING_VALUE', /* required */
  serializer: 'STRING_VALUE'
};
neptunedata.executeGremlinQuery(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • gremlinQuery — (String)

      Using this API, you can run Gremlin queries in string format much as you can using the HTTP endpoint. The interface is compatible with whatever Gremlin version your DB cluster is using (see the Tinkerpop client section to determine which Gremlin releases your engine version supports).

    • serializer — (String)

      If non-null, the query results are returned in a serialized response message in the format specified by this parameter. See the GraphSON section in the TinkerPop documentation for a list of the formats that are currently supported.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • requestId — (String)

        The unique identifier of the Gremlin query.

      • status — (map)

        The status of the Gremlin query.

        • message — (String)

          The status message.

        • code — (Integer)

          The HTTP response code returned fro the Gremlin query request..

        • attributes — (map)

          Attributes of the Gremlin query status.

      • result — (map)

        The Gremlin query output from the server.

      • meta — (map)

        Metadata about the Gremlin query.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

executeOpenCypherExplainQuery(params = {}, callback) ⇒ AWS.Request

Executes an openCypher explain request. See The openCypher explain feature for more information.

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:ReadDataViaQuery IAM action in that cluster.

Note that the neptune-db:QueryLanguage:OpenCypher IAM condition key can be used in the policy document to restrict the use of openCypher queries (see Condition keys available in Neptune IAM data-access policy statements).

Service Reference:

Examples:

Calling the executeOpenCypherExplainQuery operation

var params = {
  explainMode: static | dynamic | details, /* required */
  openCypherQuery: 'STRING_VALUE', /* required */
  parameters: 'STRING_VALUE'
};
neptunedata.executeOpenCypherExplainQuery(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • openCypherQuery — (String)

      The openCypher query string.

    • parameters — (String)

      The openCypher query parameters.

    • explainMode — (String)

      The openCypher explain mode. Can be one of: static, dynamic, or details.

      Possible values include:
      • "static"
      • "dynamic"
      • "details"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • results — (Buffer(Node.js), Typed Array(Browser))

        A text blob containing the openCypher explain results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

executeOpenCypherQuery(params = {}, callback) ⇒ AWS.Request

Executes an openCypher query. See Accessing the Neptune Graph with openCypher for more information.

Neptune supports building graph applications using openCypher, which is currently one of the most popular query languages among developers working with graph databases. Developers, business analysts, and data scientists like openCypher's declarative, SQL-inspired syntax because it provides a familiar structure in which to querying property graphs.

The openCypher language was originally developed by Neo4j, then open-sourced in 2015 and contributed to the openCypher project under an Apache 2 open-source license.

Note that 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 one of the following IAM actions in that cluster, depending on the query:

Note also that the neptune-db:QueryLanguage:OpenCypher IAM condition key can be used in the policy document to restrict the use of openCypher queries (see Condition keys available in Neptune IAM data-access policy statements).

Service Reference:

Examples:

Calling the executeOpenCypherQuery operation

var params = {
  openCypherQuery: 'STRING_VALUE', /* required */
  parameters: 'STRING_VALUE'
};
neptunedata.executeOpenCypherQuery(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • openCypherQuery — (String)

      The openCypher query string to be executed.

    • parameters — (String)

      The openCypher query parameters for query execution. See Examples of openCypher parameterized queries for more information.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • results — (map)

        The openCypherquery results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getEngineStatus(params = {}, callback) ⇒ AWS.Request

Retrieves the status of the graph database on the host.

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:GetEngineStatus IAM action in that cluster.

Service Reference:

Examples:

Calling the getEngineStatus operation

neptunedata.getEngineStatus(function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        Set to healthy if the instance is not experiencing problems. If the instance is recovering from a crash or from being rebooted and there are active transactions running from the latest server shutdown, status is set to recovery.

      • startTime — (String)

        Set to the UTC time at which the current server process started.

      • dbEngineVersion — (String)

        Set to the Neptune engine version running on your DB cluster. If this engine version has been manually patched since it was released, the version number is prefixed by Patch-.

      • role — (String)

        Set to reader if the instance is a read-replica, or to writer if the instance is the primary instance.

      • dfeQueryEngine — (String)

        Set to enabled if the DFE engine is fully enabled, or to viaQueryHint (the default) if the DFE engine is only used with queries that have the useDFE query hint set to true.

      • gremlin — (map)

        Contains information about the Gremlin query language available on your cluster. Specifically, it contains a version field that specifies the current TinkerPop version being used by the engine.

        • versionrequired — (String)

          The version of the query language.

      • sparql — (map)

        Contains information about the SPARQL query language available on your cluster. Specifically, it contains a version field that specifies the current SPARQL version being used by the engine.

        • versionrequired — (String)

          The version of the query language.

      • opencypher — (map)

        Contains information about the openCypher query language available on your cluster. Specifically, it contains a version field that specifies the current operCypher version being used by the engine.

        • versionrequired — (String)

          The version of the query language.

      • labMode — (map<String>)

        Contains Lab Mode settings being used by the engine.

      • rollingBackTrxCount — (Integer)

        If there are transactions being rolled back, this field is set to the number of such transactions. If there are none, the field doesn't appear at all.

      • rollingBackTrxEarliestStartTime — (String)

        Set to the start time of the earliest transaction being rolled back. If no transactions are being rolled back, the field doesn't appear at all.

      • features — (map<map>)

        Contains status information about the features enabled on your DB cluster.

      • settings — (map<String>)

        Contains information about the current settings on your DB cluster. For example, contains the current cluster query timeout setting (clusterQueryTimeoutInMs).

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getGremlinQueryStatus(params = {}, callback) ⇒ AWS.Request

Gets the status of a specified Gremlin query.

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:GetQueryStatus IAM action in that cluster.

Note that the neptune-db:QueryLanguage:Gremlin IAM condition key can be used in the policy document to restrict the use of Gremlin queries (see Condition keys available in Neptune IAM data-access policy statements).

Service Reference:

Examples:

Calling the getGremlinQueryStatus operation

var params = {
  queryId: 'STRING_VALUE' /* required */
};
neptunedata.getGremlinQueryStatus(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • queryId — (String)

      The unique identifier that identifies the Gremlin query.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • queryId — (String)

        The ID of the query for which status is being returned.

      • queryString — (String)

        The Gremlin query string.

      • queryEvalStats — (map)

        The evaluation status of the Gremlin query.

        • waited — (Integer)

          Indicates how long the query waited, in milliseconds.

        • elapsed — (Integer)

          The number of milliseconds the query has been running so far.

        • cancelled — (Boolean)

          Set to TRUE if the query was cancelled, or FALSE otherwise.

        • subqueries — (map)

          The number of subqueries in this query.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getLoaderJobStatus(params = {}, callback) ⇒ AWS.Request

Gets status information about a specified load job. Neptune keeps track of the most recent 1,024 bulk load jobs, and stores the last 10,000 error details per job.

See Neptune Loader Get-Status API for more information.

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:GetLoaderJobStatus IAM action in that cluster..

Service Reference:

Examples:

Calling the getLoaderJobStatus operation

var params = {
  loadId: 'STRING_VALUE', /* required */
  details: true || false,
  errors: true || false,
  errorsPerPage: 'NUMBER_VALUE',
  page: 'NUMBER_VALUE'
};
neptunedata.getLoaderJobStatus(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • loadId — (String)

      The load ID of the load job to get the status of.

    • details — (Boolean)

      Flag indicating whether or not to include details beyond the overall status (TRUE or FALSE; the default is FALSE).

    • errors — (Boolean)

      Flag indicating whether or not to include a list of errors encountered (TRUE or FALSE; the default is FALSE).

      The list of errors is paged. The page and errorsPerPage parameters allow you to page through all the errors.

    • page — (Integer)

      The error page number (a positive integer; the default is 1). Only valid when the errors parameter is set to TRUE.

    • errorsPerPage — (Integer)

      The number of errors returned in each page (a positive integer; the default is 10). Only valid when the errors parameter set to TRUE.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The HTTP response code for the request.

      • payload — (map)

        Status information about the load job, in a layout that could look like this:

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getMLDataProcessingJob(params = {}, callback) ⇒ AWS.Request

Retrieves information about a specified data processing job. See The dataprocessing 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:neptune-db:GetMLDataProcessingJobStatus IAM action in that cluster.

Service Reference:

Examples:

Calling the getMLDataProcessingJob operation

var params = {
  id: 'STRING_VALUE', /* required */
  neptuneIamRoleArn: 'STRING_VALUE'
};
neptunedata.getMLDataProcessingJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • id — (String)

      The unique identifier of the data-processing job to be retrieved.

    • neptuneIamRoleArn — (String)

      The ARN of an IAM role that provides Neptune access to SageMaker and Amazon S3 resources. This must be listed in your DB cluster parameter group or an error will occur.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        Status of the data processing job.

      • id — (String)

        The unique identifier of this data-processing job.

      • processingJob — (map)

        Definition of the data processing job.

        • name — (String)

          The resource name.

        • arn — (String)

          The resource ARN.

        • status — (String)

          The resource status.

        • outputLocation — (String)

          The output location.

        • failureReason — (String)

          The failure reason, in case of a failure.

        • cloudwatchLogUrl — (String)

          The CloudWatch log URL for the resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getMLEndpoint(params = {}, callback) ⇒ AWS.Request

Retrieves details about an inference endpoint. 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:GetMLEndpointStatus IAM action in that cluster.

Service Reference:

Examples:

Calling the getMLEndpoint operation

var params = {
  id: 'STRING_VALUE', /* required */
  neptuneIamRoleArn: 'STRING_VALUE'
};
neptunedata.getMLEndpoint(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • id — (String)

      The unique identifier of the inference endpoint.

    • neptuneIamRoleArn — (String)

      The ARN of an IAM role that provides Neptune access to SageMaker and Amazon S3 resources. This must be listed in your DB cluster parameter group or an error will occur.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The status of the inference endpoint.

      • id — (String)

        The unique identifier of the inference endpoint.

      • endpoint — (map)

        The endpoint definition.

        • name — (String)

          The resource name.

        • arn — (String)

          The resource ARN.

        • status — (String)

          The resource status.

        • outputLocation — (String)

          The output location.

        • failureReason — (String)

          The failure reason, in case of a failure.

        • cloudwatchLogUrl — (String)

          The CloudWatch log URL for the resource.

      • endpointConfig — (map)

        The endpoint configuration

        • name — (String)

          The configuration name.

        • arn — (String)

          The ARN for the configuration.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getMLModelTrainingJob(params = {}, callback) ⇒ AWS.Request

Retrieves information about a Neptune ML model training job. See Model training using the modeltraining 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:GetMLModelTrainingJobStatus IAM action in that cluster.

Service Reference:

Examples:

Calling the getMLModelTrainingJob operation

var params = {
  id: 'STRING_VALUE', /* required */
  neptuneIamRoleArn: 'STRING_VALUE'
};
neptunedata.getMLModelTrainingJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • id — (String)

      The unique identifier of the model-training job to retrieve.

    • neptuneIamRoleArn — (String)

      The ARN of an IAM role that provides Neptune access to SageMaker and Amazon S3 resources. This must be listed in your DB cluster parameter group or an error will occur.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The status of the model training job.

      • id — (String)

        The unique identifier of this model-training job.

      • processingJob — (map)

        The data processing job.

        • name — (String)

          The resource name.

        • arn — (String)

          The resource ARN.

        • status — (String)

          The resource status.

        • outputLocation — (String)

          The output location.

        • failureReason — (String)

          The failure reason, in case of a failure.

        • cloudwatchLogUrl — (String)

          The CloudWatch log URL for the resource.

      • hpoJob — (map)

        The HPO job.

        • name — (String)

          The resource name.

        • arn — (String)

          The resource ARN.

        • status — (String)

          The resource status.

        • outputLocation — (String)

          The output location.

        • failureReason — (String)

          The failure reason, in case of a failure.

        • cloudwatchLogUrl — (String)

          The CloudWatch log URL for the resource.

      • modelTransformJob — (map)

        The model transform job.

        • name — (String)

          The resource name.

        • arn — (String)

          The resource ARN.

        • status — (String)

          The resource status.

        • outputLocation — (String)

          The output location.

        • failureReason — (String)

          The failure reason, in case of a failure.

        • cloudwatchLogUrl — (String)

          The CloudWatch log URL for the resource.

      • mlModels — (Array<map>)

        A list of the configurations of the ML models being used.

        • name — (String)

          The configuration name.

        • arn — (String)

          The ARN for the configuration.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getMLModelTransformJob(params = {}, callback) ⇒ AWS.Request

Gets information about a specified model transform job. See Use a trained model to generate new model artifacts.

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:GetMLModelTransformJobStatus IAM action in that cluster.

Service Reference:

Examples:

Calling the getMLModelTransformJob operation

var params = {
  id: 'STRING_VALUE', /* required */
  neptuneIamRoleArn: 'STRING_VALUE'
};
neptunedata.getMLModelTransformJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • id — (String)

      The unique identifier of the model-transform job to be reetrieved.

    • neptuneIamRoleArn — (String)

      The ARN of an IAM role that provides Neptune access to SageMaker and Amazon S3 resources. This must be listed in your DB cluster parameter group or an error will occur.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The status of the model-transform job.

      • id — (String)

        The unique identifier of the model-transform job to be retrieved.

      • baseProcessingJob — (map)

        The base data processing job.

        • name — (String)

          The resource name.

        • arn — (String)

          The resource ARN.

        • status — (String)

          The resource status.

        • outputLocation — (String)

          The output location.

        • failureReason — (String)

          The failure reason, in case of a failure.

        • cloudwatchLogUrl — (String)

          The CloudWatch log URL for the resource.

      • remoteModelTransformJob — (map)

        The remote model transform job.

        • name — (String)

          The resource name.

        • arn — (String)

          The resource ARN.

        • status — (String)

          The resource status.

        • outputLocation — (String)

          The output location.

        • failureReason — (String)

          The failure reason, in case of a failure.

        • cloudwatchLogUrl — (String)

          The CloudWatch log URL for the resource.

      • models — (Array<map>)

        A list of the configuration information for the models being used.

        • name — (String)

          The configuration name.

        • arn — (String)

          The ARN for the configuration.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getOpenCypherQueryStatus(params = {}, callback) ⇒ AWS.Request

Retrieves the status of a specified openCypher query.

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:GetQueryStatus IAM action in that cluster.

Note that the neptune-db:QueryLanguage:OpenCypher IAM condition key can be used in the policy document to restrict the use of openCypher queries (see Condition keys available in Neptune IAM data-access policy statements).

Service Reference:

Examples:

Calling the getOpenCypherQueryStatus operation

var params = {
  queryId: 'STRING_VALUE' /* required */
};
neptunedata.getOpenCypherQueryStatus(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • queryId — (String)

      The unique ID of the openCypher query for which to retrieve the query status.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • queryId — (String)

        The unique ID of the query for which status is being returned.

      • queryString — (String)

        The openCypher query string.

      • queryEvalStats — (map)

        The openCypher query evaluation status.

        • waited — (Integer)

          Indicates how long the query waited, in milliseconds.

        • elapsed — (Integer)

          The number of milliseconds the query has been running so far.

        • cancelled — (Boolean)

          Set to TRUE if the query was cancelled, or FALSE otherwise.

        • subqueries — (map)

          The number of subqueries in this query.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getPropertygraphStatistics(params = {}, callback) ⇒ AWS.Request

Gets property graph statistics (Gremlin and openCypher).

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:GetStatisticsStatus IAM action in that cluster.

Service Reference:

Examples:

Calling the getPropertygraphStatistics operation

neptunedata.getPropertygraphStatistics(function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The HTTP return code of the request. If the request succeeded, the code is 200. See Common error codes for DFE statistics request for a list of common errors.

      • payload — (map)

        Statistics for property-graph data.

        • autoCompute — (Boolean)

          Indicates whether or not automatic statistics generation is enabled.

        • active — (Boolean)

          Indicates whether or not DFE statistics generation is enabled at all.

        • statisticsId — (String)

          Reports the ID of the current statistics generation run. A value of -1 indicates that no statistics have been generated.

        • date — (Date)

          The UTC time at which DFE statistics have most recently been generated.

        • note — (String)

          A note about problems in the case where statistics are invalid.

        • signatureInfo — (map)

          A StatisticsSummary structure that contains:

          • signatureCount - The total number of signatures across all characteristic sets.

          • instanceCount - The total number of characteristic-set instances.

          • predicateCount - The total number of unique predicates.

          • signatureCount — (Integer)

            The total number of signatures across all characteristic sets.

          • instanceCount — (Integer)

            The total number of characteristic-set instances.

          • predicateCount — (Integer)

            The total number of unique predicates.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getPropertygraphStream(params = {}, callback) ⇒ AWS.Request

Gets a stream for a property graph.

With the Neptune Streams feature, you can generate a complete sequence of change-log entries that record every change made to your graph data as it happens. GetPropertygraphStream lets you collect these change-log entries for a property graph.

The Neptune streams feature needs to be enabled on your Neptune DBcluster. To enable streams, set the neptune_streams DB cluster parameter to 1.

See Capturing graph changes in real time using Neptune streams.

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:GetStreamRecords IAM action in that cluster.

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 enables one of the following IAM actions, depending on the query:

Note that you can restrict property-graph queries using the following IAM context keys:

See Condition keys available in Neptune IAM data-access policy statements).

Service Reference:

Examples:

Calling the getPropertygraphStream operation

var params = {
  commitNum: 'NUMBER_VALUE',
  encoding: gzip,
  iteratorType: AT_SEQUENCE_NUMBER | AFTER_SEQUENCE_NUMBER | TRIM_HORIZON | LATEST,
  limit: 'NUMBER_VALUE',
  opNum: 'NUMBER_VALUE'
};
neptunedata.getPropertygraphStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • limit — (Integer)

      Specifies the maximum number of records to return. There is also a size limit of 10 MB on the response that can't be modified and that takes precedence over the number of records specified in the limit parameter. The response does include a threshold-breaching record if the 10 MB limit was reached.

      The range for limit is 1 to 100,000, with a default of 10.

    • iteratorType — (String)

      Can be one of:

      • AT_SEQUENCE_NUMBER   –   Indicates that reading should start from the event sequence number specified jointly by the commitNum and opNum parameters.

      • AFTER_SEQUENCE_NUMBER   –   Indicates that reading should start right after the event sequence number specified jointly by the commitNum and opNum parameters.

      • TRIM_HORIZON   –   Indicates that reading should start at the last untrimmed record in the system, which is the oldest unexpired (not yet deleted) record in the change-log stream.

      • LATEST   –   Indicates that reading should start at the most recent record in the system, which is the latest unexpired (not yet deleted) record in the change-log stream.

      Possible values include:
      • "AT_SEQUENCE_NUMBER"
      • "AFTER_SEQUENCE_NUMBER"
      • "TRIM_HORIZON"
      • "LATEST"
    • commitNum — (Integer)

      The commit number of the starting record to read from the change-log stream. This parameter is required when iteratorType isAT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER, and ignored when iteratorType is TRIM_HORIZON or LATEST.

    • opNum — (Integer)

      The operation sequence number within the specified commit to start reading from in the change-log stream data. The default is 1.

    • encoding — (String)

      If set to TRUE, Neptune compresses the response using gzip encoding.

      Possible values include:
      • "gzip"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • lastEventId — (map<String>)

        Sequence identifier of the last change in the stream response.

        An event ID is composed of two fields: a commitNum, which identifies a transaction that changed the graph, and an opNum, which identifies a specific operation within that transaction:

      • lastTrxTimestampInMillis — (Integer)

        The time at which the commit for the transaction was requested, in milliseconds from the Unix epoch.

      • format — (String)

        Serialization format for the change records being returned. Currently, the only supported value is PG_JSON.

      • records — (Array<map>)

        An array of serialized change-log stream records included in the response.

        • commitTimestampInMillisrequired — (Integer)

          The time at which the commit for the transaction was requested, in milliseconds from the Unix epoch.

        • eventIdrequired — (map<String>)

          The sequence identifier of the stream change record.

        • datarequired — (map)

          The serialized Gremlin or openCypher change record.

          • idrequired — (String)

            The ID of the Gremlin or openCypher element.

          • typerequired — (String)

            The type of this Gremlin or openCypher element. Must be one of:

            • v1   -   Vertex label for Gremlin, or node label for openCypher.

            • vp   -   Vertex properties for Gremlin, or node properties for openCypher.

            • e   -   Edge and edge label for Gremlin, or relationship and relationship type for openCypher.

            • ep   -   Edge properties for Gremlin, or relationship properties for openCypher.

          • keyrequired — (String)

            The property name. For element labels, this is label.

          • valuerequired — (map)

            This is a JSON object that contains a value field for the value itself, and a datatype field for the JSON data type of that value:

          • from — (String)

            If this is an edge (type = e), the ID of the corresponding from vertex or source node.

          • to — (String)

            If this is an edge (type = e), the ID of the corresponding to vertex or target node.

        • oprequired — (String)

          The operation that created the change.

        • isLastOp — (Boolean)

          Only present if this operation is the last one in its transaction. If present, it is set to true. It is useful for ensuring that an entire transaction is consumed.

      • totalRecords — (Integer)

        The total number of records in the response.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getPropertygraphSummary(params = {}, callback) ⇒ AWS.Request

Gets a graph summary for a property graph.

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:GetGraphSummary IAM action in that cluster.

Service Reference:

Examples:

Calling the getPropertygraphSummary operation

var params = {
  mode: basic | detailed
};
neptunedata.getPropertygraphSummary(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • mode — (String)

      Mode can take one of two values: BASIC (the default), and DETAILED.

      Possible values include:
      • "basic"
      • "detailed"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • statusCode — (Integer)

        The HTTP return code of the request. If the request succeeded, the code is 200.

      • payload — (map)

        Payload containing the property graph summary response.

        • version — (String)

          The version of this graph summary response.

        • lastStatisticsComputationTime — (Date)

          The timestamp, in ISO 8601 format, of the time at which Neptune last computed statistics.

        • graphSummary — (map)

          The graph summary.

          • numNodes — (Integer)

            The number of nodes in the graph.

          • numEdges — (Integer)

            The number of edges in the graph.

          • numNodeLabels — (Integer)

            The number of distinct node labels in the graph.

          • numEdgeLabels — (Integer)

            The number of distinct edge labels in the graph.

          • nodeLabels — (Array<String>)

            A list of the distinct node labels in the graph.

          • edgeLabels — (Array<String>)

            A list of the distinct edge labels in the graph.

          • numNodeProperties — (Integer)

            A list of the distinct node properties in the graph, along with the count of nodes where each property is used.

          • numEdgeProperties — (Integer)

            The number of distinct edge properties in the graph.

          • nodeProperties — (Array<map<Integer>>)

            The number of distinct node properties in the graph.

          • edgeProperties — (Array<map<Integer>>)

            A list of the distinct edge properties in the graph, along with the count of edges where each property is used.

          • totalNodePropertyValues — (Integer)

            The total number of usages of all node properties.

          • totalEdgePropertyValues — (Integer)

            The total number of usages of all edge properties.

          • nodeStructures — (Array<map>)

            This field is only present when the requested mode is DETAILED. It contains a list of node structures.

            • count — (Integer)

              Number of nodes that have this specific structure.

            • nodeProperties — (Array<String>)

              A list of the node properties present in this specific structure.

            • distinctOutgoingEdgeLabels — (Array<String>)

              A list of distinct outgoing edge labels present in this specific structure.

          • edgeStructures — (Array<map>)

            This field is only present when the requested mode is DETAILED. It contains a list of edge structures.

            • count — (Integer)

              The number of edges that have this specific structure.

            • edgeProperties — (Array<String>)

              A list of edge properties present in this specific structure.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getRDFGraphSummary(params = {}, callback) ⇒ AWS.Request

Gets a graph summary for an RDF graph.

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:GetGraphSummary IAM action in that cluster.

Service Reference:

Examples:

Calling the getRDFGraphSummary operation

var params = {
  mode: basic | detailed
};
neptunedata.getRDFGraphSummary(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • mode — (String)

      Mode can take one of two values: BASIC (the default), and DETAILED.

      Possible values include:
      • "basic"
      • "detailed"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • statusCode — (Integer)

        The HTTP return code of the request. If the request succeeded, the code is 200.

      • payload — (map)

        Payload for an RDF graph summary response

        • version — (String)

          The version of this graph summary response.

        • lastStatisticsComputationTime — (Date)

          The timestamp, in ISO 8601 format, of the time at which Neptune last computed statistics.

        • graphSummary — (map)

          The graph summary of an RDF graph. See Graph summary response for an RDF graph.

          • numDistinctSubjects — (Integer)

            The number of distinct subjects in the graph.

          • numDistinctPredicates — (Integer)

            The number of distinct predicates in the graph.

          • numQuads — (Integer)

            The number of quads in the graph.

          • numClasses — (Integer)

            The number of classes in the graph.

          • classes — (Array<String>)

            A list of the classes in the graph.

          • predicates — (Array<map<Integer>>)

            "A list of predicates in the graph, along with the predicate counts.

          • subjectStructures — (Array<map>)

            This field is only present when the request mode is DETAILED. It contains a list of subject structures.

            • count — (Integer)

              Number of occurrences of this specific structure.

            • predicates — (Array<String>)

              A list of predicates present in this specific structure.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSparqlStatistics(params = {}, callback) ⇒ AWS.Request

Gets RDF statistics (SPARQL).

Service Reference:

Examples:

Calling the getSparqlStatistics operation

neptunedata.getSparqlStatistics(function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The HTTP return code of the request. If the request succeeded, the code is 200. See Common error codes for DFE statistics request for a list of common errors.

        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:GetStatisticsStatus IAM action in that cluster.

      • payload — (map)

        Statistics for RDF data.

        • autoCompute — (Boolean)

          Indicates whether or not automatic statistics generation is enabled.

        • active — (Boolean)

          Indicates whether or not DFE statistics generation is enabled at all.

        • statisticsId — (String)

          Reports the ID of the current statistics generation run. A value of -1 indicates that no statistics have been generated.

        • date — (Date)

          The UTC time at which DFE statistics have most recently been generated.

        • note — (String)

          A note about problems in the case where statistics are invalid.

        • signatureInfo — (map)

          A StatisticsSummary structure that contains:

          • signatureCount - The total number of signatures across all characteristic sets.

          • instanceCount - The total number of characteristic-set instances.

          • predicateCount - The total number of unique predicates.

          • signatureCount — (Integer)

            The total number of signatures across all characteristic sets.

          • instanceCount — (Integer)

            The total number of characteristic-set instances.

          • predicateCount — (Integer)

            The total number of unique predicates.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSparqlStream(params = {}, callback) ⇒ AWS.Request

Gets a stream for an RDF graph.

With the Neptune Streams feature, you can generate a complete sequence of change-log entries that record every change made to your graph data as it happens. GetSparqlStream lets you collect these change-log entries for an RDF graph.

The Neptune streams feature needs to be enabled on your Neptune DBcluster. To enable streams, set the neptune_streams DB cluster parameter to 1.

See Capturing graph changes in real time using Neptune streams.

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:GetStreamRecords IAM action in that cluster.

Note that the neptune-db:QueryLanguage:Sparql IAM condition key can be used in the policy document to restrict the use of SPARQL queries (see Condition keys available in Neptune IAM data-access policy statements).

Service Reference:

Examples:

Calling the getSparqlStream operation

var params = {
  commitNum: 'NUMBER_VALUE',
  encoding: gzip,
  iteratorType: AT_SEQUENCE_NUMBER | AFTER_SEQUENCE_NUMBER | TRIM_HORIZON | LATEST,
  limit: 'NUMBER_VALUE',
  opNum: 'NUMBER_VALUE'
};
neptunedata.getSparqlStream(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • limit — (Integer)

      Specifies the maximum number of records to return. There is also a size limit of 10 MB on the response that can't be modified and that takes precedence over the number of records specified in the limit parameter. The response does include a threshold-breaching record if the 10 MB limit was reached.

      The range for limit is 1 to 100,000, with a default of 10.

    • iteratorType — (String)

      Can be one of:

      • AT_SEQUENCE_NUMBER   –   Indicates that reading should start from the event sequence number specified jointly by the commitNum and opNum parameters.

      • AFTER_SEQUENCE_NUMBER   –   Indicates that reading should start right after the event sequence number specified jointly by the commitNum and opNum parameters.

      • TRIM_HORIZON   –   Indicates that reading should start at the last untrimmed record in the system, which is the oldest unexpired (not yet deleted) record in the change-log stream.

      • LATEST   –   Indicates that reading should start at the most recent record in the system, which is the latest unexpired (not yet deleted) record in the change-log stream.

      Possible values include:
      • "AT_SEQUENCE_NUMBER"
      • "AFTER_SEQUENCE_NUMBER"
      • "TRIM_HORIZON"
      • "LATEST"
    • commitNum — (Integer)

      The commit number of the starting record to read from the change-log stream. This parameter is required when iteratorType isAT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER, and ignored when iteratorType is TRIM_HORIZON or LATEST.

    • opNum — (Integer)

      The operation sequence number within the specified commit to start reading from in the change-log stream data. The default is 1.

    • encoding — (String)

      If set to TRUE, Neptune compresses the response using gzip encoding.

      Possible values include:
      • "gzip"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • lastEventId — (map<String>)

        Sequence identifier of the last change in the stream response.

        An event ID is composed of two fields: a commitNum, which identifies a transaction that changed the graph, and an opNum, which identifies a specific operation within that transaction:

      • lastTrxTimestampInMillis — (Integer)

        The time at which the commit for the transaction was requested, in milliseconds from the Unix epoch.

      • format — (String)

        Serialization format for the change records being returned. Currently, the only supported value is NQUADS.

      • records — (Array<map>)

        An array of serialized change-log stream records included in the response.

        • commitTimestampInMillisrequired — (Integer)

          The time at which the commit for the transaction was requested, in milliseconds from the Unix epoch.

        • eventIdrequired — (map<String>)

          The sequence identifier of the stream change record.

        • datarequired — (map)

          The serialized SPARQL change record. The serialization formats of each record are described in more detail in Serialization Formats in Neptune Streams.

          • stmtrequired — (String)

            Holds an N-QUADS statement expressing the changed quad.

        • oprequired — (String)

          The operation that created the change.

        • isLastOp — (Boolean)

          Only present if this operation is the last one in its transaction. If present, it is set to true. It is useful for ensuring that an entire transaction is consumed.

      • totalRecords — (Integer)

        The total number of records in the response.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listGremlinQueries(params = {}, callback) ⇒ AWS.Request

Lists active Gremlin queries. See Gremlin query status API for details about the output.

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:GetQueryStatus IAM action in that cluster.

Note that the neptune-db:QueryLanguage:Gremlin IAM condition key can be used in the policy document to restrict the use of Gremlin queries (see Condition keys available in Neptune IAM data-access policy statements).

Service Reference:

Examples:

Calling the listGremlinQueries operation

var params = {
  includeWaiting: true || false
};
neptunedata.listGremlinQueries(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • includeWaiting — (Boolean)

      If set to TRUE, the list returned includes waiting queries. The default is FALSE;

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • acceptedQueryCount — (Integer)

        The number of queries that have been accepted but not yet completed, including queries in the queue.

      • runningQueryCount — (Integer)

        The number of Gremlin queries currently running.

      • queries — (Array<map>)

        A list of the current queries.

        • queryId — (String)

          The ID of the Gremlin query.

        • queryString — (String)

          The query string of the Gremlin query.

        • queryEvalStats — (map)

          The query statistics of the Gremlin query.

          • waited — (Integer)

            Indicates how long the query waited, in milliseconds.

          • elapsed — (Integer)

            The number of milliseconds the query has been running so far.

          • cancelled — (Boolean)

            Set to TRUE if the query was cancelled, or FALSE otherwise.

          • subqueries — (map)

            The number of subqueries in this query.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listLoaderJobs(params = {}, callback) ⇒ AWS.Request

Retrieves a list of the loadIds for all active loader jobs.

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:ListLoaderJobs IAM action in that cluster..

Service Reference:

Examples:

Calling the listLoaderJobs operation

var params = {
  includeQueuedLoads: true || false,
  limit: 'NUMBER_VALUE'
};
neptunedata.listLoaderJobs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • limit — (Integer)

      The number of load IDs to list. Must be a positive integer greater than zero and not more than 100 (which is the default).

    • includeQueuedLoads — (Boolean)

      An optional parameter that can be used to exclude the load IDs of queued load requests when requesting a list of load IDs by setting the parameter to FALSE. The default value is TRUE.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        Returns the status of the job list request.

      • payload — (map)

        The requested list of job IDs.

        • loadIds — (Array<String>)

          A list of load IDs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listMLDataProcessingJobs(params = {}, callback) ⇒ AWS.Request

Returns a list of Neptune ML data processing jobs. See Listing active data-processing jobs using the Neptune ML dataprocessing 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:ListMLDataProcessingJobs IAM action in that cluster.

Service Reference:

Examples:

Calling the listMLDataProcessingJobs operation

var params = {
  maxItems: 'NUMBER_VALUE',
  neptuneIamRoleArn: 'STRING_VALUE'
};
neptunedata.listMLDataProcessingJobs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • maxItems — (Integer)

      The maximum number of items to return (from 1 to 1024; the default is 10).

    • neptuneIamRoleArn — (String)

      The ARN of an IAM role that provides Neptune access to SageMaker and Amazon S3 resources. This must be listed in your DB cluster parameter group or an error will occur.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ids — (Array<String>)

        A page listing data processing job IDs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listMLEndpoints(params = {}, callback) ⇒ AWS.Request

Lists existing inference endpoints. 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:ListMLEndpoints IAM action in that cluster.

Service Reference:

Examples:

Calling the listMLEndpoints operation

var params = {
  maxItems: 'NUMBER_VALUE',
  neptuneIamRoleArn: 'STRING_VALUE'
};
neptunedata.listMLEndpoints(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • maxItems — (Integer)

      The maximum number of items to return (from 1 to 1024; the default is 10.

    • neptuneIamRoleArn — (String)

      The ARN of an IAM role that provides Neptune access to SageMaker and Amazon S3 resources. This must be listed in your DB cluster parameter group or an error will occur.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ids — (Array<String>)

        A page from the list of inference endpoint IDs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listMLModelTrainingJobs(params = {}, callback) ⇒ AWS.Request

Lists Neptune ML model-training jobs. See Model training using the modeltraining 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:neptune-db:ListMLModelTrainingJobs IAM action in that cluster.

Service Reference:

Examples:

Calling the listMLModelTrainingJobs operation

var params = {
  maxItems: 'NUMBER_VALUE',
  neptuneIamRoleArn: 'STRING_VALUE'
};
neptunedata.listMLModelTrainingJobs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • maxItems — (Integer)

      The maximum number of items to return (from 1 to 1024; the default is 10).

    • neptuneIamRoleArn — (String)

      The ARN of an IAM role that provides Neptune access to SageMaker and Amazon S3 resources. This must be listed in your DB cluster parameter group or an error will occur.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ids — (Array<String>)

        A page of the list of model training job IDs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listMLModelTransformJobs(params = {}, callback) ⇒ AWS.Request

Returns a list of model transform job IDs. See Use a trained model to generate new model artifacts.

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:ListMLModelTransformJobs IAM action in that cluster.

Service Reference:

Examples:

Calling the listMLModelTransformJobs operation

var params = {
  maxItems: 'NUMBER_VALUE',
  neptuneIamRoleArn: 'STRING_VALUE'
};
neptunedata.listMLModelTransformJobs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • maxItems — (Integer)

      The maximum number of items to return (from 1 to 1024; the default is 10).

    • neptuneIamRoleArn — (String)

      The ARN of an IAM role that provides Neptune access to SageMaker and Amazon S3 resources. This must be listed in your DB cluster parameter group or an error will occur.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ids — (Array<String>)

        A page from the list of model transform IDs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listOpenCypherQueries(params = {}, callback) ⇒ AWS.Request

Lists active openCypher queries. See Neptune openCypher status endpoint for more information.

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:GetQueryStatus IAM action in that cluster.

Note that the neptune-db:QueryLanguage:OpenCypher IAM condition key can be used in the policy document to restrict the use of openCypher queries (see Condition keys available in Neptune IAM data-access policy statements).

Service Reference:

Examples:

Calling the listOpenCypherQueries operation

var params = {
  includeWaiting: true || false
};
neptunedata.listOpenCypherQueries(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • includeWaiting — (Boolean)

      When set to TRUE and other parameters are not present, causes status information to be returned for waiting queries as well as for running queries.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • acceptedQueryCount — (Integer)

        The number of queries that have been accepted but not yet completed, including queries in the queue.

      • runningQueryCount — (Integer)

        The number of currently running openCypher queries.

      • queries — (Array<map>)

        A list of current openCypher queries.

        • queryId — (String)

          The ID of the Gremlin query.

        • queryString — (String)

          The query string of the Gremlin query.

        • queryEvalStats — (map)

          The query statistics of the Gremlin query.

          • waited — (Integer)

            Indicates how long the query waited, in milliseconds.

          • elapsed — (Integer)

            The number of milliseconds the query has been running so far.

          • cancelled — (Boolean)

            Set to TRUE if the query was cancelled, or FALSE otherwise.

          • subqueries — (map)

            The number of subqueries in this query.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

managePropertygraphStatistics(params = {}, callback) ⇒ AWS.Request

Manages the generation and use of property graph statistics.

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:ManageStatistics IAM action in that cluster.

Service Reference:

Examples:

Calling the managePropertygraphStatistics operation

var params = {
  mode: disableAutoCompute | enableAutoCompute | refresh
};
neptunedata.managePropertygraphStatistics(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • mode — (String)

      The statistics generation mode. One of: DISABLE_AUTOCOMPUTE, ENABLE_AUTOCOMPUTE, or REFRESH, the last of which manually triggers DFE statistics generation.

      Possible values include:
      • "disableAutoCompute"
      • "enableAutoCompute"
      • "refresh"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The HTTP return code of the request. If the request succeeded, the code is 200.

      • payload — (map)

        This is only returned for refresh mode.

        • statisticsId — (String)

          The ID of the statistics generation run that is currently occurring.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

manageSparqlStatistics(params = {}, callback) ⇒ AWS.Request

Manages the generation and use of RDF graph statistics.

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:ManageStatistics IAM action in that cluster.

Service Reference:

Examples:

Calling the manageSparqlStatistics operation

var params = {
  mode: disableAutoCompute | enableAutoCompute | refresh
};
neptunedata.manageSparqlStatistics(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • mode — (String)

      The statistics generation mode. One of: DISABLE_AUTOCOMPUTE, ENABLE_AUTOCOMPUTE, or REFRESH, the last of which manually triggers DFE statistics generation.

      Possible values include:
      • "disableAutoCompute"
      • "enableAutoCompute"
      • "refresh"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The HTTP return code of the request. If the request succeeded, the code is 200.

      • payload — (map)

        This is only returned for refresh mode.

        • statisticsId — (String)

          The ID of the statistics generation run that is currently occurring.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startLoaderJob(params = {}, callback) ⇒ AWS.Request

Starts a Neptune bulk loader job to load data from an Amazon S3 bucket into a Neptune DB instance. See Using the Amazon Neptune Bulk Loader to Ingest Data.

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:StartLoaderJob IAM action in that cluster.

Service Reference:

Examples:

Calling the startLoaderJob operation

var params = {
  format: csv | opencypher | ntriples | nquads | rdfxml | turtle, /* required */
  iamRoleArn: 'STRING_VALUE', /* required */
  s3BucketRegion: us-east-1 | us-east-2 | us-west-1 | us-west-2 | ca-central-1 | sa-east-1 | eu-north-1 | eu-west-1 | eu-west-2 | eu-west-3 | eu-central-1 | me-south-1 | af-south-1 | ap-east-1 | ap-northeast-1 | ap-northeast-2 | ap-southeast-1 | ap-southeast-2 | ap-south-1 | cn-north-1 | cn-northwest-1 | us-gov-west-1 | us-gov-east-1, /* required */
  source: 'STRING_VALUE', /* required */
  dependencies: [
    'STRING_VALUE',
    /* more items */
  ],
  failOnError: true || false,
  mode: RESUME | NEW | AUTO,
  parallelism: LOW | MEDIUM | HIGH | OVERSUBSCRIBE,
  parserConfiguration: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  },
  queueRequest: true || false,
  updateSingleCardinalityProperties: true || false,
  userProvidedEdgeIds: true || false
};
neptunedata.startLoaderJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • source — (String)

      The source parameter accepts an S3 URI that identifies a single file, multiple files, a folder, or multiple folders. Neptune loads every data file in any folder that is specified.

      The URI can be in any of the following formats.

      The object-key-name element of the URI is equivalent to the prefix parameter in an S3 ListObjects API call. It identifies all the objects in the specified S3 bucket whose names begin with that prefix. That can be a single file or folder, or multiple files and/or folders.

      The specified folder or folders can contain multiple vertex files and multiple edge files.

    • format — (String)

      The format of the data. For more information about data formats for the Neptune Loader command, see Load Data Formats.

      Allowed values

      Possible values include:
      • "csv"
      • "opencypher"
      • "ntriples"
      • "nquads"
      • "rdfxml"
      • "turtle"
    • s3BucketRegion — (String)

      The Amazon region of the S3 bucket. This must match the Amazon Region of the DB cluster.

      Possible values include:
      • "us-east-1"
      • "us-east-2"
      • "us-west-1"
      • "us-west-2"
      • "ca-central-1"
      • "sa-east-1"
      • "eu-north-1"
      • "eu-west-1"
      • "eu-west-2"
      • "eu-west-3"
      • "eu-central-1"
      • "me-south-1"
      • "af-south-1"
      • "ap-east-1"
      • "ap-northeast-1"
      • "ap-northeast-2"
      • "ap-southeast-1"
      • "ap-southeast-2"
      • "ap-south-1"
      • "cn-north-1"
      • "cn-northwest-1"
      • "us-gov-west-1"
      • "us-gov-east-1"
    • iamRoleArn — (String)

      The Amazon Resource Name (ARN) for an IAM role to be assumed by the Neptune DB instance for access to the S3 bucket. The IAM role ARN provided here should be attached to the DB cluster (see Adding the IAM Role to an Amazon Neptune Cluster.

    • mode — (String)

      The load job mode.

      Allowed values: RESUME, NEW, AUTO.

      Default value: AUTO.

      • RESUME   –   In RESUME mode, the loader looks for a previous load from this source, and if it finds one, resumes that load job. If no previous load job is found, the loader stops.

        The loader avoids reloading files that were successfully loaded in a previous job. It only tries to process failed files. If you dropped previously loaded data from your Neptune cluster, that data is not reloaded in this mode. If a previous load job loaded all files from the same source successfully, nothing is reloaded, and the loader returns success.

      • NEW   –   In NEW mode, the creates a new load request regardless of any previous loads. You can use this mode to reload all the data from a source after dropping previously loaded data from your Neptune cluster, or to load new data available at the same source.

      • AUTO   –   In AUTO mode, the loader looks for a previous load job from the same source, and if it finds one, resumes that job, just as in RESUME mode.

        If the loader doesn't find a previous load job from the same source, it loads all data from the source, just as in NEW mode.

      Possible values include:
      • "RESUME"
      • "NEW"
      • "AUTO"
    • failOnError — (Boolean)

      failOnError   –   A flag to toggle a complete stop on an error.

      Allowed values: "TRUE", "FALSE".

      Default value: "TRUE".

      When this parameter is set to "FALSE", the loader tries to load all the data in the location specified, skipping any entries with errors.

      When this parameter is set to "TRUE", the loader stops as soon as it encounters an error. Data loaded up to that point persists.

    • parallelism — (String)

      The optional parallelism parameter can be set to reduce the number of threads used by the bulk load process.

      Allowed values:

      • LOW –   The number of threads used is the number of available vCPUs divided by 8.

      • MEDIUM –   The number of threads used is the number of available vCPUs divided by 2.

      • HIGH –   The number of threads used is the same as the number of available vCPUs.

      • OVERSUBSCRIBE –   The number of threads used is the number of available vCPUs multiplied by 2. If this value is used, the bulk loader takes up all available resources.

        This does not mean, however, that the OVERSUBSCRIBE setting results in 100% CPU utilization. Because the load operation is I/O bound, the highest CPU utilization to expect is in the 60% to 70% range.

      Default value: HIGH

      The parallelism setting can sometimes result in a deadlock between threads when loading openCypher data. When this happens, Neptune returns the LOAD_DATA_DEADLOCK error. You can generally fix the issue by setting parallelism to a lower setting and retrying the load command.

      Possible values include:
      • "LOW"
      • "MEDIUM"
      • "HIGH"
      • "OVERSUBSCRIBE"
    • parserConfiguration — (map<String>)

      parserConfiguration   –   An optional object with additional parser configuration values. Each of the child parameters is also optional:

      • namedGraphUri   –   The default graph for all RDF formats when no graph is specified (for non-quads formats and NQUAD entries with no graph).

        The default is https://aws.amazon.com/neptune/vocab/v01/DefaultNamedGraph.

      • baseUri   –   The base URI for RDF/XML and Turtle formats.

        The default is https://aws.amazon.com/neptune/default.

      • allowEmptyStrings   –   Gremlin users need to be able to pass empty string values("") as node and edge properties when loading CSV data. If allowEmptyStrings is set to false (the default), such empty strings are treated as nulls and are not loaded.

        If allowEmptyStrings is set to true, the loader treats empty strings as valid property values and loads them accordingly.

    • updateSingleCardinalityProperties — (Boolean)

      updateSingleCardinalityProperties is an optional parameter that controls how the bulk loader treats a new value for single-cardinality vertex or edge properties. This is not supported for loading openCypher data.

      Allowed values: "TRUE", "FALSE".

      Default value: "FALSE".

      By default, or when updateSingleCardinalityProperties is explicitly set to "FALSE", the loader treats a new value as an error, because it violates single cardinality.

      When updateSingleCardinalityProperties is set to "TRUE", on the other hand, the bulk loader replaces the existing value with the new one. If multiple edge or single-cardinality vertex property values are provided in the source file(s) being loaded, the final value at the end of the bulk load could be any one of those new values. The loader only guarantees that the existing value has been replaced by one of the new ones.

    • queueRequest — (Boolean)

      This is an optional flag parameter that indicates whether the load request can be queued up or not.

      You don't have to wait for one load job to complete before issuing the next one, because Neptune can queue up as many as 64 jobs at a time, provided that their queueRequest parameters are all set to "TRUE". The queue order of the jobs will be first-in-first-out (FIFO).

      If the queueRequest parameter is omitted or set to "FALSE", the load request will fail if another load job is already running.

      Allowed values: "TRUE", "FALSE".

      Default value: "FALSE".

    • dependencies — (Array<String>)

      This is an optional parameter that can make a queued load request contingent on the successful completion of one or more previous jobs in the queue.

      Neptune can queue up as many as 64 load requests at a time, if their queueRequest parameters are set to "TRUE". The dependencies parameter lets you make execution of such a queued request dependent on the successful completion of one or more specified previous requests in the queue.

      For example, if load Job-A and Job-B are independent of each other, but load Job-C needs Job-A and Job-B to be finished before it begins, proceed as follows:

      1. Submit load-job-A and load-job-B one after another in any order, and save their load-ids.

      2. Submit load-job-C with the load-ids of the two jobs in its dependencies field:

      Because of the dependencies parameter, the bulk loader will not start Job-C until Job-A and Job-B have completed successfully. If either one of them fails, Job-C will not be executed, and its status will be set to LOAD_FAILED_BECAUSE_DEPENDENCY_NOT_SATISFIED.

      You can set up multiple levels of dependency in this way, so that the failure of one job will cause all requests that are directly or indirectly dependent on it to be cancelled.

    • userProvidedEdgeIds — (Boolean)

      This parameter is required only when loading openCypher data that contains relationship IDs. It must be included and set to True when openCypher relationship IDs are explicitly provided in the load data (recommended).

      When userProvidedEdgeIds is absent or set to True, an :ID column must be present in every relationship file in the load.

      When userProvidedEdgeIds is present and set to False, relationship files in the load must not contain an :ID column. Instead, the Neptune loader automatically generates an ID for each relationship.

      It's useful to provide relationship IDs explicitly so that the loader can resume loading after error in the CSV data have been fixed, without having to reload any relationships that have already been loaded. If relationship IDs have not been explicitly assigned, the loader cannot resume a failed load if any relationship file has had to be corrected, and must instead reload all the relationships.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • status — (String)

        The HTTP return code indicating the status of the load job.

      • payload — (map<String>)

        Contains a loadId name-value pair that provides an identifier for the load operation.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startMLDataProcessingJob(params = {}, callback) ⇒ AWS.Request

Creates a new Neptune ML data processing job for processing the graph data exported from Neptune for training. See The dataprocessing 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:StartMLModelDataProcessingJob IAM action in that cluster.

Service Reference:

Examples:

Calling the startMLDataProcessingJob operation

var params = {
  inputDataS3Location: 'STRING_VALUE', /* required */
  processedDataS3Location: 'STRING_VALUE', /* required */
  configFileName: 'STRING_VALUE',
  id: 'STRING_VALUE',
  modelType: 'STRING_VALUE',
  neptuneIamRoleArn: 'STRING_VALUE',
  previousDataProcessingJobId: 'STRING_VALUE',
  processingInstanceType: 'STRING_VALUE',
  processingInstanceVolumeSizeInGB: 'NUMBER_VALUE',
  processingTimeOutInSeconds: 'NUMBER_VALUE',
  s3OutputEncryptionKMSKey: 'STRING_VALUE',
  sagemakerIamRoleArn: 'STRING_VALUE',
  securityGroupIds: [
    'STRING_VALUE',
    /* more items */
  ],
  subnets: [
    'STRING_VALUE',
    /* more items */
  ],
  volumeEncryptionKMSKey: 'STRING_VALUE'
};
neptunedata.startMLDataProcessingJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • id — (String)

      A unique identifier for the new job. The default is an autogenerated UUID.

    • previousDataProcessingJobId — (String)

      The job ID of a completed data processing job run on an earlier version of the data.

    • inputDataS3Location — (String)

      The URI of the Amazon S3 location where you want SageMaker to download the data needed to run the data processing job.

    • processedDataS3Location — (String)

      The URI of the Amazon S3 location where you want SageMaker to save the results of a data processing job.

    • sagemakerIamRoleArn — (String)

      The ARN of an IAM role for SageMaker execution. This must be listed in your DB cluster parameter group or an error will occur.

    • neptuneIamRoleArn — (String)

      The Amazon Resource Name (ARN) of an IAM role that SageMaker can assume to perform tasks on your behalf. This must be listed in your DB cluster parameter group or an error will occur.

    • processingInstanceType — (String)

      The type of ML instance used during data processing. Its memory should be large enough to hold the processed dataset. The default is the smallest ml.r5 type whose memory is ten times larger than the size of the exported graph data on disk.

    • processingInstanceVolumeSizeInGB — (Integer)

      The disk volume size of the processing instance. Both input data and processed data are stored on disk, so the volume size must be large enough to hold both data sets. The default is 0. If not specified or 0, Neptune ML chooses the volume size automatically based on the data size.

    • processingTimeOutInSeconds — (Integer)

      Timeout in seconds for the data processing job. The default is 86,400 (1 day).

    • modelType — (String)

      One of the two model types that Neptune ML currently supports: heterogeneous graph models (heterogeneous), and knowledge graph (kge). The default is none. If not specified, Neptune ML chooses the model type automatically based on the data.

    • configFileName — (String)

      A data specification file that describes how to load the exported graph data for training. The file is automatically generated by the Neptune export toolkit. The default is training-data-configuration.json.

    • subnets — (Array<String>)

      The IDs of the subnets in the Neptune VPC. The default is None.

    • securityGroupIds — (Array<String>)

      The VPC security group IDs. The default is None.

    • volumeEncryptionKMSKey — (String)

      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.

    • s3OutputEncryptionKMSKey — (String)

      The Amazon Key Management Service (Amazon KMS) key that SageMaker uses to encrypt the output of the processing job. The default is none.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • id — (String)

        The unique ID of the new data processing job.

      • arn — (String)

        The ARN of the data processing job.

      • creationTimeInMillis — (Integer)

        The time it took to create the new processing job, in milliseconds.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startMLModelTrainingJob(params = {}, callback) ⇒ AWS.Request

Creates a new Neptune ML model training job. See Model training using the modeltraining 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:StartMLModelTrainingJob IAM action in that cluster.

Service Reference:

Examples:

Calling the startMLModelTrainingJob operation

var params = {
  dataProcessingJobId: 'STRING_VALUE', /* required */
  trainModelS3Location: 'STRING_VALUE', /* required */
  baseProcessingInstanceType: 'STRING_VALUE',
  customModelTrainingParameters: {
    sourceS3DirectoryPath: 'STRING_VALUE', /* required */
    trainingEntryPointScript: 'STRING_VALUE',
    transformEntryPointScript: 'STRING_VALUE'
  },
  enableManagedSpotTraining: true || false,
  id: 'STRING_VALUE',
  maxHPONumberOfTrainingJobs: 'NUMBER_VALUE',
  maxHPOParallelTrainingJobs: 'NUMBER_VALUE',
  neptuneIamRoleArn: 'STRING_VALUE',
  previousModelTrainingJobId: 'STRING_VALUE',
  s3OutputEncryptionKMSKey: 'STRING_VALUE',
  sagemakerIamRoleArn: 'STRING_VALUE',
  securityGroupIds: [
    'STRING_VALUE',
    /* more items */
  ],
  subnets: [
    'STRING_VALUE',
    /* more items */
  ],
  trainingInstanceType: 'STRING_VALUE',
  trainingInstanceVolumeSizeInGB: 'NUMBER_VALUE',
  trainingTimeOutInSeconds: 'NUMBER_VALUE',
  volumeEncryptionKMSKey: 'STRING_VALUE'
};
neptunedata.startMLModelTrainingJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • id — (String)

      A unique identifier for the new job. The default is An autogenerated UUID.

    • previousModelTrainingJobId — (String)

      The job ID of a completed model-training job that you want to update incrementally based on updated data.

    • dataProcessingJobId — (String)

      The job ID of the completed data-processing job that has created the data that the training will work with.

    • trainModelS3Location — (String)

      The location in Amazon S3 where the model artifacts are to be stored.

    • sagemakerIamRoleArn — (String)

      The ARN of an IAM role for SageMaker execution.This must be listed in your DB cluster parameter group or an error will occur.

    • neptuneIamRoleArn — (String)

      The ARN of an IAM role that provides Neptune access to SageMaker and Amazon S3 resources. This must be listed in your DB cluster parameter group or an error will occur.

    • baseProcessingInstanceType — (String)

      The type of ML instance used in preparing and managing training of ML models. This is a CPU instance chosen based on memory requirements for processing the training data and model.

    • trainingInstanceType — (String)

      The type of ML instance used for model training. All Neptune ML models support CPU, GPU, and multiGPU training. The default is ml.p3.2xlarge. Choosing the right instance type for training depends on the task type, graph size, and your budget.

    • trainingInstanceVolumeSizeInGB — (Integer)

      The disk volume size of the training instance. Both input data and the output model are stored on disk, so the volume size must be large enough to hold both data sets. The default is 0. If not specified or 0, Neptune ML selects a disk volume size based on the recommendation generated in the data processing step.

    • trainingTimeOutInSeconds — (Integer)

      Timeout in seconds for the training job. The default is 86,400 (1 day).

    • maxHPONumberOfTrainingJobs — (Integer)

      Maximum total number of training jobs to start for the hyperparameter tuning job. The default is 2. Neptune ML automatically tunes the hyperparameters of the machine learning model. To obtain a model that performs well, use at least 10 jobs (in other words, set maxHPONumberOfTrainingJobs to 10). In general, the more tuning runs, the better the results.

    • maxHPOParallelTrainingJobs — (Integer)

      Maximum number of parallel training jobs to start for the hyperparameter tuning job. The default is 2. The number of parallel jobs you can run is limited by the available resources on your training instance.

    • subnets — (Array<String>)

      The IDs of the subnets in the Neptune VPC. The default is None.

    • securityGroupIds — (Array<String>)

      The VPC security group IDs. The default is None.

    • volumeEncryptionKMSKey — (String)

      The Amazon Key Management Service (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.

    • s3OutputEncryptionKMSKey — (String)

      The Amazon Key Management Service (KMS) key that SageMaker uses to encrypt the output of the processing job. The default is none.

    • enableManagedSpotTraining — (Boolean)

      Optimizes the cost of training machine-learning models by using Amazon Elastic Compute Cloud spot instances. The default is False.

    • customModelTrainingParameters — (map)

      The configuration for custom model training. This is a JSON object.

      • sourceS3DirectoryPathrequired — (String)

        The path to the Amazon S3 location where the Python module implementing your model is located. This must point to a valid existing Amazon S3 location that contains, at a minimum, a training script, a transform script, and a model-hpo-configuration.json file.

      • trainingEntryPointScript — (String)

        The name of the entry point in your module of a script that performs model training and takes hyperparameters as command-line arguments, including fixed hyperparameters. The default is training.py.

      • transformEntryPointScript — (String)

        The name of the entry point in your module of a script that should be run after the best model from the hyperparameter search has been identified, to compute the model artifacts necessary for model deployment. It should be able to run with no command-line arguments.The default is transform.py.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • id — (String)

        The unique ID of the new model training job.

      • arn — (String)

        The ARN of the new model training job.

      • creationTimeInMillis — (Integer)

        The model training job creation time, in milliseconds.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startMLModelTransformJob(params = {}, callback) ⇒ AWS.Request

Creates a new model transform job. See Use a trained model to generate new model artifacts.

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:StartMLModelTransformJob IAM action in that cluster.

Service Reference:

Examples:

Calling the startMLModelTransformJob operation

var params = {
  modelTransformOutputS3Location: 'STRING_VALUE', /* required */
  baseProcessingInstanceType: 'STRING_VALUE',
  baseProcessingInstanceVolumeSizeInGB: 'NUMBER_VALUE',
  customModelTransformParameters: {
    sourceS3DirectoryPath: 'STRING_VALUE', /* required */
    transformEntryPointScript: 'STRING_VALUE'
  },
  dataProcessingJobId: 'STRING_VALUE',
  id: 'STRING_VALUE',
  mlModelTrainingJobId: 'STRING_VALUE',
  neptuneIamRoleArn: 'STRING_VALUE',
  s3OutputEncryptionKMSKey: 'STRING_VALUE',
  sagemakerIamRoleArn: 'STRING_VALUE',
  securityGroupIds: [
    'STRING_VALUE',
    /* more items */
  ],
  subnets: [
    'STRING_VALUE',
    /* more items */
  ],
  trainingJobName: 'STRING_VALUE',
  volumeEncryptionKMSKey: 'STRING_VALUE'
};
neptunedata.startMLModelTransformJob(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • id — (String)

      A unique identifier for the new job. The default is an autogenerated UUID.

    • dataProcessingJobId — (String)

      The job ID of a completed data-processing job. You must include either dataProcessingJobId and a mlModelTrainingJobId, or a trainingJobName.

    • mlModelTrainingJobId — (String)

      The job ID of a completed model-training job. You must include either dataProcessingJobId and a mlModelTrainingJobId, or a trainingJobName.

    • trainingJobName — (String)

      The name of a completed SageMaker training job. You must include either dataProcessingJobId and a mlModelTrainingJobId, or a trainingJobName.

    • modelTransformOutputS3Location — (String)

      The location in Amazon S3 where the model artifacts are to be stored.

    • sagemakerIamRoleArn — (String)

      The ARN of an IAM role for SageMaker execution. This must be listed in your DB cluster parameter group or an error will occur.

    • neptuneIamRoleArn — (String)

      The ARN of an IAM role that provides Neptune access to SageMaker and Amazon S3 resources. This must be listed in your DB cluster parameter group or an error will occur.

    • customModelTransformParameters — (map)

      Configuration information for a model transform using a custom model. The customModelTransformParameters object contains the following fields, which must have values compatible with the saved model parameters from the training job:

      • sourceS3DirectoryPathrequired — (String)

        The path to the Amazon S3 location where the Python module implementing your model is located. This must point to a valid existing Amazon S3 location that contains, at a minimum, a training script, a transform script, and a model-hpo-configuration.json file.

      • transformEntryPointScript — (String)

        The name of the entry point in your module of a script that should be run after the best model from the hyperparameter search has been identified, to compute the model artifacts necessary for model deployment. It should be able to run with no command-line arguments. The default is transform.py.

    • baseProcessingInstanceType — (String)

      The type of ML instance used in preparing and managing training of ML models. This is an ML compute instance chosen based on memory requirements for processing the training data and model.

    • baseProcessingInstanceVolumeSizeInGB — (Integer)

      The disk volume size of the training instance in gigabytes. The default is 0. Both input data and the output model are stored on disk, so the volume size must be large enough to hold both data sets. If not specified or 0, Neptune ML selects a disk volume size based on the recommendation generated in the data processing step.

    • subnets — (Array<String>)

      The IDs of the subnets in the Neptune VPC. The default is None.

    • securityGroupIds — (Array<String>)

      The VPC security group IDs. The default is None.

    • volumeEncryptionKMSKey — (String)

      The Amazon Key Management Service (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.

    • s3OutputEncryptionKMSKey — (String)

      The Amazon Key Management Service (KMS) key that SageMaker uses to encrypt the output of the processing job. The default is none.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • id — (String)

        The unique ID of the new model transform job.

      • arn — (String)

        The ARN of the model transform job.

      • creationTimeInMillis — (Integer)

        The creation time of the model transform job, in milliseconds.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.