Class: Aws::NeptuneGraph::Client

Inherits:
Seahorse::Client::Base
  • Object
show all
Includes:
ClientStubs
Defined in:
lib/aws-sdk-neptunegraph/client.rb

Overview

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

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

For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).

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

Class Attribute Summary collapse

API Operations collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []]

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials used for authentication. This can be any class that includes and implements ‘Aws::CredentialProvider`, or 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`

    • The ‘:access_key_id`, `:secret_access_key`, `:session_token`, and `:account_id` options.

    • ENV`, `ENV`, `ENV`, and `ENV`.

    • ‘~/.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::InstanceProfileCredentials` or `Aws::ECSCredentials` to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting `ENV` 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:

  • :access_key_id (String)
  • :account_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.

  • :auth_scheme_preference (Array<String>)

    A list of preferred authentication schemes to use when making a request. Supported values are: ‘sigv4`, `sigv4a`, `httpBearerAuth`, and `noAuth`. When set using `ENV` or in shared config as `auth_scheme_preference`, the value should be a comma-separated list.

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

    When ‘true`, the SDK will not prepend the modeled host prefix to the endpoint.

  • :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_checksum_calculation (String) — default: "when_supported"

    Determines when a checksum will be calculated for request payloads. Values are:

    • ‘when_supported` - (default) When set, a checksum will be calculated for all request payloads of operations modeled with the `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a `requestAlgorithmMember` is modeled.

    • ‘when_required` - When set, a checksum will only be calculated for request payloads of operations modeled with the `httpChecksum` trait where `requestChecksumRequired` is `true` or where a `requestAlgorithmMember` is modeled and supplied.

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

  • :response_checksum_validation (String) — default: "when_supported"

    Determines when checksum validation will be performed on response payloads. Values are:

    • ‘when_supported` - (default) When set, checksum validation is performed on all response payloads of operations modeled with the `httpChecksum` trait where `responseAlgorithms` is modeled, except when no modeled checksum algorithms are supported.

    • ‘when_required` - When set, checksum validation is not performed on response payloads of operations unless the checksum algorithm is supported and the `requestValidationModeMember` member is set to `ENABLED`.

  • :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 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 the 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` - A retry mode that includes all the functionality of `standard` mode along with automatic client side throttling.

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array)

    A list of regions that should be signed with SigV4a signing. When not passed, a default ‘:sigv4a_signing_region_set` is searched for in the following locations:

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

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses ‘NoOpTelemetryProvider` which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the

    ‘opentelemetry-sdk` gem and then, pass in an instance of a `Aws::Telemetry::OTelProvider` for telemetry provider.

  • :token_provider (Aws::TokenProvider)

    Your Bearer token used for authentication. This can be any class that includes and implements ‘Aws::TokenProvider`, or 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::NeptuneGraph::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to ‘#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::NeptuneGraph::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 ‘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_cert (OpenSSL::X509::Certificate)

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

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



471
472
473
# File 'lib/aws-sdk-neptunegraph/client.rb', line 471

def initialize(*args)
  super
end

Class Attribute Details

.identifierObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



2714
2715
2716
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2714

def identifier
  @identifier
end

Class Method Details

.errors_moduleObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



2717
2718
2719
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2717

def errors_module
  Errors
end

Instance Method Details

#build_request(operation_name, params = {}) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

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


2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2554

def build_request(operation_name, params = {})
  handlers = @handlers.for(operation_name)
  tracer = config.telemetry_provider.tracer_provider.tracer(
    Aws::Telemetry.module_to_tracer_name('Aws::NeptuneGraph')
  )
  context = Seahorse::Client::RequestContext.new(
    operation_name: operation_name,
    operation: config.api.operation(operation_name),
    client: self,
    params: params,
    config: config,
    tracer: tracer
  )
  context[:gem_name] = 'aws-sdk-neptunegraph'
  context[:gem_version] = '1.50.0'
  Seahorse::Client::Request.new(handlers, context)
end

#cancel_export_task(params = {}) ⇒ Types::CancelExportTaskOutput

Cancel the specified export task.

Examples:

Request syntax with placeholder values


resp = client.cancel_export_task({
  task_identifier: "ExportTaskId", # required
})

Response structure


resp.graph_id #=> String
resp.role_arn #=> String
resp.task_id #=> String
resp.status #=> String, one of "INITIALIZING", "EXPORTING", "SUCCEEDED", "FAILED", "CANCELLING", "CANCELLED", "DELETED"
resp.format #=> String, one of "PARQUET", "CSV"
resp.destination #=> String
resp.kms_key_identifier #=> String
resp.parquet_type #=> String, one of "COLUMNAR"
resp.status_reason #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :task_identifier (required, String)

    The unique identifier of the export task.

Returns:

See Also:



516
517
518
519
# File 'lib/aws-sdk-neptunegraph/client.rb', line 516

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

#cancel_import_task(params = {}) ⇒ Types::CancelImportTaskOutput

Deletes the specified import task.

Examples:

Request syntax with placeholder values


resp = client.cancel_import_task({
  task_identifier: "TaskId", # required
})

Response structure


resp.graph_id #=> String
resp.task_id #=> String
resp.source #=> String
resp.format #=> String, one of "CSV", "OPEN_CYPHER", "PARQUET", "NTRIPLES"
resp.parquet_type #=> String, one of "COLUMNAR"
resp.role_arn #=> String
resp.status #=> String, one of "INITIALIZING", "EXPORTING", "ANALYZING_DATA", "IMPORTING", "REPROVISIONING", "ROLLING_BACK", "SUCCEEDED", "FAILED", "CANCELLING", "CANCELLED", "DELETED"

Parameters:

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

    ({})

Options Hash (params):

  • :task_identifier (required, String)

    The unique identifier of the import task.

Returns:

See Also:



556
557
558
559
# File 'lib/aws-sdk-neptunegraph/client.rb', line 556

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

#cancel_query(params = {}) ⇒ Struct

Cancels a specified query.

Examples:

Request syntax with placeholder values


resp = client.cancel_query({
  graph_identifier: "GraphIdentifier", # required
  query_id: "String", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    The unique identifier of the Neptune Analytics graph.

  • :query_id (required, String)

    The unique identifier of the query to cancel.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



582
583
584
585
# File 'lib/aws-sdk-neptunegraph/client.rb', line 582

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

#create_graph(params = {}) ⇒ Types::CreateGraphOutput

Creates a new Neptune Analytics graph.

Examples:

Request syntax with placeholder values


resp = client.create_graph({
  graph_name: "GraphName", # required
  tags: {
    "TagKey" => "TagValue",
  },
  public_connectivity: false,
  kms_key_identifier: "KmsKeyArn",
  vector_search_configuration: {
    dimension: 1, # required
  },
  replica_count: 1,
  deletion_protection: false,
  provisioned_memory: 1, # required
})

Response structure


resp.id #=> String
resp.name #=> String
resp.arn #=> String
resp.status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "RESETTING", "UPDATING", "SNAPSHOTTING", "FAILED", "IMPORTING", "STARTING", "STOPPING", "STOPPED"
resp.status_reason #=> String
resp.create_time #=> Time
resp.provisioned_memory #=> Integer
resp.endpoint #=> String
resp.public_connectivity #=> Boolean
resp.vector_search_configuration.dimension #=> Integer
resp.replica_count #=> Integer
resp.kms_key_identifier #=> String
resp.source_snapshot_id #=> String
resp.deletion_protection #=> Boolean
resp.build_number #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :graph_name (required, String)

    A name for the new Neptune Analytics graph to be created.

    The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It cannot end with a hyphen or contain two consecutive hyphens. Only lowercase letters are allowed.

  • :tags (Hash<String,String>)

    Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy.

  • :public_connectivity (Boolean)

    Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. (‘true` to enable, or `false` to disable.

  • :kms_key_identifier (String)

    Specifies a KMS key to use to encrypt data in the new graph.

  • :vector_search_configuration (Types::VectorSearchConfiguration)

    Specifies the number of dimensions for vector embeddings that will be loaded into the graph. The value is specified as ‘dimension=`value. Max = 65,535

  • :replica_count (Integer)

    The number of replicas in other AZs. Min =0, Max = 2, Default = 1.

    Additional charges equivalent to the m-NCUs selected for the graph apply for each replica.

  • :deletion_protection (Boolean)

    Indicates whether or not to enable deletion protection on the graph. The graph can’t be deleted when deletion protection is enabled. (‘true` or `false`).

  • :provisioned_memory (required, Integer)

    The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Min = 16

Returns:

See Also:



686
687
688
689
# File 'lib/aws-sdk-neptunegraph/client.rb', line 686

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

#create_graph_snapshot(params = {}) ⇒ Types::CreateGraphSnapshotOutput

Creates a snapshot of the specific graph.

Examples:

Request syntax with placeholder values


resp = client.create_graph_snapshot({
  graph_identifier: "GraphIdentifier", # required
  snapshot_name: "SnapshotName", # required
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.id #=> String
resp.name #=> String
resp.arn #=> String
resp.source_graph_id #=> String
resp.snapshot_create_time #=> Time
resp.status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "FAILED"
resp.kms_key_identifier #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    The unique identifier of the Neptune Analytics graph.

  • :snapshot_name (required, String)

    The snapshot name. For example: ‘my-snapshot-1`.

    The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It cannot end with a hyphen or contain two consecutive hyphens. Only lowercase letters are allowed.

  • :tags (Hash<String,String>)

    Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy.

Returns:

See Also:



742
743
744
745
# File 'lib/aws-sdk-neptunegraph/client.rb', line 742

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

#create_graph_using_import_task(params = {}) ⇒ Types::CreateGraphUsingImportTaskOutput

Creates a new Neptune Analytics graph and imports data into it, either from Amazon Simple Storage Service (S3) or from a Neptune database or a Neptune database snapshot.

The data can be loaded from files in S3 that in either the [Gremlin CSV format] or the [openCypher load format].

[1]: docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-gremlin.html [2]: docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-opencypher.html

Examples:

Request syntax with placeholder values


resp = client.create_graph_using_import_task({
  graph_name: "GraphName", # required
  tags: {
    "TagKey" => "TagValue",
  },
  public_connectivity: false,
  kms_key_identifier: "KmsKeyArn",
  vector_search_configuration: {
    dimension: 1, # required
  },
  replica_count: 1,
  deletion_protection: false,
  import_options: {
    neptune: {
      s3_export_path: "NeptuneImportOptionsS3ExportPathString", # required
      s3_export_kms_key_id: "NeptuneImportOptionsS3ExportKmsKeyIdString", # required
      preserve_default_vertex_labels: false,
      preserve_edge_ids: false,
    },
  },
  max_provisioned_memory: 1,
  min_provisioned_memory: 1,
  fail_on_error: false,
  source: "String", # required
  format: "CSV", # accepts CSV, OPEN_CYPHER, PARQUET, NTRIPLES
  parquet_type: "COLUMNAR", # accepts COLUMNAR
  blank_node_handling: "convertToIri", # accepts convertToIri
  role_arn: "RoleArn", # required
})

Response structure


resp.graph_id #=> String
resp.task_id #=> String
resp.source #=> String
resp.format #=> String, one of "CSV", "OPEN_CYPHER", "PARQUET", "NTRIPLES"
resp.parquet_type #=> String, one of "COLUMNAR"
resp.role_arn #=> String
resp.status #=> String, one of "INITIALIZING", "EXPORTING", "ANALYZING_DATA", "IMPORTING", "REPROVISIONING", "ROLLING_BACK", "SUCCEEDED", "FAILED", "CANCELLING", "CANCELLED", "DELETED"
resp.import_options.neptune.s3_export_path #=> String
resp.import_options.neptune.s3_export_kms_key_id #=> String
resp.import_options.neptune.preserve_default_vertex_labels #=> Boolean
resp.import_options.neptune.preserve_edge_ids #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :graph_name (required, String)

    A name for the new Neptune Analytics graph to be created.

    The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It cannot end with a hyphen or contain two consecutive hyphens. Only lowercase letters are allowed.

  • :tags (Hash<String,String>)

    Adds metadata tags to the new graph. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy.

  • :public_connectivity (Boolean)

    Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. (‘true` to enable, or `false` to disable).

  • :kms_key_identifier (String)

    Specifies a KMS key to use to encrypt data imported into the new graph.

  • :vector_search_configuration (Types::VectorSearchConfiguration)

    Specifies the number of dimensions for vector embeddings that will be loaded into the graph. The value is specified as ‘dimension=`value. Max = 65,535

  • :replica_count (Integer)

    The number of replicas in other AZs to provision on the new graph after import. Default = 0, Min = 0, Max = 2.

    Additional charges equivalent to the m-NCUs selected for the graph apply for each replica.

  • :deletion_protection (Boolean)

    Indicates whether or not to enable deletion protection on the graph. The graph can’t be deleted when deletion protection is enabled. (‘true` or `false`).

  • :import_options (Types::ImportOptions)

    Contains options for controlling the import process. For example, if the ‘failOnError` key is set to `false`, the import skips problem data and attempts to continue (whereas if set to `true`, the default, or if omitted, the import operation halts immediately when an error is encountered.

  • :max_provisioned_memory (Integer)

    The maximum provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Default: 1024, or the approved upper limit for your account.

    If both the minimum and maximum values are specified, the final ‘provisioned-memory` will be chosen per the actual size of your imported data. If neither value is specified, 128 m-NCUs are used.

  • :min_provisioned_memory (Integer)

    The minimum provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Default: 16

  • :fail_on_error (Boolean)

    If set to ‘true`, the task halts when an import error is encountered. If set to `false`, the task skips the data that caused the error and continues if possible.

  • :source (required, String)

    A URL identifying to the location of the data to be imported. This can be an Amazon S3 path, or can point to a Neptune database endpoint or snapshot.

  • :format (String)

    Specifies the format of S3 data to be imported. Valid values are ‘CSV`, which identifies the [Gremlin CSV format], `OPEN_CYPHER`, which identifies the [openCypher load format], or `ntriples`, which identifies the [RDF n-triples] format.

    [1]: docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-gremlin.html [2]: docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-opencypher.html [3]: docs.aws.amazon.com/neptune-analytics/latest/userguide/using-rdf-data.html

  • :parquet_type (String)

    The parquet type of the import task.

  • :blank_node_handling (String)

    The method to handle blank nodes in the dataset. Currently, only ‘convertToIri` is supported, meaning blank nodes are converted to unique IRIs at load time. Must be provided when format is `ntriples`. For more information, see [Handling RDF values].

    [1]: docs.aws.amazon.com/neptune-analytics/latest/userguide/using-rdf-data.html#rdf-handling

  • :role_arn (required, String)

    The ARN of the IAM role that will allow access to the data that is to be imported.

Returns:

See Also:



917
918
919
920
# File 'lib/aws-sdk-neptunegraph/client.rb', line 917

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

#create_private_graph_endpoint(params = {}) ⇒ Types::CreatePrivateGraphEndpointOutput

Create a private graph endpoint to allow private access to the graph from within a VPC. You can attach security groups to the private graph endpoint.

<note markdown=“1”> VPC endpoint charges apply.

</note>

Examples:

Request syntax with placeholder values


resp = client.create_private_graph_endpoint({
  graph_identifier: "GraphIdentifier", # required
  vpc_id: "VpcId",
  subnet_ids: ["SubnetId"],
  vpc_security_group_ids: ["SecurityGroupId"],
})

Response structure


resp.vpc_id #=> String
resp.subnet_ids #=> Array
resp.subnet_ids[0] #=> String
resp.status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "FAILED"
resp.vpc_endpoint_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    The unique identifier of the Neptune Analytics graph.

  • :vpc_id (String)

    The VPC in which the private graph endpoint needs to be created.

  • :subnet_ids (Array<String>)

    Subnets in which private graph endpoint ENIs are created.

  • :vpc_security_group_ids (Array<String>)

    Security groups to be attached to the private graph endpoint.

Returns:

See Also:



970
971
972
973
# File 'lib/aws-sdk-neptunegraph/client.rb', line 970

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

#delete_graph(params = {}) ⇒ Types::DeleteGraphOutput

Deletes the specified graph. Graphs cannot be deleted if delete-protection is enabled.

Examples:

Request syntax with placeholder values


resp = client.delete_graph({
  graph_identifier: "GraphIdentifier", # required
  skip_snapshot: false, # required
})

Response structure


resp.id #=> String
resp.name #=> String
resp.arn #=> String
resp.status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "RESETTING", "UPDATING", "SNAPSHOTTING", "FAILED", "IMPORTING", "STARTING", "STOPPING", "STOPPED"
resp.status_reason #=> String
resp.create_time #=> Time
resp.provisioned_memory #=> Integer
resp.endpoint #=> String
resp.public_connectivity #=> Boolean
resp.vector_search_configuration.dimension #=> Integer
resp.replica_count #=> Integer
resp.kms_key_identifier #=> String
resp.source_snapshot_id #=> String
resp.deletion_protection #=> Boolean
resp.build_number #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    The unique identifier of the Neptune Analytics graph.

  • :skip_snapshot (required, Boolean)

    Determines whether a final graph snapshot is created before the graph is deleted. If ‘true` is specified, no graph snapshot is created. If `false` is specified, a graph snapshot is created before the graph is deleted.

Returns:

See Also:



1034
1035
1036
1037
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1034

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

#delete_graph_snapshot(params = {}) ⇒ Types::DeleteGraphSnapshotOutput

Deletes the specified graph snapshot.

Examples:

Request syntax with placeholder values


resp = client.delete_graph_snapshot({
  snapshot_identifier: "SnapshotIdentifier", # required
})

Response structure


resp.id #=> String
resp.name #=> String
resp.arn #=> String
resp.source_graph_id #=> String
resp.snapshot_create_time #=> Time
resp.status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "FAILED"
resp.kms_key_identifier #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :snapshot_identifier (required, String)

    ID of the graph snapshot to be deleted.

Returns:

See Also:



1074
1075
1076
1077
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1074

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

#delete_private_graph_endpoint(params = {}) ⇒ Types::DeletePrivateGraphEndpointOutput

Deletes a private graph endpoint.

Examples:

Request syntax with placeholder values


resp = client.delete_private_graph_endpoint({
  graph_identifier: "GraphIdentifier", # required
  vpc_id: "VpcId", # required
})

Response structure


resp.vpc_id #=> String
resp.subnet_ids #=> Array
resp.subnet_ids[0] #=> String
resp.status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "FAILED"
resp.vpc_endpoint_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    The unique identifier of the Neptune Analytics graph.

  • :vpc_id (required, String)

    The ID of the VPC where the private endpoint is located.

Returns:

See Also:



1113
1114
1115
1116
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1113

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

#execute_query(params = {}) ⇒ Types::ExecuteQueryOutput

Execute an openCypher query.

When invoking this operation in a Neptune Analytics cluster, 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:

  • neptune-graph:ReadDataViaQuery

  • neptune-graph:WriteDataViaQuery

  • neptune-graph:DeleteDataViaQuery

Examples:

Request syntax with placeholder values


resp = client.execute_query({
  graph_identifier: "GraphIdentifier", # required
  query_string: "String", # required
  language: "OPEN_CYPHER", # required, accepts OPEN_CYPHER
  parameters: {
    "String" => {
    },
  },
  plan_cache: "ENABLED", # accepts ENABLED, DISABLED, AUTO
  explain_mode: "STATIC", # accepts STATIC, DETAILS
  query_timeout_milliseconds: 1,
})

Response structure


resp.payload #=> IO

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    The unique identifier of the Neptune Analytics graph.

  • :query_string (required, String)

    The query string to be executed.

  • :language (required, String)

    The query language the query is written in. Currently only openCypher is supported.

  • :parameters (Hash<String,Hash,Array,String,Numeric,Boolean>)

    The data parameters the query can use in JSON format. For example: “john”, “age”: 20. (optional)

  • :plan_cache (String)

    Query plan cache is a feature that saves the query plan and reuses it on successive executions of the same query. This reduces query latency, and works for both ‘READ` and `UPDATE` queries. The plan cache is an LRU cache with a 5 minute TTL and a capacity of 1000.

  • :explain_mode (String)

    The explain mode parameter returns a query explain instead of the actual query results. A query explain can be used to gather insights about the query execution such as planning decisions, time spent on each operator, solutions flowing etc.

  • :query_timeout_milliseconds (Integer)

    Specifies the query timeout duration, in milliseconds. (optional)

Returns:

See Also:



1187
1188
1189
1190
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1187

def execute_query(params = {}, options = {}, &block)
  req = build_request(:execute_query, params)
  req.send_request(options, &block)
end

#get_export_task(params = {}) ⇒ Types::GetExportTaskOutput

Retrieves a specified export task.

The following waiters are defined for this operation (see #wait_until for detailed usage):

* export_task_cancelled
* export_task_successful

Examples:

Request syntax with placeholder values


resp = client.get_export_task({
  task_identifier: "ExportTaskId", # required
})

Response structure


resp.graph_id #=> String
resp.role_arn #=> String
resp.task_id #=> String
resp.status #=> String, one of "INITIALIZING", "EXPORTING", "SUCCEEDED", "FAILED", "CANCELLING", "CANCELLED", "DELETED"
resp.format #=> String, one of "PARQUET", "CSV"
resp.destination #=> String
resp.kms_key_identifier #=> String
resp.parquet_type #=> String, one of "COLUMNAR"
resp.status_reason #=> String
resp.export_task_details.start_time #=> Time
resp.export_task_details.time_elapsed_seconds #=> Integer
resp.export_task_details.progress_percentage #=> Integer
resp.export_task_details.num_vertices_written #=> Integer
resp.export_task_details.num_edges_written #=> Integer
resp.export_filter.vertex_filter #=> Hash
resp.export_filter.vertex_filter["ExportFilterLabel"].properties #=> Hash
resp.export_filter.vertex_filter["ExportFilterLabel"].properties["ExportFilterOutputPropertyName"].output_type #=> String
resp.export_filter.vertex_filter["ExportFilterLabel"].properties["ExportFilterOutputPropertyName"].source_property_name #=> String
resp.export_filter.vertex_filter["ExportFilterLabel"].properties["ExportFilterOutputPropertyName"].multi_value_handling #=> String, one of "TO_LIST", "PICK_FIRST"
resp.export_filter.edge_filter #=> Hash
resp.export_filter.edge_filter["ExportFilterLabel"].properties #=> Hash
resp.export_filter.edge_filter["ExportFilterLabel"].properties["ExportFilterOutputPropertyName"].output_type #=> String
resp.export_filter.edge_filter["ExportFilterLabel"].properties["ExportFilterOutputPropertyName"].source_property_name #=> String
resp.export_filter.edge_filter["ExportFilterLabel"].properties["ExportFilterOutputPropertyName"].multi_value_handling #=> String, one of "TO_LIST", "PICK_FIRST"

Parameters:

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

    ({})

Options Hash (params):

  • :task_identifier (required, String)

    The unique identifier of the export task.

Returns:

See Also:



1254
1255
1256
1257
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1254

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

#get_graph(params = {}) ⇒ Types::GetGraphOutput

Gets information about a specified graph.

The following waiters are defined for this operation (see #wait_until for detailed usage):

* graph_available
* graph_deleted
* graph_stopped

Examples:

Request syntax with placeholder values


resp = client.get_graph({
  graph_identifier: "GraphIdentifier", # required
})

Response structure


resp.id #=> String
resp.name #=> String
resp.arn #=> String
resp.status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "RESETTING", "UPDATING", "SNAPSHOTTING", "FAILED", "IMPORTING", "STARTING", "STOPPING", "STOPPED"
resp.status_reason #=> String
resp.create_time #=> Time
resp.provisioned_memory #=> Integer
resp.endpoint #=> String
resp.public_connectivity #=> Boolean
resp.vector_search_configuration.dimension #=> Integer
resp.replica_count #=> Integer
resp.kms_key_identifier #=> String
resp.source_snapshot_id #=> String
resp.deletion_protection #=> Boolean
resp.build_number #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    The unique identifier of the Neptune Analytics graph.

Returns:

See Also:



1317
1318
1319
1320
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1317

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

#get_graph_snapshot(params = {}) ⇒ Types::GetGraphSnapshotOutput

Retrieves a specified graph snapshot.

The following waiters are defined for this operation (see #wait_until for detailed usage):

* graph_snapshot_available
* graph_snapshot_deleted

Examples:

Request syntax with placeholder values


resp = client.get_graph_snapshot({
  snapshot_identifier: "SnapshotIdentifier", # required
})

Response structure


resp.id #=> String
resp.name #=> String
resp.arn #=> String
resp.source_graph_id #=> String
resp.snapshot_create_time #=> Time
resp.status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "FAILED"
resp.kms_key_identifier #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :snapshot_identifier (required, String)

    The ID of the snapshot to retrieve.

Returns:

See Also:



1363
1364
1365
1366
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1363

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

#get_graph_summary(params = {}) ⇒ Types::GetGraphSummaryOutput

Gets a graph summary for a property graph.

Examples:

Request syntax with placeholder values


resp = client.get_graph_summary({
  graph_identifier: "GraphIdentifier", # required
  mode: "BASIC", # accepts BASIC, DETAILED
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    The unique identifier of the Neptune Analytics graph.

  • :mode (String)

    The summary mode can take one of two values: ‘basic` (the default), and `detailed`.

Returns:

See Also:



1427
1428
1429
1430
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1427

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

#get_import_task(params = {}) ⇒ Types::GetImportTaskOutput

Retrieves a specified import task.

The following waiters are defined for this operation (see #wait_until for detailed usage):

* import_task_cancelled
* import_task_successful

Examples:

Request syntax with placeholder values


resp = client.get_import_task({
  task_identifier: "TaskId", # required
})

Response structure


resp.graph_id #=> String
resp.task_id #=> String
resp.source #=> String
resp.format #=> String, one of "CSV", "OPEN_CYPHER", "PARQUET", "NTRIPLES"
resp.parquet_type #=> String, one of "COLUMNAR"
resp.role_arn #=> String
resp.status #=> String, one of "INITIALIZING", "EXPORTING", "ANALYZING_DATA", "IMPORTING", "REPROVISIONING", "ROLLING_BACK", "SUCCEEDED", "FAILED", "CANCELLING", "CANCELLED", "DELETED"
resp.import_options.neptune.s3_export_path #=> String
resp.import_options.neptune.s3_export_kms_key_id #=> String
resp.import_options.neptune.preserve_default_vertex_labels #=> Boolean
resp.import_options.neptune.preserve_edge_ids #=> Boolean
resp.import_task_details.status #=> String
resp.import_task_details.start_time #=> Time
resp.import_task_details.time_elapsed_seconds #=> Integer
resp.import_task_details.progress_percentage #=> Integer
resp.import_task_details.error_count #=> Integer
resp.import_task_details.error_details #=> String
resp.import_task_details.statement_count #=> Integer
resp.import_task_details.dictionary_entry_count #=> Integer
resp.attempt_number #=> Integer
resp.status_reason #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :task_identifier (required, String)

    The unique identifier of the import task.

Returns:

See Also:



1491
1492
1493
1494
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1491

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

#get_private_graph_endpoint(params = {}) ⇒ Types::GetPrivateGraphEndpointOutput

Retrieves information about a specified private endpoint.

The following waiters are defined for this operation (see #wait_until for detailed usage):

* private_graph_endpoint_available
* private_graph_endpoint_deleted

Examples:

Request syntax with placeholder values


resp = client.get_private_graph_endpoint({
  graph_identifier: "GraphIdentifier", # required
  vpc_id: "VpcId", # required
})

Response structure


resp.vpc_id #=> String
resp.subnet_ids #=> Array
resp.subnet_ids[0] #=> String
resp.status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "FAILED"
resp.vpc_endpoint_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    The unique identifier of the Neptune Analytics graph.

  • :vpc_id (required, String)

    The ID of the VPC where the private endpoint is located.

Returns:

See Also:



1536
1537
1538
1539
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1536

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

#get_query(params = {}) ⇒ Types::GetQueryOutput

Retrieves the status of a specified query.

<note markdown=“1”> When invoking this operation in a Neptune Analytics cluster, the IAM user or role making the request must have the ‘neptune-graph:GetQueryStatus` IAM action attached.

</note>

Examples:

Request syntax with placeholder values


resp = client.get_query({
  graph_identifier: "GraphIdentifier", # required
  query_id: "String", # required
})

Response structure


resp.id #=> String
resp.query_string #=> String
resp.waited #=> Integer
resp.elapsed #=> Integer
resp.state #=> String, one of "RUNNING", "WAITING", "CANCELLING"

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    The unique identifier of the Neptune Analytics graph.

  • :query_id (required, String)

    The ID of the query in question.

Returns:

See Also:



1582
1583
1584
1585
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1582

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

#list_export_tasks(params = {}) ⇒ Types::ListExportTasksOutput

Retrieves a list of export tasks.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_export_tasks({
  graph_identifier: "GraphIdentifier",
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.tasks #=> Array
resp.tasks[0].graph_id #=> String
resp.tasks[0].role_arn #=> String
resp.tasks[0].task_id #=> String
resp.tasks[0].status #=> String, one of "INITIALIZING", "EXPORTING", "SUCCEEDED", "FAILED", "CANCELLING", "CANCELLED", "DELETED"
resp.tasks[0].format #=> String, one of "PARQUET", "CSV"
resp.tasks[0].destination #=> String
resp.tasks[0].kms_key_identifier #=> String
resp.tasks[0].parquet_type #=> String, one of "COLUMNAR"
resp.tasks[0].status_reason #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (String)

    The unique identifier of the Neptune Analytics graph.

  • :next_token (String)

    Pagination token used to paginate input.

  • :max_results (Integer)

    The maximum number of export tasks to return.

Returns:

See Also:



1631
1632
1633
1634
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1631

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

#list_graph_snapshots(params = {}) ⇒ Types::ListGraphSnapshotsOutput

Lists available snapshots of a specified Neptune Analytics graph.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_graph_snapshots({
  graph_identifier: "GraphIdentifier",
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.graph_snapshots #=> Array
resp.graph_snapshots[0].id #=> String
resp.graph_snapshots[0].name #=> String
resp.graph_snapshots[0].arn #=> String
resp.graph_snapshots[0].source_graph_id #=> String
resp.graph_snapshots[0].snapshot_create_time #=> Time
resp.graph_snapshots[0].status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "FAILED"
resp.graph_snapshots[0].kms_key_identifier #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (String)

    The unique identifier of the Neptune Analytics graph.

  • :next_token (String)

    Pagination token used to paginate output.

    When this value is provided as input, the service returns results from where the previous response left off. When this value is present in output, it indicates that there are more results to retrieve.

  • :max_results (Integer)

    The total number of records to return in the command’s output.

    If the total number of records available is more than the value specified, ‘nextToken` is provided in the command’s output. To resume pagination, provide the ‘nextToken` output value in the `nextToken` argument of a subsequent command. Do not use the `nextToken` response element directly outside of the Amazon CLI.

Returns:

See Also:



1688
1689
1690
1691
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1688

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

#list_graphs(params = {}) ⇒ Types::ListGraphsOutput

Lists available Neptune Analytics graphs.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_graphs({
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.graphs #=> Array
resp.graphs[0].id #=> String
resp.graphs[0].name #=> String
resp.graphs[0].arn #=> String
resp.graphs[0].status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "RESETTING", "UPDATING", "SNAPSHOTTING", "FAILED", "IMPORTING", "STARTING", "STOPPING", "STOPPED"
resp.graphs[0].provisioned_memory #=> Integer
resp.graphs[0].public_connectivity #=> Boolean
resp.graphs[0].endpoint #=> String
resp.graphs[0].replica_count #=> Integer
resp.graphs[0].kms_key_identifier #=> String
resp.graphs[0].deletion_protection #=> Boolean
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    Pagination token used to paginate output.

    When this value is provided as input, the service returns results from where the previous response left off. When this value is present in output, it indicates that there are more results to retrieve.

  • :max_results (Integer)

    The total number of records to return in the command’s output.

    If the total number of records available is more than the value specified, ‘nextToken` is provided in the command’s output. To resume pagination, provide the ‘nextToken` output value in the `nextToken` argument of a subsequent command. Do not use the `nextToken` response element directly outside of the Amazon CLI.

Returns:

See Also:



1744
1745
1746
1747
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1744

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

#list_import_tasks(params = {}) ⇒ Types::ListImportTasksOutput

Lists import tasks.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_import_tasks({
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.tasks #=> Array
resp.tasks[0].graph_id #=> String
resp.tasks[0].task_id #=> String
resp.tasks[0].source #=> String
resp.tasks[0].format #=> String, one of "CSV", "OPEN_CYPHER", "PARQUET", "NTRIPLES"
resp.tasks[0].parquet_type #=> String, one of "COLUMNAR"
resp.tasks[0].role_arn #=> String
resp.tasks[0].status #=> String, one of "INITIALIZING", "EXPORTING", "ANALYZING_DATA", "IMPORTING", "REPROVISIONING", "ROLLING_BACK", "SUCCEEDED", "FAILED", "CANCELLING", "CANCELLED", "DELETED"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    Pagination token used to paginate output.

    When this value is provided as input, the service returns results from where the previous response left off. When this value is present in output, it indicates that there are more results to retrieve.

  • :max_results (Integer)

    The total number of records to return in the command’s output.

    If the total number of records available is more than the value specified, ‘nextToken` is provided in the command’s output. To resume pagination, provide the ‘nextToken` output value in the `nextToken` argument of a subsequent command. Do not use the `nextToken` response element directly outside of the Amazon CLI.

Returns:

See Also:



1797
1798
1799
1800
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1797

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

#list_private_graph_endpoints(params = {}) ⇒ Types::ListPrivateGraphEndpointsOutput

Lists private endpoints for a specified Neptune Analytics graph.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_private_graph_endpoints({
  graph_identifier: "GraphIdentifier", # required
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.private_graph_endpoints #=> Array
resp.private_graph_endpoints[0].vpc_id #=> String
resp.private_graph_endpoints[0].subnet_ids #=> Array
resp.private_graph_endpoints[0].subnet_ids[0] #=> String
resp.private_graph_endpoints[0].status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "FAILED"
resp.private_graph_endpoints[0].vpc_endpoint_id #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    The unique identifier of the Neptune Analytics graph.

  • :next_token (String)

    Pagination token used to paginate output.

    When this value is provided as input, the service returns results from where the previous response left off. When this value is present in output, it indicates that there are more results to retrieve.

  • :max_results (Integer)

    The total number of records to return in the command’s output.

    If the total number of records available is more than the value specified, ‘nextToken` is provided in the command’s output. To resume pagination, provide the ‘nextToken` output value in the `nextToken` argument of a subsequent command. Do not use the `nextToken` response element directly outside of the Amazon CLI.

Returns:

See Also:



1852
1853
1854
1855
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1852

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

#list_queries(params = {}) ⇒ Types::ListQueriesOutput

Lists active openCypher queries.

Examples:

Request syntax with placeholder values


resp = client.list_queries({
  graph_identifier: "GraphIdentifier", # required
  max_results: 1, # required
  state: "ALL", # accepts ALL, RUNNING, WAITING, CANCELLING
})

Response structure


resp.queries #=> Array
resp.queries[0].id #=> String
resp.queries[0].query_string #=> String
resp.queries[0].waited #=> Integer
resp.queries[0].elapsed #=> Integer
resp.queries[0].state #=> String, one of "RUNNING", "WAITING", "CANCELLING"

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    The unique identifier of the Neptune Analytics graph.

  • :max_results (required, Integer)

    The maximum number of results to be fetched by the API.

  • :state (String)

    Filtered list of queries based on state.

Returns:

See Also:



1893
1894
1895
1896
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1893

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

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput

Lists tags associated with a specified resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "Arn", # required
})

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the resource.

Returns:

See Also:



1922
1923
1924
1925
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1922

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

#reset_graph(params = {}) ⇒ Types::ResetGraphOutput

Empties the data from a specified Neptune Analytics graph.

Examples:

Request syntax with placeholder values


resp = client.reset_graph({
  graph_identifier: "GraphIdentifier", # required
  skip_snapshot: false, # required
})

Response structure


resp.id #=> String
resp.name #=> String
resp.arn #=> String
resp.status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "RESETTING", "UPDATING", "SNAPSHOTTING", "FAILED", "IMPORTING", "STARTING", "STOPPING", "STOPPED"
resp.status_reason #=> String
resp.create_time #=> Time
resp.provisioned_memory #=> Integer
resp.endpoint #=> String
resp.public_connectivity #=> Boolean
resp.vector_search_configuration.dimension #=> Integer
resp.replica_count #=> Integer
resp.kms_key_identifier #=> String
resp.source_snapshot_id #=> String
resp.deletion_protection #=> Boolean
resp.build_number #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    ID of the graph to reset.

  • :skip_snapshot (required, Boolean)

    Determines whether a final graph snapshot is created before the graph data is deleted. If set to ‘true`, no graph snapshot is created. If set to `false`, a graph snapshot is created before the data is deleted.

Returns:

See Also:



1985
1986
1987
1988
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1985

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

#restore_graph_from_snapshot(params = {}) ⇒ Types::RestoreGraphFromSnapshotOutput

Restores a graph from a snapshot.

Examples:

Request syntax with placeholder values


resp = client.restore_graph_from_snapshot({
  snapshot_identifier: "SnapshotIdentifier", # required
  graph_name: "GraphName", # required
  provisioned_memory: 1,
  deletion_protection: false,
  tags: {
    "TagKey" => "TagValue",
  },
  replica_count: 1,
  public_connectivity: false,
})

Response structure


resp.id #=> String
resp.name #=> String
resp.arn #=> String
resp.status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "RESETTING", "UPDATING", "SNAPSHOTTING", "FAILED", "IMPORTING", "STARTING", "STOPPING", "STOPPED"
resp.status_reason #=> String
resp.create_time #=> Time
resp.provisioned_memory #=> Integer
resp.endpoint #=> String
resp.public_connectivity #=> Boolean
resp.vector_search_configuration.dimension #=> Integer
resp.replica_count #=> Integer
resp.kms_key_identifier #=> String
resp.source_snapshot_id #=> String
resp.deletion_protection #=> Boolean
resp.build_number #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :snapshot_identifier (required, String)

    The ID of the snapshot in question.

  • :graph_name (required, String)

    A name for the new Neptune Analytics graph to be created from the snapshot.

    The name must contain from 1 to 63 letters, numbers, or hyphens, and its first character must be a letter. It cannot end with a hyphen or contain two consecutive hyphens. Only lowercase letters are allowed.

  • :provisioned_memory (Integer)

    The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph.

    Min = 16

  • :deletion_protection (Boolean)

    A value that indicates whether the graph has deletion protection enabled. The graph can’t be deleted when deletion protection is enabled.

  • :tags (Hash<String,String>)

    Adds metadata tags to the snapshot. These tags can also be used with cost allocation reporting, or used in a Condition statement in an IAM policy.

  • :replica_count (Integer)

    The number of replicas in other AZs. Min =0, Max = 2, Default =1

    Additional charges equivalent to the m-NCUs selected for the graph apply for each replica.

  • :public_connectivity (Boolean)

    Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. (‘true` to enable, or `false` to disable).

Returns:

See Also:



2084
2085
2086
2087
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2084

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

#start_export_task(params = {}) ⇒ Types::StartExportTaskOutput

Export data from an existing Neptune Analytics graph to Amazon S3. The graph state should be ‘AVAILABLE`.

Examples:

Request syntax with placeholder values


resp = client.start_export_task({
  graph_identifier: "GraphIdentifier", # required
  role_arn: "RoleArn", # required
  format: "PARQUET", # required, accepts PARQUET, CSV
  destination: "StartExportTaskInputDestinationString", # required
  kms_key_identifier: "KmsKeyArn", # required
  parquet_type: "COLUMNAR", # accepts COLUMNAR
  export_filter: {
    vertex_filter: {
      "ExportFilterLabel" => {
        properties: {
          "ExportFilterOutputPropertyName" => {
            output_type: "ExportFilterOutputDataType",
            source_property_name: "ExportFilterSourcePropertyName",
            multi_value_handling: "TO_LIST", # accepts TO_LIST, PICK_FIRST
          },
        },
      },
    },
    edge_filter: {
      "ExportFilterLabel" => {
        properties: {
          "ExportFilterOutputPropertyName" => {
            output_type: "ExportFilterOutputDataType",
            source_property_name: "ExportFilterSourcePropertyName",
            multi_value_handling: "TO_LIST", # accepts TO_LIST, PICK_FIRST
          },
        },
      },
    },
  },
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.graph_id #=> String
resp.role_arn #=> String
resp.task_id #=> String
resp.status #=> String, one of "INITIALIZING", "EXPORTING", "SUCCEEDED", "FAILED", "CANCELLING", "CANCELLED", "DELETED"
resp.format #=> String, one of "PARQUET", "CSV"
resp.destination #=> String
resp.kms_key_identifier #=> String
resp.parquet_type #=> String, one of "COLUMNAR"
resp.status_reason #=> String
resp.export_filter.vertex_filter #=> Hash
resp.export_filter.vertex_filter["ExportFilterLabel"].properties #=> Hash
resp.export_filter.vertex_filter["ExportFilterLabel"].properties["ExportFilterOutputPropertyName"].output_type #=> String
resp.export_filter.vertex_filter["ExportFilterLabel"].properties["ExportFilterOutputPropertyName"].source_property_name #=> String
resp.export_filter.vertex_filter["ExportFilterLabel"].properties["ExportFilterOutputPropertyName"].multi_value_handling #=> String, one of "TO_LIST", "PICK_FIRST"
resp.export_filter.edge_filter #=> Hash
resp.export_filter.edge_filter["ExportFilterLabel"].properties #=> Hash
resp.export_filter.edge_filter["ExportFilterLabel"].properties["ExportFilterOutputPropertyName"].output_type #=> String
resp.export_filter.edge_filter["ExportFilterLabel"].properties["ExportFilterOutputPropertyName"].source_property_name #=> String
resp.export_filter.edge_filter["ExportFilterLabel"].properties["ExportFilterOutputPropertyName"].multi_value_handling #=> String, one of "TO_LIST", "PICK_FIRST"

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    The source graph identifier of the export task.

  • :role_arn (required, String)

    The ARN of the IAM role that will allow data to be exported to the destination.

  • :format (required, String)

    The format of the export task.

  • :destination (required, String)

    The Amazon S3 URI where data will be exported to.

  • :kms_key_identifier (required, String)

    The KMS key identifier of the export task.

  • :parquet_type (String)

    The parquet type of the export task.

  • :export_filter (Types::ExportFilter)

    The export filter of the export task.

  • :tags (Hash<String,String>)

    Tags to be applied to the export task.

Returns:

See Also:



2194
2195
2196
2197
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2194

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

#start_graph(params = {}) ⇒ Types::StartGraphOutput

Starts the specific graph.

Examples:

Request syntax with placeholder values


resp = client.start_graph({
  graph_identifier: "GraphIdentifier", # required
})

Response structure


resp.id #=> String
resp.name #=> String
resp.arn #=> String
resp.status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "RESETTING", "UPDATING", "SNAPSHOTTING", "FAILED", "IMPORTING", "STARTING", "STOPPING", "STOPPED"
resp.status_reason #=> String
resp.create_time #=> Time
resp.provisioned_memory #=> Integer
resp.endpoint #=> String
resp.public_connectivity #=> Boolean
resp.vector_search_configuration.dimension #=> Integer
resp.replica_count #=> Integer
resp.kms_key_identifier #=> String
resp.source_snapshot_id #=> String
resp.deletion_protection #=> Boolean
resp.build_number #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    The unique identifier of the Neptune Analytics graph.

Returns:

See Also:



2250
2251
2252
2253
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2250

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

#start_import_task(params = {}) ⇒ Types::StartImportTaskOutput

Import data into existing Neptune Analytics graph from Amazon Simple Storage Service (S3). The graph needs to be empty and in the AVAILABLE state.

Examples:

Request syntax with placeholder values


resp = client.start_import_task({
  import_options: {
    neptune: {
      s3_export_path: "NeptuneImportOptionsS3ExportPathString", # required
      s3_export_kms_key_id: "NeptuneImportOptionsS3ExportKmsKeyIdString", # required
      preserve_default_vertex_labels: false,
      preserve_edge_ids: false,
    },
  },
  fail_on_error: false,
  source: "String", # required
  format: "CSV", # accepts CSV, OPEN_CYPHER, PARQUET, NTRIPLES
  parquet_type: "COLUMNAR", # accepts COLUMNAR
  blank_node_handling: "convertToIri", # accepts convertToIri
  graph_identifier: "GraphIdentifier", # required
  role_arn: "RoleArn", # required
})

Response structure


resp.graph_id #=> String
resp.task_id #=> String
resp.source #=> String
resp.format #=> String, one of "CSV", "OPEN_CYPHER", "PARQUET", "NTRIPLES"
resp.parquet_type #=> String, one of "COLUMNAR"
resp.role_arn #=> String
resp.status #=> String, one of "INITIALIZING", "EXPORTING", "ANALYZING_DATA", "IMPORTING", "REPROVISIONING", "ROLLING_BACK", "SUCCEEDED", "FAILED", "CANCELLING", "CANCELLED", "DELETED"
resp.import_options.neptune.s3_export_path #=> String
resp.import_options.neptune.s3_export_kms_key_id #=> String
resp.import_options.neptune.preserve_default_vertex_labels #=> Boolean
resp.import_options.neptune.preserve_edge_ids #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :import_options (Types::ImportOptions)

    Options for how to perform an import.

  • :fail_on_error (Boolean)

    If set to true, the task halts when an import error is encountered. If set to false, the task skips the data that caused the error and continues if possible.

  • :source (required, String)

    A URL identifying the location of the data to be imported. This can be an Amazon S3 path, or can point to a Neptune database endpoint or snapshot.

  • :format (String)

    Specifies the format of Amazon S3 data to be imported. Valid values are CSV, which identifies the Gremlin CSV format or OPENCYPHER, which identifies the openCypher load format.

  • :parquet_type (String)

    The parquet type of the import task.

  • :blank_node_handling (String)

    The method to handle blank nodes in the dataset. Currently, only ‘convertToIri` is supported, meaning blank nodes are converted to unique IRIs at load time. Must be provided when format is `ntriples`. For more information, see [Handling RDF values].

    [1]: docs.aws.amazon.com/neptune-analytics/latest/userguide/using-rdf-data.html#rdf-handling

  • :graph_identifier (required, String)

    The unique identifier of the Neptune Analytics graph.

  • :role_arn (required, String)

    The ARN of the IAM role that will allow access to the data that is to be imported.

Returns:

See Also:



2346
2347
2348
2349
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2346

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

#stop_graph(params = {}) ⇒ Types::StopGraphOutput

Stops the specific graph.

Examples:

Request syntax with placeholder values


resp = client.stop_graph({
  graph_identifier: "GraphIdentifier", # required
})

Response structure


resp.id #=> String
resp.name #=> String
resp.arn #=> String
resp.status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "RESETTING", "UPDATING", "SNAPSHOTTING", "FAILED", "IMPORTING", "STARTING", "STOPPING", "STOPPED"
resp.status_reason #=> String
resp.create_time #=> Time
resp.provisioned_memory #=> Integer
resp.endpoint #=> String
resp.public_connectivity #=> Boolean
resp.vector_search_configuration.dimension #=> Integer
resp.replica_count #=> Integer
resp.kms_key_identifier #=> String
resp.source_snapshot_id #=> String
resp.deletion_protection #=> Boolean
resp.build_number #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    The unique identifier of the Neptune Analytics graph.

Returns:

See Also:



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

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

#tag_resource(params = {}) ⇒ Struct

Adds tags to the specified resource.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "Arn", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    ARN of the resource for which tags need to be added.

  • :tags (required, Hash<String,String>)

    The tags to be assigned to the Neptune Analytics resource.

    The tags are metadata that are specified as a list of key-value pairs:

    Key (string)   –   A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length. It can’t be prefixed with ‘aws:` and can only contain the set of Unicode characters specified by this Java regular expression: `“^([pLpZpN_.:/=+-]*)$”)`.

    Value (string)   –   A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length. It can’t be prefixed with ‘aws:` and can only contain the set of Unicode characters specified by this Java regular expression: `“^([pLpZpN_.:/=+-]*)$”)`.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2444
2445
2446
2447
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2444

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

#untag_resource(params = {}) ⇒ Struct

Removes the specified tags from the specified resource.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "Arn", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    ARN of the resource whose tag needs to be removed.

  • :tag_keys (required, Array<String>)

    Tag keys for the tags to be removed.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2470
2471
2472
2473
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2470

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

#update_graph(params = {}) ⇒ Types::UpdateGraphOutput

Updates the configuration of a specified Neptune Analytics graph

Examples:

Request syntax with placeholder values


resp = client.update_graph({
  graph_identifier: "GraphIdentifier", # required
  public_connectivity: false,
  provisioned_memory: 1,
  deletion_protection: false,
})

Response structure


resp.id #=> String
resp.name #=> String
resp.arn #=> String
resp.status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "RESETTING", "UPDATING", "SNAPSHOTTING", "FAILED", "IMPORTING", "STARTING", "STOPPING", "STOPPED"
resp.status_reason #=> String
resp.create_time #=> Time
resp.provisioned_memory #=> Integer
resp.endpoint #=> String
resp.public_connectivity #=> Boolean
resp.vector_search_configuration.dimension #=> Integer
resp.replica_count #=> Integer
resp.kms_key_identifier #=> String
resp.source_snapshot_id #=> String
resp.deletion_protection #=> Boolean
resp.build_number #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :graph_identifier (required, String)

    The unique identifier of the Neptune Analytics graph.

  • :public_connectivity (Boolean)

    Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated. (‘true` to enable, or `false` to disable.

  • :provisioned_memory (Integer)

    The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph.

    Min = 16

  • :deletion_protection (Boolean)

    A value that indicates whether the graph has deletion protection enabled. The graph can’t be deleted when deletion protection is enabled.

Returns:

See Also:



2545
2546
2547
2548
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2545

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

#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean

Polls an API operation until a resource enters a desired state.

## Basic Usage

A waiter will call an API operation until:

  • It is successful

  • It enters a terminal state

  • It makes the maximum number of attempts

In between attempts, the waiter will sleep.

# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)

## Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.

# poll for ~25 seconds
client.wait_until(waiter_name, params, {
  max_attempts: 5,
  delay: 5,
})

## Callbacks

You can be notified before each polling attempt and before each delay. If you throw ‘:success` or `:failure` from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(waiter_name, params, {

  # disable max attempts
  max_attempts: nil,

  # poll for 1 hour, instead of a number of attempts
  before_wait: -> (attempts, response) do
    throw :failure if Time.now - started_at > 3600
  end
})

## Handling Errors

When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

## Valid Waiters

The following table lists the valid waiter names, the operations they call, and the default ‘:delay` and `:max_attempts` values.

| waiter_name | params | :delay | :max_attempts | | ——————————– | ———————————– | ——– | ————- | | export_task_cancelled | #get_export_task | 60 | 60 | | export_task_successful | #get_export_task | 60 | 480 | | graph_available | #get_graph | 60 | 480 | | graph_deleted | #get_graph | 60 | 60 | | graph_snapshot_available | #get_graph_snapshot | 60 | 120 | | graph_snapshot_deleted | #get_graph_snapshot | 60 | 60 | | graph_stopped | #get_graph | 20 | 90 | | import_task_cancelled | #get_import_task | 60 | 60 | | import_task_successful | #get_import_task | 60 | 480 | | private_graph_endpoint_available | #get_private_graph_endpoint | 10 | 180 | | private_graph_endpoint_deleted | #get_private_graph_endpoint | 10 | 180 |

Parameters:

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

    ({})

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

    ({})

Options Hash (options):

  • :max_attempts (Integer)
  • :delay (Integer)
  • :before_attempt (Proc)
  • :before_wait (Proc)

Yields:

  • (w.waiter)

Returns:

  • (Boolean)

    Returns ‘true` if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.



2670
2671
2672
2673
2674
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2670

def wait_until(waiter_name, params = {}, options = {})
  w = waiter(waiter_name, options)
  yield(w.waiter) if block_given? # deprecated
  w.wait(params)
end

#waiter_namesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Deprecated.


2678
2679
2680
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2678

def waiter_names
  waiters.keys
end