@aws-sdk/client-glacier 3.489.0 → 3.495.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/Glacier.js +1 -77
- package/dist-cjs/GlacierClient.js +1 -45
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +1 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
- package/dist-cjs/commands/AbortMultipartUploadCommand.js +1 -28
- package/dist-cjs/commands/AbortVaultLockCommand.js +1 -28
- package/dist-cjs/commands/AddTagsToVaultCommand.js +1 -28
- package/dist-cjs/commands/CompleteMultipartUploadCommand.js +1 -28
- package/dist-cjs/commands/CompleteVaultLockCommand.js +1 -28
- package/dist-cjs/commands/CreateVaultCommand.js +1 -28
- package/dist-cjs/commands/DeleteArchiveCommand.js +1 -28
- package/dist-cjs/commands/DeleteVaultAccessPolicyCommand.js +1 -28
- package/dist-cjs/commands/DeleteVaultCommand.js +1 -28
- package/dist-cjs/commands/DeleteVaultNotificationsCommand.js +1 -28
- package/dist-cjs/commands/DescribeJobCommand.js +1 -28
- package/dist-cjs/commands/DescribeVaultCommand.js +1 -28
- package/dist-cjs/commands/GetDataRetrievalPolicyCommand.js +1 -28
- package/dist-cjs/commands/GetJobOutputCommand.js +1 -29
- package/dist-cjs/commands/GetVaultAccessPolicyCommand.js +1 -28
- package/dist-cjs/commands/GetVaultLockCommand.js +1 -28
- package/dist-cjs/commands/GetVaultNotificationsCommand.js +1 -28
- package/dist-cjs/commands/InitiateJobCommand.js +1 -28
- package/dist-cjs/commands/InitiateMultipartUploadCommand.js +1 -28
- package/dist-cjs/commands/InitiateVaultLockCommand.js +1 -28
- package/dist-cjs/commands/ListJobsCommand.js +1 -28
- package/dist-cjs/commands/ListMultipartUploadsCommand.js +1 -28
- package/dist-cjs/commands/ListPartsCommand.js +1 -28
- package/dist-cjs/commands/ListProvisionedCapacityCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForVaultCommand.js +1 -28
- package/dist-cjs/commands/ListVaultsCommand.js +1 -28
- package/dist-cjs/commands/PurchaseProvisionedCapacityCommand.js +1 -28
- package/dist-cjs/commands/RemoveTagsFromVaultCommand.js +1 -28
- package/dist-cjs/commands/SetDataRetrievalPolicyCommand.js +1 -28
- package/dist-cjs/commands/SetVaultAccessPolicyCommand.js +1 -28
- package/dist-cjs/commands/SetVaultNotificationsCommand.js +1 -28
- package/dist-cjs/commands/UploadArchiveCommand.js +1 -29
- package/dist-cjs/commands/UploadMultipartPartCommand.js +1 -29
- package/dist-cjs/commands/index.js +1 -36
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +3220 -12
- package/dist-cjs/models/GlacierServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -188
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListJobsPaginator.js +1 -7
- package/dist-cjs/pagination/ListMultipartUploadsPaginator.js +1 -7
- package/dist-cjs/pagination/ListPartsPaginator.js +1 -7
- package/dist-cjs/pagination/ListVaultsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -8
- package/dist-cjs/protocols/Aws_restJson1.js +1 -2074
- package/dist-cjs/runtimeConfig.shared.js +10 -0
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/dist-cjs/waiters/index.js +1 -5
- package/dist-cjs/waiters/waitForVaultExists.js +1 -31
- package/dist-cjs/waiters/waitForVaultNotExists.js +1 -31
- package/dist-es/GlacierClient.js +17 -4
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
- package/dist-es/runtimeConfig.shared.js +10 -0
- package/dist-es/runtimeExtensions.js +3 -0
- package/dist-types/GlacierClient.d.ts +16 -14
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
- package/dist-types/extensionConfiguration.d.ts +2 -1
- package/dist-types/runtimeConfig.browser.d.ts +5 -3
- package/dist-types/runtimeConfig.d.ts +5 -3
- package/dist-types/runtimeConfig.native.d.ts +6 -4
- package/dist-types/runtimeConfig.shared.d.ts +2 -0
- package/dist-types/ts3.4/GlacierClient.d.ts +11 -9
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +5 -5
- package/dist-types/ts3.4/runtimeConfig.d.ts +5 -5
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +8 -8
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +2 -0
- package/package.json +45 -45
|
@@ -1,2074 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_GetVaultNotificationsCommand = exports.de_GetVaultLockCommand = exports.de_GetVaultAccessPolicyCommand = exports.de_GetJobOutputCommand = exports.de_GetDataRetrievalPolicyCommand = exports.de_DescribeVaultCommand = exports.de_DescribeJobCommand = exports.de_DeleteVaultNotificationsCommand = exports.de_DeleteVaultAccessPolicyCommand = exports.de_DeleteVaultCommand = exports.de_DeleteArchiveCommand = exports.de_CreateVaultCommand = exports.de_CompleteVaultLockCommand = exports.de_CompleteMultipartUploadCommand = exports.de_AddTagsToVaultCommand = exports.de_AbortVaultLockCommand = exports.de_AbortMultipartUploadCommand = exports.se_UploadMultipartPartCommand = exports.se_UploadArchiveCommand = exports.se_SetVaultNotificationsCommand = exports.se_SetVaultAccessPolicyCommand = exports.se_SetDataRetrievalPolicyCommand = exports.se_RemoveTagsFromVaultCommand = exports.se_PurchaseProvisionedCapacityCommand = exports.se_ListVaultsCommand = exports.se_ListTagsForVaultCommand = exports.se_ListProvisionedCapacityCommand = exports.se_ListPartsCommand = exports.se_ListMultipartUploadsCommand = exports.se_ListJobsCommand = exports.se_InitiateVaultLockCommand = exports.se_InitiateMultipartUploadCommand = exports.se_InitiateJobCommand = exports.se_GetVaultNotificationsCommand = exports.se_GetVaultLockCommand = exports.se_GetVaultAccessPolicyCommand = exports.se_GetJobOutputCommand = exports.se_GetDataRetrievalPolicyCommand = exports.se_DescribeVaultCommand = exports.se_DescribeJobCommand = exports.se_DeleteVaultNotificationsCommand = exports.se_DeleteVaultAccessPolicyCommand = exports.se_DeleteVaultCommand = exports.se_DeleteArchiveCommand = exports.se_CreateVaultCommand = exports.se_CompleteVaultLockCommand = exports.se_CompleteMultipartUploadCommand = exports.se_AddTagsToVaultCommand = exports.se_AbortVaultLockCommand = exports.se_AbortMultipartUploadCommand = void 0;
|
|
4
|
-
exports.de_UploadMultipartPartCommand = exports.de_UploadArchiveCommand = exports.de_SetVaultNotificationsCommand = exports.de_SetVaultAccessPolicyCommand = exports.de_SetDataRetrievalPolicyCommand = exports.de_RemoveTagsFromVaultCommand = exports.de_PurchaseProvisionedCapacityCommand = exports.de_ListVaultsCommand = exports.de_ListTagsForVaultCommand = exports.de_ListProvisionedCapacityCommand = exports.de_ListPartsCommand = exports.de_ListMultipartUploadsCommand = exports.de_ListJobsCommand = exports.de_InitiateVaultLockCommand = exports.de_InitiateMultipartUploadCommand = exports.de_InitiateJobCommand = void 0;
|
|
5
|
-
const core_1 = require("@smithy/core");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const GlacierServiceException_1 = require("../models/GlacierServiceException");
|
|
8
|
-
const models_0_1 = require("../models/models_0");
|
|
9
|
-
const se_AbortMultipartUploadCommand = async (input, context) => {
|
|
10
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
11
|
-
const headers = {};
|
|
12
|
-
b.bp("/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}");
|
|
13
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
14
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
15
|
-
b.p("uploadId", () => input.uploadId, "{uploadId}", false);
|
|
16
|
-
let body;
|
|
17
|
-
b.m("DELETE").h(headers).b(body);
|
|
18
|
-
return b.build();
|
|
19
|
-
};
|
|
20
|
-
exports.se_AbortMultipartUploadCommand = se_AbortMultipartUploadCommand;
|
|
21
|
-
const se_AbortVaultLockCommand = async (input, context) => {
|
|
22
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
23
|
-
const headers = {};
|
|
24
|
-
b.bp("/{accountId}/vaults/{vaultName}/lock-policy");
|
|
25
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
26
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
27
|
-
let body;
|
|
28
|
-
b.m("DELETE").h(headers).b(body);
|
|
29
|
-
return b.build();
|
|
30
|
-
};
|
|
31
|
-
exports.se_AbortVaultLockCommand = se_AbortVaultLockCommand;
|
|
32
|
-
const se_AddTagsToVaultCommand = async (input, context) => {
|
|
33
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
34
|
-
const headers = {
|
|
35
|
-
"content-type": "application/json",
|
|
36
|
-
};
|
|
37
|
-
b.bp("/{accountId}/vaults/{vaultName}/tags");
|
|
38
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
39
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
40
|
-
const query = (0, smithy_client_1.map)({
|
|
41
|
-
[_o]: [, "add"],
|
|
42
|
-
});
|
|
43
|
-
let body;
|
|
44
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
45
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
46
|
-
}));
|
|
47
|
-
b.m("POST").h(headers).q(query).b(body);
|
|
48
|
-
return b.build();
|
|
49
|
-
};
|
|
50
|
-
exports.se_AddTagsToVaultCommand = se_AddTagsToVaultCommand;
|
|
51
|
-
const se_CompleteMultipartUploadCommand = async (input, context) => {
|
|
52
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
53
|
-
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
54
|
-
[_xaas]: input[_aS],
|
|
55
|
-
[_xasth]: input[_c],
|
|
56
|
-
});
|
|
57
|
-
b.bp("/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}");
|
|
58
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
59
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
60
|
-
b.p("uploadId", () => input.uploadId, "{uploadId}", false);
|
|
61
|
-
let body;
|
|
62
|
-
b.m("POST").h(headers).b(body);
|
|
63
|
-
return b.build();
|
|
64
|
-
};
|
|
65
|
-
exports.se_CompleteMultipartUploadCommand = se_CompleteMultipartUploadCommand;
|
|
66
|
-
const se_CompleteVaultLockCommand = async (input, context) => {
|
|
67
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
68
|
-
const headers = {};
|
|
69
|
-
b.bp("/{accountId}/vaults/{vaultName}/lock-policy/{lockId}");
|
|
70
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
71
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
72
|
-
b.p("lockId", () => input.lockId, "{lockId}", false);
|
|
73
|
-
let body;
|
|
74
|
-
b.m("POST").h(headers).b(body);
|
|
75
|
-
return b.build();
|
|
76
|
-
};
|
|
77
|
-
exports.se_CompleteVaultLockCommand = se_CompleteVaultLockCommand;
|
|
78
|
-
const se_CreateVaultCommand = async (input, context) => {
|
|
79
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
80
|
-
const headers = {};
|
|
81
|
-
b.bp("/{accountId}/vaults/{vaultName}");
|
|
82
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
83
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
84
|
-
let body;
|
|
85
|
-
b.m("PUT").h(headers).b(body);
|
|
86
|
-
return b.build();
|
|
87
|
-
};
|
|
88
|
-
exports.se_CreateVaultCommand = se_CreateVaultCommand;
|
|
89
|
-
const se_DeleteArchiveCommand = async (input, context) => {
|
|
90
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
91
|
-
const headers = {};
|
|
92
|
-
b.bp("/{accountId}/vaults/{vaultName}/archives/{archiveId}");
|
|
93
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
94
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
95
|
-
b.p("archiveId", () => input.archiveId, "{archiveId}", false);
|
|
96
|
-
let body;
|
|
97
|
-
b.m("DELETE").h(headers).b(body);
|
|
98
|
-
return b.build();
|
|
99
|
-
};
|
|
100
|
-
exports.se_DeleteArchiveCommand = se_DeleteArchiveCommand;
|
|
101
|
-
const se_DeleteVaultCommand = async (input, context) => {
|
|
102
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
103
|
-
const headers = {};
|
|
104
|
-
b.bp("/{accountId}/vaults/{vaultName}");
|
|
105
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
106
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
107
|
-
let body;
|
|
108
|
-
b.m("DELETE").h(headers).b(body);
|
|
109
|
-
return b.build();
|
|
110
|
-
};
|
|
111
|
-
exports.se_DeleteVaultCommand = se_DeleteVaultCommand;
|
|
112
|
-
const se_DeleteVaultAccessPolicyCommand = async (input, context) => {
|
|
113
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
114
|
-
const headers = {};
|
|
115
|
-
b.bp("/{accountId}/vaults/{vaultName}/access-policy");
|
|
116
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
117
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
118
|
-
let body;
|
|
119
|
-
b.m("DELETE").h(headers).b(body);
|
|
120
|
-
return b.build();
|
|
121
|
-
};
|
|
122
|
-
exports.se_DeleteVaultAccessPolicyCommand = se_DeleteVaultAccessPolicyCommand;
|
|
123
|
-
const se_DeleteVaultNotificationsCommand = async (input, context) => {
|
|
124
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
125
|
-
const headers = {};
|
|
126
|
-
b.bp("/{accountId}/vaults/{vaultName}/notification-configuration");
|
|
127
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
128
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
129
|
-
let body;
|
|
130
|
-
b.m("DELETE").h(headers).b(body);
|
|
131
|
-
return b.build();
|
|
132
|
-
};
|
|
133
|
-
exports.se_DeleteVaultNotificationsCommand = se_DeleteVaultNotificationsCommand;
|
|
134
|
-
const se_DescribeJobCommand = async (input, context) => {
|
|
135
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
136
|
-
const headers = {};
|
|
137
|
-
b.bp("/{accountId}/vaults/{vaultName}/jobs/{jobId}");
|
|
138
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
139
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
140
|
-
b.p("jobId", () => input.jobId, "{jobId}", false);
|
|
141
|
-
let body;
|
|
142
|
-
b.m("GET").h(headers).b(body);
|
|
143
|
-
return b.build();
|
|
144
|
-
};
|
|
145
|
-
exports.se_DescribeJobCommand = se_DescribeJobCommand;
|
|
146
|
-
const se_DescribeVaultCommand = async (input, context) => {
|
|
147
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
148
|
-
const headers = {};
|
|
149
|
-
b.bp("/{accountId}/vaults/{vaultName}");
|
|
150
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
151
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
152
|
-
let body;
|
|
153
|
-
b.m("GET").h(headers).b(body);
|
|
154
|
-
return b.build();
|
|
155
|
-
};
|
|
156
|
-
exports.se_DescribeVaultCommand = se_DescribeVaultCommand;
|
|
157
|
-
const se_GetDataRetrievalPolicyCommand = async (input, context) => {
|
|
158
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
159
|
-
const headers = {};
|
|
160
|
-
b.bp("/{accountId}/policies/data-retrieval");
|
|
161
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
162
|
-
let body;
|
|
163
|
-
b.m("GET").h(headers).b(body);
|
|
164
|
-
return b.build();
|
|
165
|
-
};
|
|
166
|
-
exports.se_GetDataRetrievalPolicyCommand = se_GetDataRetrievalPolicyCommand;
|
|
167
|
-
const se_GetJobOutputCommand = async (input, context) => {
|
|
168
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
169
|
-
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
170
|
-
[_r]: input[_r],
|
|
171
|
-
});
|
|
172
|
-
b.bp("/{accountId}/vaults/{vaultName}/jobs/{jobId}/output");
|
|
173
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
174
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
175
|
-
b.p("jobId", () => input.jobId, "{jobId}", false);
|
|
176
|
-
let body;
|
|
177
|
-
b.m("GET").h(headers).b(body);
|
|
178
|
-
return b.build();
|
|
179
|
-
};
|
|
180
|
-
exports.se_GetJobOutputCommand = se_GetJobOutputCommand;
|
|
181
|
-
const se_GetVaultAccessPolicyCommand = async (input, context) => {
|
|
182
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
183
|
-
const headers = {};
|
|
184
|
-
b.bp("/{accountId}/vaults/{vaultName}/access-policy");
|
|
185
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
186
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
187
|
-
let body;
|
|
188
|
-
b.m("GET").h(headers).b(body);
|
|
189
|
-
return b.build();
|
|
190
|
-
};
|
|
191
|
-
exports.se_GetVaultAccessPolicyCommand = se_GetVaultAccessPolicyCommand;
|
|
192
|
-
const se_GetVaultLockCommand = async (input, context) => {
|
|
193
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
194
|
-
const headers = {};
|
|
195
|
-
b.bp("/{accountId}/vaults/{vaultName}/lock-policy");
|
|
196
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
197
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
198
|
-
let body;
|
|
199
|
-
b.m("GET").h(headers).b(body);
|
|
200
|
-
return b.build();
|
|
201
|
-
};
|
|
202
|
-
exports.se_GetVaultLockCommand = se_GetVaultLockCommand;
|
|
203
|
-
const se_GetVaultNotificationsCommand = async (input, context) => {
|
|
204
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
205
|
-
const headers = {};
|
|
206
|
-
b.bp("/{accountId}/vaults/{vaultName}/notification-configuration");
|
|
207
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
208
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
209
|
-
let body;
|
|
210
|
-
b.m("GET").h(headers).b(body);
|
|
211
|
-
return b.build();
|
|
212
|
-
};
|
|
213
|
-
exports.se_GetVaultNotificationsCommand = se_GetVaultNotificationsCommand;
|
|
214
|
-
const se_InitiateJobCommand = async (input, context) => {
|
|
215
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
216
|
-
const headers = {
|
|
217
|
-
"content-type": "application/json",
|
|
218
|
-
};
|
|
219
|
-
b.bp("/{accountId}/vaults/{vaultName}/jobs");
|
|
220
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
221
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
222
|
-
let body;
|
|
223
|
-
if (input.jobParameters !== undefined) {
|
|
224
|
-
body = (0, smithy_client_1._json)(input.jobParameters);
|
|
225
|
-
}
|
|
226
|
-
if (body === undefined) {
|
|
227
|
-
body = {};
|
|
228
|
-
}
|
|
229
|
-
body = JSON.stringify(body);
|
|
230
|
-
b.m("POST").h(headers).b(body);
|
|
231
|
-
return b.build();
|
|
232
|
-
};
|
|
233
|
-
exports.se_InitiateJobCommand = se_InitiateJobCommand;
|
|
234
|
-
const se_InitiateMultipartUploadCommand = async (input, context) => {
|
|
235
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
236
|
-
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
237
|
-
[_xaad]: input[_aD],
|
|
238
|
-
[_xaps]: input[_pS],
|
|
239
|
-
});
|
|
240
|
-
b.bp("/{accountId}/vaults/{vaultName}/multipart-uploads");
|
|
241
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
242
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
243
|
-
let body;
|
|
244
|
-
b.m("POST").h(headers).b(body);
|
|
245
|
-
return b.build();
|
|
246
|
-
};
|
|
247
|
-
exports.se_InitiateMultipartUploadCommand = se_InitiateMultipartUploadCommand;
|
|
248
|
-
const se_InitiateVaultLockCommand = async (input, context) => {
|
|
249
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
250
|
-
const headers = {
|
|
251
|
-
"content-type": "application/json",
|
|
252
|
-
};
|
|
253
|
-
b.bp("/{accountId}/vaults/{vaultName}/lock-policy");
|
|
254
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
255
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
256
|
-
let body;
|
|
257
|
-
if (input.policy !== undefined) {
|
|
258
|
-
body = (0, smithy_client_1._json)(input.policy);
|
|
259
|
-
}
|
|
260
|
-
if (body === undefined) {
|
|
261
|
-
body = {};
|
|
262
|
-
}
|
|
263
|
-
body = JSON.stringify(body);
|
|
264
|
-
b.m("POST").h(headers).b(body);
|
|
265
|
-
return b.build();
|
|
266
|
-
};
|
|
267
|
-
exports.se_InitiateVaultLockCommand = se_InitiateVaultLockCommand;
|
|
268
|
-
const se_ListJobsCommand = async (input, context) => {
|
|
269
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
270
|
-
const headers = {};
|
|
271
|
-
b.bp("/{accountId}/vaults/{vaultName}/jobs");
|
|
272
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
273
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
274
|
-
const query = (0, smithy_client_1.map)({
|
|
275
|
-
[_l]: [() => input.limit !== void 0, () => input[_l].toString()],
|
|
276
|
-
[_m]: [, input[_m]],
|
|
277
|
-
[_s]: [, input[_s]],
|
|
278
|
-
[_co]: [, input[_co]],
|
|
279
|
-
});
|
|
280
|
-
let body;
|
|
281
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
282
|
-
return b.build();
|
|
283
|
-
};
|
|
284
|
-
exports.se_ListJobsCommand = se_ListJobsCommand;
|
|
285
|
-
const se_ListMultipartUploadsCommand = async (input, context) => {
|
|
286
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
287
|
-
const headers = {};
|
|
288
|
-
b.bp("/{accountId}/vaults/{vaultName}/multipart-uploads");
|
|
289
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
290
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
291
|
-
const query = (0, smithy_client_1.map)({
|
|
292
|
-
[_l]: [() => input.limit !== void 0, () => input[_l].toString()],
|
|
293
|
-
[_m]: [, input[_m]],
|
|
294
|
-
});
|
|
295
|
-
let body;
|
|
296
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
297
|
-
return b.build();
|
|
298
|
-
};
|
|
299
|
-
exports.se_ListMultipartUploadsCommand = se_ListMultipartUploadsCommand;
|
|
300
|
-
const se_ListPartsCommand = async (input, context) => {
|
|
301
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
302
|
-
const headers = {};
|
|
303
|
-
b.bp("/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}");
|
|
304
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
305
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
306
|
-
b.p("uploadId", () => input.uploadId, "{uploadId}", false);
|
|
307
|
-
const query = (0, smithy_client_1.map)({
|
|
308
|
-
[_m]: [, input[_m]],
|
|
309
|
-
[_l]: [() => input.limit !== void 0, () => input[_l].toString()],
|
|
310
|
-
});
|
|
311
|
-
let body;
|
|
312
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
313
|
-
return b.build();
|
|
314
|
-
};
|
|
315
|
-
exports.se_ListPartsCommand = se_ListPartsCommand;
|
|
316
|
-
const se_ListProvisionedCapacityCommand = async (input, context) => {
|
|
317
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
318
|
-
const headers = {};
|
|
319
|
-
b.bp("/{accountId}/provisioned-capacity");
|
|
320
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
321
|
-
let body;
|
|
322
|
-
b.m("GET").h(headers).b(body);
|
|
323
|
-
return b.build();
|
|
324
|
-
};
|
|
325
|
-
exports.se_ListProvisionedCapacityCommand = se_ListProvisionedCapacityCommand;
|
|
326
|
-
const se_ListTagsForVaultCommand = async (input, context) => {
|
|
327
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
328
|
-
const headers = {};
|
|
329
|
-
b.bp("/{accountId}/vaults/{vaultName}/tags");
|
|
330
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
331
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
332
|
-
let body;
|
|
333
|
-
b.m("GET").h(headers).b(body);
|
|
334
|
-
return b.build();
|
|
335
|
-
};
|
|
336
|
-
exports.se_ListTagsForVaultCommand = se_ListTagsForVaultCommand;
|
|
337
|
-
const se_ListVaultsCommand = async (input, context) => {
|
|
338
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
339
|
-
const headers = {};
|
|
340
|
-
b.bp("/{accountId}/vaults");
|
|
341
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
342
|
-
const query = (0, smithy_client_1.map)({
|
|
343
|
-
[_m]: [, input[_m]],
|
|
344
|
-
[_l]: [() => input.limit !== void 0, () => input[_l].toString()],
|
|
345
|
-
});
|
|
346
|
-
let body;
|
|
347
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
348
|
-
return b.build();
|
|
349
|
-
};
|
|
350
|
-
exports.se_ListVaultsCommand = se_ListVaultsCommand;
|
|
351
|
-
const se_PurchaseProvisionedCapacityCommand = async (input, context) => {
|
|
352
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
353
|
-
const headers = {};
|
|
354
|
-
b.bp("/{accountId}/provisioned-capacity");
|
|
355
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
356
|
-
let body;
|
|
357
|
-
b.m("POST").h(headers).b(body);
|
|
358
|
-
return b.build();
|
|
359
|
-
};
|
|
360
|
-
exports.se_PurchaseProvisionedCapacityCommand = se_PurchaseProvisionedCapacityCommand;
|
|
361
|
-
const se_RemoveTagsFromVaultCommand = async (input, context) => {
|
|
362
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
363
|
-
const headers = {
|
|
364
|
-
"content-type": "application/json",
|
|
365
|
-
};
|
|
366
|
-
b.bp("/{accountId}/vaults/{vaultName}/tags");
|
|
367
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
368
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
369
|
-
const query = (0, smithy_client_1.map)({
|
|
370
|
-
[_o]: [, "remove"],
|
|
371
|
-
});
|
|
372
|
-
let body;
|
|
373
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
374
|
-
TagKeys: (_) => (0, smithy_client_1._json)(_),
|
|
375
|
-
}));
|
|
376
|
-
b.m("POST").h(headers).q(query).b(body);
|
|
377
|
-
return b.build();
|
|
378
|
-
};
|
|
379
|
-
exports.se_RemoveTagsFromVaultCommand = se_RemoveTagsFromVaultCommand;
|
|
380
|
-
const se_SetDataRetrievalPolicyCommand = async (input, context) => {
|
|
381
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
382
|
-
const headers = {
|
|
383
|
-
"content-type": "application/json",
|
|
384
|
-
};
|
|
385
|
-
b.bp("/{accountId}/policies/data-retrieval");
|
|
386
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
387
|
-
let body;
|
|
388
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
389
|
-
Policy: (_) => (0, smithy_client_1._json)(_),
|
|
390
|
-
}));
|
|
391
|
-
b.m("PUT").h(headers).b(body);
|
|
392
|
-
return b.build();
|
|
393
|
-
};
|
|
394
|
-
exports.se_SetDataRetrievalPolicyCommand = se_SetDataRetrievalPolicyCommand;
|
|
395
|
-
const se_SetVaultAccessPolicyCommand = async (input, context) => {
|
|
396
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
397
|
-
const headers = {
|
|
398
|
-
"content-type": "application/json",
|
|
399
|
-
};
|
|
400
|
-
b.bp("/{accountId}/vaults/{vaultName}/access-policy");
|
|
401
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
402
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
403
|
-
let body;
|
|
404
|
-
if (input.policy !== undefined) {
|
|
405
|
-
body = (0, smithy_client_1._json)(input.policy);
|
|
406
|
-
}
|
|
407
|
-
if (body === undefined) {
|
|
408
|
-
body = {};
|
|
409
|
-
}
|
|
410
|
-
body = JSON.stringify(body);
|
|
411
|
-
b.m("PUT").h(headers).b(body);
|
|
412
|
-
return b.build();
|
|
413
|
-
};
|
|
414
|
-
exports.se_SetVaultAccessPolicyCommand = se_SetVaultAccessPolicyCommand;
|
|
415
|
-
const se_SetVaultNotificationsCommand = async (input, context) => {
|
|
416
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
417
|
-
const headers = {
|
|
418
|
-
"content-type": "application/json",
|
|
419
|
-
};
|
|
420
|
-
b.bp("/{accountId}/vaults/{vaultName}/notification-configuration");
|
|
421
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
422
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
423
|
-
let body;
|
|
424
|
-
if (input.vaultNotificationConfig !== undefined) {
|
|
425
|
-
body = (0, smithy_client_1._json)(input.vaultNotificationConfig);
|
|
426
|
-
}
|
|
427
|
-
if (body === undefined) {
|
|
428
|
-
body = {};
|
|
429
|
-
}
|
|
430
|
-
body = JSON.stringify(body);
|
|
431
|
-
b.m("PUT").h(headers).b(body);
|
|
432
|
-
return b.build();
|
|
433
|
-
};
|
|
434
|
-
exports.se_SetVaultNotificationsCommand = se_SetVaultNotificationsCommand;
|
|
435
|
-
const se_UploadArchiveCommand = async (input, context) => {
|
|
436
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
437
|
-
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
438
|
-
"content-type": "application/octet-stream",
|
|
439
|
-
[_xaad]: input[_aD],
|
|
440
|
-
[_xasth]: input[_c],
|
|
441
|
-
});
|
|
442
|
-
b.bp("/{accountId}/vaults/{vaultName}/archives");
|
|
443
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
444
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
445
|
-
let body;
|
|
446
|
-
if (input.body !== undefined) {
|
|
447
|
-
body = input.body;
|
|
448
|
-
}
|
|
449
|
-
b.m("POST").h(headers).b(body);
|
|
450
|
-
return b.build();
|
|
451
|
-
};
|
|
452
|
-
exports.se_UploadArchiveCommand = se_UploadArchiveCommand;
|
|
453
|
-
const se_UploadMultipartPartCommand = async (input, context) => {
|
|
454
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
455
|
-
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
456
|
-
"content-type": "application/octet-stream",
|
|
457
|
-
[_xasth]: input[_c],
|
|
458
|
-
[_cr]: input[_r],
|
|
459
|
-
});
|
|
460
|
-
b.bp("/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}");
|
|
461
|
-
b.p("accountId", () => input.accountId, "{accountId}", false);
|
|
462
|
-
b.p("vaultName", () => input.vaultName, "{vaultName}", false);
|
|
463
|
-
b.p("uploadId", () => input.uploadId, "{uploadId}", false);
|
|
464
|
-
let body;
|
|
465
|
-
if (input.body !== undefined) {
|
|
466
|
-
body = input.body;
|
|
467
|
-
}
|
|
468
|
-
b.m("PUT").h(headers).b(body);
|
|
469
|
-
return b.build();
|
|
470
|
-
};
|
|
471
|
-
exports.se_UploadMultipartPartCommand = se_UploadMultipartPartCommand;
|
|
472
|
-
const de_AbortMultipartUploadCommand = async (output, context) => {
|
|
473
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
474
|
-
return de_AbortMultipartUploadCommandError(output, context);
|
|
475
|
-
}
|
|
476
|
-
const contents = (0, smithy_client_1.map)({
|
|
477
|
-
$metadata: deserializeMetadata(output),
|
|
478
|
-
});
|
|
479
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
480
|
-
return contents;
|
|
481
|
-
};
|
|
482
|
-
exports.de_AbortMultipartUploadCommand = de_AbortMultipartUploadCommand;
|
|
483
|
-
const de_AbortMultipartUploadCommandError = async (output, context) => {
|
|
484
|
-
const parsedOutput = {
|
|
485
|
-
...output,
|
|
486
|
-
body: await parseErrorBody(output.body, context),
|
|
487
|
-
};
|
|
488
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
489
|
-
switch (errorCode) {
|
|
490
|
-
case "InvalidParameterValueException":
|
|
491
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
492
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
493
|
-
case "MissingParameterValueException":
|
|
494
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
495
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
496
|
-
case "ResourceNotFoundException":
|
|
497
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
498
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
499
|
-
case "ServiceUnavailableException":
|
|
500
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
501
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
502
|
-
default:
|
|
503
|
-
const parsedBody = parsedOutput.body;
|
|
504
|
-
return throwDefaultError({
|
|
505
|
-
output,
|
|
506
|
-
parsedBody,
|
|
507
|
-
errorCode,
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
};
|
|
511
|
-
const de_AbortVaultLockCommand = async (output, context) => {
|
|
512
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
513
|
-
return de_AbortVaultLockCommandError(output, context);
|
|
514
|
-
}
|
|
515
|
-
const contents = (0, smithy_client_1.map)({
|
|
516
|
-
$metadata: deserializeMetadata(output),
|
|
517
|
-
});
|
|
518
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
519
|
-
return contents;
|
|
520
|
-
};
|
|
521
|
-
exports.de_AbortVaultLockCommand = de_AbortVaultLockCommand;
|
|
522
|
-
const de_AbortVaultLockCommandError = async (output, context) => {
|
|
523
|
-
const parsedOutput = {
|
|
524
|
-
...output,
|
|
525
|
-
body: await parseErrorBody(output.body, context),
|
|
526
|
-
};
|
|
527
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
528
|
-
switch (errorCode) {
|
|
529
|
-
case "InvalidParameterValueException":
|
|
530
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
531
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
532
|
-
case "MissingParameterValueException":
|
|
533
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
534
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
535
|
-
case "ResourceNotFoundException":
|
|
536
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
537
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
538
|
-
case "ServiceUnavailableException":
|
|
539
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
540
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
541
|
-
default:
|
|
542
|
-
const parsedBody = parsedOutput.body;
|
|
543
|
-
return throwDefaultError({
|
|
544
|
-
output,
|
|
545
|
-
parsedBody,
|
|
546
|
-
errorCode,
|
|
547
|
-
});
|
|
548
|
-
}
|
|
549
|
-
};
|
|
550
|
-
const de_AddTagsToVaultCommand = async (output, context) => {
|
|
551
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
552
|
-
return de_AddTagsToVaultCommandError(output, context);
|
|
553
|
-
}
|
|
554
|
-
const contents = (0, smithy_client_1.map)({
|
|
555
|
-
$metadata: deserializeMetadata(output),
|
|
556
|
-
});
|
|
557
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
558
|
-
return contents;
|
|
559
|
-
};
|
|
560
|
-
exports.de_AddTagsToVaultCommand = de_AddTagsToVaultCommand;
|
|
561
|
-
const de_AddTagsToVaultCommandError = async (output, context) => {
|
|
562
|
-
const parsedOutput = {
|
|
563
|
-
...output,
|
|
564
|
-
body: await parseErrorBody(output.body, context),
|
|
565
|
-
};
|
|
566
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
567
|
-
switch (errorCode) {
|
|
568
|
-
case "InvalidParameterValueException":
|
|
569
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
570
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
571
|
-
case "LimitExceededException":
|
|
572
|
-
case "com.amazonaws.glacier#LimitExceededException":
|
|
573
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
574
|
-
case "MissingParameterValueException":
|
|
575
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
576
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
577
|
-
case "ResourceNotFoundException":
|
|
578
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
579
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
580
|
-
case "ServiceUnavailableException":
|
|
581
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
582
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
583
|
-
default:
|
|
584
|
-
const parsedBody = parsedOutput.body;
|
|
585
|
-
return throwDefaultError({
|
|
586
|
-
output,
|
|
587
|
-
parsedBody,
|
|
588
|
-
errorCode,
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
|
-
};
|
|
592
|
-
const de_CompleteMultipartUploadCommand = async (output, context) => {
|
|
593
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
594
|
-
return de_CompleteMultipartUploadCommandError(output, context);
|
|
595
|
-
}
|
|
596
|
-
const contents = (0, smithy_client_1.map)({
|
|
597
|
-
$metadata: deserializeMetadata(output),
|
|
598
|
-
[_lo]: [, output.headers[_lo]],
|
|
599
|
-
[_c]: [, output.headers[_xasth]],
|
|
600
|
-
[_aI]: [, output.headers[_xaai]],
|
|
601
|
-
});
|
|
602
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
603
|
-
return contents;
|
|
604
|
-
};
|
|
605
|
-
exports.de_CompleteMultipartUploadCommand = de_CompleteMultipartUploadCommand;
|
|
606
|
-
const de_CompleteMultipartUploadCommandError = async (output, context) => {
|
|
607
|
-
const parsedOutput = {
|
|
608
|
-
...output,
|
|
609
|
-
body: await parseErrorBody(output.body, context),
|
|
610
|
-
};
|
|
611
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
612
|
-
switch (errorCode) {
|
|
613
|
-
case "InvalidParameterValueException":
|
|
614
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
615
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
616
|
-
case "MissingParameterValueException":
|
|
617
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
618
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
619
|
-
case "ResourceNotFoundException":
|
|
620
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
621
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
622
|
-
case "ServiceUnavailableException":
|
|
623
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
624
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
625
|
-
default:
|
|
626
|
-
const parsedBody = parsedOutput.body;
|
|
627
|
-
return throwDefaultError({
|
|
628
|
-
output,
|
|
629
|
-
parsedBody,
|
|
630
|
-
errorCode,
|
|
631
|
-
});
|
|
632
|
-
}
|
|
633
|
-
};
|
|
634
|
-
const de_CompleteVaultLockCommand = async (output, context) => {
|
|
635
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
636
|
-
return de_CompleteVaultLockCommandError(output, context);
|
|
637
|
-
}
|
|
638
|
-
const contents = (0, smithy_client_1.map)({
|
|
639
|
-
$metadata: deserializeMetadata(output),
|
|
640
|
-
});
|
|
641
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
642
|
-
return contents;
|
|
643
|
-
};
|
|
644
|
-
exports.de_CompleteVaultLockCommand = de_CompleteVaultLockCommand;
|
|
645
|
-
const de_CompleteVaultLockCommandError = async (output, context) => {
|
|
646
|
-
const parsedOutput = {
|
|
647
|
-
...output,
|
|
648
|
-
body: await parseErrorBody(output.body, context),
|
|
649
|
-
};
|
|
650
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
651
|
-
switch (errorCode) {
|
|
652
|
-
case "InvalidParameterValueException":
|
|
653
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
654
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
655
|
-
case "MissingParameterValueException":
|
|
656
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
657
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
658
|
-
case "ResourceNotFoundException":
|
|
659
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
660
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
661
|
-
case "ServiceUnavailableException":
|
|
662
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
663
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
664
|
-
default:
|
|
665
|
-
const parsedBody = parsedOutput.body;
|
|
666
|
-
return throwDefaultError({
|
|
667
|
-
output,
|
|
668
|
-
parsedBody,
|
|
669
|
-
errorCode,
|
|
670
|
-
});
|
|
671
|
-
}
|
|
672
|
-
};
|
|
673
|
-
const de_CreateVaultCommand = async (output, context) => {
|
|
674
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
675
|
-
return de_CreateVaultCommandError(output, context);
|
|
676
|
-
}
|
|
677
|
-
const contents = (0, smithy_client_1.map)({
|
|
678
|
-
$metadata: deserializeMetadata(output),
|
|
679
|
-
[_lo]: [, output.headers[_lo]],
|
|
680
|
-
});
|
|
681
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
682
|
-
return contents;
|
|
683
|
-
};
|
|
684
|
-
exports.de_CreateVaultCommand = de_CreateVaultCommand;
|
|
685
|
-
const de_CreateVaultCommandError = async (output, context) => {
|
|
686
|
-
const parsedOutput = {
|
|
687
|
-
...output,
|
|
688
|
-
body: await parseErrorBody(output.body, context),
|
|
689
|
-
};
|
|
690
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
691
|
-
switch (errorCode) {
|
|
692
|
-
case "InvalidParameterValueException":
|
|
693
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
694
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
695
|
-
case "LimitExceededException":
|
|
696
|
-
case "com.amazonaws.glacier#LimitExceededException":
|
|
697
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
698
|
-
case "MissingParameterValueException":
|
|
699
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
700
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
701
|
-
case "ServiceUnavailableException":
|
|
702
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
703
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
704
|
-
default:
|
|
705
|
-
const parsedBody = parsedOutput.body;
|
|
706
|
-
return throwDefaultError({
|
|
707
|
-
output,
|
|
708
|
-
parsedBody,
|
|
709
|
-
errorCode,
|
|
710
|
-
});
|
|
711
|
-
}
|
|
712
|
-
};
|
|
713
|
-
const de_DeleteArchiveCommand = async (output, context) => {
|
|
714
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
715
|
-
return de_DeleteArchiveCommandError(output, context);
|
|
716
|
-
}
|
|
717
|
-
const contents = (0, smithy_client_1.map)({
|
|
718
|
-
$metadata: deserializeMetadata(output),
|
|
719
|
-
});
|
|
720
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
721
|
-
return contents;
|
|
722
|
-
};
|
|
723
|
-
exports.de_DeleteArchiveCommand = de_DeleteArchiveCommand;
|
|
724
|
-
const de_DeleteArchiveCommandError = async (output, context) => {
|
|
725
|
-
const parsedOutput = {
|
|
726
|
-
...output,
|
|
727
|
-
body: await parseErrorBody(output.body, context),
|
|
728
|
-
};
|
|
729
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
730
|
-
switch (errorCode) {
|
|
731
|
-
case "InvalidParameterValueException":
|
|
732
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
733
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
734
|
-
case "MissingParameterValueException":
|
|
735
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
736
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
737
|
-
case "ResourceNotFoundException":
|
|
738
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
739
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
740
|
-
case "ServiceUnavailableException":
|
|
741
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
742
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
743
|
-
default:
|
|
744
|
-
const parsedBody = parsedOutput.body;
|
|
745
|
-
return throwDefaultError({
|
|
746
|
-
output,
|
|
747
|
-
parsedBody,
|
|
748
|
-
errorCode,
|
|
749
|
-
});
|
|
750
|
-
}
|
|
751
|
-
};
|
|
752
|
-
const de_DeleteVaultCommand = async (output, context) => {
|
|
753
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
754
|
-
return de_DeleteVaultCommandError(output, context);
|
|
755
|
-
}
|
|
756
|
-
const contents = (0, smithy_client_1.map)({
|
|
757
|
-
$metadata: deserializeMetadata(output),
|
|
758
|
-
});
|
|
759
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
760
|
-
return contents;
|
|
761
|
-
};
|
|
762
|
-
exports.de_DeleteVaultCommand = de_DeleteVaultCommand;
|
|
763
|
-
const de_DeleteVaultCommandError = async (output, context) => {
|
|
764
|
-
const parsedOutput = {
|
|
765
|
-
...output,
|
|
766
|
-
body: await parseErrorBody(output.body, context),
|
|
767
|
-
};
|
|
768
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
769
|
-
switch (errorCode) {
|
|
770
|
-
case "InvalidParameterValueException":
|
|
771
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
772
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
773
|
-
case "MissingParameterValueException":
|
|
774
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
775
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
776
|
-
case "ResourceNotFoundException":
|
|
777
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
778
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
779
|
-
case "ServiceUnavailableException":
|
|
780
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
781
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
782
|
-
default:
|
|
783
|
-
const parsedBody = parsedOutput.body;
|
|
784
|
-
return throwDefaultError({
|
|
785
|
-
output,
|
|
786
|
-
parsedBody,
|
|
787
|
-
errorCode,
|
|
788
|
-
});
|
|
789
|
-
}
|
|
790
|
-
};
|
|
791
|
-
const de_DeleteVaultAccessPolicyCommand = async (output, context) => {
|
|
792
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
793
|
-
return de_DeleteVaultAccessPolicyCommandError(output, context);
|
|
794
|
-
}
|
|
795
|
-
const contents = (0, smithy_client_1.map)({
|
|
796
|
-
$metadata: deserializeMetadata(output),
|
|
797
|
-
});
|
|
798
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
799
|
-
return contents;
|
|
800
|
-
};
|
|
801
|
-
exports.de_DeleteVaultAccessPolicyCommand = de_DeleteVaultAccessPolicyCommand;
|
|
802
|
-
const de_DeleteVaultAccessPolicyCommandError = async (output, context) => {
|
|
803
|
-
const parsedOutput = {
|
|
804
|
-
...output,
|
|
805
|
-
body: await parseErrorBody(output.body, context),
|
|
806
|
-
};
|
|
807
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
808
|
-
switch (errorCode) {
|
|
809
|
-
case "InvalidParameterValueException":
|
|
810
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
811
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
812
|
-
case "MissingParameterValueException":
|
|
813
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
814
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
815
|
-
case "ResourceNotFoundException":
|
|
816
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
817
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
818
|
-
case "ServiceUnavailableException":
|
|
819
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
820
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
821
|
-
default:
|
|
822
|
-
const parsedBody = parsedOutput.body;
|
|
823
|
-
return throwDefaultError({
|
|
824
|
-
output,
|
|
825
|
-
parsedBody,
|
|
826
|
-
errorCode,
|
|
827
|
-
});
|
|
828
|
-
}
|
|
829
|
-
};
|
|
830
|
-
const de_DeleteVaultNotificationsCommand = async (output, context) => {
|
|
831
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
832
|
-
return de_DeleteVaultNotificationsCommandError(output, context);
|
|
833
|
-
}
|
|
834
|
-
const contents = (0, smithy_client_1.map)({
|
|
835
|
-
$metadata: deserializeMetadata(output),
|
|
836
|
-
});
|
|
837
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
838
|
-
return contents;
|
|
839
|
-
};
|
|
840
|
-
exports.de_DeleteVaultNotificationsCommand = de_DeleteVaultNotificationsCommand;
|
|
841
|
-
const de_DeleteVaultNotificationsCommandError = async (output, context) => {
|
|
842
|
-
const parsedOutput = {
|
|
843
|
-
...output,
|
|
844
|
-
body: await parseErrorBody(output.body, context),
|
|
845
|
-
};
|
|
846
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
847
|
-
switch (errorCode) {
|
|
848
|
-
case "InvalidParameterValueException":
|
|
849
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
850
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
851
|
-
case "MissingParameterValueException":
|
|
852
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
853
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
854
|
-
case "ResourceNotFoundException":
|
|
855
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
856
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
857
|
-
case "ServiceUnavailableException":
|
|
858
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
859
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
860
|
-
default:
|
|
861
|
-
const parsedBody = parsedOutput.body;
|
|
862
|
-
return throwDefaultError({
|
|
863
|
-
output,
|
|
864
|
-
parsedBody,
|
|
865
|
-
errorCode,
|
|
866
|
-
});
|
|
867
|
-
}
|
|
868
|
-
};
|
|
869
|
-
const de_DescribeJobCommand = async (output, context) => {
|
|
870
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
871
|
-
return de_DescribeJobCommandError(output, context);
|
|
872
|
-
}
|
|
873
|
-
const contents = (0, smithy_client_1.map)({
|
|
874
|
-
$metadata: deserializeMetadata(output),
|
|
875
|
-
});
|
|
876
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
877
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
878
|
-
Action: smithy_client_1.expectString,
|
|
879
|
-
ArchiveId: smithy_client_1.expectString,
|
|
880
|
-
ArchiveSHA256TreeHash: smithy_client_1.expectString,
|
|
881
|
-
ArchiveSizeInBytes: smithy_client_1.expectLong,
|
|
882
|
-
Completed: smithy_client_1.expectBoolean,
|
|
883
|
-
CompletionDate: smithy_client_1.expectString,
|
|
884
|
-
CreationDate: smithy_client_1.expectString,
|
|
885
|
-
InventoryRetrievalParameters: smithy_client_1._json,
|
|
886
|
-
InventorySizeInBytes: smithy_client_1.expectLong,
|
|
887
|
-
JobDescription: smithy_client_1.expectString,
|
|
888
|
-
JobId: smithy_client_1.expectString,
|
|
889
|
-
JobOutputPath: smithy_client_1.expectString,
|
|
890
|
-
OutputLocation: smithy_client_1._json,
|
|
891
|
-
RetrievalByteRange: smithy_client_1.expectString,
|
|
892
|
-
SHA256TreeHash: smithy_client_1.expectString,
|
|
893
|
-
SNSTopic: smithy_client_1.expectString,
|
|
894
|
-
SelectParameters: smithy_client_1._json,
|
|
895
|
-
StatusCode: smithy_client_1.expectString,
|
|
896
|
-
StatusMessage: smithy_client_1.expectString,
|
|
897
|
-
Tier: smithy_client_1.expectString,
|
|
898
|
-
VaultARN: smithy_client_1.expectString,
|
|
899
|
-
});
|
|
900
|
-
Object.assign(contents, doc);
|
|
901
|
-
return contents;
|
|
902
|
-
};
|
|
903
|
-
exports.de_DescribeJobCommand = de_DescribeJobCommand;
|
|
904
|
-
const de_DescribeJobCommandError = async (output, context) => {
|
|
905
|
-
const parsedOutput = {
|
|
906
|
-
...output,
|
|
907
|
-
body: await parseErrorBody(output.body, context),
|
|
908
|
-
};
|
|
909
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
910
|
-
switch (errorCode) {
|
|
911
|
-
case "InvalidParameterValueException":
|
|
912
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
913
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
914
|
-
case "MissingParameterValueException":
|
|
915
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
916
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
917
|
-
case "ResourceNotFoundException":
|
|
918
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
919
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
920
|
-
case "ServiceUnavailableException":
|
|
921
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
922
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
923
|
-
default:
|
|
924
|
-
const parsedBody = parsedOutput.body;
|
|
925
|
-
return throwDefaultError({
|
|
926
|
-
output,
|
|
927
|
-
parsedBody,
|
|
928
|
-
errorCode,
|
|
929
|
-
});
|
|
930
|
-
}
|
|
931
|
-
};
|
|
932
|
-
const de_DescribeVaultCommand = async (output, context) => {
|
|
933
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
934
|
-
return de_DescribeVaultCommandError(output, context);
|
|
935
|
-
}
|
|
936
|
-
const contents = (0, smithy_client_1.map)({
|
|
937
|
-
$metadata: deserializeMetadata(output),
|
|
938
|
-
});
|
|
939
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
940
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
941
|
-
CreationDate: smithy_client_1.expectString,
|
|
942
|
-
LastInventoryDate: smithy_client_1.expectString,
|
|
943
|
-
NumberOfArchives: smithy_client_1.expectLong,
|
|
944
|
-
SizeInBytes: smithy_client_1.expectLong,
|
|
945
|
-
VaultARN: smithy_client_1.expectString,
|
|
946
|
-
VaultName: smithy_client_1.expectString,
|
|
947
|
-
});
|
|
948
|
-
Object.assign(contents, doc);
|
|
949
|
-
return contents;
|
|
950
|
-
};
|
|
951
|
-
exports.de_DescribeVaultCommand = de_DescribeVaultCommand;
|
|
952
|
-
const de_DescribeVaultCommandError = async (output, context) => {
|
|
953
|
-
const parsedOutput = {
|
|
954
|
-
...output,
|
|
955
|
-
body: await parseErrorBody(output.body, context),
|
|
956
|
-
};
|
|
957
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
958
|
-
switch (errorCode) {
|
|
959
|
-
case "InvalidParameterValueException":
|
|
960
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
961
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
962
|
-
case "MissingParameterValueException":
|
|
963
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
964
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
965
|
-
case "ResourceNotFoundException":
|
|
966
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
967
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
968
|
-
case "ServiceUnavailableException":
|
|
969
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
970
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
971
|
-
default:
|
|
972
|
-
const parsedBody = parsedOutput.body;
|
|
973
|
-
return throwDefaultError({
|
|
974
|
-
output,
|
|
975
|
-
parsedBody,
|
|
976
|
-
errorCode,
|
|
977
|
-
});
|
|
978
|
-
}
|
|
979
|
-
};
|
|
980
|
-
const de_GetDataRetrievalPolicyCommand = async (output, context) => {
|
|
981
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
982
|
-
return de_GetDataRetrievalPolicyCommandError(output, context);
|
|
983
|
-
}
|
|
984
|
-
const contents = (0, smithy_client_1.map)({
|
|
985
|
-
$metadata: deserializeMetadata(output),
|
|
986
|
-
});
|
|
987
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
988
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
989
|
-
Policy: smithy_client_1._json,
|
|
990
|
-
});
|
|
991
|
-
Object.assign(contents, doc);
|
|
992
|
-
return contents;
|
|
993
|
-
};
|
|
994
|
-
exports.de_GetDataRetrievalPolicyCommand = de_GetDataRetrievalPolicyCommand;
|
|
995
|
-
const de_GetDataRetrievalPolicyCommandError = async (output, context) => {
|
|
996
|
-
const parsedOutput = {
|
|
997
|
-
...output,
|
|
998
|
-
body: await parseErrorBody(output.body, context),
|
|
999
|
-
};
|
|
1000
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1001
|
-
switch (errorCode) {
|
|
1002
|
-
case "InvalidParameterValueException":
|
|
1003
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1004
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1005
|
-
case "MissingParameterValueException":
|
|
1006
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1007
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1008
|
-
case "ServiceUnavailableException":
|
|
1009
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1010
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1011
|
-
default:
|
|
1012
|
-
const parsedBody = parsedOutput.body;
|
|
1013
|
-
return throwDefaultError({
|
|
1014
|
-
output,
|
|
1015
|
-
parsedBody,
|
|
1016
|
-
errorCode,
|
|
1017
|
-
});
|
|
1018
|
-
}
|
|
1019
|
-
};
|
|
1020
|
-
const de_GetJobOutputCommand = async (output, context) => {
|
|
1021
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1022
|
-
return de_GetJobOutputCommandError(output, context);
|
|
1023
|
-
}
|
|
1024
|
-
const contents = (0, smithy_client_1.map)({
|
|
1025
|
-
$metadata: deserializeMetadata(output),
|
|
1026
|
-
[_c]: [, output.headers[_xasth]],
|
|
1027
|
-
[_cR]: [, output.headers[_cr]],
|
|
1028
|
-
[_aR]: [, output.headers[_ar]],
|
|
1029
|
-
[_cT]: [, output.headers[_ct]],
|
|
1030
|
-
[_aD]: [, output.headers[_xaad]],
|
|
1031
|
-
});
|
|
1032
|
-
const data = output.body;
|
|
1033
|
-
context.sdkStreamMixin(data);
|
|
1034
|
-
contents.body = data;
|
|
1035
|
-
(0, smithy_client_1.map)(contents, {
|
|
1036
|
-
status: [, output.statusCode],
|
|
1037
|
-
});
|
|
1038
|
-
return contents;
|
|
1039
|
-
};
|
|
1040
|
-
exports.de_GetJobOutputCommand = de_GetJobOutputCommand;
|
|
1041
|
-
const de_GetJobOutputCommandError = async (output, context) => {
|
|
1042
|
-
const parsedOutput = {
|
|
1043
|
-
...output,
|
|
1044
|
-
body: await parseErrorBody(output.body, context),
|
|
1045
|
-
};
|
|
1046
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1047
|
-
switch (errorCode) {
|
|
1048
|
-
case "InvalidParameterValueException":
|
|
1049
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1050
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1051
|
-
case "MissingParameterValueException":
|
|
1052
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1053
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1054
|
-
case "ResourceNotFoundException":
|
|
1055
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1056
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1057
|
-
case "ServiceUnavailableException":
|
|
1058
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1059
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1060
|
-
default:
|
|
1061
|
-
const parsedBody = parsedOutput.body;
|
|
1062
|
-
return throwDefaultError({
|
|
1063
|
-
output,
|
|
1064
|
-
parsedBody,
|
|
1065
|
-
errorCode,
|
|
1066
|
-
});
|
|
1067
|
-
}
|
|
1068
|
-
};
|
|
1069
|
-
const de_GetVaultAccessPolicyCommand = async (output, context) => {
|
|
1070
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1071
|
-
return de_GetVaultAccessPolicyCommandError(output, context);
|
|
1072
|
-
}
|
|
1073
|
-
const contents = (0, smithy_client_1.map)({
|
|
1074
|
-
$metadata: deserializeMetadata(output),
|
|
1075
|
-
});
|
|
1076
|
-
const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
|
|
1077
|
-
contents.policy = (0, smithy_client_1._json)(data);
|
|
1078
|
-
return contents;
|
|
1079
|
-
};
|
|
1080
|
-
exports.de_GetVaultAccessPolicyCommand = de_GetVaultAccessPolicyCommand;
|
|
1081
|
-
const de_GetVaultAccessPolicyCommandError = async (output, context) => {
|
|
1082
|
-
const parsedOutput = {
|
|
1083
|
-
...output,
|
|
1084
|
-
body: await parseErrorBody(output.body, context),
|
|
1085
|
-
};
|
|
1086
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1087
|
-
switch (errorCode) {
|
|
1088
|
-
case "InvalidParameterValueException":
|
|
1089
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1090
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1091
|
-
case "MissingParameterValueException":
|
|
1092
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1093
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1094
|
-
case "ResourceNotFoundException":
|
|
1095
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1096
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1097
|
-
case "ServiceUnavailableException":
|
|
1098
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1099
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1100
|
-
default:
|
|
1101
|
-
const parsedBody = parsedOutput.body;
|
|
1102
|
-
return throwDefaultError({
|
|
1103
|
-
output,
|
|
1104
|
-
parsedBody,
|
|
1105
|
-
errorCode,
|
|
1106
|
-
});
|
|
1107
|
-
}
|
|
1108
|
-
};
|
|
1109
|
-
const de_GetVaultLockCommand = async (output, context) => {
|
|
1110
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1111
|
-
return de_GetVaultLockCommandError(output, context);
|
|
1112
|
-
}
|
|
1113
|
-
const contents = (0, smithy_client_1.map)({
|
|
1114
|
-
$metadata: deserializeMetadata(output),
|
|
1115
|
-
});
|
|
1116
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1117
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1118
|
-
CreationDate: smithy_client_1.expectString,
|
|
1119
|
-
ExpirationDate: smithy_client_1.expectString,
|
|
1120
|
-
Policy: smithy_client_1.expectString,
|
|
1121
|
-
State: smithy_client_1.expectString,
|
|
1122
|
-
});
|
|
1123
|
-
Object.assign(contents, doc);
|
|
1124
|
-
return contents;
|
|
1125
|
-
};
|
|
1126
|
-
exports.de_GetVaultLockCommand = de_GetVaultLockCommand;
|
|
1127
|
-
const de_GetVaultLockCommandError = async (output, context) => {
|
|
1128
|
-
const parsedOutput = {
|
|
1129
|
-
...output,
|
|
1130
|
-
body: await parseErrorBody(output.body, context),
|
|
1131
|
-
};
|
|
1132
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1133
|
-
switch (errorCode) {
|
|
1134
|
-
case "InvalidParameterValueException":
|
|
1135
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1136
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1137
|
-
case "MissingParameterValueException":
|
|
1138
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1139
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1140
|
-
case "ResourceNotFoundException":
|
|
1141
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1142
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1143
|
-
case "ServiceUnavailableException":
|
|
1144
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1145
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1146
|
-
default:
|
|
1147
|
-
const parsedBody = parsedOutput.body;
|
|
1148
|
-
return throwDefaultError({
|
|
1149
|
-
output,
|
|
1150
|
-
parsedBody,
|
|
1151
|
-
errorCode,
|
|
1152
|
-
});
|
|
1153
|
-
}
|
|
1154
|
-
};
|
|
1155
|
-
const de_GetVaultNotificationsCommand = async (output, context) => {
|
|
1156
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1157
|
-
return de_GetVaultNotificationsCommandError(output, context);
|
|
1158
|
-
}
|
|
1159
|
-
const contents = (0, smithy_client_1.map)({
|
|
1160
|
-
$metadata: deserializeMetadata(output),
|
|
1161
|
-
});
|
|
1162
|
-
const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context));
|
|
1163
|
-
contents.vaultNotificationConfig = (0, smithy_client_1._json)(data);
|
|
1164
|
-
return contents;
|
|
1165
|
-
};
|
|
1166
|
-
exports.de_GetVaultNotificationsCommand = de_GetVaultNotificationsCommand;
|
|
1167
|
-
const de_GetVaultNotificationsCommandError = async (output, context) => {
|
|
1168
|
-
const parsedOutput = {
|
|
1169
|
-
...output,
|
|
1170
|
-
body: await parseErrorBody(output.body, context),
|
|
1171
|
-
};
|
|
1172
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1173
|
-
switch (errorCode) {
|
|
1174
|
-
case "InvalidParameterValueException":
|
|
1175
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1176
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1177
|
-
case "MissingParameterValueException":
|
|
1178
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1179
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1180
|
-
case "ResourceNotFoundException":
|
|
1181
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1182
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1183
|
-
case "ServiceUnavailableException":
|
|
1184
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1185
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1186
|
-
default:
|
|
1187
|
-
const parsedBody = parsedOutput.body;
|
|
1188
|
-
return throwDefaultError({
|
|
1189
|
-
output,
|
|
1190
|
-
parsedBody,
|
|
1191
|
-
errorCode,
|
|
1192
|
-
});
|
|
1193
|
-
}
|
|
1194
|
-
};
|
|
1195
|
-
const de_InitiateJobCommand = async (output, context) => {
|
|
1196
|
-
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1197
|
-
return de_InitiateJobCommandError(output, context);
|
|
1198
|
-
}
|
|
1199
|
-
const contents = (0, smithy_client_1.map)({
|
|
1200
|
-
$metadata: deserializeMetadata(output),
|
|
1201
|
-
[_lo]: [, output.headers[_lo]],
|
|
1202
|
-
[_jI]: [, output.headers[_xaji]],
|
|
1203
|
-
[_jOP]: [, output.headers[_xajop]],
|
|
1204
|
-
});
|
|
1205
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1206
|
-
return contents;
|
|
1207
|
-
};
|
|
1208
|
-
exports.de_InitiateJobCommand = de_InitiateJobCommand;
|
|
1209
|
-
const de_InitiateJobCommandError = async (output, context) => {
|
|
1210
|
-
const parsedOutput = {
|
|
1211
|
-
...output,
|
|
1212
|
-
body: await parseErrorBody(output.body, context),
|
|
1213
|
-
};
|
|
1214
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1215
|
-
switch (errorCode) {
|
|
1216
|
-
case "InsufficientCapacityException":
|
|
1217
|
-
case "com.amazonaws.glacier#InsufficientCapacityException":
|
|
1218
|
-
throw await de_InsufficientCapacityExceptionRes(parsedOutput, context);
|
|
1219
|
-
case "InvalidParameterValueException":
|
|
1220
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1221
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1222
|
-
case "MissingParameterValueException":
|
|
1223
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1224
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1225
|
-
case "PolicyEnforcedException":
|
|
1226
|
-
case "com.amazonaws.glacier#PolicyEnforcedException":
|
|
1227
|
-
throw await de_PolicyEnforcedExceptionRes(parsedOutput, context);
|
|
1228
|
-
case "ResourceNotFoundException":
|
|
1229
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1230
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1231
|
-
case "ServiceUnavailableException":
|
|
1232
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1233
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1234
|
-
default:
|
|
1235
|
-
const parsedBody = parsedOutput.body;
|
|
1236
|
-
return throwDefaultError({
|
|
1237
|
-
output,
|
|
1238
|
-
parsedBody,
|
|
1239
|
-
errorCode,
|
|
1240
|
-
});
|
|
1241
|
-
}
|
|
1242
|
-
};
|
|
1243
|
-
const de_InitiateMultipartUploadCommand = async (output, context) => {
|
|
1244
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1245
|
-
return de_InitiateMultipartUploadCommandError(output, context);
|
|
1246
|
-
}
|
|
1247
|
-
const contents = (0, smithy_client_1.map)({
|
|
1248
|
-
$metadata: deserializeMetadata(output),
|
|
1249
|
-
[_lo]: [, output.headers[_lo]],
|
|
1250
|
-
[_uI]: [, output.headers[_xamui]],
|
|
1251
|
-
});
|
|
1252
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1253
|
-
return contents;
|
|
1254
|
-
};
|
|
1255
|
-
exports.de_InitiateMultipartUploadCommand = de_InitiateMultipartUploadCommand;
|
|
1256
|
-
const de_InitiateMultipartUploadCommandError = async (output, context) => {
|
|
1257
|
-
const parsedOutput = {
|
|
1258
|
-
...output,
|
|
1259
|
-
body: await parseErrorBody(output.body, context),
|
|
1260
|
-
};
|
|
1261
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1262
|
-
switch (errorCode) {
|
|
1263
|
-
case "InvalidParameterValueException":
|
|
1264
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1265
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1266
|
-
case "MissingParameterValueException":
|
|
1267
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1268
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1269
|
-
case "ResourceNotFoundException":
|
|
1270
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1271
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1272
|
-
case "ServiceUnavailableException":
|
|
1273
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1274
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1275
|
-
default:
|
|
1276
|
-
const parsedBody = parsedOutput.body;
|
|
1277
|
-
return throwDefaultError({
|
|
1278
|
-
output,
|
|
1279
|
-
parsedBody,
|
|
1280
|
-
errorCode,
|
|
1281
|
-
});
|
|
1282
|
-
}
|
|
1283
|
-
};
|
|
1284
|
-
const de_InitiateVaultLockCommand = async (output, context) => {
|
|
1285
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1286
|
-
return de_InitiateVaultLockCommandError(output, context);
|
|
1287
|
-
}
|
|
1288
|
-
const contents = (0, smithy_client_1.map)({
|
|
1289
|
-
$metadata: deserializeMetadata(output),
|
|
1290
|
-
[_lI]: [, output.headers[_xali]],
|
|
1291
|
-
});
|
|
1292
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1293
|
-
return contents;
|
|
1294
|
-
};
|
|
1295
|
-
exports.de_InitiateVaultLockCommand = de_InitiateVaultLockCommand;
|
|
1296
|
-
const de_InitiateVaultLockCommandError = async (output, context) => {
|
|
1297
|
-
const parsedOutput = {
|
|
1298
|
-
...output,
|
|
1299
|
-
body: await parseErrorBody(output.body, context),
|
|
1300
|
-
};
|
|
1301
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1302
|
-
switch (errorCode) {
|
|
1303
|
-
case "InvalidParameterValueException":
|
|
1304
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1305
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1306
|
-
case "MissingParameterValueException":
|
|
1307
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1308
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1309
|
-
case "ResourceNotFoundException":
|
|
1310
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1311
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1312
|
-
case "ServiceUnavailableException":
|
|
1313
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1314
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1315
|
-
default:
|
|
1316
|
-
const parsedBody = parsedOutput.body;
|
|
1317
|
-
return throwDefaultError({
|
|
1318
|
-
output,
|
|
1319
|
-
parsedBody,
|
|
1320
|
-
errorCode,
|
|
1321
|
-
});
|
|
1322
|
-
}
|
|
1323
|
-
};
|
|
1324
|
-
const de_ListJobsCommand = async (output, context) => {
|
|
1325
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1326
|
-
return de_ListJobsCommandError(output, context);
|
|
1327
|
-
}
|
|
1328
|
-
const contents = (0, smithy_client_1.map)({
|
|
1329
|
-
$metadata: deserializeMetadata(output),
|
|
1330
|
-
});
|
|
1331
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1332
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1333
|
-
JobList: smithy_client_1._json,
|
|
1334
|
-
Marker: smithy_client_1.expectString,
|
|
1335
|
-
});
|
|
1336
|
-
Object.assign(contents, doc);
|
|
1337
|
-
return contents;
|
|
1338
|
-
};
|
|
1339
|
-
exports.de_ListJobsCommand = de_ListJobsCommand;
|
|
1340
|
-
const de_ListJobsCommandError = async (output, context) => {
|
|
1341
|
-
const parsedOutput = {
|
|
1342
|
-
...output,
|
|
1343
|
-
body: await parseErrorBody(output.body, context),
|
|
1344
|
-
};
|
|
1345
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1346
|
-
switch (errorCode) {
|
|
1347
|
-
case "InvalidParameterValueException":
|
|
1348
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1349
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1350
|
-
case "MissingParameterValueException":
|
|
1351
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1352
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1353
|
-
case "ResourceNotFoundException":
|
|
1354
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1355
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1356
|
-
case "ServiceUnavailableException":
|
|
1357
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1358
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1359
|
-
default:
|
|
1360
|
-
const parsedBody = parsedOutput.body;
|
|
1361
|
-
return throwDefaultError({
|
|
1362
|
-
output,
|
|
1363
|
-
parsedBody,
|
|
1364
|
-
errorCode,
|
|
1365
|
-
});
|
|
1366
|
-
}
|
|
1367
|
-
};
|
|
1368
|
-
const de_ListMultipartUploadsCommand = async (output, context) => {
|
|
1369
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1370
|
-
return de_ListMultipartUploadsCommandError(output, context);
|
|
1371
|
-
}
|
|
1372
|
-
const contents = (0, smithy_client_1.map)({
|
|
1373
|
-
$metadata: deserializeMetadata(output),
|
|
1374
|
-
});
|
|
1375
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1376
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1377
|
-
Marker: smithy_client_1.expectString,
|
|
1378
|
-
UploadsList: smithy_client_1._json,
|
|
1379
|
-
});
|
|
1380
|
-
Object.assign(contents, doc);
|
|
1381
|
-
return contents;
|
|
1382
|
-
};
|
|
1383
|
-
exports.de_ListMultipartUploadsCommand = de_ListMultipartUploadsCommand;
|
|
1384
|
-
const de_ListMultipartUploadsCommandError = async (output, context) => {
|
|
1385
|
-
const parsedOutput = {
|
|
1386
|
-
...output,
|
|
1387
|
-
body: await parseErrorBody(output.body, context),
|
|
1388
|
-
};
|
|
1389
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1390
|
-
switch (errorCode) {
|
|
1391
|
-
case "InvalidParameterValueException":
|
|
1392
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1393
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1394
|
-
case "MissingParameterValueException":
|
|
1395
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1396
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1397
|
-
case "ResourceNotFoundException":
|
|
1398
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1399
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1400
|
-
case "ServiceUnavailableException":
|
|
1401
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1402
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1403
|
-
default:
|
|
1404
|
-
const parsedBody = parsedOutput.body;
|
|
1405
|
-
return throwDefaultError({
|
|
1406
|
-
output,
|
|
1407
|
-
parsedBody,
|
|
1408
|
-
errorCode,
|
|
1409
|
-
});
|
|
1410
|
-
}
|
|
1411
|
-
};
|
|
1412
|
-
const de_ListPartsCommand = async (output, context) => {
|
|
1413
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1414
|
-
return de_ListPartsCommandError(output, context);
|
|
1415
|
-
}
|
|
1416
|
-
const contents = (0, smithy_client_1.map)({
|
|
1417
|
-
$metadata: deserializeMetadata(output),
|
|
1418
|
-
});
|
|
1419
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1420
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1421
|
-
ArchiveDescription: smithy_client_1.expectString,
|
|
1422
|
-
CreationDate: smithy_client_1.expectString,
|
|
1423
|
-
Marker: smithy_client_1.expectString,
|
|
1424
|
-
MultipartUploadId: smithy_client_1.expectString,
|
|
1425
|
-
PartSizeInBytes: smithy_client_1.expectLong,
|
|
1426
|
-
Parts: smithy_client_1._json,
|
|
1427
|
-
VaultARN: smithy_client_1.expectString,
|
|
1428
|
-
});
|
|
1429
|
-
Object.assign(contents, doc);
|
|
1430
|
-
return contents;
|
|
1431
|
-
};
|
|
1432
|
-
exports.de_ListPartsCommand = de_ListPartsCommand;
|
|
1433
|
-
const de_ListPartsCommandError = async (output, context) => {
|
|
1434
|
-
const parsedOutput = {
|
|
1435
|
-
...output,
|
|
1436
|
-
body: await parseErrorBody(output.body, context),
|
|
1437
|
-
};
|
|
1438
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1439
|
-
switch (errorCode) {
|
|
1440
|
-
case "InvalidParameterValueException":
|
|
1441
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1442
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1443
|
-
case "MissingParameterValueException":
|
|
1444
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1445
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1446
|
-
case "ResourceNotFoundException":
|
|
1447
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1448
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1449
|
-
case "ServiceUnavailableException":
|
|
1450
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1451
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1452
|
-
default:
|
|
1453
|
-
const parsedBody = parsedOutput.body;
|
|
1454
|
-
return throwDefaultError({
|
|
1455
|
-
output,
|
|
1456
|
-
parsedBody,
|
|
1457
|
-
errorCode,
|
|
1458
|
-
});
|
|
1459
|
-
}
|
|
1460
|
-
};
|
|
1461
|
-
const de_ListProvisionedCapacityCommand = async (output, context) => {
|
|
1462
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1463
|
-
return de_ListProvisionedCapacityCommandError(output, context);
|
|
1464
|
-
}
|
|
1465
|
-
const contents = (0, smithy_client_1.map)({
|
|
1466
|
-
$metadata: deserializeMetadata(output),
|
|
1467
|
-
});
|
|
1468
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1469
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1470
|
-
ProvisionedCapacityList: smithy_client_1._json,
|
|
1471
|
-
});
|
|
1472
|
-
Object.assign(contents, doc);
|
|
1473
|
-
return contents;
|
|
1474
|
-
};
|
|
1475
|
-
exports.de_ListProvisionedCapacityCommand = de_ListProvisionedCapacityCommand;
|
|
1476
|
-
const de_ListProvisionedCapacityCommandError = async (output, context) => {
|
|
1477
|
-
const parsedOutput = {
|
|
1478
|
-
...output,
|
|
1479
|
-
body: await parseErrorBody(output.body, context),
|
|
1480
|
-
};
|
|
1481
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1482
|
-
switch (errorCode) {
|
|
1483
|
-
case "InvalidParameterValueException":
|
|
1484
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1485
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1486
|
-
case "MissingParameterValueException":
|
|
1487
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1488
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1489
|
-
case "ServiceUnavailableException":
|
|
1490
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1491
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1492
|
-
default:
|
|
1493
|
-
const parsedBody = parsedOutput.body;
|
|
1494
|
-
return throwDefaultError({
|
|
1495
|
-
output,
|
|
1496
|
-
parsedBody,
|
|
1497
|
-
errorCode,
|
|
1498
|
-
});
|
|
1499
|
-
}
|
|
1500
|
-
};
|
|
1501
|
-
const de_ListTagsForVaultCommand = async (output, context) => {
|
|
1502
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1503
|
-
return de_ListTagsForVaultCommandError(output, context);
|
|
1504
|
-
}
|
|
1505
|
-
const contents = (0, smithy_client_1.map)({
|
|
1506
|
-
$metadata: deserializeMetadata(output),
|
|
1507
|
-
});
|
|
1508
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1509
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1510
|
-
Tags: smithy_client_1._json,
|
|
1511
|
-
});
|
|
1512
|
-
Object.assign(contents, doc);
|
|
1513
|
-
return contents;
|
|
1514
|
-
};
|
|
1515
|
-
exports.de_ListTagsForVaultCommand = de_ListTagsForVaultCommand;
|
|
1516
|
-
const de_ListTagsForVaultCommandError = async (output, context) => {
|
|
1517
|
-
const parsedOutput = {
|
|
1518
|
-
...output,
|
|
1519
|
-
body: await parseErrorBody(output.body, context),
|
|
1520
|
-
};
|
|
1521
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1522
|
-
switch (errorCode) {
|
|
1523
|
-
case "InvalidParameterValueException":
|
|
1524
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1525
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1526
|
-
case "MissingParameterValueException":
|
|
1527
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1528
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1529
|
-
case "ResourceNotFoundException":
|
|
1530
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1531
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1532
|
-
case "ServiceUnavailableException":
|
|
1533
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1534
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1535
|
-
default:
|
|
1536
|
-
const parsedBody = parsedOutput.body;
|
|
1537
|
-
return throwDefaultError({
|
|
1538
|
-
output,
|
|
1539
|
-
parsedBody,
|
|
1540
|
-
errorCode,
|
|
1541
|
-
});
|
|
1542
|
-
}
|
|
1543
|
-
};
|
|
1544
|
-
const de_ListVaultsCommand = async (output, context) => {
|
|
1545
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1546
|
-
return de_ListVaultsCommandError(output, context);
|
|
1547
|
-
}
|
|
1548
|
-
const contents = (0, smithy_client_1.map)({
|
|
1549
|
-
$metadata: deserializeMetadata(output),
|
|
1550
|
-
});
|
|
1551
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1552
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1553
|
-
Marker: smithy_client_1.expectString,
|
|
1554
|
-
VaultList: smithy_client_1._json,
|
|
1555
|
-
});
|
|
1556
|
-
Object.assign(contents, doc);
|
|
1557
|
-
return contents;
|
|
1558
|
-
};
|
|
1559
|
-
exports.de_ListVaultsCommand = de_ListVaultsCommand;
|
|
1560
|
-
const de_ListVaultsCommandError = async (output, context) => {
|
|
1561
|
-
const parsedOutput = {
|
|
1562
|
-
...output,
|
|
1563
|
-
body: await parseErrorBody(output.body, context),
|
|
1564
|
-
};
|
|
1565
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1566
|
-
switch (errorCode) {
|
|
1567
|
-
case "InvalidParameterValueException":
|
|
1568
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1569
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1570
|
-
case "MissingParameterValueException":
|
|
1571
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1572
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1573
|
-
case "ResourceNotFoundException":
|
|
1574
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1575
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1576
|
-
case "ServiceUnavailableException":
|
|
1577
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1578
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1579
|
-
default:
|
|
1580
|
-
const parsedBody = parsedOutput.body;
|
|
1581
|
-
return throwDefaultError({
|
|
1582
|
-
output,
|
|
1583
|
-
parsedBody,
|
|
1584
|
-
errorCode,
|
|
1585
|
-
});
|
|
1586
|
-
}
|
|
1587
|
-
};
|
|
1588
|
-
const de_PurchaseProvisionedCapacityCommand = async (output, context) => {
|
|
1589
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1590
|
-
return de_PurchaseProvisionedCapacityCommandError(output, context);
|
|
1591
|
-
}
|
|
1592
|
-
const contents = (0, smithy_client_1.map)({
|
|
1593
|
-
$metadata: deserializeMetadata(output),
|
|
1594
|
-
[_cI]: [, output.headers[_xaci]],
|
|
1595
|
-
});
|
|
1596
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1597
|
-
return contents;
|
|
1598
|
-
};
|
|
1599
|
-
exports.de_PurchaseProvisionedCapacityCommand = de_PurchaseProvisionedCapacityCommand;
|
|
1600
|
-
const de_PurchaseProvisionedCapacityCommandError = async (output, context) => {
|
|
1601
|
-
const parsedOutput = {
|
|
1602
|
-
...output,
|
|
1603
|
-
body: await parseErrorBody(output.body, context),
|
|
1604
|
-
};
|
|
1605
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1606
|
-
switch (errorCode) {
|
|
1607
|
-
case "InvalidParameterValueException":
|
|
1608
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1609
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1610
|
-
case "LimitExceededException":
|
|
1611
|
-
case "com.amazonaws.glacier#LimitExceededException":
|
|
1612
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1613
|
-
case "MissingParameterValueException":
|
|
1614
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1615
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1616
|
-
case "ServiceUnavailableException":
|
|
1617
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1618
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1619
|
-
default:
|
|
1620
|
-
const parsedBody = parsedOutput.body;
|
|
1621
|
-
return throwDefaultError({
|
|
1622
|
-
output,
|
|
1623
|
-
parsedBody,
|
|
1624
|
-
errorCode,
|
|
1625
|
-
});
|
|
1626
|
-
}
|
|
1627
|
-
};
|
|
1628
|
-
const de_RemoveTagsFromVaultCommand = async (output, context) => {
|
|
1629
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1630
|
-
return de_RemoveTagsFromVaultCommandError(output, context);
|
|
1631
|
-
}
|
|
1632
|
-
const contents = (0, smithy_client_1.map)({
|
|
1633
|
-
$metadata: deserializeMetadata(output),
|
|
1634
|
-
});
|
|
1635
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1636
|
-
return contents;
|
|
1637
|
-
};
|
|
1638
|
-
exports.de_RemoveTagsFromVaultCommand = de_RemoveTagsFromVaultCommand;
|
|
1639
|
-
const de_RemoveTagsFromVaultCommandError = async (output, context) => {
|
|
1640
|
-
const parsedOutput = {
|
|
1641
|
-
...output,
|
|
1642
|
-
body: await parseErrorBody(output.body, context),
|
|
1643
|
-
};
|
|
1644
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1645
|
-
switch (errorCode) {
|
|
1646
|
-
case "InvalidParameterValueException":
|
|
1647
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1648
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1649
|
-
case "MissingParameterValueException":
|
|
1650
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1651
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1652
|
-
case "ResourceNotFoundException":
|
|
1653
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1654
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1655
|
-
case "ServiceUnavailableException":
|
|
1656
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1657
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1658
|
-
default:
|
|
1659
|
-
const parsedBody = parsedOutput.body;
|
|
1660
|
-
return throwDefaultError({
|
|
1661
|
-
output,
|
|
1662
|
-
parsedBody,
|
|
1663
|
-
errorCode,
|
|
1664
|
-
});
|
|
1665
|
-
}
|
|
1666
|
-
};
|
|
1667
|
-
const de_SetDataRetrievalPolicyCommand = async (output, context) => {
|
|
1668
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1669
|
-
return de_SetDataRetrievalPolicyCommandError(output, context);
|
|
1670
|
-
}
|
|
1671
|
-
const contents = (0, smithy_client_1.map)({
|
|
1672
|
-
$metadata: deserializeMetadata(output),
|
|
1673
|
-
});
|
|
1674
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1675
|
-
return contents;
|
|
1676
|
-
};
|
|
1677
|
-
exports.de_SetDataRetrievalPolicyCommand = de_SetDataRetrievalPolicyCommand;
|
|
1678
|
-
const de_SetDataRetrievalPolicyCommandError = async (output, context) => {
|
|
1679
|
-
const parsedOutput = {
|
|
1680
|
-
...output,
|
|
1681
|
-
body: await parseErrorBody(output.body, context),
|
|
1682
|
-
};
|
|
1683
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1684
|
-
switch (errorCode) {
|
|
1685
|
-
case "InvalidParameterValueException":
|
|
1686
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1687
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1688
|
-
case "MissingParameterValueException":
|
|
1689
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1690
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1691
|
-
case "ServiceUnavailableException":
|
|
1692
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1693
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1694
|
-
default:
|
|
1695
|
-
const parsedBody = parsedOutput.body;
|
|
1696
|
-
return throwDefaultError({
|
|
1697
|
-
output,
|
|
1698
|
-
parsedBody,
|
|
1699
|
-
errorCode,
|
|
1700
|
-
});
|
|
1701
|
-
}
|
|
1702
|
-
};
|
|
1703
|
-
const de_SetVaultAccessPolicyCommand = async (output, context) => {
|
|
1704
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1705
|
-
return de_SetVaultAccessPolicyCommandError(output, context);
|
|
1706
|
-
}
|
|
1707
|
-
const contents = (0, smithy_client_1.map)({
|
|
1708
|
-
$metadata: deserializeMetadata(output),
|
|
1709
|
-
});
|
|
1710
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1711
|
-
return contents;
|
|
1712
|
-
};
|
|
1713
|
-
exports.de_SetVaultAccessPolicyCommand = de_SetVaultAccessPolicyCommand;
|
|
1714
|
-
const de_SetVaultAccessPolicyCommandError = async (output, context) => {
|
|
1715
|
-
const parsedOutput = {
|
|
1716
|
-
...output,
|
|
1717
|
-
body: await parseErrorBody(output.body, context),
|
|
1718
|
-
};
|
|
1719
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1720
|
-
switch (errorCode) {
|
|
1721
|
-
case "InvalidParameterValueException":
|
|
1722
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1723
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1724
|
-
case "MissingParameterValueException":
|
|
1725
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1726
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1727
|
-
case "ResourceNotFoundException":
|
|
1728
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1729
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1730
|
-
case "ServiceUnavailableException":
|
|
1731
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1732
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1733
|
-
default:
|
|
1734
|
-
const parsedBody = parsedOutput.body;
|
|
1735
|
-
return throwDefaultError({
|
|
1736
|
-
output,
|
|
1737
|
-
parsedBody,
|
|
1738
|
-
errorCode,
|
|
1739
|
-
});
|
|
1740
|
-
}
|
|
1741
|
-
};
|
|
1742
|
-
const de_SetVaultNotificationsCommand = async (output, context) => {
|
|
1743
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1744
|
-
return de_SetVaultNotificationsCommandError(output, context);
|
|
1745
|
-
}
|
|
1746
|
-
const contents = (0, smithy_client_1.map)({
|
|
1747
|
-
$metadata: deserializeMetadata(output),
|
|
1748
|
-
});
|
|
1749
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1750
|
-
return contents;
|
|
1751
|
-
};
|
|
1752
|
-
exports.de_SetVaultNotificationsCommand = de_SetVaultNotificationsCommand;
|
|
1753
|
-
const de_SetVaultNotificationsCommandError = async (output, context) => {
|
|
1754
|
-
const parsedOutput = {
|
|
1755
|
-
...output,
|
|
1756
|
-
body: await parseErrorBody(output.body, context),
|
|
1757
|
-
};
|
|
1758
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1759
|
-
switch (errorCode) {
|
|
1760
|
-
case "InvalidParameterValueException":
|
|
1761
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1762
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1763
|
-
case "MissingParameterValueException":
|
|
1764
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1765
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1766
|
-
case "ResourceNotFoundException":
|
|
1767
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1768
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1769
|
-
case "ServiceUnavailableException":
|
|
1770
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1771
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1772
|
-
default:
|
|
1773
|
-
const parsedBody = parsedOutput.body;
|
|
1774
|
-
return throwDefaultError({
|
|
1775
|
-
output,
|
|
1776
|
-
parsedBody,
|
|
1777
|
-
errorCode,
|
|
1778
|
-
});
|
|
1779
|
-
}
|
|
1780
|
-
};
|
|
1781
|
-
const de_UploadArchiveCommand = async (output, context) => {
|
|
1782
|
-
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
1783
|
-
return de_UploadArchiveCommandError(output, context);
|
|
1784
|
-
}
|
|
1785
|
-
const contents = (0, smithy_client_1.map)({
|
|
1786
|
-
$metadata: deserializeMetadata(output),
|
|
1787
|
-
[_lo]: [, output.headers[_lo]],
|
|
1788
|
-
[_c]: [, output.headers[_xasth]],
|
|
1789
|
-
[_aI]: [, output.headers[_xaai]],
|
|
1790
|
-
});
|
|
1791
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1792
|
-
return contents;
|
|
1793
|
-
};
|
|
1794
|
-
exports.de_UploadArchiveCommand = de_UploadArchiveCommand;
|
|
1795
|
-
const de_UploadArchiveCommandError = async (output, context) => {
|
|
1796
|
-
const parsedOutput = {
|
|
1797
|
-
...output,
|
|
1798
|
-
body: await parseErrorBody(output.body, context),
|
|
1799
|
-
};
|
|
1800
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1801
|
-
switch (errorCode) {
|
|
1802
|
-
case "InvalidParameterValueException":
|
|
1803
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1804
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1805
|
-
case "MissingParameterValueException":
|
|
1806
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1807
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1808
|
-
case "RequestTimeoutException":
|
|
1809
|
-
case "com.amazonaws.glacier#RequestTimeoutException":
|
|
1810
|
-
throw await de_RequestTimeoutExceptionRes(parsedOutput, context);
|
|
1811
|
-
case "ResourceNotFoundException":
|
|
1812
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1813
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1814
|
-
case "ServiceUnavailableException":
|
|
1815
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1816
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1817
|
-
default:
|
|
1818
|
-
const parsedBody = parsedOutput.body;
|
|
1819
|
-
return throwDefaultError({
|
|
1820
|
-
output,
|
|
1821
|
-
parsedBody,
|
|
1822
|
-
errorCode,
|
|
1823
|
-
});
|
|
1824
|
-
}
|
|
1825
|
-
};
|
|
1826
|
-
const de_UploadMultipartPartCommand = async (output, context) => {
|
|
1827
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
1828
|
-
return de_UploadMultipartPartCommandError(output, context);
|
|
1829
|
-
}
|
|
1830
|
-
const contents = (0, smithy_client_1.map)({
|
|
1831
|
-
$metadata: deserializeMetadata(output),
|
|
1832
|
-
[_c]: [, output.headers[_xasth]],
|
|
1833
|
-
});
|
|
1834
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1835
|
-
return contents;
|
|
1836
|
-
};
|
|
1837
|
-
exports.de_UploadMultipartPartCommand = de_UploadMultipartPartCommand;
|
|
1838
|
-
const de_UploadMultipartPartCommandError = async (output, context) => {
|
|
1839
|
-
const parsedOutput = {
|
|
1840
|
-
...output,
|
|
1841
|
-
body: await parseErrorBody(output.body, context),
|
|
1842
|
-
};
|
|
1843
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1844
|
-
switch (errorCode) {
|
|
1845
|
-
case "InvalidParameterValueException":
|
|
1846
|
-
case "com.amazonaws.glacier#InvalidParameterValueException":
|
|
1847
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1848
|
-
case "MissingParameterValueException":
|
|
1849
|
-
case "com.amazonaws.glacier#MissingParameterValueException":
|
|
1850
|
-
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);
|
|
1851
|
-
case "RequestTimeoutException":
|
|
1852
|
-
case "com.amazonaws.glacier#RequestTimeoutException":
|
|
1853
|
-
throw await de_RequestTimeoutExceptionRes(parsedOutput, context);
|
|
1854
|
-
case "ResourceNotFoundException":
|
|
1855
|
-
case "com.amazonaws.glacier#ResourceNotFoundException":
|
|
1856
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1857
|
-
case "ServiceUnavailableException":
|
|
1858
|
-
case "com.amazonaws.glacier#ServiceUnavailableException":
|
|
1859
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1860
|
-
default:
|
|
1861
|
-
const parsedBody = parsedOutput.body;
|
|
1862
|
-
return throwDefaultError({
|
|
1863
|
-
output,
|
|
1864
|
-
parsedBody,
|
|
1865
|
-
errorCode,
|
|
1866
|
-
});
|
|
1867
|
-
}
|
|
1868
|
-
};
|
|
1869
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(GlacierServiceException_1.GlacierServiceException);
|
|
1870
|
-
const de_InsufficientCapacityExceptionRes = async (parsedOutput, context) => {
|
|
1871
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1872
|
-
const data = parsedOutput.body;
|
|
1873
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1874
|
-
code: smithy_client_1.expectString,
|
|
1875
|
-
message: smithy_client_1.expectString,
|
|
1876
|
-
type: smithy_client_1.expectString,
|
|
1877
|
-
});
|
|
1878
|
-
Object.assign(contents, doc);
|
|
1879
|
-
const exception = new models_0_1.InsufficientCapacityException({
|
|
1880
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1881
|
-
...contents,
|
|
1882
|
-
});
|
|
1883
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1884
|
-
};
|
|
1885
|
-
const de_InvalidParameterValueExceptionRes = async (parsedOutput, context) => {
|
|
1886
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1887
|
-
const data = parsedOutput.body;
|
|
1888
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1889
|
-
code: smithy_client_1.expectString,
|
|
1890
|
-
message: smithy_client_1.expectString,
|
|
1891
|
-
type: smithy_client_1.expectString,
|
|
1892
|
-
});
|
|
1893
|
-
Object.assign(contents, doc);
|
|
1894
|
-
const exception = new models_0_1.InvalidParameterValueException({
|
|
1895
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1896
|
-
...contents,
|
|
1897
|
-
});
|
|
1898
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1899
|
-
};
|
|
1900
|
-
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
1901
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1902
|
-
const data = parsedOutput.body;
|
|
1903
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1904
|
-
code: smithy_client_1.expectString,
|
|
1905
|
-
message: smithy_client_1.expectString,
|
|
1906
|
-
type: smithy_client_1.expectString,
|
|
1907
|
-
});
|
|
1908
|
-
Object.assign(contents, doc);
|
|
1909
|
-
const exception = new models_0_1.LimitExceededException({
|
|
1910
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1911
|
-
...contents,
|
|
1912
|
-
});
|
|
1913
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1914
|
-
};
|
|
1915
|
-
const de_MissingParameterValueExceptionRes = async (parsedOutput, context) => {
|
|
1916
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1917
|
-
const data = parsedOutput.body;
|
|
1918
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1919
|
-
code: smithy_client_1.expectString,
|
|
1920
|
-
message: smithy_client_1.expectString,
|
|
1921
|
-
type: smithy_client_1.expectString,
|
|
1922
|
-
});
|
|
1923
|
-
Object.assign(contents, doc);
|
|
1924
|
-
const exception = new models_0_1.MissingParameterValueException({
|
|
1925
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1926
|
-
...contents,
|
|
1927
|
-
});
|
|
1928
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1929
|
-
};
|
|
1930
|
-
const de_PolicyEnforcedExceptionRes = async (parsedOutput, context) => {
|
|
1931
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1932
|
-
const data = parsedOutput.body;
|
|
1933
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1934
|
-
code: smithy_client_1.expectString,
|
|
1935
|
-
message: smithy_client_1.expectString,
|
|
1936
|
-
type: smithy_client_1.expectString,
|
|
1937
|
-
});
|
|
1938
|
-
Object.assign(contents, doc);
|
|
1939
|
-
const exception = new models_0_1.PolicyEnforcedException({
|
|
1940
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1941
|
-
...contents,
|
|
1942
|
-
});
|
|
1943
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1944
|
-
};
|
|
1945
|
-
const de_RequestTimeoutExceptionRes = async (parsedOutput, context) => {
|
|
1946
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1947
|
-
const data = parsedOutput.body;
|
|
1948
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1949
|
-
code: smithy_client_1.expectString,
|
|
1950
|
-
message: smithy_client_1.expectString,
|
|
1951
|
-
type: smithy_client_1.expectString,
|
|
1952
|
-
});
|
|
1953
|
-
Object.assign(contents, doc);
|
|
1954
|
-
const exception = new models_0_1.RequestTimeoutException({
|
|
1955
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1956
|
-
...contents,
|
|
1957
|
-
});
|
|
1958
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1959
|
-
};
|
|
1960
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1961
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1962
|
-
const data = parsedOutput.body;
|
|
1963
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1964
|
-
code: smithy_client_1.expectString,
|
|
1965
|
-
message: smithy_client_1.expectString,
|
|
1966
|
-
type: smithy_client_1.expectString,
|
|
1967
|
-
});
|
|
1968
|
-
Object.assign(contents, doc);
|
|
1969
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1970
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1971
|
-
...contents,
|
|
1972
|
-
});
|
|
1973
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1974
|
-
};
|
|
1975
|
-
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
1976
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1977
|
-
const data = parsedOutput.body;
|
|
1978
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1979
|
-
code: smithy_client_1.expectString,
|
|
1980
|
-
message: smithy_client_1.expectString,
|
|
1981
|
-
type: smithy_client_1.expectString,
|
|
1982
|
-
});
|
|
1983
|
-
Object.assign(contents, doc);
|
|
1984
|
-
const exception = new models_0_1.ServiceUnavailableException({
|
|
1985
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1986
|
-
...contents,
|
|
1987
|
-
});
|
|
1988
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1989
|
-
};
|
|
1990
|
-
const deserializeMetadata = (output) => ({
|
|
1991
|
-
httpStatusCode: output.statusCode,
|
|
1992
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1993
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1994
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1995
|
-
});
|
|
1996
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1997
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1998
|
-
value !== null &&
|
|
1999
|
-
value !== "" &&
|
|
2000
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
2001
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
2002
|
-
const _aD = "archiveDescription";
|
|
2003
|
-
const _aI = "archiveId";
|
|
2004
|
-
const _aR = "acceptRanges";
|
|
2005
|
-
const _aS = "archiveSize";
|
|
2006
|
-
const _ar = "accept-ranges";
|
|
2007
|
-
const _c = "checksum";
|
|
2008
|
-
const _cI = "capacityId";
|
|
2009
|
-
const _cR = "contentRange";
|
|
2010
|
-
const _cT = "contentType";
|
|
2011
|
-
const _co = "completed";
|
|
2012
|
-
const _cr = "content-range";
|
|
2013
|
-
const _ct = "content-type";
|
|
2014
|
-
const _jI = "jobId";
|
|
2015
|
-
const _jOP = "jobOutputPath";
|
|
2016
|
-
const _l = "limit";
|
|
2017
|
-
const _lI = "lockId";
|
|
2018
|
-
const _lo = "location";
|
|
2019
|
-
const _m = "marker";
|
|
2020
|
-
const _o = "operation";
|
|
2021
|
-
const _pS = "partSize";
|
|
2022
|
-
const _r = "range";
|
|
2023
|
-
const _s = "statuscode";
|
|
2024
|
-
const _uI = "uploadId";
|
|
2025
|
-
const _xaad = "x-amz-archive-description";
|
|
2026
|
-
const _xaai = "x-amz-archive-id";
|
|
2027
|
-
const _xaas = "x-amz-archive-size";
|
|
2028
|
-
const _xaci = "x-amz-capacity-id";
|
|
2029
|
-
const _xaji = "x-amz-job-id";
|
|
2030
|
-
const _xajop = "x-amz-job-output-path";
|
|
2031
|
-
const _xali = "x-amz-lock-id";
|
|
2032
|
-
const _xamui = "x-amz-multipart-upload-id";
|
|
2033
|
-
const _xaps = "x-amz-part-size";
|
|
2034
|
-
const _xasth = "x-amz-sha256-tree-hash";
|
|
2035
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
2036
|
-
if (encoded.length) {
|
|
2037
|
-
return JSON.parse(encoded);
|
|
2038
|
-
}
|
|
2039
|
-
return {};
|
|
2040
|
-
});
|
|
2041
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
2042
|
-
const value = await parseBody(errorBody, context);
|
|
2043
|
-
value.message = value.message ?? value.Message;
|
|
2044
|
-
return value;
|
|
2045
|
-
};
|
|
2046
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
2047
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2048
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
2049
|
-
let cleanValue = rawValue;
|
|
2050
|
-
if (typeof cleanValue === "number") {
|
|
2051
|
-
cleanValue = cleanValue.toString();
|
|
2052
|
-
}
|
|
2053
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
2054
|
-
cleanValue = cleanValue.split(",")[0];
|
|
2055
|
-
}
|
|
2056
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
2057
|
-
cleanValue = cleanValue.split(":")[0];
|
|
2058
|
-
}
|
|
2059
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
2060
|
-
cleanValue = cleanValue.split("#")[1];
|
|
2061
|
-
}
|
|
2062
|
-
return cleanValue;
|
|
2063
|
-
};
|
|
2064
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2065
|
-
if (headerKey !== undefined) {
|
|
2066
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2067
|
-
}
|
|
2068
|
-
if (data.code !== undefined) {
|
|
2069
|
-
return sanitizeErrorCode(data.code);
|
|
2070
|
-
}
|
|
2071
|
-
if (data["__type"] !== undefined) {
|
|
2072
|
-
return sanitizeErrorCode(data["__type"]);
|
|
2073
|
-
}
|
|
2074
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|