@aws-sdk/client-secrets-manager 3.34.0 → 3.37.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/CHANGELOG.md +47 -0
- package/{dist/cjs → dist-cjs}/SecretsManager.js +2 -68
- package/dist-cjs/SecretsManagerClient.js +35 -0
- package/dist-cjs/commands/CancelRotateSecretCommand.js +36 -0
- package/dist-cjs/commands/CreateSecretCommand.js +36 -0
- package/dist-cjs/commands/DeleteResourcePolicyCommand.js +36 -0
- package/dist-cjs/commands/DeleteSecretCommand.js +36 -0
- package/dist-cjs/commands/DescribeSecretCommand.js +36 -0
- package/{dist/cjs → dist-cjs}/commands/GetRandomPasswordCommand.js +2 -39
- package/dist-cjs/commands/GetResourcePolicyCommand.js +36 -0
- package/dist-cjs/commands/GetSecretValueCommand.js +36 -0
- package/dist-cjs/commands/ListSecretVersionIdsCommand.js +36 -0
- package/dist-cjs/commands/ListSecretsCommand.js +36 -0
- package/dist-cjs/commands/PutResourcePolicyCommand.js +36 -0
- package/dist-cjs/commands/PutSecretValueCommand.js +36 -0
- package/{dist/cjs → dist-cjs}/commands/RemoveRegionsFromReplicationCommand.js +2 -27
- package/{dist/cjs → dist-cjs}/commands/ReplicateSecretToRegionsCommand.js +2 -28
- package/dist-cjs/commands/RestoreSecretCommand.js +36 -0
- package/dist-cjs/commands/RotateSecretCommand.js +36 -0
- package/{dist/cjs → dist-cjs}/commands/StopReplicationToReplicaCommand.js +2 -27
- package/dist-cjs/commands/TagResourceCommand.js +36 -0
- package/dist-cjs/commands/UntagResourceCommand.js +36 -0
- package/dist-cjs/commands/UpdateSecretCommand.js +36 -0
- package/dist-cjs/commands/UpdateSecretVersionStageCommand.js +36 -0
- package/dist-cjs/commands/ValidateResourcePolicyCommand.js +36 -0
- package/{dist/cjs → dist-cjs}/endpoints.js +1 -2
- package/{dist/cjs → dist-cjs}/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/models_0.js +0 -187
- package/{dist/cjs → dist-cjs}/pagination/Interfaces.js +0 -1
- package/{dist/cjs → dist-cjs}/pagination/ListSecretVersionIdsPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListSecretsPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/protocols/Aws_json1_1.js +0 -6
- package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
- package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
- package/{dist/es → dist-es}/SecretsManager.js +2 -3
- package/{dist/es → dist-es}/SecretsManagerClient.js +1 -2
- package/{dist/es → dist-es}/commands/CancelRotateSecretCommand.js +2 -3
- package/{dist/es → dist-es}/commands/CreateSecretCommand.js +2 -3
- package/{dist/es → dist-es}/commands/DeleteResourcePolicyCommand.js +2 -3
- package/{dist/es → dist-es}/commands/DeleteSecretCommand.js +2 -3
- package/{dist/es → dist-es}/commands/DescribeSecretCommand.js +2 -3
- package/{dist/es → dist-es}/commands/GetRandomPasswordCommand.js +2 -3
- package/{dist/es → dist-es}/commands/GetResourcePolicyCommand.js +2 -3
- package/{dist/es → dist-es}/commands/GetSecretValueCommand.js +2 -3
- package/{dist/es → dist-es}/commands/ListSecretVersionIdsCommand.js +2 -3
- package/{dist/es → dist-es}/commands/ListSecretsCommand.js +2 -3
- package/{dist/es → dist-es}/commands/PutResourcePolicyCommand.js +2 -3
- package/{dist/es → dist-es}/commands/PutSecretValueCommand.js +2 -3
- package/{dist/es → dist-es}/commands/RemoveRegionsFromReplicationCommand.js +2 -3
- package/{dist/es → dist-es}/commands/ReplicateSecretToRegionsCommand.js +2 -3
- package/{dist/es → dist-es}/commands/RestoreSecretCommand.js +2 -3
- package/{dist/es → dist-es}/commands/RotateSecretCommand.js +2 -3
- package/{dist/es → dist-es}/commands/StopReplicationToReplicaCommand.js +2 -3
- package/{dist/es → dist-es}/commands/TagResourceCommand.js +2 -3
- package/{dist/es → dist-es}/commands/UntagResourceCommand.js +2 -3
- package/{dist/es → dist-es}/commands/UpdateSecretCommand.js +2 -3
- package/{dist/es → dist-es}/commands/UpdateSecretVersionStageCommand.js +2 -3
- package/{dist/es → dist-es}/commands/ValidateResourcePolicyCommand.js +2 -3
- package/{dist/es → dist-es}/endpoints.js +1 -2
- package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
- package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
- package/{dist/es → dist-es}/models/models_0.js +0 -1
- package/dist-es/pagination/Interfaces.js +1 -0
- package/{dist/es → dist-es}/pagination/ListSecretVersionIdsPaginator.js +1 -2
- package/{dist/es → dist-es}/pagination/ListSecretsPaginator.js +1 -2
- package/{dist/es → dist-es}/protocols/Aws_json1_1.js +0 -1
- package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -2
- package/{dist/es → dist-es}/runtimeConfig.js +1 -2
- package/{dist/es → dist-es}/runtimeConfig.native.js +0 -1
- package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -2
- package/{dist/types → dist-types}/SecretsManager.d.ts +19 -13
- package/{dist/types → dist-types}/SecretsManagerClient.d.ts +9 -9
- package/{dist/types → dist-types}/commands/CancelRotateSecretCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/CreateSecretCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DeleteResourcePolicyCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DeleteSecretCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DescribeSecretCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetRandomPasswordCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetResourcePolicyCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetSecretValueCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ListSecretVersionIdsCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ListSecretsCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/PutResourcePolicyCommand.d.ts +3 -3
- package/{dist/types/ts3.4 → dist-types}/commands/PutSecretValueCommand.d.ts +123 -122
- package/{dist/types → dist-types}/commands/RemoveRegionsFromReplicationCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ReplicateSecretToRegionsCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/RestoreSecretCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/RotateSecretCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/StopReplicationToReplicaCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/TagResourceCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/UntagResourceCommand.d.ts +3 -3
- package/{dist/types/ts3.4 → dist-types}/commands/UpdateSecretCommand.d.ts +124 -119
- package/{dist/types → dist-types}/commands/UpdateSecretVersionStageCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/ValidateResourcePolicyCommand.d.ts +3 -3
- package/{dist/types → dist-types}/endpoints.d.ts +0 -0
- package/{index.ts → dist-types/index.d.ts} +0 -0
- package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
- package/{dist/types → dist-types}/models/models_0.d.ts +54 -268
- package/{dist/types → dist-types}/pagination/Interfaces.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListSecretVersionIdsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListSecretsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/protocols/Aws_json1_1.d.ts +3 -3
- package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.d.ts +1 -1
- package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
- package/dist-types/ts3.4/SecretsManager.d.ts +115 -0
- package/dist-types/ts3.4/SecretsManagerClient.d.ts +89 -0
- package/dist-types/ts3.4/commands/CancelRotateSecretCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateSecretCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteSecretCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeSecretCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetRandomPasswordCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetResourcePolicyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetSecretValueCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListSecretVersionIdsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListSecretsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/PutSecretValueCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/commands/RemoveRegionsFromReplicationCommand.d.ts +5 -23
- package/dist-types/ts3.4/commands/ReplicateSecretToRegionsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/RestoreSecretCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/RotateSecretCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/commands/StopReplicationToReplicaCommand.d.ts +5 -23
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateSecretCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateSecretVersionStageCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ValidateResourcePolicyCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
- package/dist-types/ts3.4/models/models_0.d.ts +791 -0
- package/{dist/types → dist-types}/ts3.4/pagination/Interfaces.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListSecretVersionIdsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListSecretsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/protocols/Aws_json1_1.d.ts +3 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +2 -4
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +45 -42
- package/SecretsManager.ts +0 -1642
- package/SecretsManagerClient.ts +0 -384
- package/commands/CancelRotateSecretCommand.ts +0 -146
- package/commands/CreateSecretCommand.ts +0 -181
- package/commands/DeleteResourcePolicyCommand.ts +0 -117
- package/commands/DeleteSecretCommand.ts +0 -139
- package/commands/DescribeSecretCommand.ts +0 -121
- package/commands/GetRandomPasswordCommand.ts +0 -106
- package/commands/GetResourcePolicyCommand.ts +0 -120
- package/commands/GetSecretValueCommand.ts +0 -121
- package/commands/ListSecretVersionIdsCommand.ts +0 -122
- package/commands/ListSecretsCommand.ts +0 -123
- package/commands/PutResourcePolicyCommand.ts +0 -125
- package/commands/PutSecretValueCommand.ts +0 -181
- package/commands/RemoveRegionsFromReplicationCommand.ts +0 -99
- package/commands/ReplicateSecretToRegionsCommand.ts +0 -95
- package/commands/RestoreSecretCommand.ts +0 -112
- package/commands/RotateSecretCommand.ts +0 -155
- package/commands/StopReplicationToReplicaCommand.ts +0 -94
- package/commands/TagResourceCommand.ts +0 -149
- package/commands/UntagResourceCommand.ts +0 -122
- package/commands/UpdateSecretCommand.ts +0 -178
- package/commands/UpdateSecretVersionStageCommand.ts +0 -130
- package/commands/ValidateResourcePolicyCommand.ts +0 -128
- package/dist/cjs/SecretsManager.js.map +0 -1
- package/dist/cjs/SecretsManagerClient.js +0 -106
- package/dist/cjs/SecretsManagerClient.js.map +0 -1
- package/dist/cjs/commands/CancelRotateSecretCommand.js +0 -113
- package/dist/cjs/commands/CancelRotateSecretCommand.js.map +0 -1
- package/dist/cjs/commands/CreateSecretCommand.js +0 -148
- package/dist/cjs/commands/CreateSecretCommand.js.map +0 -1
- package/dist/cjs/commands/DeleteResourcePolicyCommand.js +0 -84
- package/dist/cjs/commands/DeleteResourcePolicyCommand.js.map +0 -1
- package/dist/cjs/commands/DeleteSecretCommand.js +0 -106
- package/dist/cjs/commands/DeleteSecretCommand.js.map +0 -1
- package/dist/cjs/commands/DescribeSecretCommand.js +0 -88
- package/dist/cjs/commands/DescribeSecretCommand.js.map +0 -1
- package/dist/cjs/commands/GetRandomPasswordCommand.js.map +0 -1
- package/dist/cjs/commands/GetResourcePolicyCommand.js +0 -87
- package/dist/cjs/commands/GetResourcePolicyCommand.js.map +0 -1
- package/dist/cjs/commands/GetSecretValueCommand.js +0 -88
- package/dist/cjs/commands/GetSecretValueCommand.js.map +0 -1
- package/dist/cjs/commands/ListSecretVersionIdsCommand.js +0 -89
- package/dist/cjs/commands/ListSecretVersionIdsCommand.js.map +0 -1
- package/dist/cjs/commands/ListSecretsCommand.js +0 -90
- package/dist/cjs/commands/ListSecretsCommand.js.map +0 -1
- package/dist/cjs/commands/PutResourcePolicyCommand.js +0 -92
- package/dist/cjs/commands/PutResourcePolicyCommand.js.map +0 -1
- package/dist/cjs/commands/PutSecretValueCommand.js +0 -148
- package/dist/cjs/commands/PutSecretValueCommand.js.map +0 -1
- package/dist/cjs/commands/RemoveRegionsFromReplicationCommand.js.map +0 -1
- package/dist/cjs/commands/ReplicateSecretToRegionsCommand.js.map +0 -1
- package/dist/cjs/commands/RestoreSecretCommand.js +0 -79
- package/dist/cjs/commands/RestoreSecretCommand.js.map +0 -1
- package/dist/cjs/commands/RotateSecretCommand.js +0 -122
- package/dist/cjs/commands/RotateSecretCommand.js.map +0 -1
- package/dist/cjs/commands/StopReplicationToReplicaCommand.js.map +0 -1
- package/dist/cjs/commands/TagResourceCommand.js +0 -116
- package/dist/cjs/commands/TagResourceCommand.js.map +0 -1
- package/dist/cjs/commands/UntagResourceCommand.js +0 -89
- package/dist/cjs/commands/UntagResourceCommand.js.map +0 -1
- package/dist/cjs/commands/UpdateSecretCommand.js +0 -145
- package/dist/cjs/commands/UpdateSecretCommand.js.map +0 -1
- package/dist/cjs/commands/UpdateSecretVersionStageCommand.js +0 -97
- package/dist/cjs/commands/UpdateSecretVersionStageCommand.js.map +0 -1
- package/dist/cjs/commands/ValidateResourcePolicyCommand.js +0 -95
- package/dist/cjs/commands/ValidateResourcePolicyCommand.js.map +0 -1
- package/dist/cjs/endpoints.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/models/index.js.map +0 -1
- package/dist/cjs/models/models_0.js.map +0 -1
- package/dist/cjs/package.json +0 -93
- package/dist/cjs/pagination/Interfaces.js.map +0 -1
- package/dist/cjs/pagination/ListSecretVersionIdsPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListSecretsPaginator.js.map +0 -1
- package/dist/cjs/protocols/Aws_json1_1.js.map +0 -1
- package/dist/cjs/runtimeConfig.browser.js.map +0 -1
- package/dist/cjs/runtimeConfig.js.map +0 -1
- package/dist/cjs/runtimeConfig.native.js.map +0 -1
- package/dist/cjs/runtimeConfig.shared.js.map +0 -1
- package/dist/es/SecretsManager.js.map +0 -1
- package/dist/es/SecretsManagerClient.js.map +0 -1
- package/dist/es/commands/CancelRotateSecretCommand.js.map +0 -1
- package/dist/es/commands/CreateSecretCommand.js.map +0 -1
- package/dist/es/commands/DeleteResourcePolicyCommand.js.map +0 -1
- package/dist/es/commands/DeleteSecretCommand.js.map +0 -1
- package/dist/es/commands/DescribeSecretCommand.js.map +0 -1
- package/dist/es/commands/GetRandomPasswordCommand.js.map +0 -1
- package/dist/es/commands/GetResourcePolicyCommand.js.map +0 -1
- package/dist/es/commands/GetSecretValueCommand.js.map +0 -1
- package/dist/es/commands/ListSecretVersionIdsCommand.js.map +0 -1
- package/dist/es/commands/ListSecretsCommand.js.map +0 -1
- package/dist/es/commands/PutResourcePolicyCommand.js.map +0 -1
- package/dist/es/commands/PutSecretValueCommand.js.map +0 -1
- package/dist/es/commands/RemoveRegionsFromReplicationCommand.js.map +0 -1
- package/dist/es/commands/ReplicateSecretToRegionsCommand.js.map +0 -1
- package/dist/es/commands/RestoreSecretCommand.js.map +0 -1
- package/dist/es/commands/RotateSecretCommand.js.map +0 -1
- package/dist/es/commands/StopReplicationToReplicaCommand.js.map +0 -1
- package/dist/es/commands/TagResourceCommand.js.map +0 -1
- package/dist/es/commands/UntagResourceCommand.js.map +0 -1
- package/dist/es/commands/UpdateSecretCommand.js.map +0 -1
- package/dist/es/commands/UpdateSecretVersionStageCommand.js.map +0 -1
- package/dist/es/commands/ValidateResourcePolicyCommand.js.map +0 -1
- package/dist/es/endpoints.js.map +0 -1
- package/dist/es/index.js +0 -29
- package/dist/es/index.js.map +0 -1
- package/dist/es/models/index.js +0 -2
- package/dist/es/models/index.js.map +0 -1
- package/dist/es/models/models_0.js.map +0 -1
- package/dist/es/package.json +0 -93
- package/dist/es/pagination/Interfaces.js +0 -2
- package/dist/es/pagination/Interfaces.js.map +0 -1
- package/dist/es/pagination/ListSecretVersionIdsPaginator.js.map +0 -1
- package/dist/es/pagination/ListSecretsPaginator.js.map +0 -1
- package/dist/es/protocols/Aws_json1_1.js.map +0 -1
- package/dist/es/runtimeConfig.browser.js.map +0 -1
- package/dist/es/runtimeConfig.js.map +0 -1
- package/dist/es/runtimeConfig.native.js.map +0 -1
- package/dist/es/runtimeConfig.shared.js.map +0 -1
- package/dist/types/commands/PutSecretValueCommand.d.ts +0 -122
- package/dist/types/commands/UpdateSecretCommand.d.ts +0 -119
- package/dist/types/ts3.4/SecretsManager.d.ts +0 -1014
- package/dist/types/ts3.4/SecretsManagerClient.d.ts +0 -216
- package/dist/types/ts3.4/commands/CancelRotateSecretCommand.d.ts +0 -87
- package/dist/types/ts3.4/commands/CreateSecretCommand.d.ts +0 -122
- package/dist/types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +0 -58
- package/dist/types/ts3.4/commands/DeleteSecretCommand.d.ts +0 -80
- package/dist/types/ts3.4/commands/DescribeSecretCommand.d.ts +0 -62
- package/dist/types/ts3.4/commands/GetRandomPasswordCommand.d.ts +0 -47
- package/dist/types/ts3.4/commands/GetResourcePolicyCommand.d.ts +0 -61
- package/dist/types/ts3.4/commands/GetSecretValueCommand.d.ts +0 -62
- package/dist/types/ts3.4/commands/ListSecretVersionIdsCommand.d.ts +0 -63
- package/dist/types/ts3.4/commands/ListSecretsCommand.d.ts +0 -64
- package/dist/types/ts3.4/commands/PutResourcePolicyCommand.d.ts +0 -66
- package/dist/types/ts3.4/commands/ReplicateSecretToRegionsCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/RestoreSecretCommand.d.ts +0 -53
- package/dist/types/ts3.4/commands/RotateSecretCommand.d.ts +0 -96
- package/dist/types/ts3.4/commands/TagResourceCommand.d.ts +0 -90
- package/dist/types/ts3.4/commands/UntagResourceCommand.d.ts +0 -63
- package/dist/types/ts3.4/commands/UpdateSecretVersionStageCommand.d.ts +0 -71
- package/dist/types/ts3.4/commands/ValidateResourcePolicyCommand.d.ts +0 -69
- package/dist/types/ts3.4/models/models_0.d.ts +0 -2041
- package/endpoints.ts +0 -86
- package/jest.config.js +0 -4
- package/models/models_0.ts +0 -2422
- package/pagination/Interfaces.ts +0 -7
- package/pagination/ListSecretVersionIdsPaginator.ts +0 -58
- package/pagination/ListSecretsPaginator.ts +0 -54
- package/protocols/Aws_json1_1.ts +0 -3421
- package/runtimeConfig.browser.ts +0 -40
- package/runtimeConfig.native.ts +0 -16
- package/runtimeConfig.shared.ts +0 -16
- package/runtimeConfig.ts +0 -45
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -31
- package/tsconfig.types.json +0 -8
package/protocols/Aws_json1_1.ts
DELETED
|
@@ -1,3421 +0,0 @@
|
|
|
1
|
-
import { CancelRotateSecretCommandInput, CancelRotateSecretCommandOutput } from "../commands/CancelRotateSecretCommand";
|
|
2
|
-
import { CreateSecretCommandInput, CreateSecretCommandOutput } from "../commands/CreateSecretCommand";
|
|
3
|
-
import {
|
|
4
|
-
DeleteResourcePolicyCommandInput,
|
|
5
|
-
DeleteResourcePolicyCommandOutput,
|
|
6
|
-
} from "../commands/DeleteResourcePolicyCommand";
|
|
7
|
-
import { DeleteSecretCommandInput, DeleteSecretCommandOutput } from "../commands/DeleteSecretCommand";
|
|
8
|
-
import { DescribeSecretCommandInput, DescribeSecretCommandOutput } from "../commands/DescribeSecretCommand";
|
|
9
|
-
import { GetRandomPasswordCommandInput, GetRandomPasswordCommandOutput } from "../commands/GetRandomPasswordCommand";
|
|
10
|
-
import { GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput } from "../commands/GetResourcePolicyCommand";
|
|
11
|
-
import { GetSecretValueCommandInput, GetSecretValueCommandOutput } from "../commands/GetSecretValueCommand";
|
|
12
|
-
import {
|
|
13
|
-
ListSecretVersionIdsCommandInput,
|
|
14
|
-
ListSecretVersionIdsCommandOutput,
|
|
15
|
-
} from "../commands/ListSecretVersionIdsCommand";
|
|
16
|
-
import { ListSecretsCommandInput, ListSecretsCommandOutput } from "../commands/ListSecretsCommand";
|
|
17
|
-
import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "../commands/PutResourcePolicyCommand";
|
|
18
|
-
import { PutSecretValueCommandInput, PutSecretValueCommandOutput } from "../commands/PutSecretValueCommand";
|
|
19
|
-
import {
|
|
20
|
-
RemoveRegionsFromReplicationCommandInput,
|
|
21
|
-
RemoveRegionsFromReplicationCommandOutput,
|
|
22
|
-
} from "../commands/RemoveRegionsFromReplicationCommand";
|
|
23
|
-
import {
|
|
24
|
-
ReplicateSecretToRegionsCommandInput,
|
|
25
|
-
ReplicateSecretToRegionsCommandOutput,
|
|
26
|
-
} from "../commands/ReplicateSecretToRegionsCommand";
|
|
27
|
-
import { RestoreSecretCommandInput, RestoreSecretCommandOutput } from "../commands/RestoreSecretCommand";
|
|
28
|
-
import { RotateSecretCommandInput, RotateSecretCommandOutput } from "../commands/RotateSecretCommand";
|
|
29
|
-
import {
|
|
30
|
-
StopReplicationToReplicaCommandInput,
|
|
31
|
-
StopReplicationToReplicaCommandOutput,
|
|
32
|
-
} from "../commands/StopReplicationToReplicaCommand";
|
|
33
|
-
import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
|
|
34
|
-
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
|
|
35
|
-
import { UpdateSecretCommandInput, UpdateSecretCommandOutput } from "../commands/UpdateSecretCommand";
|
|
36
|
-
import {
|
|
37
|
-
UpdateSecretVersionStageCommandInput,
|
|
38
|
-
UpdateSecretVersionStageCommandOutput,
|
|
39
|
-
} from "../commands/UpdateSecretVersionStageCommand";
|
|
40
|
-
import {
|
|
41
|
-
ValidateResourcePolicyCommandInput,
|
|
42
|
-
ValidateResourcePolicyCommandOutput,
|
|
43
|
-
} from "../commands/ValidateResourcePolicyCommand";
|
|
44
|
-
import {
|
|
45
|
-
CancelRotateSecretRequest,
|
|
46
|
-
CancelRotateSecretResponse,
|
|
47
|
-
CreateSecretRequest,
|
|
48
|
-
CreateSecretResponse,
|
|
49
|
-
DecryptionFailure,
|
|
50
|
-
DeleteResourcePolicyRequest,
|
|
51
|
-
DeleteResourcePolicyResponse,
|
|
52
|
-
DeleteSecretRequest,
|
|
53
|
-
DeleteSecretResponse,
|
|
54
|
-
DescribeSecretRequest,
|
|
55
|
-
DescribeSecretResponse,
|
|
56
|
-
EncryptionFailure,
|
|
57
|
-
Filter,
|
|
58
|
-
GetRandomPasswordRequest,
|
|
59
|
-
GetRandomPasswordResponse,
|
|
60
|
-
GetResourcePolicyRequest,
|
|
61
|
-
GetResourcePolicyResponse,
|
|
62
|
-
GetSecretValueRequest,
|
|
63
|
-
GetSecretValueResponse,
|
|
64
|
-
InternalServiceError,
|
|
65
|
-
InvalidNextTokenException,
|
|
66
|
-
InvalidParameterException,
|
|
67
|
-
InvalidRequestException,
|
|
68
|
-
LimitExceededException,
|
|
69
|
-
ListSecretVersionIdsRequest,
|
|
70
|
-
ListSecretVersionIdsResponse,
|
|
71
|
-
ListSecretsRequest,
|
|
72
|
-
ListSecretsResponse,
|
|
73
|
-
MalformedPolicyDocumentException,
|
|
74
|
-
PreconditionNotMetException,
|
|
75
|
-
PublicPolicyException,
|
|
76
|
-
PutResourcePolicyRequest,
|
|
77
|
-
PutResourcePolicyResponse,
|
|
78
|
-
PutSecretValueRequest,
|
|
79
|
-
PutSecretValueResponse,
|
|
80
|
-
RemoveRegionsFromReplicationRequest,
|
|
81
|
-
RemoveRegionsFromReplicationResponse,
|
|
82
|
-
ReplicaRegionType,
|
|
83
|
-
ReplicateSecretToRegionsRequest,
|
|
84
|
-
ReplicateSecretToRegionsResponse,
|
|
85
|
-
ReplicationStatusType,
|
|
86
|
-
ResourceExistsException,
|
|
87
|
-
ResourceNotFoundException,
|
|
88
|
-
RestoreSecretRequest,
|
|
89
|
-
RestoreSecretResponse,
|
|
90
|
-
RotateSecretRequest,
|
|
91
|
-
RotateSecretResponse,
|
|
92
|
-
RotationRulesType,
|
|
93
|
-
SecretListEntry,
|
|
94
|
-
SecretVersionsListEntry,
|
|
95
|
-
StopReplicationToReplicaRequest,
|
|
96
|
-
StopReplicationToReplicaResponse,
|
|
97
|
-
Tag,
|
|
98
|
-
TagResourceRequest,
|
|
99
|
-
UntagResourceRequest,
|
|
100
|
-
UpdateSecretRequest,
|
|
101
|
-
UpdateSecretResponse,
|
|
102
|
-
UpdateSecretVersionStageRequest,
|
|
103
|
-
UpdateSecretVersionStageResponse,
|
|
104
|
-
ValidateResourcePolicyRequest,
|
|
105
|
-
ValidateResourcePolicyResponse,
|
|
106
|
-
ValidationErrorsEntry,
|
|
107
|
-
} from "../models/models_0";
|
|
108
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
109
|
-
import {
|
|
110
|
-
expectBoolean as __expectBoolean,
|
|
111
|
-
expectLong as __expectLong,
|
|
112
|
-
expectNonNull as __expectNonNull,
|
|
113
|
-
expectNumber as __expectNumber,
|
|
114
|
-
expectString as __expectString,
|
|
115
|
-
parseEpochTimestamp as __parseEpochTimestamp,
|
|
116
|
-
} from "@aws-sdk/smithy-client";
|
|
117
|
-
import {
|
|
118
|
-
Endpoint as __Endpoint,
|
|
119
|
-
HeaderBag as __HeaderBag,
|
|
120
|
-
MetadataBearer as __MetadataBearer,
|
|
121
|
-
ResponseMetadata as __ResponseMetadata,
|
|
122
|
-
SerdeContext as __SerdeContext,
|
|
123
|
-
SmithyException as __SmithyException,
|
|
124
|
-
} from "@aws-sdk/types";
|
|
125
|
-
import { v4 as generateIdempotencyToken } from "uuid";
|
|
126
|
-
|
|
127
|
-
export const serializeAws_json1_1CancelRotateSecretCommand = async (
|
|
128
|
-
input: CancelRotateSecretCommandInput,
|
|
129
|
-
context: __SerdeContext
|
|
130
|
-
): Promise<__HttpRequest> => {
|
|
131
|
-
const headers: __HeaderBag = {
|
|
132
|
-
"content-type": "application/x-amz-json-1.1",
|
|
133
|
-
"x-amz-target": "secretsmanager.CancelRotateSecret",
|
|
134
|
-
};
|
|
135
|
-
let body: any;
|
|
136
|
-
body = JSON.stringify(serializeAws_json1_1CancelRotateSecretRequest(input, context));
|
|
137
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
export const serializeAws_json1_1CreateSecretCommand = async (
|
|
141
|
-
input: CreateSecretCommandInput,
|
|
142
|
-
context: __SerdeContext
|
|
143
|
-
): Promise<__HttpRequest> => {
|
|
144
|
-
const headers: __HeaderBag = {
|
|
145
|
-
"content-type": "application/x-amz-json-1.1",
|
|
146
|
-
"x-amz-target": "secretsmanager.CreateSecret",
|
|
147
|
-
};
|
|
148
|
-
let body: any;
|
|
149
|
-
body = JSON.stringify(serializeAws_json1_1CreateSecretRequest(input, context));
|
|
150
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
export const serializeAws_json1_1DeleteResourcePolicyCommand = async (
|
|
154
|
-
input: DeleteResourcePolicyCommandInput,
|
|
155
|
-
context: __SerdeContext
|
|
156
|
-
): Promise<__HttpRequest> => {
|
|
157
|
-
const headers: __HeaderBag = {
|
|
158
|
-
"content-type": "application/x-amz-json-1.1",
|
|
159
|
-
"x-amz-target": "secretsmanager.DeleteResourcePolicy",
|
|
160
|
-
};
|
|
161
|
-
let body: any;
|
|
162
|
-
body = JSON.stringify(serializeAws_json1_1DeleteResourcePolicyRequest(input, context));
|
|
163
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
export const serializeAws_json1_1DeleteSecretCommand = async (
|
|
167
|
-
input: DeleteSecretCommandInput,
|
|
168
|
-
context: __SerdeContext
|
|
169
|
-
): Promise<__HttpRequest> => {
|
|
170
|
-
const headers: __HeaderBag = {
|
|
171
|
-
"content-type": "application/x-amz-json-1.1",
|
|
172
|
-
"x-amz-target": "secretsmanager.DeleteSecret",
|
|
173
|
-
};
|
|
174
|
-
let body: any;
|
|
175
|
-
body = JSON.stringify(serializeAws_json1_1DeleteSecretRequest(input, context));
|
|
176
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
export const serializeAws_json1_1DescribeSecretCommand = async (
|
|
180
|
-
input: DescribeSecretCommandInput,
|
|
181
|
-
context: __SerdeContext
|
|
182
|
-
): Promise<__HttpRequest> => {
|
|
183
|
-
const headers: __HeaderBag = {
|
|
184
|
-
"content-type": "application/x-amz-json-1.1",
|
|
185
|
-
"x-amz-target": "secretsmanager.DescribeSecret",
|
|
186
|
-
};
|
|
187
|
-
let body: any;
|
|
188
|
-
body = JSON.stringify(serializeAws_json1_1DescribeSecretRequest(input, context));
|
|
189
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
export const serializeAws_json1_1GetRandomPasswordCommand = async (
|
|
193
|
-
input: GetRandomPasswordCommandInput,
|
|
194
|
-
context: __SerdeContext
|
|
195
|
-
): Promise<__HttpRequest> => {
|
|
196
|
-
const headers: __HeaderBag = {
|
|
197
|
-
"content-type": "application/x-amz-json-1.1",
|
|
198
|
-
"x-amz-target": "secretsmanager.GetRandomPassword",
|
|
199
|
-
};
|
|
200
|
-
let body: any;
|
|
201
|
-
body = JSON.stringify(serializeAws_json1_1GetRandomPasswordRequest(input, context));
|
|
202
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
export const serializeAws_json1_1GetResourcePolicyCommand = async (
|
|
206
|
-
input: GetResourcePolicyCommandInput,
|
|
207
|
-
context: __SerdeContext
|
|
208
|
-
): Promise<__HttpRequest> => {
|
|
209
|
-
const headers: __HeaderBag = {
|
|
210
|
-
"content-type": "application/x-amz-json-1.1",
|
|
211
|
-
"x-amz-target": "secretsmanager.GetResourcePolicy",
|
|
212
|
-
};
|
|
213
|
-
let body: any;
|
|
214
|
-
body = JSON.stringify(serializeAws_json1_1GetResourcePolicyRequest(input, context));
|
|
215
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
export const serializeAws_json1_1GetSecretValueCommand = async (
|
|
219
|
-
input: GetSecretValueCommandInput,
|
|
220
|
-
context: __SerdeContext
|
|
221
|
-
): Promise<__HttpRequest> => {
|
|
222
|
-
const headers: __HeaderBag = {
|
|
223
|
-
"content-type": "application/x-amz-json-1.1",
|
|
224
|
-
"x-amz-target": "secretsmanager.GetSecretValue",
|
|
225
|
-
};
|
|
226
|
-
let body: any;
|
|
227
|
-
body = JSON.stringify(serializeAws_json1_1GetSecretValueRequest(input, context));
|
|
228
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
229
|
-
};
|
|
230
|
-
|
|
231
|
-
export const serializeAws_json1_1ListSecretsCommand = async (
|
|
232
|
-
input: ListSecretsCommandInput,
|
|
233
|
-
context: __SerdeContext
|
|
234
|
-
): Promise<__HttpRequest> => {
|
|
235
|
-
const headers: __HeaderBag = {
|
|
236
|
-
"content-type": "application/x-amz-json-1.1",
|
|
237
|
-
"x-amz-target": "secretsmanager.ListSecrets",
|
|
238
|
-
};
|
|
239
|
-
let body: any;
|
|
240
|
-
body = JSON.stringify(serializeAws_json1_1ListSecretsRequest(input, context));
|
|
241
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
export const serializeAws_json1_1ListSecretVersionIdsCommand = async (
|
|
245
|
-
input: ListSecretVersionIdsCommandInput,
|
|
246
|
-
context: __SerdeContext
|
|
247
|
-
): Promise<__HttpRequest> => {
|
|
248
|
-
const headers: __HeaderBag = {
|
|
249
|
-
"content-type": "application/x-amz-json-1.1",
|
|
250
|
-
"x-amz-target": "secretsmanager.ListSecretVersionIds",
|
|
251
|
-
};
|
|
252
|
-
let body: any;
|
|
253
|
-
body = JSON.stringify(serializeAws_json1_1ListSecretVersionIdsRequest(input, context));
|
|
254
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
export const serializeAws_json1_1PutResourcePolicyCommand = async (
|
|
258
|
-
input: PutResourcePolicyCommandInput,
|
|
259
|
-
context: __SerdeContext
|
|
260
|
-
): Promise<__HttpRequest> => {
|
|
261
|
-
const headers: __HeaderBag = {
|
|
262
|
-
"content-type": "application/x-amz-json-1.1",
|
|
263
|
-
"x-amz-target": "secretsmanager.PutResourcePolicy",
|
|
264
|
-
};
|
|
265
|
-
let body: any;
|
|
266
|
-
body = JSON.stringify(serializeAws_json1_1PutResourcePolicyRequest(input, context));
|
|
267
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
export const serializeAws_json1_1PutSecretValueCommand = async (
|
|
271
|
-
input: PutSecretValueCommandInput,
|
|
272
|
-
context: __SerdeContext
|
|
273
|
-
): Promise<__HttpRequest> => {
|
|
274
|
-
const headers: __HeaderBag = {
|
|
275
|
-
"content-type": "application/x-amz-json-1.1",
|
|
276
|
-
"x-amz-target": "secretsmanager.PutSecretValue",
|
|
277
|
-
};
|
|
278
|
-
let body: any;
|
|
279
|
-
body = JSON.stringify(serializeAws_json1_1PutSecretValueRequest(input, context));
|
|
280
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
export const serializeAws_json1_1RemoveRegionsFromReplicationCommand = async (
|
|
284
|
-
input: RemoveRegionsFromReplicationCommandInput,
|
|
285
|
-
context: __SerdeContext
|
|
286
|
-
): Promise<__HttpRequest> => {
|
|
287
|
-
const headers: __HeaderBag = {
|
|
288
|
-
"content-type": "application/x-amz-json-1.1",
|
|
289
|
-
"x-amz-target": "secretsmanager.RemoveRegionsFromReplication",
|
|
290
|
-
};
|
|
291
|
-
let body: any;
|
|
292
|
-
body = JSON.stringify(serializeAws_json1_1RemoveRegionsFromReplicationRequest(input, context));
|
|
293
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
export const serializeAws_json1_1ReplicateSecretToRegionsCommand = async (
|
|
297
|
-
input: ReplicateSecretToRegionsCommandInput,
|
|
298
|
-
context: __SerdeContext
|
|
299
|
-
): Promise<__HttpRequest> => {
|
|
300
|
-
const headers: __HeaderBag = {
|
|
301
|
-
"content-type": "application/x-amz-json-1.1",
|
|
302
|
-
"x-amz-target": "secretsmanager.ReplicateSecretToRegions",
|
|
303
|
-
};
|
|
304
|
-
let body: any;
|
|
305
|
-
body = JSON.stringify(serializeAws_json1_1ReplicateSecretToRegionsRequest(input, context));
|
|
306
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
export const serializeAws_json1_1RestoreSecretCommand = async (
|
|
310
|
-
input: RestoreSecretCommandInput,
|
|
311
|
-
context: __SerdeContext
|
|
312
|
-
): Promise<__HttpRequest> => {
|
|
313
|
-
const headers: __HeaderBag = {
|
|
314
|
-
"content-type": "application/x-amz-json-1.1",
|
|
315
|
-
"x-amz-target": "secretsmanager.RestoreSecret",
|
|
316
|
-
};
|
|
317
|
-
let body: any;
|
|
318
|
-
body = JSON.stringify(serializeAws_json1_1RestoreSecretRequest(input, context));
|
|
319
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
export const serializeAws_json1_1RotateSecretCommand = async (
|
|
323
|
-
input: RotateSecretCommandInput,
|
|
324
|
-
context: __SerdeContext
|
|
325
|
-
): Promise<__HttpRequest> => {
|
|
326
|
-
const headers: __HeaderBag = {
|
|
327
|
-
"content-type": "application/x-amz-json-1.1",
|
|
328
|
-
"x-amz-target": "secretsmanager.RotateSecret",
|
|
329
|
-
};
|
|
330
|
-
let body: any;
|
|
331
|
-
body = JSON.stringify(serializeAws_json1_1RotateSecretRequest(input, context));
|
|
332
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
export const serializeAws_json1_1StopReplicationToReplicaCommand = async (
|
|
336
|
-
input: StopReplicationToReplicaCommandInput,
|
|
337
|
-
context: __SerdeContext
|
|
338
|
-
): Promise<__HttpRequest> => {
|
|
339
|
-
const headers: __HeaderBag = {
|
|
340
|
-
"content-type": "application/x-amz-json-1.1",
|
|
341
|
-
"x-amz-target": "secretsmanager.StopReplicationToReplica",
|
|
342
|
-
};
|
|
343
|
-
let body: any;
|
|
344
|
-
body = JSON.stringify(serializeAws_json1_1StopReplicationToReplicaRequest(input, context));
|
|
345
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
346
|
-
};
|
|
347
|
-
|
|
348
|
-
export const serializeAws_json1_1TagResourceCommand = async (
|
|
349
|
-
input: TagResourceCommandInput,
|
|
350
|
-
context: __SerdeContext
|
|
351
|
-
): Promise<__HttpRequest> => {
|
|
352
|
-
const headers: __HeaderBag = {
|
|
353
|
-
"content-type": "application/x-amz-json-1.1",
|
|
354
|
-
"x-amz-target": "secretsmanager.TagResource",
|
|
355
|
-
};
|
|
356
|
-
let body: any;
|
|
357
|
-
body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
|
|
358
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
export const serializeAws_json1_1UntagResourceCommand = async (
|
|
362
|
-
input: UntagResourceCommandInput,
|
|
363
|
-
context: __SerdeContext
|
|
364
|
-
): Promise<__HttpRequest> => {
|
|
365
|
-
const headers: __HeaderBag = {
|
|
366
|
-
"content-type": "application/x-amz-json-1.1",
|
|
367
|
-
"x-amz-target": "secretsmanager.UntagResource",
|
|
368
|
-
};
|
|
369
|
-
let body: any;
|
|
370
|
-
body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
|
|
371
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
372
|
-
};
|
|
373
|
-
|
|
374
|
-
export const serializeAws_json1_1UpdateSecretCommand = async (
|
|
375
|
-
input: UpdateSecretCommandInput,
|
|
376
|
-
context: __SerdeContext
|
|
377
|
-
): Promise<__HttpRequest> => {
|
|
378
|
-
const headers: __HeaderBag = {
|
|
379
|
-
"content-type": "application/x-amz-json-1.1",
|
|
380
|
-
"x-amz-target": "secretsmanager.UpdateSecret",
|
|
381
|
-
};
|
|
382
|
-
let body: any;
|
|
383
|
-
body = JSON.stringify(serializeAws_json1_1UpdateSecretRequest(input, context));
|
|
384
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
385
|
-
};
|
|
386
|
-
|
|
387
|
-
export const serializeAws_json1_1UpdateSecretVersionStageCommand = async (
|
|
388
|
-
input: UpdateSecretVersionStageCommandInput,
|
|
389
|
-
context: __SerdeContext
|
|
390
|
-
): Promise<__HttpRequest> => {
|
|
391
|
-
const headers: __HeaderBag = {
|
|
392
|
-
"content-type": "application/x-amz-json-1.1",
|
|
393
|
-
"x-amz-target": "secretsmanager.UpdateSecretVersionStage",
|
|
394
|
-
};
|
|
395
|
-
let body: any;
|
|
396
|
-
body = JSON.stringify(serializeAws_json1_1UpdateSecretVersionStageRequest(input, context));
|
|
397
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
398
|
-
};
|
|
399
|
-
|
|
400
|
-
export const serializeAws_json1_1ValidateResourcePolicyCommand = async (
|
|
401
|
-
input: ValidateResourcePolicyCommandInput,
|
|
402
|
-
context: __SerdeContext
|
|
403
|
-
): Promise<__HttpRequest> => {
|
|
404
|
-
const headers: __HeaderBag = {
|
|
405
|
-
"content-type": "application/x-amz-json-1.1",
|
|
406
|
-
"x-amz-target": "secretsmanager.ValidateResourcePolicy",
|
|
407
|
-
};
|
|
408
|
-
let body: any;
|
|
409
|
-
body = JSON.stringify(serializeAws_json1_1ValidateResourcePolicyRequest(input, context));
|
|
410
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
export const deserializeAws_json1_1CancelRotateSecretCommand = async (
|
|
414
|
-
output: __HttpResponse,
|
|
415
|
-
context: __SerdeContext
|
|
416
|
-
): Promise<CancelRotateSecretCommandOutput> => {
|
|
417
|
-
if (output.statusCode >= 300) {
|
|
418
|
-
return deserializeAws_json1_1CancelRotateSecretCommandError(output, context);
|
|
419
|
-
}
|
|
420
|
-
const data: any = await parseBody(output.body, context);
|
|
421
|
-
let contents: any = {};
|
|
422
|
-
contents = deserializeAws_json1_1CancelRotateSecretResponse(data, context);
|
|
423
|
-
const response: CancelRotateSecretCommandOutput = {
|
|
424
|
-
$metadata: deserializeMetadata(output),
|
|
425
|
-
...contents,
|
|
426
|
-
};
|
|
427
|
-
return Promise.resolve(response);
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
const deserializeAws_json1_1CancelRotateSecretCommandError = async (
|
|
431
|
-
output: __HttpResponse,
|
|
432
|
-
context: __SerdeContext
|
|
433
|
-
): Promise<CancelRotateSecretCommandOutput> => {
|
|
434
|
-
const parsedOutput: any = {
|
|
435
|
-
...output,
|
|
436
|
-
body: await parseBody(output.body, context),
|
|
437
|
-
};
|
|
438
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
439
|
-
let errorCode: string = "UnknownError";
|
|
440
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
441
|
-
switch (errorCode) {
|
|
442
|
-
case "InternalServiceError":
|
|
443
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
444
|
-
response = {
|
|
445
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
446
|
-
name: errorCode,
|
|
447
|
-
$metadata: deserializeMetadata(output),
|
|
448
|
-
};
|
|
449
|
-
break;
|
|
450
|
-
case "InvalidParameterException":
|
|
451
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
452
|
-
response = {
|
|
453
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
454
|
-
name: errorCode,
|
|
455
|
-
$metadata: deserializeMetadata(output),
|
|
456
|
-
};
|
|
457
|
-
break;
|
|
458
|
-
case "InvalidRequestException":
|
|
459
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
460
|
-
response = {
|
|
461
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
462
|
-
name: errorCode,
|
|
463
|
-
$metadata: deserializeMetadata(output),
|
|
464
|
-
};
|
|
465
|
-
break;
|
|
466
|
-
case "ResourceNotFoundException":
|
|
467
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
468
|
-
response = {
|
|
469
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
470
|
-
name: errorCode,
|
|
471
|
-
$metadata: deserializeMetadata(output),
|
|
472
|
-
};
|
|
473
|
-
break;
|
|
474
|
-
default:
|
|
475
|
-
const parsedBody = parsedOutput.body;
|
|
476
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
477
|
-
response = {
|
|
478
|
-
...parsedBody,
|
|
479
|
-
name: `${errorCode}`,
|
|
480
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
481
|
-
$fault: "client",
|
|
482
|
-
$metadata: deserializeMetadata(output),
|
|
483
|
-
} as any;
|
|
484
|
-
}
|
|
485
|
-
const message = response.message || response.Message || errorCode;
|
|
486
|
-
response.message = message;
|
|
487
|
-
delete response.Message;
|
|
488
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
489
|
-
};
|
|
490
|
-
|
|
491
|
-
export const deserializeAws_json1_1CreateSecretCommand = async (
|
|
492
|
-
output: __HttpResponse,
|
|
493
|
-
context: __SerdeContext
|
|
494
|
-
): Promise<CreateSecretCommandOutput> => {
|
|
495
|
-
if (output.statusCode >= 300) {
|
|
496
|
-
return deserializeAws_json1_1CreateSecretCommandError(output, context);
|
|
497
|
-
}
|
|
498
|
-
const data: any = await parseBody(output.body, context);
|
|
499
|
-
let contents: any = {};
|
|
500
|
-
contents = deserializeAws_json1_1CreateSecretResponse(data, context);
|
|
501
|
-
const response: CreateSecretCommandOutput = {
|
|
502
|
-
$metadata: deserializeMetadata(output),
|
|
503
|
-
...contents,
|
|
504
|
-
};
|
|
505
|
-
return Promise.resolve(response);
|
|
506
|
-
};
|
|
507
|
-
|
|
508
|
-
const deserializeAws_json1_1CreateSecretCommandError = async (
|
|
509
|
-
output: __HttpResponse,
|
|
510
|
-
context: __SerdeContext
|
|
511
|
-
): Promise<CreateSecretCommandOutput> => {
|
|
512
|
-
const parsedOutput: any = {
|
|
513
|
-
...output,
|
|
514
|
-
body: await parseBody(output.body, context),
|
|
515
|
-
};
|
|
516
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
517
|
-
let errorCode: string = "UnknownError";
|
|
518
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
519
|
-
switch (errorCode) {
|
|
520
|
-
case "EncryptionFailure":
|
|
521
|
-
case "com.amazonaws.secretsmanager#EncryptionFailure":
|
|
522
|
-
response = {
|
|
523
|
-
...(await deserializeAws_json1_1EncryptionFailureResponse(parsedOutput, context)),
|
|
524
|
-
name: errorCode,
|
|
525
|
-
$metadata: deserializeMetadata(output),
|
|
526
|
-
};
|
|
527
|
-
break;
|
|
528
|
-
case "InternalServiceError":
|
|
529
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
530
|
-
response = {
|
|
531
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
532
|
-
name: errorCode,
|
|
533
|
-
$metadata: deserializeMetadata(output),
|
|
534
|
-
};
|
|
535
|
-
break;
|
|
536
|
-
case "InvalidParameterException":
|
|
537
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
538
|
-
response = {
|
|
539
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
540
|
-
name: errorCode,
|
|
541
|
-
$metadata: deserializeMetadata(output),
|
|
542
|
-
};
|
|
543
|
-
break;
|
|
544
|
-
case "InvalidRequestException":
|
|
545
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
546
|
-
response = {
|
|
547
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
548
|
-
name: errorCode,
|
|
549
|
-
$metadata: deserializeMetadata(output),
|
|
550
|
-
};
|
|
551
|
-
break;
|
|
552
|
-
case "LimitExceededException":
|
|
553
|
-
case "com.amazonaws.secretsmanager#LimitExceededException":
|
|
554
|
-
response = {
|
|
555
|
-
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
556
|
-
name: errorCode,
|
|
557
|
-
$metadata: deserializeMetadata(output),
|
|
558
|
-
};
|
|
559
|
-
break;
|
|
560
|
-
case "MalformedPolicyDocumentException":
|
|
561
|
-
case "com.amazonaws.secretsmanager#MalformedPolicyDocumentException":
|
|
562
|
-
response = {
|
|
563
|
-
...(await deserializeAws_json1_1MalformedPolicyDocumentExceptionResponse(parsedOutput, context)),
|
|
564
|
-
name: errorCode,
|
|
565
|
-
$metadata: deserializeMetadata(output),
|
|
566
|
-
};
|
|
567
|
-
break;
|
|
568
|
-
case "PreconditionNotMetException":
|
|
569
|
-
case "com.amazonaws.secretsmanager#PreconditionNotMetException":
|
|
570
|
-
response = {
|
|
571
|
-
...(await deserializeAws_json1_1PreconditionNotMetExceptionResponse(parsedOutput, context)),
|
|
572
|
-
name: errorCode,
|
|
573
|
-
$metadata: deserializeMetadata(output),
|
|
574
|
-
};
|
|
575
|
-
break;
|
|
576
|
-
case "ResourceExistsException":
|
|
577
|
-
case "com.amazonaws.secretsmanager#ResourceExistsException":
|
|
578
|
-
response = {
|
|
579
|
-
...(await deserializeAws_json1_1ResourceExistsExceptionResponse(parsedOutput, context)),
|
|
580
|
-
name: errorCode,
|
|
581
|
-
$metadata: deserializeMetadata(output),
|
|
582
|
-
};
|
|
583
|
-
break;
|
|
584
|
-
case "ResourceNotFoundException":
|
|
585
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
586
|
-
response = {
|
|
587
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
588
|
-
name: errorCode,
|
|
589
|
-
$metadata: deserializeMetadata(output),
|
|
590
|
-
};
|
|
591
|
-
break;
|
|
592
|
-
default:
|
|
593
|
-
const parsedBody = parsedOutput.body;
|
|
594
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
595
|
-
response = {
|
|
596
|
-
...parsedBody,
|
|
597
|
-
name: `${errorCode}`,
|
|
598
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
599
|
-
$fault: "client",
|
|
600
|
-
$metadata: deserializeMetadata(output),
|
|
601
|
-
} as any;
|
|
602
|
-
}
|
|
603
|
-
const message = response.message || response.Message || errorCode;
|
|
604
|
-
response.message = message;
|
|
605
|
-
delete response.Message;
|
|
606
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
607
|
-
};
|
|
608
|
-
|
|
609
|
-
export const deserializeAws_json1_1DeleteResourcePolicyCommand = async (
|
|
610
|
-
output: __HttpResponse,
|
|
611
|
-
context: __SerdeContext
|
|
612
|
-
): Promise<DeleteResourcePolicyCommandOutput> => {
|
|
613
|
-
if (output.statusCode >= 300) {
|
|
614
|
-
return deserializeAws_json1_1DeleteResourcePolicyCommandError(output, context);
|
|
615
|
-
}
|
|
616
|
-
const data: any = await parseBody(output.body, context);
|
|
617
|
-
let contents: any = {};
|
|
618
|
-
contents = deserializeAws_json1_1DeleteResourcePolicyResponse(data, context);
|
|
619
|
-
const response: DeleteResourcePolicyCommandOutput = {
|
|
620
|
-
$metadata: deserializeMetadata(output),
|
|
621
|
-
...contents,
|
|
622
|
-
};
|
|
623
|
-
return Promise.resolve(response);
|
|
624
|
-
};
|
|
625
|
-
|
|
626
|
-
const deserializeAws_json1_1DeleteResourcePolicyCommandError = async (
|
|
627
|
-
output: __HttpResponse,
|
|
628
|
-
context: __SerdeContext
|
|
629
|
-
): Promise<DeleteResourcePolicyCommandOutput> => {
|
|
630
|
-
const parsedOutput: any = {
|
|
631
|
-
...output,
|
|
632
|
-
body: await parseBody(output.body, context),
|
|
633
|
-
};
|
|
634
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
635
|
-
let errorCode: string = "UnknownError";
|
|
636
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
637
|
-
switch (errorCode) {
|
|
638
|
-
case "InternalServiceError":
|
|
639
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
640
|
-
response = {
|
|
641
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
642
|
-
name: errorCode,
|
|
643
|
-
$metadata: deserializeMetadata(output),
|
|
644
|
-
};
|
|
645
|
-
break;
|
|
646
|
-
case "InvalidParameterException":
|
|
647
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
648
|
-
response = {
|
|
649
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
650
|
-
name: errorCode,
|
|
651
|
-
$metadata: deserializeMetadata(output),
|
|
652
|
-
};
|
|
653
|
-
break;
|
|
654
|
-
case "InvalidRequestException":
|
|
655
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
656
|
-
response = {
|
|
657
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
658
|
-
name: errorCode,
|
|
659
|
-
$metadata: deserializeMetadata(output),
|
|
660
|
-
};
|
|
661
|
-
break;
|
|
662
|
-
case "ResourceNotFoundException":
|
|
663
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
664
|
-
response = {
|
|
665
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
666
|
-
name: errorCode,
|
|
667
|
-
$metadata: deserializeMetadata(output),
|
|
668
|
-
};
|
|
669
|
-
break;
|
|
670
|
-
default:
|
|
671
|
-
const parsedBody = parsedOutput.body;
|
|
672
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
673
|
-
response = {
|
|
674
|
-
...parsedBody,
|
|
675
|
-
name: `${errorCode}`,
|
|
676
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
677
|
-
$fault: "client",
|
|
678
|
-
$metadata: deserializeMetadata(output),
|
|
679
|
-
} as any;
|
|
680
|
-
}
|
|
681
|
-
const message = response.message || response.Message || errorCode;
|
|
682
|
-
response.message = message;
|
|
683
|
-
delete response.Message;
|
|
684
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
685
|
-
};
|
|
686
|
-
|
|
687
|
-
export const deserializeAws_json1_1DeleteSecretCommand = async (
|
|
688
|
-
output: __HttpResponse,
|
|
689
|
-
context: __SerdeContext
|
|
690
|
-
): Promise<DeleteSecretCommandOutput> => {
|
|
691
|
-
if (output.statusCode >= 300) {
|
|
692
|
-
return deserializeAws_json1_1DeleteSecretCommandError(output, context);
|
|
693
|
-
}
|
|
694
|
-
const data: any = await parseBody(output.body, context);
|
|
695
|
-
let contents: any = {};
|
|
696
|
-
contents = deserializeAws_json1_1DeleteSecretResponse(data, context);
|
|
697
|
-
const response: DeleteSecretCommandOutput = {
|
|
698
|
-
$metadata: deserializeMetadata(output),
|
|
699
|
-
...contents,
|
|
700
|
-
};
|
|
701
|
-
return Promise.resolve(response);
|
|
702
|
-
};
|
|
703
|
-
|
|
704
|
-
const deserializeAws_json1_1DeleteSecretCommandError = async (
|
|
705
|
-
output: __HttpResponse,
|
|
706
|
-
context: __SerdeContext
|
|
707
|
-
): Promise<DeleteSecretCommandOutput> => {
|
|
708
|
-
const parsedOutput: any = {
|
|
709
|
-
...output,
|
|
710
|
-
body: await parseBody(output.body, context),
|
|
711
|
-
};
|
|
712
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
713
|
-
let errorCode: string = "UnknownError";
|
|
714
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
715
|
-
switch (errorCode) {
|
|
716
|
-
case "InternalServiceError":
|
|
717
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
718
|
-
response = {
|
|
719
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
720
|
-
name: errorCode,
|
|
721
|
-
$metadata: deserializeMetadata(output),
|
|
722
|
-
};
|
|
723
|
-
break;
|
|
724
|
-
case "InvalidParameterException":
|
|
725
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
726
|
-
response = {
|
|
727
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
728
|
-
name: errorCode,
|
|
729
|
-
$metadata: deserializeMetadata(output),
|
|
730
|
-
};
|
|
731
|
-
break;
|
|
732
|
-
case "InvalidRequestException":
|
|
733
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
734
|
-
response = {
|
|
735
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
736
|
-
name: errorCode,
|
|
737
|
-
$metadata: deserializeMetadata(output),
|
|
738
|
-
};
|
|
739
|
-
break;
|
|
740
|
-
case "ResourceNotFoundException":
|
|
741
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
742
|
-
response = {
|
|
743
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
744
|
-
name: errorCode,
|
|
745
|
-
$metadata: deserializeMetadata(output),
|
|
746
|
-
};
|
|
747
|
-
break;
|
|
748
|
-
default:
|
|
749
|
-
const parsedBody = parsedOutput.body;
|
|
750
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
751
|
-
response = {
|
|
752
|
-
...parsedBody,
|
|
753
|
-
name: `${errorCode}`,
|
|
754
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
755
|
-
$fault: "client",
|
|
756
|
-
$metadata: deserializeMetadata(output),
|
|
757
|
-
} as any;
|
|
758
|
-
}
|
|
759
|
-
const message = response.message || response.Message || errorCode;
|
|
760
|
-
response.message = message;
|
|
761
|
-
delete response.Message;
|
|
762
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
763
|
-
};
|
|
764
|
-
|
|
765
|
-
export const deserializeAws_json1_1DescribeSecretCommand = async (
|
|
766
|
-
output: __HttpResponse,
|
|
767
|
-
context: __SerdeContext
|
|
768
|
-
): Promise<DescribeSecretCommandOutput> => {
|
|
769
|
-
if (output.statusCode >= 300) {
|
|
770
|
-
return deserializeAws_json1_1DescribeSecretCommandError(output, context);
|
|
771
|
-
}
|
|
772
|
-
const data: any = await parseBody(output.body, context);
|
|
773
|
-
let contents: any = {};
|
|
774
|
-
contents = deserializeAws_json1_1DescribeSecretResponse(data, context);
|
|
775
|
-
const response: DescribeSecretCommandOutput = {
|
|
776
|
-
$metadata: deserializeMetadata(output),
|
|
777
|
-
...contents,
|
|
778
|
-
};
|
|
779
|
-
return Promise.resolve(response);
|
|
780
|
-
};
|
|
781
|
-
|
|
782
|
-
const deserializeAws_json1_1DescribeSecretCommandError = async (
|
|
783
|
-
output: __HttpResponse,
|
|
784
|
-
context: __SerdeContext
|
|
785
|
-
): Promise<DescribeSecretCommandOutput> => {
|
|
786
|
-
const parsedOutput: any = {
|
|
787
|
-
...output,
|
|
788
|
-
body: await parseBody(output.body, context),
|
|
789
|
-
};
|
|
790
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
791
|
-
let errorCode: string = "UnknownError";
|
|
792
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
793
|
-
switch (errorCode) {
|
|
794
|
-
case "InternalServiceError":
|
|
795
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
796
|
-
response = {
|
|
797
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
798
|
-
name: errorCode,
|
|
799
|
-
$metadata: deserializeMetadata(output),
|
|
800
|
-
};
|
|
801
|
-
break;
|
|
802
|
-
case "InvalidParameterException":
|
|
803
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
804
|
-
response = {
|
|
805
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
806
|
-
name: errorCode,
|
|
807
|
-
$metadata: deserializeMetadata(output),
|
|
808
|
-
};
|
|
809
|
-
break;
|
|
810
|
-
case "ResourceNotFoundException":
|
|
811
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
812
|
-
response = {
|
|
813
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
814
|
-
name: errorCode,
|
|
815
|
-
$metadata: deserializeMetadata(output),
|
|
816
|
-
};
|
|
817
|
-
break;
|
|
818
|
-
default:
|
|
819
|
-
const parsedBody = parsedOutput.body;
|
|
820
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
821
|
-
response = {
|
|
822
|
-
...parsedBody,
|
|
823
|
-
name: `${errorCode}`,
|
|
824
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
825
|
-
$fault: "client",
|
|
826
|
-
$metadata: deserializeMetadata(output),
|
|
827
|
-
} as any;
|
|
828
|
-
}
|
|
829
|
-
const message = response.message || response.Message || errorCode;
|
|
830
|
-
response.message = message;
|
|
831
|
-
delete response.Message;
|
|
832
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
833
|
-
};
|
|
834
|
-
|
|
835
|
-
export const deserializeAws_json1_1GetRandomPasswordCommand = async (
|
|
836
|
-
output: __HttpResponse,
|
|
837
|
-
context: __SerdeContext
|
|
838
|
-
): Promise<GetRandomPasswordCommandOutput> => {
|
|
839
|
-
if (output.statusCode >= 300) {
|
|
840
|
-
return deserializeAws_json1_1GetRandomPasswordCommandError(output, context);
|
|
841
|
-
}
|
|
842
|
-
const data: any = await parseBody(output.body, context);
|
|
843
|
-
let contents: any = {};
|
|
844
|
-
contents = deserializeAws_json1_1GetRandomPasswordResponse(data, context);
|
|
845
|
-
const response: GetRandomPasswordCommandOutput = {
|
|
846
|
-
$metadata: deserializeMetadata(output),
|
|
847
|
-
...contents,
|
|
848
|
-
};
|
|
849
|
-
return Promise.resolve(response);
|
|
850
|
-
};
|
|
851
|
-
|
|
852
|
-
const deserializeAws_json1_1GetRandomPasswordCommandError = async (
|
|
853
|
-
output: __HttpResponse,
|
|
854
|
-
context: __SerdeContext
|
|
855
|
-
): Promise<GetRandomPasswordCommandOutput> => {
|
|
856
|
-
const parsedOutput: any = {
|
|
857
|
-
...output,
|
|
858
|
-
body: await parseBody(output.body, context),
|
|
859
|
-
};
|
|
860
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
861
|
-
let errorCode: string = "UnknownError";
|
|
862
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
863
|
-
switch (errorCode) {
|
|
864
|
-
case "InternalServiceError":
|
|
865
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
866
|
-
response = {
|
|
867
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
868
|
-
name: errorCode,
|
|
869
|
-
$metadata: deserializeMetadata(output),
|
|
870
|
-
};
|
|
871
|
-
break;
|
|
872
|
-
case "InvalidParameterException":
|
|
873
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
874
|
-
response = {
|
|
875
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
876
|
-
name: errorCode,
|
|
877
|
-
$metadata: deserializeMetadata(output),
|
|
878
|
-
};
|
|
879
|
-
break;
|
|
880
|
-
case "InvalidRequestException":
|
|
881
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
882
|
-
response = {
|
|
883
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
884
|
-
name: errorCode,
|
|
885
|
-
$metadata: deserializeMetadata(output),
|
|
886
|
-
};
|
|
887
|
-
break;
|
|
888
|
-
default:
|
|
889
|
-
const parsedBody = parsedOutput.body;
|
|
890
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
891
|
-
response = {
|
|
892
|
-
...parsedBody,
|
|
893
|
-
name: `${errorCode}`,
|
|
894
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
895
|
-
$fault: "client",
|
|
896
|
-
$metadata: deserializeMetadata(output),
|
|
897
|
-
} as any;
|
|
898
|
-
}
|
|
899
|
-
const message = response.message || response.Message || errorCode;
|
|
900
|
-
response.message = message;
|
|
901
|
-
delete response.Message;
|
|
902
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
903
|
-
};
|
|
904
|
-
|
|
905
|
-
export const deserializeAws_json1_1GetResourcePolicyCommand = async (
|
|
906
|
-
output: __HttpResponse,
|
|
907
|
-
context: __SerdeContext
|
|
908
|
-
): Promise<GetResourcePolicyCommandOutput> => {
|
|
909
|
-
if (output.statusCode >= 300) {
|
|
910
|
-
return deserializeAws_json1_1GetResourcePolicyCommandError(output, context);
|
|
911
|
-
}
|
|
912
|
-
const data: any = await parseBody(output.body, context);
|
|
913
|
-
let contents: any = {};
|
|
914
|
-
contents = deserializeAws_json1_1GetResourcePolicyResponse(data, context);
|
|
915
|
-
const response: GetResourcePolicyCommandOutput = {
|
|
916
|
-
$metadata: deserializeMetadata(output),
|
|
917
|
-
...contents,
|
|
918
|
-
};
|
|
919
|
-
return Promise.resolve(response);
|
|
920
|
-
};
|
|
921
|
-
|
|
922
|
-
const deserializeAws_json1_1GetResourcePolicyCommandError = async (
|
|
923
|
-
output: __HttpResponse,
|
|
924
|
-
context: __SerdeContext
|
|
925
|
-
): Promise<GetResourcePolicyCommandOutput> => {
|
|
926
|
-
const parsedOutput: any = {
|
|
927
|
-
...output,
|
|
928
|
-
body: await parseBody(output.body, context),
|
|
929
|
-
};
|
|
930
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
931
|
-
let errorCode: string = "UnknownError";
|
|
932
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
933
|
-
switch (errorCode) {
|
|
934
|
-
case "InternalServiceError":
|
|
935
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
936
|
-
response = {
|
|
937
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
938
|
-
name: errorCode,
|
|
939
|
-
$metadata: deserializeMetadata(output),
|
|
940
|
-
};
|
|
941
|
-
break;
|
|
942
|
-
case "InvalidParameterException":
|
|
943
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
944
|
-
response = {
|
|
945
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
946
|
-
name: errorCode,
|
|
947
|
-
$metadata: deserializeMetadata(output),
|
|
948
|
-
};
|
|
949
|
-
break;
|
|
950
|
-
case "InvalidRequestException":
|
|
951
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
952
|
-
response = {
|
|
953
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
954
|
-
name: errorCode,
|
|
955
|
-
$metadata: deserializeMetadata(output),
|
|
956
|
-
};
|
|
957
|
-
break;
|
|
958
|
-
case "ResourceNotFoundException":
|
|
959
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
960
|
-
response = {
|
|
961
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
962
|
-
name: errorCode,
|
|
963
|
-
$metadata: deserializeMetadata(output),
|
|
964
|
-
};
|
|
965
|
-
break;
|
|
966
|
-
default:
|
|
967
|
-
const parsedBody = parsedOutput.body;
|
|
968
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
969
|
-
response = {
|
|
970
|
-
...parsedBody,
|
|
971
|
-
name: `${errorCode}`,
|
|
972
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
973
|
-
$fault: "client",
|
|
974
|
-
$metadata: deserializeMetadata(output),
|
|
975
|
-
} as any;
|
|
976
|
-
}
|
|
977
|
-
const message = response.message || response.Message || errorCode;
|
|
978
|
-
response.message = message;
|
|
979
|
-
delete response.Message;
|
|
980
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
981
|
-
};
|
|
982
|
-
|
|
983
|
-
export const deserializeAws_json1_1GetSecretValueCommand = async (
|
|
984
|
-
output: __HttpResponse,
|
|
985
|
-
context: __SerdeContext
|
|
986
|
-
): Promise<GetSecretValueCommandOutput> => {
|
|
987
|
-
if (output.statusCode >= 300) {
|
|
988
|
-
return deserializeAws_json1_1GetSecretValueCommandError(output, context);
|
|
989
|
-
}
|
|
990
|
-
const data: any = await parseBody(output.body, context);
|
|
991
|
-
let contents: any = {};
|
|
992
|
-
contents = deserializeAws_json1_1GetSecretValueResponse(data, context);
|
|
993
|
-
const response: GetSecretValueCommandOutput = {
|
|
994
|
-
$metadata: deserializeMetadata(output),
|
|
995
|
-
...contents,
|
|
996
|
-
};
|
|
997
|
-
return Promise.resolve(response);
|
|
998
|
-
};
|
|
999
|
-
|
|
1000
|
-
const deserializeAws_json1_1GetSecretValueCommandError = async (
|
|
1001
|
-
output: __HttpResponse,
|
|
1002
|
-
context: __SerdeContext
|
|
1003
|
-
): Promise<GetSecretValueCommandOutput> => {
|
|
1004
|
-
const parsedOutput: any = {
|
|
1005
|
-
...output,
|
|
1006
|
-
body: await parseBody(output.body, context),
|
|
1007
|
-
};
|
|
1008
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1009
|
-
let errorCode: string = "UnknownError";
|
|
1010
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1011
|
-
switch (errorCode) {
|
|
1012
|
-
case "DecryptionFailure":
|
|
1013
|
-
case "com.amazonaws.secretsmanager#DecryptionFailure":
|
|
1014
|
-
response = {
|
|
1015
|
-
...(await deserializeAws_json1_1DecryptionFailureResponse(parsedOutput, context)),
|
|
1016
|
-
name: errorCode,
|
|
1017
|
-
$metadata: deserializeMetadata(output),
|
|
1018
|
-
};
|
|
1019
|
-
break;
|
|
1020
|
-
case "InternalServiceError":
|
|
1021
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
1022
|
-
response = {
|
|
1023
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
1024
|
-
name: errorCode,
|
|
1025
|
-
$metadata: deserializeMetadata(output),
|
|
1026
|
-
};
|
|
1027
|
-
break;
|
|
1028
|
-
case "InvalidParameterException":
|
|
1029
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
1030
|
-
response = {
|
|
1031
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1032
|
-
name: errorCode,
|
|
1033
|
-
$metadata: deserializeMetadata(output),
|
|
1034
|
-
};
|
|
1035
|
-
break;
|
|
1036
|
-
case "InvalidRequestException":
|
|
1037
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
1038
|
-
response = {
|
|
1039
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1040
|
-
name: errorCode,
|
|
1041
|
-
$metadata: deserializeMetadata(output),
|
|
1042
|
-
};
|
|
1043
|
-
break;
|
|
1044
|
-
case "ResourceNotFoundException":
|
|
1045
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
1046
|
-
response = {
|
|
1047
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1048
|
-
name: errorCode,
|
|
1049
|
-
$metadata: deserializeMetadata(output),
|
|
1050
|
-
};
|
|
1051
|
-
break;
|
|
1052
|
-
default:
|
|
1053
|
-
const parsedBody = parsedOutput.body;
|
|
1054
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1055
|
-
response = {
|
|
1056
|
-
...parsedBody,
|
|
1057
|
-
name: `${errorCode}`,
|
|
1058
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1059
|
-
$fault: "client",
|
|
1060
|
-
$metadata: deserializeMetadata(output),
|
|
1061
|
-
} as any;
|
|
1062
|
-
}
|
|
1063
|
-
const message = response.message || response.Message || errorCode;
|
|
1064
|
-
response.message = message;
|
|
1065
|
-
delete response.Message;
|
|
1066
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1067
|
-
};
|
|
1068
|
-
|
|
1069
|
-
export const deserializeAws_json1_1ListSecretsCommand = async (
|
|
1070
|
-
output: __HttpResponse,
|
|
1071
|
-
context: __SerdeContext
|
|
1072
|
-
): Promise<ListSecretsCommandOutput> => {
|
|
1073
|
-
if (output.statusCode >= 300) {
|
|
1074
|
-
return deserializeAws_json1_1ListSecretsCommandError(output, context);
|
|
1075
|
-
}
|
|
1076
|
-
const data: any = await parseBody(output.body, context);
|
|
1077
|
-
let contents: any = {};
|
|
1078
|
-
contents = deserializeAws_json1_1ListSecretsResponse(data, context);
|
|
1079
|
-
const response: ListSecretsCommandOutput = {
|
|
1080
|
-
$metadata: deserializeMetadata(output),
|
|
1081
|
-
...contents,
|
|
1082
|
-
};
|
|
1083
|
-
return Promise.resolve(response);
|
|
1084
|
-
};
|
|
1085
|
-
|
|
1086
|
-
const deserializeAws_json1_1ListSecretsCommandError = async (
|
|
1087
|
-
output: __HttpResponse,
|
|
1088
|
-
context: __SerdeContext
|
|
1089
|
-
): Promise<ListSecretsCommandOutput> => {
|
|
1090
|
-
const parsedOutput: any = {
|
|
1091
|
-
...output,
|
|
1092
|
-
body: await parseBody(output.body, context),
|
|
1093
|
-
};
|
|
1094
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1095
|
-
let errorCode: string = "UnknownError";
|
|
1096
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1097
|
-
switch (errorCode) {
|
|
1098
|
-
case "InternalServiceError":
|
|
1099
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
1100
|
-
response = {
|
|
1101
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
1102
|
-
name: errorCode,
|
|
1103
|
-
$metadata: deserializeMetadata(output),
|
|
1104
|
-
};
|
|
1105
|
-
break;
|
|
1106
|
-
case "InvalidNextTokenException":
|
|
1107
|
-
case "com.amazonaws.secretsmanager#InvalidNextTokenException":
|
|
1108
|
-
response = {
|
|
1109
|
-
...(await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)),
|
|
1110
|
-
name: errorCode,
|
|
1111
|
-
$metadata: deserializeMetadata(output),
|
|
1112
|
-
};
|
|
1113
|
-
break;
|
|
1114
|
-
case "InvalidParameterException":
|
|
1115
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
1116
|
-
response = {
|
|
1117
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1118
|
-
name: errorCode,
|
|
1119
|
-
$metadata: deserializeMetadata(output),
|
|
1120
|
-
};
|
|
1121
|
-
break;
|
|
1122
|
-
default:
|
|
1123
|
-
const parsedBody = parsedOutput.body;
|
|
1124
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1125
|
-
response = {
|
|
1126
|
-
...parsedBody,
|
|
1127
|
-
name: `${errorCode}`,
|
|
1128
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1129
|
-
$fault: "client",
|
|
1130
|
-
$metadata: deserializeMetadata(output),
|
|
1131
|
-
} as any;
|
|
1132
|
-
}
|
|
1133
|
-
const message = response.message || response.Message || errorCode;
|
|
1134
|
-
response.message = message;
|
|
1135
|
-
delete response.Message;
|
|
1136
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1137
|
-
};
|
|
1138
|
-
|
|
1139
|
-
export const deserializeAws_json1_1ListSecretVersionIdsCommand = async (
|
|
1140
|
-
output: __HttpResponse,
|
|
1141
|
-
context: __SerdeContext
|
|
1142
|
-
): Promise<ListSecretVersionIdsCommandOutput> => {
|
|
1143
|
-
if (output.statusCode >= 300) {
|
|
1144
|
-
return deserializeAws_json1_1ListSecretVersionIdsCommandError(output, context);
|
|
1145
|
-
}
|
|
1146
|
-
const data: any = await parseBody(output.body, context);
|
|
1147
|
-
let contents: any = {};
|
|
1148
|
-
contents = deserializeAws_json1_1ListSecretVersionIdsResponse(data, context);
|
|
1149
|
-
const response: ListSecretVersionIdsCommandOutput = {
|
|
1150
|
-
$metadata: deserializeMetadata(output),
|
|
1151
|
-
...contents,
|
|
1152
|
-
};
|
|
1153
|
-
return Promise.resolve(response);
|
|
1154
|
-
};
|
|
1155
|
-
|
|
1156
|
-
const deserializeAws_json1_1ListSecretVersionIdsCommandError = async (
|
|
1157
|
-
output: __HttpResponse,
|
|
1158
|
-
context: __SerdeContext
|
|
1159
|
-
): Promise<ListSecretVersionIdsCommandOutput> => {
|
|
1160
|
-
const parsedOutput: any = {
|
|
1161
|
-
...output,
|
|
1162
|
-
body: await parseBody(output.body, context),
|
|
1163
|
-
};
|
|
1164
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1165
|
-
let errorCode: string = "UnknownError";
|
|
1166
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1167
|
-
switch (errorCode) {
|
|
1168
|
-
case "InternalServiceError":
|
|
1169
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
1170
|
-
response = {
|
|
1171
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
1172
|
-
name: errorCode,
|
|
1173
|
-
$metadata: deserializeMetadata(output),
|
|
1174
|
-
};
|
|
1175
|
-
break;
|
|
1176
|
-
case "InvalidNextTokenException":
|
|
1177
|
-
case "com.amazonaws.secretsmanager#InvalidNextTokenException":
|
|
1178
|
-
response = {
|
|
1179
|
-
...(await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)),
|
|
1180
|
-
name: errorCode,
|
|
1181
|
-
$metadata: deserializeMetadata(output),
|
|
1182
|
-
};
|
|
1183
|
-
break;
|
|
1184
|
-
case "InvalidParameterException":
|
|
1185
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
1186
|
-
response = {
|
|
1187
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1188
|
-
name: errorCode,
|
|
1189
|
-
$metadata: deserializeMetadata(output),
|
|
1190
|
-
};
|
|
1191
|
-
break;
|
|
1192
|
-
case "ResourceNotFoundException":
|
|
1193
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
1194
|
-
response = {
|
|
1195
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1196
|
-
name: errorCode,
|
|
1197
|
-
$metadata: deserializeMetadata(output),
|
|
1198
|
-
};
|
|
1199
|
-
break;
|
|
1200
|
-
default:
|
|
1201
|
-
const parsedBody = parsedOutput.body;
|
|
1202
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1203
|
-
response = {
|
|
1204
|
-
...parsedBody,
|
|
1205
|
-
name: `${errorCode}`,
|
|
1206
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1207
|
-
$fault: "client",
|
|
1208
|
-
$metadata: deserializeMetadata(output),
|
|
1209
|
-
} as any;
|
|
1210
|
-
}
|
|
1211
|
-
const message = response.message || response.Message || errorCode;
|
|
1212
|
-
response.message = message;
|
|
1213
|
-
delete response.Message;
|
|
1214
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1215
|
-
};
|
|
1216
|
-
|
|
1217
|
-
export const deserializeAws_json1_1PutResourcePolicyCommand = async (
|
|
1218
|
-
output: __HttpResponse,
|
|
1219
|
-
context: __SerdeContext
|
|
1220
|
-
): Promise<PutResourcePolicyCommandOutput> => {
|
|
1221
|
-
if (output.statusCode >= 300) {
|
|
1222
|
-
return deserializeAws_json1_1PutResourcePolicyCommandError(output, context);
|
|
1223
|
-
}
|
|
1224
|
-
const data: any = await parseBody(output.body, context);
|
|
1225
|
-
let contents: any = {};
|
|
1226
|
-
contents = deserializeAws_json1_1PutResourcePolicyResponse(data, context);
|
|
1227
|
-
const response: PutResourcePolicyCommandOutput = {
|
|
1228
|
-
$metadata: deserializeMetadata(output),
|
|
1229
|
-
...contents,
|
|
1230
|
-
};
|
|
1231
|
-
return Promise.resolve(response);
|
|
1232
|
-
};
|
|
1233
|
-
|
|
1234
|
-
const deserializeAws_json1_1PutResourcePolicyCommandError = async (
|
|
1235
|
-
output: __HttpResponse,
|
|
1236
|
-
context: __SerdeContext
|
|
1237
|
-
): Promise<PutResourcePolicyCommandOutput> => {
|
|
1238
|
-
const parsedOutput: any = {
|
|
1239
|
-
...output,
|
|
1240
|
-
body: await parseBody(output.body, context),
|
|
1241
|
-
};
|
|
1242
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1243
|
-
let errorCode: string = "UnknownError";
|
|
1244
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1245
|
-
switch (errorCode) {
|
|
1246
|
-
case "InternalServiceError":
|
|
1247
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
1248
|
-
response = {
|
|
1249
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
1250
|
-
name: errorCode,
|
|
1251
|
-
$metadata: deserializeMetadata(output),
|
|
1252
|
-
};
|
|
1253
|
-
break;
|
|
1254
|
-
case "InvalidParameterException":
|
|
1255
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
1256
|
-
response = {
|
|
1257
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1258
|
-
name: errorCode,
|
|
1259
|
-
$metadata: deserializeMetadata(output),
|
|
1260
|
-
};
|
|
1261
|
-
break;
|
|
1262
|
-
case "InvalidRequestException":
|
|
1263
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
1264
|
-
response = {
|
|
1265
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1266
|
-
name: errorCode,
|
|
1267
|
-
$metadata: deserializeMetadata(output),
|
|
1268
|
-
};
|
|
1269
|
-
break;
|
|
1270
|
-
case "MalformedPolicyDocumentException":
|
|
1271
|
-
case "com.amazonaws.secretsmanager#MalformedPolicyDocumentException":
|
|
1272
|
-
response = {
|
|
1273
|
-
...(await deserializeAws_json1_1MalformedPolicyDocumentExceptionResponse(parsedOutput, context)),
|
|
1274
|
-
name: errorCode,
|
|
1275
|
-
$metadata: deserializeMetadata(output),
|
|
1276
|
-
};
|
|
1277
|
-
break;
|
|
1278
|
-
case "PublicPolicyException":
|
|
1279
|
-
case "com.amazonaws.secretsmanager#PublicPolicyException":
|
|
1280
|
-
response = {
|
|
1281
|
-
...(await deserializeAws_json1_1PublicPolicyExceptionResponse(parsedOutput, context)),
|
|
1282
|
-
name: errorCode,
|
|
1283
|
-
$metadata: deserializeMetadata(output),
|
|
1284
|
-
};
|
|
1285
|
-
break;
|
|
1286
|
-
case "ResourceNotFoundException":
|
|
1287
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
1288
|
-
response = {
|
|
1289
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1290
|
-
name: errorCode,
|
|
1291
|
-
$metadata: deserializeMetadata(output),
|
|
1292
|
-
};
|
|
1293
|
-
break;
|
|
1294
|
-
default:
|
|
1295
|
-
const parsedBody = parsedOutput.body;
|
|
1296
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1297
|
-
response = {
|
|
1298
|
-
...parsedBody,
|
|
1299
|
-
name: `${errorCode}`,
|
|
1300
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1301
|
-
$fault: "client",
|
|
1302
|
-
$metadata: deserializeMetadata(output),
|
|
1303
|
-
} as any;
|
|
1304
|
-
}
|
|
1305
|
-
const message = response.message || response.Message || errorCode;
|
|
1306
|
-
response.message = message;
|
|
1307
|
-
delete response.Message;
|
|
1308
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1309
|
-
};
|
|
1310
|
-
|
|
1311
|
-
export const deserializeAws_json1_1PutSecretValueCommand = async (
|
|
1312
|
-
output: __HttpResponse,
|
|
1313
|
-
context: __SerdeContext
|
|
1314
|
-
): Promise<PutSecretValueCommandOutput> => {
|
|
1315
|
-
if (output.statusCode >= 300) {
|
|
1316
|
-
return deserializeAws_json1_1PutSecretValueCommandError(output, context);
|
|
1317
|
-
}
|
|
1318
|
-
const data: any = await parseBody(output.body, context);
|
|
1319
|
-
let contents: any = {};
|
|
1320
|
-
contents = deserializeAws_json1_1PutSecretValueResponse(data, context);
|
|
1321
|
-
const response: PutSecretValueCommandOutput = {
|
|
1322
|
-
$metadata: deserializeMetadata(output),
|
|
1323
|
-
...contents,
|
|
1324
|
-
};
|
|
1325
|
-
return Promise.resolve(response);
|
|
1326
|
-
};
|
|
1327
|
-
|
|
1328
|
-
const deserializeAws_json1_1PutSecretValueCommandError = async (
|
|
1329
|
-
output: __HttpResponse,
|
|
1330
|
-
context: __SerdeContext
|
|
1331
|
-
): Promise<PutSecretValueCommandOutput> => {
|
|
1332
|
-
const parsedOutput: any = {
|
|
1333
|
-
...output,
|
|
1334
|
-
body: await parseBody(output.body, context),
|
|
1335
|
-
};
|
|
1336
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1337
|
-
let errorCode: string = "UnknownError";
|
|
1338
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1339
|
-
switch (errorCode) {
|
|
1340
|
-
case "EncryptionFailure":
|
|
1341
|
-
case "com.amazonaws.secretsmanager#EncryptionFailure":
|
|
1342
|
-
response = {
|
|
1343
|
-
...(await deserializeAws_json1_1EncryptionFailureResponse(parsedOutput, context)),
|
|
1344
|
-
name: errorCode,
|
|
1345
|
-
$metadata: deserializeMetadata(output),
|
|
1346
|
-
};
|
|
1347
|
-
break;
|
|
1348
|
-
case "InternalServiceError":
|
|
1349
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
1350
|
-
response = {
|
|
1351
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
1352
|
-
name: errorCode,
|
|
1353
|
-
$metadata: deserializeMetadata(output),
|
|
1354
|
-
};
|
|
1355
|
-
break;
|
|
1356
|
-
case "InvalidParameterException":
|
|
1357
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
1358
|
-
response = {
|
|
1359
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1360
|
-
name: errorCode,
|
|
1361
|
-
$metadata: deserializeMetadata(output),
|
|
1362
|
-
};
|
|
1363
|
-
break;
|
|
1364
|
-
case "InvalidRequestException":
|
|
1365
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
1366
|
-
response = {
|
|
1367
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1368
|
-
name: errorCode,
|
|
1369
|
-
$metadata: deserializeMetadata(output),
|
|
1370
|
-
};
|
|
1371
|
-
break;
|
|
1372
|
-
case "LimitExceededException":
|
|
1373
|
-
case "com.amazonaws.secretsmanager#LimitExceededException":
|
|
1374
|
-
response = {
|
|
1375
|
-
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
1376
|
-
name: errorCode,
|
|
1377
|
-
$metadata: deserializeMetadata(output),
|
|
1378
|
-
};
|
|
1379
|
-
break;
|
|
1380
|
-
case "ResourceExistsException":
|
|
1381
|
-
case "com.amazonaws.secretsmanager#ResourceExistsException":
|
|
1382
|
-
response = {
|
|
1383
|
-
...(await deserializeAws_json1_1ResourceExistsExceptionResponse(parsedOutput, context)),
|
|
1384
|
-
name: errorCode,
|
|
1385
|
-
$metadata: deserializeMetadata(output),
|
|
1386
|
-
};
|
|
1387
|
-
break;
|
|
1388
|
-
case "ResourceNotFoundException":
|
|
1389
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
1390
|
-
response = {
|
|
1391
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1392
|
-
name: errorCode,
|
|
1393
|
-
$metadata: deserializeMetadata(output),
|
|
1394
|
-
};
|
|
1395
|
-
break;
|
|
1396
|
-
default:
|
|
1397
|
-
const parsedBody = parsedOutput.body;
|
|
1398
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1399
|
-
response = {
|
|
1400
|
-
...parsedBody,
|
|
1401
|
-
name: `${errorCode}`,
|
|
1402
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1403
|
-
$fault: "client",
|
|
1404
|
-
$metadata: deserializeMetadata(output),
|
|
1405
|
-
} as any;
|
|
1406
|
-
}
|
|
1407
|
-
const message = response.message || response.Message || errorCode;
|
|
1408
|
-
response.message = message;
|
|
1409
|
-
delete response.Message;
|
|
1410
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1411
|
-
};
|
|
1412
|
-
|
|
1413
|
-
export const deserializeAws_json1_1RemoveRegionsFromReplicationCommand = async (
|
|
1414
|
-
output: __HttpResponse,
|
|
1415
|
-
context: __SerdeContext
|
|
1416
|
-
): Promise<RemoveRegionsFromReplicationCommandOutput> => {
|
|
1417
|
-
if (output.statusCode >= 300) {
|
|
1418
|
-
return deserializeAws_json1_1RemoveRegionsFromReplicationCommandError(output, context);
|
|
1419
|
-
}
|
|
1420
|
-
const data: any = await parseBody(output.body, context);
|
|
1421
|
-
let contents: any = {};
|
|
1422
|
-
contents = deserializeAws_json1_1RemoveRegionsFromReplicationResponse(data, context);
|
|
1423
|
-
const response: RemoveRegionsFromReplicationCommandOutput = {
|
|
1424
|
-
$metadata: deserializeMetadata(output),
|
|
1425
|
-
...contents,
|
|
1426
|
-
};
|
|
1427
|
-
return Promise.resolve(response);
|
|
1428
|
-
};
|
|
1429
|
-
|
|
1430
|
-
const deserializeAws_json1_1RemoveRegionsFromReplicationCommandError = async (
|
|
1431
|
-
output: __HttpResponse,
|
|
1432
|
-
context: __SerdeContext
|
|
1433
|
-
): Promise<RemoveRegionsFromReplicationCommandOutput> => {
|
|
1434
|
-
const parsedOutput: any = {
|
|
1435
|
-
...output,
|
|
1436
|
-
body: await parseBody(output.body, context),
|
|
1437
|
-
};
|
|
1438
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1439
|
-
let errorCode: string = "UnknownError";
|
|
1440
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1441
|
-
switch (errorCode) {
|
|
1442
|
-
case "InternalServiceError":
|
|
1443
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
1444
|
-
response = {
|
|
1445
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
1446
|
-
name: errorCode,
|
|
1447
|
-
$metadata: deserializeMetadata(output),
|
|
1448
|
-
};
|
|
1449
|
-
break;
|
|
1450
|
-
case "InvalidParameterException":
|
|
1451
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
1452
|
-
response = {
|
|
1453
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1454
|
-
name: errorCode,
|
|
1455
|
-
$metadata: deserializeMetadata(output),
|
|
1456
|
-
};
|
|
1457
|
-
break;
|
|
1458
|
-
case "InvalidRequestException":
|
|
1459
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
1460
|
-
response = {
|
|
1461
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1462
|
-
name: errorCode,
|
|
1463
|
-
$metadata: deserializeMetadata(output),
|
|
1464
|
-
};
|
|
1465
|
-
break;
|
|
1466
|
-
case "ResourceNotFoundException":
|
|
1467
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
1468
|
-
response = {
|
|
1469
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1470
|
-
name: errorCode,
|
|
1471
|
-
$metadata: deserializeMetadata(output),
|
|
1472
|
-
};
|
|
1473
|
-
break;
|
|
1474
|
-
default:
|
|
1475
|
-
const parsedBody = parsedOutput.body;
|
|
1476
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1477
|
-
response = {
|
|
1478
|
-
...parsedBody,
|
|
1479
|
-
name: `${errorCode}`,
|
|
1480
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1481
|
-
$fault: "client",
|
|
1482
|
-
$metadata: deserializeMetadata(output),
|
|
1483
|
-
} as any;
|
|
1484
|
-
}
|
|
1485
|
-
const message = response.message || response.Message || errorCode;
|
|
1486
|
-
response.message = message;
|
|
1487
|
-
delete response.Message;
|
|
1488
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1489
|
-
};
|
|
1490
|
-
|
|
1491
|
-
export const deserializeAws_json1_1ReplicateSecretToRegionsCommand = async (
|
|
1492
|
-
output: __HttpResponse,
|
|
1493
|
-
context: __SerdeContext
|
|
1494
|
-
): Promise<ReplicateSecretToRegionsCommandOutput> => {
|
|
1495
|
-
if (output.statusCode >= 300) {
|
|
1496
|
-
return deserializeAws_json1_1ReplicateSecretToRegionsCommandError(output, context);
|
|
1497
|
-
}
|
|
1498
|
-
const data: any = await parseBody(output.body, context);
|
|
1499
|
-
let contents: any = {};
|
|
1500
|
-
contents = deserializeAws_json1_1ReplicateSecretToRegionsResponse(data, context);
|
|
1501
|
-
const response: ReplicateSecretToRegionsCommandOutput = {
|
|
1502
|
-
$metadata: deserializeMetadata(output),
|
|
1503
|
-
...contents,
|
|
1504
|
-
};
|
|
1505
|
-
return Promise.resolve(response);
|
|
1506
|
-
};
|
|
1507
|
-
|
|
1508
|
-
const deserializeAws_json1_1ReplicateSecretToRegionsCommandError = async (
|
|
1509
|
-
output: __HttpResponse,
|
|
1510
|
-
context: __SerdeContext
|
|
1511
|
-
): Promise<ReplicateSecretToRegionsCommandOutput> => {
|
|
1512
|
-
const parsedOutput: any = {
|
|
1513
|
-
...output,
|
|
1514
|
-
body: await parseBody(output.body, context),
|
|
1515
|
-
};
|
|
1516
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1517
|
-
let errorCode: string = "UnknownError";
|
|
1518
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1519
|
-
switch (errorCode) {
|
|
1520
|
-
case "InternalServiceError":
|
|
1521
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
1522
|
-
response = {
|
|
1523
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
1524
|
-
name: errorCode,
|
|
1525
|
-
$metadata: deserializeMetadata(output),
|
|
1526
|
-
};
|
|
1527
|
-
break;
|
|
1528
|
-
case "InvalidParameterException":
|
|
1529
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
1530
|
-
response = {
|
|
1531
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1532
|
-
name: errorCode,
|
|
1533
|
-
$metadata: deserializeMetadata(output),
|
|
1534
|
-
};
|
|
1535
|
-
break;
|
|
1536
|
-
case "InvalidRequestException":
|
|
1537
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
1538
|
-
response = {
|
|
1539
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1540
|
-
name: errorCode,
|
|
1541
|
-
$metadata: deserializeMetadata(output),
|
|
1542
|
-
};
|
|
1543
|
-
break;
|
|
1544
|
-
case "ResourceNotFoundException":
|
|
1545
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
1546
|
-
response = {
|
|
1547
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1548
|
-
name: errorCode,
|
|
1549
|
-
$metadata: deserializeMetadata(output),
|
|
1550
|
-
};
|
|
1551
|
-
break;
|
|
1552
|
-
default:
|
|
1553
|
-
const parsedBody = parsedOutput.body;
|
|
1554
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1555
|
-
response = {
|
|
1556
|
-
...parsedBody,
|
|
1557
|
-
name: `${errorCode}`,
|
|
1558
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1559
|
-
$fault: "client",
|
|
1560
|
-
$metadata: deserializeMetadata(output),
|
|
1561
|
-
} as any;
|
|
1562
|
-
}
|
|
1563
|
-
const message = response.message || response.Message || errorCode;
|
|
1564
|
-
response.message = message;
|
|
1565
|
-
delete response.Message;
|
|
1566
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1567
|
-
};
|
|
1568
|
-
|
|
1569
|
-
export const deserializeAws_json1_1RestoreSecretCommand = async (
|
|
1570
|
-
output: __HttpResponse,
|
|
1571
|
-
context: __SerdeContext
|
|
1572
|
-
): Promise<RestoreSecretCommandOutput> => {
|
|
1573
|
-
if (output.statusCode >= 300) {
|
|
1574
|
-
return deserializeAws_json1_1RestoreSecretCommandError(output, context);
|
|
1575
|
-
}
|
|
1576
|
-
const data: any = await parseBody(output.body, context);
|
|
1577
|
-
let contents: any = {};
|
|
1578
|
-
contents = deserializeAws_json1_1RestoreSecretResponse(data, context);
|
|
1579
|
-
const response: RestoreSecretCommandOutput = {
|
|
1580
|
-
$metadata: deserializeMetadata(output),
|
|
1581
|
-
...contents,
|
|
1582
|
-
};
|
|
1583
|
-
return Promise.resolve(response);
|
|
1584
|
-
};
|
|
1585
|
-
|
|
1586
|
-
const deserializeAws_json1_1RestoreSecretCommandError = async (
|
|
1587
|
-
output: __HttpResponse,
|
|
1588
|
-
context: __SerdeContext
|
|
1589
|
-
): Promise<RestoreSecretCommandOutput> => {
|
|
1590
|
-
const parsedOutput: any = {
|
|
1591
|
-
...output,
|
|
1592
|
-
body: await parseBody(output.body, context),
|
|
1593
|
-
};
|
|
1594
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1595
|
-
let errorCode: string = "UnknownError";
|
|
1596
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1597
|
-
switch (errorCode) {
|
|
1598
|
-
case "InternalServiceError":
|
|
1599
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
1600
|
-
response = {
|
|
1601
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
1602
|
-
name: errorCode,
|
|
1603
|
-
$metadata: deserializeMetadata(output),
|
|
1604
|
-
};
|
|
1605
|
-
break;
|
|
1606
|
-
case "InvalidParameterException":
|
|
1607
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
1608
|
-
response = {
|
|
1609
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1610
|
-
name: errorCode,
|
|
1611
|
-
$metadata: deserializeMetadata(output),
|
|
1612
|
-
};
|
|
1613
|
-
break;
|
|
1614
|
-
case "InvalidRequestException":
|
|
1615
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
1616
|
-
response = {
|
|
1617
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1618
|
-
name: errorCode,
|
|
1619
|
-
$metadata: deserializeMetadata(output),
|
|
1620
|
-
};
|
|
1621
|
-
break;
|
|
1622
|
-
case "ResourceNotFoundException":
|
|
1623
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
1624
|
-
response = {
|
|
1625
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1626
|
-
name: errorCode,
|
|
1627
|
-
$metadata: deserializeMetadata(output),
|
|
1628
|
-
};
|
|
1629
|
-
break;
|
|
1630
|
-
default:
|
|
1631
|
-
const parsedBody = parsedOutput.body;
|
|
1632
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1633
|
-
response = {
|
|
1634
|
-
...parsedBody,
|
|
1635
|
-
name: `${errorCode}`,
|
|
1636
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1637
|
-
$fault: "client",
|
|
1638
|
-
$metadata: deserializeMetadata(output),
|
|
1639
|
-
} as any;
|
|
1640
|
-
}
|
|
1641
|
-
const message = response.message || response.Message || errorCode;
|
|
1642
|
-
response.message = message;
|
|
1643
|
-
delete response.Message;
|
|
1644
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1645
|
-
};
|
|
1646
|
-
|
|
1647
|
-
export const deserializeAws_json1_1RotateSecretCommand = async (
|
|
1648
|
-
output: __HttpResponse,
|
|
1649
|
-
context: __SerdeContext
|
|
1650
|
-
): Promise<RotateSecretCommandOutput> => {
|
|
1651
|
-
if (output.statusCode >= 300) {
|
|
1652
|
-
return deserializeAws_json1_1RotateSecretCommandError(output, context);
|
|
1653
|
-
}
|
|
1654
|
-
const data: any = await parseBody(output.body, context);
|
|
1655
|
-
let contents: any = {};
|
|
1656
|
-
contents = deserializeAws_json1_1RotateSecretResponse(data, context);
|
|
1657
|
-
const response: RotateSecretCommandOutput = {
|
|
1658
|
-
$metadata: deserializeMetadata(output),
|
|
1659
|
-
...contents,
|
|
1660
|
-
};
|
|
1661
|
-
return Promise.resolve(response);
|
|
1662
|
-
};
|
|
1663
|
-
|
|
1664
|
-
const deserializeAws_json1_1RotateSecretCommandError = async (
|
|
1665
|
-
output: __HttpResponse,
|
|
1666
|
-
context: __SerdeContext
|
|
1667
|
-
): Promise<RotateSecretCommandOutput> => {
|
|
1668
|
-
const parsedOutput: any = {
|
|
1669
|
-
...output,
|
|
1670
|
-
body: await parseBody(output.body, context),
|
|
1671
|
-
};
|
|
1672
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1673
|
-
let errorCode: string = "UnknownError";
|
|
1674
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1675
|
-
switch (errorCode) {
|
|
1676
|
-
case "InternalServiceError":
|
|
1677
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
1678
|
-
response = {
|
|
1679
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
1680
|
-
name: errorCode,
|
|
1681
|
-
$metadata: deserializeMetadata(output),
|
|
1682
|
-
};
|
|
1683
|
-
break;
|
|
1684
|
-
case "InvalidParameterException":
|
|
1685
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
1686
|
-
response = {
|
|
1687
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1688
|
-
name: errorCode,
|
|
1689
|
-
$metadata: deserializeMetadata(output),
|
|
1690
|
-
};
|
|
1691
|
-
break;
|
|
1692
|
-
case "InvalidRequestException":
|
|
1693
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
1694
|
-
response = {
|
|
1695
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1696
|
-
name: errorCode,
|
|
1697
|
-
$metadata: deserializeMetadata(output),
|
|
1698
|
-
};
|
|
1699
|
-
break;
|
|
1700
|
-
case "ResourceNotFoundException":
|
|
1701
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
1702
|
-
response = {
|
|
1703
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1704
|
-
name: errorCode,
|
|
1705
|
-
$metadata: deserializeMetadata(output),
|
|
1706
|
-
};
|
|
1707
|
-
break;
|
|
1708
|
-
default:
|
|
1709
|
-
const parsedBody = parsedOutput.body;
|
|
1710
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1711
|
-
response = {
|
|
1712
|
-
...parsedBody,
|
|
1713
|
-
name: `${errorCode}`,
|
|
1714
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1715
|
-
$fault: "client",
|
|
1716
|
-
$metadata: deserializeMetadata(output),
|
|
1717
|
-
} as any;
|
|
1718
|
-
}
|
|
1719
|
-
const message = response.message || response.Message || errorCode;
|
|
1720
|
-
response.message = message;
|
|
1721
|
-
delete response.Message;
|
|
1722
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1723
|
-
};
|
|
1724
|
-
|
|
1725
|
-
export const deserializeAws_json1_1StopReplicationToReplicaCommand = async (
|
|
1726
|
-
output: __HttpResponse,
|
|
1727
|
-
context: __SerdeContext
|
|
1728
|
-
): Promise<StopReplicationToReplicaCommandOutput> => {
|
|
1729
|
-
if (output.statusCode >= 300) {
|
|
1730
|
-
return deserializeAws_json1_1StopReplicationToReplicaCommandError(output, context);
|
|
1731
|
-
}
|
|
1732
|
-
const data: any = await parseBody(output.body, context);
|
|
1733
|
-
let contents: any = {};
|
|
1734
|
-
contents = deserializeAws_json1_1StopReplicationToReplicaResponse(data, context);
|
|
1735
|
-
const response: StopReplicationToReplicaCommandOutput = {
|
|
1736
|
-
$metadata: deserializeMetadata(output),
|
|
1737
|
-
...contents,
|
|
1738
|
-
};
|
|
1739
|
-
return Promise.resolve(response);
|
|
1740
|
-
};
|
|
1741
|
-
|
|
1742
|
-
const deserializeAws_json1_1StopReplicationToReplicaCommandError = async (
|
|
1743
|
-
output: __HttpResponse,
|
|
1744
|
-
context: __SerdeContext
|
|
1745
|
-
): Promise<StopReplicationToReplicaCommandOutput> => {
|
|
1746
|
-
const parsedOutput: any = {
|
|
1747
|
-
...output,
|
|
1748
|
-
body: await parseBody(output.body, context),
|
|
1749
|
-
};
|
|
1750
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1751
|
-
let errorCode: string = "UnknownError";
|
|
1752
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1753
|
-
switch (errorCode) {
|
|
1754
|
-
case "InternalServiceError":
|
|
1755
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
1756
|
-
response = {
|
|
1757
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
1758
|
-
name: errorCode,
|
|
1759
|
-
$metadata: deserializeMetadata(output),
|
|
1760
|
-
};
|
|
1761
|
-
break;
|
|
1762
|
-
case "InvalidParameterException":
|
|
1763
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
1764
|
-
response = {
|
|
1765
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1766
|
-
name: errorCode,
|
|
1767
|
-
$metadata: deserializeMetadata(output),
|
|
1768
|
-
};
|
|
1769
|
-
break;
|
|
1770
|
-
case "InvalidRequestException":
|
|
1771
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
1772
|
-
response = {
|
|
1773
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1774
|
-
name: errorCode,
|
|
1775
|
-
$metadata: deserializeMetadata(output),
|
|
1776
|
-
};
|
|
1777
|
-
break;
|
|
1778
|
-
case "ResourceNotFoundException":
|
|
1779
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
1780
|
-
response = {
|
|
1781
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1782
|
-
name: errorCode,
|
|
1783
|
-
$metadata: deserializeMetadata(output),
|
|
1784
|
-
};
|
|
1785
|
-
break;
|
|
1786
|
-
default:
|
|
1787
|
-
const parsedBody = parsedOutput.body;
|
|
1788
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1789
|
-
response = {
|
|
1790
|
-
...parsedBody,
|
|
1791
|
-
name: `${errorCode}`,
|
|
1792
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1793
|
-
$fault: "client",
|
|
1794
|
-
$metadata: deserializeMetadata(output),
|
|
1795
|
-
} as any;
|
|
1796
|
-
}
|
|
1797
|
-
const message = response.message || response.Message || errorCode;
|
|
1798
|
-
response.message = message;
|
|
1799
|
-
delete response.Message;
|
|
1800
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1801
|
-
};
|
|
1802
|
-
|
|
1803
|
-
export const deserializeAws_json1_1TagResourceCommand = async (
|
|
1804
|
-
output: __HttpResponse,
|
|
1805
|
-
context: __SerdeContext
|
|
1806
|
-
): Promise<TagResourceCommandOutput> => {
|
|
1807
|
-
if (output.statusCode >= 300) {
|
|
1808
|
-
return deserializeAws_json1_1TagResourceCommandError(output, context);
|
|
1809
|
-
}
|
|
1810
|
-
await collectBody(output.body, context);
|
|
1811
|
-
const response: TagResourceCommandOutput = {
|
|
1812
|
-
$metadata: deserializeMetadata(output),
|
|
1813
|
-
};
|
|
1814
|
-
return Promise.resolve(response);
|
|
1815
|
-
};
|
|
1816
|
-
|
|
1817
|
-
const deserializeAws_json1_1TagResourceCommandError = async (
|
|
1818
|
-
output: __HttpResponse,
|
|
1819
|
-
context: __SerdeContext
|
|
1820
|
-
): Promise<TagResourceCommandOutput> => {
|
|
1821
|
-
const parsedOutput: any = {
|
|
1822
|
-
...output,
|
|
1823
|
-
body: await parseBody(output.body, context),
|
|
1824
|
-
};
|
|
1825
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1826
|
-
let errorCode: string = "UnknownError";
|
|
1827
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1828
|
-
switch (errorCode) {
|
|
1829
|
-
case "InternalServiceError":
|
|
1830
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
1831
|
-
response = {
|
|
1832
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
1833
|
-
name: errorCode,
|
|
1834
|
-
$metadata: deserializeMetadata(output),
|
|
1835
|
-
};
|
|
1836
|
-
break;
|
|
1837
|
-
case "InvalidParameterException":
|
|
1838
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
1839
|
-
response = {
|
|
1840
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1841
|
-
name: errorCode,
|
|
1842
|
-
$metadata: deserializeMetadata(output),
|
|
1843
|
-
};
|
|
1844
|
-
break;
|
|
1845
|
-
case "InvalidRequestException":
|
|
1846
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
1847
|
-
response = {
|
|
1848
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1849
|
-
name: errorCode,
|
|
1850
|
-
$metadata: deserializeMetadata(output),
|
|
1851
|
-
};
|
|
1852
|
-
break;
|
|
1853
|
-
case "ResourceNotFoundException":
|
|
1854
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
1855
|
-
response = {
|
|
1856
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1857
|
-
name: errorCode,
|
|
1858
|
-
$metadata: deserializeMetadata(output),
|
|
1859
|
-
};
|
|
1860
|
-
break;
|
|
1861
|
-
default:
|
|
1862
|
-
const parsedBody = parsedOutput.body;
|
|
1863
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1864
|
-
response = {
|
|
1865
|
-
...parsedBody,
|
|
1866
|
-
name: `${errorCode}`,
|
|
1867
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1868
|
-
$fault: "client",
|
|
1869
|
-
$metadata: deserializeMetadata(output),
|
|
1870
|
-
} as any;
|
|
1871
|
-
}
|
|
1872
|
-
const message = response.message || response.Message || errorCode;
|
|
1873
|
-
response.message = message;
|
|
1874
|
-
delete response.Message;
|
|
1875
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1876
|
-
};
|
|
1877
|
-
|
|
1878
|
-
export const deserializeAws_json1_1UntagResourceCommand = async (
|
|
1879
|
-
output: __HttpResponse,
|
|
1880
|
-
context: __SerdeContext
|
|
1881
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
1882
|
-
if (output.statusCode >= 300) {
|
|
1883
|
-
return deserializeAws_json1_1UntagResourceCommandError(output, context);
|
|
1884
|
-
}
|
|
1885
|
-
await collectBody(output.body, context);
|
|
1886
|
-
const response: UntagResourceCommandOutput = {
|
|
1887
|
-
$metadata: deserializeMetadata(output),
|
|
1888
|
-
};
|
|
1889
|
-
return Promise.resolve(response);
|
|
1890
|
-
};
|
|
1891
|
-
|
|
1892
|
-
const deserializeAws_json1_1UntagResourceCommandError = async (
|
|
1893
|
-
output: __HttpResponse,
|
|
1894
|
-
context: __SerdeContext
|
|
1895
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
1896
|
-
const parsedOutput: any = {
|
|
1897
|
-
...output,
|
|
1898
|
-
body: await parseBody(output.body, context),
|
|
1899
|
-
};
|
|
1900
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1901
|
-
let errorCode: string = "UnknownError";
|
|
1902
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1903
|
-
switch (errorCode) {
|
|
1904
|
-
case "InternalServiceError":
|
|
1905
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
1906
|
-
response = {
|
|
1907
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
1908
|
-
name: errorCode,
|
|
1909
|
-
$metadata: deserializeMetadata(output),
|
|
1910
|
-
};
|
|
1911
|
-
break;
|
|
1912
|
-
case "InvalidParameterException":
|
|
1913
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
1914
|
-
response = {
|
|
1915
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1916
|
-
name: errorCode,
|
|
1917
|
-
$metadata: deserializeMetadata(output),
|
|
1918
|
-
};
|
|
1919
|
-
break;
|
|
1920
|
-
case "InvalidRequestException":
|
|
1921
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
1922
|
-
response = {
|
|
1923
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1924
|
-
name: errorCode,
|
|
1925
|
-
$metadata: deserializeMetadata(output),
|
|
1926
|
-
};
|
|
1927
|
-
break;
|
|
1928
|
-
case "ResourceNotFoundException":
|
|
1929
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
1930
|
-
response = {
|
|
1931
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1932
|
-
name: errorCode,
|
|
1933
|
-
$metadata: deserializeMetadata(output),
|
|
1934
|
-
};
|
|
1935
|
-
break;
|
|
1936
|
-
default:
|
|
1937
|
-
const parsedBody = parsedOutput.body;
|
|
1938
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1939
|
-
response = {
|
|
1940
|
-
...parsedBody,
|
|
1941
|
-
name: `${errorCode}`,
|
|
1942
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1943
|
-
$fault: "client",
|
|
1944
|
-
$metadata: deserializeMetadata(output),
|
|
1945
|
-
} as any;
|
|
1946
|
-
}
|
|
1947
|
-
const message = response.message || response.Message || errorCode;
|
|
1948
|
-
response.message = message;
|
|
1949
|
-
delete response.Message;
|
|
1950
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1951
|
-
};
|
|
1952
|
-
|
|
1953
|
-
export const deserializeAws_json1_1UpdateSecretCommand = async (
|
|
1954
|
-
output: __HttpResponse,
|
|
1955
|
-
context: __SerdeContext
|
|
1956
|
-
): Promise<UpdateSecretCommandOutput> => {
|
|
1957
|
-
if (output.statusCode >= 300) {
|
|
1958
|
-
return deserializeAws_json1_1UpdateSecretCommandError(output, context);
|
|
1959
|
-
}
|
|
1960
|
-
const data: any = await parseBody(output.body, context);
|
|
1961
|
-
let contents: any = {};
|
|
1962
|
-
contents = deserializeAws_json1_1UpdateSecretResponse(data, context);
|
|
1963
|
-
const response: UpdateSecretCommandOutput = {
|
|
1964
|
-
$metadata: deserializeMetadata(output),
|
|
1965
|
-
...contents,
|
|
1966
|
-
};
|
|
1967
|
-
return Promise.resolve(response);
|
|
1968
|
-
};
|
|
1969
|
-
|
|
1970
|
-
const deserializeAws_json1_1UpdateSecretCommandError = async (
|
|
1971
|
-
output: __HttpResponse,
|
|
1972
|
-
context: __SerdeContext
|
|
1973
|
-
): Promise<UpdateSecretCommandOutput> => {
|
|
1974
|
-
const parsedOutput: any = {
|
|
1975
|
-
...output,
|
|
1976
|
-
body: await parseBody(output.body, context),
|
|
1977
|
-
};
|
|
1978
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1979
|
-
let errorCode: string = "UnknownError";
|
|
1980
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1981
|
-
switch (errorCode) {
|
|
1982
|
-
case "EncryptionFailure":
|
|
1983
|
-
case "com.amazonaws.secretsmanager#EncryptionFailure":
|
|
1984
|
-
response = {
|
|
1985
|
-
...(await deserializeAws_json1_1EncryptionFailureResponse(parsedOutput, context)),
|
|
1986
|
-
name: errorCode,
|
|
1987
|
-
$metadata: deserializeMetadata(output),
|
|
1988
|
-
};
|
|
1989
|
-
break;
|
|
1990
|
-
case "InternalServiceError":
|
|
1991
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
1992
|
-
response = {
|
|
1993
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
1994
|
-
name: errorCode,
|
|
1995
|
-
$metadata: deserializeMetadata(output),
|
|
1996
|
-
};
|
|
1997
|
-
break;
|
|
1998
|
-
case "InvalidParameterException":
|
|
1999
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
2000
|
-
response = {
|
|
2001
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2002
|
-
name: errorCode,
|
|
2003
|
-
$metadata: deserializeMetadata(output),
|
|
2004
|
-
};
|
|
2005
|
-
break;
|
|
2006
|
-
case "InvalidRequestException":
|
|
2007
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
2008
|
-
response = {
|
|
2009
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2010
|
-
name: errorCode,
|
|
2011
|
-
$metadata: deserializeMetadata(output),
|
|
2012
|
-
};
|
|
2013
|
-
break;
|
|
2014
|
-
case "LimitExceededException":
|
|
2015
|
-
case "com.amazonaws.secretsmanager#LimitExceededException":
|
|
2016
|
-
response = {
|
|
2017
|
-
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
2018
|
-
name: errorCode,
|
|
2019
|
-
$metadata: deserializeMetadata(output),
|
|
2020
|
-
};
|
|
2021
|
-
break;
|
|
2022
|
-
case "MalformedPolicyDocumentException":
|
|
2023
|
-
case "com.amazonaws.secretsmanager#MalformedPolicyDocumentException":
|
|
2024
|
-
response = {
|
|
2025
|
-
...(await deserializeAws_json1_1MalformedPolicyDocumentExceptionResponse(parsedOutput, context)),
|
|
2026
|
-
name: errorCode,
|
|
2027
|
-
$metadata: deserializeMetadata(output),
|
|
2028
|
-
};
|
|
2029
|
-
break;
|
|
2030
|
-
case "PreconditionNotMetException":
|
|
2031
|
-
case "com.amazonaws.secretsmanager#PreconditionNotMetException":
|
|
2032
|
-
response = {
|
|
2033
|
-
...(await deserializeAws_json1_1PreconditionNotMetExceptionResponse(parsedOutput, context)),
|
|
2034
|
-
name: errorCode,
|
|
2035
|
-
$metadata: deserializeMetadata(output),
|
|
2036
|
-
};
|
|
2037
|
-
break;
|
|
2038
|
-
case "ResourceExistsException":
|
|
2039
|
-
case "com.amazonaws.secretsmanager#ResourceExistsException":
|
|
2040
|
-
response = {
|
|
2041
|
-
...(await deserializeAws_json1_1ResourceExistsExceptionResponse(parsedOutput, context)),
|
|
2042
|
-
name: errorCode,
|
|
2043
|
-
$metadata: deserializeMetadata(output),
|
|
2044
|
-
};
|
|
2045
|
-
break;
|
|
2046
|
-
case "ResourceNotFoundException":
|
|
2047
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
2048
|
-
response = {
|
|
2049
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2050
|
-
name: errorCode,
|
|
2051
|
-
$metadata: deserializeMetadata(output),
|
|
2052
|
-
};
|
|
2053
|
-
break;
|
|
2054
|
-
default:
|
|
2055
|
-
const parsedBody = parsedOutput.body;
|
|
2056
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2057
|
-
response = {
|
|
2058
|
-
...parsedBody,
|
|
2059
|
-
name: `${errorCode}`,
|
|
2060
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2061
|
-
$fault: "client",
|
|
2062
|
-
$metadata: deserializeMetadata(output),
|
|
2063
|
-
} as any;
|
|
2064
|
-
}
|
|
2065
|
-
const message = response.message || response.Message || errorCode;
|
|
2066
|
-
response.message = message;
|
|
2067
|
-
delete response.Message;
|
|
2068
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2069
|
-
};
|
|
2070
|
-
|
|
2071
|
-
export const deserializeAws_json1_1UpdateSecretVersionStageCommand = async (
|
|
2072
|
-
output: __HttpResponse,
|
|
2073
|
-
context: __SerdeContext
|
|
2074
|
-
): Promise<UpdateSecretVersionStageCommandOutput> => {
|
|
2075
|
-
if (output.statusCode >= 300) {
|
|
2076
|
-
return deserializeAws_json1_1UpdateSecretVersionStageCommandError(output, context);
|
|
2077
|
-
}
|
|
2078
|
-
const data: any = await parseBody(output.body, context);
|
|
2079
|
-
let contents: any = {};
|
|
2080
|
-
contents = deserializeAws_json1_1UpdateSecretVersionStageResponse(data, context);
|
|
2081
|
-
const response: UpdateSecretVersionStageCommandOutput = {
|
|
2082
|
-
$metadata: deserializeMetadata(output),
|
|
2083
|
-
...contents,
|
|
2084
|
-
};
|
|
2085
|
-
return Promise.resolve(response);
|
|
2086
|
-
};
|
|
2087
|
-
|
|
2088
|
-
const deserializeAws_json1_1UpdateSecretVersionStageCommandError = async (
|
|
2089
|
-
output: __HttpResponse,
|
|
2090
|
-
context: __SerdeContext
|
|
2091
|
-
): Promise<UpdateSecretVersionStageCommandOutput> => {
|
|
2092
|
-
const parsedOutput: any = {
|
|
2093
|
-
...output,
|
|
2094
|
-
body: await parseBody(output.body, context),
|
|
2095
|
-
};
|
|
2096
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2097
|
-
let errorCode: string = "UnknownError";
|
|
2098
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2099
|
-
switch (errorCode) {
|
|
2100
|
-
case "InternalServiceError":
|
|
2101
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
2102
|
-
response = {
|
|
2103
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
2104
|
-
name: errorCode,
|
|
2105
|
-
$metadata: deserializeMetadata(output),
|
|
2106
|
-
};
|
|
2107
|
-
break;
|
|
2108
|
-
case "InvalidParameterException":
|
|
2109
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
2110
|
-
response = {
|
|
2111
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2112
|
-
name: errorCode,
|
|
2113
|
-
$metadata: deserializeMetadata(output),
|
|
2114
|
-
};
|
|
2115
|
-
break;
|
|
2116
|
-
case "InvalidRequestException":
|
|
2117
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
2118
|
-
response = {
|
|
2119
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2120
|
-
name: errorCode,
|
|
2121
|
-
$metadata: deserializeMetadata(output),
|
|
2122
|
-
};
|
|
2123
|
-
break;
|
|
2124
|
-
case "LimitExceededException":
|
|
2125
|
-
case "com.amazonaws.secretsmanager#LimitExceededException":
|
|
2126
|
-
response = {
|
|
2127
|
-
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
2128
|
-
name: errorCode,
|
|
2129
|
-
$metadata: deserializeMetadata(output),
|
|
2130
|
-
};
|
|
2131
|
-
break;
|
|
2132
|
-
case "ResourceNotFoundException":
|
|
2133
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
2134
|
-
response = {
|
|
2135
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2136
|
-
name: errorCode,
|
|
2137
|
-
$metadata: deserializeMetadata(output),
|
|
2138
|
-
};
|
|
2139
|
-
break;
|
|
2140
|
-
default:
|
|
2141
|
-
const parsedBody = parsedOutput.body;
|
|
2142
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2143
|
-
response = {
|
|
2144
|
-
...parsedBody,
|
|
2145
|
-
name: `${errorCode}`,
|
|
2146
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2147
|
-
$fault: "client",
|
|
2148
|
-
$metadata: deserializeMetadata(output),
|
|
2149
|
-
} as any;
|
|
2150
|
-
}
|
|
2151
|
-
const message = response.message || response.Message || errorCode;
|
|
2152
|
-
response.message = message;
|
|
2153
|
-
delete response.Message;
|
|
2154
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2155
|
-
};
|
|
2156
|
-
|
|
2157
|
-
export const deserializeAws_json1_1ValidateResourcePolicyCommand = async (
|
|
2158
|
-
output: __HttpResponse,
|
|
2159
|
-
context: __SerdeContext
|
|
2160
|
-
): Promise<ValidateResourcePolicyCommandOutput> => {
|
|
2161
|
-
if (output.statusCode >= 300) {
|
|
2162
|
-
return deserializeAws_json1_1ValidateResourcePolicyCommandError(output, context);
|
|
2163
|
-
}
|
|
2164
|
-
const data: any = await parseBody(output.body, context);
|
|
2165
|
-
let contents: any = {};
|
|
2166
|
-
contents = deserializeAws_json1_1ValidateResourcePolicyResponse(data, context);
|
|
2167
|
-
const response: ValidateResourcePolicyCommandOutput = {
|
|
2168
|
-
$metadata: deserializeMetadata(output),
|
|
2169
|
-
...contents,
|
|
2170
|
-
};
|
|
2171
|
-
return Promise.resolve(response);
|
|
2172
|
-
};
|
|
2173
|
-
|
|
2174
|
-
const deserializeAws_json1_1ValidateResourcePolicyCommandError = async (
|
|
2175
|
-
output: __HttpResponse,
|
|
2176
|
-
context: __SerdeContext
|
|
2177
|
-
): Promise<ValidateResourcePolicyCommandOutput> => {
|
|
2178
|
-
const parsedOutput: any = {
|
|
2179
|
-
...output,
|
|
2180
|
-
body: await parseBody(output.body, context),
|
|
2181
|
-
};
|
|
2182
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2183
|
-
let errorCode: string = "UnknownError";
|
|
2184
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2185
|
-
switch (errorCode) {
|
|
2186
|
-
case "InternalServiceError":
|
|
2187
|
-
case "com.amazonaws.secretsmanager#InternalServiceError":
|
|
2188
|
-
response = {
|
|
2189
|
-
...(await deserializeAws_json1_1InternalServiceErrorResponse(parsedOutput, context)),
|
|
2190
|
-
name: errorCode,
|
|
2191
|
-
$metadata: deserializeMetadata(output),
|
|
2192
|
-
};
|
|
2193
|
-
break;
|
|
2194
|
-
case "InvalidParameterException":
|
|
2195
|
-
case "com.amazonaws.secretsmanager#InvalidParameterException":
|
|
2196
|
-
response = {
|
|
2197
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2198
|
-
name: errorCode,
|
|
2199
|
-
$metadata: deserializeMetadata(output),
|
|
2200
|
-
};
|
|
2201
|
-
break;
|
|
2202
|
-
case "InvalidRequestException":
|
|
2203
|
-
case "com.amazonaws.secretsmanager#InvalidRequestException":
|
|
2204
|
-
response = {
|
|
2205
|
-
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2206
|
-
name: errorCode,
|
|
2207
|
-
$metadata: deserializeMetadata(output),
|
|
2208
|
-
};
|
|
2209
|
-
break;
|
|
2210
|
-
case "MalformedPolicyDocumentException":
|
|
2211
|
-
case "com.amazonaws.secretsmanager#MalformedPolicyDocumentException":
|
|
2212
|
-
response = {
|
|
2213
|
-
...(await deserializeAws_json1_1MalformedPolicyDocumentExceptionResponse(parsedOutput, context)),
|
|
2214
|
-
name: errorCode,
|
|
2215
|
-
$metadata: deserializeMetadata(output),
|
|
2216
|
-
};
|
|
2217
|
-
break;
|
|
2218
|
-
case "ResourceNotFoundException":
|
|
2219
|
-
case "com.amazonaws.secretsmanager#ResourceNotFoundException":
|
|
2220
|
-
response = {
|
|
2221
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2222
|
-
name: errorCode,
|
|
2223
|
-
$metadata: deserializeMetadata(output),
|
|
2224
|
-
};
|
|
2225
|
-
break;
|
|
2226
|
-
default:
|
|
2227
|
-
const parsedBody = parsedOutput.body;
|
|
2228
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2229
|
-
response = {
|
|
2230
|
-
...parsedBody,
|
|
2231
|
-
name: `${errorCode}`,
|
|
2232
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2233
|
-
$fault: "client",
|
|
2234
|
-
$metadata: deserializeMetadata(output),
|
|
2235
|
-
} as any;
|
|
2236
|
-
}
|
|
2237
|
-
const message = response.message || response.Message || errorCode;
|
|
2238
|
-
response.message = message;
|
|
2239
|
-
delete response.Message;
|
|
2240
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2241
|
-
};
|
|
2242
|
-
|
|
2243
|
-
const deserializeAws_json1_1DecryptionFailureResponse = async (
|
|
2244
|
-
parsedOutput: any,
|
|
2245
|
-
context: __SerdeContext
|
|
2246
|
-
): Promise<DecryptionFailure> => {
|
|
2247
|
-
const body = parsedOutput.body;
|
|
2248
|
-
const deserialized: any = deserializeAws_json1_1DecryptionFailure(body, context);
|
|
2249
|
-
const contents: DecryptionFailure = {
|
|
2250
|
-
name: "DecryptionFailure",
|
|
2251
|
-
$fault: "client",
|
|
2252
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2253
|
-
...deserialized,
|
|
2254
|
-
};
|
|
2255
|
-
return contents;
|
|
2256
|
-
};
|
|
2257
|
-
|
|
2258
|
-
const deserializeAws_json1_1EncryptionFailureResponse = async (
|
|
2259
|
-
parsedOutput: any,
|
|
2260
|
-
context: __SerdeContext
|
|
2261
|
-
): Promise<EncryptionFailure> => {
|
|
2262
|
-
const body = parsedOutput.body;
|
|
2263
|
-
const deserialized: any = deserializeAws_json1_1EncryptionFailure(body, context);
|
|
2264
|
-
const contents: EncryptionFailure = {
|
|
2265
|
-
name: "EncryptionFailure",
|
|
2266
|
-
$fault: "client",
|
|
2267
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2268
|
-
...deserialized,
|
|
2269
|
-
};
|
|
2270
|
-
return contents;
|
|
2271
|
-
};
|
|
2272
|
-
|
|
2273
|
-
const deserializeAws_json1_1InternalServiceErrorResponse = async (
|
|
2274
|
-
parsedOutput: any,
|
|
2275
|
-
context: __SerdeContext
|
|
2276
|
-
): Promise<InternalServiceError> => {
|
|
2277
|
-
const body = parsedOutput.body;
|
|
2278
|
-
const deserialized: any = deserializeAws_json1_1InternalServiceError(body, context);
|
|
2279
|
-
const contents: InternalServiceError = {
|
|
2280
|
-
name: "InternalServiceError",
|
|
2281
|
-
$fault: "server",
|
|
2282
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2283
|
-
...deserialized,
|
|
2284
|
-
};
|
|
2285
|
-
return contents;
|
|
2286
|
-
};
|
|
2287
|
-
|
|
2288
|
-
const deserializeAws_json1_1InvalidNextTokenExceptionResponse = async (
|
|
2289
|
-
parsedOutput: any,
|
|
2290
|
-
context: __SerdeContext
|
|
2291
|
-
): Promise<InvalidNextTokenException> => {
|
|
2292
|
-
const body = parsedOutput.body;
|
|
2293
|
-
const deserialized: any = deserializeAws_json1_1InvalidNextTokenException(body, context);
|
|
2294
|
-
const contents: InvalidNextTokenException = {
|
|
2295
|
-
name: "InvalidNextTokenException",
|
|
2296
|
-
$fault: "client",
|
|
2297
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2298
|
-
...deserialized,
|
|
2299
|
-
};
|
|
2300
|
-
return contents;
|
|
2301
|
-
};
|
|
2302
|
-
|
|
2303
|
-
const deserializeAws_json1_1InvalidParameterExceptionResponse = async (
|
|
2304
|
-
parsedOutput: any,
|
|
2305
|
-
context: __SerdeContext
|
|
2306
|
-
): Promise<InvalidParameterException> => {
|
|
2307
|
-
const body = parsedOutput.body;
|
|
2308
|
-
const deserialized: any = deserializeAws_json1_1InvalidParameterException(body, context);
|
|
2309
|
-
const contents: InvalidParameterException = {
|
|
2310
|
-
name: "InvalidParameterException",
|
|
2311
|
-
$fault: "client",
|
|
2312
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2313
|
-
...deserialized,
|
|
2314
|
-
};
|
|
2315
|
-
return contents;
|
|
2316
|
-
};
|
|
2317
|
-
|
|
2318
|
-
const deserializeAws_json1_1InvalidRequestExceptionResponse = async (
|
|
2319
|
-
parsedOutput: any,
|
|
2320
|
-
context: __SerdeContext
|
|
2321
|
-
): Promise<InvalidRequestException> => {
|
|
2322
|
-
const body = parsedOutput.body;
|
|
2323
|
-
const deserialized: any = deserializeAws_json1_1InvalidRequestException(body, context);
|
|
2324
|
-
const contents: InvalidRequestException = {
|
|
2325
|
-
name: "InvalidRequestException",
|
|
2326
|
-
$fault: "client",
|
|
2327
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2328
|
-
...deserialized,
|
|
2329
|
-
};
|
|
2330
|
-
return contents;
|
|
2331
|
-
};
|
|
2332
|
-
|
|
2333
|
-
const deserializeAws_json1_1LimitExceededExceptionResponse = async (
|
|
2334
|
-
parsedOutput: any,
|
|
2335
|
-
context: __SerdeContext
|
|
2336
|
-
): Promise<LimitExceededException> => {
|
|
2337
|
-
const body = parsedOutput.body;
|
|
2338
|
-
const deserialized: any = deserializeAws_json1_1LimitExceededException(body, context);
|
|
2339
|
-
const contents: LimitExceededException = {
|
|
2340
|
-
name: "LimitExceededException",
|
|
2341
|
-
$fault: "client",
|
|
2342
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2343
|
-
...deserialized,
|
|
2344
|
-
};
|
|
2345
|
-
return contents;
|
|
2346
|
-
};
|
|
2347
|
-
|
|
2348
|
-
const deserializeAws_json1_1MalformedPolicyDocumentExceptionResponse = async (
|
|
2349
|
-
parsedOutput: any,
|
|
2350
|
-
context: __SerdeContext
|
|
2351
|
-
): Promise<MalformedPolicyDocumentException> => {
|
|
2352
|
-
const body = parsedOutput.body;
|
|
2353
|
-
const deserialized: any = deserializeAws_json1_1MalformedPolicyDocumentException(body, context);
|
|
2354
|
-
const contents: MalformedPolicyDocumentException = {
|
|
2355
|
-
name: "MalformedPolicyDocumentException",
|
|
2356
|
-
$fault: "client",
|
|
2357
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2358
|
-
...deserialized,
|
|
2359
|
-
};
|
|
2360
|
-
return contents;
|
|
2361
|
-
};
|
|
2362
|
-
|
|
2363
|
-
const deserializeAws_json1_1PreconditionNotMetExceptionResponse = async (
|
|
2364
|
-
parsedOutput: any,
|
|
2365
|
-
context: __SerdeContext
|
|
2366
|
-
): Promise<PreconditionNotMetException> => {
|
|
2367
|
-
const body = parsedOutput.body;
|
|
2368
|
-
const deserialized: any = deserializeAws_json1_1PreconditionNotMetException(body, context);
|
|
2369
|
-
const contents: PreconditionNotMetException = {
|
|
2370
|
-
name: "PreconditionNotMetException",
|
|
2371
|
-
$fault: "client",
|
|
2372
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2373
|
-
...deserialized,
|
|
2374
|
-
};
|
|
2375
|
-
return contents;
|
|
2376
|
-
};
|
|
2377
|
-
|
|
2378
|
-
const deserializeAws_json1_1PublicPolicyExceptionResponse = async (
|
|
2379
|
-
parsedOutput: any,
|
|
2380
|
-
context: __SerdeContext
|
|
2381
|
-
): Promise<PublicPolicyException> => {
|
|
2382
|
-
const body = parsedOutput.body;
|
|
2383
|
-
const deserialized: any = deserializeAws_json1_1PublicPolicyException(body, context);
|
|
2384
|
-
const contents: PublicPolicyException = {
|
|
2385
|
-
name: "PublicPolicyException",
|
|
2386
|
-
$fault: "client",
|
|
2387
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2388
|
-
...deserialized,
|
|
2389
|
-
};
|
|
2390
|
-
return contents;
|
|
2391
|
-
};
|
|
2392
|
-
|
|
2393
|
-
const deserializeAws_json1_1ResourceExistsExceptionResponse = async (
|
|
2394
|
-
parsedOutput: any,
|
|
2395
|
-
context: __SerdeContext
|
|
2396
|
-
): Promise<ResourceExistsException> => {
|
|
2397
|
-
const body = parsedOutput.body;
|
|
2398
|
-
const deserialized: any = deserializeAws_json1_1ResourceExistsException(body, context);
|
|
2399
|
-
const contents: ResourceExistsException = {
|
|
2400
|
-
name: "ResourceExistsException",
|
|
2401
|
-
$fault: "client",
|
|
2402
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2403
|
-
...deserialized,
|
|
2404
|
-
};
|
|
2405
|
-
return contents;
|
|
2406
|
-
};
|
|
2407
|
-
|
|
2408
|
-
const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (
|
|
2409
|
-
parsedOutput: any,
|
|
2410
|
-
context: __SerdeContext
|
|
2411
|
-
): Promise<ResourceNotFoundException> => {
|
|
2412
|
-
const body = parsedOutput.body;
|
|
2413
|
-
const deserialized: any = deserializeAws_json1_1ResourceNotFoundException(body, context);
|
|
2414
|
-
const contents: ResourceNotFoundException = {
|
|
2415
|
-
name: "ResourceNotFoundException",
|
|
2416
|
-
$fault: "client",
|
|
2417
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2418
|
-
...deserialized,
|
|
2419
|
-
};
|
|
2420
|
-
return contents;
|
|
2421
|
-
};
|
|
2422
|
-
|
|
2423
|
-
const serializeAws_json1_1AddReplicaRegionListType = (input: ReplicaRegionType[], context: __SerdeContext): any => {
|
|
2424
|
-
return input
|
|
2425
|
-
.filter((e: any) => e != null)
|
|
2426
|
-
.map((entry) => {
|
|
2427
|
-
if (entry === null) {
|
|
2428
|
-
return null as any;
|
|
2429
|
-
}
|
|
2430
|
-
return serializeAws_json1_1ReplicaRegionType(entry, context);
|
|
2431
|
-
});
|
|
2432
|
-
};
|
|
2433
|
-
|
|
2434
|
-
const serializeAws_json1_1CancelRotateSecretRequest = (
|
|
2435
|
-
input: CancelRotateSecretRequest,
|
|
2436
|
-
context: __SerdeContext
|
|
2437
|
-
): any => {
|
|
2438
|
-
return {
|
|
2439
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2440
|
-
};
|
|
2441
|
-
};
|
|
2442
|
-
|
|
2443
|
-
const serializeAws_json1_1CreateSecretRequest = (input: CreateSecretRequest, context: __SerdeContext): any => {
|
|
2444
|
-
return {
|
|
2445
|
-
...(input.AddReplicaRegions !== undefined &&
|
|
2446
|
-
input.AddReplicaRegions !== null && {
|
|
2447
|
-
AddReplicaRegions: serializeAws_json1_1AddReplicaRegionListType(input.AddReplicaRegions, context),
|
|
2448
|
-
}),
|
|
2449
|
-
ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
|
|
2450
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
2451
|
-
...(input.ForceOverwriteReplicaSecret !== undefined &&
|
|
2452
|
-
input.ForceOverwriteReplicaSecret !== null && { ForceOverwriteReplicaSecret: input.ForceOverwriteReplicaSecret }),
|
|
2453
|
-
...(input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId }),
|
|
2454
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
2455
|
-
...(input.SecretBinary !== undefined &&
|
|
2456
|
-
input.SecretBinary !== null && { SecretBinary: context.base64Encoder(input.SecretBinary) }),
|
|
2457
|
-
...(input.SecretString !== undefined && input.SecretString !== null && { SecretString: input.SecretString }),
|
|
2458
|
-
...(input.Tags !== undefined &&
|
|
2459
|
-
input.Tags !== null && { Tags: serializeAws_json1_1TagListType(input.Tags, context) }),
|
|
2460
|
-
};
|
|
2461
|
-
};
|
|
2462
|
-
|
|
2463
|
-
const serializeAws_json1_1DeleteResourcePolicyRequest = (
|
|
2464
|
-
input: DeleteResourcePolicyRequest,
|
|
2465
|
-
context: __SerdeContext
|
|
2466
|
-
): any => {
|
|
2467
|
-
return {
|
|
2468
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2469
|
-
};
|
|
2470
|
-
};
|
|
2471
|
-
|
|
2472
|
-
const serializeAws_json1_1DeleteSecretRequest = (input: DeleteSecretRequest, context: __SerdeContext): any => {
|
|
2473
|
-
return {
|
|
2474
|
-
...(input.ForceDeleteWithoutRecovery !== undefined &&
|
|
2475
|
-
input.ForceDeleteWithoutRecovery !== null && { ForceDeleteWithoutRecovery: input.ForceDeleteWithoutRecovery }),
|
|
2476
|
-
...(input.RecoveryWindowInDays !== undefined &&
|
|
2477
|
-
input.RecoveryWindowInDays !== null && { RecoveryWindowInDays: input.RecoveryWindowInDays }),
|
|
2478
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2479
|
-
};
|
|
2480
|
-
};
|
|
2481
|
-
|
|
2482
|
-
const serializeAws_json1_1DescribeSecretRequest = (input: DescribeSecretRequest, context: __SerdeContext): any => {
|
|
2483
|
-
return {
|
|
2484
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2485
|
-
};
|
|
2486
|
-
};
|
|
2487
|
-
|
|
2488
|
-
const serializeAws_json1_1Filter = (input: Filter, context: __SerdeContext): any => {
|
|
2489
|
-
return {
|
|
2490
|
-
...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
|
|
2491
|
-
...(input.Values !== undefined &&
|
|
2492
|
-
input.Values !== null && { Values: serializeAws_json1_1FilterValuesStringList(input.Values, context) }),
|
|
2493
|
-
};
|
|
2494
|
-
};
|
|
2495
|
-
|
|
2496
|
-
const serializeAws_json1_1FiltersListType = (input: Filter[], context: __SerdeContext): any => {
|
|
2497
|
-
return input
|
|
2498
|
-
.filter((e: any) => e != null)
|
|
2499
|
-
.map((entry) => {
|
|
2500
|
-
if (entry === null) {
|
|
2501
|
-
return null as any;
|
|
2502
|
-
}
|
|
2503
|
-
return serializeAws_json1_1Filter(entry, context);
|
|
2504
|
-
});
|
|
2505
|
-
};
|
|
2506
|
-
|
|
2507
|
-
const serializeAws_json1_1FilterValuesStringList = (input: string[], context: __SerdeContext): any => {
|
|
2508
|
-
return input
|
|
2509
|
-
.filter((e: any) => e != null)
|
|
2510
|
-
.map((entry) => {
|
|
2511
|
-
if (entry === null) {
|
|
2512
|
-
return null as any;
|
|
2513
|
-
}
|
|
2514
|
-
return entry;
|
|
2515
|
-
});
|
|
2516
|
-
};
|
|
2517
|
-
|
|
2518
|
-
const serializeAws_json1_1GetRandomPasswordRequest = (
|
|
2519
|
-
input: GetRandomPasswordRequest,
|
|
2520
|
-
context: __SerdeContext
|
|
2521
|
-
): any => {
|
|
2522
|
-
return {
|
|
2523
|
-
...(input.ExcludeCharacters !== undefined &&
|
|
2524
|
-
input.ExcludeCharacters !== null && { ExcludeCharacters: input.ExcludeCharacters }),
|
|
2525
|
-
...(input.ExcludeLowercase !== undefined &&
|
|
2526
|
-
input.ExcludeLowercase !== null && { ExcludeLowercase: input.ExcludeLowercase }),
|
|
2527
|
-
...(input.ExcludeNumbers !== undefined &&
|
|
2528
|
-
input.ExcludeNumbers !== null && { ExcludeNumbers: input.ExcludeNumbers }),
|
|
2529
|
-
...(input.ExcludePunctuation !== undefined &&
|
|
2530
|
-
input.ExcludePunctuation !== null && { ExcludePunctuation: input.ExcludePunctuation }),
|
|
2531
|
-
...(input.ExcludeUppercase !== undefined &&
|
|
2532
|
-
input.ExcludeUppercase !== null && { ExcludeUppercase: input.ExcludeUppercase }),
|
|
2533
|
-
...(input.IncludeSpace !== undefined && input.IncludeSpace !== null && { IncludeSpace: input.IncludeSpace }),
|
|
2534
|
-
...(input.PasswordLength !== undefined &&
|
|
2535
|
-
input.PasswordLength !== null && { PasswordLength: input.PasswordLength }),
|
|
2536
|
-
...(input.RequireEachIncludedType !== undefined &&
|
|
2537
|
-
input.RequireEachIncludedType !== null && { RequireEachIncludedType: input.RequireEachIncludedType }),
|
|
2538
|
-
};
|
|
2539
|
-
};
|
|
2540
|
-
|
|
2541
|
-
const serializeAws_json1_1GetResourcePolicyRequest = (
|
|
2542
|
-
input: GetResourcePolicyRequest,
|
|
2543
|
-
context: __SerdeContext
|
|
2544
|
-
): any => {
|
|
2545
|
-
return {
|
|
2546
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2547
|
-
};
|
|
2548
|
-
};
|
|
2549
|
-
|
|
2550
|
-
const serializeAws_json1_1GetSecretValueRequest = (input: GetSecretValueRequest, context: __SerdeContext): any => {
|
|
2551
|
-
return {
|
|
2552
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2553
|
-
...(input.VersionId !== undefined && input.VersionId !== null && { VersionId: input.VersionId }),
|
|
2554
|
-
...(input.VersionStage !== undefined && input.VersionStage !== null && { VersionStage: input.VersionStage }),
|
|
2555
|
-
};
|
|
2556
|
-
};
|
|
2557
|
-
|
|
2558
|
-
const serializeAws_json1_1ListSecretsRequest = (input: ListSecretsRequest, context: __SerdeContext): any => {
|
|
2559
|
-
return {
|
|
2560
|
-
...(input.Filters !== undefined &&
|
|
2561
|
-
input.Filters !== null && { Filters: serializeAws_json1_1FiltersListType(input.Filters, context) }),
|
|
2562
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
2563
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
2564
|
-
...(input.SortOrder !== undefined && input.SortOrder !== null && { SortOrder: input.SortOrder }),
|
|
2565
|
-
};
|
|
2566
|
-
};
|
|
2567
|
-
|
|
2568
|
-
const serializeAws_json1_1ListSecretVersionIdsRequest = (
|
|
2569
|
-
input: ListSecretVersionIdsRequest,
|
|
2570
|
-
context: __SerdeContext
|
|
2571
|
-
): any => {
|
|
2572
|
-
return {
|
|
2573
|
-
...(input.IncludeDeprecated !== undefined &&
|
|
2574
|
-
input.IncludeDeprecated !== null && { IncludeDeprecated: input.IncludeDeprecated }),
|
|
2575
|
-
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
2576
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
2577
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2578
|
-
};
|
|
2579
|
-
};
|
|
2580
|
-
|
|
2581
|
-
const serializeAws_json1_1PutResourcePolicyRequest = (
|
|
2582
|
-
input: PutResourcePolicyRequest,
|
|
2583
|
-
context: __SerdeContext
|
|
2584
|
-
): any => {
|
|
2585
|
-
return {
|
|
2586
|
-
...(input.BlockPublicPolicy !== undefined &&
|
|
2587
|
-
input.BlockPublicPolicy !== null && { BlockPublicPolicy: input.BlockPublicPolicy }),
|
|
2588
|
-
...(input.ResourcePolicy !== undefined &&
|
|
2589
|
-
input.ResourcePolicy !== null && { ResourcePolicy: input.ResourcePolicy }),
|
|
2590
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2591
|
-
};
|
|
2592
|
-
};
|
|
2593
|
-
|
|
2594
|
-
const serializeAws_json1_1PutSecretValueRequest = (input: PutSecretValueRequest, context: __SerdeContext): any => {
|
|
2595
|
-
return {
|
|
2596
|
-
ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
|
|
2597
|
-
...(input.SecretBinary !== undefined &&
|
|
2598
|
-
input.SecretBinary !== null && { SecretBinary: context.base64Encoder(input.SecretBinary) }),
|
|
2599
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2600
|
-
...(input.SecretString !== undefined && input.SecretString !== null && { SecretString: input.SecretString }),
|
|
2601
|
-
...(input.VersionStages !== undefined &&
|
|
2602
|
-
input.VersionStages !== null && {
|
|
2603
|
-
VersionStages: serializeAws_json1_1SecretVersionStagesType(input.VersionStages, context),
|
|
2604
|
-
}),
|
|
2605
|
-
};
|
|
2606
|
-
};
|
|
2607
|
-
|
|
2608
|
-
const serializeAws_json1_1RemoveRegionsFromReplicationRequest = (
|
|
2609
|
-
input: RemoveRegionsFromReplicationRequest,
|
|
2610
|
-
context: __SerdeContext
|
|
2611
|
-
): any => {
|
|
2612
|
-
return {
|
|
2613
|
-
...(input.RemoveReplicaRegions !== undefined &&
|
|
2614
|
-
input.RemoveReplicaRegions !== null && {
|
|
2615
|
-
RemoveReplicaRegions: serializeAws_json1_1RemoveReplicaRegionListType(input.RemoveReplicaRegions, context),
|
|
2616
|
-
}),
|
|
2617
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2618
|
-
};
|
|
2619
|
-
};
|
|
2620
|
-
|
|
2621
|
-
const serializeAws_json1_1RemoveReplicaRegionListType = (input: string[], context: __SerdeContext): any => {
|
|
2622
|
-
return input
|
|
2623
|
-
.filter((e: any) => e != null)
|
|
2624
|
-
.map((entry) => {
|
|
2625
|
-
if (entry === null) {
|
|
2626
|
-
return null as any;
|
|
2627
|
-
}
|
|
2628
|
-
return entry;
|
|
2629
|
-
});
|
|
2630
|
-
};
|
|
2631
|
-
|
|
2632
|
-
const serializeAws_json1_1ReplicaRegionType = (input: ReplicaRegionType, context: __SerdeContext): any => {
|
|
2633
|
-
return {
|
|
2634
|
-
...(input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId }),
|
|
2635
|
-
...(input.Region !== undefined && input.Region !== null && { Region: input.Region }),
|
|
2636
|
-
};
|
|
2637
|
-
};
|
|
2638
|
-
|
|
2639
|
-
const serializeAws_json1_1ReplicateSecretToRegionsRequest = (
|
|
2640
|
-
input: ReplicateSecretToRegionsRequest,
|
|
2641
|
-
context: __SerdeContext
|
|
2642
|
-
): any => {
|
|
2643
|
-
return {
|
|
2644
|
-
...(input.AddReplicaRegions !== undefined &&
|
|
2645
|
-
input.AddReplicaRegions !== null && {
|
|
2646
|
-
AddReplicaRegions: serializeAws_json1_1AddReplicaRegionListType(input.AddReplicaRegions, context),
|
|
2647
|
-
}),
|
|
2648
|
-
...(input.ForceOverwriteReplicaSecret !== undefined &&
|
|
2649
|
-
input.ForceOverwriteReplicaSecret !== null && { ForceOverwriteReplicaSecret: input.ForceOverwriteReplicaSecret }),
|
|
2650
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2651
|
-
};
|
|
2652
|
-
};
|
|
2653
|
-
|
|
2654
|
-
const serializeAws_json1_1RestoreSecretRequest = (input: RestoreSecretRequest, context: __SerdeContext): any => {
|
|
2655
|
-
return {
|
|
2656
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2657
|
-
};
|
|
2658
|
-
};
|
|
2659
|
-
|
|
2660
|
-
const serializeAws_json1_1RotateSecretRequest = (input: RotateSecretRequest, context: __SerdeContext): any => {
|
|
2661
|
-
return {
|
|
2662
|
-
ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
|
|
2663
|
-
...(input.RotationLambdaARN !== undefined &&
|
|
2664
|
-
input.RotationLambdaARN !== null && { RotationLambdaARN: input.RotationLambdaARN }),
|
|
2665
|
-
...(input.RotationRules !== undefined &&
|
|
2666
|
-
input.RotationRules !== null && {
|
|
2667
|
-
RotationRules: serializeAws_json1_1RotationRulesType(input.RotationRules, context),
|
|
2668
|
-
}),
|
|
2669
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2670
|
-
};
|
|
2671
|
-
};
|
|
2672
|
-
|
|
2673
|
-
const serializeAws_json1_1RotationRulesType = (input: RotationRulesType, context: __SerdeContext): any => {
|
|
2674
|
-
return {
|
|
2675
|
-
...(input.AutomaticallyAfterDays !== undefined &&
|
|
2676
|
-
input.AutomaticallyAfterDays !== null && { AutomaticallyAfterDays: input.AutomaticallyAfterDays }),
|
|
2677
|
-
};
|
|
2678
|
-
};
|
|
2679
|
-
|
|
2680
|
-
const serializeAws_json1_1SecretVersionStagesType = (input: string[], context: __SerdeContext): any => {
|
|
2681
|
-
return input
|
|
2682
|
-
.filter((e: any) => e != null)
|
|
2683
|
-
.map((entry) => {
|
|
2684
|
-
if (entry === null) {
|
|
2685
|
-
return null as any;
|
|
2686
|
-
}
|
|
2687
|
-
return entry;
|
|
2688
|
-
});
|
|
2689
|
-
};
|
|
2690
|
-
|
|
2691
|
-
const serializeAws_json1_1StopReplicationToReplicaRequest = (
|
|
2692
|
-
input: StopReplicationToReplicaRequest,
|
|
2693
|
-
context: __SerdeContext
|
|
2694
|
-
): any => {
|
|
2695
|
-
return {
|
|
2696
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2697
|
-
};
|
|
2698
|
-
};
|
|
2699
|
-
|
|
2700
|
-
const serializeAws_json1_1Tag = (input: Tag, context: __SerdeContext): any => {
|
|
2701
|
-
return {
|
|
2702
|
-
...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
|
|
2703
|
-
...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
|
|
2704
|
-
};
|
|
2705
|
-
};
|
|
2706
|
-
|
|
2707
|
-
const serializeAws_json1_1TagKeyListType = (input: string[], context: __SerdeContext): any => {
|
|
2708
|
-
return input
|
|
2709
|
-
.filter((e: any) => e != null)
|
|
2710
|
-
.map((entry) => {
|
|
2711
|
-
if (entry === null) {
|
|
2712
|
-
return null as any;
|
|
2713
|
-
}
|
|
2714
|
-
return entry;
|
|
2715
|
-
});
|
|
2716
|
-
};
|
|
2717
|
-
|
|
2718
|
-
const serializeAws_json1_1TagListType = (input: Tag[], context: __SerdeContext): any => {
|
|
2719
|
-
return input
|
|
2720
|
-
.filter((e: any) => e != null)
|
|
2721
|
-
.map((entry) => {
|
|
2722
|
-
if (entry === null) {
|
|
2723
|
-
return null as any;
|
|
2724
|
-
}
|
|
2725
|
-
return serializeAws_json1_1Tag(entry, context);
|
|
2726
|
-
});
|
|
2727
|
-
};
|
|
2728
|
-
|
|
2729
|
-
const serializeAws_json1_1TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => {
|
|
2730
|
-
return {
|
|
2731
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2732
|
-
...(input.Tags !== undefined &&
|
|
2733
|
-
input.Tags !== null && { Tags: serializeAws_json1_1TagListType(input.Tags, context) }),
|
|
2734
|
-
};
|
|
2735
|
-
};
|
|
2736
|
-
|
|
2737
|
-
const serializeAws_json1_1UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => {
|
|
2738
|
-
return {
|
|
2739
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2740
|
-
...(input.TagKeys !== undefined &&
|
|
2741
|
-
input.TagKeys !== null && { TagKeys: serializeAws_json1_1TagKeyListType(input.TagKeys, context) }),
|
|
2742
|
-
};
|
|
2743
|
-
};
|
|
2744
|
-
|
|
2745
|
-
const serializeAws_json1_1UpdateSecretRequest = (input: UpdateSecretRequest, context: __SerdeContext): any => {
|
|
2746
|
-
return {
|
|
2747
|
-
ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
|
|
2748
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
2749
|
-
...(input.KmsKeyId !== undefined && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId }),
|
|
2750
|
-
...(input.SecretBinary !== undefined &&
|
|
2751
|
-
input.SecretBinary !== null && { SecretBinary: context.base64Encoder(input.SecretBinary) }),
|
|
2752
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2753
|
-
...(input.SecretString !== undefined && input.SecretString !== null && { SecretString: input.SecretString }),
|
|
2754
|
-
};
|
|
2755
|
-
};
|
|
2756
|
-
|
|
2757
|
-
const serializeAws_json1_1UpdateSecretVersionStageRequest = (
|
|
2758
|
-
input: UpdateSecretVersionStageRequest,
|
|
2759
|
-
context: __SerdeContext
|
|
2760
|
-
): any => {
|
|
2761
|
-
return {
|
|
2762
|
-
...(input.MoveToVersionId !== undefined &&
|
|
2763
|
-
input.MoveToVersionId !== null && { MoveToVersionId: input.MoveToVersionId }),
|
|
2764
|
-
...(input.RemoveFromVersionId !== undefined &&
|
|
2765
|
-
input.RemoveFromVersionId !== null && { RemoveFromVersionId: input.RemoveFromVersionId }),
|
|
2766
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2767
|
-
...(input.VersionStage !== undefined && input.VersionStage !== null && { VersionStage: input.VersionStage }),
|
|
2768
|
-
};
|
|
2769
|
-
};
|
|
2770
|
-
|
|
2771
|
-
const serializeAws_json1_1ValidateResourcePolicyRequest = (
|
|
2772
|
-
input: ValidateResourcePolicyRequest,
|
|
2773
|
-
context: __SerdeContext
|
|
2774
|
-
): any => {
|
|
2775
|
-
return {
|
|
2776
|
-
...(input.ResourcePolicy !== undefined &&
|
|
2777
|
-
input.ResourcePolicy !== null && { ResourcePolicy: input.ResourcePolicy }),
|
|
2778
|
-
...(input.SecretId !== undefined && input.SecretId !== null && { SecretId: input.SecretId }),
|
|
2779
|
-
};
|
|
2780
|
-
};
|
|
2781
|
-
|
|
2782
|
-
const deserializeAws_json1_1CancelRotateSecretResponse = (
|
|
2783
|
-
output: any,
|
|
2784
|
-
context: __SerdeContext
|
|
2785
|
-
): CancelRotateSecretResponse => {
|
|
2786
|
-
return {
|
|
2787
|
-
ARN: __expectString(output.ARN),
|
|
2788
|
-
Name: __expectString(output.Name),
|
|
2789
|
-
VersionId: __expectString(output.VersionId),
|
|
2790
|
-
} as any;
|
|
2791
|
-
};
|
|
2792
|
-
|
|
2793
|
-
const deserializeAws_json1_1CreateSecretResponse = (output: any, context: __SerdeContext): CreateSecretResponse => {
|
|
2794
|
-
return {
|
|
2795
|
-
ARN: __expectString(output.ARN),
|
|
2796
|
-
Name: __expectString(output.Name),
|
|
2797
|
-
ReplicationStatus:
|
|
2798
|
-
output.ReplicationStatus !== undefined && output.ReplicationStatus !== null
|
|
2799
|
-
? deserializeAws_json1_1ReplicationStatusListType(output.ReplicationStatus, context)
|
|
2800
|
-
: undefined,
|
|
2801
|
-
VersionId: __expectString(output.VersionId),
|
|
2802
|
-
} as any;
|
|
2803
|
-
};
|
|
2804
|
-
|
|
2805
|
-
const deserializeAws_json1_1DecryptionFailure = (output: any, context: __SerdeContext): DecryptionFailure => {
|
|
2806
|
-
return {
|
|
2807
|
-
Message: __expectString(output.Message),
|
|
2808
|
-
} as any;
|
|
2809
|
-
};
|
|
2810
|
-
|
|
2811
|
-
const deserializeAws_json1_1DeleteResourcePolicyResponse = (
|
|
2812
|
-
output: any,
|
|
2813
|
-
context: __SerdeContext
|
|
2814
|
-
): DeleteResourcePolicyResponse => {
|
|
2815
|
-
return {
|
|
2816
|
-
ARN: __expectString(output.ARN),
|
|
2817
|
-
Name: __expectString(output.Name),
|
|
2818
|
-
} as any;
|
|
2819
|
-
};
|
|
2820
|
-
|
|
2821
|
-
const deserializeAws_json1_1DeleteSecretResponse = (output: any, context: __SerdeContext): DeleteSecretResponse => {
|
|
2822
|
-
return {
|
|
2823
|
-
ARN: __expectString(output.ARN),
|
|
2824
|
-
DeletionDate:
|
|
2825
|
-
output.DeletionDate !== undefined && output.DeletionDate !== null
|
|
2826
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeletionDate)))
|
|
2827
|
-
: undefined,
|
|
2828
|
-
Name: __expectString(output.Name),
|
|
2829
|
-
} as any;
|
|
2830
|
-
};
|
|
2831
|
-
|
|
2832
|
-
const deserializeAws_json1_1DescribeSecretResponse = (output: any, context: __SerdeContext): DescribeSecretResponse => {
|
|
2833
|
-
return {
|
|
2834
|
-
ARN: __expectString(output.ARN),
|
|
2835
|
-
CreatedDate:
|
|
2836
|
-
output.CreatedDate !== undefined && output.CreatedDate !== null
|
|
2837
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate)))
|
|
2838
|
-
: undefined,
|
|
2839
|
-
DeletedDate:
|
|
2840
|
-
output.DeletedDate !== undefined && output.DeletedDate !== null
|
|
2841
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeletedDate)))
|
|
2842
|
-
: undefined,
|
|
2843
|
-
Description: __expectString(output.Description),
|
|
2844
|
-
KmsKeyId: __expectString(output.KmsKeyId),
|
|
2845
|
-
LastAccessedDate:
|
|
2846
|
-
output.LastAccessedDate !== undefined && output.LastAccessedDate !== null
|
|
2847
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessedDate)))
|
|
2848
|
-
: undefined,
|
|
2849
|
-
LastChangedDate:
|
|
2850
|
-
output.LastChangedDate !== undefined && output.LastChangedDate !== null
|
|
2851
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastChangedDate)))
|
|
2852
|
-
: undefined,
|
|
2853
|
-
LastRotatedDate:
|
|
2854
|
-
output.LastRotatedDate !== undefined && output.LastRotatedDate !== null
|
|
2855
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastRotatedDate)))
|
|
2856
|
-
: undefined,
|
|
2857
|
-
Name: __expectString(output.Name),
|
|
2858
|
-
OwningService: __expectString(output.OwningService),
|
|
2859
|
-
PrimaryRegion: __expectString(output.PrimaryRegion),
|
|
2860
|
-
ReplicationStatus:
|
|
2861
|
-
output.ReplicationStatus !== undefined && output.ReplicationStatus !== null
|
|
2862
|
-
? deserializeAws_json1_1ReplicationStatusListType(output.ReplicationStatus, context)
|
|
2863
|
-
: undefined,
|
|
2864
|
-
RotationEnabled: __expectBoolean(output.RotationEnabled),
|
|
2865
|
-
RotationLambdaARN: __expectString(output.RotationLambdaARN),
|
|
2866
|
-
RotationRules:
|
|
2867
|
-
output.RotationRules !== undefined && output.RotationRules !== null
|
|
2868
|
-
? deserializeAws_json1_1RotationRulesType(output.RotationRules, context)
|
|
2869
|
-
: undefined,
|
|
2870
|
-
Tags:
|
|
2871
|
-
output.Tags !== undefined && output.Tags !== null
|
|
2872
|
-
? deserializeAws_json1_1TagListType(output.Tags, context)
|
|
2873
|
-
: undefined,
|
|
2874
|
-
VersionIdsToStages:
|
|
2875
|
-
output.VersionIdsToStages !== undefined && output.VersionIdsToStages !== null
|
|
2876
|
-
? deserializeAws_json1_1SecretVersionsToStagesMapType(output.VersionIdsToStages, context)
|
|
2877
|
-
: undefined,
|
|
2878
|
-
} as any;
|
|
2879
|
-
};
|
|
2880
|
-
|
|
2881
|
-
const deserializeAws_json1_1EncryptionFailure = (output: any, context: __SerdeContext): EncryptionFailure => {
|
|
2882
|
-
return {
|
|
2883
|
-
Message: __expectString(output.Message),
|
|
2884
|
-
} as any;
|
|
2885
|
-
};
|
|
2886
|
-
|
|
2887
|
-
const deserializeAws_json1_1GetRandomPasswordResponse = (
|
|
2888
|
-
output: any,
|
|
2889
|
-
context: __SerdeContext
|
|
2890
|
-
): GetRandomPasswordResponse => {
|
|
2891
|
-
return {
|
|
2892
|
-
RandomPassword: __expectString(output.RandomPassword),
|
|
2893
|
-
} as any;
|
|
2894
|
-
};
|
|
2895
|
-
|
|
2896
|
-
const deserializeAws_json1_1GetResourcePolicyResponse = (
|
|
2897
|
-
output: any,
|
|
2898
|
-
context: __SerdeContext
|
|
2899
|
-
): GetResourcePolicyResponse => {
|
|
2900
|
-
return {
|
|
2901
|
-
ARN: __expectString(output.ARN),
|
|
2902
|
-
Name: __expectString(output.Name),
|
|
2903
|
-
ResourcePolicy: __expectString(output.ResourcePolicy),
|
|
2904
|
-
} as any;
|
|
2905
|
-
};
|
|
2906
|
-
|
|
2907
|
-
const deserializeAws_json1_1GetSecretValueResponse = (output: any, context: __SerdeContext): GetSecretValueResponse => {
|
|
2908
|
-
return {
|
|
2909
|
-
ARN: __expectString(output.ARN),
|
|
2910
|
-
CreatedDate:
|
|
2911
|
-
output.CreatedDate !== undefined && output.CreatedDate !== null
|
|
2912
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate)))
|
|
2913
|
-
: undefined,
|
|
2914
|
-
Name: __expectString(output.Name),
|
|
2915
|
-
SecretBinary:
|
|
2916
|
-
output.SecretBinary !== undefined && output.SecretBinary !== null
|
|
2917
|
-
? context.base64Decoder(output.SecretBinary)
|
|
2918
|
-
: undefined,
|
|
2919
|
-
SecretString: __expectString(output.SecretString),
|
|
2920
|
-
VersionId: __expectString(output.VersionId),
|
|
2921
|
-
VersionStages:
|
|
2922
|
-
output.VersionStages !== undefined && output.VersionStages !== null
|
|
2923
|
-
? deserializeAws_json1_1SecretVersionStagesType(output.VersionStages, context)
|
|
2924
|
-
: undefined,
|
|
2925
|
-
} as any;
|
|
2926
|
-
};
|
|
2927
|
-
|
|
2928
|
-
const deserializeAws_json1_1InternalServiceError = (output: any, context: __SerdeContext): InternalServiceError => {
|
|
2929
|
-
return {
|
|
2930
|
-
Message: __expectString(output.Message),
|
|
2931
|
-
} as any;
|
|
2932
|
-
};
|
|
2933
|
-
|
|
2934
|
-
const deserializeAws_json1_1InvalidNextTokenException = (
|
|
2935
|
-
output: any,
|
|
2936
|
-
context: __SerdeContext
|
|
2937
|
-
): InvalidNextTokenException => {
|
|
2938
|
-
return {
|
|
2939
|
-
Message: __expectString(output.Message),
|
|
2940
|
-
} as any;
|
|
2941
|
-
};
|
|
2942
|
-
|
|
2943
|
-
const deserializeAws_json1_1InvalidParameterException = (
|
|
2944
|
-
output: any,
|
|
2945
|
-
context: __SerdeContext
|
|
2946
|
-
): InvalidParameterException => {
|
|
2947
|
-
return {
|
|
2948
|
-
Message: __expectString(output.Message),
|
|
2949
|
-
} as any;
|
|
2950
|
-
};
|
|
2951
|
-
|
|
2952
|
-
const deserializeAws_json1_1InvalidRequestException = (
|
|
2953
|
-
output: any,
|
|
2954
|
-
context: __SerdeContext
|
|
2955
|
-
): InvalidRequestException => {
|
|
2956
|
-
return {
|
|
2957
|
-
Message: __expectString(output.Message),
|
|
2958
|
-
} as any;
|
|
2959
|
-
};
|
|
2960
|
-
|
|
2961
|
-
const deserializeAws_json1_1KmsKeyIdListType = (output: any, context: __SerdeContext): string[] => {
|
|
2962
|
-
return (output || [])
|
|
2963
|
-
.filter((e: any) => e != null)
|
|
2964
|
-
.map((entry: any) => {
|
|
2965
|
-
if (entry === null) {
|
|
2966
|
-
return null as any;
|
|
2967
|
-
}
|
|
2968
|
-
return __expectString(entry) as any;
|
|
2969
|
-
});
|
|
2970
|
-
};
|
|
2971
|
-
|
|
2972
|
-
const deserializeAws_json1_1LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => {
|
|
2973
|
-
return {
|
|
2974
|
-
Message: __expectString(output.Message),
|
|
2975
|
-
} as any;
|
|
2976
|
-
};
|
|
2977
|
-
|
|
2978
|
-
const deserializeAws_json1_1ListSecretsResponse = (output: any, context: __SerdeContext): ListSecretsResponse => {
|
|
2979
|
-
return {
|
|
2980
|
-
NextToken: __expectString(output.NextToken),
|
|
2981
|
-
SecretList:
|
|
2982
|
-
output.SecretList !== undefined && output.SecretList !== null
|
|
2983
|
-
? deserializeAws_json1_1SecretListType(output.SecretList, context)
|
|
2984
|
-
: undefined,
|
|
2985
|
-
} as any;
|
|
2986
|
-
};
|
|
2987
|
-
|
|
2988
|
-
const deserializeAws_json1_1ListSecretVersionIdsResponse = (
|
|
2989
|
-
output: any,
|
|
2990
|
-
context: __SerdeContext
|
|
2991
|
-
): ListSecretVersionIdsResponse => {
|
|
2992
|
-
return {
|
|
2993
|
-
ARN: __expectString(output.ARN),
|
|
2994
|
-
Name: __expectString(output.Name),
|
|
2995
|
-
NextToken: __expectString(output.NextToken),
|
|
2996
|
-
Versions:
|
|
2997
|
-
output.Versions !== undefined && output.Versions !== null
|
|
2998
|
-
? deserializeAws_json1_1SecretVersionsListType(output.Versions, context)
|
|
2999
|
-
: undefined,
|
|
3000
|
-
} as any;
|
|
3001
|
-
};
|
|
3002
|
-
|
|
3003
|
-
const deserializeAws_json1_1MalformedPolicyDocumentException = (
|
|
3004
|
-
output: any,
|
|
3005
|
-
context: __SerdeContext
|
|
3006
|
-
): MalformedPolicyDocumentException => {
|
|
3007
|
-
return {
|
|
3008
|
-
Message: __expectString(output.Message),
|
|
3009
|
-
} as any;
|
|
3010
|
-
};
|
|
3011
|
-
|
|
3012
|
-
const deserializeAws_json1_1PreconditionNotMetException = (
|
|
3013
|
-
output: any,
|
|
3014
|
-
context: __SerdeContext
|
|
3015
|
-
): PreconditionNotMetException => {
|
|
3016
|
-
return {
|
|
3017
|
-
Message: __expectString(output.Message),
|
|
3018
|
-
} as any;
|
|
3019
|
-
};
|
|
3020
|
-
|
|
3021
|
-
const deserializeAws_json1_1PublicPolicyException = (output: any, context: __SerdeContext): PublicPolicyException => {
|
|
3022
|
-
return {
|
|
3023
|
-
Message: __expectString(output.Message),
|
|
3024
|
-
} as any;
|
|
3025
|
-
};
|
|
3026
|
-
|
|
3027
|
-
const deserializeAws_json1_1PutResourcePolicyResponse = (
|
|
3028
|
-
output: any,
|
|
3029
|
-
context: __SerdeContext
|
|
3030
|
-
): PutResourcePolicyResponse => {
|
|
3031
|
-
return {
|
|
3032
|
-
ARN: __expectString(output.ARN),
|
|
3033
|
-
Name: __expectString(output.Name),
|
|
3034
|
-
} as any;
|
|
3035
|
-
};
|
|
3036
|
-
|
|
3037
|
-
const deserializeAws_json1_1PutSecretValueResponse = (output: any, context: __SerdeContext): PutSecretValueResponse => {
|
|
3038
|
-
return {
|
|
3039
|
-
ARN: __expectString(output.ARN),
|
|
3040
|
-
Name: __expectString(output.Name),
|
|
3041
|
-
VersionId: __expectString(output.VersionId),
|
|
3042
|
-
VersionStages:
|
|
3043
|
-
output.VersionStages !== undefined && output.VersionStages !== null
|
|
3044
|
-
? deserializeAws_json1_1SecretVersionStagesType(output.VersionStages, context)
|
|
3045
|
-
: undefined,
|
|
3046
|
-
} as any;
|
|
3047
|
-
};
|
|
3048
|
-
|
|
3049
|
-
const deserializeAws_json1_1RemoveRegionsFromReplicationResponse = (
|
|
3050
|
-
output: any,
|
|
3051
|
-
context: __SerdeContext
|
|
3052
|
-
): RemoveRegionsFromReplicationResponse => {
|
|
3053
|
-
return {
|
|
3054
|
-
ARN: __expectString(output.ARN),
|
|
3055
|
-
ReplicationStatus:
|
|
3056
|
-
output.ReplicationStatus !== undefined && output.ReplicationStatus !== null
|
|
3057
|
-
? deserializeAws_json1_1ReplicationStatusListType(output.ReplicationStatus, context)
|
|
3058
|
-
: undefined,
|
|
3059
|
-
} as any;
|
|
3060
|
-
};
|
|
3061
|
-
|
|
3062
|
-
const deserializeAws_json1_1ReplicateSecretToRegionsResponse = (
|
|
3063
|
-
output: any,
|
|
3064
|
-
context: __SerdeContext
|
|
3065
|
-
): ReplicateSecretToRegionsResponse => {
|
|
3066
|
-
return {
|
|
3067
|
-
ARN: __expectString(output.ARN),
|
|
3068
|
-
ReplicationStatus:
|
|
3069
|
-
output.ReplicationStatus !== undefined && output.ReplicationStatus !== null
|
|
3070
|
-
? deserializeAws_json1_1ReplicationStatusListType(output.ReplicationStatus, context)
|
|
3071
|
-
: undefined,
|
|
3072
|
-
} as any;
|
|
3073
|
-
};
|
|
3074
|
-
|
|
3075
|
-
const deserializeAws_json1_1ReplicationStatusListType = (
|
|
3076
|
-
output: any,
|
|
3077
|
-
context: __SerdeContext
|
|
3078
|
-
): ReplicationStatusType[] => {
|
|
3079
|
-
return (output || [])
|
|
3080
|
-
.filter((e: any) => e != null)
|
|
3081
|
-
.map((entry: any) => {
|
|
3082
|
-
if (entry === null) {
|
|
3083
|
-
return null as any;
|
|
3084
|
-
}
|
|
3085
|
-
return deserializeAws_json1_1ReplicationStatusType(entry, context);
|
|
3086
|
-
});
|
|
3087
|
-
};
|
|
3088
|
-
|
|
3089
|
-
const deserializeAws_json1_1ReplicationStatusType = (output: any, context: __SerdeContext): ReplicationStatusType => {
|
|
3090
|
-
return {
|
|
3091
|
-
KmsKeyId: __expectString(output.KmsKeyId),
|
|
3092
|
-
LastAccessedDate:
|
|
3093
|
-
output.LastAccessedDate !== undefined && output.LastAccessedDate !== null
|
|
3094
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessedDate)))
|
|
3095
|
-
: undefined,
|
|
3096
|
-
Region: __expectString(output.Region),
|
|
3097
|
-
Status: __expectString(output.Status),
|
|
3098
|
-
StatusMessage: __expectString(output.StatusMessage),
|
|
3099
|
-
} as any;
|
|
3100
|
-
};
|
|
3101
|
-
|
|
3102
|
-
const deserializeAws_json1_1ResourceExistsException = (
|
|
3103
|
-
output: any,
|
|
3104
|
-
context: __SerdeContext
|
|
3105
|
-
): ResourceExistsException => {
|
|
3106
|
-
return {
|
|
3107
|
-
Message: __expectString(output.Message),
|
|
3108
|
-
} as any;
|
|
3109
|
-
};
|
|
3110
|
-
|
|
3111
|
-
const deserializeAws_json1_1ResourceNotFoundException = (
|
|
3112
|
-
output: any,
|
|
3113
|
-
context: __SerdeContext
|
|
3114
|
-
): ResourceNotFoundException => {
|
|
3115
|
-
return {
|
|
3116
|
-
Message: __expectString(output.Message),
|
|
3117
|
-
} as any;
|
|
3118
|
-
};
|
|
3119
|
-
|
|
3120
|
-
const deserializeAws_json1_1RestoreSecretResponse = (output: any, context: __SerdeContext): RestoreSecretResponse => {
|
|
3121
|
-
return {
|
|
3122
|
-
ARN: __expectString(output.ARN),
|
|
3123
|
-
Name: __expectString(output.Name),
|
|
3124
|
-
} as any;
|
|
3125
|
-
};
|
|
3126
|
-
|
|
3127
|
-
const deserializeAws_json1_1RotateSecretResponse = (output: any, context: __SerdeContext): RotateSecretResponse => {
|
|
3128
|
-
return {
|
|
3129
|
-
ARN: __expectString(output.ARN),
|
|
3130
|
-
Name: __expectString(output.Name),
|
|
3131
|
-
VersionId: __expectString(output.VersionId),
|
|
3132
|
-
} as any;
|
|
3133
|
-
};
|
|
3134
|
-
|
|
3135
|
-
const deserializeAws_json1_1RotationRulesType = (output: any, context: __SerdeContext): RotationRulesType => {
|
|
3136
|
-
return {
|
|
3137
|
-
AutomaticallyAfterDays: __expectLong(output.AutomaticallyAfterDays),
|
|
3138
|
-
} as any;
|
|
3139
|
-
};
|
|
3140
|
-
|
|
3141
|
-
const deserializeAws_json1_1SecretListEntry = (output: any, context: __SerdeContext): SecretListEntry => {
|
|
3142
|
-
return {
|
|
3143
|
-
ARN: __expectString(output.ARN),
|
|
3144
|
-
CreatedDate:
|
|
3145
|
-
output.CreatedDate !== undefined && output.CreatedDate !== null
|
|
3146
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate)))
|
|
3147
|
-
: undefined,
|
|
3148
|
-
DeletedDate:
|
|
3149
|
-
output.DeletedDate !== undefined && output.DeletedDate !== null
|
|
3150
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeletedDate)))
|
|
3151
|
-
: undefined,
|
|
3152
|
-
Description: __expectString(output.Description),
|
|
3153
|
-
KmsKeyId: __expectString(output.KmsKeyId),
|
|
3154
|
-
LastAccessedDate:
|
|
3155
|
-
output.LastAccessedDate !== undefined && output.LastAccessedDate !== null
|
|
3156
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessedDate)))
|
|
3157
|
-
: undefined,
|
|
3158
|
-
LastChangedDate:
|
|
3159
|
-
output.LastChangedDate !== undefined && output.LastChangedDate !== null
|
|
3160
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastChangedDate)))
|
|
3161
|
-
: undefined,
|
|
3162
|
-
LastRotatedDate:
|
|
3163
|
-
output.LastRotatedDate !== undefined && output.LastRotatedDate !== null
|
|
3164
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastRotatedDate)))
|
|
3165
|
-
: undefined,
|
|
3166
|
-
Name: __expectString(output.Name),
|
|
3167
|
-
OwningService: __expectString(output.OwningService),
|
|
3168
|
-
PrimaryRegion: __expectString(output.PrimaryRegion),
|
|
3169
|
-
RotationEnabled: __expectBoolean(output.RotationEnabled),
|
|
3170
|
-
RotationLambdaARN: __expectString(output.RotationLambdaARN),
|
|
3171
|
-
RotationRules:
|
|
3172
|
-
output.RotationRules !== undefined && output.RotationRules !== null
|
|
3173
|
-
? deserializeAws_json1_1RotationRulesType(output.RotationRules, context)
|
|
3174
|
-
: undefined,
|
|
3175
|
-
SecretVersionsToStages:
|
|
3176
|
-
output.SecretVersionsToStages !== undefined && output.SecretVersionsToStages !== null
|
|
3177
|
-
? deserializeAws_json1_1SecretVersionsToStagesMapType(output.SecretVersionsToStages, context)
|
|
3178
|
-
: undefined,
|
|
3179
|
-
Tags:
|
|
3180
|
-
output.Tags !== undefined && output.Tags !== null
|
|
3181
|
-
? deserializeAws_json1_1TagListType(output.Tags, context)
|
|
3182
|
-
: undefined,
|
|
3183
|
-
} as any;
|
|
3184
|
-
};
|
|
3185
|
-
|
|
3186
|
-
const deserializeAws_json1_1SecretListType = (output: any, context: __SerdeContext): SecretListEntry[] => {
|
|
3187
|
-
return (output || [])
|
|
3188
|
-
.filter((e: any) => e != null)
|
|
3189
|
-
.map((entry: any) => {
|
|
3190
|
-
if (entry === null) {
|
|
3191
|
-
return null as any;
|
|
3192
|
-
}
|
|
3193
|
-
return deserializeAws_json1_1SecretListEntry(entry, context);
|
|
3194
|
-
});
|
|
3195
|
-
};
|
|
3196
|
-
|
|
3197
|
-
const deserializeAws_json1_1SecretVersionsListEntry = (
|
|
3198
|
-
output: any,
|
|
3199
|
-
context: __SerdeContext
|
|
3200
|
-
): SecretVersionsListEntry => {
|
|
3201
|
-
return {
|
|
3202
|
-
CreatedDate:
|
|
3203
|
-
output.CreatedDate !== undefined && output.CreatedDate !== null
|
|
3204
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate)))
|
|
3205
|
-
: undefined,
|
|
3206
|
-
KmsKeyIds:
|
|
3207
|
-
output.KmsKeyIds !== undefined && output.KmsKeyIds !== null
|
|
3208
|
-
? deserializeAws_json1_1KmsKeyIdListType(output.KmsKeyIds, context)
|
|
3209
|
-
: undefined,
|
|
3210
|
-
LastAccessedDate:
|
|
3211
|
-
output.LastAccessedDate !== undefined && output.LastAccessedDate !== null
|
|
3212
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessedDate)))
|
|
3213
|
-
: undefined,
|
|
3214
|
-
VersionId: __expectString(output.VersionId),
|
|
3215
|
-
VersionStages:
|
|
3216
|
-
output.VersionStages !== undefined && output.VersionStages !== null
|
|
3217
|
-
? deserializeAws_json1_1SecretVersionStagesType(output.VersionStages, context)
|
|
3218
|
-
: undefined,
|
|
3219
|
-
} as any;
|
|
3220
|
-
};
|
|
3221
|
-
|
|
3222
|
-
const deserializeAws_json1_1SecretVersionsListType = (
|
|
3223
|
-
output: any,
|
|
3224
|
-
context: __SerdeContext
|
|
3225
|
-
): SecretVersionsListEntry[] => {
|
|
3226
|
-
return (output || [])
|
|
3227
|
-
.filter((e: any) => e != null)
|
|
3228
|
-
.map((entry: any) => {
|
|
3229
|
-
if (entry === null) {
|
|
3230
|
-
return null as any;
|
|
3231
|
-
}
|
|
3232
|
-
return deserializeAws_json1_1SecretVersionsListEntry(entry, context);
|
|
3233
|
-
});
|
|
3234
|
-
};
|
|
3235
|
-
|
|
3236
|
-
const deserializeAws_json1_1SecretVersionStagesType = (output: any, context: __SerdeContext): string[] => {
|
|
3237
|
-
return (output || [])
|
|
3238
|
-
.filter((e: any) => e != null)
|
|
3239
|
-
.map((entry: any) => {
|
|
3240
|
-
if (entry === null) {
|
|
3241
|
-
return null as any;
|
|
3242
|
-
}
|
|
3243
|
-
return __expectString(entry) as any;
|
|
3244
|
-
});
|
|
3245
|
-
};
|
|
3246
|
-
|
|
3247
|
-
const deserializeAws_json1_1SecretVersionsToStagesMapType = (
|
|
3248
|
-
output: any,
|
|
3249
|
-
context: __SerdeContext
|
|
3250
|
-
): { [key: string]: string[] } => {
|
|
3251
|
-
return Object.entries(output).reduce((acc: { [key: string]: string[] }, [key, value]: [string, any]) => {
|
|
3252
|
-
if (value === null) {
|
|
3253
|
-
return acc;
|
|
3254
|
-
}
|
|
3255
|
-
return {
|
|
3256
|
-
...acc,
|
|
3257
|
-
[key]: deserializeAws_json1_1SecretVersionStagesType(value, context),
|
|
3258
|
-
};
|
|
3259
|
-
}, {});
|
|
3260
|
-
};
|
|
3261
|
-
|
|
3262
|
-
const deserializeAws_json1_1StopReplicationToReplicaResponse = (
|
|
3263
|
-
output: any,
|
|
3264
|
-
context: __SerdeContext
|
|
3265
|
-
): StopReplicationToReplicaResponse => {
|
|
3266
|
-
return {
|
|
3267
|
-
ARN: __expectString(output.ARN),
|
|
3268
|
-
} as any;
|
|
3269
|
-
};
|
|
3270
|
-
|
|
3271
|
-
const deserializeAws_json1_1Tag = (output: any, context: __SerdeContext): Tag => {
|
|
3272
|
-
return {
|
|
3273
|
-
Key: __expectString(output.Key),
|
|
3274
|
-
Value: __expectString(output.Value),
|
|
3275
|
-
} as any;
|
|
3276
|
-
};
|
|
3277
|
-
|
|
3278
|
-
const deserializeAws_json1_1TagListType = (output: any, context: __SerdeContext): Tag[] => {
|
|
3279
|
-
return (output || [])
|
|
3280
|
-
.filter((e: any) => e != null)
|
|
3281
|
-
.map((entry: any) => {
|
|
3282
|
-
if (entry === null) {
|
|
3283
|
-
return null as any;
|
|
3284
|
-
}
|
|
3285
|
-
return deserializeAws_json1_1Tag(entry, context);
|
|
3286
|
-
});
|
|
3287
|
-
};
|
|
3288
|
-
|
|
3289
|
-
const deserializeAws_json1_1UpdateSecretResponse = (output: any, context: __SerdeContext): UpdateSecretResponse => {
|
|
3290
|
-
return {
|
|
3291
|
-
ARN: __expectString(output.ARN),
|
|
3292
|
-
Name: __expectString(output.Name),
|
|
3293
|
-
VersionId: __expectString(output.VersionId),
|
|
3294
|
-
} as any;
|
|
3295
|
-
};
|
|
3296
|
-
|
|
3297
|
-
const deserializeAws_json1_1UpdateSecretVersionStageResponse = (
|
|
3298
|
-
output: any,
|
|
3299
|
-
context: __SerdeContext
|
|
3300
|
-
): UpdateSecretVersionStageResponse => {
|
|
3301
|
-
return {
|
|
3302
|
-
ARN: __expectString(output.ARN),
|
|
3303
|
-
Name: __expectString(output.Name),
|
|
3304
|
-
} as any;
|
|
3305
|
-
};
|
|
3306
|
-
|
|
3307
|
-
const deserializeAws_json1_1ValidateResourcePolicyResponse = (
|
|
3308
|
-
output: any,
|
|
3309
|
-
context: __SerdeContext
|
|
3310
|
-
): ValidateResourcePolicyResponse => {
|
|
3311
|
-
return {
|
|
3312
|
-
PolicyValidationPassed: __expectBoolean(output.PolicyValidationPassed),
|
|
3313
|
-
ValidationErrors:
|
|
3314
|
-
output.ValidationErrors !== undefined && output.ValidationErrors !== null
|
|
3315
|
-
? deserializeAws_json1_1ValidationErrorsType(output.ValidationErrors, context)
|
|
3316
|
-
: undefined,
|
|
3317
|
-
} as any;
|
|
3318
|
-
};
|
|
3319
|
-
|
|
3320
|
-
const deserializeAws_json1_1ValidationErrorsEntry = (output: any, context: __SerdeContext): ValidationErrorsEntry => {
|
|
3321
|
-
return {
|
|
3322
|
-
CheckName: __expectString(output.CheckName),
|
|
3323
|
-
ErrorMessage: __expectString(output.ErrorMessage),
|
|
3324
|
-
} as any;
|
|
3325
|
-
};
|
|
3326
|
-
|
|
3327
|
-
const deserializeAws_json1_1ValidationErrorsType = (output: any, context: __SerdeContext): ValidationErrorsEntry[] => {
|
|
3328
|
-
return (output || [])
|
|
3329
|
-
.filter((e: any) => e != null)
|
|
3330
|
-
.map((entry: any) => {
|
|
3331
|
-
if (entry === null) {
|
|
3332
|
-
return null as any;
|
|
3333
|
-
}
|
|
3334
|
-
return deserializeAws_json1_1ValidationErrorsEntry(entry, context);
|
|
3335
|
-
});
|
|
3336
|
-
};
|
|
3337
|
-
|
|
3338
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
3339
|
-
httpStatusCode: output.statusCode,
|
|
3340
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
3341
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
3342
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
3343
|
-
});
|
|
3344
|
-
|
|
3345
|
-
// Collect low-level response body stream to Uint8Array.
|
|
3346
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
3347
|
-
if (streamBody instanceof Uint8Array) {
|
|
3348
|
-
return Promise.resolve(streamBody);
|
|
3349
|
-
}
|
|
3350
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
3351
|
-
};
|
|
3352
|
-
|
|
3353
|
-
// Encode Uint8Array data into string with utf-8.
|
|
3354
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
3355
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
3356
|
-
|
|
3357
|
-
const buildHttpRpcRequest = async (
|
|
3358
|
-
context: __SerdeContext,
|
|
3359
|
-
headers: __HeaderBag,
|
|
3360
|
-
path: string,
|
|
3361
|
-
resolvedHostname: string | undefined,
|
|
3362
|
-
body: any
|
|
3363
|
-
): Promise<__HttpRequest> => {
|
|
3364
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
3365
|
-
const contents: any = {
|
|
3366
|
-
protocol,
|
|
3367
|
-
hostname,
|
|
3368
|
-
port,
|
|
3369
|
-
method: "POST",
|
|
3370
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
3371
|
-
headers,
|
|
3372
|
-
};
|
|
3373
|
-
if (resolvedHostname !== undefined) {
|
|
3374
|
-
contents.hostname = resolvedHostname;
|
|
3375
|
-
}
|
|
3376
|
-
if (body !== undefined) {
|
|
3377
|
-
contents.body = body;
|
|
3378
|
-
}
|
|
3379
|
-
return new __HttpRequest(contents);
|
|
3380
|
-
};
|
|
3381
|
-
|
|
3382
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
3383
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
3384
|
-
if (encoded.length) {
|
|
3385
|
-
return JSON.parse(encoded);
|
|
3386
|
-
}
|
|
3387
|
-
return {};
|
|
3388
|
-
});
|
|
3389
|
-
|
|
3390
|
-
/**
|
|
3391
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
3392
|
-
*/
|
|
3393
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
3394
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
3395
|
-
|
|
3396
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
3397
|
-
let cleanValue = rawValue;
|
|
3398
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
3399
|
-
cleanValue = cleanValue.split(":")[0];
|
|
3400
|
-
}
|
|
3401
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
3402
|
-
cleanValue = cleanValue.split("#")[1];
|
|
3403
|
-
}
|
|
3404
|
-
return cleanValue;
|
|
3405
|
-
};
|
|
3406
|
-
|
|
3407
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
3408
|
-
if (headerKey !== undefined) {
|
|
3409
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
3410
|
-
}
|
|
3411
|
-
|
|
3412
|
-
if (data.code !== undefined) {
|
|
3413
|
-
return sanitizeErrorCode(data.code);
|
|
3414
|
-
}
|
|
3415
|
-
|
|
3416
|
-
if (data["__type"] !== undefined) {
|
|
3417
|
-
return sanitizeErrorCode(data["__type"]);
|
|
3418
|
-
}
|
|
3419
|
-
|
|
3420
|
-
return "";
|
|
3421
|
-
};
|