aws-sdk-neptunegraph 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-neptunegraph/client.rb +153 -2
- data/lib/aws-sdk-neptunegraph/waiters.rb +476 -0
- data/lib/aws-sdk-neptunegraph.rb +2 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbcfdb09b85ca0a5db65d62c136d45198f3bf59a9c57d579d89ed2bf453e5c21
|
4
|
+
data.tar.gz: b99dae0e7fd31667576fbcf64caedacfe039e8f74fdc39ae53b82666021d4f8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa9e180b8ba80028c160803f6ac00f3153eb8c638af05705f5f8d5906aa66b0c5c33b47dea20f2af95b3f07d82e889a5e355bfa4527046e5e15afdaf1932dbeb
|
7
|
+
data.tar.gz: f2ddc22f1f56d1a225445514afc94ff86c5ab35ba01fb03b07ec4a52d8325fe91c1ca3995cb2da4d0efe033e9c61f3ff5a3430d50d9c4eeff40ba1ef443ff9ff
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.1.0 (2023-12-21)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Adds Waiters for successful creation and deletion of Graph, Graph Snapshot, Import Task and Private Endpoints for Neptune Analytics
|
8
|
+
|
4
9
|
1.0.0 (2023-12-14)
|
5
10
|
------------------
|
6
11
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.1.0
|
@@ -975,6 +975,12 @@ module Aws::NeptuneGraph
|
|
975
975
|
# resp.deletion_protection #=> Boolean
|
976
976
|
# resp.build_number #=> String
|
977
977
|
#
|
978
|
+
#
|
979
|
+
# The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
|
980
|
+
#
|
981
|
+
# * graph_available
|
982
|
+
# * graph_deleted
|
983
|
+
#
|
978
984
|
# @see http://docs.aws.amazon.com/goto/WebAPI/neptune-graph-2023-11-29/GetGraph AWS API Documentation
|
979
985
|
#
|
980
986
|
# @overload get_graph(params = {})
|
@@ -1015,6 +1021,12 @@ module Aws::NeptuneGraph
|
|
1015
1021
|
# resp.status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "FAILED"
|
1016
1022
|
# resp.kms_key_identifier #=> String
|
1017
1023
|
#
|
1024
|
+
#
|
1025
|
+
# The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
|
1026
|
+
#
|
1027
|
+
# * graph_snapshot_available
|
1028
|
+
# * graph_snapshot_deleted
|
1029
|
+
#
|
1018
1030
|
# @see http://docs.aws.amazon.com/goto/WebAPI/neptune-graph-2023-11-29/GetGraphSnapshot AWS API Documentation
|
1019
1031
|
#
|
1020
1032
|
# @overload get_graph_snapshot(params = {})
|
@@ -1071,6 +1083,12 @@ module Aws::NeptuneGraph
|
|
1071
1083
|
# resp.attempt_number #=> Integer
|
1072
1084
|
# resp.status_reason #=> String
|
1073
1085
|
#
|
1086
|
+
#
|
1087
|
+
# The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
|
1088
|
+
#
|
1089
|
+
# * import_task_cancelled
|
1090
|
+
# * import_task_successful
|
1091
|
+
#
|
1074
1092
|
# @see http://docs.aws.amazon.com/goto/WebAPI/neptune-graph-2023-11-29/GetImportTask AWS API Documentation
|
1075
1093
|
#
|
1076
1094
|
# @overload get_import_task(params = {})
|
@@ -1110,6 +1128,12 @@ module Aws::NeptuneGraph
|
|
1110
1128
|
# resp.status #=> String, one of "CREATING", "AVAILABLE", "DELETING", "FAILED"
|
1111
1129
|
# resp.vpc_endpoint_id #=> String
|
1112
1130
|
#
|
1131
|
+
#
|
1132
|
+
# The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
|
1133
|
+
#
|
1134
|
+
# * private_graph_endpoint_available
|
1135
|
+
# * private_graph_endpoint_deleted
|
1136
|
+
#
|
1113
1137
|
# @see http://docs.aws.amazon.com/goto/WebAPI/neptune-graph-2023-11-29/GetPrivateGraphEndpoint AWS API Documentation
|
1114
1138
|
#
|
1115
1139
|
# @overload get_private_graph_endpoint(params = {})
|
@@ -1679,14 +1703,141 @@ module Aws::NeptuneGraph
|
|
1679
1703
|
params: params,
|
1680
1704
|
config: config)
|
1681
1705
|
context[:gem_name] = 'aws-sdk-neptunegraph'
|
1682
|
-
context[:gem_version] = '1.
|
1706
|
+
context[:gem_version] = '1.1.0'
|
1683
1707
|
Seahorse::Client::Request.new(handlers, context)
|
1684
1708
|
end
|
1685
1709
|
|
1710
|
+
# Polls an API operation until a resource enters a desired state.
|
1711
|
+
#
|
1712
|
+
# ## Basic Usage
|
1713
|
+
#
|
1714
|
+
# A waiter will call an API operation until:
|
1715
|
+
#
|
1716
|
+
# * It is successful
|
1717
|
+
# * It enters a terminal state
|
1718
|
+
# * It makes the maximum number of attempts
|
1719
|
+
#
|
1720
|
+
# In between attempts, the waiter will sleep.
|
1721
|
+
#
|
1722
|
+
# # polls in a loop, sleeping between attempts
|
1723
|
+
# client.wait_until(waiter_name, params)
|
1724
|
+
#
|
1725
|
+
# ## Configuration
|
1726
|
+
#
|
1727
|
+
# You can configure the maximum number of polling attempts, and the
|
1728
|
+
# delay (in seconds) between each polling attempt. You can pass
|
1729
|
+
# configuration as the final arguments hash.
|
1730
|
+
#
|
1731
|
+
# # poll for ~25 seconds
|
1732
|
+
# client.wait_until(waiter_name, params, {
|
1733
|
+
# max_attempts: 5,
|
1734
|
+
# delay: 5,
|
1735
|
+
# })
|
1736
|
+
#
|
1737
|
+
# ## Callbacks
|
1738
|
+
#
|
1739
|
+
# You can be notified before each polling attempt and before each
|
1740
|
+
# delay. If you throw `:success` or `:failure` from these callbacks,
|
1741
|
+
# it will terminate the waiter.
|
1742
|
+
#
|
1743
|
+
# started_at = Time.now
|
1744
|
+
# client.wait_until(waiter_name, params, {
|
1745
|
+
#
|
1746
|
+
# # disable max attempts
|
1747
|
+
# max_attempts: nil,
|
1748
|
+
#
|
1749
|
+
# # poll for 1 hour, instead of a number of attempts
|
1750
|
+
# before_wait: -> (attempts, response) do
|
1751
|
+
# throw :failure if Time.now - started_at > 3600
|
1752
|
+
# end
|
1753
|
+
# })
|
1754
|
+
#
|
1755
|
+
# ## Handling Errors
|
1756
|
+
#
|
1757
|
+
# When a waiter is unsuccessful, it will raise an error.
|
1758
|
+
# All of the failure errors extend from
|
1759
|
+
# {Aws::Waiters::Errors::WaiterFailed}.
|
1760
|
+
#
|
1761
|
+
# begin
|
1762
|
+
# client.wait_until(...)
|
1763
|
+
# rescue Aws::Waiters::Errors::WaiterFailed
|
1764
|
+
# # resource did not enter the desired state in time
|
1765
|
+
# end
|
1766
|
+
#
|
1767
|
+
# ## Valid Waiters
|
1768
|
+
#
|
1769
|
+
# The following table lists the valid waiter names, the operations they call,
|
1770
|
+
# and the default `:delay` and `:max_attempts` values.
|
1771
|
+
#
|
1772
|
+
# | waiter_name | params | :delay | :max_attempts |
|
1773
|
+
# | -------------------------------- | ----------------------------------- | -------- | ------------- |
|
1774
|
+
# | graph_available | {Client#get_graph} | 60 | 480 |
|
1775
|
+
# | graph_deleted | {Client#get_graph} | 60 | 60 |
|
1776
|
+
# | graph_snapshot_available | {Client#get_graph_snapshot} | 60 | 120 |
|
1777
|
+
# | graph_snapshot_deleted | {Client#get_graph_snapshot} | 60 | 60 |
|
1778
|
+
# | import_task_cancelled | {Client#get_import_task} | 60 | 60 |
|
1779
|
+
# | import_task_successful | {Client#get_import_task} | 60 | 480 |
|
1780
|
+
# | private_graph_endpoint_available | {Client#get_private_graph_endpoint} | 10 | 180 |
|
1781
|
+
# | private_graph_endpoint_deleted | {Client#get_private_graph_endpoint} | 10 | 180 |
|
1782
|
+
#
|
1783
|
+
# @raise [Errors::FailureStateError] Raised when the waiter terminates
|
1784
|
+
# because the waiter has entered a state that it will not transition
|
1785
|
+
# out of, preventing success.
|
1786
|
+
#
|
1787
|
+
# @raise [Errors::TooManyAttemptsError] Raised when the configured
|
1788
|
+
# maximum number of attempts have been made, and the waiter is not
|
1789
|
+
# yet successful.
|
1790
|
+
#
|
1791
|
+
# @raise [Errors::UnexpectedError] Raised when an error is encounted
|
1792
|
+
# while polling for a resource that is not expected.
|
1793
|
+
#
|
1794
|
+
# @raise [Errors::NoSuchWaiterError] Raised when you request to wait
|
1795
|
+
# for an unknown state.
|
1796
|
+
#
|
1797
|
+
# @return [Boolean] Returns `true` if the waiter was successful.
|
1798
|
+
# @param [Symbol] waiter_name
|
1799
|
+
# @param [Hash] params ({})
|
1800
|
+
# @param [Hash] options ({})
|
1801
|
+
# @option options [Integer] :max_attempts
|
1802
|
+
# @option options [Integer] :delay
|
1803
|
+
# @option options [Proc] :before_attempt
|
1804
|
+
# @option options [Proc] :before_wait
|
1805
|
+
def wait_until(waiter_name, params = {}, options = {})
|
1806
|
+
w = waiter(waiter_name, options)
|
1807
|
+
yield(w.waiter) if block_given? # deprecated
|
1808
|
+
w.wait(params)
|
1809
|
+
end
|
1810
|
+
|
1686
1811
|
# @api private
|
1687
1812
|
# @deprecated
|
1688
1813
|
def waiter_names
|
1689
|
-
|
1814
|
+
waiters.keys
|
1815
|
+
end
|
1816
|
+
|
1817
|
+
private
|
1818
|
+
|
1819
|
+
# @param [Symbol] waiter_name
|
1820
|
+
# @param [Hash] options ({})
|
1821
|
+
def waiter(waiter_name, options = {})
|
1822
|
+
waiter_class = waiters[waiter_name]
|
1823
|
+
if waiter_class
|
1824
|
+
waiter_class.new(options.merge(client: self))
|
1825
|
+
else
|
1826
|
+
raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
|
1827
|
+
end
|
1828
|
+
end
|
1829
|
+
|
1830
|
+
def waiters
|
1831
|
+
{
|
1832
|
+
graph_available: Waiters::GraphAvailable,
|
1833
|
+
graph_deleted: Waiters::GraphDeleted,
|
1834
|
+
graph_snapshot_available: Waiters::GraphSnapshotAvailable,
|
1835
|
+
graph_snapshot_deleted: Waiters::GraphSnapshotDeleted,
|
1836
|
+
import_task_cancelled: Waiters::ImportTaskCancelled,
|
1837
|
+
import_task_successful: Waiters::ImportTaskSuccessful,
|
1838
|
+
private_graph_endpoint_available: Waiters::PrivateGraphEndpointAvailable,
|
1839
|
+
private_graph_endpoint_deleted: Waiters::PrivateGraphEndpointDeleted
|
1840
|
+
}
|
1690
1841
|
end
|
1691
1842
|
|
1692
1843
|
class << self
|
@@ -0,0 +1,476 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
require 'aws-sdk-core/waiters'
|
11
|
+
|
12
|
+
module Aws::NeptuneGraph
|
13
|
+
# Waiters are utility methods that poll for a particular state to occur
|
14
|
+
# on a client. Waiters can fail after a number of attempts at a polling
|
15
|
+
# interval defined for the service client.
|
16
|
+
#
|
17
|
+
# For a list of operations that can be waited for and the
|
18
|
+
# client methods called for each operation, see the table below or the
|
19
|
+
# {Client#wait_until} field documentation for the {Client}.
|
20
|
+
#
|
21
|
+
# # Invoking a Waiter
|
22
|
+
# To invoke a waiter, call #wait_until on a {Client}. The first parameter
|
23
|
+
# is the waiter name, which is specific to the service client and indicates
|
24
|
+
# which operation is being waited for. The second parameter is a hash of
|
25
|
+
# parameters that are passed to the client method called by the waiter,
|
26
|
+
# which varies according to the waiter name.
|
27
|
+
#
|
28
|
+
# # Wait Failures
|
29
|
+
# To catch errors in a waiter, use WaiterFailed,
|
30
|
+
# as shown in the following example.
|
31
|
+
#
|
32
|
+
# rescue rescue Aws::Waiters::Errors::WaiterFailed => error
|
33
|
+
# puts "failed waiting for instance running: #{error.message}
|
34
|
+
# end
|
35
|
+
#
|
36
|
+
# # Configuring a Waiter
|
37
|
+
# Each waiter has a default polling interval and a maximum number of
|
38
|
+
# attempts it will make before returning control to your program.
|
39
|
+
# To set these values, use the `max_attempts` and `delay` parameters
|
40
|
+
# in your `#wait_until` call.
|
41
|
+
# The following example waits for up to 25 seconds, polling every five seconds.
|
42
|
+
#
|
43
|
+
# client.wait_until(...) do |w|
|
44
|
+
# w.max_attempts = 5
|
45
|
+
# w.delay = 5
|
46
|
+
# end
|
47
|
+
#
|
48
|
+
# To disable wait failures, set the value of either of these parameters
|
49
|
+
# to `nil`.
|
50
|
+
#
|
51
|
+
# # Extending a Waiter
|
52
|
+
# To modify the behavior of waiters, you can register callbacks that are
|
53
|
+
# triggered before each polling attempt and before waiting.
|
54
|
+
#
|
55
|
+
# The following example implements an exponential backoff in a waiter
|
56
|
+
# by doubling the amount of time to wait on every attempt.
|
57
|
+
#
|
58
|
+
# client.wait_until(...) do |w|
|
59
|
+
# w.interval = 0 # disable normal sleep
|
60
|
+
# w.before_wait do |n, resp|
|
61
|
+
# sleep(n ** 2)
|
62
|
+
# end
|
63
|
+
# end
|
64
|
+
#
|
65
|
+
# # Available Waiters
|
66
|
+
#
|
67
|
+
# The following table lists the valid waiter names, the operations they call,
|
68
|
+
# and the default `:delay` and `:max_attempts` values.
|
69
|
+
#
|
70
|
+
# | waiter_name | params | :delay | :max_attempts |
|
71
|
+
# | -------------------------------- | ----------------------------------- | -------- | ------------- |
|
72
|
+
# | graph_available | {Client#get_graph} | 60 | 480 |
|
73
|
+
# | graph_deleted | {Client#get_graph} | 60 | 60 |
|
74
|
+
# | graph_snapshot_available | {Client#get_graph_snapshot} | 60 | 120 |
|
75
|
+
# | graph_snapshot_deleted | {Client#get_graph_snapshot} | 60 | 60 |
|
76
|
+
# | import_task_cancelled | {Client#get_import_task} | 60 | 60 |
|
77
|
+
# | import_task_successful | {Client#get_import_task} | 60 | 480 |
|
78
|
+
# | private_graph_endpoint_available | {Client#get_private_graph_endpoint} | 10 | 180 |
|
79
|
+
# | private_graph_endpoint_deleted | {Client#get_private_graph_endpoint} | 10 | 180 |
|
80
|
+
#
|
81
|
+
module Waiters
|
82
|
+
|
83
|
+
# Wait until Graph is Available
|
84
|
+
class GraphAvailable
|
85
|
+
|
86
|
+
# @param [Hash] options
|
87
|
+
# @option options [required, Client] :client
|
88
|
+
# @option options [Integer] :max_attempts (480)
|
89
|
+
# @option options [Integer] :delay (60)
|
90
|
+
# @option options [Proc] :before_attempt
|
91
|
+
# @option options [Proc] :before_wait
|
92
|
+
def initialize(options)
|
93
|
+
@client = options.fetch(:client)
|
94
|
+
@waiter = Aws::Waiters::Waiter.new({
|
95
|
+
max_attempts: 480,
|
96
|
+
delay: 60,
|
97
|
+
poller: Aws::Waiters::Poller.new(
|
98
|
+
operation_name: :get_graph,
|
99
|
+
acceptors: [
|
100
|
+
{
|
101
|
+
"matcher" => "path",
|
102
|
+
"argument" => "status",
|
103
|
+
"state" => "failure",
|
104
|
+
"expected" => "DELETING"
|
105
|
+
},
|
106
|
+
{
|
107
|
+
"matcher" => "path",
|
108
|
+
"argument" => "status",
|
109
|
+
"state" => "failure",
|
110
|
+
"expected" => "FAILED"
|
111
|
+
},
|
112
|
+
{
|
113
|
+
"matcher" => "path",
|
114
|
+
"argument" => "status",
|
115
|
+
"state" => "success",
|
116
|
+
"expected" => "AVAILABLE"
|
117
|
+
}
|
118
|
+
]
|
119
|
+
)
|
120
|
+
}.merge(options))
|
121
|
+
end
|
122
|
+
|
123
|
+
# @option (see Client#get_graph)
|
124
|
+
# @return (see Client#get_graph)
|
125
|
+
def wait(params = {})
|
126
|
+
@waiter.wait(client: @client, params: params)
|
127
|
+
end
|
128
|
+
|
129
|
+
# @api private
|
130
|
+
attr_reader :waiter
|
131
|
+
|
132
|
+
end
|
133
|
+
|
134
|
+
# Wait until Graph is Deleted
|
135
|
+
class GraphDeleted
|
136
|
+
|
137
|
+
# @param [Hash] options
|
138
|
+
# @option options [required, Client] :client
|
139
|
+
# @option options [Integer] :max_attempts (60)
|
140
|
+
# @option options [Integer] :delay (60)
|
141
|
+
# @option options [Proc] :before_attempt
|
142
|
+
# @option options [Proc] :before_wait
|
143
|
+
def initialize(options)
|
144
|
+
@client = options.fetch(:client)
|
145
|
+
@waiter = Aws::Waiters::Waiter.new({
|
146
|
+
max_attempts: 60,
|
147
|
+
delay: 60,
|
148
|
+
poller: Aws::Waiters::Poller.new(
|
149
|
+
operation_name: :get_graph,
|
150
|
+
acceptors: [
|
151
|
+
{
|
152
|
+
"matcher" => "path",
|
153
|
+
"argument" => "status != 'DELETING'",
|
154
|
+
"state" => "failure",
|
155
|
+
"expected" => true
|
156
|
+
},
|
157
|
+
{
|
158
|
+
"matcher" => "error",
|
159
|
+
"state" => "success",
|
160
|
+
"expected" => "ResourceNotFoundException"
|
161
|
+
}
|
162
|
+
]
|
163
|
+
)
|
164
|
+
}.merge(options))
|
165
|
+
end
|
166
|
+
|
167
|
+
# @option (see Client#get_graph)
|
168
|
+
# @return (see Client#get_graph)
|
169
|
+
def wait(params = {})
|
170
|
+
@waiter.wait(client: @client, params: params)
|
171
|
+
end
|
172
|
+
|
173
|
+
# @api private
|
174
|
+
attr_reader :waiter
|
175
|
+
|
176
|
+
end
|
177
|
+
|
178
|
+
# Wait until GraphSnapshot is Available
|
179
|
+
class GraphSnapshotAvailable
|
180
|
+
|
181
|
+
# @param [Hash] options
|
182
|
+
# @option options [required, Client] :client
|
183
|
+
# @option options [Integer] :max_attempts (120)
|
184
|
+
# @option options [Integer] :delay (60)
|
185
|
+
# @option options [Proc] :before_attempt
|
186
|
+
# @option options [Proc] :before_wait
|
187
|
+
def initialize(options)
|
188
|
+
@client = options.fetch(:client)
|
189
|
+
@waiter = Aws::Waiters::Waiter.new({
|
190
|
+
max_attempts: 120,
|
191
|
+
delay: 60,
|
192
|
+
poller: Aws::Waiters::Poller.new(
|
193
|
+
operation_name: :get_graph_snapshot,
|
194
|
+
acceptors: [
|
195
|
+
{
|
196
|
+
"matcher" => "path",
|
197
|
+
"argument" => "status",
|
198
|
+
"state" => "failure",
|
199
|
+
"expected" => "DELETING"
|
200
|
+
},
|
201
|
+
{
|
202
|
+
"matcher" => "path",
|
203
|
+
"argument" => "status",
|
204
|
+
"state" => "failure",
|
205
|
+
"expected" => "FAILED"
|
206
|
+
},
|
207
|
+
{
|
208
|
+
"matcher" => "path",
|
209
|
+
"argument" => "status",
|
210
|
+
"state" => "success",
|
211
|
+
"expected" => "AVAILABLE"
|
212
|
+
}
|
213
|
+
]
|
214
|
+
)
|
215
|
+
}.merge(options))
|
216
|
+
end
|
217
|
+
|
218
|
+
# @option (see Client#get_graph_snapshot)
|
219
|
+
# @return (see Client#get_graph_snapshot)
|
220
|
+
def wait(params = {})
|
221
|
+
@waiter.wait(client: @client, params: params)
|
222
|
+
end
|
223
|
+
|
224
|
+
# @api private
|
225
|
+
attr_reader :waiter
|
226
|
+
|
227
|
+
end
|
228
|
+
|
229
|
+
# Wait until GraphSnapshot is Deleted
|
230
|
+
class GraphSnapshotDeleted
|
231
|
+
|
232
|
+
# @param [Hash] options
|
233
|
+
# @option options [required, Client] :client
|
234
|
+
# @option options [Integer] :max_attempts (60)
|
235
|
+
# @option options [Integer] :delay (60)
|
236
|
+
# @option options [Proc] :before_attempt
|
237
|
+
# @option options [Proc] :before_wait
|
238
|
+
def initialize(options)
|
239
|
+
@client = options.fetch(:client)
|
240
|
+
@waiter = Aws::Waiters::Waiter.new({
|
241
|
+
max_attempts: 60,
|
242
|
+
delay: 60,
|
243
|
+
poller: Aws::Waiters::Poller.new(
|
244
|
+
operation_name: :get_graph_snapshot,
|
245
|
+
acceptors: [
|
246
|
+
{
|
247
|
+
"matcher" => "path",
|
248
|
+
"argument" => "status != 'DELETING'",
|
249
|
+
"state" => "failure",
|
250
|
+
"expected" => true
|
251
|
+
},
|
252
|
+
{
|
253
|
+
"matcher" => "error",
|
254
|
+
"state" => "success",
|
255
|
+
"expected" => "ResourceNotFoundException"
|
256
|
+
}
|
257
|
+
]
|
258
|
+
)
|
259
|
+
}.merge(options))
|
260
|
+
end
|
261
|
+
|
262
|
+
# @option (see Client#get_graph_snapshot)
|
263
|
+
# @return (see Client#get_graph_snapshot)
|
264
|
+
def wait(params = {})
|
265
|
+
@waiter.wait(client: @client, params: params)
|
266
|
+
end
|
267
|
+
|
268
|
+
# @api private
|
269
|
+
attr_reader :waiter
|
270
|
+
|
271
|
+
end
|
272
|
+
|
273
|
+
# Wait until Import Task is Cancelled
|
274
|
+
class ImportTaskCancelled
|
275
|
+
|
276
|
+
# @param [Hash] options
|
277
|
+
# @option options [required, Client] :client
|
278
|
+
# @option options [Integer] :max_attempts (60)
|
279
|
+
# @option options [Integer] :delay (60)
|
280
|
+
# @option options [Proc] :before_attempt
|
281
|
+
# @option options [Proc] :before_wait
|
282
|
+
def initialize(options)
|
283
|
+
@client = options.fetch(:client)
|
284
|
+
@waiter = Aws::Waiters::Waiter.new({
|
285
|
+
max_attempts: 60,
|
286
|
+
delay: 60,
|
287
|
+
poller: Aws::Waiters::Poller.new(
|
288
|
+
operation_name: :get_import_task,
|
289
|
+
acceptors: [
|
290
|
+
{
|
291
|
+
"matcher" => "path",
|
292
|
+
"argument" => "status != 'CANCELLING'",
|
293
|
+
"state" => "failure",
|
294
|
+
"expected" => true
|
295
|
+
},
|
296
|
+
{
|
297
|
+
"matcher" => "path",
|
298
|
+
"argument" => "status",
|
299
|
+
"state" => "success",
|
300
|
+
"expected" => "CANCELLED"
|
301
|
+
}
|
302
|
+
]
|
303
|
+
)
|
304
|
+
}.merge(options))
|
305
|
+
end
|
306
|
+
|
307
|
+
# @option (see Client#get_import_task)
|
308
|
+
# @return (see Client#get_import_task)
|
309
|
+
def wait(params = {})
|
310
|
+
@waiter.wait(client: @client, params: params)
|
311
|
+
end
|
312
|
+
|
313
|
+
# @api private
|
314
|
+
attr_reader :waiter
|
315
|
+
|
316
|
+
end
|
317
|
+
|
318
|
+
# Wait until Import Task is Successful
|
319
|
+
class ImportTaskSuccessful
|
320
|
+
|
321
|
+
# @param [Hash] options
|
322
|
+
# @option options [required, Client] :client
|
323
|
+
# @option options [Integer] :max_attempts (480)
|
324
|
+
# @option options [Integer] :delay (60)
|
325
|
+
# @option options [Proc] :before_attempt
|
326
|
+
# @option options [Proc] :before_wait
|
327
|
+
def initialize(options)
|
328
|
+
@client = options.fetch(:client)
|
329
|
+
@waiter = Aws::Waiters::Waiter.new({
|
330
|
+
max_attempts: 480,
|
331
|
+
delay: 60,
|
332
|
+
poller: Aws::Waiters::Poller.new(
|
333
|
+
operation_name: :get_import_task,
|
334
|
+
acceptors: [
|
335
|
+
{
|
336
|
+
"matcher" => "path",
|
337
|
+
"argument" => "status",
|
338
|
+
"state" => "failure",
|
339
|
+
"expected" => "CANCELLING"
|
340
|
+
},
|
341
|
+
{
|
342
|
+
"matcher" => "path",
|
343
|
+
"argument" => "status",
|
344
|
+
"state" => "failure",
|
345
|
+
"expected" => "CANCELLED"
|
346
|
+
},
|
347
|
+
{
|
348
|
+
"matcher" => "path",
|
349
|
+
"argument" => "status",
|
350
|
+
"state" => "failure",
|
351
|
+
"expected" => "ROLLING_BACK"
|
352
|
+
},
|
353
|
+
{
|
354
|
+
"matcher" => "path",
|
355
|
+
"argument" => "status",
|
356
|
+
"state" => "failure",
|
357
|
+
"expected" => "FAILED"
|
358
|
+
},
|
359
|
+
{
|
360
|
+
"matcher" => "path",
|
361
|
+
"argument" => "status",
|
362
|
+
"state" => "success",
|
363
|
+
"expected" => "SUCCEEDED"
|
364
|
+
}
|
365
|
+
]
|
366
|
+
)
|
367
|
+
}.merge(options))
|
368
|
+
end
|
369
|
+
|
370
|
+
# @option (see Client#get_import_task)
|
371
|
+
# @return (see Client#get_import_task)
|
372
|
+
def wait(params = {})
|
373
|
+
@waiter.wait(client: @client, params: params)
|
374
|
+
end
|
375
|
+
|
376
|
+
# @api private
|
377
|
+
attr_reader :waiter
|
378
|
+
|
379
|
+
end
|
380
|
+
|
381
|
+
# Wait until PrivateGraphEndpoint is Available
|
382
|
+
class PrivateGraphEndpointAvailable
|
383
|
+
|
384
|
+
# @param [Hash] options
|
385
|
+
# @option options [required, Client] :client
|
386
|
+
# @option options [Integer] :max_attempts (180)
|
387
|
+
# @option options [Integer] :delay (10)
|
388
|
+
# @option options [Proc] :before_attempt
|
389
|
+
# @option options [Proc] :before_wait
|
390
|
+
def initialize(options)
|
391
|
+
@client = options.fetch(:client)
|
392
|
+
@waiter = Aws::Waiters::Waiter.new({
|
393
|
+
max_attempts: 180,
|
394
|
+
delay: 10,
|
395
|
+
poller: Aws::Waiters::Poller.new(
|
396
|
+
operation_name: :get_private_graph_endpoint,
|
397
|
+
acceptors: [
|
398
|
+
{
|
399
|
+
"matcher" => "path",
|
400
|
+
"argument" => "status",
|
401
|
+
"state" => "failure",
|
402
|
+
"expected" => "DELETING"
|
403
|
+
},
|
404
|
+
{
|
405
|
+
"matcher" => "path",
|
406
|
+
"argument" => "status",
|
407
|
+
"state" => "failure",
|
408
|
+
"expected" => "FAILED"
|
409
|
+
},
|
410
|
+
{
|
411
|
+
"matcher" => "path",
|
412
|
+
"argument" => "status",
|
413
|
+
"state" => "success",
|
414
|
+
"expected" => "AVAILABLE"
|
415
|
+
}
|
416
|
+
]
|
417
|
+
)
|
418
|
+
}.merge(options))
|
419
|
+
end
|
420
|
+
|
421
|
+
# @option (see Client#get_private_graph_endpoint)
|
422
|
+
# @return (see Client#get_private_graph_endpoint)
|
423
|
+
def wait(params = {})
|
424
|
+
@waiter.wait(client: @client, params: params)
|
425
|
+
end
|
426
|
+
|
427
|
+
# @api private
|
428
|
+
attr_reader :waiter
|
429
|
+
|
430
|
+
end
|
431
|
+
|
432
|
+
# Wait until PrivateGraphEndpoint is Deleted
|
433
|
+
class PrivateGraphEndpointDeleted
|
434
|
+
|
435
|
+
# @param [Hash] options
|
436
|
+
# @option options [required, Client] :client
|
437
|
+
# @option options [Integer] :max_attempts (180)
|
438
|
+
# @option options [Integer] :delay (10)
|
439
|
+
# @option options [Proc] :before_attempt
|
440
|
+
# @option options [Proc] :before_wait
|
441
|
+
def initialize(options)
|
442
|
+
@client = options.fetch(:client)
|
443
|
+
@waiter = Aws::Waiters::Waiter.new({
|
444
|
+
max_attempts: 180,
|
445
|
+
delay: 10,
|
446
|
+
poller: Aws::Waiters::Poller.new(
|
447
|
+
operation_name: :get_private_graph_endpoint,
|
448
|
+
acceptors: [
|
449
|
+
{
|
450
|
+
"matcher" => "path",
|
451
|
+
"argument" => "status != 'DELETING'",
|
452
|
+
"state" => "failure",
|
453
|
+
"expected" => true
|
454
|
+
},
|
455
|
+
{
|
456
|
+
"matcher" => "error",
|
457
|
+
"state" => "success",
|
458
|
+
"expected" => "ResourceNotFoundException"
|
459
|
+
}
|
460
|
+
]
|
461
|
+
)
|
462
|
+
}.merge(options))
|
463
|
+
end
|
464
|
+
|
465
|
+
# @option (see Client#get_private_graph_endpoint)
|
466
|
+
# @return (see Client#get_private_graph_endpoint)
|
467
|
+
def wait(params = {})
|
468
|
+
@waiter.wait(client: @client, params: params)
|
469
|
+
end
|
470
|
+
|
471
|
+
# @api private
|
472
|
+
attr_reader :waiter
|
473
|
+
|
474
|
+
end
|
475
|
+
end
|
476
|
+
end
|
data/lib/aws-sdk-neptunegraph.rb
CHANGED
@@ -16,6 +16,7 @@ require_relative 'aws-sdk-neptunegraph/client_api'
|
|
16
16
|
require_relative 'aws-sdk-neptunegraph/plugins/endpoints.rb'
|
17
17
|
require_relative 'aws-sdk-neptunegraph/client'
|
18
18
|
require_relative 'aws-sdk-neptunegraph/errors'
|
19
|
+
require_relative 'aws-sdk-neptunegraph/waiters'
|
19
20
|
require_relative 'aws-sdk-neptunegraph/resource'
|
20
21
|
require_relative 'aws-sdk-neptunegraph/endpoint_parameters'
|
21
22
|
require_relative 'aws-sdk-neptunegraph/endpoint_provider'
|
@@ -52,6 +53,6 @@ require_relative 'aws-sdk-neptunegraph/customizations'
|
|
52
53
|
# @!group service
|
53
54
|
module Aws::NeptuneGraph
|
54
55
|
|
55
|
-
GEM_VERSION = '1.
|
56
|
+
GEM_VERSION = '1.1.0'
|
56
57
|
|
57
58
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-neptunegraph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -66,6 +66,7 @@ files:
|
|
66
66
|
- lib/aws-sdk-neptunegraph/plugins/endpoints.rb
|
67
67
|
- lib/aws-sdk-neptunegraph/resource.rb
|
68
68
|
- lib/aws-sdk-neptunegraph/types.rb
|
69
|
+
- lib/aws-sdk-neptunegraph/waiters.rb
|
69
70
|
homepage: https://github.com/aws/aws-sdk-ruby
|
70
71
|
licenses:
|
71
72
|
- Apache-2.0
|