Class: Aws::Neptunedata::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb

Overview

An API client for Neptunedata. To construct a client, you need to configure a :region and :credentials.

client = Aws::Neptunedata::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :disable_request_compression (Boolean) — default: false

    When set to 'true' the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP)

    Normally you should not configure the :endpoint option directly. This is normally constructed from the :region option. Configuring :endpoint is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :ignore_configured_endpoint_urls (Boolean)

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :request_min_compression_size_bytes (Integer) — default: 10240

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/. It should have a maximum length of 50.

  • :secret_access_key (String)
  • :session_token (String)
  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

    • Aws::SSOTokenProvider - Used for loading tokens from AWS SSO using an access token generated from aws login.

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::Neptunedata::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::Neptunedata::EndpointParameters

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_open_timeout (Float) — default: 15

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :on_chunk_received (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a content-length).

  • :on_chunk_sent (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.



409
410
411
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 409

def initialize(*args)
  super
end

Instance Method Details

#cancel_gremlin_query(params = {}) ⇒ Types::CancelGremlinQueryOutput

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.

Examples:

Request syntax with placeholder values


resp = client.cancel_gremlin_query({
  query_id: "String", # required
})

Response structure


resp.status #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :query_id (required, String)

    The unique identifier that identifies the query to be canceled.

Returns:

See Also:



449
450
451
452
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 449

def cancel_gremlin_query(params = {}, options = {})
  req = build_request(:cancel_gremlin_query, params)
  req.send_request(options)
end

#cancel_loader_job(params = {}) ⇒ Types::CancelLoaderJobOutput

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..

Examples:

Request syntax with placeholder values


resp = client.cancel_loader_job({
  load_id: "String", # required
})

Response structure


resp.status #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :load_id (required, String)

    The ID of the load job to be deleted.

Returns:

See Also:



488
489
490
491
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 488

def cancel_loader_job(params = {}, options = {})
  req = build_request(:cancel_loader_job, params)
  req.send_request(options)
end

#cancel_ml_data_processing_job(params = {}) ⇒ Types::CancelMLDataProcessingJobOutput

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.

Examples:

Request syntax with placeholder values


resp = client.cancel_ml_data_processing_job({
  id: "String", # required
  neptune_iam_role_arn: "String",
  clean: false,
})

Response structure


resp.status #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The unique identifier of the data-processing job.

  • :neptune_iam_role_arn (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.

Returns:

See Also:



538
539
540
541
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 538

def cancel_ml_data_processing_job(params = {}, options = {})
  req = build_request(:cancel_ml_data_processing_job, params)
  req.send_request(options)
end

#cancel_ml_model_training_job(params = {}) ⇒ Types::CancelMLModelTrainingJobOutput

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.

Examples:

Request syntax with placeholder values


resp = client.cancel_ml_model_training_job({
  id: "String", # required
  neptune_iam_role_arn: "String",
  clean: false,
})

Response structure


resp.status #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

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

  • :neptune_iam_role_arn (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.

Returns:

See Also:



588
589
590
591
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 588

def cancel_ml_model_training_job(params = {}, options = {})
  req = build_request(:cancel_ml_model_training_job, params)
  req.send_request(options)
end

#cancel_ml_model_transform_job(params = {}) ⇒ Types::CancelMLModelTransformJobOutput

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.

Examples:

Request syntax with placeholder values


resp = client.cancel_ml_model_transform_job({
  id: "String", # required
  neptune_iam_role_arn: "String",
  clean: false,
})

Response structure


resp.status #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

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

  • :neptune_iam_role_arn (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.

Returns:

See Also:



638
639
640
641
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 638

def cancel_ml_model_transform_job(params = {}, options = {})
  req = build_request(:cancel_ml_model_transform_job, params)
  req.send_request(options)
end

#cancel_open_cypher_query(params = {}) ⇒ Types::CancelOpenCypherQueryOutput

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.

Examples:

Request syntax with placeholder values


resp = client.cancel_open_cypher_query({
  query_id: "String", # required
  silent: false,
})

Response structure


resp.status #=> String
resp.payload #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :query_id (required, 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.

Returns:

See Also:



684
685
686
687
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 684

def cancel_open_cypher_query(params = {}, options = {})
  req = build_request(:cancel_open_cypher_query, params)
  req.send_request(options)
end

#create_ml_endpoint(params = {}) ⇒ Types::CreateMLEndpointOutput

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.

Examples:

Request syntax with placeholder values


resp = client.create_ml_endpoint({
  id: "String",
  ml_model_training_job_id: "String",
  ml_model_transform_job_id: "String",
  update: false,
  neptune_iam_role_arn: "String",
  model_name: "String",
  instance_type: "String",
  instance_count: 1,
  volume_encryption_kms_key: "String",
})

Response structure


resp.id #=> String
resp.arn #=> String
resp.creation_time_in_millis #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :id (String)

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

  • :ml_model_training_job_id (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.

  • :ml_model_transform_job_id (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.

  • :neptune_iam_role_arn (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.

  • :model_name (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.

  • :instance_type (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.

  • :instance_count (Integer)

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

  • :volume_encryption_kms_key (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.

Returns:

See Also:



778
779
780
781
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 778

def create_ml_endpoint(params = {}, options = {})
  req = build_request(:create_ml_endpoint, params)
  req.send_request(options)
end

#delete_ml_endpoint(params = {}) ⇒ Types::DeleteMLEndpointOutput

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.

Examples:

Request syntax with placeholder values


resp = client.delete_ml_endpoint({
  id: "String", # required
  neptune_iam_role_arn: "String",
  clean: false,
})

Response structure


resp.status #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The unique identifier of the inference endpoint.

  • :neptune_iam_role_arn (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.

Returns:

See Also:



828
829
830
831
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 828

def delete_ml_endpoint(params = {}, options = {})
  req = build_request(:delete_ml_endpoint, params)
  req.send_request(options)
end

#delete_propertygraph_statistics(params = {}) ⇒ Types::DeletePropertygraphStatisticsOutput

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.

Examples:

Response structure


resp.status_code #=> Integer
resp.status #=> String
resp.payload.active #=> Boolean
resp.payload.statistics_id #=> String

Parameters:

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

    ({})

Returns:

See Also:



861
862
863
864
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 861

def delete_propertygraph_statistics(params = {}, options = {})
  req = build_request(:delete_propertygraph_statistics, params)
  req.send_request(options)
end

#delete_sparql_statistics(params = {}) ⇒ Types::DeleteSparqlStatisticsOutput

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.

Examples:

Response structure


resp.status_code #=> Integer
resp.status #=> String
resp.payload.active #=> Boolean
resp.payload.statistics_id #=> String

Parameters:

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

    ({})

Returns:

See Also:



894
895
896
897
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 894

def delete_sparql_statistics(params = {}, options = {})
  req = build_request(:delete_sparql_statistics, params)
  req.send_request(options)
end

#execute_fast_reset(params = {}) ⇒ Types::ExecuteFastResetOutput

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.

Examples:

Request syntax with placeholder values


resp = client.execute_fast_reset({
  action: "initiateDatabaseReset", # required, accepts initiateDatabaseReset, performDatabaseReset
  token: "String",
})

Response structure


resp.status #=> String
resp.payload.token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :action (required, 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.

  • :token (String)

    The fast-reset token to initiate the reset.

Returns:

See Also:



952
953
954
955
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 952

def execute_fast_reset(params = {}, options = {})
  req = build_request(:execute_fast_reset, params)
  req.send_request(options)
end

#execute_gremlin_explain_query(params = {}) ⇒ Types::ExecuteGremlinExplainQueryOutput

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).

Examples:

Request syntax with placeholder values


resp = client.execute_gremlin_explain_query({
  gremlin_query: "String", # required
})

Response structure


resp.output #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :gremlin_query (required, String)

    The Gremlin explain query string.

Returns:

See Also:



1017
1018
1019
1020
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 1017

def execute_gremlin_explain_query(params = {}, options = {})
  req = build_request(:execute_gremlin_explain_query, params)
  req.send_request(options)
end

#execute_gremlin_profile_query(params = {}) ⇒ Types::ExecuteGremlinProfileQueryOutput

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).

Examples:

Request syntax with placeholder values


resp = client.execute_gremlin_profile_query({
  gremlin_query: "String", # required
  results: false,
  chop: 1,
  serializer: "String",
  index_ops: false,
})

Response structure


resp.output #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :gremlin_query (required, 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.

  • :index_ops (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.

Returns:

See Also:



1091
1092
1093
1094
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 1091

def execute_gremlin_profile_query(params = {}, options = {})
  req = build_request(:execute_gremlin_profile_query, params)
  req.send_request(options)
end

#execute_gremlin_query(params = {}) ⇒ Types::ExecuteGremlinQueryOutput

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).

Examples:

Request syntax with placeholder values


resp = client.execute_gremlin_query({
  gremlin_query: "String", # required
  serializer: "String",
})

Response structure


resp.request_id #=> String
resp.status.message #=> String
resp.status.code #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :gremlin_query (required, 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.

Returns:

See Also:



1173
1174
1175
1176
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 1173

def execute_gremlin_query(params = {}, options = {})
  req = build_request(:execute_gremlin_query, params)
  req.send_request(options)
end

#execute_open_cypher_explain_query(params = {}) ⇒ Types::ExecuteOpenCypherExplainQueryOutput

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).

Examples:

Request syntax with placeholder values


resp = client.execute_open_cypher_explain_query({
  open_cypher_query: "String", # required
  parameters: "String",
  explain_mode: "static", # required, accepts static, dynamic, details
})

Response structure


resp.results #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :open_cypher_query (required, String)

    The openCypher query string.

  • :parameters (String)

    The openCypher query parameters.

  • :explain_mode (required, String)

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

Returns:

See Also:



1228
1229
1230
1231
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 1228

def execute_open_cypher_explain_query(params = {}, options = {})
  req = build_request(:execute_open_cypher_explain_query, params)
  req.send_request(options)
end

#execute_open_cypher_query(params = {}) ⇒ Types::ExecuteOpenCypherQueryOutput

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).

Examples:

Request syntax with placeholder values


resp = client.execute_open_cypher_query({
  open_cypher_query: "String", # required
  parameters: "String",
})

Response structure

Parameters:

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

    ({})

Options Hash (params):

  • :open_cypher_query (required, 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.

Returns:

See Also:



1302
1303
1304
1305
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 1302

def execute_open_cypher_query(params = {}, options = {})
  req = build_request(:execute_open_cypher_query, params)
  req.send_request(options)
end

#get_engine_status(params = {}) ⇒ Types::GetEngineStatusOutput

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.

Examples:

Response structure


resp.status #=> String
resp.start_time #=> String
resp.db_engine_version #=> String
resp.role #=> String
resp.dfe_query_engine #=> String
resp.gremlin.version #=> String
resp.sparql.version #=> String
resp.opencypher.version #=> String
resp.lab_mode #=> Hash
resp.lab_mode["String"] #=> String
resp.rolling_back_trx_count #=> Integer
resp.rolling_back_trx_earliest_start_time #=> String
resp.features #=> Hash
resp.settings #=> Hash
resp.settings["String"] #=> String

Parameters:

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

    ({})

Returns:

See Also:



1356
1357
1358
1359
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 1356

def get_engine_status(params = {}, options = {})
  req = build_request(:get_engine_status, params)
  req.send_request(options)
end

#get_gremlin_query_status(params = {}) ⇒ Types::GetGremlinQueryStatusOutput

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).

Examples:

Request syntax with placeholder values


resp = client.get_gremlin_query_status({
  query_id: "String", # required
})

Response structure


resp.query_id #=> String
resp.query_string #=> String
resp.query_eval_stats.waited #=> Integer
resp.query_eval_stats.elapsed #=> Integer
resp.query_eval_stats.cancelled #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :query_id (required, String)

    The unique identifier that identifies the Gremlin query.

Returns:

See Also:



1406
1407
1408
1409
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 1406

def get_gremlin_query_status(params = {}, options = {})
  req = build_request(:get_gremlin_query_status, params)
  req.send_request(options)
end

#get_loader_job_status(params = {}) ⇒ Types::GetLoaderJobStatusOutput

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..

Examples:

Request syntax with placeholder values


resp = client.get_loader_job_status({
  load_id: "String", # required
  details: false,
  errors: false,
  page: 1,
  errors_per_page: 1,
})

Response structure


resp.status #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :load_id (required, 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.

  • :errors_per_page (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.

Returns:

See Also:



1473
1474
1475
1476
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 1473

def get_loader_job_status(params = {}, options = {})
  req = build_request(:get_loader_job_status, params)
  req.send_request(options)
end

#get_ml_data_processing_job(params = {}) ⇒ Types::GetMLDataProcessingJobOutput

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.

Examples:

Request syntax with placeholder values


resp = client.get_ml_data_processing_job({
  id: "String", # required
  neptune_iam_role_arn: "String",
})

Response structure


resp.status #=> String
resp.id #=> String
resp.processing_job.name #=> String
resp.processing_job.arn #=> String
resp.processing_job.status #=> String
resp.processing_job.output_location #=> String
resp.processing_job.failure_reason #=> String
resp.processing_job.cloudwatch_log_url #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

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

  • :neptune_iam_role_arn (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.

Returns:

See Also:



1528
1529
1530
1531
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 1528

def get_ml_data_processing_job(params = {}, options = {})
  req = build_request(:get_ml_data_processing_job, params)
  req.send_request(options)
end

#get_ml_endpoint(params = {}) ⇒ Types::GetMLEndpointOutput

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.

Examples:

Request syntax with placeholder values


resp = client.get_ml_endpoint({
  id: "String", # required
  neptune_iam_role_arn: "String",
})

Response structure


resp.status #=> String
resp.id #=> String
resp.endpoint.name #=> String
resp.endpoint.arn #=> String
resp.endpoint.status #=> String
resp.endpoint.output_location #=> String
resp.endpoint.failure_reason #=> String
resp.endpoint.cloudwatch_log_url #=> String
resp.endpoint_config.name #=> String
resp.endpoint_config.arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The unique identifier of the inference endpoint.

  • :neptune_iam_role_arn (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.

Returns:

See Also:



1585
1586
1587
1588
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 1585

def get_ml_endpoint(params = {}, options = {})
  req = build_request(:get_ml_endpoint, params)
  req.send_request(options)
end

#get_ml_model_training_job(params = {}) ⇒ Types::GetMLModelTrainingJobOutput

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.

Examples:

Request syntax with placeholder values


resp = client.get_ml_model_training_job({
  id: "String", # required
  neptune_iam_role_arn: "String",
})

Response structure


resp.status #=> String
resp.id #=> String
resp.processing_job.name #=> String
resp.processing_job.arn #=> String
resp.processing_job.status #=> String
resp.processing_job.output_location #=> String
resp.processing_job.failure_reason #=> String
resp.processing_job.cloudwatch_log_url #=> String
resp.hpo_job.name #=> String
resp.hpo_job.arn #=> String
resp.hpo_job.status #=> String
resp.hpo_job.output_location #=> String
resp.hpo_job.failure_reason #=> String
resp.hpo_job.cloudwatch_log_url #=> String
resp.model_transform_job.name #=> String
resp.model_transform_job.arn #=> String
resp.model_transform_job.status #=> String
resp.model_transform_job.output_location #=> String
resp.model_transform_job.failure_reason #=> String
resp.model_transform_job.cloudwatch_log_url #=> String
resp.ml_models #=> Array
resp.ml_models[0].name #=> String
resp.ml_models[0].arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

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

  • :neptune_iam_role_arn (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.

Returns:

See Also:



1658
1659
1660
1661
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 1658

def get_ml_model_training_job(params = {}, options = {})
  req = build_request(:get_ml_model_training_job, params)
  req.send_request(options)
end

#get_ml_model_transform_job(params = {}) ⇒ Types::GetMLModelTransformJobOutput

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.

Examples:

Request syntax with placeholder values


resp = client.get_ml_model_transform_job({
  id: "String", # required
  neptune_iam_role_arn: "String",
})

Response structure


resp.status #=> String
resp.id #=> String
resp.base_processing_job.name #=> String
resp.base_processing_job.arn #=> String
resp.base_processing_job.status #=> String
resp.base_processing_job.output_location #=> String
resp.base_processing_job.failure_reason #=> String
resp.base_processing_job.cloudwatch_log_url #=> String
resp.remote_model_transform_job.name #=> String
resp.remote_model_transform_job.arn #=> String
resp.remote_model_transform_job.status #=> String
resp.remote_model_transform_job.output_location #=> String
resp.remote_model_transform_job.failure_reason #=> String
resp.remote_model_transform_job.cloudwatch_log_url #=> String
resp.models #=> Array
resp.models[0].name #=> String
resp.models[0].arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

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

  • :neptune_iam_role_arn (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.

Returns:

See Also:



1724
1725
1726
1727
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 1724

def get_ml_model_transform_job(params = {}, options = {})
  req = build_request(:get_ml_model_transform_job, params)
  req.send_request(options)
end

#get_open_cypher_query_status(params = {}) ⇒ Types::GetOpenCypherQueryStatusOutput

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).

Examples:

Request syntax with placeholder values


resp = client.get_open_cypher_query_status({
  query_id: "String", # required
})

Response structure


resp.query_id #=> String
resp.query_string #=> String
resp.query_eval_stats.waited #=> Integer
resp.query_eval_stats.elapsed #=> Integer
resp.query_eval_stats.cancelled #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :query_id (required, String)

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

Returns:

See Also:



1775
1776
1777
1778
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 1775

def get_open_cypher_query_status(params = {}, options = {})
  req = build_request(:get_open_cypher_query_status, params)
  req.send_request(options)
end

#get_propertygraph_statistics(params = {}) ⇒ Types::GetPropertygraphStatisticsOutput

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.

Examples:

Response structure


resp.status #=> String
resp.payload.auto_compute #=> Boolean
resp.payload.active #=> Boolean
resp.payload.statistics_id #=> String
resp.payload.date #=> Time
resp.payload.note #=> String
resp.payload.signature_info.signature_count #=> Integer
resp.payload.signature_info.instance_count #=> Integer
resp.payload.signature_info.predicate_count #=> Integer

Parameters:

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

    ({})

Returns:

See Also:



1812
1813
1814
1815
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 1812

def get_propertygraph_statistics(params = {}, options = {})
  req = build_request(:get_propertygraph_statistics, params)
  req.send_request(options)
end

#get_propertygraph_stream(params = {}) ⇒ Types::GetPropertygraphStreamOutput

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).

Examples:

Request syntax with placeholder values


resp = client.get_propertygraph_stream({
  limit: 1,
  iterator_type: "AT_SEQUENCE_NUMBER", # accepts AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER, TRIM_HORIZON, LATEST
  commit_num: 1,
  op_num: 1,
  encoding: "gzip", # accepts gzip
})

Response structure


resp.last_event_id #=> Hash
resp.last_event_id["String"] #=> String
resp.last_trx_timestamp_in_millis #=> Integer
resp.format #=> String
resp.records #=> Array
resp.records[0].commit_timestamp_in_millis #=> Integer
resp.records[0].event_id #=> Hash
resp.records[0].event_id["String"] #=> String
resp.records[0].data.id #=> String
resp.records[0].data.type #=> String
resp.records[0].data.key #=> String
resp.records[0].data.from #=> String
resp.records[0].data.to #=> String
resp.records[0].op #=> String
resp.records[0].is_last_op #=> Boolean
resp.total_records #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :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.

  • :iterator_type (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.

  • :commit_num (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.

  • :op_num (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.

Returns:

See Also:



1940
1941
1942
1943
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 1940

def get_propertygraph_stream(params = {}, options = {})
  req = build_request(:get_propertygraph_stream, params)
  req.send_request(options)
end

#get_propertygraph_summary(params = {}) ⇒ Types::GetPropertygraphSummaryOutput

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.

Examples:

Request syntax with placeholder values


resp = client.get_propertygraph_summary({
  mode: "basic", # accepts basic, detailed
})

Response structure


resp.status_code #=> Integer
resp.payload.version #=> String
resp.payload.last_statistics_computation_time #=> Time
resp.payload.graph_summary.num_nodes #=> Integer
resp.payload.graph_summary.num_edges #=> Integer
resp.payload.graph_summary.num_node_labels #=> Integer
resp.payload.graph_summary.num_edge_labels #=> Integer
resp.payload.graph_summary.node_labels #=> Array
resp.payload.graph_summary.node_labels[0] #=> String
resp.payload.graph_summary.edge_labels #=> Array
resp.payload.graph_summary.edge_labels[0] #=> String
resp.payload.graph_summary.num_node_properties #=> Integer
resp.payload.graph_summary.num_edge_properties #=> Integer
resp.payload.graph_summary.node_properties #=> Array
resp.payload.graph_summary.node_properties[0] #=> Hash
resp.payload.graph_summary.node_properties[0]["String"] #=> Integer
resp.payload.graph_summary.edge_properties #=> Array
resp.payload.graph_summary.edge_properties[0] #=> Hash
resp.payload.graph_summary.edge_properties[0]["String"] #=> Integer
resp.payload.graph_summary.total_node_property_values #=> Integer
resp.payload.graph_summary.total_edge_property_values #=> Integer
resp.payload.graph_summary.node_structures #=> Array
resp.payload.graph_summary.node_structures[0].count #=> Integer
resp.payload.graph_summary.node_structures[0].node_properties #=> Array
resp.payload.graph_summary.node_structures[0].node_properties[0] #=> String
resp.payload.graph_summary.node_structures[0].distinct_outgoing_edge_labels #=> Array
resp.payload.graph_summary.node_structures[0].distinct_outgoing_edge_labels[0] #=> String
resp.payload.graph_summary.edge_structures #=> Array
resp.payload.graph_summary.edge_structures[0].count #=> Integer
resp.payload.graph_summary.edge_structures[0].edge_properties #=> Array
resp.payload.graph_summary.edge_structures[0].edge_properties[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :mode (String)

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

Returns:

See Also:



2009
2010
2011
2012
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 2009

def get_propertygraph_summary(params = {}, options = {})
  req = build_request(:get_propertygraph_summary, params)
  req.send_request(options)
end

#get_rdf_graph_summary(params = {}) ⇒ Types::GetRDFGraphSummaryOutput

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.

Examples:

Request syntax with placeholder values


resp = client.get_rdf_graph_summary({
  mode: "basic", # accepts basic, detailed
})

Response structure


resp.status_code #=> Integer
resp.payload.version #=> String
resp.payload.last_statistics_computation_time #=> Time
resp.payload.graph_summary.num_distinct_subjects #=> Integer
resp.payload.graph_summary.num_distinct_predicates #=> Integer
resp.payload.graph_summary.num_quads #=> Integer
resp.payload.graph_summary.num_classes #=> Integer
resp.payload.graph_summary.classes #=> Array
resp.payload.graph_summary.classes[0] #=> String
resp.payload.graph_summary.predicates #=> Array
resp.payload.graph_summary.predicates[0] #=> Hash
resp.payload.graph_summary.predicates[0]["String"] #=> Integer
resp.payload.graph_summary.subject_structures #=> Array
resp.payload.graph_summary.subject_structures[0].count #=> Integer
resp.payload.graph_summary.subject_structures[0].predicates #=> Array
resp.payload.graph_summary.subject_structures[0].predicates[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :mode (String)

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

Returns:

See Also:



2063
2064
2065
2066
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 2063

def get_rdf_graph_summary(params = {}, options = {})
  req = build_request(:get_rdf_graph_summary, params)
  req.send_request(options)
end

#get_sparql_statistics(params = {}) ⇒ Types::GetSparqlStatisticsOutput

Gets RDF statistics (SPARQL).

Examples:

Response structure


resp.status #=> String
resp.payload.auto_compute #=> Boolean
resp.payload.active #=> Boolean
resp.payload.statistics_id #=> String
resp.payload.date #=> Time
resp.payload.note #=> String
resp.payload.signature_info.signature_count #=> Integer
resp.payload.signature_info.instance_count #=> Integer
resp.payload.signature_info.predicate_count #=> Integer

Parameters:

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

    ({})

Returns:

See Also:



2091
2092
2093
2094
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 2091

def get_sparql_statistics(params = {}, options = {})
  req = build_request(:get_sparql_statistics, params)
  req.send_request(options)
end

#get_sparql_stream(params = {}) ⇒ Types::GetSparqlStreamOutput

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).

Examples:

Request syntax with placeholder values


resp = client.get_sparql_stream({
  limit: 1,
  iterator_type: "AT_SEQUENCE_NUMBER", # accepts AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER, TRIM_HORIZON, LATEST
  commit_num: 1,
  op_num: 1,
  encoding: "gzip", # accepts gzip
})

Response structure


resp.last_event_id #=> Hash
resp.last_event_id["String"] #=> String
resp.last_trx_timestamp_in_millis #=> Integer
resp.format #=> String
resp.records #=> Array
resp.records[0].commit_timestamp_in_millis #=> Integer
resp.records[0].event_id #=> Hash
resp.records[0].event_id["String"] #=> String
resp.records[0].data.stmt #=> String
resp.records[0].op #=> String
resp.records[0].is_last_op #=> Boolean
resp.total_records #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :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.

  • :iterator_type (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.

  • :commit_num (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.

  • :op_num (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.

Returns:

See Also:



2205
2206
2207
2208
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 2205

def get_sparql_stream(params = {}, options = {})
  req = build_request(:get_sparql_stream, params)
  req.send_request(options)
end

#list_gremlin_queries(params = {}) ⇒ Types::ListGremlinQueriesOutput

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).

Examples:

Request syntax with placeholder values


resp = client.list_gremlin_queries({
  include_waiting: false,
})

Response structure


resp.accepted_query_count #=> Integer
resp.running_query_count #=> Integer
resp.queries #=> Array
resp.queries[0].query_id #=> String
resp.queries[0].query_string #=> String
resp.queries[0].query_eval_stats.waited #=> Integer
resp.queries[0].query_eval_stats.elapsed #=> Integer
resp.queries[0].query_eval_stats.cancelled #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :include_waiting (Boolean)

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

Returns:

See Also:



2261
2262
2263
2264
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 2261

def list_gremlin_queries(params = {}, options = {})
  req = build_request(:list_gremlin_queries, params)
  req.send_request(options)
end

#list_loader_jobs(params = {}) ⇒ Types::ListLoaderJobsOutput

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..

Examples:

Request syntax with placeholder values


resp = client.list_loader_jobs({
  limit: 1,
  include_queued_loads: false,
})

Response structure


resp.status #=> String
resp.payload.load_ids #=> Array
resp.payload.load_ids[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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).

  • :include_queued_loads (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.

Returns:

See Also:



2308
2309
2310
2311
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 2308

def list_loader_jobs(params = {}, options = {})
  req = build_request(:list_loader_jobs, params)
  req.send_request(options)
end

#list_ml_data_processing_jobs(params = {}) ⇒ Types::ListMLDataProcessingJobsOutput

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.

Examples:

Request syntax with placeholder values


resp = client.list_ml_data_processing_jobs({
  max_items: 1,
  neptune_iam_role_arn: "String",
})

Response structure


resp.ids #=> Array
resp.ids[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_items (Integer)

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

  • :neptune_iam_role_arn (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.

Returns:

See Also:



2355
2356
2357
2358
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 2355

def list_ml_data_processing_jobs(params = {}, options = {})
  req = build_request(:list_ml_data_processing_jobs, params)
  req.send_request(options)
end

#list_ml_endpoints(params = {}) ⇒ Types::ListMLEndpointsOutput

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.

Examples:

Request syntax with placeholder values


resp = client.list_ml_endpoints({
  max_items: 1,
  neptune_iam_role_arn: "String",
})

Response structure


resp.ids #=> Array
resp.ids[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_items (Integer)

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

  • :neptune_iam_role_arn (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.

Returns:

See Also:



2402
2403
2404
2405
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 2402

def list_ml_endpoints(params = {}, options = {})
  req = build_request(:list_ml_endpoints, params)
  req.send_request(options)
end

#list_ml_model_training_jobs(params = {}) ⇒ Types::ListMLModelTrainingJobsOutput

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.

Examples:

Request syntax with placeholder values


resp = client.list_ml_model_training_jobs({
  max_items: 1,
  neptune_iam_role_arn: "String",
})

Response structure


resp.ids #=> Array
resp.ids[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_items (Integer)

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

  • :neptune_iam_role_arn (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.

Returns:

See Also:



2450
2451
2452
2453
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 2450

def list_ml_model_training_jobs(params = {}, options = {})
  req = build_request(:list_ml_model_training_jobs, params)
  req.send_request(options)
end

#list_ml_model_transform_jobs(params = {}) ⇒ Types::ListMLModelTransformJobsOutput

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.

Examples:

Request syntax with placeholder values


resp = client.list_ml_model_transform_jobs({
  max_items: 1,
  neptune_iam_role_arn: "String",
})

Response structure


resp.ids #=> Array
resp.ids[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_items (Integer)

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

  • :neptune_iam_role_arn (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.

Returns:

See Also:



2497
2498
2499
2500
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 2497

def list_ml_model_transform_jobs(params = {}, options = {})
  req = build_request(:list_ml_model_transform_jobs, params)
  req.send_request(options)
end

#list_open_cypher_queries(params = {}) ⇒ Types::ListOpenCypherQueriesOutput

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).

Examples:

Request syntax with placeholder values


resp = client.list_open_cypher_queries({
  include_waiting: false,
})

Response structure


resp.accepted_query_count #=> Integer
resp.running_query_count #=> Integer
resp.queries #=> Array
resp.queries[0].query_id #=> String
resp.queries[0].query_string #=> String
resp.queries[0].query_eval_stats.waited #=> Integer
resp.queries[0].query_eval_stats.elapsed #=> Integer
resp.queries[0].query_eval_stats.cancelled #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :include_waiting (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.

Returns:

See Also:



2554
2555
2556
2557
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 2554

def list_open_cypher_queries(params = {}, options = {})
  req = build_request(:list_open_cypher_queries, params)
  req.send_request(options)
end

#manage_propertygraph_statistics(params = {}) ⇒ Types::ManagePropertygraphStatisticsOutput

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.

Examples:

Request syntax with placeholder values


resp = client.manage_propertygraph_statistics({
  mode: "disableAutoCompute", # accepts disableAutoCompute, enableAutoCompute, refresh
})

Response structure


resp.status #=> String
resp.payload.statistics_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :mode (String)

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

Returns:

See Also:



2595
2596
2597
2598
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 2595

def manage_propertygraph_statistics(params = {}, options = {})
  req = build_request(:manage_propertygraph_statistics, params)
  req.send_request(options)
end

#manage_sparql_statistics(params = {}) ⇒ Types::ManageSparqlStatisticsOutput

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.

Examples:

Request syntax with placeholder values


resp = client.manage_sparql_statistics({
  mode: "disableAutoCompute", # accepts disableAutoCompute, enableAutoCompute, refresh
})

Response structure


resp.status #=> String
resp.payload.statistics_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :mode (String)

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

Returns:

See Also:



2636
2637
2638
2639
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 2636

def manage_sparql_statistics(params = {}, options = {})
  req = build_request(:manage_sparql_statistics, params)
  req.send_request(options)
end

#start_loader_job(params = {}) ⇒ Types::StartLoaderJobOutput

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.

Examples:

Request syntax with placeholder values


resp = client.start_loader_job({
  source: "String", # required
  format: "csv", # required, accepts csv, opencypher, ntriples, nquads, rdfxml, turtle
  s3_bucket_region: "us-east-1", # required, accepts 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
  iam_role_arn: "String", # required
  mode: "RESUME", # accepts RESUME, NEW, AUTO
  fail_on_error: false,
  parallelism: "LOW", # accepts LOW, MEDIUM, HIGH, OVERSUBSCRIBE
  parser_configuration: {
    "String" => "String",
  },
  update_single_cardinality_properties: false,
  queue_request: false,
  dependencies: ["String"],
  user_provided_edge_ids: false,
})

Response structure


resp.status #=> String
resp.payload #=> Hash
resp.payload["String"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :source (required, 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.

    • s3://(bucket_name)/(object-key-name)

    • https://s3.amazonaws.com/(bucket_name)/(object-key-name)

    • https://s3.us-east-1.amazonaws.com/(bucket_name)/(object-key-name)

    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 (required, String)

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

    Allowed values

  • :s3_bucket_region (required, String)

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

  • :iam_role_arn (required, 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.

  • :fail_on_error (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.

  • :parser_configuration (Hash<String,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.

  • :update_single_cardinality_properties (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.

  • :queue_request (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.

  • :user_provided_edge_ids (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.

Returns:

See Also:



2955
2956
2957
2958
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 2955

def start_loader_job(params = {}, options = {})
  req = build_request(:start_loader_job, params)
  req.send_request(options)
end

#start_ml_data_processing_job(params = {}) ⇒ Types::StartMLDataProcessingJobOutput

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.

Examples:

Request syntax with placeholder values


resp = client.start_ml_data_processing_job({
  id: "String",
  previous_data_processing_job_id: "String",
  input_data_s3_location: "String", # required
  processed_data_s3_location: "String", # required
  sagemaker_iam_role_arn: "String",
  neptune_iam_role_arn: "String",
  processing_instance_type: "String",
  processing_instance_volume_size_in_gb: 1,
  processing_time_out_in_seconds: 1,
  model_type: "String",
  config_file_name: "String",
  subnets: ["String"],
  security_group_ids: ["String"],
  volume_encryption_kms_key: "String",
  s3_output_encryption_kms_key: "String",
})

Response structure


resp.id #=> String
resp.arn #=> String
resp.creation_time_in_millis #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :id (String)

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

  • :previous_data_processing_job_id (String)

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

  • :input_data_s3_location (required, String)

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

  • :processed_data_s3_location (required, String)

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

  • :sagemaker_iam_role_arn (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.

  • :neptune_iam_role_arn (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.

  • :processing_instance_type (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.

  • :processing_instance_volume_size_in_gb (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.

  • :processing_time_out_in_seconds (Integer)

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

  • :model_type (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.

  • :config_file_name (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.

  • :security_group_ids (Array<String>)

    The VPC security group IDs. The default is None.

  • :volume_encryption_kms_key (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.

  • :s3_output_encryption_kms_key (String)

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

Returns:

See Also:



3080
3081
3082
3083
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 3080

def start_ml_data_processing_job(params = {}, options = {})
  req = build_request(:start_ml_data_processing_job, params)
  req.send_request(options)
end

#start_ml_model_training_job(params = {}) ⇒ Types::StartMLModelTrainingJobOutput

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.

Examples:

Request syntax with placeholder values


resp = client.start_ml_model_training_job({
  id: "String",
  previous_model_training_job_id: "String",
  data_processing_job_id: "String", # required
  train_model_s3_location: "String", # required
  sagemaker_iam_role_arn: "String",
  neptune_iam_role_arn: "String",
  base_processing_instance_type: "String",
  training_instance_type: "String",
  training_instance_volume_size_in_gb: 1,
  training_time_out_in_seconds: 1,
  max_hpo_number_of_training_jobs: 1,
  max_hpo_parallel_training_jobs: 1,
  subnets: ["String"],
  security_group_ids: ["String"],
  volume_encryption_kms_key: "String",
  s3_output_encryption_kms_key: "String",
  enable_managed_spot_training: false,
  custom_model_training_parameters: {
    source_s3_directory_path: "String", # required
    training_entry_point_script: "String",
    transform_entry_point_script: "String",
  },
})

Response structure


resp.id #=> String
resp.arn #=> String
resp.creation_time_in_millis #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :id (String)

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

  • :previous_model_training_job_id (String)

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

  • :data_processing_job_id (required, String)

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

  • :train_model_s3_location (required, String)

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

  • :sagemaker_iam_role_arn (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.

  • :neptune_iam_role_arn (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.

  • :base_processing_instance_type (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.

  • :training_instance_type (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.

  • :training_instance_volume_size_in_gb (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.

  • :training_time_out_in_seconds (Integer)

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

  • :max_hpo_number_of_training_jobs (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.

  • :max_hpo_parallel_training_jobs (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.

  • :security_group_ids (Array<String>)

    The VPC security group IDs. The default is None.

  • :volume_encryption_kms_key (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.

  • :s3_output_encryption_kms_key (String)

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

  • :enable_managed_spot_training (Boolean)

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

  • :custom_model_training_parameters (Types::CustomModelTrainingParameters)

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

Returns:

See Also:



3223
3224
3225
3226
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 3223

def start_ml_model_training_job(params = {}, options = {})
  req = build_request(:start_ml_model_training_job, params)
  req.send_request(options)
end

#start_ml_model_transform_job(params = {}) ⇒ Types::StartMLModelTransformJobOutput

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.

Examples:

Request syntax with placeholder values


resp = client.start_ml_model_transform_job({
  id: "String",
  data_processing_job_id: "String",
  ml_model_training_job_id: "String",
  training_job_name: "String",
  model_transform_output_s3_location: "String", # required
  sagemaker_iam_role_arn: "String",
  neptune_iam_role_arn: "String",
  custom_model_transform_parameters: {
    source_s3_directory_path: "String", # required
    transform_entry_point_script: "String",
  },
  base_processing_instance_type: "String",
  base_processing_instance_volume_size_in_gb: 1,
  subnets: ["String"],
  security_group_ids: ["String"],
  volume_encryption_kms_key: "String",
  s3_output_encryption_kms_key: "String",
})

Response structure


resp.id #=> String
resp.arn #=> String
resp.creation_time_in_millis #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :id (String)

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

  • :data_processing_job_id (String)

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

  • :ml_model_training_job_id (String)

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

  • :training_job_name (String)

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

  • :model_transform_output_s3_location (required, String)

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

  • :sagemaker_iam_role_arn (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.

  • :neptune_iam_role_arn (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.

  • :custom_model_transform_parameters (Types::CustomModelTransformParameters)

    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:

  • :base_processing_instance_type (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.

  • :base_processing_instance_volume_size_in_gb (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.

  • :security_group_ids (Array<String>)

    The VPC security group IDs. The default is None.

  • :volume_encryption_kms_key (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.

  • :s3_output_encryption_kms_key (String)

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

Returns:

See Also:



3343
3344
3345
3346
# File 'gems/aws-sdk-neptunedata/lib/aws-sdk-neptunedata/client.rb', line 3343

def start_ml_model_transform_job(params = {}, options = {})
  req = build_request(:start_ml_model_transform_job, params)
  req.send_request(options)
end