Class: Aws::NeptuneGraph::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-neptunegraph/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.

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



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

def initialize(*args)
  super
end

Instance Method Details

#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"
resp.role_arn #=> String
resp.status #=> String, one of "INITIALIZING", "EXPORTING", "ANALYZING_DATA", "IMPORTING", "REPROVISIONING", "ROLLING_BACK", "SUCCEEDED", "FAILED", "CANCELLING", "CANCELLED"

Parameters:

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

    ({})

Options Hash (params):

  • :task_identifier (required, String)

    The unique identifier of the import task.

Returns:

See Also:



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

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:



475
476
477
478
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 475

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

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

Returns:

See Also:



579
580
581
582
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 579

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.

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



635
636
637
638
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 635

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.

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
  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"
resp.role_arn #=> String
resp.status #=> String, one of "INITIALIZING", "EXPORTING", "ANALYZING_DATA", "IMPORTING", "REPROVISIONING", "ROLLING_BACK", "SUCCEEDED", "FAILED", "CANCELLING", "CANCELLED"
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.

  • :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 max of the min-provisioned-memory and max-provisioned memory is used to create the graph. 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: 128

  • :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 or OPENCYPHER, which identies the openCypher load format.

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



791
792
793
794
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 791

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 from to the graph from within a VPC. You can attach security groups to the private graph endpoint.

VPC endpoint charges apply.

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:



844
845
846
847
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 844

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



908
909
910
911
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 908

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

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

Deletes the specifed 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:



948
949
950
951
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 948

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:



987
988
989
990
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 987

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: {"name": "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:



1061
1062
1063
1064
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1061

def execute_query(params = {}, options = {}, &block)
  req = build_request(:execute_query, params)
  req.send_request(options, &block)
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

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



1123
1124
1125
1126
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1123

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:



1169
1170
1171
1172
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1169

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:



1233
1234
1235
1236
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1233

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"
resp.role_arn #=> String
resp.status #=> String, one of "INITIALIZING", "EXPORTING", "ANALYZING_DATA", "IMPORTING", "REPROVISIONING", "ROLLING_BACK", "SUCCEEDED", "FAILED", "CANCELLING", "CANCELLED"
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:



1295
1296
1297
1298
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1295

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:



1340
1341
1342
1343
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1340

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.

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.

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:



1386
1387
1388
1389
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1386

def get_query(params = {}, options = {})
  req = build_request(:get_query, 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:



1443
1444
1445
1446
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1443

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



1499
1500
1501
1502
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1499

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



1551
1552
1553
1554
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1551

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:



1606
1607
1608
1609
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1606

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:



1647
1648
1649
1650
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1647

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:



1676
1677
1678
1679
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1676

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



1739
1740
1741
1742
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1739

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

  • :provisioned_memory (Integer)

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

    Min = 128

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



1838
1839
1840
1841
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1838

def restore_graph_from_snapshot(params = {}, options = {})
  req = build_request(:restore_graph_from_snapshot, 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
  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"
resp.role_arn #=> String
resp.status #=> String, one of "INITIALIZING", "EXPORTING", "ANALYZING_DATA", "IMPORTING", "REPROVISIONING", "ROLLING_BACK", "SUCCEEDED", "FAILED", "CANCELLING", "CANCELLED"
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 identies the openCypher load format.

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



1917
1918
1919
1920
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1917

def start_import_task(params = {}, options = {})
  req = build_request(:start_import_task, 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: "^([\p\{L\}\p\{Z\}\p\{N\}_.:/=+\-]*)$").

    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: "^([\p\{L\}\p\{Z\}\p\{N\}_.:/=+\-]*)$").

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1959
1960
1961
1962
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 1959

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:



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

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"
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 = 128

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



2060
2061
2062
2063
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 2060

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



2177
2178
2179
2180
2181
# File 'gems/aws-sdk-neptunegraph/lib/aws-sdk-neptunegraph/client.rb', line 2177

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