Class: Aws::NeptuneGraph::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::NeptuneGraph::Client
- 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
- .identifier ⇒ Object readonly private
API Operations collapse
-
#cancel_export_task(params = {}) ⇒ Types::CancelExportTaskOutput
Cancel the specified export task.
-
#cancel_import_task(params = {}) ⇒ Types::CancelImportTaskOutput
Deletes the specified import task.
-
#cancel_query(params = {}) ⇒ Struct
Cancels a specified query.
-
#create_graph(params = {}) ⇒ Types::CreateGraphOutput
Creates a new Neptune Analytics graph.
-
#create_graph_snapshot(params = {}) ⇒ Types::CreateGraphSnapshotOutput
Creates a snapshot of the specific graph.
-
#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.
-
#create_private_graph_endpoint(params = {}) ⇒ Types::CreatePrivateGraphEndpointOutput
Create a private graph endpoint to allow private access to the graph from within a VPC.
-
#delete_graph(params = {}) ⇒ Types::DeleteGraphOutput
Deletes the specified graph.
-
#delete_graph_snapshot(params = {}) ⇒ Types::DeleteGraphSnapshotOutput
Deletes the specified graph snapshot.
-
#delete_private_graph_endpoint(params = {}) ⇒ Types::DeletePrivateGraphEndpointOutput
Deletes a private graph endpoint.
-
#execute_query(params = {}) ⇒ Types::ExecuteQueryOutput
Execute an openCypher query.
-
#get_export_task(params = {}) ⇒ Types::GetExportTaskOutput
Retrieves a specified export task.
-
#get_graph(params = {}) ⇒ Types::GetGraphOutput
Gets information about a specified graph.
-
#get_graph_snapshot(params = {}) ⇒ Types::GetGraphSnapshotOutput
Retrieves a specified graph snapshot.
-
#get_graph_summary(params = {}) ⇒ Types::GetGraphSummaryOutput
Gets a graph summary for a property graph.
-
#get_import_task(params = {}) ⇒ Types::GetImportTaskOutput
Retrieves a specified import task.
-
#get_private_graph_endpoint(params = {}) ⇒ Types::GetPrivateGraphEndpointOutput
Retrieves information about a specified private endpoint.
-
#get_query(params = {}) ⇒ Types::GetQueryOutput
Retrieves the status of a specified query.
-
#list_export_tasks(params = {}) ⇒ Types::ListExportTasksOutput
Retrieves a list of export tasks.
-
#list_graph_snapshots(params = {}) ⇒ Types::ListGraphSnapshotsOutput
Lists available snapshots of a specified Neptune Analytics graph.
-
#list_graphs(params = {}) ⇒ Types::ListGraphsOutput
Lists available Neptune Analytics graphs.
-
#list_import_tasks(params = {}) ⇒ Types::ListImportTasksOutput
Lists import tasks.
-
#list_private_graph_endpoints(params = {}) ⇒ Types::ListPrivateGraphEndpointsOutput
Lists private endpoints for a specified Neptune Analytics graph.
-
#list_queries(params = {}) ⇒ Types::ListQueriesOutput
Lists active openCypher queries.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Lists tags associated with a specified resource.
-
#reset_graph(params = {}) ⇒ Types::ResetGraphOutput
Empties the data from a specified Neptune Analytics graph.
-
#restore_graph_from_snapshot(params = {}) ⇒ Types::RestoreGraphFromSnapshotOutput
Restores a graph from a snapshot.
-
#start_export_task(params = {}) ⇒ Types::StartExportTaskOutput
Export data from an existing Neptune Analytics graph to Amazon S3.
-
#start_graph(params = {}) ⇒ Types::StartGraphOutput
Starts the specific graph.
-
#start_import_task(params = {}) ⇒ Types::StartImportTaskOutput
Import data into existing Neptune Analytics graph from Amazon Simple Storage Service (S3).
-
#stop_graph(params = {}) ⇒ Types::StopGraphOutput
Stops the specific graph.
-
#tag_resource(params = {}) ⇒ Struct
Adds tags to the specified resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes the specified tags from the specified resource.
-
#update_graph(params = {}) ⇒ Types::UpdateGraphOutput
Updates the configuration of a specified Neptune Analytics graph.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
471 472 473 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 471 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (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_module ⇒ 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.
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.
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.
516 517 518 519 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 516 def cancel_export_task(params = {}, = {}) req = build_request(:cancel_export_task, params) req.send_request() end |
#cancel_import_task(params = {}) ⇒ Types::CancelImportTaskOutput
Deletes the specified import task.
556 557 558 559 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 556 def cancel_import_task(params = {}, = {}) req = build_request(:cancel_import_task, params) req.send_request() end |
#cancel_query(params = {}) ⇒ Struct
Cancels a specified query.
582 583 584 585 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 582 def cancel_query(params = {}, = {}) req = build_request(:cancel_query, params) req.send_request() end |
#create_graph(params = {}) ⇒ Types::CreateGraphOutput
Creates a new Neptune Analytics graph.
686 687 688 689 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 686 def create_graph(params = {}, = {}) req = build_request(:create_graph, params) req.send_request() end |
#create_graph_snapshot(params = {}) ⇒ Types::CreateGraphSnapshotOutput
Creates a snapshot of the specific graph.
742 743 744 745 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 742 def create_graph_snapshot(params = {}, = {}) req = build_request(:create_graph_snapshot, params) req.send_request() 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
917 918 919 920 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 917 def create_graph_using_import_task(params = {}, = {}) req = build_request(:create_graph_using_import_task, params) req.send_request() 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>
970 971 972 973 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 970 def create_private_graph_endpoint(params = {}, = {}) req = build_request(:create_private_graph_endpoint, params) req.send_request() end |
#delete_graph(params = {}) ⇒ Types::DeleteGraphOutput
Deletes the specified graph. Graphs cannot be deleted if delete-protection is enabled.
1034 1035 1036 1037 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1034 def delete_graph(params = {}, = {}) req = build_request(:delete_graph, params) req.send_request() end |
#delete_graph_snapshot(params = {}) ⇒ Types::DeleteGraphSnapshotOutput
Deletes the specified graph snapshot.
1074 1075 1076 1077 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1074 def delete_graph_snapshot(params = {}, = {}) req = build_request(:delete_graph_snapshot, params) req.send_request() end |
#delete_private_graph_endpoint(params = {}) ⇒ Types::DeletePrivateGraphEndpointOutput
Deletes a private graph endpoint.
1113 1114 1115 1116 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1113 def delete_private_graph_endpoint(params = {}, = {}) req = build_request(:delete_private_graph_endpoint, params) req.send_request() 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
1187 1188 1189 1190 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1187 def execute_query(params = {}, = {}, &block) req = build_request(:execute_query, params) req.send_request(, &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
1254 1255 1256 1257 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1254 def get_export_task(params = {}, = {}) req = build_request(:get_export_task, params) req.send_request() 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
1317 1318 1319 1320 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1317 def get_graph(params = {}, = {}) req = build_request(:get_graph, params) req.send_request() 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
1363 1364 1365 1366 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1363 def get_graph_snapshot(params = {}, = {}) req = build_request(:get_graph_snapshot, params) req.send_request() end |
#get_graph_summary(params = {}) ⇒ Types::GetGraphSummaryOutput
Gets a graph summary for a property graph.
1427 1428 1429 1430 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1427 def get_graph_summary(params = {}, = {}) req = build_request(:get_graph_summary, params) req.send_request() 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
1491 1492 1493 1494 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1491 def get_import_task(params = {}, = {}) req = build_request(:get_import_task, params) req.send_request() 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
1536 1537 1538 1539 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1536 def get_private_graph_endpoint(params = {}, = {}) req = build_request(:get_private_graph_endpoint, params) req.send_request() 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>
1582 1583 1584 1585 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1582 def get_query(params = {}, = {}) req = build_request(:get_query, params) req.send_request() 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.
1631 1632 1633 1634 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1631 def list_export_tasks(params = {}, = {}) req = build_request(:list_export_tasks, params) req.send_request() 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.
1688 1689 1690 1691 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1688 def list_graph_snapshots(params = {}, = {}) req = build_request(:list_graph_snapshots, params) req.send_request() 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.
1744 1745 1746 1747 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1744 def list_graphs(params = {}, = {}) req = build_request(:list_graphs, params) req.send_request() 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.
1797 1798 1799 1800 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1797 def list_import_tasks(params = {}, = {}) req = build_request(:list_import_tasks, params) req.send_request() 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.
1852 1853 1854 1855 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1852 def list_private_graph_endpoints(params = {}, = {}) req = build_request(:list_private_graph_endpoints, params) req.send_request() end |
#list_queries(params = {}) ⇒ Types::ListQueriesOutput
Lists active openCypher queries.
1893 1894 1895 1896 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1893 def list_queries(params = {}, = {}) req = build_request(:list_queries, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Lists tags associated with a specified resource.
1922 1923 1924 1925 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1922 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#reset_graph(params = {}) ⇒ Types::ResetGraphOutput
Empties the data from a specified Neptune Analytics graph.
1985 1986 1987 1988 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 1985 def reset_graph(params = {}, = {}) req = build_request(:reset_graph, params) req.send_request() end |
#restore_graph_from_snapshot(params = {}) ⇒ Types::RestoreGraphFromSnapshotOutput
Restores a graph from a snapshot.
2084 2085 2086 2087 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2084 def restore_graph_from_snapshot(params = {}, = {}) req = build_request(:restore_graph_from_snapshot, params) req.send_request() end |
#start_export_task(params = {}) ⇒ Types::StartExportTaskOutput
Export data from an existing Neptune Analytics graph to Amazon S3. The graph state should be ‘AVAILABLE`.
2194 2195 2196 2197 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2194 def start_export_task(params = {}, = {}) req = build_request(:start_export_task, params) req.send_request() end |
#start_graph(params = {}) ⇒ Types::StartGraphOutput
Starts the specific graph.
2250 2251 2252 2253 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2250 def start_graph(params = {}, = {}) req = build_request(:start_graph, params) req.send_request() 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.
2346 2347 2348 2349 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2346 def start_import_task(params = {}, = {}) req = build_request(:start_import_task, params) req.send_request() end |
#stop_graph(params = {}) ⇒ Types::StopGraphOutput
Stops the specific graph.
2402 2403 2404 2405 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2402 def stop_graph(params = {}, = {}) req = build_request(:stop_graph, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Adds tags to the specified resource.
2444 2445 2446 2447 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2444 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes the specified tags from the specified resource.
2470 2471 2472 2473 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2470 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_graph(params = {}) ⇒ Types::UpdateGraphOutput
Updates the configuration of a specified Neptune Analytics graph
2545 2546 2547 2548 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2545 def update_graph(params = {}, = {}) req = build_request(:update_graph, params) req.send_request() 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 |
2670 2671 2672 2673 2674 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2670 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |
#waiter_names ⇒ 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.
2678 2679 2680 |
# File 'lib/aws-sdk-neptunegraph/client.rb', line 2678 def waiter_names waiters.keys end |