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,
sig/client.rbs
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.
Defined Under Namespace
Modules: _CancelExportTaskResponseSuccess, _CancelImportTaskResponseSuccess, _CreateGraphResponseSuccess, _CreateGraphSnapshotResponseSuccess, _CreateGraphUsingImportTaskResponseSuccess, _CreatePrivateGraphEndpointResponseSuccess, _DeleteGraphResponseSuccess, _DeleteGraphSnapshotResponseSuccess, _DeletePrivateGraphEndpointResponseSuccess, _ExecuteQueryResponseSuccess, _GetExportTaskResponseSuccess, _GetGraphResponseSuccess, _GetGraphSnapshotResponseSuccess, _GetGraphSummaryResponseSuccess, _GetImportTaskResponseSuccess, _GetPrivateGraphEndpointResponseSuccess, _GetQueryResponseSuccess, _ListExportTasksResponseSuccess, _ListGraphSnapshotsResponseSuccess, _ListGraphsResponseSuccess, _ListImportTasksResponseSuccess, _ListPrivateGraphEndpointsResponseSuccess, _ListQueriesResponseSuccess, _ListTagsForResourceResponseSuccess, _ResetGraphResponseSuccess, _RestoreGraphFromSnapshotResponseSuccess, _StartExportTaskResponseSuccess, _StartGraphResponseSuccess, _StartImportTaskResponseSuccess, _StopGraphResponseSuccess, _TagResourceResponseSuccess, _UntagResourceResponseSuccess, _UpdateGraphResponseSuccess
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
- .new ⇒ Object
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 |
.new ⇒ Object
14 |
# File 'sig/client.rbs', line 14
def self.new: (
|
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.52.0' Seahorse::Client::Request.new(handlers, context) end |
#cancel_export_task(params = {}) ⇒ Types::CancelExportTaskOutput
Cancel the specified export task.
94 |
# File 'sig/client.rbs', line 94
def cancel_export_task: (
|
#cancel_import_task(params = {}) ⇒ Types::CancelImportTaskOutput
Deletes the specified import task.
110 |
# File 'sig/client.rbs', line 110
def cancel_import_task: (
|
#cancel_query(params = {}) ⇒ Struct
Cancels a specified query.
116 |
# File 'sig/client.rbs', line 116
def cancel_query: (
|
#create_graph(params = {}) ⇒ Types::CreateGraphOutput
Creates a new Neptune Analytics graph.
141 |
# File 'sig/client.rbs', line 141
def create_graph: (
|
#create_graph_snapshot(params = {}) ⇒ Types::CreateGraphSnapshotOutput
Creates a snapshot of the specific graph.
166 |
# File 'sig/client.rbs', line 166
def create_graph_snapshot: (
|
#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.
185 |
# File 'sig/client.rbs', line 185
def create_graph_using_import_task: (
|
#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.
215 |
# File 'sig/client.rbs', line 215
def create_private_graph_endpoint: (
|
#delete_graph(params = {}) ⇒ Types::DeleteGraphOutput
Deletes the specified graph. Graphs cannot be deleted if delete-protection is enabled.
242 |
# File 'sig/client.rbs', line 242
def delete_graph: (
|
#delete_graph_snapshot(params = {}) ⇒ Types::DeleteGraphSnapshotOutput
Deletes the specified graph snapshot.
259 |
# File 'sig/client.rbs', line 259
def delete_graph_snapshot: (
|
#delete_private_graph_endpoint(params = {}) ⇒ Types::DeletePrivateGraphEndpointOutput
Deletes a private graph endpoint.
272 |
# File 'sig/client.rbs', line 272
def delete_private_graph_endpoint: (
|
#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
283 |
# File 'sig/client.rbs', line 283
def execute_query: (
|
#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
310 |
# File 'sig/client.rbs', line 310
def get_export_task: (
|
#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
334 |
# File 'sig/client.rbs', line 334
def get_graph: (
|
#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
350 |
# File 'sig/client.rbs', line 350
def get_graph_snapshot: (
|
#get_graph_summary(params = {}) ⇒ Types::GetGraphSummaryOutput
Gets a graph summary for a property graph.
362 |
# File 'sig/client.rbs', line 362
def get_graph_summary: (
|
#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
383 |
# File 'sig/client.rbs', line 383
def get_import_task: (
|
#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
396 |
# File 'sig/client.rbs', line 396
def get_private_graph_endpoint: (
|
#get_query(params = {}) ⇒ Types::GetQueryOutput
Retrieves the status of a specified query.
neptune-graph:GetQueryStatus IAM action attached.
411 |
# File 'sig/client.rbs', line 411
def get_query: (
|
#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.
423 |
# File 'sig/client.rbs', line 423
def list_export_tasks: (
|
#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.
436 |
# File 'sig/client.rbs', line 436
def list_graph_snapshots: (
|
#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.
449 |
# File 'sig/client.rbs', line 449
def list_graphs: (
|
#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.
461 |
# File 'sig/client.rbs', line 461
def list_import_tasks: (
|
#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.
473 |
# File 'sig/client.rbs', line 473
def list_private_graph_endpoints: (
|
#list_queries(params = {}) ⇒ Types::ListQueriesOutput
Lists active openCypher queries.
485 |
# File 'sig/client.rbs', line 485
def list_queries: (
|
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Lists tags associated with a specified resource.
497 |
# File 'sig/client.rbs', line 497
def list_tags_for_resource: (
|
#reset_graph(params = {}) ⇒ Types::ResetGraphOutput
Empties the data from a specified Neptune Analytics graph.
521 |
# File 'sig/client.rbs', line 521
def reset_graph: (
|
#restore_graph_from_snapshot(params = {}) ⇒ Types::RestoreGraphFromSnapshotOutput
Restores a graph from a snapshot.
546 |
# File 'sig/client.rbs', line 546
def restore_graph_from_snapshot: (
|
#start_export_task(params = {}) ⇒ Types::StartExportTaskOutput
Export data from an existing Neptune Analytics graph to Amazon S3. The
graph state should be AVAILABLE.
571 |
# File 'sig/client.rbs', line 571
def start_export_task: (
|
#start_graph(params = {}) ⇒ Types::StartGraphOutput
Starts the specific graph.
617 |
# File 'sig/client.rbs', line 617
def start_graph: (
|
#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.
634 |
# File 'sig/client.rbs', line 634
def start_import_task: (
|
#stop_graph(params = {}) ⇒ Types::StopGraphOutput
Stops the specific graph.
665 |
# File 'sig/client.rbs', line 665
def stop_graph: (
|
#tag_resource(params = {}) ⇒ Struct
Adds tags to the specified resource.
674 |
# File 'sig/client.rbs', line 674
def tag_resource: (
|
#untag_resource(params = {}) ⇒ Struct
Removes the specified tags from the specified resource.
684 |
# File 'sig/client.rbs', line 684
def untag_resource: (
|
#update_graph(params = {}) ⇒ Types::UpdateGraphOutput
Updates the configuration of a specified Neptune Analytics graph
709 |
# File 'sig/client.rbs', line 709
def update_graph: (
|
#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 |
718 |
# File 'sig/client.rbs', line 718
def wait_until: (:export_task_cancelled waiter_name,
|
#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 |