Class: Aws::EBS::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::EBS::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-ebs/client.rb
Overview
An API client for EBS. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::EBS::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#complete_snapshot(params = {}) ⇒ Types::CompleteSnapshotResponse
Seals and completes the snapshot after all of the required blocks of data have been written to it.
-
#get_snapshot_block(params = {}) ⇒ Types::GetSnapshotBlockResponse
Returns the data in a block in an Amazon Elastic Block Store snapshot.
-
#list_changed_blocks(params = {}) ⇒ Types::ListChangedBlocksResponse
Returns information about the blocks that are different between two Amazon Elastic Block Store snapshots of the same volume/snapshot lineage.
-
#list_snapshot_blocks(params = {}) ⇒ Types::ListSnapshotBlocksResponse
Returns information about the blocks in an Amazon Elastic Block Store snapshot.
-
#put_snapshot_block(params = {}) ⇒ Types::PutSnapshotBlockResponse
Writes a block of data to a snapshot.
-
#start_snapshot(params = {}) ⇒ Types::StartSnapshotResponse
Creates a new Amazon EBS snapshot.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
444 445 446 |
# File 'lib/aws-sdk-ebs/client.rb', line 444 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.
1074 1075 1076 |
# File 'lib/aws-sdk-ebs/client.rb', line 1074 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.
1077 1078 1079 |
# File 'lib/aws-sdk-ebs/client.rb', line 1077 def errors_module Errors end |
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 |
# File 'lib/aws-sdk-ebs/client.rb', line 1047 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::EBS') ) 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-ebs' context[:gem_version] = '1.53.0' Seahorse::Client::Request.new(handlers, context) end |
#complete_snapshot(params = {}) ⇒ Types::CompleteSnapshotResponse
Seals and completes the snapshot after all of the required blocks of data have been written to it. Completing the snapshot changes the status to ‘completed`. You cannot write new blocks to a snapshot after it has been completed.
<note markdown=“1”> You should always retry requests that receive server (‘5xx`) error responses, and `ThrottlingException` and `RequestThrottledException` client error responses. For more information see [Error retries] in the *Amazon Elastic Compute Cloud User Guide*.
</note>
[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/error-retries.html
512 513 514 515 |
# File 'lib/aws-sdk-ebs/client.rb', line 512 def complete_snapshot(params = {}, = {}) req = build_request(:complete_snapshot, params) req.send_request() end |
#get_snapshot_block(params = {}) ⇒ Types::GetSnapshotBlockResponse
Returns the data in a block in an Amazon Elastic Block Store snapshot.
<note markdown=“1”> You should always retry requests that receive server (‘5xx`) error responses, and `ThrottlingException` and `RequestThrottledException` client error responses. For more information see [Error retries] in the *Amazon Elastic Compute Cloud User Guide*.
</note>
[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/error-retries.html
580 581 582 583 |
# File 'lib/aws-sdk-ebs/client.rb', line 580 def get_snapshot_block(params = {}, = {}, &block) req = build_request(:get_snapshot_block, params) req.send_request(, &block) end |
#list_changed_blocks(params = {}) ⇒ Types::ListChangedBlocksResponse
Returns information about the blocks that are different between two Amazon Elastic Block Store snapshots of the same volume/snapshot lineage.
<note markdown=“1”> You should always retry requests that receive server (‘5xx`) error responses, and `ThrottlingException` and `RequestThrottledException` client error responses. For more information see [Error retries] in the *Amazon Elastic Compute Cloud User Guide*.
</note>
[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/error-retries.html
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
671 672 673 674 |
# File 'lib/aws-sdk-ebs/client.rb', line 671 def list_changed_blocks(params = {}, = {}) req = build_request(:list_changed_blocks, params) req.send_request() end |
#list_snapshot_blocks(params = {}) ⇒ Types::ListSnapshotBlocksResponse
Returns information about the blocks in an Amazon Elastic Block Store snapshot.
<note markdown=“1”> You should always retry requests that receive server (‘5xx`) error responses, and `ThrottlingException` and `RequestThrottledException` client error responses. For more information see [Error retries] in the *Amazon Elastic Compute Cloud User Guide*.
</note>
[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/error-retries.html
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
750 751 752 753 |
# File 'lib/aws-sdk-ebs/client.rb', line 750 def list_snapshot_blocks(params = {}, = {}) req = build_request(:list_snapshot_blocks, params) req.send_request() end |
#put_snapshot_block(params = {}) ⇒ Types::PutSnapshotBlockResponse
Writes a block of data to a snapshot. If the specified block contains data, the existing data is overwritten. The target snapshot must be in the ‘pending` state.
Data written to a snapshot must be aligned with 512-KiB sectors.
<note markdown=“1”> You should always retry requests that receive server (‘5xx`) error responses, and `ThrottlingException` and `RequestThrottledException` client error responses. For more information see [Error retries] in the *Amazon Elastic Compute Cloud User Guide*.
</note>
[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/error-retries.html
853 854 855 856 |
# File 'lib/aws-sdk-ebs/client.rb', line 853 def put_snapshot_block(params = {}, = {}) req = build_request(:put_snapshot_block, params) req.send_request() end |
#start_snapshot(params = {}) ⇒ Types::StartSnapshotResponse
Creates a new Amazon EBS snapshot. The new snapshot enters the ‘pending` state after the request completes.
After creating the snapshot, use [ PutSnapshotBlock] to write blocks of data to the snapshot.
<note markdown=“1”> You should always retry requests that receive server (‘5xx`) error responses, and `ThrottlingException` and `RequestThrottledException` client error responses. For more information see [Error retries] in the *Amazon Elastic Compute Cloud User Guide*.
</note>
[1]: docs.aws.amazon.com/ebs/latest/APIReference/API_PutSnapshotBlock.html [2]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/error-retries.html
1038 1039 1040 1041 |
# File 'lib/aws-sdk-ebs/client.rb', line 1038 def start_snapshot(params = {}, = {}) req = build_request(:start_snapshot, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1067 1068 1069 |
# File 'lib/aws-sdk-ebs/client.rb', line 1067 def waiter_names [] end |