@aws-sdk/client-kms 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/KMS.js +1 -111
- package/dist-cjs/KMSClient.js +1 -43
- package/dist-cjs/commands/CancelKeyDeletionCommand.js +1 -28
- package/dist-cjs/commands/ConnectCustomKeyStoreCommand.js +1 -28
- package/dist-cjs/commands/CreateAliasCommand.js +1 -28
- package/dist-cjs/commands/CreateCustomKeyStoreCommand.js +1 -29
- package/dist-cjs/commands/CreateGrantCommand.js +1 -28
- package/dist-cjs/commands/CreateKeyCommand.js +1 -28
- package/dist-cjs/commands/DecryptCommand.js +1 -29
- package/dist-cjs/commands/DeleteAliasCommand.js +1 -28
- package/dist-cjs/commands/DeleteCustomKeyStoreCommand.js +1 -28
- package/dist-cjs/commands/DeleteImportedKeyMaterialCommand.js +1 -28
- package/dist-cjs/commands/DescribeCustomKeyStoresCommand.js +1 -29
- package/dist-cjs/commands/DescribeKeyCommand.js +1 -28
- package/dist-cjs/commands/DisableKeyCommand.js +1 -28
- package/dist-cjs/commands/DisableKeyRotationCommand.js +1 -28
- package/dist-cjs/commands/DisconnectCustomKeyStoreCommand.js +1 -28
- package/dist-cjs/commands/EnableKeyCommand.js +1 -28
- package/dist-cjs/commands/EnableKeyRotationCommand.js +1 -28
- package/dist-cjs/commands/EncryptCommand.js +1 -29
- package/dist-cjs/commands/GenerateDataKeyCommand.js +1 -29
- package/dist-cjs/commands/GenerateDataKeyPairCommand.js +1 -29
- package/dist-cjs/commands/GenerateDataKeyPairWithoutPlaintextCommand.js +1 -28
- package/dist-cjs/commands/GenerateDataKeyWithoutPlaintextCommand.js +1 -28
- package/dist-cjs/commands/GenerateMacCommand.js +1 -29
- package/dist-cjs/commands/GenerateRandomCommand.js +1 -29
- package/dist-cjs/commands/GetKeyPolicyCommand.js +1 -28
- package/dist-cjs/commands/GetKeyRotationStatusCommand.js +1 -28
- package/dist-cjs/commands/GetParametersForImportCommand.js +1 -29
- package/dist-cjs/commands/GetPublicKeyCommand.js +1 -28
- package/dist-cjs/commands/ImportKeyMaterialCommand.js +1 -28
- package/dist-cjs/commands/ListAliasesCommand.js +1 -28
- package/dist-cjs/commands/ListGrantsCommand.js +1 -28
- package/dist-cjs/commands/ListKeyPoliciesCommand.js +1 -28
- package/dist-cjs/commands/ListKeysCommand.js +1 -28
- package/dist-cjs/commands/ListResourceTagsCommand.js +1 -28
- package/dist-cjs/commands/ListRetirableGrantsCommand.js +1 -28
- package/dist-cjs/commands/PutKeyPolicyCommand.js +1 -28
- package/dist-cjs/commands/ReEncryptCommand.js +1 -28
- package/dist-cjs/commands/ReplicateKeyCommand.js +1 -28
- package/dist-cjs/commands/RetireGrantCommand.js +1 -28
- package/dist-cjs/commands/RevokeGrantCommand.js +1 -28
- package/dist-cjs/commands/ScheduleKeyDeletionCommand.js +1 -28
- package/dist-cjs/commands/SignCommand.js +1 -29
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateAliasCommand.js +1 -28
- package/dist-cjs/commands/UpdateCustomKeyStoreCommand.js +1 -29
- package/dist-cjs/commands/UpdateKeyDescriptionCommand.js +1 -28
- package/dist-cjs/commands/UpdatePrimaryRegionCommand.js +1 -28
- package/dist-cjs/commands/VerifyCommand.js +1 -29
- package/dist-cjs/commands/VerifyMacCommand.js +1 -29
- package/dist-cjs/commands/index.js +1 -53
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +6052 -11
- package/dist-cjs/models/KMSServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -881
- package/dist-cjs/pagination/DescribeCustomKeyStoresPaginator.js +1 -7
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListAliasesPaginator.js +1 -7
- package/dist-cjs/pagination/ListGrantsPaginator.js +1 -7
- package/dist-cjs/pagination/ListKeyPoliciesPaginator.js +1 -7
- package/dist-cjs/pagination/ListKeysPaginator.js +1 -7
- package/dist-cjs/pagination/ListResourceTagsPaginator.js +1 -7
- package/dist-cjs/pagination/ListRetirableGrantsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -11
- package/dist-cjs/protocols/Aws_json1_1.js +1 -3742
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,3742 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.se_VerifyMacCommand = exports.se_VerifyCommand = exports.se_UpdatePrimaryRegionCommand = exports.se_UpdateKeyDescriptionCommand = exports.se_UpdateCustomKeyStoreCommand = exports.se_UpdateAliasCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_SignCommand = exports.se_ScheduleKeyDeletionCommand = exports.se_RevokeGrantCommand = exports.se_RetireGrantCommand = exports.se_ReplicateKeyCommand = exports.se_ReEncryptCommand = exports.se_PutKeyPolicyCommand = exports.se_ListRetirableGrantsCommand = exports.se_ListResourceTagsCommand = exports.se_ListKeysCommand = exports.se_ListKeyPoliciesCommand = exports.se_ListGrantsCommand = exports.se_ListAliasesCommand = exports.se_ImportKeyMaterialCommand = exports.se_GetPublicKeyCommand = exports.se_GetParametersForImportCommand = exports.se_GetKeyRotationStatusCommand = exports.se_GetKeyPolicyCommand = exports.se_GenerateRandomCommand = exports.se_GenerateMacCommand = exports.se_GenerateDataKeyWithoutPlaintextCommand = exports.se_GenerateDataKeyPairWithoutPlaintextCommand = exports.se_GenerateDataKeyPairCommand = exports.se_GenerateDataKeyCommand = exports.se_EncryptCommand = exports.se_EnableKeyRotationCommand = exports.se_EnableKeyCommand = exports.se_DisconnectCustomKeyStoreCommand = exports.se_DisableKeyRotationCommand = exports.se_DisableKeyCommand = exports.se_DescribeKeyCommand = exports.se_DescribeCustomKeyStoresCommand = exports.se_DeleteImportedKeyMaterialCommand = exports.se_DeleteCustomKeyStoreCommand = exports.se_DeleteAliasCommand = exports.se_DecryptCommand = exports.se_CreateKeyCommand = exports.se_CreateGrantCommand = exports.se_CreateCustomKeyStoreCommand = exports.se_CreateAliasCommand = exports.se_ConnectCustomKeyStoreCommand = exports.se_CancelKeyDeletionCommand = void 0;
|
|
4
|
-
exports.de_VerifyMacCommand = exports.de_VerifyCommand = exports.de_UpdatePrimaryRegionCommand = exports.de_UpdateKeyDescriptionCommand = exports.de_UpdateCustomKeyStoreCommand = exports.de_UpdateAliasCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_SignCommand = exports.de_ScheduleKeyDeletionCommand = exports.de_RevokeGrantCommand = exports.de_RetireGrantCommand = exports.de_ReplicateKeyCommand = exports.de_ReEncryptCommand = exports.de_PutKeyPolicyCommand = exports.de_ListRetirableGrantsCommand = exports.de_ListResourceTagsCommand = exports.de_ListKeysCommand = exports.de_ListKeyPoliciesCommand = exports.de_ListGrantsCommand = exports.de_ListAliasesCommand = exports.de_ImportKeyMaterialCommand = exports.de_GetPublicKeyCommand = exports.de_GetParametersForImportCommand = exports.de_GetKeyRotationStatusCommand = exports.de_GetKeyPolicyCommand = exports.de_GenerateRandomCommand = exports.de_GenerateMacCommand = exports.de_GenerateDataKeyWithoutPlaintextCommand = exports.de_GenerateDataKeyPairWithoutPlaintextCommand = exports.de_GenerateDataKeyPairCommand = exports.de_GenerateDataKeyCommand = exports.de_EncryptCommand = exports.de_EnableKeyRotationCommand = exports.de_EnableKeyCommand = exports.de_DisconnectCustomKeyStoreCommand = exports.de_DisableKeyRotationCommand = exports.de_DisableKeyCommand = exports.de_DescribeKeyCommand = exports.de_DescribeCustomKeyStoresCommand = exports.de_DeleteImportedKeyMaterialCommand = exports.de_DeleteCustomKeyStoreCommand = exports.de_DeleteAliasCommand = exports.de_DecryptCommand = exports.de_CreateKeyCommand = exports.de_CreateGrantCommand = exports.de_CreateCustomKeyStoreCommand = exports.de_CreateAliasCommand = exports.de_ConnectCustomKeyStoreCommand = exports.de_CancelKeyDeletionCommand = void 0;
|
|
5
|
-
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const KMSServiceException_1 = require("../models/KMSServiceException");
|
|
8
|
-
const models_0_1 = require("../models/models_0");
|
|
9
|
-
const se_CancelKeyDeletionCommand = async (input, context) => {
|
|
10
|
-
const headers = sharedHeaders("CancelKeyDeletion");
|
|
11
|
-
let body;
|
|
12
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
13
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
14
|
-
};
|
|
15
|
-
exports.se_CancelKeyDeletionCommand = se_CancelKeyDeletionCommand;
|
|
16
|
-
const se_ConnectCustomKeyStoreCommand = async (input, context) => {
|
|
17
|
-
const headers = sharedHeaders("ConnectCustomKeyStore");
|
|
18
|
-
let body;
|
|
19
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
20
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
21
|
-
};
|
|
22
|
-
exports.se_ConnectCustomKeyStoreCommand = se_ConnectCustomKeyStoreCommand;
|
|
23
|
-
const se_CreateAliasCommand = async (input, context) => {
|
|
24
|
-
const headers = sharedHeaders("CreateAlias");
|
|
25
|
-
let body;
|
|
26
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
27
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
28
|
-
};
|
|
29
|
-
exports.se_CreateAliasCommand = se_CreateAliasCommand;
|
|
30
|
-
const se_CreateCustomKeyStoreCommand = async (input, context) => {
|
|
31
|
-
const headers = sharedHeaders("CreateCustomKeyStore");
|
|
32
|
-
let body;
|
|
33
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
34
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
35
|
-
};
|
|
36
|
-
exports.se_CreateCustomKeyStoreCommand = se_CreateCustomKeyStoreCommand;
|
|
37
|
-
const se_CreateGrantCommand = async (input, context) => {
|
|
38
|
-
const headers = sharedHeaders("CreateGrant");
|
|
39
|
-
let body;
|
|
40
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
41
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
42
|
-
};
|
|
43
|
-
exports.se_CreateGrantCommand = se_CreateGrantCommand;
|
|
44
|
-
const se_CreateKeyCommand = async (input, context) => {
|
|
45
|
-
const headers = sharedHeaders("CreateKey");
|
|
46
|
-
let body;
|
|
47
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
48
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
-
};
|
|
50
|
-
exports.se_CreateKeyCommand = se_CreateKeyCommand;
|
|
51
|
-
const se_DecryptCommand = async (input, context) => {
|
|
52
|
-
const headers = sharedHeaders("Decrypt");
|
|
53
|
-
let body;
|
|
54
|
-
body = JSON.stringify(se_DecryptRequest(input, context));
|
|
55
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
56
|
-
};
|
|
57
|
-
exports.se_DecryptCommand = se_DecryptCommand;
|
|
58
|
-
const se_DeleteAliasCommand = async (input, context) => {
|
|
59
|
-
const headers = sharedHeaders("DeleteAlias");
|
|
60
|
-
let body;
|
|
61
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
62
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
63
|
-
};
|
|
64
|
-
exports.se_DeleteAliasCommand = se_DeleteAliasCommand;
|
|
65
|
-
const se_DeleteCustomKeyStoreCommand = async (input, context) => {
|
|
66
|
-
const headers = sharedHeaders("DeleteCustomKeyStore");
|
|
67
|
-
let body;
|
|
68
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
69
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
70
|
-
};
|
|
71
|
-
exports.se_DeleteCustomKeyStoreCommand = se_DeleteCustomKeyStoreCommand;
|
|
72
|
-
const se_DeleteImportedKeyMaterialCommand = async (input, context) => {
|
|
73
|
-
const headers = sharedHeaders("DeleteImportedKeyMaterial");
|
|
74
|
-
let body;
|
|
75
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
76
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
77
|
-
};
|
|
78
|
-
exports.se_DeleteImportedKeyMaterialCommand = se_DeleteImportedKeyMaterialCommand;
|
|
79
|
-
const se_DescribeCustomKeyStoresCommand = async (input, context) => {
|
|
80
|
-
const headers = sharedHeaders("DescribeCustomKeyStores");
|
|
81
|
-
let body;
|
|
82
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
83
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
84
|
-
};
|
|
85
|
-
exports.se_DescribeCustomKeyStoresCommand = se_DescribeCustomKeyStoresCommand;
|
|
86
|
-
const se_DescribeKeyCommand = async (input, context) => {
|
|
87
|
-
const headers = sharedHeaders("DescribeKey");
|
|
88
|
-
let body;
|
|
89
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
90
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
91
|
-
};
|
|
92
|
-
exports.se_DescribeKeyCommand = se_DescribeKeyCommand;
|
|
93
|
-
const se_DisableKeyCommand = async (input, context) => {
|
|
94
|
-
const headers = sharedHeaders("DisableKey");
|
|
95
|
-
let body;
|
|
96
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
97
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
98
|
-
};
|
|
99
|
-
exports.se_DisableKeyCommand = se_DisableKeyCommand;
|
|
100
|
-
const se_DisableKeyRotationCommand = async (input, context) => {
|
|
101
|
-
const headers = sharedHeaders("DisableKeyRotation");
|
|
102
|
-
let body;
|
|
103
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
104
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
105
|
-
};
|
|
106
|
-
exports.se_DisableKeyRotationCommand = se_DisableKeyRotationCommand;
|
|
107
|
-
const se_DisconnectCustomKeyStoreCommand = async (input, context) => {
|
|
108
|
-
const headers = sharedHeaders("DisconnectCustomKeyStore");
|
|
109
|
-
let body;
|
|
110
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
111
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
112
|
-
};
|
|
113
|
-
exports.se_DisconnectCustomKeyStoreCommand = se_DisconnectCustomKeyStoreCommand;
|
|
114
|
-
const se_EnableKeyCommand = async (input, context) => {
|
|
115
|
-
const headers = sharedHeaders("EnableKey");
|
|
116
|
-
let body;
|
|
117
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
118
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
119
|
-
};
|
|
120
|
-
exports.se_EnableKeyCommand = se_EnableKeyCommand;
|
|
121
|
-
const se_EnableKeyRotationCommand = async (input, context) => {
|
|
122
|
-
const headers = sharedHeaders("EnableKeyRotation");
|
|
123
|
-
let body;
|
|
124
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
125
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
126
|
-
};
|
|
127
|
-
exports.se_EnableKeyRotationCommand = se_EnableKeyRotationCommand;
|
|
128
|
-
const se_EncryptCommand = async (input, context) => {
|
|
129
|
-
const headers = sharedHeaders("Encrypt");
|
|
130
|
-
let body;
|
|
131
|
-
body = JSON.stringify(se_EncryptRequest(input, context));
|
|
132
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
133
|
-
};
|
|
134
|
-
exports.se_EncryptCommand = se_EncryptCommand;
|
|
135
|
-
const se_GenerateDataKeyCommand = async (input, context) => {
|
|
136
|
-
const headers = sharedHeaders("GenerateDataKey");
|
|
137
|
-
let body;
|
|
138
|
-
body = JSON.stringify(se_GenerateDataKeyRequest(input, context));
|
|
139
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
140
|
-
};
|
|
141
|
-
exports.se_GenerateDataKeyCommand = se_GenerateDataKeyCommand;
|
|
142
|
-
const se_GenerateDataKeyPairCommand = async (input, context) => {
|
|
143
|
-
const headers = sharedHeaders("GenerateDataKeyPair");
|
|
144
|
-
let body;
|
|
145
|
-
body = JSON.stringify(se_GenerateDataKeyPairRequest(input, context));
|
|
146
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
147
|
-
};
|
|
148
|
-
exports.se_GenerateDataKeyPairCommand = se_GenerateDataKeyPairCommand;
|
|
149
|
-
const se_GenerateDataKeyPairWithoutPlaintextCommand = async (input, context) => {
|
|
150
|
-
const headers = sharedHeaders("GenerateDataKeyPairWithoutPlaintext");
|
|
151
|
-
let body;
|
|
152
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
153
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
154
|
-
};
|
|
155
|
-
exports.se_GenerateDataKeyPairWithoutPlaintextCommand = se_GenerateDataKeyPairWithoutPlaintextCommand;
|
|
156
|
-
const se_GenerateDataKeyWithoutPlaintextCommand = async (input, context) => {
|
|
157
|
-
const headers = sharedHeaders("GenerateDataKeyWithoutPlaintext");
|
|
158
|
-
let body;
|
|
159
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
160
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
161
|
-
};
|
|
162
|
-
exports.se_GenerateDataKeyWithoutPlaintextCommand = se_GenerateDataKeyWithoutPlaintextCommand;
|
|
163
|
-
const se_GenerateMacCommand = async (input, context) => {
|
|
164
|
-
const headers = sharedHeaders("GenerateMac");
|
|
165
|
-
let body;
|
|
166
|
-
body = JSON.stringify(se_GenerateMacRequest(input, context));
|
|
167
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
168
|
-
};
|
|
169
|
-
exports.se_GenerateMacCommand = se_GenerateMacCommand;
|
|
170
|
-
const se_GenerateRandomCommand = async (input, context) => {
|
|
171
|
-
const headers = sharedHeaders("GenerateRandom");
|
|
172
|
-
let body;
|
|
173
|
-
body = JSON.stringify(se_GenerateRandomRequest(input, context));
|
|
174
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
175
|
-
};
|
|
176
|
-
exports.se_GenerateRandomCommand = se_GenerateRandomCommand;
|
|
177
|
-
const se_GetKeyPolicyCommand = async (input, context) => {
|
|
178
|
-
const headers = sharedHeaders("GetKeyPolicy");
|
|
179
|
-
let body;
|
|
180
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
181
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
182
|
-
};
|
|
183
|
-
exports.se_GetKeyPolicyCommand = se_GetKeyPolicyCommand;
|
|
184
|
-
const se_GetKeyRotationStatusCommand = async (input, context) => {
|
|
185
|
-
const headers = sharedHeaders("GetKeyRotationStatus");
|
|
186
|
-
let body;
|
|
187
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
188
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
189
|
-
};
|
|
190
|
-
exports.se_GetKeyRotationStatusCommand = se_GetKeyRotationStatusCommand;
|
|
191
|
-
const se_GetParametersForImportCommand = async (input, context) => {
|
|
192
|
-
const headers = sharedHeaders("GetParametersForImport");
|
|
193
|
-
let body;
|
|
194
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
195
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
196
|
-
};
|
|
197
|
-
exports.se_GetParametersForImportCommand = se_GetParametersForImportCommand;
|
|
198
|
-
const se_GetPublicKeyCommand = async (input, context) => {
|
|
199
|
-
const headers = sharedHeaders("GetPublicKey");
|
|
200
|
-
let body;
|
|
201
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
202
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
203
|
-
};
|
|
204
|
-
exports.se_GetPublicKeyCommand = se_GetPublicKeyCommand;
|
|
205
|
-
const se_ImportKeyMaterialCommand = async (input, context) => {
|
|
206
|
-
const headers = sharedHeaders("ImportKeyMaterial");
|
|
207
|
-
let body;
|
|
208
|
-
body = JSON.stringify(se_ImportKeyMaterialRequest(input, context));
|
|
209
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
210
|
-
};
|
|
211
|
-
exports.se_ImportKeyMaterialCommand = se_ImportKeyMaterialCommand;
|
|
212
|
-
const se_ListAliasesCommand = async (input, context) => {
|
|
213
|
-
const headers = sharedHeaders("ListAliases");
|
|
214
|
-
let body;
|
|
215
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
216
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
217
|
-
};
|
|
218
|
-
exports.se_ListAliasesCommand = se_ListAliasesCommand;
|
|
219
|
-
const se_ListGrantsCommand = async (input, context) => {
|
|
220
|
-
const headers = sharedHeaders("ListGrants");
|
|
221
|
-
let body;
|
|
222
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
223
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
224
|
-
};
|
|
225
|
-
exports.se_ListGrantsCommand = se_ListGrantsCommand;
|
|
226
|
-
const se_ListKeyPoliciesCommand = async (input, context) => {
|
|
227
|
-
const headers = sharedHeaders("ListKeyPolicies");
|
|
228
|
-
let body;
|
|
229
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
230
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
231
|
-
};
|
|
232
|
-
exports.se_ListKeyPoliciesCommand = se_ListKeyPoliciesCommand;
|
|
233
|
-
const se_ListKeysCommand = async (input, context) => {
|
|
234
|
-
const headers = sharedHeaders("ListKeys");
|
|
235
|
-
let body;
|
|
236
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
237
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
238
|
-
};
|
|
239
|
-
exports.se_ListKeysCommand = se_ListKeysCommand;
|
|
240
|
-
const se_ListResourceTagsCommand = async (input, context) => {
|
|
241
|
-
const headers = sharedHeaders("ListResourceTags");
|
|
242
|
-
let body;
|
|
243
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
244
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
245
|
-
};
|
|
246
|
-
exports.se_ListResourceTagsCommand = se_ListResourceTagsCommand;
|
|
247
|
-
const se_ListRetirableGrantsCommand = async (input, context) => {
|
|
248
|
-
const headers = sharedHeaders("ListRetirableGrants");
|
|
249
|
-
let body;
|
|
250
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
251
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
252
|
-
};
|
|
253
|
-
exports.se_ListRetirableGrantsCommand = se_ListRetirableGrantsCommand;
|
|
254
|
-
const se_PutKeyPolicyCommand = async (input, context) => {
|
|
255
|
-
const headers = sharedHeaders("PutKeyPolicy");
|
|
256
|
-
let body;
|
|
257
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
258
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
259
|
-
};
|
|
260
|
-
exports.se_PutKeyPolicyCommand = se_PutKeyPolicyCommand;
|
|
261
|
-
const se_ReEncryptCommand = async (input, context) => {
|
|
262
|
-
const headers = sharedHeaders("ReEncrypt");
|
|
263
|
-
let body;
|
|
264
|
-
body = JSON.stringify(se_ReEncryptRequest(input, context));
|
|
265
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
266
|
-
};
|
|
267
|
-
exports.se_ReEncryptCommand = se_ReEncryptCommand;
|
|
268
|
-
const se_ReplicateKeyCommand = async (input, context) => {
|
|
269
|
-
const headers = sharedHeaders("ReplicateKey");
|
|
270
|
-
let body;
|
|
271
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
272
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
273
|
-
};
|
|
274
|
-
exports.se_ReplicateKeyCommand = se_ReplicateKeyCommand;
|
|
275
|
-
const se_RetireGrantCommand = async (input, context) => {
|
|
276
|
-
const headers = sharedHeaders("RetireGrant");
|
|
277
|
-
let body;
|
|
278
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
279
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
280
|
-
};
|
|
281
|
-
exports.se_RetireGrantCommand = se_RetireGrantCommand;
|
|
282
|
-
const se_RevokeGrantCommand = async (input, context) => {
|
|
283
|
-
const headers = sharedHeaders("RevokeGrant");
|
|
284
|
-
let body;
|
|
285
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
286
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
287
|
-
};
|
|
288
|
-
exports.se_RevokeGrantCommand = se_RevokeGrantCommand;
|
|
289
|
-
const se_ScheduleKeyDeletionCommand = async (input, context) => {
|
|
290
|
-
const headers = sharedHeaders("ScheduleKeyDeletion");
|
|
291
|
-
let body;
|
|
292
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
293
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
294
|
-
};
|
|
295
|
-
exports.se_ScheduleKeyDeletionCommand = se_ScheduleKeyDeletionCommand;
|
|
296
|
-
const se_SignCommand = async (input, context) => {
|
|
297
|
-
const headers = sharedHeaders("Sign");
|
|
298
|
-
let body;
|
|
299
|
-
body = JSON.stringify(se_SignRequest(input, context));
|
|
300
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
301
|
-
};
|
|
302
|
-
exports.se_SignCommand = se_SignCommand;
|
|
303
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
304
|
-
const headers = sharedHeaders("TagResource");
|
|
305
|
-
let body;
|
|
306
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
307
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
308
|
-
};
|
|
309
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
310
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
311
|
-
const headers = sharedHeaders("UntagResource");
|
|
312
|
-
let body;
|
|
313
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
314
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
315
|
-
};
|
|
316
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
317
|
-
const se_UpdateAliasCommand = async (input, context) => {
|
|
318
|
-
const headers = sharedHeaders("UpdateAlias");
|
|
319
|
-
let body;
|
|
320
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
321
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
322
|
-
};
|
|
323
|
-
exports.se_UpdateAliasCommand = se_UpdateAliasCommand;
|
|
324
|
-
const se_UpdateCustomKeyStoreCommand = async (input, context) => {
|
|
325
|
-
const headers = sharedHeaders("UpdateCustomKeyStore");
|
|
326
|
-
let body;
|
|
327
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
328
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
329
|
-
};
|
|
330
|
-
exports.se_UpdateCustomKeyStoreCommand = se_UpdateCustomKeyStoreCommand;
|
|
331
|
-
const se_UpdateKeyDescriptionCommand = async (input, context) => {
|
|
332
|
-
const headers = sharedHeaders("UpdateKeyDescription");
|
|
333
|
-
let body;
|
|
334
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
335
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
336
|
-
};
|
|
337
|
-
exports.se_UpdateKeyDescriptionCommand = se_UpdateKeyDescriptionCommand;
|
|
338
|
-
const se_UpdatePrimaryRegionCommand = async (input, context) => {
|
|
339
|
-
const headers = sharedHeaders("UpdatePrimaryRegion");
|
|
340
|
-
let body;
|
|
341
|
-
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
342
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
343
|
-
};
|
|
344
|
-
exports.se_UpdatePrimaryRegionCommand = se_UpdatePrimaryRegionCommand;
|
|
345
|
-
const se_VerifyCommand = async (input, context) => {
|
|
346
|
-
const headers = sharedHeaders("Verify");
|
|
347
|
-
let body;
|
|
348
|
-
body = JSON.stringify(se_VerifyRequest(input, context));
|
|
349
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
350
|
-
};
|
|
351
|
-
exports.se_VerifyCommand = se_VerifyCommand;
|
|
352
|
-
const se_VerifyMacCommand = async (input, context) => {
|
|
353
|
-
const headers = sharedHeaders("VerifyMac");
|
|
354
|
-
let body;
|
|
355
|
-
body = JSON.stringify(se_VerifyMacRequest(input, context));
|
|
356
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
357
|
-
};
|
|
358
|
-
exports.se_VerifyMacCommand = se_VerifyMacCommand;
|
|
359
|
-
const de_CancelKeyDeletionCommand = async (output, context) => {
|
|
360
|
-
if (output.statusCode >= 300) {
|
|
361
|
-
return de_CancelKeyDeletionCommandError(output, context);
|
|
362
|
-
}
|
|
363
|
-
const data = await parseBody(output.body, context);
|
|
364
|
-
let contents = {};
|
|
365
|
-
contents = (0, smithy_client_1._json)(data);
|
|
366
|
-
const response = {
|
|
367
|
-
$metadata: deserializeMetadata(output),
|
|
368
|
-
...contents,
|
|
369
|
-
};
|
|
370
|
-
return response;
|
|
371
|
-
};
|
|
372
|
-
exports.de_CancelKeyDeletionCommand = de_CancelKeyDeletionCommand;
|
|
373
|
-
const de_CancelKeyDeletionCommandError = async (output, context) => {
|
|
374
|
-
const parsedOutput = {
|
|
375
|
-
...output,
|
|
376
|
-
body: await parseErrorBody(output.body, context),
|
|
377
|
-
};
|
|
378
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
379
|
-
switch (errorCode) {
|
|
380
|
-
case "DependencyTimeoutException":
|
|
381
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
382
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
383
|
-
case "InvalidArnException":
|
|
384
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
385
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
386
|
-
case "KMSInternalException":
|
|
387
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
388
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
389
|
-
case "KMSInvalidStateException":
|
|
390
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
391
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
392
|
-
case "NotFoundException":
|
|
393
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
394
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
395
|
-
default:
|
|
396
|
-
const parsedBody = parsedOutput.body;
|
|
397
|
-
return throwDefaultError({
|
|
398
|
-
output,
|
|
399
|
-
parsedBody,
|
|
400
|
-
errorCode,
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
};
|
|
404
|
-
const de_ConnectCustomKeyStoreCommand = async (output, context) => {
|
|
405
|
-
if (output.statusCode >= 300) {
|
|
406
|
-
return de_ConnectCustomKeyStoreCommandError(output, context);
|
|
407
|
-
}
|
|
408
|
-
const data = await parseBody(output.body, context);
|
|
409
|
-
let contents = {};
|
|
410
|
-
contents = (0, smithy_client_1._json)(data);
|
|
411
|
-
const response = {
|
|
412
|
-
$metadata: deserializeMetadata(output),
|
|
413
|
-
...contents,
|
|
414
|
-
};
|
|
415
|
-
return response;
|
|
416
|
-
};
|
|
417
|
-
exports.de_ConnectCustomKeyStoreCommand = de_ConnectCustomKeyStoreCommand;
|
|
418
|
-
const de_ConnectCustomKeyStoreCommandError = async (output, context) => {
|
|
419
|
-
const parsedOutput = {
|
|
420
|
-
...output,
|
|
421
|
-
body: await parseErrorBody(output.body, context),
|
|
422
|
-
};
|
|
423
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
424
|
-
switch (errorCode) {
|
|
425
|
-
case "CloudHsmClusterInvalidConfigurationException":
|
|
426
|
-
case "com.amazonaws.kms#CloudHsmClusterInvalidConfigurationException":
|
|
427
|
-
throw await de_CloudHsmClusterInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
428
|
-
case "CloudHsmClusterNotActiveException":
|
|
429
|
-
case "com.amazonaws.kms#CloudHsmClusterNotActiveException":
|
|
430
|
-
throw await de_CloudHsmClusterNotActiveExceptionRes(parsedOutput, context);
|
|
431
|
-
case "CustomKeyStoreInvalidStateException":
|
|
432
|
-
case "com.amazonaws.kms#CustomKeyStoreInvalidStateException":
|
|
433
|
-
throw await de_CustomKeyStoreInvalidStateExceptionRes(parsedOutput, context);
|
|
434
|
-
case "CustomKeyStoreNotFoundException":
|
|
435
|
-
case "com.amazonaws.kms#CustomKeyStoreNotFoundException":
|
|
436
|
-
throw await de_CustomKeyStoreNotFoundExceptionRes(parsedOutput, context);
|
|
437
|
-
case "KMSInternalException":
|
|
438
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
439
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
440
|
-
default:
|
|
441
|
-
const parsedBody = parsedOutput.body;
|
|
442
|
-
return throwDefaultError({
|
|
443
|
-
output,
|
|
444
|
-
parsedBody,
|
|
445
|
-
errorCode,
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
};
|
|
449
|
-
const de_CreateAliasCommand = async (output, context) => {
|
|
450
|
-
if (output.statusCode >= 300) {
|
|
451
|
-
return de_CreateAliasCommandError(output, context);
|
|
452
|
-
}
|
|
453
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
454
|
-
const response = {
|
|
455
|
-
$metadata: deserializeMetadata(output),
|
|
456
|
-
};
|
|
457
|
-
return response;
|
|
458
|
-
};
|
|
459
|
-
exports.de_CreateAliasCommand = de_CreateAliasCommand;
|
|
460
|
-
const de_CreateAliasCommandError = async (output, context) => {
|
|
461
|
-
const parsedOutput = {
|
|
462
|
-
...output,
|
|
463
|
-
body: await parseErrorBody(output.body, context),
|
|
464
|
-
};
|
|
465
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
466
|
-
switch (errorCode) {
|
|
467
|
-
case "AlreadyExistsException":
|
|
468
|
-
case "com.amazonaws.kms#AlreadyExistsException":
|
|
469
|
-
throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
|
|
470
|
-
case "DependencyTimeoutException":
|
|
471
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
472
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
473
|
-
case "InvalidAliasNameException":
|
|
474
|
-
case "com.amazonaws.kms#InvalidAliasNameException":
|
|
475
|
-
throw await de_InvalidAliasNameExceptionRes(parsedOutput, context);
|
|
476
|
-
case "KMSInternalException":
|
|
477
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
478
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
479
|
-
case "KMSInvalidStateException":
|
|
480
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
481
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
482
|
-
case "LimitExceededException":
|
|
483
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
484
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
485
|
-
case "NotFoundException":
|
|
486
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
487
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
488
|
-
default:
|
|
489
|
-
const parsedBody = parsedOutput.body;
|
|
490
|
-
return throwDefaultError({
|
|
491
|
-
output,
|
|
492
|
-
parsedBody,
|
|
493
|
-
errorCode,
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
};
|
|
497
|
-
const de_CreateCustomKeyStoreCommand = async (output, context) => {
|
|
498
|
-
if (output.statusCode >= 300) {
|
|
499
|
-
return de_CreateCustomKeyStoreCommandError(output, context);
|
|
500
|
-
}
|
|
501
|
-
const data = await parseBody(output.body, context);
|
|
502
|
-
let contents = {};
|
|
503
|
-
contents = (0, smithy_client_1._json)(data);
|
|
504
|
-
const response = {
|
|
505
|
-
$metadata: deserializeMetadata(output),
|
|
506
|
-
...contents,
|
|
507
|
-
};
|
|
508
|
-
return response;
|
|
509
|
-
};
|
|
510
|
-
exports.de_CreateCustomKeyStoreCommand = de_CreateCustomKeyStoreCommand;
|
|
511
|
-
const de_CreateCustomKeyStoreCommandError = async (output, context) => {
|
|
512
|
-
const parsedOutput = {
|
|
513
|
-
...output,
|
|
514
|
-
body: await parseErrorBody(output.body, context),
|
|
515
|
-
};
|
|
516
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
517
|
-
switch (errorCode) {
|
|
518
|
-
case "CloudHsmClusterInUseException":
|
|
519
|
-
case "com.amazonaws.kms#CloudHsmClusterInUseException":
|
|
520
|
-
throw await de_CloudHsmClusterInUseExceptionRes(parsedOutput, context);
|
|
521
|
-
case "CloudHsmClusterInvalidConfigurationException":
|
|
522
|
-
case "com.amazonaws.kms#CloudHsmClusterInvalidConfigurationException":
|
|
523
|
-
throw await de_CloudHsmClusterInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
524
|
-
case "CloudHsmClusterNotActiveException":
|
|
525
|
-
case "com.amazonaws.kms#CloudHsmClusterNotActiveException":
|
|
526
|
-
throw await de_CloudHsmClusterNotActiveExceptionRes(parsedOutput, context);
|
|
527
|
-
case "CloudHsmClusterNotFoundException":
|
|
528
|
-
case "com.amazonaws.kms#CloudHsmClusterNotFoundException":
|
|
529
|
-
throw await de_CloudHsmClusterNotFoundExceptionRes(parsedOutput, context);
|
|
530
|
-
case "CustomKeyStoreNameInUseException":
|
|
531
|
-
case "com.amazonaws.kms#CustomKeyStoreNameInUseException":
|
|
532
|
-
throw await de_CustomKeyStoreNameInUseExceptionRes(parsedOutput, context);
|
|
533
|
-
case "IncorrectTrustAnchorException":
|
|
534
|
-
case "com.amazonaws.kms#IncorrectTrustAnchorException":
|
|
535
|
-
throw await de_IncorrectTrustAnchorExceptionRes(parsedOutput, context);
|
|
536
|
-
case "KMSInternalException":
|
|
537
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
538
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
539
|
-
case "LimitExceededException":
|
|
540
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
541
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
542
|
-
case "XksProxyIncorrectAuthenticationCredentialException":
|
|
543
|
-
case "com.amazonaws.kms#XksProxyIncorrectAuthenticationCredentialException":
|
|
544
|
-
throw await de_XksProxyIncorrectAuthenticationCredentialExceptionRes(parsedOutput, context);
|
|
545
|
-
case "XksProxyInvalidConfigurationException":
|
|
546
|
-
case "com.amazonaws.kms#XksProxyInvalidConfigurationException":
|
|
547
|
-
throw await de_XksProxyInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
548
|
-
case "XksProxyInvalidResponseException":
|
|
549
|
-
case "com.amazonaws.kms#XksProxyInvalidResponseException":
|
|
550
|
-
throw await de_XksProxyInvalidResponseExceptionRes(parsedOutput, context);
|
|
551
|
-
case "XksProxyUriEndpointInUseException":
|
|
552
|
-
case "com.amazonaws.kms#XksProxyUriEndpointInUseException":
|
|
553
|
-
throw await de_XksProxyUriEndpointInUseExceptionRes(parsedOutput, context);
|
|
554
|
-
case "XksProxyUriInUseException":
|
|
555
|
-
case "com.amazonaws.kms#XksProxyUriInUseException":
|
|
556
|
-
throw await de_XksProxyUriInUseExceptionRes(parsedOutput, context);
|
|
557
|
-
case "XksProxyUriUnreachableException":
|
|
558
|
-
case "com.amazonaws.kms#XksProxyUriUnreachableException":
|
|
559
|
-
throw await de_XksProxyUriUnreachableExceptionRes(parsedOutput, context);
|
|
560
|
-
case "XksProxyVpcEndpointServiceInUseException":
|
|
561
|
-
case "com.amazonaws.kms#XksProxyVpcEndpointServiceInUseException":
|
|
562
|
-
throw await de_XksProxyVpcEndpointServiceInUseExceptionRes(parsedOutput, context);
|
|
563
|
-
case "XksProxyVpcEndpointServiceInvalidConfigurationException":
|
|
564
|
-
case "com.amazonaws.kms#XksProxyVpcEndpointServiceInvalidConfigurationException":
|
|
565
|
-
throw await de_XksProxyVpcEndpointServiceInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
566
|
-
case "XksProxyVpcEndpointServiceNotFoundException":
|
|
567
|
-
case "com.amazonaws.kms#XksProxyVpcEndpointServiceNotFoundException":
|
|
568
|
-
throw await de_XksProxyVpcEndpointServiceNotFoundExceptionRes(parsedOutput, context);
|
|
569
|
-
default:
|
|
570
|
-
const parsedBody = parsedOutput.body;
|
|
571
|
-
return throwDefaultError({
|
|
572
|
-
output,
|
|
573
|
-
parsedBody,
|
|
574
|
-
errorCode,
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
};
|
|
578
|
-
const de_CreateGrantCommand = async (output, context) => {
|
|
579
|
-
if (output.statusCode >= 300) {
|
|
580
|
-
return de_CreateGrantCommandError(output, context);
|
|
581
|
-
}
|
|
582
|
-
const data = await parseBody(output.body, context);
|
|
583
|
-
let contents = {};
|
|
584
|
-
contents = (0, smithy_client_1._json)(data);
|
|
585
|
-
const response = {
|
|
586
|
-
$metadata: deserializeMetadata(output),
|
|
587
|
-
...contents,
|
|
588
|
-
};
|
|
589
|
-
return response;
|
|
590
|
-
};
|
|
591
|
-
exports.de_CreateGrantCommand = de_CreateGrantCommand;
|
|
592
|
-
const de_CreateGrantCommandError = async (output, context) => {
|
|
593
|
-
const parsedOutput = {
|
|
594
|
-
...output,
|
|
595
|
-
body: await parseErrorBody(output.body, context),
|
|
596
|
-
};
|
|
597
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
598
|
-
switch (errorCode) {
|
|
599
|
-
case "DependencyTimeoutException":
|
|
600
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
601
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
602
|
-
case "DisabledException":
|
|
603
|
-
case "com.amazonaws.kms#DisabledException":
|
|
604
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
605
|
-
case "DryRunOperationException":
|
|
606
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
607
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
608
|
-
case "InvalidArnException":
|
|
609
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
610
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
611
|
-
case "InvalidGrantTokenException":
|
|
612
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
613
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
614
|
-
case "KMSInternalException":
|
|
615
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
616
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
617
|
-
case "KMSInvalidStateException":
|
|
618
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
619
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
620
|
-
case "LimitExceededException":
|
|
621
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
622
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
623
|
-
case "NotFoundException":
|
|
624
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
625
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
626
|
-
default:
|
|
627
|
-
const parsedBody = parsedOutput.body;
|
|
628
|
-
return throwDefaultError({
|
|
629
|
-
output,
|
|
630
|
-
parsedBody,
|
|
631
|
-
errorCode,
|
|
632
|
-
});
|
|
633
|
-
}
|
|
634
|
-
};
|
|
635
|
-
const de_CreateKeyCommand = async (output, context) => {
|
|
636
|
-
if (output.statusCode >= 300) {
|
|
637
|
-
return de_CreateKeyCommandError(output, context);
|
|
638
|
-
}
|
|
639
|
-
const data = await parseBody(output.body, context);
|
|
640
|
-
let contents = {};
|
|
641
|
-
contents = de_CreateKeyResponse(data, context);
|
|
642
|
-
const response = {
|
|
643
|
-
$metadata: deserializeMetadata(output),
|
|
644
|
-
...contents,
|
|
645
|
-
};
|
|
646
|
-
return response;
|
|
647
|
-
};
|
|
648
|
-
exports.de_CreateKeyCommand = de_CreateKeyCommand;
|
|
649
|
-
const de_CreateKeyCommandError = async (output, context) => {
|
|
650
|
-
const parsedOutput = {
|
|
651
|
-
...output,
|
|
652
|
-
body: await parseErrorBody(output.body, context),
|
|
653
|
-
};
|
|
654
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
655
|
-
switch (errorCode) {
|
|
656
|
-
case "CloudHsmClusterInvalidConfigurationException":
|
|
657
|
-
case "com.amazonaws.kms#CloudHsmClusterInvalidConfigurationException":
|
|
658
|
-
throw await de_CloudHsmClusterInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
659
|
-
case "CustomKeyStoreInvalidStateException":
|
|
660
|
-
case "com.amazonaws.kms#CustomKeyStoreInvalidStateException":
|
|
661
|
-
throw await de_CustomKeyStoreInvalidStateExceptionRes(parsedOutput, context);
|
|
662
|
-
case "CustomKeyStoreNotFoundException":
|
|
663
|
-
case "com.amazonaws.kms#CustomKeyStoreNotFoundException":
|
|
664
|
-
throw await de_CustomKeyStoreNotFoundExceptionRes(parsedOutput, context);
|
|
665
|
-
case "DependencyTimeoutException":
|
|
666
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
667
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
668
|
-
case "InvalidArnException":
|
|
669
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
670
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
671
|
-
case "KMSInternalException":
|
|
672
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
673
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
674
|
-
case "LimitExceededException":
|
|
675
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
676
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
677
|
-
case "MalformedPolicyDocumentException":
|
|
678
|
-
case "com.amazonaws.kms#MalformedPolicyDocumentException":
|
|
679
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
680
|
-
case "TagException":
|
|
681
|
-
case "com.amazonaws.kms#TagException":
|
|
682
|
-
throw await de_TagExceptionRes(parsedOutput, context);
|
|
683
|
-
case "UnsupportedOperationException":
|
|
684
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
685
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
686
|
-
case "XksKeyAlreadyInUseException":
|
|
687
|
-
case "com.amazonaws.kms#XksKeyAlreadyInUseException":
|
|
688
|
-
throw await de_XksKeyAlreadyInUseExceptionRes(parsedOutput, context);
|
|
689
|
-
case "XksKeyInvalidConfigurationException":
|
|
690
|
-
case "com.amazonaws.kms#XksKeyInvalidConfigurationException":
|
|
691
|
-
throw await de_XksKeyInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
692
|
-
case "XksKeyNotFoundException":
|
|
693
|
-
case "com.amazonaws.kms#XksKeyNotFoundException":
|
|
694
|
-
throw await de_XksKeyNotFoundExceptionRes(parsedOutput, context);
|
|
695
|
-
default:
|
|
696
|
-
const parsedBody = parsedOutput.body;
|
|
697
|
-
return throwDefaultError({
|
|
698
|
-
output,
|
|
699
|
-
parsedBody,
|
|
700
|
-
errorCode,
|
|
701
|
-
});
|
|
702
|
-
}
|
|
703
|
-
};
|
|
704
|
-
const de_DecryptCommand = async (output, context) => {
|
|
705
|
-
if (output.statusCode >= 300) {
|
|
706
|
-
return de_DecryptCommandError(output, context);
|
|
707
|
-
}
|
|
708
|
-
const data = await parseBody(output.body, context);
|
|
709
|
-
let contents = {};
|
|
710
|
-
contents = de_DecryptResponse(data, context);
|
|
711
|
-
const response = {
|
|
712
|
-
$metadata: deserializeMetadata(output),
|
|
713
|
-
...contents,
|
|
714
|
-
};
|
|
715
|
-
return response;
|
|
716
|
-
};
|
|
717
|
-
exports.de_DecryptCommand = de_DecryptCommand;
|
|
718
|
-
const de_DecryptCommandError = async (output, context) => {
|
|
719
|
-
const parsedOutput = {
|
|
720
|
-
...output,
|
|
721
|
-
body: await parseErrorBody(output.body, context),
|
|
722
|
-
};
|
|
723
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
724
|
-
switch (errorCode) {
|
|
725
|
-
case "DependencyTimeoutException":
|
|
726
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
727
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
728
|
-
case "DisabledException":
|
|
729
|
-
case "com.amazonaws.kms#DisabledException":
|
|
730
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
731
|
-
case "DryRunOperationException":
|
|
732
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
733
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
734
|
-
case "IncorrectKeyException":
|
|
735
|
-
case "com.amazonaws.kms#IncorrectKeyException":
|
|
736
|
-
throw await de_IncorrectKeyExceptionRes(parsedOutput, context);
|
|
737
|
-
case "InvalidCiphertextException":
|
|
738
|
-
case "com.amazonaws.kms#InvalidCiphertextException":
|
|
739
|
-
throw await de_InvalidCiphertextExceptionRes(parsedOutput, context);
|
|
740
|
-
case "InvalidGrantTokenException":
|
|
741
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
742
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
743
|
-
case "InvalidKeyUsageException":
|
|
744
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
745
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
746
|
-
case "KMSInternalException":
|
|
747
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
748
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
749
|
-
case "KMSInvalidStateException":
|
|
750
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
751
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
752
|
-
case "KeyUnavailableException":
|
|
753
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
754
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
755
|
-
case "NotFoundException":
|
|
756
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
757
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
758
|
-
default:
|
|
759
|
-
const parsedBody = parsedOutput.body;
|
|
760
|
-
return throwDefaultError({
|
|
761
|
-
output,
|
|
762
|
-
parsedBody,
|
|
763
|
-
errorCode,
|
|
764
|
-
});
|
|
765
|
-
}
|
|
766
|
-
};
|
|
767
|
-
const de_DeleteAliasCommand = async (output, context) => {
|
|
768
|
-
if (output.statusCode >= 300) {
|
|
769
|
-
return de_DeleteAliasCommandError(output, context);
|
|
770
|
-
}
|
|
771
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
772
|
-
const response = {
|
|
773
|
-
$metadata: deserializeMetadata(output),
|
|
774
|
-
};
|
|
775
|
-
return response;
|
|
776
|
-
};
|
|
777
|
-
exports.de_DeleteAliasCommand = de_DeleteAliasCommand;
|
|
778
|
-
const de_DeleteAliasCommandError = async (output, context) => {
|
|
779
|
-
const parsedOutput = {
|
|
780
|
-
...output,
|
|
781
|
-
body: await parseErrorBody(output.body, context),
|
|
782
|
-
};
|
|
783
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
784
|
-
switch (errorCode) {
|
|
785
|
-
case "DependencyTimeoutException":
|
|
786
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
787
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
788
|
-
case "KMSInternalException":
|
|
789
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
790
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
791
|
-
case "KMSInvalidStateException":
|
|
792
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
793
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
794
|
-
case "NotFoundException":
|
|
795
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
796
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
797
|
-
default:
|
|
798
|
-
const parsedBody = parsedOutput.body;
|
|
799
|
-
return throwDefaultError({
|
|
800
|
-
output,
|
|
801
|
-
parsedBody,
|
|
802
|
-
errorCode,
|
|
803
|
-
});
|
|
804
|
-
}
|
|
805
|
-
};
|
|
806
|
-
const de_DeleteCustomKeyStoreCommand = async (output, context) => {
|
|
807
|
-
if (output.statusCode >= 300) {
|
|
808
|
-
return de_DeleteCustomKeyStoreCommandError(output, context);
|
|
809
|
-
}
|
|
810
|
-
const data = await parseBody(output.body, context);
|
|
811
|
-
let contents = {};
|
|
812
|
-
contents = (0, smithy_client_1._json)(data);
|
|
813
|
-
const response = {
|
|
814
|
-
$metadata: deserializeMetadata(output),
|
|
815
|
-
...contents,
|
|
816
|
-
};
|
|
817
|
-
return response;
|
|
818
|
-
};
|
|
819
|
-
exports.de_DeleteCustomKeyStoreCommand = de_DeleteCustomKeyStoreCommand;
|
|
820
|
-
const de_DeleteCustomKeyStoreCommandError = async (output, context) => {
|
|
821
|
-
const parsedOutput = {
|
|
822
|
-
...output,
|
|
823
|
-
body: await parseErrorBody(output.body, context),
|
|
824
|
-
};
|
|
825
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
826
|
-
switch (errorCode) {
|
|
827
|
-
case "CustomKeyStoreHasCMKsException":
|
|
828
|
-
case "com.amazonaws.kms#CustomKeyStoreHasCMKsException":
|
|
829
|
-
throw await de_CustomKeyStoreHasCMKsExceptionRes(parsedOutput, context);
|
|
830
|
-
case "CustomKeyStoreInvalidStateException":
|
|
831
|
-
case "com.amazonaws.kms#CustomKeyStoreInvalidStateException":
|
|
832
|
-
throw await de_CustomKeyStoreInvalidStateExceptionRes(parsedOutput, context);
|
|
833
|
-
case "CustomKeyStoreNotFoundException":
|
|
834
|
-
case "com.amazonaws.kms#CustomKeyStoreNotFoundException":
|
|
835
|
-
throw await de_CustomKeyStoreNotFoundExceptionRes(parsedOutput, context);
|
|
836
|
-
case "KMSInternalException":
|
|
837
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
838
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
839
|
-
default:
|
|
840
|
-
const parsedBody = parsedOutput.body;
|
|
841
|
-
return throwDefaultError({
|
|
842
|
-
output,
|
|
843
|
-
parsedBody,
|
|
844
|
-
errorCode,
|
|
845
|
-
});
|
|
846
|
-
}
|
|
847
|
-
};
|
|
848
|
-
const de_DeleteImportedKeyMaterialCommand = async (output, context) => {
|
|
849
|
-
if (output.statusCode >= 300) {
|
|
850
|
-
return de_DeleteImportedKeyMaterialCommandError(output, context);
|
|
851
|
-
}
|
|
852
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
853
|
-
const response = {
|
|
854
|
-
$metadata: deserializeMetadata(output),
|
|
855
|
-
};
|
|
856
|
-
return response;
|
|
857
|
-
};
|
|
858
|
-
exports.de_DeleteImportedKeyMaterialCommand = de_DeleteImportedKeyMaterialCommand;
|
|
859
|
-
const de_DeleteImportedKeyMaterialCommandError = async (output, context) => {
|
|
860
|
-
const parsedOutput = {
|
|
861
|
-
...output,
|
|
862
|
-
body: await parseErrorBody(output.body, context),
|
|
863
|
-
};
|
|
864
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
865
|
-
switch (errorCode) {
|
|
866
|
-
case "DependencyTimeoutException":
|
|
867
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
868
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
869
|
-
case "InvalidArnException":
|
|
870
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
871
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
872
|
-
case "KMSInternalException":
|
|
873
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
874
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
875
|
-
case "KMSInvalidStateException":
|
|
876
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
877
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
878
|
-
case "NotFoundException":
|
|
879
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
880
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
881
|
-
case "UnsupportedOperationException":
|
|
882
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
883
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
884
|
-
default:
|
|
885
|
-
const parsedBody = parsedOutput.body;
|
|
886
|
-
return throwDefaultError({
|
|
887
|
-
output,
|
|
888
|
-
parsedBody,
|
|
889
|
-
errorCode,
|
|
890
|
-
});
|
|
891
|
-
}
|
|
892
|
-
};
|
|
893
|
-
const de_DescribeCustomKeyStoresCommand = async (output, context) => {
|
|
894
|
-
if (output.statusCode >= 300) {
|
|
895
|
-
return de_DescribeCustomKeyStoresCommandError(output, context);
|
|
896
|
-
}
|
|
897
|
-
const data = await parseBody(output.body, context);
|
|
898
|
-
let contents = {};
|
|
899
|
-
contents = de_DescribeCustomKeyStoresResponse(data, context);
|
|
900
|
-
const response = {
|
|
901
|
-
$metadata: deserializeMetadata(output),
|
|
902
|
-
...contents,
|
|
903
|
-
};
|
|
904
|
-
return response;
|
|
905
|
-
};
|
|
906
|
-
exports.de_DescribeCustomKeyStoresCommand = de_DescribeCustomKeyStoresCommand;
|
|
907
|
-
const de_DescribeCustomKeyStoresCommandError = async (output, context) => {
|
|
908
|
-
const parsedOutput = {
|
|
909
|
-
...output,
|
|
910
|
-
body: await parseErrorBody(output.body, context),
|
|
911
|
-
};
|
|
912
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
913
|
-
switch (errorCode) {
|
|
914
|
-
case "CustomKeyStoreNotFoundException":
|
|
915
|
-
case "com.amazonaws.kms#CustomKeyStoreNotFoundException":
|
|
916
|
-
throw await de_CustomKeyStoreNotFoundExceptionRes(parsedOutput, context);
|
|
917
|
-
case "InvalidMarkerException":
|
|
918
|
-
case "com.amazonaws.kms#InvalidMarkerException":
|
|
919
|
-
throw await de_InvalidMarkerExceptionRes(parsedOutput, context);
|
|
920
|
-
case "KMSInternalException":
|
|
921
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
922
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
923
|
-
default:
|
|
924
|
-
const parsedBody = parsedOutput.body;
|
|
925
|
-
return throwDefaultError({
|
|
926
|
-
output,
|
|
927
|
-
parsedBody,
|
|
928
|
-
errorCode,
|
|
929
|
-
});
|
|
930
|
-
}
|
|
931
|
-
};
|
|
932
|
-
const de_DescribeKeyCommand = async (output, context) => {
|
|
933
|
-
if (output.statusCode >= 300) {
|
|
934
|
-
return de_DescribeKeyCommandError(output, context);
|
|
935
|
-
}
|
|
936
|
-
const data = await parseBody(output.body, context);
|
|
937
|
-
let contents = {};
|
|
938
|
-
contents = de_DescribeKeyResponse(data, context);
|
|
939
|
-
const response = {
|
|
940
|
-
$metadata: deserializeMetadata(output),
|
|
941
|
-
...contents,
|
|
942
|
-
};
|
|
943
|
-
return response;
|
|
944
|
-
};
|
|
945
|
-
exports.de_DescribeKeyCommand = de_DescribeKeyCommand;
|
|
946
|
-
const de_DescribeKeyCommandError = async (output, context) => {
|
|
947
|
-
const parsedOutput = {
|
|
948
|
-
...output,
|
|
949
|
-
body: await parseErrorBody(output.body, context),
|
|
950
|
-
};
|
|
951
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
952
|
-
switch (errorCode) {
|
|
953
|
-
case "DependencyTimeoutException":
|
|
954
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
955
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
956
|
-
case "InvalidArnException":
|
|
957
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
958
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
959
|
-
case "KMSInternalException":
|
|
960
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
961
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
962
|
-
case "NotFoundException":
|
|
963
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
964
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
965
|
-
default:
|
|
966
|
-
const parsedBody = parsedOutput.body;
|
|
967
|
-
return throwDefaultError({
|
|
968
|
-
output,
|
|
969
|
-
parsedBody,
|
|
970
|
-
errorCode,
|
|
971
|
-
});
|
|
972
|
-
}
|
|
973
|
-
};
|
|
974
|
-
const de_DisableKeyCommand = async (output, context) => {
|
|
975
|
-
if (output.statusCode >= 300) {
|
|
976
|
-
return de_DisableKeyCommandError(output, context);
|
|
977
|
-
}
|
|
978
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
979
|
-
const response = {
|
|
980
|
-
$metadata: deserializeMetadata(output),
|
|
981
|
-
};
|
|
982
|
-
return response;
|
|
983
|
-
};
|
|
984
|
-
exports.de_DisableKeyCommand = de_DisableKeyCommand;
|
|
985
|
-
const de_DisableKeyCommandError = async (output, context) => {
|
|
986
|
-
const parsedOutput = {
|
|
987
|
-
...output,
|
|
988
|
-
body: await parseErrorBody(output.body, context),
|
|
989
|
-
};
|
|
990
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
991
|
-
switch (errorCode) {
|
|
992
|
-
case "DependencyTimeoutException":
|
|
993
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
994
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
995
|
-
case "InvalidArnException":
|
|
996
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
997
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
998
|
-
case "KMSInternalException":
|
|
999
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1000
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1001
|
-
case "KMSInvalidStateException":
|
|
1002
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1003
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1004
|
-
case "NotFoundException":
|
|
1005
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1006
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1007
|
-
default:
|
|
1008
|
-
const parsedBody = parsedOutput.body;
|
|
1009
|
-
return throwDefaultError({
|
|
1010
|
-
output,
|
|
1011
|
-
parsedBody,
|
|
1012
|
-
errorCode,
|
|
1013
|
-
});
|
|
1014
|
-
}
|
|
1015
|
-
};
|
|
1016
|
-
const de_DisableKeyRotationCommand = async (output, context) => {
|
|
1017
|
-
if (output.statusCode >= 300) {
|
|
1018
|
-
return de_DisableKeyRotationCommandError(output, context);
|
|
1019
|
-
}
|
|
1020
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1021
|
-
const response = {
|
|
1022
|
-
$metadata: deserializeMetadata(output),
|
|
1023
|
-
};
|
|
1024
|
-
return response;
|
|
1025
|
-
};
|
|
1026
|
-
exports.de_DisableKeyRotationCommand = de_DisableKeyRotationCommand;
|
|
1027
|
-
const de_DisableKeyRotationCommandError = async (output, context) => {
|
|
1028
|
-
const parsedOutput = {
|
|
1029
|
-
...output,
|
|
1030
|
-
body: await parseErrorBody(output.body, context),
|
|
1031
|
-
};
|
|
1032
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1033
|
-
switch (errorCode) {
|
|
1034
|
-
case "DependencyTimeoutException":
|
|
1035
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1036
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1037
|
-
case "DisabledException":
|
|
1038
|
-
case "com.amazonaws.kms#DisabledException":
|
|
1039
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
1040
|
-
case "InvalidArnException":
|
|
1041
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1042
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1043
|
-
case "KMSInternalException":
|
|
1044
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1045
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1046
|
-
case "KMSInvalidStateException":
|
|
1047
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1048
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1049
|
-
case "NotFoundException":
|
|
1050
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1051
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1052
|
-
case "UnsupportedOperationException":
|
|
1053
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1054
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1055
|
-
default:
|
|
1056
|
-
const parsedBody = parsedOutput.body;
|
|
1057
|
-
return throwDefaultError({
|
|
1058
|
-
output,
|
|
1059
|
-
parsedBody,
|
|
1060
|
-
errorCode,
|
|
1061
|
-
});
|
|
1062
|
-
}
|
|
1063
|
-
};
|
|
1064
|
-
const de_DisconnectCustomKeyStoreCommand = async (output, context) => {
|
|
1065
|
-
if (output.statusCode >= 300) {
|
|
1066
|
-
return de_DisconnectCustomKeyStoreCommandError(output, context);
|
|
1067
|
-
}
|
|
1068
|
-
const data = await parseBody(output.body, context);
|
|
1069
|
-
let contents = {};
|
|
1070
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1071
|
-
const response = {
|
|
1072
|
-
$metadata: deserializeMetadata(output),
|
|
1073
|
-
...contents,
|
|
1074
|
-
};
|
|
1075
|
-
return response;
|
|
1076
|
-
};
|
|
1077
|
-
exports.de_DisconnectCustomKeyStoreCommand = de_DisconnectCustomKeyStoreCommand;
|
|
1078
|
-
const de_DisconnectCustomKeyStoreCommandError = async (output, context) => {
|
|
1079
|
-
const parsedOutput = {
|
|
1080
|
-
...output,
|
|
1081
|
-
body: await parseErrorBody(output.body, context),
|
|
1082
|
-
};
|
|
1083
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1084
|
-
switch (errorCode) {
|
|
1085
|
-
case "CustomKeyStoreInvalidStateException":
|
|
1086
|
-
case "com.amazonaws.kms#CustomKeyStoreInvalidStateException":
|
|
1087
|
-
throw await de_CustomKeyStoreInvalidStateExceptionRes(parsedOutput, context);
|
|
1088
|
-
case "CustomKeyStoreNotFoundException":
|
|
1089
|
-
case "com.amazonaws.kms#CustomKeyStoreNotFoundException":
|
|
1090
|
-
throw await de_CustomKeyStoreNotFoundExceptionRes(parsedOutput, context);
|
|
1091
|
-
case "KMSInternalException":
|
|
1092
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1093
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1094
|
-
default:
|
|
1095
|
-
const parsedBody = parsedOutput.body;
|
|
1096
|
-
return throwDefaultError({
|
|
1097
|
-
output,
|
|
1098
|
-
parsedBody,
|
|
1099
|
-
errorCode,
|
|
1100
|
-
});
|
|
1101
|
-
}
|
|
1102
|
-
};
|
|
1103
|
-
const de_EnableKeyCommand = async (output, context) => {
|
|
1104
|
-
if (output.statusCode >= 300) {
|
|
1105
|
-
return de_EnableKeyCommandError(output, context);
|
|
1106
|
-
}
|
|
1107
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1108
|
-
const response = {
|
|
1109
|
-
$metadata: deserializeMetadata(output),
|
|
1110
|
-
};
|
|
1111
|
-
return response;
|
|
1112
|
-
};
|
|
1113
|
-
exports.de_EnableKeyCommand = de_EnableKeyCommand;
|
|
1114
|
-
const de_EnableKeyCommandError = async (output, context) => {
|
|
1115
|
-
const parsedOutput = {
|
|
1116
|
-
...output,
|
|
1117
|
-
body: await parseErrorBody(output.body, context),
|
|
1118
|
-
};
|
|
1119
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1120
|
-
switch (errorCode) {
|
|
1121
|
-
case "DependencyTimeoutException":
|
|
1122
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1123
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1124
|
-
case "InvalidArnException":
|
|
1125
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1126
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1127
|
-
case "KMSInternalException":
|
|
1128
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1129
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1130
|
-
case "KMSInvalidStateException":
|
|
1131
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1132
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1133
|
-
case "LimitExceededException":
|
|
1134
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
1135
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1136
|
-
case "NotFoundException":
|
|
1137
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1138
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1139
|
-
default:
|
|
1140
|
-
const parsedBody = parsedOutput.body;
|
|
1141
|
-
return throwDefaultError({
|
|
1142
|
-
output,
|
|
1143
|
-
parsedBody,
|
|
1144
|
-
errorCode,
|
|
1145
|
-
});
|
|
1146
|
-
}
|
|
1147
|
-
};
|
|
1148
|
-
const de_EnableKeyRotationCommand = async (output, context) => {
|
|
1149
|
-
if (output.statusCode >= 300) {
|
|
1150
|
-
return de_EnableKeyRotationCommandError(output, context);
|
|
1151
|
-
}
|
|
1152
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1153
|
-
const response = {
|
|
1154
|
-
$metadata: deserializeMetadata(output),
|
|
1155
|
-
};
|
|
1156
|
-
return response;
|
|
1157
|
-
};
|
|
1158
|
-
exports.de_EnableKeyRotationCommand = de_EnableKeyRotationCommand;
|
|
1159
|
-
const de_EnableKeyRotationCommandError = async (output, context) => {
|
|
1160
|
-
const parsedOutput = {
|
|
1161
|
-
...output,
|
|
1162
|
-
body: await parseErrorBody(output.body, context),
|
|
1163
|
-
};
|
|
1164
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1165
|
-
switch (errorCode) {
|
|
1166
|
-
case "DependencyTimeoutException":
|
|
1167
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1168
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1169
|
-
case "DisabledException":
|
|
1170
|
-
case "com.amazonaws.kms#DisabledException":
|
|
1171
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
1172
|
-
case "InvalidArnException":
|
|
1173
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1174
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1175
|
-
case "KMSInternalException":
|
|
1176
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1177
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1178
|
-
case "KMSInvalidStateException":
|
|
1179
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1180
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1181
|
-
case "NotFoundException":
|
|
1182
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1183
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1184
|
-
case "UnsupportedOperationException":
|
|
1185
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1186
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1187
|
-
default:
|
|
1188
|
-
const parsedBody = parsedOutput.body;
|
|
1189
|
-
return throwDefaultError({
|
|
1190
|
-
output,
|
|
1191
|
-
parsedBody,
|
|
1192
|
-
errorCode,
|
|
1193
|
-
});
|
|
1194
|
-
}
|
|
1195
|
-
};
|
|
1196
|
-
const de_EncryptCommand = async (output, context) => {
|
|
1197
|
-
if (output.statusCode >= 300) {
|
|
1198
|
-
return de_EncryptCommandError(output, context);
|
|
1199
|
-
}
|
|
1200
|
-
const data = await parseBody(output.body, context);
|
|
1201
|
-
let contents = {};
|
|
1202
|
-
contents = de_EncryptResponse(data, context);
|
|
1203
|
-
const response = {
|
|
1204
|
-
$metadata: deserializeMetadata(output),
|
|
1205
|
-
...contents,
|
|
1206
|
-
};
|
|
1207
|
-
return response;
|
|
1208
|
-
};
|
|
1209
|
-
exports.de_EncryptCommand = de_EncryptCommand;
|
|
1210
|
-
const de_EncryptCommandError = async (output, context) => {
|
|
1211
|
-
const parsedOutput = {
|
|
1212
|
-
...output,
|
|
1213
|
-
body: await parseErrorBody(output.body, context),
|
|
1214
|
-
};
|
|
1215
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1216
|
-
switch (errorCode) {
|
|
1217
|
-
case "DependencyTimeoutException":
|
|
1218
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1219
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1220
|
-
case "DisabledException":
|
|
1221
|
-
case "com.amazonaws.kms#DisabledException":
|
|
1222
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
1223
|
-
case "DryRunOperationException":
|
|
1224
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
1225
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
1226
|
-
case "InvalidGrantTokenException":
|
|
1227
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
1228
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
1229
|
-
case "InvalidKeyUsageException":
|
|
1230
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
1231
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
1232
|
-
case "KMSInternalException":
|
|
1233
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1234
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1235
|
-
case "KMSInvalidStateException":
|
|
1236
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1237
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1238
|
-
case "KeyUnavailableException":
|
|
1239
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
1240
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
1241
|
-
case "NotFoundException":
|
|
1242
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1243
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1244
|
-
default:
|
|
1245
|
-
const parsedBody = parsedOutput.body;
|
|
1246
|
-
return throwDefaultError({
|
|
1247
|
-
output,
|
|
1248
|
-
parsedBody,
|
|
1249
|
-
errorCode,
|
|
1250
|
-
});
|
|
1251
|
-
}
|
|
1252
|
-
};
|
|
1253
|
-
const de_GenerateDataKeyCommand = async (output, context) => {
|
|
1254
|
-
if (output.statusCode >= 300) {
|
|
1255
|
-
return de_GenerateDataKeyCommandError(output, context);
|
|
1256
|
-
}
|
|
1257
|
-
const data = await parseBody(output.body, context);
|
|
1258
|
-
let contents = {};
|
|
1259
|
-
contents = de_GenerateDataKeyResponse(data, context);
|
|
1260
|
-
const response = {
|
|
1261
|
-
$metadata: deserializeMetadata(output),
|
|
1262
|
-
...contents,
|
|
1263
|
-
};
|
|
1264
|
-
return response;
|
|
1265
|
-
};
|
|
1266
|
-
exports.de_GenerateDataKeyCommand = de_GenerateDataKeyCommand;
|
|
1267
|
-
const de_GenerateDataKeyCommandError = async (output, context) => {
|
|
1268
|
-
const parsedOutput = {
|
|
1269
|
-
...output,
|
|
1270
|
-
body: await parseErrorBody(output.body, context),
|
|
1271
|
-
};
|
|
1272
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1273
|
-
switch (errorCode) {
|
|
1274
|
-
case "DependencyTimeoutException":
|
|
1275
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1276
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1277
|
-
case "DisabledException":
|
|
1278
|
-
case "com.amazonaws.kms#DisabledException":
|
|
1279
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
1280
|
-
case "DryRunOperationException":
|
|
1281
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
1282
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
1283
|
-
case "InvalidGrantTokenException":
|
|
1284
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
1285
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
1286
|
-
case "InvalidKeyUsageException":
|
|
1287
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
1288
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
1289
|
-
case "KMSInternalException":
|
|
1290
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1291
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1292
|
-
case "KMSInvalidStateException":
|
|
1293
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1294
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1295
|
-
case "KeyUnavailableException":
|
|
1296
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
1297
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
1298
|
-
case "NotFoundException":
|
|
1299
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1300
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1301
|
-
default:
|
|
1302
|
-
const parsedBody = parsedOutput.body;
|
|
1303
|
-
return throwDefaultError({
|
|
1304
|
-
output,
|
|
1305
|
-
parsedBody,
|
|
1306
|
-
errorCode,
|
|
1307
|
-
});
|
|
1308
|
-
}
|
|
1309
|
-
};
|
|
1310
|
-
const de_GenerateDataKeyPairCommand = async (output, context) => {
|
|
1311
|
-
if (output.statusCode >= 300) {
|
|
1312
|
-
return de_GenerateDataKeyPairCommandError(output, context);
|
|
1313
|
-
}
|
|
1314
|
-
const data = await parseBody(output.body, context);
|
|
1315
|
-
let contents = {};
|
|
1316
|
-
contents = de_GenerateDataKeyPairResponse(data, context);
|
|
1317
|
-
const response = {
|
|
1318
|
-
$metadata: deserializeMetadata(output),
|
|
1319
|
-
...contents,
|
|
1320
|
-
};
|
|
1321
|
-
return response;
|
|
1322
|
-
};
|
|
1323
|
-
exports.de_GenerateDataKeyPairCommand = de_GenerateDataKeyPairCommand;
|
|
1324
|
-
const de_GenerateDataKeyPairCommandError = async (output, context) => {
|
|
1325
|
-
const parsedOutput = {
|
|
1326
|
-
...output,
|
|
1327
|
-
body: await parseErrorBody(output.body, context),
|
|
1328
|
-
};
|
|
1329
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1330
|
-
switch (errorCode) {
|
|
1331
|
-
case "DependencyTimeoutException":
|
|
1332
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1333
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1334
|
-
case "DisabledException":
|
|
1335
|
-
case "com.amazonaws.kms#DisabledException":
|
|
1336
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
1337
|
-
case "DryRunOperationException":
|
|
1338
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
1339
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
1340
|
-
case "InvalidGrantTokenException":
|
|
1341
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
1342
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
1343
|
-
case "InvalidKeyUsageException":
|
|
1344
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
1345
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
1346
|
-
case "KMSInternalException":
|
|
1347
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1348
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1349
|
-
case "KMSInvalidStateException":
|
|
1350
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1351
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1352
|
-
case "KeyUnavailableException":
|
|
1353
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
1354
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
1355
|
-
case "NotFoundException":
|
|
1356
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1357
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1358
|
-
case "UnsupportedOperationException":
|
|
1359
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1360
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1361
|
-
default:
|
|
1362
|
-
const parsedBody = parsedOutput.body;
|
|
1363
|
-
return throwDefaultError({
|
|
1364
|
-
output,
|
|
1365
|
-
parsedBody,
|
|
1366
|
-
errorCode,
|
|
1367
|
-
});
|
|
1368
|
-
}
|
|
1369
|
-
};
|
|
1370
|
-
const de_GenerateDataKeyPairWithoutPlaintextCommand = async (output, context) => {
|
|
1371
|
-
if (output.statusCode >= 300) {
|
|
1372
|
-
return de_GenerateDataKeyPairWithoutPlaintextCommandError(output, context);
|
|
1373
|
-
}
|
|
1374
|
-
const data = await parseBody(output.body, context);
|
|
1375
|
-
let contents = {};
|
|
1376
|
-
contents = de_GenerateDataKeyPairWithoutPlaintextResponse(data, context);
|
|
1377
|
-
const response = {
|
|
1378
|
-
$metadata: deserializeMetadata(output),
|
|
1379
|
-
...contents,
|
|
1380
|
-
};
|
|
1381
|
-
return response;
|
|
1382
|
-
};
|
|
1383
|
-
exports.de_GenerateDataKeyPairWithoutPlaintextCommand = de_GenerateDataKeyPairWithoutPlaintextCommand;
|
|
1384
|
-
const de_GenerateDataKeyPairWithoutPlaintextCommandError = 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 "DependencyTimeoutException":
|
|
1392
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1393
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1394
|
-
case "DisabledException":
|
|
1395
|
-
case "com.amazonaws.kms#DisabledException":
|
|
1396
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
1397
|
-
case "DryRunOperationException":
|
|
1398
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
1399
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
1400
|
-
case "InvalidGrantTokenException":
|
|
1401
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
1402
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
1403
|
-
case "InvalidKeyUsageException":
|
|
1404
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
1405
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
1406
|
-
case "KMSInternalException":
|
|
1407
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1408
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1409
|
-
case "KMSInvalidStateException":
|
|
1410
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1411
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1412
|
-
case "KeyUnavailableException":
|
|
1413
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
1414
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
1415
|
-
case "NotFoundException":
|
|
1416
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1417
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1418
|
-
case "UnsupportedOperationException":
|
|
1419
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1420
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1421
|
-
default:
|
|
1422
|
-
const parsedBody = parsedOutput.body;
|
|
1423
|
-
return throwDefaultError({
|
|
1424
|
-
output,
|
|
1425
|
-
parsedBody,
|
|
1426
|
-
errorCode,
|
|
1427
|
-
});
|
|
1428
|
-
}
|
|
1429
|
-
};
|
|
1430
|
-
const de_GenerateDataKeyWithoutPlaintextCommand = async (output, context) => {
|
|
1431
|
-
if (output.statusCode >= 300) {
|
|
1432
|
-
return de_GenerateDataKeyWithoutPlaintextCommandError(output, context);
|
|
1433
|
-
}
|
|
1434
|
-
const data = await parseBody(output.body, context);
|
|
1435
|
-
let contents = {};
|
|
1436
|
-
contents = de_GenerateDataKeyWithoutPlaintextResponse(data, context);
|
|
1437
|
-
const response = {
|
|
1438
|
-
$metadata: deserializeMetadata(output),
|
|
1439
|
-
...contents,
|
|
1440
|
-
};
|
|
1441
|
-
return response;
|
|
1442
|
-
};
|
|
1443
|
-
exports.de_GenerateDataKeyWithoutPlaintextCommand = de_GenerateDataKeyWithoutPlaintextCommand;
|
|
1444
|
-
const de_GenerateDataKeyWithoutPlaintextCommandError = async (output, context) => {
|
|
1445
|
-
const parsedOutput = {
|
|
1446
|
-
...output,
|
|
1447
|
-
body: await parseErrorBody(output.body, context),
|
|
1448
|
-
};
|
|
1449
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1450
|
-
switch (errorCode) {
|
|
1451
|
-
case "DependencyTimeoutException":
|
|
1452
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1453
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1454
|
-
case "DisabledException":
|
|
1455
|
-
case "com.amazonaws.kms#DisabledException":
|
|
1456
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
1457
|
-
case "DryRunOperationException":
|
|
1458
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
1459
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
1460
|
-
case "InvalidGrantTokenException":
|
|
1461
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
1462
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
1463
|
-
case "InvalidKeyUsageException":
|
|
1464
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
1465
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
1466
|
-
case "KMSInternalException":
|
|
1467
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1468
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1469
|
-
case "KMSInvalidStateException":
|
|
1470
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1471
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1472
|
-
case "KeyUnavailableException":
|
|
1473
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
1474
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
1475
|
-
case "NotFoundException":
|
|
1476
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1477
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1478
|
-
default:
|
|
1479
|
-
const parsedBody = parsedOutput.body;
|
|
1480
|
-
return throwDefaultError({
|
|
1481
|
-
output,
|
|
1482
|
-
parsedBody,
|
|
1483
|
-
errorCode,
|
|
1484
|
-
});
|
|
1485
|
-
}
|
|
1486
|
-
};
|
|
1487
|
-
const de_GenerateMacCommand = async (output, context) => {
|
|
1488
|
-
if (output.statusCode >= 300) {
|
|
1489
|
-
return de_GenerateMacCommandError(output, context);
|
|
1490
|
-
}
|
|
1491
|
-
const data = await parseBody(output.body, context);
|
|
1492
|
-
let contents = {};
|
|
1493
|
-
contents = de_GenerateMacResponse(data, context);
|
|
1494
|
-
const response = {
|
|
1495
|
-
$metadata: deserializeMetadata(output),
|
|
1496
|
-
...contents,
|
|
1497
|
-
};
|
|
1498
|
-
return response;
|
|
1499
|
-
};
|
|
1500
|
-
exports.de_GenerateMacCommand = de_GenerateMacCommand;
|
|
1501
|
-
const de_GenerateMacCommandError = async (output, context) => {
|
|
1502
|
-
const parsedOutput = {
|
|
1503
|
-
...output,
|
|
1504
|
-
body: await parseErrorBody(output.body, context),
|
|
1505
|
-
};
|
|
1506
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1507
|
-
switch (errorCode) {
|
|
1508
|
-
case "DisabledException":
|
|
1509
|
-
case "com.amazonaws.kms#DisabledException":
|
|
1510
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
1511
|
-
case "DryRunOperationException":
|
|
1512
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
1513
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
1514
|
-
case "InvalidGrantTokenException":
|
|
1515
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
1516
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
1517
|
-
case "InvalidKeyUsageException":
|
|
1518
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
1519
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
1520
|
-
case "KMSInternalException":
|
|
1521
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1522
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1523
|
-
case "KMSInvalidStateException":
|
|
1524
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1525
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1526
|
-
case "KeyUnavailableException":
|
|
1527
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
1528
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
1529
|
-
case "NotFoundException":
|
|
1530
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1531
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1532
|
-
default:
|
|
1533
|
-
const parsedBody = parsedOutput.body;
|
|
1534
|
-
return throwDefaultError({
|
|
1535
|
-
output,
|
|
1536
|
-
parsedBody,
|
|
1537
|
-
errorCode,
|
|
1538
|
-
});
|
|
1539
|
-
}
|
|
1540
|
-
};
|
|
1541
|
-
const de_GenerateRandomCommand = async (output, context) => {
|
|
1542
|
-
if (output.statusCode >= 300) {
|
|
1543
|
-
return de_GenerateRandomCommandError(output, context);
|
|
1544
|
-
}
|
|
1545
|
-
const data = await parseBody(output.body, context);
|
|
1546
|
-
let contents = {};
|
|
1547
|
-
contents = de_GenerateRandomResponse(data, context);
|
|
1548
|
-
const response = {
|
|
1549
|
-
$metadata: deserializeMetadata(output),
|
|
1550
|
-
...contents,
|
|
1551
|
-
};
|
|
1552
|
-
return response;
|
|
1553
|
-
};
|
|
1554
|
-
exports.de_GenerateRandomCommand = de_GenerateRandomCommand;
|
|
1555
|
-
const de_GenerateRandomCommandError = async (output, context) => {
|
|
1556
|
-
const parsedOutput = {
|
|
1557
|
-
...output,
|
|
1558
|
-
body: await parseErrorBody(output.body, context),
|
|
1559
|
-
};
|
|
1560
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1561
|
-
switch (errorCode) {
|
|
1562
|
-
case "CustomKeyStoreInvalidStateException":
|
|
1563
|
-
case "com.amazonaws.kms#CustomKeyStoreInvalidStateException":
|
|
1564
|
-
throw await de_CustomKeyStoreInvalidStateExceptionRes(parsedOutput, context);
|
|
1565
|
-
case "CustomKeyStoreNotFoundException":
|
|
1566
|
-
case "com.amazonaws.kms#CustomKeyStoreNotFoundException":
|
|
1567
|
-
throw await de_CustomKeyStoreNotFoundExceptionRes(parsedOutput, context);
|
|
1568
|
-
case "DependencyTimeoutException":
|
|
1569
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1570
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1571
|
-
case "KMSInternalException":
|
|
1572
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1573
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1574
|
-
case "UnsupportedOperationException":
|
|
1575
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1576
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1577
|
-
default:
|
|
1578
|
-
const parsedBody = parsedOutput.body;
|
|
1579
|
-
return throwDefaultError({
|
|
1580
|
-
output,
|
|
1581
|
-
parsedBody,
|
|
1582
|
-
errorCode,
|
|
1583
|
-
});
|
|
1584
|
-
}
|
|
1585
|
-
};
|
|
1586
|
-
const de_GetKeyPolicyCommand = async (output, context) => {
|
|
1587
|
-
if (output.statusCode >= 300) {
|
|
1588
|
-
return de_GetKeyPolicyCommandError(output, context);
|
|
1589
|
-
}
|
|
1590
|
-
const data = await parseBody(output.body, context);
|
|
1591
|
-
let contents = {};
|
|
1592
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1593
|
-
const response = {
|
|
1594
|
-
$metadata: deserializeMetadata(output),
|
|
1595
|
-
...contents,
|
|
1596
|
-
};
|
|
1597
|
-
return response;
|
|
1598
|
-
};
|
|
1599
|
-
exports.de_GetKeyPolicyCommand = de_GetKeyPolicyCommand;
|
|
1600
|
-
const de_GetKeyPolicyCommandError = 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 "DependencyTimeoutException":
|
|
1608
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1609
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1610
|
-
case "InvalidArnException":
|
|
1611
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1612
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1613
|
-
case "KMSInternalException":
|
|
1614
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1615
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1616
|
-
case "KMSInvalidStateException":
|
|
1617
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1618
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1619
|
-
case "NotFoundException":
|
|
1620
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1621
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1622
|
-
default:
|
|
1623
|
-
const parsedBody = parsedOutput.body;
|
|
1624
|
-
return throwDefaultError({
|
|
1625
|
-
output,
|
|
1626
|
-
parsedBody,
|
|
1627
|
-
errorCode,
|
|
1628
|
-
});
|
|
1629
|
-
}
|
|
1630
|
-
};
|
|
1631
|
-
const de_GetKeyRotationStatusCommand = async (output, context) => {
|
|
1632
|
-
if (output.statusCode >= 300) {
|
|
1633
|
-
return de_GetKeyRotationStatusCommandError(output, context);
|
|
1634
|
-
}
|
|
1635
|
-
const data = await parseBody(output.body, context);
|
|
1636
|
-
let contents = {};
|
|
1637
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1638
|
-
const response = {
|
|
1639
|
-
$metadata: deserializeMetadata(output),
|
|
1640
|
-
...contents,
|
|
1641
|
-
};
|
|
1642
|
-
return response;
|
|
1643
|
-
};
|
|
1644
|
-
exports.de_GetKeyRotationStatusCommand = de_GetKeyRotationStatusCommand;
|
|
1645
|
-
const de_GetKeyRotationStatusCommandError = async (output, context) => {
|
|
1646
|
-
const parsedOutput = {
|
|
1647
|
-
...output,
|
|
1648
|
-
body: await parseErrorBody(output.body, context),
|
|
1649
|
-
};
|
|
1650
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1651
|
-
switch (errorCode) {
|
|
1652
|
-
case "DependencyTimeoutException":
|
|
1653
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1654
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1655
|
-
case "InvalidArnException":
|
|
1656
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1657
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1658
|
-
case "KMSInternalException":
|
|
1659
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1660
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1661
|
-
case "KMSInvalidStateException":
|
|
1662
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1663
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1664
|
-
case "NotFoundException":
|
|
1665
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1666
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1667
|
-
case "UnsupportedOperationException":
|
|
1668
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1669
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1670
|
-
default:
|
|
1671
|
-
const parsedBody = parsedOutput.body;
|
|
1672
|
-
return throwDefaultError({
|
|
1673
|
-
output,
|
|
1674
|
-
parsedBody,
|
|
1675
|
-
errorCode,
|
|
1676
|
-
});
|
|
1677
|
-
}
|
|
1678
|
-
};
|
|
1679
|
-
const de_GetParametersForImportCommand = async (output, context) => {
|
|
1680
|
-
if (output.statusCode >= 300) {
|
|
1681
|
-
return de_GetParametersForImportCommandError(output, context);
|
|
1682
|
-
}
|
|
1683
|
-
const data = await parseBody(output.body, context);
|
|
1684
|
-
let contents = {};
|
|
1685
|
-
contents = de_GetParametersForImportResponse(data, context);
|
|
1686
|
-
const response = {
|
|
1687
|
-
$metadata: deserializeMetadata(output),
|
|
1688
|
-
...contents,
|
|
1689
|
-
};
|
|
1690
|
-
return response;
|
|
1691
|
-
};
|
|
1692
|
-
exports.de_GetParametersForImportCommand = de_GetParametersForImportCommand;
|
|
1693
|
-
const de_GetParametersForImportCommandError = async (output, context) => {
|
|
1694
|
-
const parsedOutput = {
|
|
1695
|
-
...output,
|
|
1696
|
-
body: await parseErrorBody(output.body, context),
|
|
1697
|
-
};
|
|
1698
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1699
|
-
switch (errorCode) {
|
|
1700
|
-
case "DependencyTimeoutException":
|
|
1701
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1702
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1703
|
-
case "InvalidArnException":
|
|
1704
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1705
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1706
|
-
case "KMSInternalException":
|
|
1707
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1708
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1709
|
-
case "KMSInvalidStateException":
|
|
1710
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1711
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1712
|
-
case "NotFoundException":
|
|
1713
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1714
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1715
|
-
case "UnsupportedOperationException":
|
|
1716
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1717
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1718
|
-
default:
|
|
1719
|
-
const parsedBody = parsedOutput.body;
|
|
1720
|
-
return throwDefaultError({
|
|
1721
|
-
output,
|
|
1722
|
-
parsedBody,
|
|
1723
|
-
errorCode,
|
|
1724
|
-
});
|
|
1725
|
-
}
|
|
1726
|
-
};
|
|
1727
|
-
const de_GetPublicKeyCommand = async (output, context) => {
|
|
1728
|
-
if (output.statusCode >= 300) {
|
|
1729
|
-
return de_GetPublicKeyCommandError(output, context);
|
|
1730
|
-
}
|
|
1731
|
-
const data = await parseBody(output.body, context);
|
|
1732
|
-
let contents = {};
|
|
1733
|
-
contents = de_GetPublicKeyResponse(data, context);
|
|
1734
|
-
const response = {
|
|
1735
|
-
$metadata: deserializeMetadata(output),
|
|
1736
|
-
...contents,
|
|
1737
|
-
};
|
|
1738
|
-
return response;
|
|
1739
|
-
};
|
|
1740
|
-
exports.de_GetPublicKeyCommand = de_GetPublicKeyCommand;
|
|
1741
|
-
const de_GetPublicKeyCommandError = async (output, context) => {
|
|
1742
|
-
const parsedOutput = {
|
|
1743
|
-
...output,
|
|
1744
|
-
body: await parseErrorBody(output.body, context),
|
|
1745
|
-
};
|
|
1746
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1747
|
-
switch (errorCode) {
|
|
1748
|
-
case "DependencyTimeoutException":
|
|
1749
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1750
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1751
|
-
case "DisabledException":
|
|
1752
|
-
case "com.amazonaws.kms#DisabledException":
|
|
1753
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
1754
|
-
case "InvalidArnException":
|
|
1755
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1756
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1757
|
-
case "InvalidGrantTokenException":
|
|
1758
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
1759
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
1760
|
-
case "InvalidKeyUsageException":
|
|
1761
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
1762
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
1763
|
-
case "KMSInternalException":
|
|
1764
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1765
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1766
|
-
case "KMSInvalidStateException":
|
|
1767
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1768
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1769
|
-
case "KeyUnavailableException":
|
|
1770
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
1771
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
1772
|
-
case "NotFoundException":
|
|
1773
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1774
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1775
|
-
case "UnsupportedOperationException":
|
|
1776
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1777
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1778
|
-
default:
|
|
1779
|
-
const parsedBody = parsedOutput.body;
|
|
1780
|
-
return throwDefaultError({
|
|
1781
|
-
output,
|
|
1782
|
-
parsedBody,
|
|
1783
|
-
errorCode,
|
|
1784
|
-
});
|
|
1785
|
-
}
|
|
1786
|
-
};
|
|
1787
|
-
const de_ImportKeyMaterialCommand = async (output, context) => {
|
|
1788
|
-
if (output.statusCode >= 300) {
|
|
1789
|
-
return de_ImportKeyMaterialCommandError(output, context);
|
|
1790
|
-
}
|
|
1791
|
-
const data = await parseBody(output.body, context);
|
|
1792
|
-
let contents = {};
|
|
1793
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1794
|
-
const response = {
|
|
1795
|
-
$metadata: deserializeMetadata(output),
|
|
1796
|
-
...contents,
|
|
1797
|
-
};
|
|
1798
|
-
return response;
|
|
1799
|
-
};
|
|
1800
|
-
exports.de_ImportKeyMaterialCommand = de_ImportKeyMaterialCommand;
|
|
1801
|
-
const de_ImportKeyMaterialCommandError = async (output, context) => {
|
|
1802
|
-
const parsedOutput = {
|
|
1803
|
-
...output,
|
|
1804
|
-
body: await parseErrorBody(output.body, context),
|
|
1805
|
-
};
|
|
1806
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1807
|
-
switch (errorCode) {
|
|
1808
|
-
case "DependencyTimeoutException":
|
|
1809
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1810
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1811
|
-
case "ExpiredImportTokenException":
|
|
1812
|
-
case "com.amazonaws.kms#ExpiredImportTokenException":
|
|
1813
|
-
throw await de_ExpiredImportTokenExceptionRes(parsedOutput, context);
|
|
1814
|
-
case "IncorrectKeyMaterialException":
|
|
1815
|
-
case "com.amazonaws.kms#IncorrectKeyMaterialException":
|
|
1816
|
-
throw await de_IncorrectKeyMaterialExceptionRes(parsedOutput, context);
|
|
1817
|
-
case "InvalidArnException":
|
|
1818
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1819
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1820
|
-
case "InvalidCiphertextException":
|
|
1821
|
-
case "com.amazonaws.kms#InvalidCiphertextException":
|
|
1822
|
-
throw await de_InvalidCiphertextExceptionRes(parsedOutput, context);
|
|
1823
|
-
case "InvalidImportTokenException":
|
|
1824
|
-
case "com.amazonaws.kms#InvalidImportTokenException":
|
|
1825
|
-
throw await de_InvalidImportTokenExceptionRes(parsedOutput, context);
|
|
1826
|
-
case "KMSInternalException":
|
|
1827
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1828
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1829
|
-
case "KMSInvalidStateException":
|
|
1830
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1831
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1832
|
-
case "NotFoundException":
|
|
1833
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1834
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1835
|
-
case "UnsupportedOperationException":
|
|
1836
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1837
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1838
|
-
default:
|
|
1839
|
-
const parsedBody = parsedOutput.body;
|
|
1840
|
-
return throwDefaultError({
|
|
1841
|
-
output,
|
|
1842
|
-
parsedBody,
|
|
1843
|
-
errorCode,
|
|
1844
|
-
});
|
|
1845
|
-
}
|
|
1846
|
-
};
|
|
1847
|
-
const de_ListAliasesCommand = async (output, context) => {
|
|
1848
|
-
if (output.statusCode >= 300) {
|
|
1849
|
-
return de_ListAliasesCommandError(output, context);
|
|
1850
|
-
}
|
|
1851
|
-
const data = await parseBody(output.body, context);
|
|
1852
|
-
let contents = {};
|
|
1853
|
-
contents = de_ListAliasesResponse(data, context);
|
|
1854
|
-
const response = {
|
|
1855
|
-
$metadata: deserializeMetadata(output),
|
|
1856
|
-
...contents,
|
|
1857
|
-
};
|
|
1858
|
-
return response;
|
|
1859
|
-
};
|
|
1860
|
-
exports.de_ListAliasesCommand = de_ListAliasesCommand;
|
|
1861
|
-
const de_ListAliasesCommandError = async (output, context) => {
|
|
1862
|
-
const parsedOutput = {
|
|
1863
|
-
...output,
|
|
1864
|
-
body: await parseErrorBody(output.body, context),
|
|
1865
|
-
};
|
|
1866
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1867
|
-
switch (errorCode) {
|
|
1868
|
-
case "DependencyTimeoutException":
|
|
1869
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1870
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1871
|
-
case "InvalidArnException":
|
|
1872
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1873
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1874
|
-
case "InvalidMarkerException":
|
|
1875
|
-
case "com.amazonaws.kms#InvalidMarkerException":
|
|
1876
|
-
throw await de_InvalidMarkerExceptionRes(parsedOutput, context);
|
|
1877
|
-
case "KMSInternalException":
|
|
1878
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1879
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1880
|
-
case "NotFoundException":
|
|
1881
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1882
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1883
|
-
default:
|
|
1884
|
-
const parsedBody = parsedOutput.body;
|
|
1885
|
-
return throwDefaultError({
|
|
1886
|
-
output,
|
|
1887
|
-
parsedBody,
|
|
1888
|
-
errorCode,
|
|
1889
|
-
});
|
|
1890
|
-
}
|
|
1891
|
-
};
|
|
1892
|
-
const de_ListGrantsCommand = async (output, context) => {
|
|
1893
|
-
if (output.statusCode >= 300) {
|
|
1894
|
-
return de_ListGrantsCommandError(output, context);
|
|
1895
|
-
}
|
|
1896
|
-
const data = await parseBody(output.body, context);
|
|
1897
|
-
let contents = {};
|
|
1898
|
-
contents = de_ListGrantsResponse(data, context);
|
|
1899
|
-
const response = {
|
|
1900
|
-
$metadata: deserializeMetadata(output),
|
|
1901
|
-
...contents,
|
|
1902
|
-
};
|
|
1903
|
-
return response;
|
|
1904
|
-
};
|
|
1905
|
-
exports.de_ListGrantsCommand = de_ListGrantsCommand;
|
|
1906
|
-
const de_ListGrantsCommandError = async (output, context) => {
|
|
1907
|
-
const parsedOutput = {
|
|
1908
|
-
...output,
|
|
1909
|
-
body: await parseErrorBody(output.body, context),
|
|
1910
|
-
};
|
|
1911
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1912
|
-
switch (errorCode) {
|
|
1913
|
-
case "DependencyTimeoutException":
|
|
1914
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1915
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1916
|
-
case "InvalidArnException":
|
|
1917
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1918
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1919
|
-
case "InvalidGrantIdException":
|
|
1920
|
-
case "com.amazonaws.kms#InvalidGrantIdException":
|
|
1921
|
-
throw await de_InvalidGrantIdExceptionRes(parsedOutput, context);
|
|
1922
|
-
case "InvalidMarkerException":
|
|
1923
|
-
case "com.amazonaws.kms#InvalidMarkerException":
|
|
1924
|
-
throw await de_InvalidMarkerExceptionRes(parsedOutput, context);
|
|
1925
|
-
case "KMSInternalException":
|
|
1926
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1927
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1928
|
-
case "KMSInvalidStateException":
|
|
1929
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1930
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1931
|
-
case "NotFoundException":
|
|
1932
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1933
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1934
|
-
default:
|
|
1935
|
-
const parsedBody = parsedOutput.body;
|
|
1936
|
-
return throwDefaultError({
|
|
1937
|
-
output,
|
|
1938
|
-
parsedBody,
|
|
1939
|
-
errorCode,
|
|
1940
|
-
});
|
|
1941
|
-
}
|
|
1942
|
-
};
|
|
1943
|
-
const de_ListKeyPoliciesCommand = async (output, context) => {
|
|
1944
|
-
if (output.statusCode >= 300) {
|
|
1945
|
-
return de_ListKeyPoliciesCommandError(output, context);
|
|
1946
|
-
}
|
|
1947
|
-
const data = await parseBody(output.body, context);
|
|
1948
|
-
let contents = {};
|
|
1949
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1950
|
-
const response = {
|
|
1951
|
-
$metadata: deserializeMetadata(output),
|
|
1952
|
-
...contents,
|
|
1953
|
-
};
|
|
1954
|
-
return response;
|
|
1955
|
-
};
|
|
1956
|
-
exports.de_ListKeyPoliciesCommand = de_ListKeyPoliciesCommand;
|
|
1957
|
-
const de_ListKeyPoliciesCommandError = async (output, context) => {
|
|
1958
|
-
const parsedOutput = {
|
|
1959
|
-
...output,
|
|
1960
|
-
body: await parseErrorBody(output.body, context),
|
|
1961
|
-
};
|
|
1962
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1963
|
-
switch (errorCode) {
|
|
1964
|
-
case "DependencyTimeoutException":
|
|
1965
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1966
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1967
|
-
case "InvalidArnException":
|
|
1968
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1969
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1970
|
-
case "KMSInternalException":
|
|
1971
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1972
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1973
|
-
case "KMSInvalidStateException":
|
|
1974
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1975
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1976
|
-
case "NotFoundException":
|
|
1977
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1978
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1979
|
-
default:
|
|
1980
|
-
const parsedBody = parsedOutput.body;
|
|
1981
|
-
return throwDefaultError({
|
|
1982
|
-
output,
|
|
1983
|
-
parsedBody,
|
|
1984
|
-
errorCode,
|
|
1985
|
-
});
|
|
1986
|
-
}
|
|
1987
|
-
};
|
|
1988
|
-
const de_ListKeysCommand = async (output, context) => {
|
|
1989
|
-
if (output.statusCode >= 300) {
|
|
1990
|
-
return de_ListKeysCommandError(output, context);
|
|
1991
|
-
}
|
|
1992
|
-
const data = await parseBody(output.body, context);
|
|
1993
|
-
let contents = {};
|
|
1994
|
-
contents = (0, smithy_client_1._json)(data);
|
|
1995
|
-
const response = {
|
|
1996
|
-
$metadata: deserializeMetadata(output),
|
|
1997
|
-
...contents,
|
|
1998
|
-
};
|
|
1999
|
-
return response;
|
|
2000
|
-
};
|
|
2001
|
-
exports.de_ListKeysCommand = de_ListKeysCommand;
|
|
2002
|
-
const de_ListKeysCommandError = async (output, context) => {
|
|
2003
|
-
const parsedOutput = {
|
|
2004
|
-
...output,
|
|
2005
|
-
body: await parseErrorBody(output.body, context),
|
|
2006
|
-
};
|
|
2007
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2008
|
-
switch (errorCode) {
|
|
2009
|
-
case "DependencyTimeoutException":
|
|
2010
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2011
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2012
|
-
case "InvalidMarkerException":
|
|
2013
|
-
case "com.amazonaws.kms#InvalidMarkerException":
|
|
2014
|
-
throw await de_InvalidMarkerExceptionRes(parsedOutput, context);
|
|
2015
|
-
case "KMSInternalException":
|
|
2016
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2017
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2018
|
-
default:
|
|
2019
|
-
const parsedBody = parsedOutput.body;
|
|
2020
|
-
return throwDefaultError({
|
|
2021
|
-
output,
|
|
2022
|
-
parsedBody,
|
|
2023
|
-
errorCode,
|
|
2024
|
-
});
|
|
2025
|
-
}
|
|
2026
|
-
};
|
|
2027
|
-
const de_ListResourceTagsCommand = async (output, context) => {
|
|
2028
|
-
if (output.statusCode >= 300) {
|
|
2029
|
-
return de_ListResourceTagsCommandError(output, context);
|
|
2030
|
-
}
|
|
2031
|
-
const data = await parseBody(output.body, context);
|
|
2032
|
-
let contents = {};
|
|
2033
|
-
contents = (0, smithy_client_1._json)(data);
|
|
2034
|
-
const response = {
|
|
2035
|
-
$metadata: deserializeMetadata(output),
|
|
2036
|
-
...contents,
|
|
2037
|
-
};
|
|
2038
|
-
return response;
|
|
2039
|
-
};
|
|
2040
|
-
exports.de_ListResourceTagsCommand = de_ListResourceTagsCommand;
|
|
2041
|
-
const de_ListResourceTagsCommandError = async (output, context) => {
|
|
2042
|
-
const parsedOutput = {
|
|
2043
|
-
...output,
|
|
2044
|
-
body: await parseErrorBody(output.body, context),
|
|
2045
|
-
};
|
|
2046
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2047
|
-
switch (errorCode) {
|
|
2048
|
-
case "InvalidArnException":
|
|
2049
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2050
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2051
|
-
case "InvalidMarkerException":
|
|
2052
|
-
case "com.amazonaws.kms#InvalidMarkerException":
|
|
2053
|
-
throw await de_InvalidMarkerExceptionRes(parsedOutput, context);
|
|
2054
|
-
case "KMSInternalException":
|
|
2055
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2056
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2057
|
-
case "NotFoundException":
|
|
2058
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2059
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2060
|
-
default:
|
|
2061
|
-
const parsedBody = parsedOutput.body;
|
|
2062
|
-
return throwDefaultError({
|
|
2063
|
-
output,
|
|
2064
|
-
parsedBody,
|
|
2065
|
-
errorCode,
|
|
2066
|
-
});
|
|
2067
|
-
}
|
|
2068
|
-
};
|
|
2069
|
-
const de_ListRetirableGrantsCommand = async (output, context) => {
|
|
2070
|
-
if (output.statusCode >= 300) {
|
|
2071
|
-
return de_ListRetirableGrantsCommandError(output, context);
|
|
2072
|
-
}
|
|
2073
|
-
const data = await parseBody(output.body, context);
|
|
2074
|
-
let contents = {};
|
|
2075
|
-
contents = de_ListGrantsResponse(data, context);
|
|
2076
|
-
const response = {
|
|
2077
|
-
$metadata: deserializeMetadata(output),
|
|
2078
|
-
...contents,
|
|
2079
|
-
};
|
|
2080
|
-
return response;
|
|
2081
|
-
};
|
|
2082
|
-
exports.de_ListRetirableGrantsCommand = de_ListRetirableGrantsCommand;
|
|
2083
|
-
const de_ListRetirableGrantsCommandError = async (output, context) => {
|
|
2084
|
-
const parsedOutput = {
|
|
2085
|
-
...output,
|
|
2086
|
-
body: await parseErrorBody(output.body, context),
|
|
2087
|
-
};
|
|
2088
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2089
|
-
switch (errorCode) {
|
|
2090
|
-
case "DependencyTimeoutException":
|
|
2091
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2092
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2093
|
-
case "InvalidArnException":
|
|
2094
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2095
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2096
|
-
case "InvalidMarkerException":
|
|
2097
|
-
case "com.amazonaws.kms#InvalidMarkerException":
|
|
2098
|
-
throw await de_InvalidMarkerExceptionRes(parsedOutput, context);
|
|
2099
|
-
case "KMSInternalException":
|
|
2100
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2101
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2102
|
-
case "NotFoundException":
|
|
2103
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2104
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2105
|
-
default:
|
|
2106
|
-
const parsedBody = parsedOutput.body;
|
|
2107
|
-
return throwDefaultError({
|
|
2108
|
-
output,
|
|
2109
|
-
parsedBody,
|
|
2110
|
-
errorCode,
|
|
2111
|
-
});
|
|
2112
|
-
}
|
|
2113
|
-
};
|
|
2114
|
-
const de_PutKeyPolicyCommand = async (output, context) => {
|
|
2115
|
-
if (output.statusCode >= 300) {
|
|
2116
|
-
return de_PutKeyPolicyCommandError(output, context);
|
|
2117
|
-
}
|
|
2118
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
2119
|
-
const response = {
|
|
2120
|
-
$metadata: deserializeMetadata(output),
|
|
2121
|
-
};
|
|
2122
|
-
return response;
|
|
2123
|
-
};
|
|
2124
|
-
exports.de_PutKeyPolicyCommand = de_PutKeyPolicyCommand;
|
|
2125
|
-
const de_PutKeyPolicyCommandError = async (output, context) => {
|
|
2126
|
-
const parsedOutput = {
|
|
2127
|
-
...output,
|
|
2128
|
-
body: await parseErrorBody(output.body, context),
|
|
2129
|
-
};
|
|
2130
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2131
|
-
switch (errorCode) {
|
|
2132
|
-
case "DependencyTimeoutException":
|
|
2133
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2134
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2135
|
-
case "InvalidArnException":
|
|
2136
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2137
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2138
|
-
case "KMSInternalException":
|
|
2139
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2140
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2141
|
-
case "KMSInvalidStateException":
|
|
2142
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2143
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2144
|
-
case "LimitExceededException":
|
|
2145
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
2146
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
2147
|
-
case "MalformedPolicyDocumentException":
|
|
2148
|
-
case "com.amazonaws.kms#MalformedPolicyDocumentException":
|
|
2149
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
2150
|
-
case "NotFoundException":
|
|
2151
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2152
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2153
|
-
case "UnsupportedOperationException":
|
|
2154
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
2155
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
2156
|
-
default:
|
|
2157
|
-
const parsedBody = parsedOutput.body;
|
|
2158
|
-
return throwDefaultError({
|
|
2159
|
-
output,
|
|
2160
|
-
parsedBody,
|
|
2161
|
-
errorCode,
|
|
2162
|
-
});
|
|
2163
|
-
}
|
|
2164
|
-
};
|
|
2165
|
-
const de_ReEncryptCommand = async (output, context) => {
|
|
2166
|
-
if (output.statusCode >= 300) {
|
|
2167
|
-
return de_ReEncryptCommandError(output, context);
|
|
2168
|
-
}
|
|
2169
|
-
const data = await parseBody(output.body, context);
|
|
2170
|
-
let contents = {};
|
|
2171
|
-
contents = de_ReEncryptResponse(data, context);
|
|
2172
|
-
const response = {
|
|
2173
|
-
$metadata: deserializeMetadata(output),
|
|
2174
|
-
...contents,
|
|
2175
|
-
};
|
|
2176
|
-
return response;
|
|
2177
|
-
};
|
|
2178
|
-
exports.de_ReEncryptCommand = de_ReEncryptCommand;
|
|
2179
|
-
const de_ReEncryptCommandError = async (output, context) => {
|
|
2180
|
-
const parsedOutput = {
|
|
2181
|
-
...output,
|
|
2182
|
-
body: await parseErrorBody(output.body, context),
|
|
2183
|
-
};
|
|
2184
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2185
|
-
switch (errorCode) {
|
|
2186
|
-
case "DependencyTimeoutException":
|
|
2187
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2188
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2189
|
-
case "DisabledException":
|
|
2190
|
-
case "com.amazonaws.kms#DisabledException":
|
|
2191
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
2192
|
-
case "DryRunOperationException":
|
|
2193
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
2194
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
2195
|
-
case "IncorrectKeyException":
|
|
2196
|
-
case "com.amazonaws.kms#IncorrectKeyException":
|
|
2197
|
-
throw await de_IncorrectKeyExceptionRes(parsedOutput, context);
|
|
2198
|
-
case "InvalidCiphertextException":
|
|
2199
|
-
case "com.amazonaws.kms#InvalidCiphertextException":
|
|
2200
|
-
throw await de_InvalidCiphertextExceptionRes(parsedOutput, context);
|
|
2201
|
-
case "InvalidGrantTokenException":
|
|
2202
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
2203
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
2204
|
-
case "InvalidKeyUsageException":
|
|
2205
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
2206
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
2207
|
-
case "KMSInternalException":
|
|
2208
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2209
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2210
|
-
case "KMSInvalidStateException":
|
|
2211
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2212
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2213
|
-
case "KeyUnavailableException":
|
|
2214
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
2215
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
2216
|
-
case "NotFoundException":
|
|
2217
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2218
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2219
|
-
default:
|
|
2220
|
-
const parsedBody = parsedOutput.body;
|
|
2221
|
-
return throwDefaultError({
|
|
2222
|
-
output,
|
|
2223
|
-
parsedBody,
|
|
2224
|
-
errorCode,
|
|
2225
|
-
});
|
|
2226
|
-
}
|
|
2227
|
-
};
|
|
2228
|
-
const de_ReplicateKeyCommand = async (output, context) => {
|
|
2229
|
-
if (output.statusCode >= 300) {
|
|
2230
|
-
return de_ReplicateKeyCommandError(output, context);
|
|
2231
|
-
}
|
|
2232
|
-
const data = await parseBody(output.body, context);
|
|
2233
|
-
let contents = {};
|
|
2234
|
-
contents = de_ReplicateKeyResponse(data, context);
|
|
2235
|
-
const response = {
|
|
2236
|
-
$metadata: deserializeMetadata(output),
|
|
2237
|
-
...contents,
|
|
2238
|
-
};
|
|
2239
|
-
return response;
|
|
2240
|
-
};
|
|
2241
|
-
exports.de_ReplicateKeyCommand = de_ReplicateKeyCommand;
|
|
2242
|
-
const de_ReplicateKeyCommandError = async (output, context) => {
|
|
2243
|
-
const parsedOutput = {
|
|
2244
|
-
...output,
|
|
2245
|
-
body: await parseErrorBody(output.body, context),
|
|
2246
|
-
};
|
|
2247
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2248
|
-
switch (errorCode) {
|
|
2249
|
-
case "AlreadyExistsException":
|
|
2250
|
-
case "com.amazonaws.kms#AlreadyExistsException":
|
|
2251
|
-
throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
|
|
2252
|
-
case "DisabledException":
|
|
2253
|
-
case "com.amazonaws.kms#DisabledException":
|
|
2254
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
2255
|
-
case "InvalidArnException":
|
|
2256
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2257
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2258
|
-
case "KMSInternalException":
|
|
2259
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2260
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2261
|
-
case "KMSInvalidStateException":
|
|
2262
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2263
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2264
|
-
case "LimitExceededException":
|
|
2265
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
2266
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
2267
|
-
case "MalformedPolicyDocumentException":
|
|
2268
|
-
case "com.amazonaws.kms#MalformedPolicyDocumentException":
|
|
2269
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
2270
|
-
case "NotFoundException":
|
|
2271
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2272
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2273
|
-
case "TagException":
|
|
2274
|
-
case "com.amazonaws.kms#TagException":
|
|
2275
|
-
throw await de_TagExceptionRes(parsedOutput, context);
|
|
2276
|
-
case "UnsupportedOperationException":
|
|
2277
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
2278
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
2279
|
-
default:
|
|
2280
|
-
const parsedBody = parsedOutput.body;
|
|
2281
|
-
return throwDefaultError({
|
|
2282
|
-
output,
|
|
2283
|
-
parsedBody,
|
|
2284
|
-
errorCode,
|
|
2285
|
-
});
|
|
2286
|
-
}
|
|
2287
|
-
};
|
|
2288
|
-
const de_RetireGrantCommand = async (output, context) => {
|
|
2289
|
-
if (output.statusCode >= 300) {
|
|
2290
|
-
return de_RetireGrantCommandError(output, context);
|
|
2291
|
-
}
|
|
2292
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
2293
|
-
const response = {
|
|
2294
|
-
$metadata: deserializeMetadata(output),
|
|
2295
|
-
};
|
|
2296
|
-
return response;
|
|
2297
|
-
};
|
|
2298
|
-
exports.de_RetireGrantCommand = de_RetireGrantCommand;
|
|
2299
|
-
const de_RetireGrantCommandError = async (output, context) => {
|
|
2300
|
-
const parsedOutput = {
|
|
2301
|
-
...output,
|
|
2302
|
-
body: await parseErrorBody(output.body, context),
|
|
2303
|
-
};
|
|
2304
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2305
|
-
switch (errorCode) {
|
|
2306
|
-
case "DependencyTimeoutException":
|
|
2307
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2308
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2309
|
-
case "DryRunOperationException":
|
|
2310
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
2311
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
2312
|
-
case "InvalidArnException":
|
|
2313
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2314
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2315
|
-
case "InvalidGrantIdException":
|
|
2316
|
-
case "com.amazonaws.kms#InvalidGrantIdException":
|
|
2317
|
-
throw await de_InvalidGrantIdExceptionRes(parsedOutput, context);
|
|
2318
|
-
case "InvalidGrantTokenException":
|
|
2319
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
2320
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
2321
|
-
case "KMSInternalException":
|
|
2322
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2323
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2324
|
-
case "KMSInvalidStateException":
|
|
2325
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2326
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2327
|
-
case "NotFoundException":
|
|
2328
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2329
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2330
|
-
default:
|
|
2331
|
-
const parsedBody = parsedOutput.body;
|
|
2332
|
-
return throwDefaultError({
|
|
2333
|
-
output,
|
|
2334
|
-
parsedBody,
|
|
2335
|
-
errorCode,
|
|
2336
|
-
});
|
|
2337
|
-
}
|
|
2338
|
-
};
|
|
2339
|
-
const de_RevokeGrantCommand = async (output, context) => {
|
|
2340
|
-
if (output.statusCode >= 300) {
|
|
2341
|
-
return de_RevokeGrantCommandError(output, context);
|
|
2342
|
-
}
|
|
2343
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
2344
|
-
const response = {
|
|
2345
|
-
$metadata: deserializeMetadata(output),
|
|
2346
|
-
};
|
|
2347
|
-
return response;
|
|
2348
|
-
};
|
|
2349
|
-
exports.de_RevokeGrantCommand = de_RevokeGrantCommand;
|
|
2350
|
-
const de_RevokeGrantCommandError = async (output, context) => {
|
|
2351
|
-
const parsedOutput = {
|
|
2352
|
-
...output,
|
|
2353
|
-
body: await parseErrorBody(output.body, context),
|
|
2354
|
-
};
|
|
2355
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2356
|
-
switch (errorCode) {
|
|
2357
|
-
case "DependencyTimeoutException":
|
|
2358
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2359
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2360
|
-
case "DryRunOperationException":
|
|
2361
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
2362
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
2363
|
-
case "InvalidArnException":
|
|
2364
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2365
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2366
|
-
case "InvalidGrantIdException":
|
|
2367
|
-
case "com.amazonaws.kms#InvalidGrantIdException":
|
|
2368
|
-
throw await de_InvalidGrantIdExceptionRes(parsedOutput, context);
|
|
2369
|
-
case "KMSInternalException":
|
|
2370
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2371
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2372
|
-
case "KMSInvalidStateException":
|
|
2373
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2374
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2375
|
-
case "NotFoundException":
|
|
2376
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2377
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2378
|
-
default:
|
|
2379
|
-
const parsedBody = parsedOutput.body;
|
|
2380
|
-
return throwDefaultError({
|
|
2381
|
-
output,
|
|
2382
|
-
parsedBody,
|
|
2383
|
-
errorCode,
|
|
2384
|
-
});
|
|
2385
|
-
}
|
|
2386
|
-
};
|
|
2387
|
-
const de_ScheduleKeyDeletionCommand = async (output, context) => {
|
|
2388
|
-
if (output.statusCode >= 300) {
|
|
2389
|
-
return de_ScheduleKeyDeletionCommandError(output, context);
|
|
2390
|
-
}
|
|
2391
|
-
const data = await parseBody(output.body, context);
|
|
2392
|
-
let contents = {};
|
|
2393
|
-
contents = de_ScheduleKeyDeletionResponse(data, context);
|
|
2394
|
-
const response = {
|
|
2395
|
-
$metadata: deserializeMetadata(output),
|
|
2396
|
-
...contents,
|
|
2397
|
-
};
|
|
2398
|
-
return response;
|
|
2399
|
-
};
|
|
2400
|
-
exports.de_ScheduleKeyDeletionCommand = de_ScheduleKeyDeletionCommand;
|
|
2401
|
-
const de_ScheduleKeyDeletionCommandError = async (output, context) => {
|
|
2402
|
-
const parsedOutput = {
|
|
2403
|
-
...output,
|
|
2404
|
-
body: await parseErrorBody(output.body, context),
|
|
2405
|
-
};
|
|
2406
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2407
|
-
switch (errorCode) {
|
|
2408
|
-
case "DependencyTimeoutException":
|
|
2409
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2410
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2411
|
-
case "InvalidArnException":
|
|
2412
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2413
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2414
|
-
case "KMSInternalException":
|
|
2415
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2416
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2417
|
-
case "KMSInvalidStateException":
|
|
2418
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2419
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2420
|
-
case "NotFoundException":
|
|
2421
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2422
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2423
|
-
default:
|
|
2424
|
-
const parsedBody = parsedOutput.body;
|
|
2425
|
-
return throwDefaultError({
|
|
2426
|
-
output,
|
|
2427
|
-
parsedBody,
|
|
2428
|
-
errorCode,
|
|
2429
|
-
});
|
|
2430
|
-
}
|
|
2431
|
-
};
|
|
2432
|
-
const de_SignCommand = async (output, context) => {
|
|
2433
|
-
if (output.statusCode >= 300) {
|
|
2434
|
-
return de_SignCommandError(output, context);
|
|
2435
|
-
}
|
|
2436
|
-
const data = await parseBody(output.body, context);
|
|
2437
|
-
let contents = {};
|
|
2438
|
-
contents = de_SignResponse(data, context);
|
|
2439
|
-
const response = {
|
|
2440
|
-
$metadata: deserializeMetadata(output),
|
|
2441
|
-
...contents,
|
|
2442
|
-
};
|
|
2443
|
-
return response;
|
|
2444
|
-
};
|
|
2445
|
-
exports.de_SignCommand = de_SignCommand;
|
|
2446
|
-
const de_SignCommandError = async (output, context) => {
|
|
2447
|
-
const parsedOutput = {
|
|
2448
|
-
...output,
|
|
2449
|
-
body: await parseErrorBody(output.body, context),
|
|
2450
|
-
};
|
|
2451
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2452
|
-
switch (errorCode) {
|
|
2453
|
-
case "DependencyTimeoutException":
|
|
2454
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2455
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2456
|
-
case "DisabledException":
|
|
2457
|
-
case "com.amazonaws.kms#DisabledException":
|
|
2458
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
2459
|
-
case "DryRunOperationException":
|
|
2460
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
2461
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
2462
|
-
case "InvalidGrantTokenException":
|
|
2463
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
2464
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
2465
|
-
case "InvalidKeyUsageException":
|
|
2466
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
2467
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
2468
|
-
case "KMSInternalException":
|
|
2469
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2470
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2471
|
-
case "KMSInvalidStateException":
|
|
2472
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2473
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2474
|
-
case "KeyUnavailableException":
|
|
2475
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
2476
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
2477
|
-
case "NotFoundException":
|
|
2478
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2479
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2480
|
-
default:
|
|
2481
|
-
const parsedBody = parsedOutput.body;
|
|
2482
|
-
return throwDefaultError({
|
|
2483
|
-
output,
|
|
2484
|
-
parsedBody,
|
|
2485
|
-
errorCode,
|
|
2486
|
-
});
|
|
2487
|
-
}
|
|
2488
|
-
};
|
|
2489
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
2490
|
-
if (output.statusCode >= 300) {
|
|
2491
|
-
return de_TagResourceCommandError(output, context);
|
|
2492
|
-
}
|
|
2493
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
2494
|
-
const response = {
|
|
2495
|
-
$metadata: deserializeMetadata(output),
|
|
2496
|
-
};
|
|
2497
|
-
return response;
|
|
2498
|
-
};
|
|
2499
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
2500
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
2501
|
-
const parsedOutput = {
|
|
2502
|
-
...output,
|
|
2503
|
-
body: await parseErrorBody(output.body, context),
|
|
2504
|
-
};
|
|
2505
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2506
|
-
switch (errorCode) {
|
|
2507
|
-
case "InvalidArnException":
|
|
2508
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2509
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2510
|
-
case "KMSInternalException":
|
|
2511
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2512
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2513
|
-
case "KMSInvalidStateException":
|
|
2514
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2515
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2516
|
-
case "LimitExceededException":
|
|
2517
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
2518
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
2519
|
-
case "NotFoundException":
|
|
2520
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2521
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2522
|
-
case "TagException":
|
|
2523
|
-
case "com.amazonaws.kms#TagException":
|
|
2524
|
-
throw await de_TagExceptionRes(parsedOutput, context);
|
|
2525
|
-
default:
|
|
2526
|
-
const parsedBody = parsedOutput.body;
|
|
2527
|
-
return throwDefaultError({
|
|
2528
|
-
output,
|
|
2529
|
-
parsedBody,
|
|
2530
|
-
errorCode,
|
|
2531
|
-
});
|
|
2532
|
-
}
|
|
2533
|
-
};
|
|
2534
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
2535
|
-
if (output.statusCode >= 300) {
|
|
2536
|
-
return de_UntagResourceCommandError(output, context);
|
|
2537
|
-
}
|
|
2538
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
2539
|
-
const response = {
|
|
2540
|
-
$metadata: deserializeMetadata(output),
|
|
2541
|
-
};
|
|
2542
|
-
return response;
|
|
2543
|
-
};
|
|
2544
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
2545
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
2546
|
-
const parsedOutput = {
|
|
2547
|
-
...output,
|
|
2548
|
-
body: await parseErrorBody(output.body, context),
|
|
2549
|
-
};
|
|
2550
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2551
|
-
switch (errorCode) {
|
|
2552
|
-
case "InvalidArnException":
|
|
2553
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2554
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2555
|
-
case "KMSInternalException":
|
|
2556
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2557
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2558
|
-
case "KMSInvalidStateException":
|
|
2559
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2560
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2561
|
-
case "NotFoundException":
|
|
2562
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2563
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2564
|
-
case "TagException":
|
|
2565
|
-
case "com.amazonaws.kms#TagException":
|
|
2566
|
-
throw await de_TagExceptionRes(parsedOutput, context);
|
|
2567
|
-
default:
|
|
2568
|
-
const parsedBody = parsedOutput.body;
|
|
2569
|
-
return throwDefaultError({
|
|
2570
|
-
output,
|
|
2571
|
-
parsedBody,
|
|
2572
|
-
errorCode,
|
|
2573
|
-
});
|
|
2574
|
-
}
|
|
2575
|
-
};
|
|
2576
|
-
const de_UpdateAliasCommand = async (output, context) => {
|
|
2577
|
-
if (output.statusCode >= 300) {
|
|
2578
|
-
return de_UpdateAliasCommandError(output, context);
|
|
2579
|
-
}
|
|
2580
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
2581
|
-
const response = {
|
|
2582
|
-
$metadata: deserializeMetadata(output),
|
|
2583
|
-
};
|
|
2584
|
-
return response;
|
|
2585
|
-
};
|
|
2586
|
-
exports.de_UpdateAliasCommand = de_UpdateAliasCommand;
|
|
2587
|
-
const de_UpdateAliasCommandError = async (output, context) => {
|
|
2588
|
-
const parsedOutput = {
|
|
2589
|
-
...output,
|
|
2590
|
-
body: await parseErrorBody(output.body, context),
|
|
2591
|
-
};
|
|
2592
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2593
|
-
switch (errorCode) {
|
|
2594
|
-
case "DependencyTimeoutException":
|
|
2595
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2596
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2597
|
-
case "KMSInternalException":
|
|
2598
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2599
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2600
|
-
case "KMSInvalidStateException":
|
|
2601
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2602
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2603
|
-
case "LimitExceededException":
|
|
2604
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
2605
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
2606
|
-
case "NotFoundException":
|
|
2607
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2608
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2609
|
-
default:
|
|
2610
|
-
const parsedBody = parsedOutput.body;
|
|
2611
|
-
return throwDefaultError({
|
|
2612
|
-
output,
|
|
2613
|
-
parsedBody,
|
|
2614
|
-
errorCode,
|
|
2615
|
-
});
|
|
2616
|
-
}
|
|
2617
|
-
};
|
|
2618
|
-
const de_UpdateCustomKeyStoreCommand = async (output, context) => {
|
|
2619
|
-
if (output.statusCode >= 300) {
|
|
2620
|
-
return de_UpdateCustomKeyStoreCommandError(output, context);
|
|
2621
|
-
}
|
|
2622
|
-
const data = await parseBody(output.body, context);
|
|
2623
|
-
let contents = {};
|
|
2624
|
-
contents = (0, smithy_client_1._json)(data);
|
|
2625
|
-
const response = {
|
|
2626
|
-
$metadata: deserializeMetadata(output),
|
|
2627
|
-
...contents,
|
|
2628
|
-
};
|
|
2629
|
-
return response;
|
|
2630
|
-
};
|
|
2631
|
-
exports.de_UpdateCustomKeyStoreCommand = de_UpdateCustomKeyStoreCommand;
|
|
2632
|
-
const de_UpdateCustomKeyStoreCommandError = async (output, context) => {
|
|
2633
|
-
const parsedOutput = {
|
|
2634
|
-
...output,
|
|
2635
|
-
body: await parseErrorBody(output.body, context),
|
|
2636
|
-
};
|
|
2637
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2638
|
-
switch (errorCode) {
|
|
2639
|
-
case "CloudHsmClusterInvalidConfigurationException":
|
|
2640
|
-
case "com.amazonaws.kms#CloudHsmClusterInvalidConfigurationException":
|
|
2641
|
-
throw await de_CloudHsmClusterInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
2642
|
-
case "CloudHsmClusterNotActiveException":
|
|
2643
|
-
case "com.amazonaws.kms#CloudHsmClusterNotActiveException":
|
|
2644
|
-
throw await de_CloudHsmClusterNotActiveExceptionRes(parsedOutput, context);
|
|
2645
|
-
case "CloudHsmClusterNotFoundException":
|
|
2646
|
-
case "com.amazonaws.kms#CloudHsmClusterNotFoundException":
|
|
2647
|
-
throw await de_CloudHsmClusterNotFoundExceptionRes(parsedOutput, context);
|
|
2648
|
-
case "CloudHsmClusterNotRelatedException":
|
|
2649
|
-
case "com.amazonaws.kms#CloudHsmClusterNotRelatedException":
|
|
2650
|
-
throw await de_CloudHsmClusterNotRelatedExceptionRes(parsedOutput, context);
|
|
2651
|
-
case "CustomKeyStoreInvalidStateException":
|
|
2652
|
-
case "com.amazonaws.kms#CustomKeyStoreInvalidStateException":
|
|
2653
|
-
throw await de_CustomKeyStoreInvalidStateExceptionRes(parsedOutput, context);
|
|
2654
|
-
case "CustomKeyStoreNameInUseException":
|
|
2655
|
-
case "com.amazonaws.kms#CustomKeyStoreNameInUseException":
|
|
2656
|
-
throw await de_CustomKeyStoreNameInUseExceptionRes(parsedOutput, context);
|
|
2657
|
-
case "CustomKeyStoreNotFoundException":
|
|
2658
|
-
case "com.amazonaws.kms#CustomKeyStoreNotFoundException":
|
|
2659
|
-
throw await de_CustomKeyStoreNotFoundExceptionRes(parsedOutput, context);
|
|
2660
|
-
case "KMSInternalException":
|
|
2661
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2662
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2663
|
-
case "XksProxyIncorrectAuthenticationCredentialException":
|
|
2664
|
-
case "com.amazonaws.kms#XksProxyIncorrectAuthenticationCredentialException":
|
|
2665
|
-
throw await de_XksProxyIncorrectAuthenticationCredentialExceptionRes(parsedOutput, context);
|
|
2666
|
-
case "XksProxyInvalidConfigurationException":
|
|
2667
|
-
case "com.amazonaws.kms#XksProxyInvalidConfigurationException":
|
|
2668
|
-
throw await de_XksProxyInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
2669
|
-
case "XksProxyInvalidResponseException":
|
|
2670
|
-
case "com.amazonaws.kms#XksProxyInvalidResponseException":
|
|
2671
|
-
throw await de_XksProxyInvalidResponseExceptionRes(parsedOutput, context);
|
|
2672
|
-
case "XksProxyUriEndpointInUseException":
|
|
2673
|
-
case "com.amazonaws.kms#XksProxyUriEndpointInUseException":
|
|
2674
|
-
throw await de_XksProxyUriEndpointInUseExceptionRes(parsedOutput, context);
|
|
2675
|
-
case "XksProxyUriInUseException":
|
|
2676
|
-
case "com.amazonaws.kms#XksProxyUriInUseException":
|
|
2677
|
-
throw await de_XksProxyUriInUseExceptionRes(parsedOutput, context);
|
|
2678
|
-
case "XksProxyUriUnreachableException":
|
|
2679
|
-
case "com.amazonaws.kms#XksProxyUriUnreachableException":
|
|
2680
|
-
throw await de_XksProxyUriUnreachableExceptionRes(parsedOutput, context);
|
|
2681
|
-
case "XksProxyVpcEndpointServiceInUseException":
|
|
2682
|
-
case "com.amazonaws.kms#XksProxyVpcEndpointServiceInUseException":
|
|
2683
|
-
throw await de_XksProxyVpcEndpointServiceInUseExceptionRes(parsedOutput, context);
|
|
2684
|
-
case "XksProxyVpcEndpointServiceInvalidConfigurationException":
|
|
2685
|
-
case "com.amazonaws.kms#XksProxyVpcEndpointServiceInvalidConfigurationException":
|
|
2686
|
-
throw await de_XksProxyVpcEndpointServiceInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
2687
|
-
case "XksProxyVpcEndpointServiceNotFoundException":
|
|
2688
|
-
case "com.amazonaws.kms#XksProxyVpcEndpointServiceNotFoundException":
|
|
2689
|
-
throw await de_XksProxyVpcEndpointServiceNotFoundExceptionRes(parsedOutput, context);
|
|
2690
|
-
default:
|
|
2691
|
-
const parsedBody = parsedOutput.body;
|
|
2692
|
-
return throwDefaultError({
|
|
2693
|
-
output,
|
|
2694
|
-
parsedBody,
|
|
2695
|
-
errorCode,
|
|
2696
|
-
});
|
|
2697
|
-
}
|
|
2698
|
-
};
|
|
2699
|
-
const de_UpdateKeyDescriptionCommand = async (output, context) => {
|
|
2700
|
-
if (output.statusCode >= 300) {
|
|
2701
|
-
return de_UpdateKeyDescriptionCommandError(output, context);
|
|
2702
|
-
}
|
|
2703
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
2704
|
-
const response = {
|
|
2705
|
-
$metadata: deserializeMetadata(output),
|
|
2706
|
-
};
|
|
2707
|
-
return response;
|
|
2708
|
-
};
|
|
2709
|
-
exports.de_UpdateKeyDescriptionCommand = de_UpdateKeyDescriptionCommand;
|
|
2710
|
-
const de_UpdateKeyDescriptionCommandError = async (output, context) => {
|
|
2711
|
-
const parsedOutput = {
|
|
2712
|
-
...output,
|
|
2713
|
-
body: await parseErrorBody(output.body, context),
|
|
2714
|
-
};
|
|
2715
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2716
|
-
switch (errorCode) {
|
|
2717
|
-
case "DependencyTimeoutException":
|
|
2718
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2719
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2720
|
-
case "InvalidArnException":
|
|
2721
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2722
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2723
|
-
case "KMSInternalException":
|
|
2724
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2725
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2726
|
-
case "KMSInvalidStateException":
|
|
2727
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2728
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2729
|
-
case "NotFoundException":
|
|
2730
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2731
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2732
|
-
default:
|
|
2733
|
-
const parsedBody = parsedOutput.body;
|
|
2734
|
-
return throwDefaultError({
|
|
2735
|
-
output,
|
|
2736
|
-
parsedBody,
|
|
2737
|
-
errorCode,
|
|
2738
|
-
});
|
|
2739
|
-
}
|
|
2740
|
-
};
|
|
2741
|
-
const de_UpdatePrimaryRegionCommand = async (output, context) => {
|
|
2742
|
-
if (output.statusCode >= 300) {
|
|
2743
|
-
return de_UpdatePrimaryRegionCommandError(output, context);
|
|
2744
|
-
}
|
|
2745
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
2746
|
-
const response = {
|
|
2747
|
-
$metadata: deserializeMetadata(output),
|
|
2748
|
-
};
|
|
2749
|
-
return response;
|
|
2750
|
-
};
|
|
2751
|
-
exports.de_UpdatePrimaryRegionCommand = de_UpdatePrimaryRegionCommand;
|
|
2752
|
-
const de_UpdatePrimaryRegionCommandError = async (output, context) => {
|
|
2753
|
-
const parsedOutput = {
|
|
2754
|
-
...output,
|
|
2755
|
-
body: await parseErrorBody(output.body, context),
|
|
2756
|
-
};
|
|
2757
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2758
|
-
switch (errorCode) {
|
|
2759
|
-
case "DisabledException":
|
|
2760
|
-
case "com.amazonaws.kms#DisabledException":
|
|
2761
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
2762
|
-
case "InvalidArnException":
|
|
2763
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2764
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2765
|
-
case "KMSInternalException":
|
|
2766
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2767
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2768
|
-
case "KMSInvalidStateException":
|
|
2769
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2770
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2771
|
-
case "NotFoundException":
|
|
2772
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2773
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2774
|
-
case "UnsupportedOperationException":
|
|
2775
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
2776
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
2777
|
-
default:
|
|
2778
|
-
const parsedBody = parsedOutput.body;
|
|
2779
|
-
return throwDefaultError({
|
|
2780
|
-
output,
|
|
2781
|
-
parsedBody,
|
|
2782
|
-
errorCode,
|
|
2783
|
-
});
|
|
2784
|
-
}
|
|
2785
|
-
};
|
|
2786
|
-
const de_VerifyCommand = async (output, context) => {
|
|
2787
|
-
if (output.statusCode >= 300) {
|
|
2788
|
-
return de_VerifyCommandError(output, context);
|
|
2789
|
-
}
|
|
2790
|
-
const data = await parseBody(output.body, context);
|
|
2791
|
-
let contents = {};
|
|
2792
|
-
contents = (0, smithy_client_1._json)(data);
|
|
2793
|
-
const response = {
|
|
2794
|
-
$metadata: deserializeMetadata(output),
|
|
2795
|
-
...contents,
|
|
2796
|
-
};
|
|
2797
|
-
return response;
|
|
2798
|
-
};
|
|
2799
|
-
exports.de_VerifyCommand = de_VerifyCommand;
|
|
2800
|
-
const de_VerifyCommandError = async (output, context) => {
|
|
2801
|
-
const parsedOutput = {
|
|
2802
|
-
...output,
|
|
2803
|
-
body: await parseErrorBody(output.body, context),
|
|
2804
|
-
};
|
|
2805
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2806
|
-
switch (errorCode) {
|
|
2807
|
-
case "DependencyTimeoutException":
|
|
2808
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2809
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2810
|
-
case "DisabledException":
|
|
2811
|
-
case "com.amazonaws.kms#DisabledException":
|
|
2812
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
2813
|
-
case "DryRunOperationException":
|
|
2814
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
2815
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
2816
|
-
case "InvalidGrantTokenException":
|
|
2817
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
2818
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
2819
|
-
case "InvalidKeyUsageException":
|
|
2820
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
2821
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
2822
|
-
case "KMSInternalException":
|
|
2823
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2824
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2825
|
-
case "KMSInvalidSignatureException":
|
|
2826
|
-
case "com.amazonaws.kms#KMSInvalidSignatureException":
|
|
2827
|
-
throw await de_KMSInvalidSignatureExceptionRes(parsedOutput, context);
|
|
2828
|
-
case "KMSInvalidStateException":
|
|
2829
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2830
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2831
|
-
case "KeyUnavailableException":
|
|
2832
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
2833
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
2834
|
-
case "NotFoundException":
|
|
2835
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2836
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2837
|
-
default:
|
|
2838
|
-
const parsedBody = parsedOutput.body;
|
|
2839
|
-
return throwDefaultError({
|
|
2840
|
-
output,
|
|
2841
|
-
parsedBody,
|
|
2842
|
-
errorCode,
|
|
2843
|
-
});
|
|
2844
|
-
}
|
|
2845
|
-
};
|
|
2846
|
-
const de_VerifyMacCommand = async (output, context) => {
|
|
2847
|
-
if (output.statusCode >= 300) {
|
|
2848
|
-
return de_VerifyMacCommandError(output, context);
|
|
2849
|
-
}
|
|
2850
|
-
const data = await parseBody(output.body, context);
|
|
2851
|
-
let contents = {};
|
|
2852
|
-
contents = (0, smithy_client_1._json)(data);
|
|
2853
|
-
const response = {
|
|
2854
|
-
$metadata: deserializeMetadata(output),
|
|
2855
|
-
...contents,
|
|
2856
|
-
};
|
|
2857
|
-
return response;
|
|
2858
|
-
};
|
|
2859
|
-
exports.de_VerifyMacCommand = de_VerifyMacCommand;
|
|
2860
|
-
const de_VerifyMacCommandError = async (output, context) => {
|
|
2861
|
-
const parsedOutput = {
|
|
2862
|
-
...output,
|
|
2863
|
-
body: await parseErrorBody(output.body, context),
|
|
2864
|
-
};
|
|
2865
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2866
|
-
switch (errorCode) {
|
|
2867
|
-
case "DisabledException":
|
|
2868
|
-
case "com.amazonaws.kms#DisabledException":
|
|
2869
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
2870
|
-
case "DryRunOperationException":
|
|
2871
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
2872
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
2873
|
-
case "InvalidGrantTokenException":
|
|
2874
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
2875
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
2876
|
-
case "InvalidKeyUsageException":
|
|
2877
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
2878
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
2879
|
-
case "KMSInternalException":
|
|
2880
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2881
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2882
|
-
case "KMSInvalidMacException":
|
|
2883
|
-
case "com.amazonaws.kms#KMSInvalidMacException":
|
|
2884
|
-
throw await de_KMSInvalidMacExceptionRes(parsedOutput, context);
|
|
2885
|
-
case "KMSInvalidStateException":
|
|
2886
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2887
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2888
|
-
case "KeyUnavailableException":
|
|
2889
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
2890
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
2891
|
-
case "NotFoundException":
|
|
2892
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2893
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2894
|
-
default:
|
|
2895
|
-
const parsedBody = parsedOutput.body;
|
|
2896
|
-
return throwDefaultError({
|
|
2897
|
-
output,
|
|
2898
|
-
parsedBody,
|
|
2899
|
-
errorCode,
|
|
2900
|
-
});
|
|
2901
|
-
}
|
|
2902
|
-
};
|
|
2903
|
-
const de_AlreadyExistsExceptionRes = async (parsedOutput, context) => {
|
|
2904
|
-
const body = parsedOutput.body;
|
|
2905
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
2906
|
-
const exception = new models_0_1.AlreadyExistsException({
|
|
2907
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2908
|
-
...deserialized,
|
|
2909
|
-
});
|
|
2910
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
2911
|
-
};
|
|
2912
|
-
const de_CloudHsmClusterInUseExceptionRes = async (parsedOutput, context) => {
|
|
2913
|
-
const body = parsedOutput.body;
|
|
2914
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
2915
|
-
const exception = new models_0_1.CloudHsmClusterInUseException({
|
|
2916
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2917
|
-
...deserialized,
|
|
2918
|
-
});
|
|
2919
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
2920
|
-
};
|
|
2921
|
-
const de_CloudHsmClusterInvalidConfigurationExceptionRes = async (parsedOutput, context) => {
|
|
2922
|
-
const body = parsedOutput.body;
|
|
2923
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
2924
|
-
const exception = new models_0_1.CloudHsmClusterInvalidConfigurationException({
|
|
2925
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2926
|
-
...deserialized,
|
|
2927
|
-
});
|
|
2928
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
2929
|
-
};
|
|
2930
|
-
const de_CloudHsmClusterNotActiveExceptionRes = async (parsedOutput, context) => {
|
|
2931
|
-
const body = parsedOutput.body;
|
|
2932
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
2933
|
-
const exception = new models_0_1.CloudHsmClusterNotActiveException({
|
|
2934
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2935
|
-
...deserialized,
|
|
2936
|
-
});
|
|
2937
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
2938
|
-
};
|
|
2939
|
-
const de_CloudHsmClusterNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
2940
|
-
const body = parsedOutput.body;
|
|
2941
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
2942
|
-
const exception = new models_0_1.CloudHsmClusterNotFoundException({
|
|
2943
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2944
|
-
...deserialized,
|
|
2945
|
-
});
|
|
2946
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
2947
|
-
};
|
|
2948
|
-
const de_CloudHsmClusterNotRelatedExceptionRes = async (parsedOutput, context) => {
|
|
2949
|
-
const body = parsedOutput.body;
|
|
2950
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
2951
|
-
const exception = new models_0_1.CloudHsmClusterNotRelatedException({
|
|
2952
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2953
|
-
...deserialized,
|
|
2954
|
-
});
|
|
2955
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
2956
|
-
};
|
|
2957
|
-
const de_CustomKeyStoreHasCMKsExceptionRes = async (parsedOutput, context) => {
|
|
2958
|
-
const body = parsedOutput.body;
|
|
2959
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
2960
|
-
const exception = new models_0_1.CustomKeyStoreHasCMKsException({
|
|
2961
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2962
|
-
...deserialized,
|
|
2963
|
-
});
|
|
2964
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
2965
|
-
};
|
|
2966
|
-
const de_CustomKeyStoreInvalidStateExceptionRes = async (parsedOutput, context) => {
|
|
2967
|
-
const body = parsedOutput.body;
|
|
2968
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
2969
|
-
const exception = new models_0_1.CustomKeyStoreInvalidStateException({
|
|
2970
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2971
|
-
...deserialized,
|
|
2972
|
-
});
|
|
2973
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
2974
|
-
};
|
|
2975
|
-
const de_CustomKeyStoreNameInUseExceptionRes = async (parsedOutput, context) => {
|
|
2976
|
-
const body = parsedOutput.body;
|
|
2977
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
2978
|
-
const exception = new models_0_1.CustomKeyStoreNameInUseException({
|
|
2979
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2980
|
-
...deserialized,
|
|
2981
|
-
});
|
|
2982
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
2983
|
-
};
|
|
2984
|
-
const de_CustomKeyStoreNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
2985
|
-
const body = parsedOutput.body;
|
|
2986
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
2987
|
-
const exception = new models_0_1.CustomKeyStoreNotFoundException({
|
|
2988
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2989
|
-
...deserialized,
|
|
2990
|
-
});
|
|
2991
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
2992
|
-
};
|
|
2993
|
-
const de_DependencyTimeoutExceptionRes = async (parsedOutput, context) => {
|
|
2994
|
-
const body = parsedOutput.body;
|
|
2995
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
2996
|
-
const exception = new models_0_1.DependencyTimeoutException({
|
|
2997
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2998
|
-
...deserialized,
|
|
2999
|
-
});
|
|
3000
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3001
|
-
};
|
|
3002
|
-
const de_DisabledExceptionRes = async (parsedOutput, context) => {
|
|
3003
|
-
const body = parsedOutput.body;
|
|
3004
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3005
|
-
const exception = new models_0_1.DisabledException({
|
|
3006
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3007
|
-
...deserialized,
|
|
3008
|
-
});
|
|
3009
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3010
|
-
};
|
|
3011
|
-
const de_DryRunOperationExceptionRes = async (parsedOutput, context) => {
|
|
3012
|
-
const body = parsedOutput.body;
|
|
3013
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3014
|
-
const exception = new models_0_1.DryRunOperationException({
|
|
3015
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3016
|
-
...deserialized,
|
|
3017
|
-
});
|
|
3018
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3019
|
-
};
|
|
3020
|
-
const de_ExpiredImportTokenExceptionRes = async (parsedOutput, context) => {
|
|
3021
|
-
const body = parsedOutput.body;
|
|
3022
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3023
|
-
const exception = new models_0_1.ExpiredImportTokenException({
|
|
3024
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3025
|
-
...deserialized,
|
|
3026
|
-
});
|
|
3027
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3028
|
-
};
|
|
3029
|
-
const de_IncorrectKeyExceptionRes = async (parsedOutput, context) => {
|
|
3030
|
-
const body = parsedOutput.body;
|
|
3031
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3032
|
-
const exception = new models_0_1.IncorrectKeyException({
|
|
3033
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3034
|
-
...deserialized,
|
|
3035
|
-
});
|
|
3036
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3037
|
-
};
|
|
3038
|
-
const de_IncorrectKeyMaterialExceptionRes = async (parsedOutput, context) => {
|
|
3039
|
-
const body = parsedOutput.body;
|
|
3040
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3041
|
-
const exception = new models_0_1.IncorrectKeyMaterialException({
|
|
3042
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3043
|
-
...deserialized,
|
|
3044
|
-
});
|
|
3045
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3046
|
-
};
|
|
3047
|
-
const de_IncorrectTrustAnchorExceptionRes = async (parsedOutput, context) => {
|
|
3048
|
-
const body = parsedOutput.body;
|
|
3049
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3050
|
-
const exception = new models_0_1.IncorrectTrustAnchorException({
|
|
3051
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3052
|
-
...deserialized,
|
|
3053
|
-
});
|
|
3054
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3055
|
-
};
|
|
3056
|
-
const de_InvalidAliasNameExceptionRes = async (parsedOutput, context) => {
|
|
3057
|
-
const body = parsedOutput.body;
|
|
3058
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3059
|
-
const exception = new models_0_1.InvalidAliasNameException({
|
|
3060
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3061
|
-
...deserialized,
|
|
3062
|
-
});
|
|
3063
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3064
|
-
};
|
|
3065
|
-
const de_InvalidArnExceptionRes = async (parsedOutput, context) => {
|
|
3066
|
-
const body = parsedOutput.body;
|
|
3067
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3068
|
-
const exception = new models_0_1.InvalidArnException({
|
|
3069
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3070
|
-
...deserialized,
|
|
3071
|
-
});
|
|
3072
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3073
|
-
};
|
|
3074
|
-
const de_InvalidCiphertextExceptionRes = async (parsedOutput, context) => {
|
|
3075
|
-
const body = parsedOutput.body;
|
|
3076
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3077
|
-
const exception = new models_0_1.InvalidCiphertextException({
|
|
3078
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3079
|
-
...deserialized,
|
|
3080
|
-
});
|
|
3081
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3082
|
-
};
|
|
3083
|
-
const de_InvalidGrantIdExceptionRes = async (parsedOutput, context) => {
|
|
3084
|
-
const body = parsedOutput.body;
|
|
3085
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3086
|
-
const exception = new models_0_1.InvalidGrantIdException({
|
|
3087
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3088
|
-
...deserialized,
|
|
3089
|
-
});
|
|
3090
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3091
|
-
};
|
|
3092
|
-
const de_InvalidGrantTokenExceptionRes = async (parsedOutput, context) => {
|
|
3093
|
-
const body = parsedOutput.body;
|
|
3094
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3095
|
-
const exception = new models_0_1.InvalidGrantTokenException({
|
|
3096
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3097
|
-
...deserialized,
|
|
3098
|
-
});
|
|
3099
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3100
|
-
};
|
|
3101
|
-
const de_InvalidImportTokenExceptionRes = async (parsedOutput, context) => {
|
|
3102
|
-
const body = parsedOutput.body;
|
|
3103
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3104
|
-
const exception = new models_0_1.InvalidImportTokenException({
|
|
3105
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3106
|
-
...deserialized,
|
|
3107
|
-
});
|
|
3108
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3109
|
-
};
|
|
3110
|
-
const de_InvalidKeyUsageExceptionRes = async (parsedOutput, context) => {
|
|
3111
|
-
const body = parsedOutput.body;
|
|
3112
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3113
|
-
const exception = new models_0_1.InvalidKeyUsageException({
|
|
3114
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3115
|
-
...deserialized,
|
|
3116
|
-
});
|
|
3117
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3118
|
-
};
|
|
3119
|
-
const de_InvalidMarkerExceptionRes = async (parsedOutput, context) => {
|
|
3120
|
-
const body = parsedOutput.body;
|
|
3121
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3122
|
-
const exception = new models_0_1.InvalidMarkerException({
|
|
3123
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3124
|
-
...deserialized,
|
|
3125
|
-
});
|
|
3126
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3127
|
-
};
|
|
3128
|
-
const de_KeyUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
3129
|
-
const body = parsedOutput.body;
|
|
3130
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3131
|
-
const exception = new models_0_1.KeyUnavailableException({
|
|
3132
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3133
|
-
...deserialized,
|
|
3134
|
-
});
|
|
3135
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3136
|
-
};
|
|
3137
|
-
const de_KMSInternalExceptionRes = async (parsedOutput, context) => {
|
|
3138
|
-
const body = parsedOutput.body;
|
|
3139
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3140
|
-
const exception = new models_0_1.KMSInternalException({
|
|
3141
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3142
|
-
...deserialized,
|
|
3143
|
-
});
|
|
3144
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3145
|
-
};
|
|
3146
|
-
const de_KMSInvalidMacExceptionRes = async (parsedOutput, context) => {
|
|
3147
|
-
const body = parsedOutput.body;
|
|
3148
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3149
|
-
const exception = new models_0_1.KMSInvalidMacException({
|
|
3150
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3151
|
-
...deserialized,
|
|
3152
|
-
});
|
|
3153
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3154
|
-
};
|
|
3155
|
-
const de_KMSInvalidSignatureExceptionRes = async (parsedOutput, context) => {
|
|
3156
|
-
const body = parsedOutput.body;
|
|
3157
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3158
|
-
const exception = new models_0_1.KMSInvalidSignatureException({
|
|
3159
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3160
|
-
...deserialized,
|
|
3161
|
-
});
|
|
3162
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3163
|
-
};
|
|
3164
|
-
const de_KMSInvalidStateExceptionRes = async (parsedOutput, context) => {
|
|
3165
|
-
const body = parsedOutput.body;
|
|
3166
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3167
|
-
const exception = new models_0_1.KMSInvalidStateException({
|
|
3168
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3169
|
-
...deserialized,
|
|
3170
|
-
});
|
|
3171
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3172
|
-
};
|
|
3173
|
-
const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
|
|
3174
|
-
const body = parsedOutput.body;
|
|
3175
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3176
|
-
const exception = new models_0_1.LimitExceededException({
|
|
3177
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3178
|
-
...deserialized,
|
|
3179
|
-
});
|
|
3180
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3181
|
-
};
|
|
3182
|
-
const de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => {
|
|
3183
|
-
const body = parsedOutput.body;
|
|
3184
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3185
|
-
const exception = new models_0_1.MalformedPolicyDocumentException({
|
|
3186
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3187
|
-
...deserialized,
|
|
3188
|
-
});
|
|
3189
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3190
|
-
};
|
|
3191
|
-
const de_NotFoundExceptionRes = async (parsedOutput, context) => {
|
|
3192
|
-
const body = parsedOutput.body;
|
|
3193
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3194
|
-
const exception = new models_0_1.NotFoundException({
|
|
3195
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3196
|
-
...deserialized,
|
|
3197
|
-
});
|
|
3198
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3199
|
-
};
|
|
3200
|
-
const de_TagExceptionRes = async (parsedOutput, context) => {
|
|
3201
|
-
const body = parsedOutput.body;
|
|
3202
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3203
|
-
const exception = new models_0_1.TagException({
|
|
3204
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3205
|
-
...deserialized,
|
|
3206
|
-
});
|
|
3207
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3208
|
-
};
|
|
3209
|
-
const de_UnsupportedOperationExceptionRes = async (parsedOutput, context) => {
|
|
3210
|
-
const body = parsedOutput.body;
|
|
3211
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3212
|
-
const exception = new models_0_1.UnsupportedOperationException({
|
|
3213
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3214
|
-
...deserialized,
|
|
3215
|
-
});
|
|
3216
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3217
|
-
};
|
|
3218
|
-
const de_XksKeyAlreadyInUseExceptionRes = async (parsedOutput, context) => {
|
|
3219
|
-
const body = parsedOutput.body;
|
|
3220
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3221
|
-
const exception = new models_0_1.XksKeyAlreadyInUseException({
|
|
3222
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3223
|
-
...deserialized,
|
|
3224
|
-
});
|
|
3225
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3226
|
-
};
|
|
3227
|
-
const de_XksKeyInvalidConfigurationExceptionRes = async (parsedOutput, context) => {
|
|
3228
|
-
const body = parsedOutput.body;
|
|
3229
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3230
|
-
const exception = new models_0_1.XksKeyInvalidConfigurationException({
|
|
3231
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3232
|
-
...deserialized,
|
|
3233
|
-
});
|
|
3234
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3235
|
-
};
|
|
3236
|
-
const de_XksKeyNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
3237
|
-
const body = parsedOutput.body;
|
|
3238
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3239
|
-
const exception = new models_0_1.XksKeyNotFoundException({
|
|
3240
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3241
|
-
...deserialized,
|
|
3242
|
-
});
|
|
3243
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3244
|
-
};
|
|
3245
|
-
const de_XksProxyIncorrectAuthenticationCredentialExceptionRes = async (parsedOutput, context) => {
|
|
3246
|
-
const body = parsedOutput.body;
|
|
3247
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3248
|
-
const exception = new models_0_1.XksProxyIncorrectAuthenticationCredentialException({
|
|
3249
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3250
|
-
...deserialized,
|
|
3251
|
-
});
|
|
3252
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3253
|
-
};
|
|
3254
|
-
const de_XksProxyInvalidConfigurationExceptionRes = async (parsedOutput, context) => {
|
|
3255
|
-
const body = parsedOutput.body;
|
|
3256
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3257
|
-
const exception = new models_0_1.XksProxyInvalidConfigurationException({
|
|
3258
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3259
|
-
...deserialized,
|
|
3260
|
-
});
|
|
3261
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3262
|
-
};
|
|
3263
|
-
const de_XksProxyInvalidResponseExceptionRes = async (parsedOutput, context) => {
|
|
3264
|
-
const body = parsedOutput.body;
|
|
3265
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3266
|
-
const exception = new models_0_1.XksProxyInvalidResponseException({
|
|
3267
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3268
|
-
...deserialized,
|
|
3269
|
-
});
|
|
3270
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3271
|
-
};
|
|
3272
|
-
const de_XksProxyUriEndpointInUseExceptionRes = async (parsedOutput, context) => {
|
|
3273
|
-
const body = parsedOutput.body;
|
|
3274
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3275
|
-
const exception = new models_0_1.XksProxyUriEndpointInUseException({
|
|
3276
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3277
|
-
...deserialized,
|
|
3278
|
-
});
|
|
3279
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3280
|
-
};
|
|
3281
|
-
const de_XksProxyUriInUseExceptionRes = async (parsedOutput, context) => {
|
|
3282
|
-
const body = parsedOutput.body;
|
|
3283
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3284
|
-
const exception = new models_0_1.XksProxyUriInUseException({
|
|
3285
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3286
|
-
...deserialized,
|
|
3287
|
-
});
|
|
3288
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3289
|
-
};
|
|
3290
|
-
const de_XksProxyUriUnreachableExceptionRes = async (parsedOutput, context) => {
|
|
3291
|
-
const body = parsedOutput.body;
|
|
3292
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3293
|
-
const exception = new models_0_1.XksProxyUriUnreachableException({
|
|
3294
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3295
|
-
...deserialized,
|
|
3296
|
-
});
|
|
3297
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3298
|
-
};
|
|
3299
|
-
const de_XksProxyVpcEndpointServiceInUseExceptionRes = async (parsedOutput, context) => {
|
|
3300
|
-
const body = parsedOutput.body;
|
|
3301
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3302
|
-
const exception = new models_0_1.XksProxyVpcEndpointServiceInUseException({
|
|
3303
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3304
|
-
...deserialized,
|
|
3305
|
-
});
|
|
3306
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3307
|
-
};
|
|
3308
|
-
const de_XksProxyVpcEndpointServiceInvalidConfigurationExceptionRes = async (parsedOutput, context) => {
|
|
3309
|
-
const body = parsedOutput.body;
|
|
3310
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3311
|
-
const exception = new models_0_1.XksProxyVpcEndpointServiceInvalidConfigurationException({
|
|
3312
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3313
|
-
...deserialized,
|
|
3314
|
-
});
|
|
3315
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3316
|
-
};
|
|
3317
|
-
const de_XksProxyVpcEndpointServiceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
3318
|
-
const body = parsedOutput.body;
|
|
3319
|
-
const deserialized = (0, smithy_client_1._json)(body);
|
|
3320
|
-
const exception = new models_0_1.XksProxyVpcEndpointServiceNotFoundException({
|
|
3321
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3322
|
-
...deserialized,
|
|
3323
|
-
});
|
|
3324
|
-
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
3325
|
-
};
|
|
3326
|
-
const se_DecryptRequest = (input, context) => {
|
|
3327
|
-
return (0, smithy_client_1.take)(input, {
|
|
3328
|
-
CiphertextBlob: context.base64Encoder,
|
|
3329
|
-
DryRun: [],
|
|
3330
|
-
EncryptionAlgorithm: [],
|
|
3331
|
-
EncryptionContext: smithy_client_1._json,
|
|
3332
|
-
GrantTokens: smithy_client_1._json,
|
|
3333
|
-
KeyId: [],
|
|
3334
|
-
Recipient: (_) => se_RecipientInfo(_, context),
|
|
3335
|
-
});
|
|
3336
|
-
};
|
|
3337
|
-
const se_EncryptRequest = (input, context) => {
|
|
3338
|
-
return (0, smithy_client_1.take)(input, {
|
|
3339
|
-
DryRun: [],
|
|
3340
|
-
EncryptionAlgorithm: [],
|
|
3341
|
-
EncryptionContext: smithy_client_1._json,
|
|
3342
|
-
GrantTokens: smithy_client_1._json,
|
|
3343
|
-
KeyId: [],
|
|
3344
|
-
Plaintext: context.base64Encoder,
|
|
3345
|
-
});
|
|
3346
|
-
};
|
|
3347
|
-
const se_GenerateDataKeyPairRequest = (input, context) => {
|
|
3348
|
-
return (0, smithy_client_1.take)(input, {
|
|
3349
|
-
DryRun: [],
|
|
3350
|
-
EncryptionContext: smithy_client_1._json,
|
|
3351
|
-
GrantTokens: smithy_client_1._json,
|
|
3352
|
-
KeyId: [],
|
|
3353
|
-
KeyPairSpec: [],
|
|
3354
|
-
Recipient: (_) => se_RecipientInfo(_, context),
|
|
3355
|
-
});
|
|
3356
|
-
};
|
|
3357
|
-
const se_GenerateDataKeyRequest = (input, context) => {
|
|
3358
|
-
return (0, smithy_client_1.take)(input, {
|
|
3359
|
-
DryRun: [],
|
|
3360
|
-
EncryptionContext: smithy_client_1._json,
|
|
3361
|
-
GrantTokens: smithy_client_1._json,
|
|
3362
|
-
KeyId: [],
|
|
3363
|
-
KeySpec: [],
|
|
3364
|
-
NumberOfBytes: [],
|
|
3365
|
-
Recipient: (_) => se_RecipientInfo(_, context),
|
|
3366
|
-
});
|
|
3367
|
-
};
|
|
3368
|
-
const se_GenerateMacRequest = (input, context) => {
|
|
3369
|
-
return (0, smithy_client_1.take)(input, {
|
|
3370
|
-
DryRun: [],
|
|
3371
|
-
GrantTokens: smithy_client_1._json,
|
|
3372
|
-
KeyId: [],
|
|
3373
|
-
MacAlgorithm: [],
|
|
3374
|
-
Message: context.base64Encoder,
|
|
3375
|
-
});
|
|
3376
|
-
};
|
|
3377
|
-
const se_GenerateRandomRequest = (input, context) => {
|
|
3378
|
-
return (0, smithy_client_1.take)(input, {
|
|
3379
|
-
CustomKeyStoreId: [],
|
|
3380
|
-
NumberOfBytes: [],
|
|
3381
|
-
Recipient: (_) => se_RecipientInfo(_, context),
|
|
3382
|
-
});
|
|
3383
|
-
};
|
|
3384
|
-
const se_ImportKeyMaterialRequest = (input, context) => {
|
|
3385
|
-
return (0, smithy_client_1.take)(input, {
|
|
3386
|
-
EncryptedKeyMaterial: context.base64Encoder,
|
|
3387
|
-
ExpirationModel: [],
|
|
3388
|
-
ImportToken: context.base64Encoder,
|
|
3389
|
-
KeyId: [],
|
|
3390
|
-
ValidTo: (_) => Math.round(_.getTime() / 1000),
|
|
3391
|
-
});
|
|
3392
|
-
};
|
|
3393
|
-
const se_RecipientInfo = (input, context) => {
|
|
3394
|
-
return (0, smithy_client_1.take)(input, {
|
|
3395
|
-
AttestationDocument: context.base64Encoder,
|
|
3396
|
-
KeyEncryptionAlgorithm: [],
|
|
3397
|
-
});
|
|
3398
|
-
};
|
|
3399
|
-
const se_ReEncryptRequest = (input, context) => {
|
|
3400
|
-
return (0, smithy_client_1.take)(input, {
|
|
3401
|
-
CiphertextBlob: context.base64Encoder,
|
|
3402
|
-
DestinationEncryptionAlgorithm: [],
|
|
3403
|
-
DestinationEncryptionContext: smithy_client_1._json,
|
|
3404
|
-
DestinationKeyId: [],
|
|
3405
|
-
DryRun: [],
|
|
3406
|
-
GrantTokens: smithy_client_1._json,
|
|
3407
|
-
SourceEncryptionAlgorithm: [],
|
|
3408
|
-
SourceEncryptionContext: smithy_client_1._json,
|
|
3409
|
-
SourceKeyId: [],
|
|
3410
|
-
});
|
|
3411
|
-
};
|
|
3412
|
-
const se_SignRequest = (input, context) => {
|
|
3413
|
-
return (0, smithy_client_1.take)(input, {
|
|
3414
|
-
DryRun: [],
|
|
3415
|
-
GrantTokens: smithy_client_1._json,
|
|
3416
|
-
KeyId: [],
|
|
3417
|
-
Message: context.base64Encoder,
|
|
3418
|
-
MessageType: [],
|
|
3419
|
-
SigningAlgorithm: [],
|
|
3420
|
-
});
|
|
3421
|
-
};
|
|
3422
|
-
const se_VerifyMacRequest = (input, context) => {
|
|
3423
|
-
return (0, smithy_client_1.take)(input, {
|
|
3424
|
-
DryRun: [],
|
|
3425
|
-
GrantTokens: smithy_client_1._json,
|
|
3426
|
-
KeyId: [],
|
|
3427
|
-
Mac: context.base64Encoder,
|
|
3428
|
-
MacAlgorithm: [],
|
|
3429
|
-
Message: context.base64Encoder,
|
|
3430
|
-
});
|
|
3431
|
-
};
|
|
3432
|
-
const se_VerifyRequest = (input, context) => {
|
|
3433
|
-
return (0, smithy_client_1.take)(input, {
|
|
3434
|
-
DryRun: [],
|
|
3435
|
-
GrantTokens: smithy_client_1._json,
|
|
3436
|
-
KeyId: [],
|
|
3437
|
-
Message: context.base64Encoder,
|
|
3438
|
-
MessageType: [],
|
|
3439
|
-
Signature: context.base64Encoder,
|
|
3440
|
-
SigningAlgorithm: [],
|
|
3441
|
-
});
|
|
3442
|
-
};
|
|
3443
|
-
const de_AliasList = (output, context) => {
|
|
3444
|
-
const retVal = (output || [])
|
|
3445
|
-
.filter((e) => e != null)
|
|
3446
|
-
.map((entry) => {
|
|
3447
|
-
return de_AliasListEntry(entry, context);
|
|
3448
|
-
});
|
|
3449
|
-
return retVal;
|
|
3450
|
-
};
|
|
3451
|
-
const de_AliasListEntry = (output, context) => {
|
|
3452
|
-
return (0, smithy_client_1.take)(output, {
|
|
3453
|
-
AliasArn: smithy_client_1.expectString,
|
|
3454
|
-
AliasName: smithy_client_1.expectString,
|
|
3455
|
-
CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
3456
|
-
LastUpdatedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
3457
|
-
TargetKeyId: smithy_client_1.expectString,
|
|
3458
|
-
});
|
|
3459
|
-
};
|
|
3460
|
-
const de_CreateKeyResponse = (output, context) => {
|
|
3461
|
-
return (0, smithy_client_1.take)(output, {
|
|
3462
|
-
KeyMetadata: (_) => de_KeyMetadata(_, context),
|
|
3463
|
-
});
|
|
3464
|
-
};
|
|
3465
|
-
const de_CustomKeyStoresList = (output, context) => {
|
|
3466
|
-
const retVal = (output || [])
|
|
3467
|
-
.filter((e) => e != null)
|
|
3468
|
-
.map((entry) => {
|
|
3469
|
-
return de_CustomKeyStoresListEntry(entry, context);
|
|
3470
|
-
});
|
|
3471
|
-
return retVal;
|
|
3472
|
-
};
|
|
3473
|
-
const de_CustomKeyStoresListEntry = (output, context) => {
|
|
3474
|
-
return (0, smithy_client_1.take)(output, {
|
|
3475
|
-
CloudHsmClusterId: smithy_client_1.expectString,
|
|
3476
|
-
ConnectionErrorCode: smithy_client_1.expectString,
|
|
3477
|
-
ConnectionState: smithy_client_1.expectString,
|
|
3478
|
-
CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
3479
|
-
CustomKeyStoreId: smithy_client_1.expectString,
|
|
3480
|
-
CustomKeyStoreName: smithy_client_1.expectString,
|
|
3481
|
-
CustomKeyStoreType: smithy_client_1.expectString,
|
|
3482
|
-
TrustAnchorCertificate: smithy_client_1.expectString,
|
|
3483
|
-
XksProxyConfiguration: smithy_client_1._json,
|
|
3484
|
-
});
|
|
3485
|
-
};
|
|
3486
|
-
const de_DecryptResponse = (output, context) => {
|
|
3487
|
-
return (0, smithy_client_1.take)(output, {
|
|
3488
|
-
CiphertextForRecipient: context.base64Decoder,
|
|
3489
|
-
EncryptionAlgorithm: smithy_client_1.expectString,
|
|
3490
|
-
KeyId: smithy_client_1.expectString,
|
|
3491
|
-
Plaintext: context.base64Decoder,
|
|
3492
|
-
});
|
|
3493
|
-
};
|
|
3494
|
-
const de_DescribeCustomKeyStoresResponse = (output, context) => {
|
|
3495
|
-
return (0, smithy_client_1.take)(output, {
|
|
3496
|
-
CustomKeyStores: (_) => de_CustomKeyStoresList(_, context),
|
|
3497
|
-
NextMarker: smithy_client_1.expectString,
|
|
3498
|
-
Truncated: smithy_client_1.expectBoolean,
|
|
3499
|
-
});
|
|
3500
|
-
};
|
|
3501
|
-
const de_DescribeKeyResponse = (output, context) => {
|
|
3502
|
-
return (0, smithy_client_1.take)(output, {
|
|
3503
|
-
KeyMetadata: (_) => de_KeyMetadata(_, context),
|
|
3504
|
-
});
|
|
3505
|
-
};
|
|
3506
|
-
const de_EncryptResponse = (output, context) => {
|
|
3507
|
-
return (0, smithy_client_1.take)(output, {
|
|
3508
|
-
CiphertextBlob: context.base64Decoder,
|
|
3509
|
-
EncryptionAlgorithm: smithy_client_1.expectString,
|
|
3510
|
-
KeyId: smithy_client_1.expectString,
|
|
3511
|
-
});
|
|
3512
|
-
};
|
|
3513
|
-
const de_GenerateDataKeyPairResponse = (output, context) => {
|
|
3514
|
-
return (0, smithy_client_1.take)(output, {
|
|
3515
|
-
CiphertextForRecipient: context.base64Decoder,
|
|
3516
|
-
KeyId: smithy_client_1.expectString,
|
|
3517
|
-
KeyPairSpec: smithy_client_1.expectString,
|
|
3518
|
-
PrivateKeyCiphertextBlob: context.base64Decoder,
|
|
3519
|
-
PrivateKeyPlaintext: context.base64Decoder,
|
|
3520
|
-
PublicKey: context.base64Decoder,
|
|
3521
|
-
});
|
|
3522
|
-
};
|
|
3523
|
-
const de_GenerateDataKeyPairWithoutPlaintextResponse = (output, context) => {
|
|
3524
|
-
return (0, smithy_client_1.take)(output, {
|
|
3525
|
-
KeyId: smithy_client_1.expectString,
|
|
3526
|
-
KeyPairSpec: smithy_client_1.expectString,
|
|
3527
|
-
PrivateKeyCiphertextBlob: context.base64Decoder,
|
|
3528
|
-
PublicKey: context.base64Decoder,
|
|
3529
|
-
});
|
|
3530
|
-
};
|
|
3531
|
-
const de_GenerateDataKeyResponse = (output, context) => {
|
|
3532
|
-
return (0, smithy_client_1.take)(output, {
|
|
3533
|
-
CiphertextBlob: context.base64Decoder,
|
|
3534
|
-
CiphertextForRecipient: context.base64Decoder,
|
|
3535
|
-
KeyId: smithy_client_1.expectString,
|
|
3536
|
-
Plaintext: context.base64Decoder,
|
|
3537
|
-
});
|
|
3538
|
-
};
|
|
3539
|
-
const de_GenerateDataKeyWithoutPlaintextResponse = (output, context) => {
|
|
3540
|
-
return (0, smithy_client_1.take)(output, {
|
|
3541
|
-
CiphertextBlob: context.base64Decoder,
|
|
3542
|
-
KeyId: smithy_client_1.expectString,
|
|
3543
|
-
});
|
|
3544
|
-
};
|
|
3545
|
-
const de_GenerateMacResponse = (output, context) => {
|
|
3546
|
-
return (0, smithy_client_1.take)(output, {
|
|
3547
|
-
KeyId: smithy_client_1.expectString,
|
|
3548
|
-
Mac: context.base64Decoder,
|
|
3549
|
-
MacAlgorithm: smithy_client_1.expectString,
|
|
3550
|
-
});
|
|
3551
|
-
};
|
|
3552
|
-
const de_GenerateRandomResponse = (output, context) => {
|
|
3553
|
-
return (0, smithy_client_1.take)(output, {
|
|
3554
|
-
CiphertextForRecipient: context.base64Decoder,
|
|
3555
|
-
Plaintext: context.base64Decoder,
|
|
3556
|
-
});
|
|
3557
|
-
};
|
|
3558
|
-
const de_GetParametersForImportResponse = (output, context) => {
|
|
3559
|
-
return (0, smithy_client_1.take)(output, {
|
|
3560
|
-
ImportToken: context.base64Decoder,
|
|
3561
|
-
KeyId: smithy_client_1.expectString,
|
|
3562
|
-
ParametersValidTo: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
3563
|
-
PublicKey: context.base64Decoder,
|
|
3564
|
-
});
|
|
3565
|
-
};
|
|
3566
|
-
const de_GetPublicKeyResponse = (output, context) => {
|
|
3567
|
-
return (0, smithy_client_1.take)(output, {
|
|
3568
|
-
CustomerMasterKeySpec: smithy_client_1.expectString,
|
|
3569
|
-
EncryptionAlgorithms: smithy_client_1._json,
|
|
3570
|
-
KeyId: smithy_client_1.expectString,
|
|
3571
|
-
KeySpec: smithy_client_1.expectString,
|
|
3572
|
-
KeyUsage: smithy_client_1.expectString,
|
|
3573
|
-
PublicKey: context.base64Decoder,
|
|
3574
|
-
SigningAlgorithms: smithy_client_1._json,
|
|
3575
|
-
});
|
|
3576
|
-
};
|
|
3577
|
-
const de_GrantList = (output, context) => {
|
|
3578
|
-
const retVal = (output || [])
|
|
3579
|
-
.filter((e) => e != null)
|
|
3580
|
-
.map((entry) => {
|
|
3581
|
-
return de_GrantListEntry(entry, context);
|
|
3582
|
-
});
|
|
3583
|
-
return retVal;
|
|
3584
|
-
};
|
|
3585
|
-
const de_GrantListEntry = (output, context) => {
|
|
3586
|
-
return (0, smithy_client_1.take)(output, {
|
|
3587
|
-
Constraints: smithy_client_1._json,
|
|
3588
|
-
CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
3589
|
-
GrantId: smithy_client_1.expectString,
|
|
3590
|
-
GranteePrincipal: smithy_client_1.expectString,
|
|
3591
|
-
IssuingAccount: smithy_client_1.expectString,
|
|
3592
|
-
KeyId: smithy_client_1.expectString,
|
|
3593
|
-
Name: smithy_client_1.expectString,
|
|
3594
|
-
Operations: smithy_client_1._json,
|
|
3595
|
-
RetiringPrincipal: smithy_client_1.expectString,
|
|
3596
|
-
});
|
|
3597
|
-
};
|
|
3598
|
-
const de_KeyMetadata = (output, context) => {
|
|
3599
|
-
return (0, smithy_client_1.take)(output, {
|
|
3600
|
-
AWSAccountId: smithy_client_1.expectString,
|
|
3601
|
-
Arn: smithy_client_1.expectString,
|
|
3602
|
-
CloudHsmClusterId: smithy_client_1.expectString,
|
|
3603
|
-
CreationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
3604
|
-
CustomKeyStoreId: smithy_client_1.expectString,
|
|
3605
|
-
CustomerMasterKeySpec: smithy_client_1.expectString,
|
|
3606
|
-
DeletionDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
3607
|
-
Description: smithy_client_1.expectString,
|
|
3608
|
-
Enabled: smithy_client_1.expectBoolean,
|
|
3609
|
-
EncryptionAlgorithms: smithy_client_1._json,
|
|
3610
|
-
ExpirationModel: smithy_client_1.expectString,
|
|
3611
|
-
KeyId: smithy_client_1.expectString,
|
|
3612
|
-
KeyManager: smithy_client_1.expectString,
|
|
3613
|
-
KeySpec: smithy_client_1.expectString,
|
|
3614
|
-
KeyState: smithy_client_1.expectString,
|
|
3615
|
-
KeyUsage: smithy_client_1.expectString,
|
|
3616
|
-
MacAlgorithms: smithy_client_1._json,
|
|
3617
|
-
MultiRegion: smithy_client_1.expectBoolean,
|
|
3618
|
-
MultiRegionConfiguration: smithy_client_1._json,
|
|
3619
|
-
Origin: smithy_client_1.expectString,
|
|
3620
|
-
PendingDeletionWindowInDays: smithy_client_1.expectInt32,
|
|
3621
|
-
SigningAlgorithms: smithy_client_1._json,
|
|
3622
|
-
ValidTo: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
3623
|
-
XksKeyConfiguration: smithy_client_1._json,
|
|
3624
|
-
});
|
|
3625
|
-
};
|
|
3626
|
-
const de_ListAliasesResponse = (output, context) => {
|
|
3627
|
-
return (0, smithy_client_1.take)(output, {
|
|
3628
|
-
Aliases: (_) => de_AliasList(_, context),
|
|
3629
|
-
NextMarker: smithy_client_1.expectString,
|
|
3630
|
-
Truncated: smithy_client_1.expectBoolean,
|
|
3631
|
-
});
|
|
3632
|
-
};
|
|
3633
|
-
const de_ListGrantsResponse = (output, context) => {
|
|
3634
|
-
return (0, smithy_client_1.take)(output, {
|
|
3635
|
-
Grants: (_) => de_GrantList(_, context),
|
|
3636
|
-
NextMarker: smithy_client_1.expectString,
|
|
3637
|
-
Truncated: smithy_client_1.expectBoolean,
|
|
3638
|
-
});
|
|
3639
|
-
};
|
|
3640
|
-
const de_ReEncryptResponse = (output, context) => {
|
|
3641
|
-
return (0, smithy_client_1.take)(output, {
|
|
3642
|
-
CiphertextBlob: context.base64Decoder,
|
|
3643
|
-
DestinationEncryptionAlgorithm: smithy_client_1.expectString,
|
|
3644
|
-
KeyId: smithy_client_1.expectString,
|
|
3645
|
-
SourceEncryptionAlgorithm: smithy_client_1.expectString,
|
|
3646
|
-
SourceKeyId: smithy_client_1.expectString,
|
|
3647
|
-
});
|
|
3648
|
-
};
|
|
3649
|
-
const de_ReplicateKeyResponse = (output, context) => {
|
|
3650
|
-
return (0, smithy_client_1.take)(output, {
|
|
3651
|
-
ReplicaKeyMetadata: (_) => de_KeyMetadata(_, context),
|
|
3652
|
-
ReplicaPolicy: smithy_client_1.expectString,
|
|
3653
|
-
ReplicaTags: smithy_client_1._json,
|
|
3654
|
-
});
|
|
3655
|
-
};
|
|
3656
|
-
const de_ScheduleKeyDeletionResponse = (output, context) => {
|
|
3657
|
-
return (0, smithy_client_1.take)(output, {
|
|
3658
|
-
DeletionDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
3659
|
-
KeyId: smithy_client_1.expectString,
|
|
3660
|
-
KeyState: smithy_client_1.expectString,
|
|
3661
|
-
PendingWindowInDays: smithy_client_1.expectInt32,
|
|
3662
|
-
});
|
|
3663
|
-
};
|
|
3664
|
-
const de_SignResponse = (output, context) => {
|
|
3665
|
-
return (0, smithy_client_1.take)(output, {
|
|
3666
|
-
KeyId: smithy_client_1.expectString,
|
|
3667
|
-
Signature: context.base64Decoder,
|
|
3668
|
-
SigningAlgorithm: smithy_client_1.expectString,
|
|
3669
|
-
});
|
|
3670
|
-
};
|
|
3671
|
-
const deserializeMetadata = (output) => ({
|
|
3672
|
-
httpStatusCode: output.statusCode,
|
|
3673
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
3674
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
3675
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
3676
|
-
});
|
|
3677
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
3678
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(KMSServiceException_1.KMSServiceException);
|
|
3679
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
3680
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
3681
|
-
const contents = {
|
|
3682
|
-
protocol,
|
|
3683
|
-
hostname,
|
|
3684
|
-
port,
|
|
3685
|
-
method: "POST",
|
|
3686
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
3687
|
-
headers,
|
|
3688
|
-
};
|
|
3689
|
-
if (resolvedHostname !== undefined) {
|
|
3690
|
-
contents.hostname = resolvedHostname;
|
|
3691
|
-
}
|
|
3692
|
-
if (body !== undefined) {
|
|
3693
|
-
contents.body = body;
|
|
3694
|
-
}
|
|
3695
|
-
return new protocol_http_1.HttpRequest(contents);
|
|
3696
|
-
};
|
|
3697
|
-
function sharedHeaders(operation) {
|
|
3698
|
-
return {
|
|
3699
|
-
"content-type": "application/x-amz-json-1.1",
|
|
3700
|
-
"x-amz-target": `TrentService.${operation}`,
|
|
3701
|
-
};
|
|
3702
|
-
}
|
|
3703
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
3704
|
-
if (encoded.length) {
|
|
3705
|
-
return JSON.parse(encoded);
|
|
3706
|
-
}
|
|
3707
|
-
return {};
|
|
3708
|
-
});
|
|
3709
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
3710
|
-
const value = await parseBody(errorBody, context);
|
|
3711
|
-
value.message = value.message ?? value.Message;
|
|
3712
|
-
return value;
|
|
3713
|
-
};
|
|
3714
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
3715
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
3716
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
3717
|
-
let cleanValue = rawValue;
|
|
3718
|
-
if (typeof cleanValue === "number") {
|
|
3719
|
-
cleanValue = cleanValue.toString();
|
|
3720
|
-
}
|
|
3721
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
3722
|
-
cleanValue = cleanValue.split(",")[0];
|
|
3723
|
-
}
|
|
3724
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
3725
|
-
cleanValue = cleanValue.split(":")[0];
|
|
3726
|
-
}
|
|
3727
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
3728
|
-
cleanValue = cleanValue.split("#")[1];
|
|
3729
|
-
}
|
|
3730
|
-
return cleanValue;
|
|
3731
|
-
};
|
|
3732
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
3733
|
-
if (headerKey !== undefined) {
|
|
3734
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
3735
|
-
}
|
|
3736
|
-
if (data.code !== undefined) {
|
|
3737
|
-
return sanitizeErrorCode(data.code);
|
|
3738
|
-
}
|
|
3739
|
-
if (data["__type"] !== undefined) {
|
|
3740
|
-
return sanitizeErrorCode(data["__type"]);
|
|
3741
|
-
}
|
|
3742
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|