aws-sdk-ebs 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/aws-sdk-ebs.rb +47 -0
- data/lib/aws-sdk-ebs/client.rb +454 -0
- data/lib/aws-sdk-ebs/client_api.rb +163 -0
- data/lib/aws-sdk-ebs/customizations.rb +0 -0
- data/lib/aws-sdk-ebs/errors.rb +51 -0
- data/lib/aws-sdk-ebs/resource.rb +23 -0
- data/lib/aws-sdk-ebs/types.rb +298 -0
- metadata +88 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6f86b5825f4b9775792cce2fb144e584d3714ffd
|
4
|
+
data.tar.gz: 397387f9bd9a71f79dd3e99f5b6dde1188db55d8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 44ae1a753f8c00b62da9d66c23bf93a21e5e92ad954134b7643e8fd0d84f1c187c27c353806e091cd1d41bd089f38c26c7fd0fa1b80a23c03b04e259feb0cfb6
|
7
|
+
data.tar.gz: c4fe175e11404e63a75b99f5313223adb5b156c6687de490f8eec2590693444f46dea097ca624b19b32d2784796ed3b81cf8b6a238ad85ae328723e0b641fc08
|
data/lib/aws-sdk-ebs.rb
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'aws-sdk-core'
|
9
|
+
require 'aws-sigv4'
|
10
|
+
|
11
|
+
require_relative 'aws-sdk-ebs/types'
|
12
|
+
require_relative 'aws-sdk-ebs/client_api'
|
13
|
+
require_relative 'aws-sdk-ebs/client'
|
14
|
+
require_relative 'aws-sdk-ebs/errors'
|
15
|
+
require_relative 'aws-sdk-ebs/resource'
|
16
|
+
require_relative 'aws-sdk-ebs/customizations'
|
17
|
+
|
18
|
+
# This module provides support for Amazon Elastic Block Store. This module is available in the
|
19
|
+
# `aws-sdk-ebs` gem.
|
20
|
+
#
|
21
|
+
# # Client
|
22
|
+
#
|
23
|
+
# The {Client} class provides one method for each API operation. Operation
|
24
|
+
# methods each accept a hash of request parameters and return a response
|
25
|
+
# structure.
|
26
|
+
#
|
27
|
+
# See {Client} for more information.
|
28
|
+
#
|
29
|
+
# # Errors
|
30
|
+
#
|
31
|
+
# Errors returned from Amazon Elastic Block Store all
|
32
|
+
# extend {Errors::ServiceError}.
|
33
|
+
#
|
34
|
+
# begin
|
35
|
+
# # do stuff
|
36
|
+
# rescue Aws::EBS::Errors::ServiceError
|
37
|
+
# # rescues all service API errors
|
38
|
+
# end
|
39
|
+
#
|
40
|
+
# See {Errors} for more information.
|
41
|
+
#
|
42
|
+
# @service
|
43
|
+
module Aws::EBS
|
44
|
+
|
45
|
+
GEM_VERSION = '1.0.0'
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,454 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'seahorse/client/plugins/content_length.rb'
|
9
|
+
require 'aws-sdk-core/plugins/credentials_configuration.rb'
|
10
|
+
require 'aws-sdk-core/plugins/logging.rb'
|
11
|
+
require 'aws-sdk-core/plugins/param_converter.rb'
|
12
|
+
require 'aws-sdk-core/plugins/param_validator.rb'
|
13
|
+
require 'aws-sdk-core/plugins/user_agent.rb'
|
14
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
|
15
|
+
require 'aws-sdk-core/plugins/retry_errors.rb'
|
16
|
+
require 'aws-sdk-core/plugins/global_configuration.rb'
|
17
|
+
require 'aws-sdk-core/plugins/regional_endpoint.rb'
|
18
|
+
require 'aws-sdk-core/plugins/endpoint_discovery.rb'
|
19
|
+
require 'aws-sdk-core/plugins/endpoint_pattern.rb'
|
20
|
+
require 'aws-sdk-core/plugins/response_paging.rb'
|
21
|
+
require 'aws-sdk-core/plugins/stub_responses.rb'
|
22
|
+
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
23
|
+
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
24
|
+
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
25
|
+
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
26
|
+
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
27
|
+
require 'aws-sdk-core/plugins/signature_v4.rb'
|
28
|
+
require 'aws-sdk-core/plugins/protocols/rest_json.rb'
|
29
|
+
|
30
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:ebs)
|
31
|
+
|
32
|
+
module Aws::EBS
|
33
|
+
class Client < Seahorse::Client::Base
|
34
|
+
|
35
|
+
include Aws::ClientStubs
|
36
|
+
|
37
|
+
@identifier = :ebs
|
38
|
+
|
39
|
+
set_api(ClientApi::API)
|
40
|
+
|
41
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
42
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
43
|
+
add_plugin(Aws::Plugins::Logging)
|
44
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
45
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
46
|
+
add_plugin(Aws::Plugins::UserAgent)
|
47
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
48
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
49
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
50
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
51
|
+
add_plugin(Aws::Plugins::EndpointDiscovery)
|
52
|
+
add_plugin(Aws::Plugins::EndpointPattern)
|
53
|
+
add_plugin(Aws::Plugins::ResponsePaging)
|
54
|
+
add_plugin(Aws::Plugins::StubResponses)
|
55
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
56
|
+
add_plugin(Aws::Plugins::JsonvalueConverter)
|
57
|
+
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
58
|
+
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
59
|
+
add_plugin(Aws::Plugins::TransferEncoding)
|
60
|
+
add_plugin(Aws::Plugins::SignatureV4)
|
61
|
+
add_plugin(Aws::Plugins::Protocols::RestJson)
|
62
|
+
|
63
|
+
# @overload initialize(options)
|
64
|
+
# @param [Hash] options
|
65
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
66
|
+
# Your AWS credentials. This can be an instance of any one of the
|
67
|
+
# following classes:
|
68
|
+
#
|
69
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
70
|
+
# credentials.
|
71
|
+
#
|
72
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
73
|
+
# from an EC2 IMDS on an EC2 instance.
|
74
|
+
#
|
75
|
+
# * `Aws::SharedCredentials` - Used for loading credentials from a
|
76
|
+
# shared file, such as `~/.aws/config`.
|
77
|
+
#
|
78
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
79
|
+
#
|
80
|
+
# When `:credentials` are not configured directly, the following
|
81
|
+
# locations will be searched for credentials:
|
82
|
+
#
|
83
|
+
# * `Aws.config[:credentials]`
|
84
|
+
# * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
|
85
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
86
|
+
# * `~/.aws/credentials`
|
87
|
+
# * `~/.aws/config`
|
88
|
+
# * EC2 IMDS instance profile - When used by default, the timeouts are
|
89
|
+
# very aggressive. Construct and pass an instance of
|
90
|
+
# `Aws::InstanceProfileCredentails` to enable retries and extended
|
91
|
+
# timeouts.
|
92
|
+
#
|
93
|
+
# @option options [required, String] :region
|
94
|
+
# The AWS region to connect to. The configured `:region` is
|
95
|
+
# used to determine the service `:endpoint`. When not passed,
|
96
|
+
# a default `:region` is search for in the following locations:
|
97
|
+
#
|
98
|
+
# * `Aws.config[:region]`
|
99
|
+
# * `ENV['AWS_REGION']`
|
100
|
+
# * `ENV['AMAZON_REGION']`
|
101
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
102
|
+
# * `~/.aws/credentials`
|
103
|
+
# * `~/.aws/config`
|
104
|
+
#
|
105
|
+
# @option options [String] :access_key_id
|
106
|
+
#
|
107
|
+
# @option options [Boolean] :active_endpoint_cache (false)
|
108
|
+
# When set to `true`, a thread polling for endpoints will be running in
|
109
|
+
# the background every 60 secs (default). Defaults to `false`.
|
110
|
+
#
|
111
|
+
# @option options [Boolean] :client_side_monitoring (false)
|
112
|
+
# When `true`, client-side metrics will be collected for all API requests from
|
113
|
+
# this client.
|
114
|
+
#
|
115
|
+
# @option options [String] :client_side_monitoring_client_id ("")
|
116
|
+
# Allows you to provide an identifier for this client which will be attached to
|
117
|
+
# all generated client side metrics. Defaults to an empty string.
|
118
|
+
#
|
119
|
+
# @option options [String] :client_side_monitoring_host ("127.0.0.1")
|
120
|
+
# Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
|
121
|
+
# side monitoring agent is running on, where client metrics will be published via UDP.
|
122
|
+
#
|
123
|
+
# @option options [Integer] :client_side_monitoring_port (31000)
|
124
|
+
# Required for publishing client metrics. The port that the client side monitoring
|
125
|
+
# agent is running on, where client metrics will be published via UDP.
|
126
|
+
#
|
127
|
+
# @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
|
128
|
+
# Allows you to provide a custom client-side monitoring publisher class. By default,
|
129
|
+
# will use the Client Side Monitoring Agent Publisher.
|
130
|
+
#
|
131
|
+
# @option options [Boolean] :convert_params (true)
|
132
|
+
# When `true`, an attempt is made to coerce request parameters into
|
133
|
+
# the required types.
|
134
|
+
#
|
135
|
+
# @option options [Boolean] :disable_host_prefix_injection (false)
|
136
|
+
# Set to true to disable SDK automatically adding host prefix
|
137
|
+
# to default service endpoint when available.
|
138
|
+
#
|
139
|
+
# @option options [String] :endpoint
|
140
|
+
# The client endpoint is normally constructed from the `:region`
|
141
|
+
# option. You should only configure an `:endpoint` when connecting
|
142
|
+
# to test endpoints. This should be avalid HTTP(S) URI.
|
143
|
+
#
|
144
|
+
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
145
|
+
# Used for the maximum size limit of the LRU cache storing endpoints data
|
146
|
+
# for endpoint discovery enabled operations. Defaults to 1000.
|
147
|
+
#
|
148
|
+
# @option options [Integer] :endpoint_cache_max_threads (10)
|
149
|
+
# Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
|
150
|
+
#
|
151
|
+
# @option options [Integer] :endpoint_cache_poll_interval (60)
|
152
|
+
# When :endpoint_discovery and :active_endpoint_cache is enabled,
|
153
|
+
# Use this option to config the time interval in seconds for making
|
154
|
+
# requests fetching endpoints information. Defaults to 60 sec.
|
155
|
+
#
|
156
|
+
# @option options [Boolean] :endpoint_discovery (false)
|
157
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
|
158
|
+
#
|
159
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
160
|
+
# The log formatter.
|
161
|
+
#
|
162
|
+
# @option options [Symbol] :log_level (:info)
|
163
|
+
# The log level to send messages to the `:logger` at.
|
164
|
+
#
|
165
|
+
# @option options [Logger] :logger
|
166
|
+
# The Logger instance to send log messages to. If this option
|
167
|
+
# is not set, logging will be disabled.
|
168
|
+
#
|
169
|
+
# @option options [String] :profile ("default")
|
170
|
+
# Used when loading credentials from the shared credentials file
|
171
|
+
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
172
|
+
#
|
173
|
+
# @option options [Float] :retry_base_delay (0.3)
|
174
|
+
# The base delay in seconds used by the default backoff function.
|
175
|
+
#
|
176
|
+
# @option options [Symbol] :retry_jitter (:none)
|
177
|
+
# 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.
|
178
|
+
#
|
179
|
+
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
180
|
+
#
|
181
|
+
# @option options [Integer] :retry_limit (3)
|
182
|
+
# The maximum number of times to retry failed requests. Only
|
183
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
184
|
+
# are retried. Generally, these are throttling errors, data
|
185
|
+
# checksum errors, networking errors, timeout errors and auth
|
186
|
+
# errors from expired credentials.
|
187
|
+
#
|
188
|
+
# @option options [Integer] :retry_max_delay (0)
|
189
|
+
# The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
|
190
|
+
#
|
191
|
+
# @option options [String] :secret_access_key
|
192
|
+
#
|
193
|
+
# @option options [String] :session_token
|
194
|
+
#
|
195
|
+
# @option options [Boolean] :stub_responses (false)
|
196
|
+
# Causes the client to return stubbed responses. By default
|
197
|
+
# fake responses are generated and returned. You can specify
|
198
|
+
# the response data to return or errors to raise by calling
|
199
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
200
|
+
#
|
201
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
202
|
+
# requests are made, and retries are disabled.
|
203
|
+
#
|
204
|
+
# @option options [Boolean] :validate_params (true)
|
205
|
+
# When `true`, request parameters are validated before
|
206
|
+
# sending the request.
|
207
|
+
#
|
208
|
+
# @option options [URI::HTTP,String] :http_proxy A proxy to send
|
209
|
+
# requests through. Formatted like 'http://proxy.com:123'.
|
210
|
+
#
|
211
|
+
# @option options [Float] :http_open_timeout (15) The number of
|
212
|
+
# seconds to wait when opening a HTTP session before rasing a
|
213
|
+
# `Timeout::Error`.
|
214
|
+
#
|
215
|
+
# @option options [Integer] :http_read_timeout (60) The default
|
216
|
+
# number of seconds to wait for response data. This value can
|
217
|
+
# safely be set
|
218
|
+
# per-request on the session yeidled by {#session_for}.
|
219
|
+
#
|
220
|
+
# @option options [Float] :http_idle_timeout (5) The number of
|
221
|
+
# seconds a connection is allowed to sit idble before it is
|
222
|
+
# considered stale. Stale connections are closed and removed
|
223
|
+
# from the pool before making a request.
|
224
|
+
#
|
225
|
+
# @option options [Float] :http_continue_timeout (1) The number of
|
226
|
+
# seconds to wait for a 100-continue response before sending the
|
227
|
+
# request body. This option has no effect unless the request has
|
228
|
+
# "Expect" header set to "100-continue". Defaults to `nil` which
|
229
|
+
# disables this behaviour. This value can safely be set per
|
230
|
+
# request on the session yeidled by {#session_for}.
|
231
|
+
#
|
232
|
+
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
233
|
+
# HTTP debug output will be sent to the `:logger`.
|
234
|
+
#
|
235
|
+
# @option options [Boolean] :ssl_verify_peer (true) When `true`,
|
236
|
+
# SSL peer certificates are verified when establishing a
|
237
|
+
# connection.
|
238
|
+
#
|
239
|
+
# @option options [String] :ssl_ca_bundle Full path to the SSL
|
240
|
+
# certificate authority bundle file that should be used when
|
241
|
+
# verifying peer certificates. If you do not pass
|
242
|
+
# `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
|
243
|
+
# will be used if available.
|
244
|
+
#
|
245
|
+
# @option options [String] :ssl_ca_directory Full path of the
|
246
|
+
# directory that contains the unbundled SSL certificate
|
247
|
+
# authority files for verifying peer certificates. If you do
|
248
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
|
249
|
+
# system default will be used if available.
|
250
|
+
#
|
251
|
+
def initialize(*args)
|
252
|
+
super
|
253
|
+
end
|
254
|
+
|
255
|
+
# @!group API Operations
|
256
|
+
|
257
|
+
# Returns the data in a block in an Amazon Elastic Block Store snapshot.
|
258
|
+
#
|
259
|
+
# @option params [required, String] :snapshot_id
|
260
|
+
# The ID of the snapshot containing the block from which to get data.
|
261
|
+
#
|
262
|
+
# @option params [required, Integer] :block_index
|
263
|
+
# The block index of the block from which to get data.
|
264
|
+
#
|
265
|
+
# Obtain the `block index` by running the `list changed blocks` or `list
|
266
|
+
# snapshot blocks` operations.
|
267
|
+
#
|
268
|
+
# @option params [required, String] :block_token
|
269
|
+
# The block token of the block from which to get data.
|
270
|
+
#
|
271
|
+
# Obtain the `block token` by running the `list changed blocks` or `list
|
272
|
+
# snapshot blocks` operations.
|
273
|
+
#
|
274
|
+
# @return [Types::GetSnapshotBlockResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
275
|
+
#
|
276
|
+
# * {Types::GetSnapshotBlockResponse#data_length #data_length} => Integer
|
277
|
+
# * {Types::GetSnapshotBlockResponse#block_data #block_data} => IO
|
278
|
+
# * {Types::GetSnapshotBlockResponse#checksum #checksum} => String
|
279
|
+
# * {Types::GetSnapshotBlockResponse#checksum_algorithm #checksum_algorithm} => String
|
280
|
+
#
|
281
|
+
# @example Request syntax with placeholder values
|
282
|
+
#
|
283
|
+
# resp = client.get_snapshot_block({
|
284
|
+
# snapshot_id: "SnapshotId", # required
|
285
|
+
# block_index: 1, # required
|
286
|
+
# block_token: "BlockToken", # required
|
287
|
+
# })
|
288
|
+
#
|
289
|
+
# @example Response structure
|
290
|
+
#
|
291
|
+
# resp.data_length #=> Integer
|
292
|
+
# resp.block_data #=> IO
|
293
|
+
# resp.checksum #=> String
|
294
|
+
# resp.checksum_algorithm #=> String, one of "SHA256"
|
295
|
+
#
|
296
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/GetSnapshotBlock AWS API Documentation
|
297
|
+
#
|
298
|
+
# @overload get_snapshot_block(params = {})
|
299
|
+
# @param [Hash] params ({})
|
300
|
+
def get_snapshot_block(params = {}, options = {}, &block)
|
301
|
+
req = build_request(:get_snapshot_block, params)
|
302
|
+
req.send_request(options, &block)
|
303
|
+
end
|
304
|
+
|
305
|
+
# Returns the block indexes and block tokens for blocks that are
|
306
|
+
# different between two Amazon Elastic Block Store snapshots of the same
|
307
|
+
# volume/snapshot lineage.
|
308
|
+
#
|
309
|
+
# @option params [String] :first_snapshot_id
|
310
|
+
# The ID of the first snapshot to use for the comparison.
|
311
|
+
#
|
312
|
+
# @option params [required, String] :second_snapshot_id
|
313
|
+
# The ID of the second snapshot to use for the comparison.
|
314
|
+
#
|
315
|
+
# @option params [String] :next_token
|
316
|
+
# The token to request the next page of results.
|
317
|
+
#
|
318
|
+
# @option params [Integer] :max_results
|
319
|
+
# The number of results to return.
|
320
|
+
#
|
321
|
+
# @option params [Integer] :starting_block_index
|
322
|
+
# The block index from which the comparison should start.
|
323
|
+
#
|
324
|
+
# The list in the response will start from this block index or the next
|
325
|
+
# valid block index in the snapshots.
|
326
|
+
#
|
327
|
+
# @return [Types::ListChangedBlocksResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
328
|
+
#
|
329
|
+
# * {Types::ListChangedBlocksResponse#changed_blocks #changed_blocks} => Array<Types::ChangedBlock>
|
330
|
+
# * {Types::ListChangedBlocksResponse#expiry_time #expiry_time} => Time
|
331
|
+
# * {Types::ListChangedBlocksResponse#volume_size #volume_size} => Integer
|
332
|
+
# * {Types::ListChangedBlocksResponse#block_size #block_size} => Integer
|
333
|
+
# * {Types::ListChangedBlocksResponse#next_token #next_token} => String
|
334
|
+
#
|
335
|
+
# @example Request syntax with placeholder values
|
336
|
+
#
|
337
|
+
# resp = client.list_changed_blocks({
|
338
|
+
# first_snapshot_id: "SnapshotId",
|
339
|
+
# second_snapshot_id: "SnapshotId", # required
|
340
|
+
# next_token: "PageToken",
|
341
|
+
# max_results: 1,
|
342
|
+
# starting_block_index: 1,
|
343
|
+
# })
|
344
|
+
#
|
345
|
+
# @example Response structure
|
346
|
+
#
|
347
|
+
# resp.changed_blocks #=> Array
|
348
|
+
# resp.changed_blocks[0].block_index #=> Integer
|
349
|
+
# resp.changed_blocks[0].first_block_token #=> String
|
350
|
+
# resp.changed_blocks[0].second_block_token #=> String
|
351
|
+
# resp.expiry_time #=> Time
|
352
|
+
# resp.volume_size #=> Integer
|
353
|
+
# resp.block_size #=> Integer
|
354
|
+
# resp.next_token #=> String
|
355
|
+
#
|
356
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/ListChangedBlocks AWS API Documentation
|
357
|
+
#
|
358
|
+
# @overload list_changed_blocks(params = {})
|
359
|
+
# @param [Hash] params ({})
|
360
|
+
def list_changed_blocks(params = {}, options = {})
|
361
|
+
req = build_request(:list_changed_blocks, params)
|
362
|
+
req.send_request(options)
|
363
|
+
end
|
364
|
+
|
365
|
+
# Returns the block indexes and block tokens for blocks in an Amazon
|
366
|
+
# Elastic Block Store snapshot.
|
367
|
+
#
|
368
|
+
# @option params [required, String] :snapshot_id
|
369
|
+
# The ID of the snapshot from which to get block indexes and block
|
370
|
+
# tokens.
|
371
|
+
#
|
372
|
+
# @option params [String] :next_token
|
373
|
+
# The token to request the next page of results.
|
374
|
+
#
|
375
|
+
# @option params [Integer] :max_results
|
376
|
+
# The number of results to return.
|
377
|
+
#
|
378
|
+
# @option params [Integer] :starting_block_index
|
379
|
+
# The block index from which the list should start. The list in the
|
380
|
+
# response will start from this block index or the next valid block
|
381
|
+
# index in the snapshot.
|
382
|
+
#
|
383
|
+
# @return [Types::ListSnapshotBlocksResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
384
|
+
#
|
385
|
+
# * {Types::ListSnapshotBlocksResponse#blocks #blocks} => Array<Types::Block>
|
386
|
+
# * {Types::ListSnapshotBlocksResponse#expiry_time #expiry_time} => Time
|
387
|
+
# * {Types::ListSnapshotBlocksResponse#volume_size #volume_size} => Integer
|
388
|
+
# * {Types::ListSnapshotBlocksResponse#block_size #block_size} => Integer
|
389
|
+
# * {Types::ListSnapshotBlocksResponse#next_token #next_token} => String
|
390
|
+
#
|
391
|
+
# @example Request syntax with placeholder values
|
392
|
+
#
|
393
|
+
# resp = client.list_snapshot_blocks({
|
394
|
+
# snapshot_id: "SnapshotId", # required
|
395
|
+
# next_token: "PageToken",
|
396
|
+
# max_results: 1,
|
397
|
+
# starting_block_index: 1,
|
398
|
+
# })
|
399
|
+
#
|
400
|
+
# @example Response structure
|
401
|
+
#
|
402
|
+
# resp.blocks #=> Array
|
403
|
+
# resp.blocks[0].block_index #=> Integer
|
404
|
+
# resp.blocks[0].block_token #=> String
|
405
|
+
# resp.expiry_time #=> Time
|
406
|
+
# resp.volume_size #=> Integer
|
407
|
+
# resp.block_size #=> Integer
|
408
|
+
# resp.next_token #=> String
|
409
|
+
#
|
410
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/ListSnapshotBlocks AWS API Documentation
|
411
|
+
#
|
412
|
+
# @overload list_snapshot_blocks(params = {})
|
413
|
+
# @param [Hash] params ({})
|
414
|
+
def list_snapshot_blocks(params = {}, options = {})
|
415
|
+
req = build_request(:list_snapshot_blocks, params)
|
416
|
+
req.send_request(options)
|
417
|
+
end
|
418
|
+
|
419
|
+
# @!endgroup
|
420
|
+
|
421
|
+
# @param params ({})
|
422
|
+
# @api private
|
423
|
+
def build_request(operation_name, params = {})
|
424
|
+
handlers = @handlers.for(operation_name)
|
425
|
+
context = Seahorse::Client::RequestContext.new(
|
426
|
+
operation_name: operation_name,
|
427
|
+
operation: config.api.operation(operation_name),
|
428
|
+
client: self,
|
429
|
+
params: params,
|
430
|
+
config: config)
|
431
|
+
context[:gem_name] = 'aws-sdk-ebs'
|
432
|
+
context[:gem_version] = '1.0.0'
|
433
|
+
Seahorse::Client::Request.new(handlers, context)
|
434
|
+
end
|
435
|
+
|
436
|
+
# @api private
|
437
|
+
# @deprecated
|
438
|
+
def waiter_names
|
439
|
+
[]
|
440
|
+
end
|
441
|
+
|
442
|
+
class << self
|
443
|
+
|
444
|
+
# @api private
|
445
|
+
attr_reader :identifier
|
446
|
+
|
447
|
+
# @api private
|
448
|
+
def errors_module
|
449
|
+
Errors
|
450
|
+
end
|
451
|
+
|
452
|
+
end
|
453
|
+
end
|
454
|
+
end
|
@@ -0,0 +1,163 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::EBS
|
9
|
+
# @api private
|
10
|
+
module ClientApi
|
11
|
+
|
12
|
+
include Seahorse::Model
|
13
|
+
|
14
|
+
Block = Shapes::StructureShape.new(name: 'Block')
|
15
|
+
BlockData = Shapes::BlobShape.new(name: 'BlockData', streaming: true)
|
16
|
+
BlockIndex = Shapes::IntegerShape.new(name: 'BlockIndex')
|
17
|
+
BlockSize = Shapes::IntegerShape.new(name: 'BlockSize')
|
18
|
+
BlockToken = Shapes::StringShape.new(name: 'BlockToken')
|
19
|
+
Blocks = Shapes::ListShape.new(name: 'Blocks')
|
20
|
+
ChangedBlock = Shapes::StructureShape.new(name: 'ChangedBlock')
|
21
|
+
ChangedBlocks = Shapes::ListShape.new(name: 'ChangedBlocks')
|
22
|
+
Checksum = Shapes::StringShape.new(name: 'Checksum')
|
23
|
+
ChecksumAlgorithm = Shapes::StringShape.new(name: 'ChecksumAlgorithm')
|
24
|
+
DataLength = Shapes::IntegerShape.new(name: 'DataLength')
|
25
|
+
ErrorMessage = Shapes::StringShape.new(name: 'ErrorMessage')
|
26
|
+
GetSnapshotBlockRequest = Shapes::StructureShape.new(name: 'GetSnapshotBlockRequest')
|
27
|
+
GetSnapshotBlockResponse = Shapes::StructureShape.new(name: 'GetSnapshotBlockResponse')
|
28
|
+
ListChangedBlocksRequest = Shapes::StructureShape.new(name: 'ListChangedBlocksRequest')
|
29
|
+
ListChangedBlocksResponse = Shapes::StructureShape.new(name: 'ListChangedBlocksResponse')
|
30
|
+
ListSnapshotBlocksRequest = Shapes::StructureShape.new(name: 'ListSnapshotBlocksRequest')
|
31
|
+
ListSnapshotBlocksResponse = Shapes::StructureShape.new(name: 'ListSnapshotBlocksResponse')
|
32
|
+
MaxResults = Shapes::IntegerShape.new(name: 'MaxResults')
|
33
|
+
PageToken = Shapes::StringShape.new(name: 'PageToken')
|
34
|
+
ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
|
35
|
+
SnapshotId = Shapes::StringShape.new(name: 'SnapshotId')
|
36
|
+
TimeStamp = Shapes::TimestampShape.new(name: 'TimeStamp')
|
37
|
+
ValidationException = Shapes::StructureShape.new(name: 'ValidationException')
|
38
|
+
ValidationExceptionReason = Shapes::StringShape.new(name: 'ValidationExceptionReason')
|
39
|
+
VolumeSize = Shapes::IntegerShape.new(name: 'VolumeSize')
|
40
|
+
|
41
|
+
Block.add_member(:block_index, Shapes::ShapeRef.new(shape: BlockIndex, location_name: "BlockIndex"))
|
42
|
+
Block.add_member(:block_token, Shapes::ShapeRef.new(shape: BlockToken, location_name: "BlockToken"))
|
43
|
+
Block.struct_class = Types::Block
|
44
|
+
|
45
|
+
Blocks.member = Shapes::ShapeRef.new(shape: Block)
|
46
|
+
|
47
|
+
ChangedBlock.add_member(:block_index, Shapes::ShapeRef.new(shape: BlockIndex, location_name: "BlockIndex"))
|
48
|
+
ChangedBlock.add_member(:first_block_token, Shapes::ShapeRef.new(shape: BlockToken, location_name: "FirstBlockToken"))
|
49
|
+
ChangedBlock.add_member(:second_block_token, Shapes::ShapeRef.new(shape: BlockToken, location_name: "SecondBlockToken"))
|
50
|
+
ChangedBlock.struct_class = Types::ChangedBlock
|
51
|
+
|
52
|
+
ChangedBlocks.member = Shapes::ShapeRef.new(shape: ChangedBlock)
|
53
|
+
|
54
|
+
GetSnapshotBlockRequest.add_member(:snapshot_id, Shapes::ShapeRef.new(shape: SnapshotId, required: true, location: "uri", location_name: "snapshotId"))
|
55
|
+
GetSnapshotBlockRequest.add_member(:block_index, Shapes::ShapeRef.new(shape: BlockIndex, required: true, location: "uri", location_name: "blockIndex"))
|
56
|
+
GetSnapshotBlockRequest.add_member(:block_token, Shapes::ShapeRef.new(shape: BlockToken, required: true, location: "querystring", location_name: "blockToken"))
|
57
|
+
GetSnapshotBlockRequest.struct_class = Types::GetSnapshotBlockRequest
|
58
|
+
|
59
|
+
GetSnapshotBlockResponse.add_member(:data_length, Shapes::ShapeRef.new(shape: DataLength, location: "header", location_name: "x-amz-Data-Length"))
|
60
|
+
GetSnapshotBlockResponse.add_member(:block_data, Shapes::ShapeRef.new(shape: BlockData, location_name: "BlockData"))
|
61
|
+
GetSnapshotBlockResponse.add_member(:checksum, Shapes::ShapeRef.new(shape: Checksum, location: "header", location_name: "x-amz-Checksum"))
|
62
|
+
GetSnapshotBlockResponse.add_member(:checksum_algorithm, Shapes::ShapeRef.new(shape: ChecksumAlgorithm, location: "header", location_name: "x-amz-Checksum-Algorithm"))
|
63
|
+
GetSnapshotBlockResponse.struct_class = Types::GetSnapshotBlockResponse
|
64
|
+
GetSnapshotBlockResponse[:payload] = :block_data
|
65
|
+
GetSnapshotBlockResponse[:payload_member] = GetSnapshotBlockResponse.member(:block_data)
|
66
|
+
|
67
|
+
ListChangedBlocksRequest.add_member(:first_snapshot_id, Shapes::ShapeRef.new(shape: SnapshotId, location: "querystring", location_name: "firstSnapshotId"))
|
68
|
+
ListChangedBlocksRequest.add_member(:second_snapshot_id, Shapes::ShapeRef.new(shape: SnapshotId, required: true, location: "uri", location_name: "secondSnapshotId"))
|
69
|
+
ListChangedBlocksRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: PageToken, location: "querystring", location_name: "pageToken"))
|
70
|
+
ListChangedBlocksRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location: "querystring", location_name: "maxResults"))
|
71
|
+
ListChangedBlocksRequest.add_member(:starting_block_index, Shapes::ShapeRef.new(shape: BlockIndex, location: "querystring", location_name: "startingBlockIndex"))
|
72
|
+
ListChangedBlocksRequest.struct_class = Types::ListChangedBlocksRequest
|
73
|
+
|
74
|
+
ListChangedBlocksResponse.add_member(:changed_blocks, Shapes::ShapeRef.new(shape: ChangedBlocks, location_name: "ChangedBlocks"))
|
75
|
+
ListChangedBlocksResponse.add_member(:expiry_time, Shapes::ShapeRef.new(shape: TimeStamp, location_name: "ExpiryTime"))
|
76
|
+
ListChangedBlocksResponse.add_member(:volume_size, Shapes::ShapeRef.new(shape: VolumeSize, location_name: "VolumeSize"))
|
77
|
+
ListChangedBlocksResponse.add_member(:block_size, Shapes::ShapeRef.new(shape: BlockSize, location_name: "BlockSize"))
|
78
|
+
ListChangedBlocksResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: PageToken, location_name: "NextToken"))
|
79
|
+
ListChangedBlocksResponse.struct_class = Types::ListChangedBlocksResponse
|
80
|
+
|
81
|
+
ListSnapshotBlocksRequest.add_member(:snapshot_id, Shapes::ShapeRef.new(shape: SnapshotId, required: true, location: "uri", location_name: "snapshotId"))
|
82
|
+
ListSnapshotBlocksRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: PageToken, location: "querystring", location_name: "pageToken"))
|
83
|
+
ListSnapshotBlocksRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location: "querystring", location_name: "maxResults"))
|
84
|
+
ListSnapshotBlocksRequest.add_member(:starting_block_index, Shapes::ShapeRef.new(shape: BlockIndex, location: "querystring", location_name: "startingBlockIndex"))
|
85
|
+
ListSnapshotBlocksRequest.struct_class = Types::ListSnapshotBlocksRequest
|
86
|
+
|
87
|
+
ListSnapshotBlocksResponse.add_member(:blocks, Shapes::ShapeRef.new(shape: Blocks, location_name: "Blocks"))
|
88
|
+
ListSnapshotBlocksResponse.add_member(:expiry_time, Shapes::ShapeRef.new(shape: TimeStamp, location_name: "ExpiryTime"))
|
89
|
+
ListSnapshotBlocksResponse.add_member(:volume_size, Shapes::ShapeRef.new(shape: VolumeSize, location_name: "VolumeSize"))
|
90
|
+
ListSnapshotBlocksResponse.add_member(:block_size, Shapes::ShapeRef.new(shape: BlockSize, location_name: "BlockSize"))
|
91
|
+
ListSnapshotBlocksResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: PageToken, location_name: "NextToken"))
|
92
|
+
ListSnapshotBlocksResponse.struct_class = Types::ListSnapshotBlocksResponse
|
93
|
+
|
94
|
+
ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
|
95
|
+
ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
|
96
|
+
|
97
|
+
ValidationException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
|
98
|
+
ValidationException.add_member(:reason, Shapes::ShapeRef.new(shape: ValidationExceptionReason, location_name: "Reason"))
|
99
|
+
ValidationException.struct_class = Types::ValidationException
|
100
|
+
|
101
|
+
|
102
|
+
# @api private
|
103
|
+
API = Seahorse::Model::Api.new.tap do |api|
|
104
|
+
|
105
|
+
api.version = "2019-11-02"
|
106
|
+
|
107
|
+
api.metadata = {
|
108
|
+
"apiVersion" => "2019-11-02",
|
109
|
+
"endpointPrefix" => "ebs",
|
110
|
+
"jsonVersion" => "1.1",
|
111
|
+
"protocol" => "rest-json",
|
112
|
+
"serviceAbbreviation" => "Amazon EBS",
|
113
|
+
"serviceFullName" => "Amazon Elastic Block Store",
|
114
|
+
"serviceId" => "EBS",
|
115
|
+
"signatureVersion" => "v4",
|
116
|
+
"uid" => "ebs-2019-11-02",
|
117
|
+
}
|
118
|
+
|
119
|
+
api.add_operation(:get_snapshot_block, Seahorse::Model::Operation.new.tap do |o|
|
120
|
+
o.name = "GetSnapshotBlock"
|
121
|
+
o.http_method = "GET"
|
122
|
+
o.http_request_uri = "/snapshots/{snapshotId}/blocks/{blockIndex}"
|
123
|
+
o.input = Shapes::ShapeRef.new(shape: GetSnapshotBlockRequest)
|
124
|
+
o.output = Shapes::ShapeRef.new(shape: GetSnapshotBlockResponse)
|
125
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
126
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
127
|
+
end)
|
128
|
+
|
129
|
+
api.add_operation(:list_changed_blocks, Seahorse::Model::Operation.new.tap do |o|
|
130
|
+
o.name = "ListChangedBlocks"
|
131
|
+
o.http_method = "GET"
|
132
|
+
o.http_request_uri = "/snapshots/{secondSnapshotId}/changedblocks"
|
133
|
+
o.input = Shapes::ShapeRef.new(shape: ListChangedBlocksRequest)
|
134
|
+
o.output = Shapes::ShapeRef.new(shape: ListChangedBlocksResponse)
|
135
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
136
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
137
|
+
o[:pager] = Aws::Pager.new(
|
138
|
+
limit_key: "max_results",
|
139
|
+
tokens: {
|
140
|
+
"next_token" => "next_token"
|
141
|
+
}
|
142
|
+
)
|
143
|
+
end)
|
144
|
+
|
145
|
+
api.add_operation(:list_snapshot_blocks, Seahorse::Model::Operation.new.tap do |o|
|
146
|
+
o.name = "ListSnapshotBlocks"
|
147
|
+
o.http_method = "GET"
|
148
|
+
o.http_request_uri = "/snapshots/{snapshotId}/blocks"
|
149
|
+
o.input = Shapes::ShapeRef.new(shape: ListSnapshotBlocksRequest)
|
150
|
+
o.output = Shapes::ShapeRef.new(shape: ListSnapshotBlocksResponse)
|
151
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
152
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
153
|
+
o[:pager] = Aws::Pager.new(
|
154
|
+
limit_key: "max_results",
|
155
|
+
tokens: {
|
156
|
+
"next_token" => "next_token"
|
157
|
+
}
|
158
|
+
)
|
159
|
+
end)
|
160
|
+
end
|
161
|
+
|
162
|
+
end
|
163
|
+
end
|
File without changes
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::EBS
|
9
|
+
module Errors
|
10
|
+
|
11
|
+
extend Aws::Errors::DynamicErrors
|
12
|
+
|
13
|
+
class ResourceNotFoundException < ServiceError
|
14
|
+
|
15
|
+
# @param [Seahorse::Client::RequestContext] context
|
16
|
+
# @param [String] message
|
17
|
+
# @param [Aws::EBS::Types::ResourceNotFoundException] data
|
18
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
19
|
+
super(context, message, data)
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [String]
|
23
|
+
def message
|
24
|
+
@message || @data[:message]
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
class ValidationException < ServiceError
|
30
|
+
|
31
|
+
# @param [Seahorse::Client::RequestContext] context
|
32
|
+
# @param [String] message
|
33
|
+
# @param [Aws::EBS::Types::ValidationException] data
|
34
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
35
|
+
super(context, message, data)
|
36
|
+
end
|
37
|
+
|
38
|
+
# @return [String]
|
39
|
+
def message
|
40
|
+
@message || @data[:message]
|
41
|
+
end
|
42
|
+
|
43
|
+
# @return [String]
|
44
|
+
def reason
|
45
|
+
@data[:reason]
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::EBS
|
9
|
+
class Resource
|
10
|
+
|
11
|
+
# @param options ({})
|
12
|
+
# @option options [Client] :client
|
13
|
+
def initialize(options = {})
|
14
|
+
@client = options[:client] || Client.new(options)
|
15
|
+
end
|
16
|
+
|
17
|
+
# @return [Client]
|
18
|
+
def client
|
19
|
+
@client
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,298 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::EBS
|
9
|
+
module Types
|
10
|
+
|
11
|
+
# A block of data in an Amazon Elastic Block Store snapshot.
|
12
|
+
#
|
13
|
+
# @!attribute [rw] block_index
|
14
|
+
# The block index.
|
15
|
+
# @return [Integer]
|
16
|
+
#
|
17
|
+
# @!attribute [rw] block_token
|
18
|
+
# The block token for the block index.
|
19
|
+
# @return [String]
|
20
|
+
#
|
21
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/Block AWS API Documentation
|
22
|
+
#
|
23
|
+
class Block < Struct.new(
|
24
|
+
:block_index,
|
25
|
+
:block_token)
|
26
|
+
include Aws::Structure
|
27
|
+
end
|
28
|
+
|
29
|
+
# A block of data in an Amazon Elastic Block Store snapshot that is
|
30
|
+
# different from another snapshot of the same volume/snapshot lineage.
|
31
|
+
#
|
32
|
+
# @!attribute [rw] block_index
|
33
|
+
# The block index.
|
34
|
+
# @return [Integer]
|
35
|
+
#
|
36
|
+
# @!attribute [rw] first_block_token
|
37
|
+
# The block token for the block index of the `first snapshot ID`
|
38
|
+
# specified in the `list changed blocks` operation. This value is
|
39
|
+
# absent if the first snapshot does not have the changed block that is
|
40
|
+
# on the second snapshot.
|
41
|
+
# @return [String]
|
42
|
+
#
|
43
|
+
# @!attribute [rw] second_block_token
|
44
|
+
# The block token for the block index of the `second snapshot ID`
|
45
|
+
# specified in the `list changed blocks` operation.
|
46
|
+
# @return [String]
|
47
|
+
#
|
48
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/ChangedBlock AWS API Documentation
|
49
|
+
#
|
50
|
+
class ChangedBlock < Struct.new(
|
51
|
+
:block_index,
|
52
|
+
:first_block_token,
|
53
|
+
:second_block_token)
|
54
|
+
include Aws::Structure
|
55
|
+
end
|
56
|
+
|
57
|
+
# @note When making an API call, you may pass GetSnapshotBlockRequest
|
58
|
+
# data as a hash:
|
59
|
+
#
|
60
|
+
# {
|
61
|
+
# snapshot_id: "SnapshotId", # required
|
62
|
+
# block_index: 1, # required
|
63
|
+
# block_token: "BlockToken", # required
|
64
|
+
# }
|
65
|
+
#
|
66
|
+
# @!attribute [rw] snapshot_id
|
67
|
+
# The ID of the snapshot containing the block from which to get data.
|
68
|
+
# @return [String]
|
69
|
+
#
|
70
|
+
# @!attribute [rw] block_index
|
71
|
+
# The block index of the block from which to get data.
|
72
|
+
#
|
73
|
+
# Obtain the `block index` by running the `list changed blocks` or
|
74
|
+
# `list snapshot blocks` operations.
|
75
|
+
# @return [Integer]
|
76
|
+
#
|
77
|
+
# @!attribute [rw] block_token
|
78
|
+
# The block token of the block from which to get data.
|
79
|
+
#
|
80
|
+
# Obtain the `block token` by running the `list changed blocks` or
|
81
|
+
# `list snapshot blocks` operations.
|
82
|
+
# @return [String]
|
83
|
+
#
|
84
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/GetSnapshotBlockRequest AWS API Documentation
|
85
|
+
#
|
86
|
+
class GetSnapshotBlockRequest < Struct.new(
|
87
|
+
:snapshot_id,
|
88
|
+
:block_index,
|
89
|
+
:block_token)
|
90
|
+
include Aws::Structure
|
91
|
+
end
|
92
|
+
|
93
|
+
# @!attribute [rw] data_length
|
94
|
+
# The size of the data in the block.
|
95
|
+
# @return [Integer]
|
96
|
+
#
|
97
|
+
# @!attribute [rw] block_data
|
98
|
+
# The data content of the block.
|
99
|
+
# @return [IO]
|
100
|
+
#
|
101
|
+
# @!attribute [rw] checksum
|
102
|
+
# The checksum generated for the block.
|
103
|
+
# @return [String]
|
104
|
+
#
|
105
|
+
# @!attribute [rw] checksum_algorithm
|
106
|
+
# The algorithm used to generate the checksum for the block, such as
|
107
|
+
# SHA256.
|
108
|
+
# @return [String]
|
109
|
+
#
|
110
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/GetSnapshotBlockResponse AWS API Documentation
|
111
|
+
#
|
112
|
+
class GetSnapshotBlockResponse < Struct.new(
|
113
|
+
:data_length,
|
114
|
+
:block_data,
|
115
|
+
:checksum,
|
116
|
+
:checksum_algorithm)
|
117
|
+
include Aws::Structure
|
118
|
+
end
|
119
|
+
|
120
|
+
# @note When making an API call, you may pass ListChangedBlocksRequest
|
121
|
+
# data as a hash:
|
122
|
+
#
|
123
|
+
# {
|
124
|
+
# first_snapshot_id: "SnapshotId",
|
125
|
+
# second_snapshot_id: "SnapshotId", # required
|
126
|
+
# next_token: "PageToken",
|
127
|
+
# max_results: 1,
|
128
|
+
# starting_block_index: 1,
|
129
|
+
# }
|
130
|
+
#
|
131
|
+
# @!attribute [rw] first_snapshot_id
|
132
|
+
# The ID of the first snapshot to use for the comparison.
|
133
|
+
# @return [String]
|
134
|
+
#
|
135
|
+
# @!attribute [rw] second_snapshot_id
|
136
|
+
# The ID of the second snapshot to use for the comparison.
|
137
|
+
# @return [String]
|
138
|
+
#
|
139
|
+
# @!attribute [rw] next_token
|
140
|
+
# The token to request the next page of results.
|
141
|
+
# @return [String]
|
142
|
+
#
|
143
|
+
# @!attribute [rw] max_results
|
144
|
+
# The number of results to return.
|
145
|
+
# @return [Integer]
|
146
|
+
#
|
147
|
+
# @!attribute [rw] starting_block_index
|
148
|
+
# The block index from which the comparison should start.
|
149
|
+
#
|
150
|
+
# The list in the response will start from this block index or the
|
151
|
+
# next valid block index in the snapshots.
|
152
|
+
# @return [Integer]
|
153
|
+
#
|
154
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/ListChangedBlocksRequest AWS API Documentation
|
155
|
+
#
|
156
|
+
class ListChangedBlocksRequest < Struct.new(
|
157
|
+
:first_snapshot_id,
|
158
|
+
:second_snapshot_id,
|
159
|
+
:next_token,
|
160
|
+
:max_results,
|
161
|
+
:starting_block_index)
|
162
|
+
include Aws::Structure
|
163
|
+
end
|
164
|
+
|
165
|
+
# @!attribute [rw] changed_blocks
|
166
|
+
# An array of objects containing information about the changed blocks.
|
167
|
+
# @return [Array<Types::ChangedBlock>]
|
168
|
+
#
|
169
|
+
# @!attribute [rw] expiry_time
|
170
|
+
# The time when the `block token` expires.
|
171
|
+
# @return [Time]
|
172
|
+
#
|
173
|
+
# @!attribute [rw] volume_size
|
174
|
+
# The size of the volume in GB.
|
175
|
+
# @return [Integer]
|
176
|
+
#
|
177
|
+
# @!attribute [rw] block_size
|
178
|
+
# The size of the block.
|
179
|
+
# @return [Integer]
|
180
|
+
#
|
181
|
+
# @!attribute [rw] next_token
|
182
|
+
# The token to use to retrieve the next page of results. This value is
|
183
|
+
# null when there are no more results to return.
|
184
|
+
# @return [String]
|
185
|
+
#
|
186
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/ListChangedBlocksResponse AWS API Documentation
|
187
|
+
#
|
188
|
+
class ListChangedBlocksResponse < Struct.new(
|
189
|
+
:changed_blocks,
|
190
|
+
:expiry_time,
|
191
|
+
:volume_size,
|
192
|
+
:block_size,
|
193
|
+
:next_token)
|
194
|
+
include Aws::Structure
|
195
|
+
end
|
196
|
+
|
197
|
+
# @note When making an API call, you may pass ListSnapshotBlocksRequest
|
198
|
+
# data as a hash:
|
199
|
+
#
|
200
|
+
# {
|
201
|
+
# snapshot_id: "SnapshotId", # required
|
202
|
+
# next_token: "PageToken",
|
203
|
+
# max_results: 1,
|
204
|
+
# starting_block_index: 1,
|
205
|
+
# }
|
206
|
+
#
|
207
|
+
# @!attribute [rw] snapshot_id
|
208
|
+
# The ID of the snapshot from which to get block indexes and block
|
209
|
+
# tokens.
|
210
|
+
# @return [String]
|
211
|
+
#
|
212
|
+
# @!attribute [rw] next_token
|
213
|
+
# The token to request the next page of results.
|
214
|
+
# @return [String]
|
215
|
+
#
|
216
|
+
# @!attribute [rw] max_results
|
217
|
+
# The number of results to return.
|
218
|
+
# @return [Integer]
|
219
|
+
#
|
220
|
+
# @!attribute [rw] starting_block_index
|
221
|
+
# The block index from which the list should start. The list in the
|
222
|
+
# response will start from this block index or the next valid block
|
223
|
+
# index in the snapshot.
|
224
|
+
# @return [Integer]
|
225
|
+
#
|
226
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/ListSnapshotBlocksRequest AWS API Documentation
|
227
|
+
#
|
228
|
+
class ListSnapshotBlocksRequest < Struct.new(
|
229
|
+
:snapshot_id,
|
230
|
+
:next_token,
|
231
|
+
:max_results,
|
232
|
+
:starting_block_index)
|
233
|
+
include Aws::Structure
|
234
|
+
end
|
235
|
+
|
236
|
+
# @!attribute [rw] blocks
|
237
|
+
# An array of objects containing information about the blocks.
|
238
|
+
# @return [Array<Types::Block>]
|
239
|
+
#
|
240
|
+
# @!attribute [rw] expiry_time
|
241
|
+
# The time when the `block token` expires.
|
242
|
+
# @return [Time]
|
243
|
+
#
|
244
|
+
# @!attribute [rw] volume_size
|
245
|
+
# The size of the volume in GB.
|
246
|
+
# @return [Integer]
|
247
|
+
#
|
248
|
+
# @!attribute [rw] block_size
|
249
|
+
# The size of the block.
|
250
|
+
# @return [Integer]
|
251
|
+
#
|
252
|
+
# @!attribute [rw] next_token
|
253
|
+
# The token to use to retrieve the next page of results. This value is
|
254
|
+
# null when there are no more results to return.
|
255
|
+
# @return [String]
|
256
|
+
#
|
257
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/ListSnapshotBlocksResponse AWS API Documentation
|
258
|
+
#
|
259
|
+
class ListSnapshotBlocksResponse < Struct.new(
|
260
|
+
:blocks,
|
261
|
+
:expiry_time,
|
262
|
+
:volume_size,
|
263
|
+
:block_size,
|
264
|
+
:next_token)
|
265
|
+
include Aws::Structure
|
266
|
+
end
|
267
|
+
|
268
|
+
# The specified resource does not exist.
|
269
|
+
#
|
270
|
+
# @!attribute [rw] message
|
271
|
+
# @return [String]
|
272
|
+
#
|
273
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/ResourceNotFoundException AWS API Documentation
|
274
|
+
#
|
275
|
+
class ResourceNotFoundException < Struct.new(
|
276
|
+
:message)
|
277
|
+
include Aws::Structure
|
278
|
+
end
|
279
|
+
|
280
|
+
# The input fails to satisfy the constraints of the EBS direct APIs.
|
281
|
+
#
|
282
|
+
# @!attribute [rw] message
|
283
|
+
# @return [String]
|
284
|
+
#
|
285
|
+
# @!attribute [rw] reason
|
286
|
+
# The reason for the validation exception.
|
287
|
+
# @return [String]
|
288
|
+
#
|
289
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ebs-2019-11-02/ValidationException AWS API Documentation
|
290
|
+
#
|
291
|
+
class ValidationException < Struct.new(
|
292
|
+
:message,
|
293
|
+
:reason)
|
294
|
+
include Aws::Structure
|
295
|
+
end
|
296
|
+
|
297
|
+
end
|
298
|
+
end
|
metadata
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: aws-sdk-ebs
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Amazon Web Services
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-12-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: aws-sdk-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 3.71.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 3.71.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: aws-sigv4
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.1'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.1'
|
47
|
+
description: Official AWS Ruby gem for Amazon Elastic Block Store (Amazon EBS). This
|
48
|
+
gem is part of the AWS SDK for Ruby.
|
49
|
+
email:
|
50
|
+
- trevrowe@amazon.com
|
51
|
+
executables: []
|
52
|
+
extensions: []
|
53
|
+
extra_rdoc_files: []
|
54
|
+
files:
|
55
|
+
- lib/aws-sdk-ebs.rb
|
56
|
+
- lib/aws-sdk-ebs/client.rb
|
57
|
+
- lib/aws-sdk-ebs/client_api.rb
|
58
|
+
- lib/aws-sdk-ebs/customizations.rb
|
59
|
+
- lib/aws-sdk-ebs/errors.rb
|
60
|
+
- lib/aws-sdk-ebs/resource.rb
|
61
|
+
- lib/aws-sdk-ebs/types.rb
|
62
|
+
homepage: https://github.com/aws/aws-sdk-ruby
|
63
|
+
licenses:
|
64
|
+
- Apache-2.0
|
65
|
+
metadata:
|
66
|
+
source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-ebs
|
67
|
+
changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-ebs/CHANGELOG.md
|
68
|
+
post_install_message:
|
69
|
+
rdoc_options: []
|
70
|
+
require_paths:
|
71
|
+
- lib
|
72
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
requirements: []
|
83
|
+
rubyforge_project:
|
84
|
+
rubygems_version: 2.5.2.3
|
85
|
+
signing_key:
|
86
|
+
specification_version: 4
|
87
|
+
summary: AWS SDK for Ruby - Amazon EBS
|
88
|
+
test_files: []
|