@aws-sdk/client-ebs 3.928.0 → 3.930.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +519 -465
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-es/EBSClient.js +2 -0
- package/dist-es/commands/CompleteSnapshotCommand.js +3 -9
- package/dist-es/commands/GetSnapshotBlockCommand.js +3 -10
- package/dist-es/commands/ListChangedBlocksCommand.js +3 -10
- package/dist-es/commands/ListSnapshotBlocksCommand.js +3 -10
- package/dist-es/commands/PutSnapshotBlockCommand.js +3 -10
- package/dist-es/commands/StartSnapshotCommand.js +3 -10
- package/dist-es/models/models_0.js +0 -28
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-es/schemas/schemas_0.js +498 -0
- package/dist-types/EBSClient.d.ts +10 -1
- package/dist-types/models/models_0.d.ts +0 -28
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +37 -0
- package/dist-types/ts3.4/EBSClient.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +0 -19
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +43 -0
- package/package.json +34 -35
- package/dist-es/protocols/Aws_restJson1.js +0 -382
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -56
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -80
|
@@ -37,6 +37,10 @@ export declare const getRuntimeConfig: (config: EBSClientConfig) => {
|
|
|
37
37
|
retryMode: string | import("@smithy/types").Provider<string>;
|
|
38
38
|
logger: import("@smithy/types").Logger;
|
|
39
39
|
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
40
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
41
|
+
import("@smithy/types").HttpRequest,
|
|
42
|
+
import("@smithy/types").HttpResponse
|
|
43
|
+
>;
|
|
40
44
|
defaultsMode:
|
|
41
45
|
| import("@smithy/smithy-client").DefaultsMode
|
|
42
46
|
| import("@smithy/types").Provider<
|
|
@@ -14,6 +14,10 @@ export declare const getRuntimeConfig: (config: EBSClientConfig) => {
|
|
|
14
14
|
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").EBSHttpAuthSchemeProvider;
|
|
15
15
|
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
16
16
|
logger: import("@smithy/types").Logger;
|
|
17
|
+
protocol: import("@smithy/types").ClientProtocol<
|
|
18
|
+
import("@smithy/types").HttpRequest,
|
|
19
|
+
import("@smithy/types").HttpResponse
|
|
20
|
+
>;
|
|
17
21
|
sdkStreamMixin: import("@smithy/types").SdkStreamMixinInjector;
|
|
18
22
|
serviceId: string;
|
|
19
23
|
urlParser: import("@smithy/types").UrlParser;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
StaticErrorSchema,
|
|
3
|
+
StaticListSchema,
|
|
4
|
+
StaticOperationSchema,
|
|
5
|
+
StaticSimpleSchema,
|
|
6
|
+
StaticStructureSchema,
|
|
7
|
+
} from "@smithy/types";
|
|
8
|
+
export declare var BlockData: StaticSimpleSchema;
|
|
9
|
+
export declare var KmsKeyArn: StaticSimpleSchema;
|
|
10
|
+
export declare var AccessDeniedException: StaticErrorSchema;
|
|
11
|
+
export declare var Block: StaticStructureSchema;
|
|
12
|
+
export declare var ChangedBlock: StaticStructureSchema;
|
|
13
|
+
export declare var CompleteSnapshotRequest: StaticStructureSchema;
|
|
14
|
+
export declare var CompleteSnapshotResponse: StaticStructureSchema;
|
|
15
|
+
export declare var ConcurrentLimitExceededException: StaticErrorSchema;
|
|
16
|
+
export declare var ConflictException: StaticErrorSchema;
|
|
17
|
+
export declare var GetSnapshotBlockRequest: StaticStructureSchema;
|
|
18
|
+
export declare var GetSnapshotBlockResponse: StaticStructureSchema;
|
|
19
|
+
export declare var InternalServerException: StaticErrorSchema;
|
|
20
|
+
export declare var ListChangedBlocksRequest: StaticStructureSchema;
|
|
21
|
+
export declare var ListChangedBlocksResponse: StaticStructureSchema;
|
|
22
|
+
export declare var ListSnapshotBlocksRequest: StaticStructureSchema;
|
|
23
|
+
export declare var ListSnapshotBlocksResponse: StaticStructureSchema;
|
|
24
|
+
export declare var PutSnapshotBlockRequest: StaticStructureSchema;
|
|
25
|
+
export declare var PutSnapshotBlockResponse: StaticStructureSchema;
|
|
26
|
+
export declare var RequestThrottledException: StaticErrorSchema;
|
|
27
|
+
export declare var ResourceNotFoundException: StaticErrorSchema;
|
|
28
|
+
export declare var ServiceQuotaExceededException: StaticErrorSchema;
|
|
29
|
+
export declare var StartSnapshotRequest: StaticStructureSchema;
|
|
30
|
+
export declare var StartSnapshotResponse: StaticStructureSchema;
|
|
31
|
+
export declare var Tag: StaticStructureSchema;
|
|
32
|
+
export declare var ValidationException: StaticErrorSchema;
|
|
33
|
+
export declare var __Unit: "unit";
|
|
34
|
+
export declare var EBSServiceException: StaticErrorSchema;
|
|
35
|
+
export declare var Blocks: StaticListSchema;
|
|
36
|
+
export declare var ChangedBlocks: StaticListSchema;
|
|
37
|
+
export declare var Tags: StaticListSchema;
|
|
38
|
+
export declare var CompleteSnapshot: StaticOperationSchema;
|
|
39
|
+
export declare var GetSnapshotBlock: StaticOperationSchema;
|
|
40
|
+
export declare var ListChangedBlocks: StaticOperationSchema;
|
|
41
|
+
export declare var ListSnapshotBlocks: StaticOperationSchema;
|
|
42
|
+
export declare var PutSnapshotBlock: StaticOperationSchema;
|
|
43
|
+
export declare var StartSnapshot: StaticOperationSchema;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-ebs",
|
|
3
3
|
"description": "AWS SDK for JavaScript Ebs Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.930.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-ebs",
|
|
@@ -20,44 +20,43 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
|
-
"@aws-sdk/core": "3.
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
25
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
26
|
-
"@aws-sdk/middleware-logger": "3.
|
|
27
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
28
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
29
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
30
|
-
"@aws-sdk/types": "3.
|
|
31
|
-
"@aws-sdk/util-endpoints": "3.
|
|
32
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
33
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
34
|
-
"@smithy/config-resolver": "^4.4.
|
|
35
|
-
"@smithy/core": "^3.
|
|
36
|
-
"@smithy/fetch-http-handler": "^5.3.
|
|
37
|
-
"@smithy/hash-node": "^4.2.
|
|
38
|
-
"@smithy/invalid-dependency": "^4.2.
|
|
39
|
-
"@smithy/middleware-content-length": "^4.2.
|
|
40
|
-
"@smithy/middleware-endpoint": "^4.3.
|
|
41
|
-
"@smithy/middleware-retry": "^4.4.
|
|
42
|
-
"@smithy/middleware-serde": "^4.2.
|
|
43
|
-
"@smithy/middleware-stack": "^4.2.
|
|
44
|
-
"@smithy/node-config-provider": "^4.3.
|
|
45
|
-
"@smithy/node-http-handler": "^4.4.
|
|
46
|
-
"@smithy/protocol-http": "^5.3.
|
|
47
|
-
"@smithy/smithy-client": "^4.9.
|
|
48
|
-
"@smithy/types": "^4.
|
|
49
|
-
"@smithy/url-parser": "^4.2.
|
|
23
|
+
"@aws-sdk/core": "3.930.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.930.0",
|
|
25
|
+
"@aws-sdk/middleware-host-header": "3.930.0",
|
|
26
|
+
"@aws-sdk/middleware-logger": "3.930.0",
|
|
27
|
+
"@aws-sdk/middleware-recursion-detection": "3.930.0",
|
|
28
|
+
"@aws-sdk/middleware-user-agent": "3.930.0",
|
|
29
|
+
"@aws-sdk/region-config-resolver": "3.930.0",
|
|
30
|
+
"@aws-sdk/types": "3.930.0",
|
|
31
|
+
"@aws-sdk/util-endpoints": "3.930.0",
|
|
32
|
+
"@aws-sdk/util-user-agent-browser": "3.930.0",
|
|
33
|
+
"@aws-sdk/util-user-agent-node": "3.930.0",
|
|
34
|
+
"@smithy/config-resolver": "^4.4.3",
|
|
35
|
+
"@smithy/core": "^3.18.2",
|
|
36
|
+
"@smithy/fetch-http-handler": "^5.3.6",
|
|
37
|
+
"@smithy/hash-node": "^4.2.5",
|
|
38
|
+
"@smithy/invalid-dependency": "^4.2.5",
|
|
39
|
+
"@smithy/middleware-content-length": "^4.2.5",
|
|
40
|
+
"@smithy/middleware-endpoint": "^4.3.9",
|
|
41
|
+
"@smithy/middleware-retry": "^4.4.9",
|
|
42
|
+
"@smithy/middleware-serde": "^4.2.5",
|
|
43
|
+
"@smithy/middleware-stack": "^4.2.5",
|
|
44
|
+
"@smithy/node-config-provider": "^4.3.5",
|
|
45
|
+
"@smithy/node-http-handler": "^4.4.5",
|
|
46
|
+
"@smithy/protocol-http": "^5.3.5",
|
|
47
|
+
"@smithy/smithy-client": "^4.9.5",
|
|
48
|
+
"@smithy/types": "^4.9.0",
|
|
49
|
+
"@smithy/url-parser": "^4.2.5",
|
|
50
50
|
"@smithy/util-base64": "^4.3.0",
|
|
51
51
|
"@smithy/util-body-length-browser": "^4.2.0",
|
|
52
52
|
"@smithy/util-body-length-node": "^4.2.1",
|
|
53
|
-
"@smithy/util-defaults-mode-browser": "^4.3.
|
|
54
|
-
"@smithy/util-defaults-mode-node": "^4.2.
|
|
55
|
-
"@smithy/util-endpoints": "^3.2.
|
|
56
|
-
"@smithy/util-middleware": "^4.2.
|
|
57
|
-
"@smithy/util-retry": "^4.2.
|
|
58
|
-
"@smithy/util-stream": "^4.5.
|
|
53
|
+
"@smithy/util-defaults-mode-browser": "^4.3.8",
|
|
54
|
+
"@smithy/util-defaults-mode-node": "^4.2.11",
|
|
55
|
+
"@smithy/util-endpoints": "^3.2.5",
|
|
56
|
+
"@smithy/util-middleware": "^4.2.5",
|
|
57
|
+
"@smithy/util-retry": "^4.2.5",
|
|
58
|
+
"@smithy/util-stream": "^4.5.6",
|
|
59
59
|
"@smithy/util-utf8": "^4.2.0",
|
|
60
|
-
"@smithy/uuid": "^1.1.0",
|
|
61
60
|
"tslib": "^2.6.2"
|
|
62
61
|
},
|
|
63
62
|
"devDependencies": {
|
|
@@ -1,382 +0,0 @@
|
|
|
1
|
-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
2
|
-
import { requestBuilder as rb } from "@smithy/core";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, isSerializableHeaderValue, map, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { v4 as generateIdempotencyToken } from "@smithy/uuid";
|
|
5
|
-
import { EBSServiceException as __BaseException } from "../models/EBSServiceException";
|
|
6
|
-
import { AccessDeniedException, ConcurrentLimitExceededException, ConflictException, InternalServerException, RequestThrottledException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
|
|
7
|
-
export const se_CompleteSnapshotCommand = async (input, context) => {
|
|
8
|
-
const b = rb(input, context);
|
|
9
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
10
|
-
[_xac]: [() => isSerializableHeaderValue(input[_CBC]), () => input[_CBC].toString()],
|
|
11
|
-
[_xac_]: input[_C],
|
|
12
|
-
[_xaca]: input[_CA],
|
|
13
|
-
[_xacam]: input[_CAM],
|
|
14
|
-
});
|
|
15
|
-
b.bp("/snapshots/completion/{SnapshotId}");
|
|
16
|
-
b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);
|
|
17
|
-
let body;
|
|
18
|
-
b.m("POST").h(headers).b(body);
|
|
19
|
-
return b.build();
|
|
20
|
-
};
|
|
21
|
-
export const se_GetSnapshotBlockCommand = async (input, context) => {
|
|
22
|
-
const b = rb(input, context);
|
|
23
|
-
const headers = {};
|
|
24
|
-
b.bp("/snapshots/{SnapshotId}/blocks/{BlockIndex}");
|
|
25
|
-
b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);
|
|
26
|
-
b.p("BlockIndex", () => input.BlockIndex.toString(), "{BlockIndex}", false);
|
|
27
|
-
const query = map({
|
|
28
|
-
[_bT]: [, __expectNonNull(input[_BT], `BlockToken`)],
|
|
29
|
-
});
|
|
30
|
-
let body;
|
|
31
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
32
|
-
return b.build();
|
|
33
|
-
};
|
|
34
|
-
export const se_ListChangedBlocksCommand = async (input, context) => {
|
|
35
|
-
const b = rb(input, context);
|
|
36
|
-
const headers = {};
|
|
37
|
-
b.bp("/snapshots/{SecondSnapshotId}/changedblocks");
|
|
38
|
-
b.p("SecondSnapshotId", () => input.SecondSnapshotId, "{SecondSnapshotId}", false);
|
|
39
|
-
const query = map({
|
|
40
|
-
[_fSI]: [, input[_FSI]],
|
|
41
|
-
[_pT]: [, input[_NT]],
|
|
42
|
-
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
43
|
-
[_sBI]: [() => input.StartingBlockIndex !== void 0, () => input[_SBI].toString()],
|
|
44
|
-
});
|
|
45
|
-
let body;
|
|
46
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
47
|
-
return b.build();
|
|
48
|
-
};
|
|
49
|
-
export const se_ListSnapshotBlocksCommand = async (input, context) => {
|
|
50
|
-
const b = rb(input, context);
|
|
51
|
-
const headers = {};
|
|
52
|
-
b.bp("/snapshots/{SnapshotId}/blocks");
|
|
53
|
-
b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);
|
|
54
|
-
const query = map({
|
|
55
|
-
[_pT]: [, input[_NT]],
|
|
56
|
-
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
57
|
-
[_sBI]: [() => input.StartingBlockIndex !== void 0, () => input[_SBI].toString()],
|
|
58
|
-
});
|
|
59
|
-
let body;
|
|
60
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
61
|
-
return b.build();
|
|
62
|
-
};
|
|
63
|
-
export const se_PutSnapshotBlockCommand = async (input, context) => {
|
|
64
|
-
const b = rb(input, context);
|
|
65
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
66
|
-
"x-amz-content-sha256": "UNSIGNED-PAYLOAD",
|
|
67
|
-
"content-type": "application/octet-stream",
|
|
68
|
-
[_xadl]: [() => isSerializableHeaderValue(input[_DL]), () => input[_DL].toString()],
|
|
69
|
-
[_xap]: [() => isSerializableHeaderValue(input[_P]), () => input[_P].toString()],
|
|
70
|
-
[_xac_]: input[_C],
|
|
71
|
-
[_xaca]: input[_CA],
|
|
72
|
-
});
|
|
73
|
-
b.bp("/snapshots/{SnapshotId}/blocks/{BlockIndex}");
|
|
74
|
-
b.p("SnapshotId", () => input.SnapshotId, "{SnapshotId}", false);
|
|
75
|
-
b.p("BlockIndex", () => input.BlockIndex.toString(), "{BlockIndex}", false);
|
|
76
|
-
let body;
|
|
77
|
-
if (input.BlockData !== undefined) {
|
|
78
|
-
body = input.BlockData;
|
|
79
|
-
}
|
|
80
|
-
b.m("PUT").h(headers).b(body);
|
|
81
|
-
return b.build();
|
|
82
|
-
};
|
|
83
|
-
export const se_StartSnapshotCommand = async (input, context) => {
|
|
84
|
-
const b = rb(input, context);
|
|
85
|
-
const headers = {
|
|
86
|
-
"content-type": "application/json",
|
|
87
|
-
};
|
|
88
|
-
b.bp("/snapshots");
|
|
89
|
-
let body;
|
|
90
|
-
body = JSON.stringify(take(input, {
|
|
91
|
-
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
92
|
-
Description: [],
|
|
93
|
-
Encrypted: [],
|
|
94
|
-
KmsKeyArn: [],
|
|
95
|
-
ParentSnapshotId: [],
|
|
96
|
-
Tags: (_) => _json(_),
|
|
97
|
-
Timeout: [],
|
|
98
|
-
VolumeSize: [],
|
|
99
|
-
}));
|
|
100
|
-
b.m("POST").h(headers).b(body);
|
|
101
|
-
return b.build();
|
|
102
|
-
};
|
|
103
|
-
export const de_CompleteSnapshotCommand = async (output, context) => {
|
|
104
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
105
|
-
return de_CommandError(output, context);
|
|
106
|
-
}
|
|
107
|
-
const contents = map({
|
|
108
|
-
$metadata: deserializeMetadata(output),
|
|
109
|
-
});
|
|
110
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
111
|
-
const doc = take(data, {
|
|
112
|
-
Status: __expectString,
|
|
113
|
-
});
|
|
114
|
-
Object.assign(contents, doc);
|
|
115
|
-
return contents;
|
|
116
|
-
};
|
|
117
|
-
export const de_GetSnapshotBlockCommand = async (output, context) => {
|
|
118
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
119
|
-
return de_CommandError(output, context);
|
|
120
|
-
}
|
|
121
|
-
const contents = map({
|
|
122
|
-
$metadata: deserializeMetadata(output),
|
|
123
|
-
[_DL]: [() => void 0 !== output.headers[_xadl], () => __strictParseInt32(output.headers[_xadl])],
|
|
124
|
-
[_C]: [, output.headers[_xac_]],
|
|
125
|
-
[_CA]: [, output.headers[_xaca]],
|
|
126
|
-
});
|
|
127
|
-
const data = output.body;
|
|
128
|
-
context.sdkStreamMixin(data);
|
|
129
|
-
contents.BlockData = data;
|
|
130
|
-
return contents;
|
|
131
|
-
};
|
|
132
|
-
export const de_ListChangedBlocksCommand = async (output, context) => {
|
|
133
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
134
|
-
return de_CommandError(output, context);
|
|
135
|
-
}
|
|
136
|
-
const contents = map({
|
|
137
|
-
$metadata: deserializeMetadata(output),
|
|
138
|
-
});
|
|
139
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
140
|
-
const doc = take(data, {
|
|
141
|
-
BlockSize: __expectInt32,
|
|
142
|
-
ChangedBlocks: _json,
|
|
143
|
-
ExpiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
144
|
-
NextToken: __expectString,
|
|
145
|
-
VolumeSize: __expectLong,
|
|
146
|
-
});
|
|
147
|
-
Object.assign(contents, doc);
|
|
148
|
-
return contents;
|
|
149
|
-
};
|
|
150
|
-
export const de_ListSnapshotBlocksCommand = async (output, context) => {
|
|
151
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
152
|
-
return de_CommandError(output, context);
|
|
153
|
-
}
|
|
154
|
-
const contents = map({
|
|
155
|
-
$metadata: deserializeMetadata(output),
|
|
156
|
-
});
|
|
157
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
158
|
-
const doc = take(data, {
|
|
159
|
-
BlockSize: __expectInt32,
|
|
160
|
-
Blocks: _json,
|
|
161
|
-
ExpiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
162
|
-
NextToken: __expectString,
|
|
163
|
-
VolumeSize: __expectLong,
|
|
164
|
-
});
|
|
165
|
-
Object.assign(contents, doc);
|
|
166
|
-
return contents;
|
|
167
|
-
};
|
|
168
|
-
export const de_PutSnapshotBlockCommand = async (output, context) => {
|
|
169
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
170
|
-
return de_CommandError(output, context);
|
|
171
|
-
}
|
|
172
|
-
const contents = map({
|
|
173
|
-
$metadata: deserializeMetadata(output),
|
|
174
|
-
[_C]: [, output.headers[_xac_]],
|
|
175
|
-
[_CA]: [, output.headers[_xaca]],
|
|
176
|
-
});
|
|
177
|
-
await collectBody(output.body, context);
|
|
178
|
-
return contents;
|
|
179
|
-
};
|
|
180
|
-
export const de_StartSnapshotCommand = async (output, context) => {
|
|
181
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
182
|
-
return de_CommandError(output, context);
|
|
183
|
-
}
|
|
184
|
-
const contents = map({
|
|
185
|
-
$metadata: deserializeMetadata(output),
|
|
186
|
-
});
|
|
187
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
188
|
-
const doc = take(data, {
|
|
189
|
-
BlockSize: __expectInt32,
|
|
190
|
-
Description: __expectString,
|
|
191
|
-
KmsKeyArn: __expectString,
|
|
192
|
-
OwnerId: __expectString,
|
|
193
|
-
ParentSnapshotId: __expectString,
|
|
194
|
-
SnapshotId: __expectString,
|
|
195
|
-
SseType: __expectString,
|
|
196
|
-
StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
197
|
-
Status: __expectString,
|
|
198
|
-
Tags: _json,
|
|
199
|
-
VolumeSize: __expectLong,
|
|
200
|
-
});
|
|
201
|
-
Object.assign(contents, doc);
|
|
202
|
-
return contents;
|
|
203
|
-
};
|
|
204
|
-
const de_CommandError = async (output, context) => {
|
|
205
|
-
const parsedOutput = {
|
|
206
|
-
...output,
|
|
207
|
-
body: await parseErrorBody(output.body, context),
|
|
208
|
-
};
|
|
209
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
210
|
-
switch (errorCode) {
|
|
211
|
-
case "AccessDeniedException":
|
|
212
|
-
case "com.amazonaws.ebs#AccessDeniedException":
|
|
213
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
214
|
-
case "InternalServerException":
|
|
215
|
-
case "com.amazonaws.ebs#InternalServerException":
|
|
216
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
217
|
-
case "RequestThrottledException":
|
|
218
|
-
case "com.amazonaws.ebs#RequestThrottledException":
|
|
219
|
-
throw await de_RequestThrottledExceptionRes(parsedOutput, context);
|
|
220
|
-
case "ResourceNotFoundException":
|
|
221
|
-
case "com.amazonaws.ebs#ResourceNotFoundException":
|
|
222
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
223
|
-
case "ServiceQuotaExceededException":
|
|
224
|
-
case "com.amazonaws.ebs#ServiceQuotaExceededException":
|
|
225
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
226
|
-
case "ValidationException":
|
|
227
|
-
case "com.amazonaws.ebs#ValidationException":
|
|
228
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
229
|
-
case "ConcurrentLimitExceededException":
|
|
230
|
-
case "com.amazonaws.ebs#ConcurrentLimitExceededException":
|
|
231
|
-
throw await de_ConcurrentLimitExceededExceptionRes(parsedOutput, context);
|
|
232
|
-
case "ConflictException":
|
|
233
|
-
case "com.amazonaws.ebs#ConflictException":
|
|
234
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
235
|
-
default:
|
|
236
|
-
const parsedBody = parsedOutput.body;
|
|
237
|
-
return throwDefaultError({
|
|
238
|
-
output,
|
|
239
|
-
parsedBody,
|
|
240
|
-
errorCode,
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
245
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
246
|
-
const contents = map({});
|
|
247
|
-
const data = parsedOutput.body;
|
|
248
|
-
const doc = take(data, {
|
|
249
|
-
Message: __expectString,
|
|
250
|
-
Reason: __expectString,
|
|
251
|
-
});
|
|
252
|
-
Object.assign(contents, doc);
|
|
253
|
-
const exception = new AccessDeniedException({
|
|
254
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
255
|
-
...contents,
|
|
256
|
-
});
|
|
257
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
258
|
-
};
|
|
259
|
-
const de_ConcurrentLimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
260
|
-
const contents = map({});
|
|
261
|
-
const data = parsedOutput.body;
|
|
262
|
-
const doc = take(data, {
|
|
263
|
-
Message: __expectString,
|
|
264
|
-
});
|
|
265
|
-
Object.assign(contents, doc);
|
|
266
|
-
const exception = new ConcurrentLimitExceededException({
|
|
267
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
268
|
-
...contents,
|
|
269
|
-
});
|
|
270
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
271
|
-
};
|
|
272
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
273
|
-
const contents = map({});
|
|
274
|
-
const data = parsedOutput.body;
|
|
275
|
-
const doc = take(data, {
|
|
276
|
-
Message: __expectString,
|
|
277
|
-
});
|
|
278
|
-
Object.assign(contents, doc);
|
|
279
|
-
const exception = new ConflictException({
|
|
280
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
281
|
-
...contents,
|
|
282
|
-
});
|
|
283
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
284
|
-
};
|
|
285
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
286
|
-
const contents = map({});
|
|
287
|
-
const data = parsedOutput.body;
|
|
288
|
-
const doc = take(data, {
|
|
289
|
-
Message: __expectString,
|
|
290
|
-
});
|
|
291
|
-
Object.assign(contents, doc);
|
|
292
|
-
const exception = new InternalServerException({
|
|
293
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
294
|
-
...contents,
|
|
295
|
-
});
|
|
296
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
297
|
-
};
|
|
298
|
-
const de_RequestThrottledExceptionRes = async (parsedOutput, context) => {
|
|
299
|
-
const contents = map({});
|
|
300
|
-
const data = parsedOutput.body;
|
|
301
|
-
const doc = take(data, {
|
|
302
|
-
Message: __expectString,
|
|
303
|
-
Reason: __expectString,
|
|
304
|
-
});
|
|
305
|
-
Object.assign(contents, doc);
|
|
306
|
-
const exception = new RequestThrottledException({
|
|
307
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
308
|
-
...contents,
|
|
309
|
-
});
|
|
310
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
311
|
-
};
|
|
312
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
313
|
-
const contents = map({});
|
|
314
|
-
const data = parsedOutput.body;
|
|
315
|
-
const doc = take(data, {
|
|
316
|
-
Message: __expectString,
|
|
317
|
-
Reason: __expectString,
|
|
318
|
-
});
|
|
319
|
-
Object.assign(contents, doc);
|
|
320
|
-
const exception = new ResourceNotFoundException({
|
|
321
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
322
|
-
...contents,
|
|
323
|
-
});
|
|
324
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
325
|
-
};
|
|
326
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
327
|
-
const contents = map({});
|
|
328
|
-
const data = parsedOutput.body;
|
|
329
|
-
const doc = take(data, {
|
|
330
|
-
Message: __expectString,
|
|
331
|
-
Reason: __expectString,
|
|
332
|
-
});
|
|
333
|
-
Object.assign(contents, doc);
|
|
334
|
-
const exception = new ServiceQuotaExceededException({
|
|
335
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
336
|
-
...contents,
|
|
337
|
-
});
|
|
338
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
339
|
-
};
|
|
340
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
341
|
-
const contents = map({});
|
|
342
|
-
const data = parsedOutput.body;
|
|
343
|
-
const doc = take(data, {
|
|
344
|
-
Message: __expectString,
|
|
345
|
-
Reason: __expectString,
|
|
346
|
-
});
|
|
347
|
-
Object.assign(contents, doc);
|
|
348
|
-
const exception = new ValidationException({
|
|
349
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
350
|
-
...contents,
|
|
351
|
-
});
|
|
352
|
-
return __decorateServiceException(exception, parsedOutput.body);
|
|
353
|
-
};
|
|
354
|
-
const deserializeMetadata = (output) => ({
|
|
355
|
-
httpStatusCode: output.statusCode,
|
|
356
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
357
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
358
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
359
|
-
});
|
|
360
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
361
|
-
const _BT = "BlockToken";
|
|
362
|
-
const _C = "Checksum";
|
|
363
|
-
const _CA = "ChecksumAlgorithm";
|
|
364
|
-
const _CAM = "ChecksumAggregationMethod";
|
|
365
|
-
const _CBC = "ChangedBlocksCount";
|
|
366
|
-
const _DL = "DataLength";
|
|
367
|
-
const _FSI = "FirstSnapshotId";
|
|
368
|
-
const _MR = "MaxResults";
|
|
369
|
-
const _NT = "NextToken";
|
|
370
|
-
const _P = "Progress";
|
|
371
|
-
const _SBI = "StartingBlockIndex";
|
|
372
|
-
const _bT = "blockToken";
|
|
373
|
-
const _fSI = "firstSnapshotId";
|
|
374
|
-
const _mR = "maxResults";
|
|
375
|
-
const _pT = "pageToken";
|
|
376
|
-
const _sBI = "startingBlockIndex";
|
|
377
|
-
const _xac = "x-amz-changedblockscount";
|
|
378
|
-
const _xac_ = "x-amz-checksum";
|
|
379
|
-
const _xaca = "x-amz-checksum-algorithm";
|
|
380
|
-
const _xacam = "x-amz-checksum-aggregation-method";
|
|
381
|
-
const _xadl = "x-amz-data-length";
|
|
382
|
-
const _xap = "x-amz-progress";
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
|
|
2
|
-
import { SdkStreamSerdeContext as __SdkStreamSerdeContext, SerdeContext as __SerdeContext } from "@smithy/types";
|
|
3
|
-
import { CompleteSnapshotCommandInput, CompleteSnapshotCommandOutput } from "../commands/CompleteSnapshotCommand";
|
|
4
|
-
import { GetSnapshotBlockCommandInput, GetSnapshotBlockCommandOutput } from "../commands/GetSnapshotBlockCommand";
|
|
5
|
-
import { ListChangedBlocksCommandInput, ListChangedBlocksCommandOutput } from "../commands/ListChangedBlocksCommand";
|
|
6
|
-
import { ListSnapshotBlocksCommandInput, ListSnapshotBlocksCommandOutput } from "../commands/ListSnapshotBlocksCommand";
|
|
7
|
-
import { PutSnapshotBlockCommandInput, PutSnapshotBlockCommandOutput } from "../commands/PutSnapshotBlockCommand";
|
|
8
|
-
import { StartSnapshotCommandInput, StartSnapshotCommandOutput } from "../commands/StartSnapshotCommand";
|
|
9
|
-
/**
|
|
10
|
-
* serializeAws_restJson1CompleteSnapshotCommand
|
|
11
|
-
*/
|
|
12
|
-
export declare const se_CompleteSnapshotCommand: (input: CompleteSnapshotCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
13
|
-
/**
|
|
14
|
-
* serializeAws_restJson1GetSnapshotBlockCommand
|
|
15
|
-
*/
|
|
16
|
-
export declare const se_GetSnapshotBlockCommand: (input: GetSnapshotBlockCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
17
|
-
/**
|
|
18
|
-
* serializeAws_restJson1ListChangedBlocksCommand
|
|
19
|
-
*/
|
|
20
|
-
export declare const se_ListChangedBlocksCommand: (input: ListChangedBlocksCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
21
|
-
/**
|
|
22
|
-
* serializeAws_restJson1ListSnapshotBlocksCommand
|
|
23
|
-
*/
|
|
24
|
-
export declare const se_ListSnapshotBlocksCommand: (input: ListSnapshotBlocksCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
25
|
-
/**
|
|
26
|
-
* serializeAws_restJson1PutSnapshotBlockCommand
|
|
27
|
-
*/
|
|
28
|
-
export declare const se_PutSnapshotBlockCommand: (input: PutSnapshotBlockCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
29
|
-
/**
|
|
30
|
-
* serializeAws_restJson1StartSnapshotCommand
|
|
31
|
-
*/
|
|
32
|
-
export declare const se_StartSnapshotCommand: (input: StartSnapshotCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
33
|
-
/**
|
|
34
|
-
* deserializeAws_restJson1CompleteSnapshotCommand
|
|
35
|
-
*/
|
|
36
|
-
export declare const de_CompleteSnapshotCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<CompleteSnapshotCommandOutput>;
|
|
37
|
-
/**
|
|
38
|
-
* deserializeAws_restJson1GetSnapshotBlockCommand
|
|
39
|
-
*/
|
|
40
|
-
export declare const de_GetSnapshotBlockCommand: (output: __HttpResponse, context: __SerdeContext & __SdkStreamSerdeContext) => Promise<GetSnapshotBlockCommandOutput>;
|
|
41
|
-
/**
|
|
42
|
-
* deserializeAws_restJson1ListChangedBlocksCommand
|
|
43
|
-
*/
|
|
44
|
-
export declare const de_ListChangedBlocksCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListChangedBlocksCommandOutput>;
|
|
45
|
-
/**
|
|
46
|
-
* deserializeAws_restJson1ListSnapshotBlocksCommand
|
|
47
|
-
*/
|
|
48
|
-
export declare const de_ListSnapshotBlocksCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<ListSnapshotBlocksCommandOutput>;
|
|
49
|
-
/**
|
|
50
|
-
* deserializeAws_restJson1PutSnapshotBlockCommand
|
|
51
|
-
*/
|
|
52
|
-
export declare const de_PutSnapshotBlockCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<PutSnapshotBlockCommandOutput>;
|
|
53
|
-
/**
|
|
54
|
-
* deserializeAws_restJson1StartSnapshotCommand
|
|
55
|
-
*/
|
|
56
|
-
export declare const de_StartSnapshotCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<StartSnapshotCommandOutput>;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HttpRequest as __HttpRequest,
|
|
3
|
-
HttpResponse as __HttpResponse,
|
|
4
|
-
} from "@smithy/protocol-http";
|
|
5
|
-
import {
|
|
6
|
-
SdkStreamSerdeContext as __SdkStreamSerdeContext,
|
|
7
|
-
SerdeContext as __SerdeContext,
|
|
8
|
-
} from "@smithy/types";
|
|
9
|
-
import {
|
|
10
|
-
CompleteSnapshotCommandInput,
|
|
11
|
-
CompleteSnapshotCommandOutput,
|
|
12
|
-
} from "../commands/CompleteSnapshotCommand";
|
|
13
|
-
import {
|
|
14
|
-
GetSnapshotBlockCommandInput,
|
|
15
|
-
GetSnapshotBlockCommandOutput,
|
|
16
|
-
} from "../commands/GetSnapshotBlockCommand";
|
|
17
|
-
import {
|
|
18
|
-
ListChangedBlocksCommandInput,
|
|
19
|
-
ListChangedBlocksCommandOutput,
|
|
20
|
-
} from "../commands/ListChangedBlocksCommand";
|
|
21
|
-
import {
|
|
22
|
-
ListSnapshotBlocksCommandInput,
|
|
23
|
-
ListSnapshotBlocksCommandOutput,
|
|
24
|
-
} from "../commands/ListSnapshotBlocksCommand";
|
|
25
|
-
import {
|
|
26
|
-
PutSnapshotBlockCommandInput,
|
|
27
|
-
PutSnapshotBlockCommandOutput,
|
|
28
|
-
} from "../commands/PutSnapshotBlockCommand";
|
|
29
|
-
import {
|
|
30
|
-
StartSnapshotCommandInput,
|
|
31
|
-
StartSnapshotCommandOutput,
|
|
32
|
-
} from "../commands/StartSnapshotCommand";
|
|
33
|
-
export declare const se_CompleteSnapshotCommand: (
|
|
34
|
-
input: CompleteSnapshotCommandInput,
|
|
35
|
-
context: __SerdeContext
|
|
36
|
-
) => Promise<__HttpRequest>;
|
|
37
|
-
export declare const se_GetSnapshotBlockCommand: (
|
|
38
|
-
input: GetSnapshotBlockCommandInput,
|
|
39
|
-
context: __SerdeContext
|
|
40
|
-
) => Promise<__HttpRequest>;
|
|
41
|
-
export declare const se_ListChangedBlocksCommand: (
|
|
42
|
-
input: ListChangedBlocksCommandInput,
|
|
43
|
-
context: __SerdeContext
|
|
44
|
-
) => Promise<__HttpRequest>;
|
|
45
|
-
export declare const se_ListSnapshotBlocksCommand: (
|
|
46
|
-
input: ListSnapshotBlocksCommandInput,
|
|
47
|
-
context: __SerdeContext
|
|
48
|
-
) => Promise<__HttpRequest>;
|
|
49
|
-
export declare const se_PutSnapshotBlockCommand: (
|
|
50
|
-
input: PutSnapshotBlockCommandInput,
|
|
51
|
-
context: __SerdeContext
|
|
52
|
-
) => Promise<__HttpRequest>;
|
|
53
|
-
export declare const se_StartSnapshotCommand: (
|
|
54
|
-
input: StartSnapshotCommandInput,
|
|
55
|
-
context: __SerdeContext
|
|
56
|
-
) => Promise<__HttpRequest>;
|
|
57
|
-
export declare const de_CompleteSnapshotCommand: (
|
|
58
|
-
output: __HttpResponse,
|
|
59
|
-
context: __SerdeContext
|
|
60
|
-
) => Promise<CompleteSnapshotCommandOutput>;
|
|
61
|
-
export declare const de_GetSnapshotBlockCommand: (
|
|
62
|
-
output: __HttpResponse,
|
|
63
|
-
context: __SerdeContext & __SdkStreamSerdeContext
|
|
64
|
-
) => Promise<GetSnapshotBlockCommandOutput>;
|
|
65
|
-
export declare const de_ListChangedBlocksCommand: (
|
|
66
|
-
output: __HttpResponse,
|
|
67
|
-
context: __SerdeContext
|
|
68
|
-
) => Promise<ListChangedBlocksCommandOutput>;
|
|
69
|
-
export declare const de_ListSnapshotBlocksCommand: (
|
|
70
|
-
output: __HttpResponse,
|
|
71
|
-
context: __SerdeContext
|
|
72
|
-
) => Promise<ListSnapshotBlocksCommandOutput>;
|
|
73
|
-
export declare const de_PutSnapshotBlockCommand: (
|
|
74
|
-
output: __HttpResponse,
|
|
75
|
-
context: __SerdeContext
|
|
76
|
-
) => Promise<PutSnapshotBlockCommandOutput>;
|
|
77
|
-
export declare const de_StartSnapshotCommand: (
|
|
78
|
-
output: __HttpResponse,
|
|
79
|
-
context: __SerdeContext
|
|
80
|
-
) => Promise<StartSnapshotCommandOutput>;
|