1 - | import ebs.model
|
2 - | import ebs.types
|
3 - | import typing
|
4 - |
|
5 - | class CompleteSnapshotInput:
|
6 - | changed_blocks_count: int
|
7 - | """
|
8 - | <p>The number of blocks that were written to the snapshot.</p>
|
9 - | """
|
10 - |
|
11 - | checksum: typing.Optional[str]
|
12 - | """
|
13 - | <p>An aggregated Base-64 SHA256 checksum based on the checksums of each written block.</p>
|
14 - | <p>To generate the aggregated checksum using the linear aggregation method, arrange the checksums for each written block in ascending order of their block index, concatenate them to form a single string, and then generate the checksum on the entire string using the SHA256 algorithm.</p>
|
15 - | """
|
16 - |
|
17 - | checksum_aggregation_method: typing.Optional[ebs.model.ChecksumAggregationMethod]
|
18 - | """
|
19 - | <p>The aggregation method used to generate the checksum. Currently, the only supported aggregation method is <code>LINEAR</code>.</p>
|
20 - | """
|
21 - |
|
22 - | checksum_algorithm: typing.Optional[ebs.model.ChecksumAlgorithm]
|
23 - | """
|
24 - | <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
25 - | """
|
26 - |
|
27 - | snapshot_id: str
|
28 - | """
|
29 - | <p>The ID of the snapshot.</p>
|
30 - | """
|
31 - |
|
32 - | def __init__(self, changed_blocks_count: int, checksum_aggregation_method: typing.Optional[ebs.model.ChecksumAggregationMethod] = ..., checksum_algorithm: typing.Optional[ebs.model.ChecksumAlgorithm] = ..., snapshot_id: str, checksum: typing.Optional[str] = ...) -> None:
|
33 - | ...
|
34 - |
|
35 - |
|
36 - | class GetSnapshotBlockInput:
|
37 - | block_index: int
|
38 - | """
|
39 - | <p>The block index of the block from which to get data.</p>
|
40 - | <p>Obtain the <code>BlockIndex</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
|
41 - | """
|
42 - |
|
43 - | block_token: str
|
44 - | """
|
45 - | <p>The block token of the block from which to get data.</p>
|
46 - | <p>Obtain the <code>BlockToken</code> by running the <code>ListChangedBlocks</code> or <code>ListSnapshotBlocks</code> operations.</p>
|
47 - | """
|
48 - |
|
49 - | snapshot_id: str
|
50 - | """
|
51 - | <p>The ID of the snapshot containing the block from which to get data.</p>
|
52 - | """
|
53 - |
|
54 - | def __init__(self, snapshot_id: str, block_token: str, block_index: int) -> None:
|
55 - | ...
|
56 - |
|
57 - |
|
58 - | class ListChangedBlocksInput:
|
59 - | first_snapshot_id: typing.Optional[str]
|
60 - | """
|
61 - | <p>The ID of the first snapshot to use for the comparison.</p><important>
|
62 - | <p>The <code>FirstSnapshotID</code> parameter must be specified with a <code>SecondSnapshotId</code> parameter; otherwise, an error occurs.</p>
|
63 - | </important>
|
64 - | """
|
65 - |
|
66 - | max_results: typing.Optional[int]
|
67 - | """
|
68 - | <p>The number of results to return.</p>
|
69 - | """
|
70 - |
|
71 - | next_token: typing.Optional[str]
|
72 - | """
|
73 - | <p>The token to request the next page of results.</p>
|
74 - | """
|
75 - |
|
76 - | second_snapshot_id: str
|
77 - | """
|
78 - | <p>The ID of the second snapshot to use for the comparison.</p><important>
|
79 - | <p>The <code>SecondSnapshotId</code> parameter must be specified with a <code>FirstSnapshotID</code> parameter; otherwise, an error occurs.</p>
|
80 - | </important>
|
81 - | """
|
82 - |
|
83 - | starting_block_index: typing.Optional[int]
|
84 - | """
|
85 - | <p>The block index from which the comparison should start.</p>
|
86 - | <p>The list in the response will start from this block index or the next valid block index in the snapshots.</p>
|
87 - | """
|
88 - |
|
89 - | def __init__(self, second_snapshot_id: str, first_snapshot_id: typing.Optional[str] = ..., next_token: typing.Optional[str] = ..., max_results: typing.Optional[int] = ..., starting_block_index: typing.Optional[int] = ...) -> None:
|
90 - | ...
|
91 - |
|
92 - |
|
93 - | class ListSnapshotBlocksInput:
|
94 - | max_results: typing.Optional[int]
|
95 - | """
|
96 - | <p>The number of results to return.</p>
|
97 - | """
|
98 - |
|
99 - | next_token: typing.Optional[str]
|
100 - | """
|
101 - | <p>The token to request the next page of results.</p>
|
102 - | """
|
103 - |
|
104 - | snapshot_id: str
|
105 - | """
|
106 - | <p>The ID of the snapshot from which to get block indexes and block tokens.</p>
|
107 - | """
|
108 - |
|
109 - | starting_block_index: typing.Optional[int]
|
110 - | """
|
111 - | <p>The block index from which the list should start. The list in the response will start from this block index or the next valid block index in the snapshot.</p>
|
112 - | """
|
113 - |
|
114 - | def __init__(self, max_results: typing.Optional[int] = ..., starting_block_index: typing.Optional[int] = ..., next_token: typing.Optional[str] = ..., snapshot_id: str) -> None:
|
115 - | ...
|
116 - |
|
117 - |
|
118 - | class PutSnapshotBlockInput:
|
119 - | block_data: ebs.types.ByteStream
|
120 - | """
|
121 - | <p>The data to write to the block.</p>
|
122 - | <p>The block data is not signed as part of the Signature Version 4 signing process. As a result, you must generate and provide a Base64-encoded SHA256 checksum for the block data using the <b>x-amz-Checksum</b> header. Also, you must specify the checksum algorithm using the <b>x-amz-Checksum-Algorithm</b> header. The checksum that you provide is part of the Signature Version 4 signing process. It is validated against a checksum generated by Amazon EBS to ensure the validity and authenticity of the data. If the checksums do not correspond, the request fails. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-checksums"> Using checksums with the EBS direct APIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
123 - | """
|
124 - |
|
125 - | block_index: int
|
126 - | """
|
127 - | <p>The block index of the block in which to write the data. A block index is a logical index in units of <code>512</code> KiB blocks. To identify the block index, divide the logical offset of the data in the logical volume by the block size (logical offset of data/<code>524288</code>). The logical offset of the data must be <code>512</code> KiB aligned.</p>
|
128 - | """
|
129 - |
|
130 - | checksum: str
|
131 - | """
|
132 - | <p>A Base64-encoded SHA256 checksum of the data. Only SHA256 checksums are supported.</p>
|
133 - | """
|
134 - |
|
135 - | checksum_algorithm: ebs.model.ChecksumAlgorithm
|
136 - | """
|
137 - | <p>The algorithm used to generate the checksum. Currently, the only supported algorithm is <code>SHA256</code>.</p>
|
138 - | """
|
139 - |
|
140 - | data_length: int
|
141 - | """
|
142 - | <p>The size of the data to write to the block, in bytes. Currently, the only supported size is <code>524288</code>.</p>
|
143 - | <p>Valid values: <code>524288</code></p>
|
144 - | """
|
145 - |
|
146 - | progress: typing.Optional[int]
|
147 - | """
|
148 - | <p>The progress of the write process, as a percentage.</p>
|
149 - | """
|
150 - |
|
151 - | snapshot_id: str
|
152 - | """
|
153 - | <p>The ID of the snapshot.</p>
|
154 - | """
|
155 - |
|
156 - | def __init__(self, snapshot_id: str, block_index: int, checksum: str, progress: typing.Optional[int] = ..., block_data: ebs.types.ByteStream, data_length: int, checksum_algorithm: ebs.model.ChecksumAlgorithm) -> None:
|
157 - | ...
|
158 - |
|
159 - |
|
160 - | class StartSnapshotInput:
|
161 - | client_token: typing.Optional[str]
|
162 - | """
|
163 - | <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p>
|
164 - | <p>If you do not specify a client token, one is automatically generated by the AWS SDK.</p>
|
165 - | <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-direct-api-idempotency.html"> Idempotency for StartSnapshot API</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
166 - | """
|
167 - |
|
168 - | description: typing.Optional[str]
|
169 - | """
|
170 - | <p>A description for the snapshot.</p>
|
171 - | """
|
172 - |
|
173 - | encrypted: typing.Optional[bool]
|
174 - | """
|
175 - | <p>Indicates whether to encrypt the snapshot. To create an encrypted snapshot, specify <code>true</code>. To create an unencrypted snapshot, omit this parameter.</p>
|
176 - | <p>If you specify a value for <b>ParentSnapshotId</b>, omit this parameter.</p>
|
177 - | <p>If you specify <code>true</code>, the snapshot is encrypted using the CMK specified using the <b>KmsKeyArn</b> parameter. If no value is specified for <b>KmsKeyArn</b>, the default CMK for your account is used. If no default CMK has been specified for your account, the AWS managed CMK is used. To set a default CMK for your account, use <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyEbsDefaultKmsKeyId.html"> ModifyEbsDefaultKmsKeyId</a>.</p>
|
178 - | <p>If your account is enabled for encryption by default, you cannot set this parameter to <code>false</code>. In this case, you can omit this parameter.</p>
|
179 - | <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapis-using-encryption"> Using encryption</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
|
180 - | """
|
181 - |
|
182 - | kms_key_arn: typing.Optional[str]
|
183 - | """
|
184 - | <p>The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) customer master key (CMK) to be used to encrypt the snapshot. If you do not specify a CMK, the default AWS managed CMK is used.</p>
|
185 - | <p>If you specify a <b>ParentSnapshotId</b>, omit this parameter; the snapshot will be encrypted using the same CMK that was used to encrypt the parent snapshot.</p>
|
186 - | <p>If <b>Encrypted</b> is set to <code>true</code>, you must specify a CMK ARN.</p>
|
187 - | """
|
188 - |
|
189 - | parent_snapshot_id: typing.Optional[str]
|
190 - | """
|
191 - | <p>The ID of the parent snapshot. If there is no parent snapshot, or if you are creating the first snapshot for an on-premises volume, omit this parameter.</p>
|
192 - | <p>If your account is enabled for encryption by default, you cannot use an unencrypted snapshot as a parent snapshot. You must first create an encrypted copy of the parent snapshot using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopySnapshot.html">CopySnapshot</a>.</p>
|
193 - | """
|
194 - |
|
195 - | tags: typing.Optional[typing.List[ebs.model.Tag]]
|
196 - | """
|
197 - | <p>The tags to apply to the snapshot.</p>
|
198 - | """
|
199 - |
|
200 - | timeout: typing.Optional[int]
|
201 - | """
|
202 - | <p>The amount of time (in minutes) after which the snapshot is automatically cancelled if:</p>
|
203 - | <ul>
|
204 - | <li>
|
205 - | <p>No blocks are written to the snapshot.</p></li>
|
206 - | <li>
|
207 - | <p>The snapshot is not completed after writing the last block of data.</p></li>
|
208 - | </ul>
|
209 - | <p>If no value is specified, the timeout defaults to <code>60</code> minutes.</p>
|
210 - | """
|
211 - |
|
212 - | volume_size: int
|
213 - | """
|
214 - | <p>The size of the volume, in GiB. The maximum size is <code>16384</code> GiB (16 TiB).</p>
|
215 - | """
|
216 - |
|
217 - | def __init__(self, timeout: typing.Optional[int] = ..., client_token: typing.Optional[str] = ..., volume_size: int, tags: typing.Optional[typing.List[ebs.model.Tag]] = ..., encrypted: typing.Optional[bool] = ..., kms_key_arn: typing.Optional[str] = ..., parent_snapshot_id: typing.Optional[str] = ..., description: typing.Optional[str] = ...) -> None:
|
218 - | ...
|
219 - |
|