@aws-sdk/client-ssm-sap 3.214.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/LICENSE +201 -0
- package/README.md +207 -0
- package/dist-cjs/SsmSap.js +247 -0
- package/dist-cjs/SsmSapClient.js +40 -0
- package/dist-cjs/commands/DeleteResourcePermissionCommand.js +46 -0
- package/dist-cjs/commands/DeregisterApplicationCommand.js +46 -0
- package/dist-cjs/commands/GetApplicationCommand.js +46 -0
- package/dist-cjs/commands/GetComponentCommand.js +46 -0
- package/dist-cjs/commands/GetDatabaseCommand.js +46 -0
- package/dist-cjs/commands/GetOperationCommand.js +46 -0
- package/dist-cjs/commands/GetResourcePermissionCommand.js +46 -0
- package/dist-cjs/commands/ListApplicationsCommand.js +46 -0
- package/dist-cjs/commands/ListComponentsCommand.js +46 -0
- package/dist-cjs/commands/ListDatabasesCommand.js +46 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +46 -0
- package/dist-cjs/commands/PutResourcePermissionCommand.js +46 -0
- package/dist-cjs/commands/RegisterApplicationCommand.js +46 -0
- package/dist-cjs/commands/TagResourceCommand.js +46 -0
- package/dist-cjs/commands/UntagResourceCommand.js +46 -0
- package/dist-cjs/commands/UpdateApplicationSettingsCommand.js +46 -0
- package/dist-cjs/commands/index.js +19 -0
- package/dist-cjs/endpoint/EndpointParameters.js +12 -0
- package/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist-cjs/endpoint/ruleset.js +312 -0
- package/dist-cjs/index.js +11 -0
- package/dist-cjs/models/SsmSapServiceException.js +11 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +293 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListApplicationsPaginator.js +36 -0
- package/dist-cjs/pagination/ListComponentsPaginator.js +36 -0
- package/dist-cjs/pagination/ListDatabasesPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +7 -0
- package/dist-cjs/protocols/Aws_restJson1.js +1356 -0
- package/dist-cjs/runtimeConfig.browser.js +42 -0
- package/dist-cjs/runtimeConfig.js +50 -0
- package/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist-cjs/runtimeConfig.shared.js +18 -0
- package/dist-es/SsmSap.js +243 -0
- package/dist-es/SsmSapClient.js +36 -0
- package/dist-es/commands/DeleteResourcePermissionCommand.js +42 -0
- package/dist-es/commands/DeregisterApplicationCommand.js +42 -0
- package/dist-es/commands/GetApplicationCommand.js +42 -0
- package/dist-es/commands/GetComponentCommand.js +42 -0
- package/dist-es/commands/GetDatabaseCommand.js +42 -0
- package/dist-es/commands/GetOperationCommand.js +42 -0
- package/dist-es/commands/GetResourcePermissionCommand.js +42 -0
- package/dist-es/commands/ListApplicationsCommand.js +42 -0
- package/dist-es/commands/ListComponentsCommand.js +42 -0
- package/dist-es/commands/ListDatabasesCommand.js +42 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +42 -0
- package/dist-es/commands/PutResourcePermissionCommand.js +42 -0
- package/dist-es/commands/RegisterApplicationCommand.js +42 -0
- package/dist-es/commands/TagResourceCommand.js +42 -0
- package/dist-es/commands/UntagResourceCommand.js +42 -0
- package/dist-es/commands/UpdateApplicationSettingsCommand.js +42 -0
- package/dist-es/commands/index.js +16 -0
- package/dist-es/endpoint/EndpointParameters.js +8 -0
- package/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist-es/endpoint/ruleset.js +309 -0
- package/dist-es/index.js +6 -0
- package/dist-es/models/SsmSapServiceException.js +7 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +244 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListApplicationsPaginator.js +32 -0
- package/dist-es/pagination/ListComponentsPaginator.js +32 -0
- package/dist-es/pagination/ListDatabasesPaginator.js +32 -0
- package/dist-es/pagination/index.js +4 -0
- package/dist-es/protocols/Aws_restJson1.js +1321 -0
- package/dist-es/runtimeConfig.browser.js +37 -0
- package/dist-es/runtimeConfig.js +45 -0
- package/dist-es/runtimeConfig.native.js +11 -0
- package/dist-es/runtimeConfig.shared.js +14 -0
- package/dist-types/SsmSap.d.ts +134 -0
- package/dist-types/SsmSapClient.d.ts +159 -0
- package/dist-types/commands/DeleteResourcePermissionCommand.d.ts +37 -0
- package/dist-types/commands/DeregisterApplicationCommand.d.ts +38 -0
- package/dist-types/commands/GetApplicationCommand.d.ts +38 -0
- package/dist-types/commands/GetComponentCommand.d.ts +38 -0
- package/dist-types/commands/GetDatabaseCommand.d.ts +38 -0
- package/dist-types/commands/GetOperationCommand.d.ts +37 -0
- package/dist-types/commands/GetResourcePermissionCommand.d.ts +37 -0
- package/dist-types/commands/ListApplicationsCommand.d.ts +37 -0
- package/dist-types/commands/ListComponentsCommand.d.ts +37 -0
- package/dist-types/commands/ListDatabasesCommand.d.ts +38 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +38 -0
- package/dist-types/commands/PutResourcePermissionCommand.d.ts +37 -0
- package/dist-types/commands/RegisterApplicationCommand.d.ts +44 -0
- package/dist-types/commands/TagResourceCommand.d.ts +37 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +37 -0
- package/dist-types/commands/UpdateApplicationSettingsCommand.d.ts +37 -0
- package/dist-types/commands/index.d.ts +16 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +19 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/index.d.ts +6 -0
- package/dist-types/models/SsmSapServiceException.d.ts +10 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +854 -0
- package/dist-types/pagination/Interfaces.d.ts +6 -0
- package/dist-types/pagination/ListApplicationsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListComponentsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListDatabasesPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +50 -0
- package/dist-types/runtimeConfig.browser.d.ts +42 -0
- package/dist-types/runtimeConfig.d.ts +42 -0
- package/dist-types/runtimeConfig.native.d.ts +41 -0
- package/dist-types/runtimeConfig.shared.d.ts +16 -0
- package/dist-types/ts3.4/SsmSap.d.ts +276 -0
- package/dist-types/ts3.4/SsmSapClient.d.ts +207 -0
- package/dist-types/ts3.4/commands/DeleteResourcePermissionCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/DeregisterApplicationCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/GetApplicationCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/GetComponentCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/GetDatabaseCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/GetOperationCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/GetResourcePermissionCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/ListApplicationsCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/ListComponentsCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/ListDatabasesCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/PutResourcePermissionCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/RegisterApplicationCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/UpdateApplicationSettingsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/index.d.ts +16 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +34 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +6 -0
- package/dist-types/ts3.4/models/SsmSapServiceException.d.ts +7 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +392 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListApplicationsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListComponentsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListDatabasesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +197 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +86 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +86 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +75 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +16 -0
- package/package.json +101 -0
|
@@ -0,0 +1,1356 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deserializeAws_restJson1UpdateApplicationSettingsCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1RegisterApplicationCommand = exports.deserializeAws_restJson1PutResourcePermissionCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListDatabasesCommand = exports.deserializeAws_restJson1ListComponentsCommand = exports.deserializeAws_restJson1ListApplicationsCommand = exports.deserializeAws_restJson1GetResourcePermissionCommand = exports.deserializeAws_restJson1GetOperationCommand = exports.deserializeAws_restJson1GetDatabaseCommand = exports.deserializeAws_restJson1GetComponentCommand = exports.deserializeAws_restJson1GetApplicationCommand = exports.deserializeAws_restJson1DeregisterApplicationCommand = exports.deserializeAws_restJson1DeleteResourcePermissionCommand = exports.serializeAws_restJson1UpdateApplicationSettingsCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1RegisterApplicationCommand = exports.serializeAws_restJson1PutResourcePermissionCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListDatabasesCommand = exports.serializeAws_restJson1ListComponentsCommand = exports.serializeAws_restJson1ListApplicationsCommand = exports.serializeAws_restJson1GetResourcePermissionCommand = exports.serializeAws_restJson1GetOperationCommand = exports.serializeAws_restJson1GetDatabaseCommand = exports.serializeAws_restJson1GetComponentCommand = exports.serializeAws_restJson1GetApplicationCommand = exports.serializeAws_restJson1DeregisterApplicationCommand = exports.serializeAws_restJson1DeleteResourcePermissionCommand = void 0;
|
|
4
|
+
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const SsmSapServiceException_1 = require("../models/SsmSapServiceException");
|
|
8
|
+
const serializeAws_restJson1DeleteResourcePermissionCommand = async (input, context) => {
|
|
9
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
|
+
const headers = {
|
|
11
|
+
"content-type": "application/json",
|
|
12
|
+
};
|
|
13
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-resource-permission";
|
|
14
|
+
let body;
|
|
15
|
+
body = JSON.stringify({
|
|
16
|
+
...(input.ActionType != null && { ActionType: input.ActionType }),
|
|
17
|
+
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
18
|
+
...(input.SourceResourceArn != null && { SourceResourceArn: input.SourceResourceArn }),
|
|
19
|
+
});
|
|
20
|
+
return new protocol_http_1.HttpRequest({
|
|
21
|
+
protocol,
|
|
22
|
+
hostname,
|
|
23
|
+
port,
|
|
24
|
+
method: "POST",
|
|
25
|
+
headers,
|
|
26
|
+
path: resolvedPath,
|
|
27
|
+
body,
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
exports.serializeAws_restJson1DeleteResourcePermissionCommand = serializeAws_restJson1DeleteResourcePermissionCommand;
|
|
31
|
+
const serializeAws_restJson1DeregisterApplicationCommand = async (input, context) => {
|
|
32
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
33
|
+
const headers = {
|
|
34
|
+
"content-type": "application/json",
|
|
35
|
+
};
|
|
36
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deregister-application";
|
|
37
|
+
let body;
|
|
38
|
+
body = JSON.stringify({
|
|
39
|
+
...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }),
|
|
40
|
+
});
|
|
41
|
+
return new protocol_http_1.HttpRequest({
|
|
42
|
+
protocol,
|
|
43
|
+
hostname,
|
|
44
|
+
port,
|
|
45
|
+
method: "POST",
|
|
46
|
+
headers,
|
|
47
|
+
path: resolvedPath,
|
|
48
|
+
body,
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
exports.serializeAws_restJson1DeregisterApplicationCommand = serializeAws_restJson1DeregisterApplicationCommand;
|
|
52
|
+
const serializeAws_restJson1GetApplicationCommand = async (input, context) => {
|
|
53
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
54
|
+
const headers = {
|
|
55
|
+
"content-type": "application/json",
|
|
56
|
+
};
|
|
57
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-application";
|
|
58
|
+
let body;
|
|
59
|
+
body = JSON.stringify({
|
|
60
|
+
...(input.ApplicationArn != null && { ApplicationArn: input.ApplicationArn }),
|
|
61
|
+
...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }),
|
|
62
|
+
});
|
|
63
|
+
return new protocol_http_1.HttpRequest({
|
|
64
|
+
protocol,
|
|
65
|
+
hostname,
|
|
66
|
+
port,
|
|
67
|
+
method: "POST",
|
|
68
|
+
headers,
|
|
69
|
+
path: resolvedPath,
|
|
70
|
+
body,
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
exports.serializeAws_restJson1GetApplicationCommand = serializeAws_restJson1GetApplicationCommand;
|
|
74
|
+
const serializeAws_restJson1GetComponentCommand = async (input, context) => {
|
|
75
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
76
|
+
const headers = {
|
|
77
|
+
"content-type": "application/json",
|
|
78
|
+
};
|
|
79
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-component";
|
|
80
|
+
let body;
|
|
81
|
+
body = JSON.stringify({
|
|
82
|
+
...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }),
|
|
83
|
+
...(input.ComponentId != null && { ComponentId: input.ComponentId }),
|
|
84
|
+
});
|
|
85
|
+
return new protocol_http_1.HttpRequest({
|
|
86
|
+
protocol,
|
|
87
|
+
hostname,
|
|
88
|
+
port,
|
|
89
|
+
method: "POST",
|
|
90
|
+
headers,
|
|
91
|
+
path: resolvedPath,
|
|
92
|
+
body,
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
exports.serializeAws_restJson1GetComponentCommand = serializeAws_restJson1GetComponentCommand;
|
|
96
|
+
const serializeAws_restJson1GetDatabaseCommand = async (input, context) => {
|
|
97
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
98
|
+
const headers = {
|
|
99
|
+
"content-type": "application/json",
|
|
100
|
+
};
|
|
101
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-database";
|
|
102
|
+
let body;
|
|
103
|
+
body = JSON.stringify({
|
|
104
|
+
...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }),
|
|
105
|
+
...(input.ComponentId != null && { ComponentId: input.ComponentId }),
|
|
106
|
+
...(input.DatabaseArn != null && { DatabaseArn: input.DatabaseArn }),
|
|
107
|
+
...(input.DatabaseId != null && { DatabaseId: input.DatabaseId }),
|
|
108
|
+
});
|
|
109
|
+
return new protocol_http_1.HttpRequest({
|
|
110
|
+
protocol,
|
|
111
|
+
hostname,
|
|
112
|
+
port,
|
|
113
|
+
method: "POST",
|
|
114
|
+
headers,
|
|
115
|
+
path: resolvedPath,
|
|
116
|
+
body,
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
exports.serializeAws_restJson1GetDatabaseCommand = serializeAws_restJson1GetDatabaseCommand;
|
|
120
|
+
const serializeAws_restJson1GetOperationCommand = async (input, context) => {
|
|
121
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
122
|
+
const headers = {
|
|
123
|
+
"content-type": "application/json",
|
|
124
|
+
};
|
|
125
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-operation";
|
|
126
|
+
let body;
|
|
127
|
+
body = JSON.stringify({
|
|
128
|
+
...(input.OperationId != null && { OperationId: input.OperationId }),
|
|
129
|
+
});
|
|
130
|
+
return new protocol_http_1.HttpRequest({
|
|
131
|
+
protocol,
|
|
132
|
+
hostname,
|
|
133
|
+
port,
|
|
134
|
+
method: "POST",
|
|
135
|
+
headers,
|
|
136
|
+
path: resolvedPath,
|
|
137
|
+
body,
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
exports.serializeAws_restJson1GetOperationCommand = serializeAws_restJson1GetOperationCommand;
|
|
141
|
+
const serializeAws_restJson1GetResourcePermissionCommand = async (input, context) => {
|
|
142
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
143
|
+
const headers = {
|
|
144
|
+
"content-type": "application/json",
|
|
145
|
+
};
|
|
146
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-resource-permission";
|
|
147
|
+
let body;
|
|
148
|
+
body = JSON.stringify({
|
|
149
|
+
...(input.ActionType != null && { ActionType: input.ActionType }),
|
|
150
|
+
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
151
|
+
});
|
|
152
|
+
return new protocol_http_1.HttpRequest({
|
|
153
|
+
protocol,
|
|
154
|
+
hostname,
|
|
155
|
+
port,
|
|
156
|
+
method: "POST",
|
|
157
|
+
headers,
|
|
158
|
+
path: resolvedPath,
|
|
159
|
+
body,
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
exports.serializeAws_restJson1GetResourcePermissionCommand = serializeAws_restJson1GetResourcePermissionCommand;
|
|
163
|
+
const serializeAws_restJson1ListApplicationsCommand = async (input, context) => {
|
|
164
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
165
|
+
const headers = {
|
|
166
|
+
"content-type": "application/json",
|
|
167
|
+
};
|
|
168
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-applications";
|
|
169
|
+
let body;
|
|
170
|
+
body = JSON.stringify({
|
|
171
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
172
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
173
|
+
});
|
|
174
|
+
return new protocol_http_1.HttpRequest({
|
|
175
|
+
protocol,
|
|
176
|
+
hostname,
|
|
177
|
+
port,
|
|
178
|
+
method: "POST",
|
|
179
|
+
headers,
|
|
180
|
+
path: resolvedPath,
|
|
181
|
+
body,
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
exports.serializeAws_restJson1ListApplicationsCommand = serializeAws_restJson1ListApplicationsCommand;
|
|
185
|
+
const serializeAws_restJson1ListComponentsCommand = async (input, context) => {
|
|
186
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
187
|
+
const headers = {
|
|
188
|
+
"content-type": "application/json",
|
|
189
|
+
};
|
|
190
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-components";
|
|
191
|
+
let body;
|
|
192
|
+
body = JSON.stringify({
|
|
193
|
+
...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }),
|
|
194
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
195
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
196
|
+
});
|
|
197
|
+
return new protocol_http_1.HttpRequest({
|
|
198
|
+
protocol,
|
|
199
|
+
hostname,
|
|
200
|
+
port,
|
|
201
|
+
method: "POST",
|
|
202
|
+
headers,
|
|
203
|
+
path: resolvedPath,
|
|
204
|
+
body,
|
|
205
|
+
});
|
|
206
|
+
};
|
|
207
|
+
exports.serializeAws_restJson1ListComponentsCommand = serializeAws_restJson1ListComponentsCommand;
|
|
208
|
+
const serializeAws_restJson1ListDatabasesCommand = async (input, context) => {
|
|
209
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
210
|
+
const headers = {
|
|
211
|
+
"content-type": "application/json",
|
|
212
|
+
};
|
|
213
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-databases";
|
|
214
|
+
let body;
|
|
215
|
+
body = JSON.stringify({
|
|
216
|
+
...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }),
|
|
217
|
+
...(input.ComponentId != null && { ComponentId: input.ComponentId }),
|
|
218
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
219
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
220
|
+
});
|
|
221
|
+
return new protocol_http_1.HttpRequest({
|
|
222
|
+
protocol,
|
|
223
|
+
hostname,
|
|
224
|
+
port,
|
|
225
|
+
method: "POST",
|
|
226
|
+
headers,
|
|
227
|
+
path: resolvedPath,
|
|
228
|
+
body,
|
|
229
|
+
});
|
|
230
|
+
};
|
|
231
|
+
exports.serializeAws_restJson1ListDatabasesCommand = serializeAws_restJson1ListDatabasesCommand;
|
|
232
|
+
const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
233
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
234
|
+
const headers = {};
|
|
235
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
236
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
237
|
+
let body;
|
|
238
|
+
return new protocol_http_1.HttpRequest({
|
|
239
|
+
protocol,
|
|
240
|
+
hostname,
|
|
241
|
+
port,
|
|
242
|
+
method: "GET",
|
|
243
|
+
headers,
|
|
244
|
+
path: resolvedPath,
|
|
245
|
+
body,
|
|
246
|
+
});
|
|
247
|
+
};
|
|
248
|
+
exports.serializeAws_restJson1ListTagsForResourceCommand = serializeAws_restJson1ListTagsForResourceCommand;
|
|
249
|
+
const serializeAws_restJson1PutResourcePermissionCommand = async (input, context) => {
|
|
250
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
251
|
+
const headers = {
|
|
252
|
+
"content-type": "application/json",
|
|
253
|
+
};
|
|
254
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/put-resource-permission";
|
|
255
|
+
let body;
|
|
256
|
+
body = JSON.stringify({
|
|
257
|
+
...(input.ActionType != null && { ActionType: input.ActionType }),
|
|
258
|
+
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
259
|
+
...(input.SourceResourceArn != null && { SourceResourceArn: input.SourceResourceArn }),
|
|
260
|
+
});
|
|
261
|
+
return new protocol_http_1.HttpRequest({
|
|
262
|
+
protocol,
|
|
263
|
+
hostname,
|
|
264
|
+
port,
|
|
265
|
+
method: "POST",
|
|
266
|
+
headers,
|
|
267
|
+
path: resolvedPath,
|
|
268
|
+
body,
|
|
269
|
+
});
|
|
270
|
+
};
|
|
271
|
+
exports.serializeAws_restJson1PutResourcePermissionCommand = serializeAws_restJson1PutResourcePermissionCommand;
|
|
272
|
+
const serializeAws_restJson1RegisterApplicationCommand = async (input, context) => {
|
|
273
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
274
|
+
const headers = {
|
|
275
|
+
"content-type": "application/json",
|
|
276
|
+
};
|
|
277
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/register-application";
|
|
278
|
+
let body;
|
|
279
|
+
body = JSON.stringify({
|
|
280
|
+
...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }),
|
|
281
|
+
...(input.ApplicationType != null && { ApplicationType: input.ApplicationType }),
|
|
282
|
+
...(input.Credentials != null && {
|
|
283
|
+
Credentials: serializeAws_restJson1ApplicationCredentialList(input.Credentials, context),
|
|
284
|
+
}),
|
|
285
|
+
...(input.Instances != null && { Instances: serializeAws_restJson1InstanceList(input.Instances, context) }),
|
|
286
|
+
...(input.SapInstanceNumber != null && { SapInstanceNumber: input.SapInstanceNumber }),
|
|
287
|
+
...(input.Sid != null && { Sid: input.Sid }),
|
|
288
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
289
|
+
});
|
|
290
|
+
return new protocol_http_1.HttpRequest({
|
|
291
|
+
protocol,
|
|
292
|
+
hostname,
|
|
293
|
+
port,
|
|
294
|
+
method: "POST",
|
|
295
|
+
headers,
|
|
296
|
+
path: resolvedPath,
|
|
297
|
+
body,
|
|
298
|
+
});
|
|
299
|
+
};
|
|
300
|
+
exports.serializeAws_restJson1RegisterApplicationCommand = serializeAws_restJson1RegisterApplicationCommand;
|
|
301
|
+
const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
302
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
303
|
+
const headers = {
|
|
304
|
+
"content-type": "application/json",
|
|
305
|
+
};
|
|
306
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
307
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
308
|
+
let body;
|
|
309
|
+
body = JSON.stringify({
|
|
310
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
311
|
+
});
|
|
312
|
+
return new protocol_http_1.HttpRequest({
|
|
313
|
+
protocol,
|
|
314
|
+
hostname,
|
|
315
|
+
port,
|
|
316
|
+
method: "POST",
|
|
317
|
+
headers,
|
|
318
|
+
path: resolvedPath,
|
|
319
|
+
body,
|
|
320
|
+
});
|
|
321
|
+
};
|
|
322
|
+
exports.serializeAws_restJson1TagResourceCommand = serializeAws_restJson1TagResourceCommand;
|
|
323
|
+
const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
324
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
325
|
+
const headers = {};
|
|
326
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
327
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
328
|
+
const query = map({
|
|
329
|
+
tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
|
|
330
|
+
});
|
|
331
|
+
let body;
|
|
332
|
+
return new protocol_http_1.HttpRequest({
|
|
333
|
+
protocol,
|
|
334
|
+
hostname,
|
|
335
|
+
port,
|
|
336
|
+
method: "DELETE",
|
|
337
|
+
headers,
|
|
338
|
+
path: resolvedPath,
|
|
339
|
+
query,
|
|
340
|
+
body,
|
|
341
|
+
});
|
|
342
|
+
};
|
|
343
|
+
exports.serializeAws_restJson1UntagResourceCommand = serializeAws_restJson1UntagResourceCommand;
|
|
344
|
+
const serializeAws_restJson1UpdateApplicationSettingsCommand = async (input, context) => {
|
|
345
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
346
|
+
const headers = {
|
|
347
|
+
"content-type": "application/json",
|
|
348
|
+
};
|
|
349
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-application-settings";
|
|
350
|
+
let body;
|
|
351
|
+
body = JSON.stringify({
|
|
352
|
+
...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }),
|
|
353
|
+
...(input.CredentialsToAddOrUpdate != null && {
|
|
354
|
+
CredentialsToAddOrUpdate: serializeAws_restJson1ApplicationCredentialList(input.CredentialsToAddOrUpdate, context),
|
|
355
|
+
}),
|
|
356
|
+
...(input.CredentialsToRemove != null && {
|
|
357
|
+
CredentialsToRemove: serializeAws_restJson1ApplicationCredentialList(input.CredentialsToRemove, context),
|
|
358
|
+
}),
|
|
359
|
+
});
|
|
360
|
+
return new protocol_http_1.HttpRequest({
|
|
361
|
+
protocol,
|
|
362
|
+
hostname,
|
|
363
|
+
port,
|
|
364
|
+
method: "POST",
|
|
365
|
+
headers,
|
|
366
|
+
path: resolvedPath,
|
|
367
|
+
body,
|
|
368
|
+
});
|
|
369
|
+
};
|
|
370
|
+
exports.serializeAws_restJson1UpdateApplicationSettingsCommand = serializeAws_restJson1UpdateApplicationSettingsCommand;
|
|
371
|
+
const deserializeAws_restJson1DeleteResourcePermissionCommand = async (output, context) => {
|
|
372
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
373
|
+
return deserializeAws_restJson1DeleteResourcePermissionCommandError(output, context);
|
|
374
|
+
}
|
|
375
|
+
const contents = map({
|
|
376
|
+
$metadata: deserializeMetadata(output),
|
|
377
|
+
});
|
|
378
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
379
|
+
if (data.Policy != null) {
|
|
380
|
+
contents.Policy = (0, smithy_client_1.expectString)(data.Policy);
|
|
381
|
+
}
|
|
382
|
+
return contents;
|
|
383
|
+
};
|
|
384
|
+
exports.deserializeAws_restJson1DeleteResourcePermissionCommand = deserializeAws_restJson1DeleteResourcePermissionCommand;
|
|
385
|
+
const deserializeAws_restJson1DeleteResourcePermissionCommandError = async (output, context) => {
|
|
386
|
+
const parsedOutput = {
|
|
387
|
+
...output,
|
|
388
|
+
body: await parseErrorBody(output.body, context),
|
|
389
|
+
};
|
|
390
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
391
|
+
switch (errorCode) {
|
|
392
|
+
case "InternalServerException":
|
|
393
|
+
case "com.amazonaws.ssmsap#InternalServerException":
|
|
394
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
395
|
+
case "ResourceNotFoundException":
|
|
396
|
+
case "com.amazonaws.ssmsap#ResourceNotFoundException":
|
|
397
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
398
|
+
case "ValidationException":
|
|
399
|
+
case "com.amazonaws.ssmsap#ValidationException":
|
|
400
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
401
|
+
default:
|
|
402
|
+
const parsedBody = parsedOutput.body;
|
|
403
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
404
|
+
output,
|
|
405
|
+
parsedBody,
|
|
406
|
+
exceptionCtor: SsmSapServiceException_1.SsmSapServiceException,
|
|
407
|
+
errorCode,
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
const deserializeAws_restJson1DeregisterApplicationCommand = async (output, context) => {
|
|
412
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
413
|
+
return deserializeAws_restJson1DeregisterApplicationCommandError(output, context);
|
|
414
|
+
}
|
|
415
|
+
const contents = map({
|
|
416
|
+
$metadata: deserializeMetadata(output),
|
|
417
|
+
});
|
|
418
|
+
await collectBody(output.body, context);
|
|
419
|
+
return contents;
|
|
420
|
+
};
|
|
421
|
+
exports.deserializeAws_restJson1DeregisterApplicationCommand = deserializeAws_restJson1DeregisterApplicationCommand;
|
|
422
|
+
const deserializeAws_restJson1DeregisterApplicationCommandError = async (output, context) => {
|
|
423
|
+
const parsedOutput = {
|
|
424
|
+
...output,
|
|
425
|
+
body: await parseErrorBody(output.body, context),
|
|
426
|
+
};
|
|
427
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
428
|
+
switch (errorCode) {
|
|
429
|
+
case "InternalServerException":
|
|
430
|
+
case "com.amazonaws.ssmsap#InternalServerException":
|
|
431
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
432
|
+
case "ValidationException":
|
|
433
|
+
case "com.amazonaws.ssmsap#ValidationException":
|
|
434
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
435
|
+
default:
|
|
436
|
+
const parsedBody = parsedOutput.body;
|
|
437
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
438
|
+
output,
|
|
439
|
+
parsedBody,
|
|
440
|
+
exceptionCtor: SsmSapServiceException_1.SsmSapServiceException,
|
|
441
|
+
errorCode,
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
const deserializeAws_restJson1GetApplicationCommand = async (output, context) => {
|
|
446
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
447
|
+
return deserializeAws_restJson1GetApplicationCommandError(output, context);
|
|
448
|
+
}
|
|
449
|
+
const contents = map({
|
|
450
|
+
$metadata: deserializeMetadata(output),
|
|
451
|
+
});
|
|
452
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
453
|
+
if (data.Application != null) {
|
|
454
|
+
contents.Application = deserializeAws_restJson1Application(data.Application, context);
|
|
455
|
+
}
|
|
456
|
+
if (data.Tags != null) {
|
|
457
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
458
|
+
}
|
|
459
|
+
return contents;
|
|
460
|
+
};
|
|
461
|
+
exports.deserializeAws_restJson1GetApplicationCommand = deserializeAws_restJson1GetApplicationCommand;
|
|
462
|
+
const deserializeAws_restJson1GetApplicationCommandError = async (output, context) => {
|
|
463
|
+
const parsedOutput = {
|
|
464
|
+
...output,
|
|
465
|
+
body: await parseErrorBody(output.body, context),
|
|
466
|
+
};
|
|
467
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
468
|
+
switch (errorCode) {
|
|
469
|
+
case "InternalServerException":
|
|
470
|
+
case "com.amazonaws.ssmsap#InternalServerException":
|
|
471
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
472
|
+
case "ValidationException":
|
|
473
|
+
case "com.amazonaws.ssmsap#ValidationException":
|
|
474
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
475
|
+
default:
|
|
476
|
+
const parsedBody = parsedOutput.body;
|
|
477
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
478
|
+
output,
|
|
479
|
+
parsedBody,
|
|
480
|
+
exceptionCtor: SsmSapServiceException_1.SsmSapServiceException,
|
|
481
|
+
errorCode,
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
};
|
|
485
|
+
const deserializeAws_restJson1GetComponentCommand = async (output, context) => {
|
|
486
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
487
|
+
return deserializeAws_restJson1GetComponentCommandError(output, context);
|
|
488
|
+
}
|
|
489
|
+
const contents = map({
|
|
490
|
+
$metadata: deserializeMetadata(output),
|
|
491
|
+
});
|
|
492
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
493
|
+
if (data.Component != null) {
|
|
494
|
+
contents.Component = deserializeAws_restJson1Component(data.Component, context);
|
|
495
|
+
}
|
|
496
|
+
return contents;
|
|
497
|
+
};
|
|
498
|
+
exports.deserializeAws_restJson1GetComponentCommand = deserializeAws_restJson1GetComponentCommand;
|
|
499
|
+
const deserializeAws_restJson1GetComponentCommandError = async (output, context) => {
|
|
500
|
+
const parsedOutput = {
|
|
501
|
+
...output,
|
|
502
|
+
body: await parseErrorBody(output.body, context),
|
|
503
|
+
};
|
|
504
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
505
|
+
switch (errorCode) {
|
|
506
|
+
case "InternalServerException":
|
|
507
|
+
case "com.amazonaws.ssmsap#InternalServerException":
|
|
508
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
509
|
+
case "ValidationException":
|
|
510
|
+
case "com.amazonaws.ssmsap#ValidationException":
|
|
511
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
512
|
+
default:
|
|
513
|
+
const parsedBody = parsedOutput.body;
|
|
514
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
515
|
+
output,
|
|
516
|
+
parsedBody,
|
|
517
|
+
exceptionCtor: SsmSapServiceException_1.SsmSapServiceException,
|
|
518
|
+
errorCode,
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
const deserializeAws_restJson1GetDatabaseCommand = async (output, context) => {
|
|
523
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
524
|
+
return deserializeAws_restJson1GetDatabaseCommandError(output, context);
|
|
525
|
+
}
|
|
526
|
+
const contents = map({
|
|
527
|
+
$metadata: deserializeMetadata(output),
|
|
528
|
+
});
|
|
529
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
530
|
+
if (data.Database != null) {
|
|
531
|
+
contents.Database = deserializeAws_restJson1Database(data.Database, context);
|
|
532
|
+
}
|
|
533
|
+
if (data.Tags != null) {
|
|
534
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
535
|
+
}
|
|
536
|
+
return contents;
|
|
537
|
+
};
|
|
538
|
+
exports.deserializeAws_restJson1GetDatabaseCommand = deserializeAws_restJson1GetDatabaseCommand;
|
|
539
|
+
const deserializeAws_restJson1GetDatabaseCommandError = async (output, context) => {
|
|
540
|
+
const parsedOutput = {
|
|
541
|
+
...output,
|
|
542
|
+
body: await parseErrorBody(output.body, context),
|
|
543
|
+
};
|
|
544
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
545
|
+
switch (errorCode) {
|
|
546
|
+
case "InternalServerException":
|
|
547
|
+
case "com.amazonaws.ssmsap#InternalServerException":
|
|
548
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
549
|
+
case "ValidationException":
|
|
550
|
+
case "com.amazonaws.ssmsap#ValidationException":
|
|
551
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
552
|
+
default:
|
|
553
|
+
const parsedBody = parsedOutput.body;
|
|
554
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
555
|
+
output,
|
|
556
|
+
parsedBody,
|
|
557
|
+
exceptionCtor: SsmSapServiceException_1.SsmSapServiceException,
|
|
558
|
+
errorCode,
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
};
|
|
562
|
+
const deserializeAws_restJson1GetOperationCommand = async (output, context) => {
|
|
563
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
564
|
+
return deserializeAws_restJson1GetOperationCommandError(output, context);
|
|
565
|
+
}
|
|
566
|
+
const contents = map({
|
|
567
|
+
$metadata: deserializeMetadata(output),
|
|
568
|
+
});
|
|
569
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
570
|
+
if (data.Operation != null) {
|
|
571
|
+
contents.Operation = deserializeAws_restJson1Operation(data.Operation, context);
|
|
572
|
+
}
|
|
573
|
+
return contents;
|
|
574
|
+
};
|
|
575
|
+
exports.deserializeAws_restJson1GetOperationCommand = deserializeAws_restJson1GetOperationCommand;
|
|
576
|
+
const deserializeAws_restJson1GetOperationCommandError = async (output, context) => {
|
|
577
|
+
const parsedOutput = {
|
|
578
|
+
...output,
|
|
579
|
+
body: await parseErrorBody(output.body, context),
|
|
580
|
+
};
|
|
581
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
582
|
+
switch (errorCode) {
|
|
583
|
+
case "InternalServerException":
|
|
584
|
+
case "com.amazonaws.ssmsap#InternalServerException":
|
|
585
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
586
|
+
case "ValidationException":
|
|
587
|
+
case "com.amazonaws.ssmsap#ValidationException":
|
|
588
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
589
|
+
default:
|
|
590
|
+
const parsedBody = parsedOutput.body;
|
|
591
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
592
|
+
output,
|
|
593
|
+
parsedBody,
|
|
594
|
+
exceptionCtor: SsmSapServiceException_1.SsmSapServiceException,
|
|
595
|
+
errorCode,
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
};
|
|
599
|
+
const deserializeAws_restJson1GetResourcePermissionCommand = async (output, context) => {
|
|
600
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
601
|
+
return deserializeAws_restJson1GetResourcePermissionCommandError(output, context);
|
|
602
|
+
}
|
|
603
|
+
const contents = map({
|
|
604
|
+
$metadata: deserializeMetadata(output),
|
|
605
|
+
});
|
|
606
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
607
|
+
if (data.Policy != null) {
|
|
608
|
+
contents.Policy = (0, smithy_client_1.expectString)(data.Policy);
|
|
609
|
+
}
|
|
610
|
+
return contents;
|
|
611
|
+
};
|
|
612
|
+
exports.deserializeAws_restJson1GetResourcePermissionCommand = deserializeAws_restJson1GetResourcePermissionCommand;
|
|
613
|
+
const deserializeAws_restJson1GetResourcePermissionCommandError = async (output, context) => {
|
|
614
|
+
const parsedOutput = {
|
|
615
|
+
...output,
|
|
616
|
+
body: await parseErrorBody(output.body, context),
|
|
617
|
+
};
|
|
618
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
619
|
+
switch (errorCode) {
|
|
620
|
+
case "InternalServerException":
|
|
621
|
+
case "com.amazonaws.ssmsap#InternalServerException":
|
|
622
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
623
|
+
case "ResourceNotFoundException":
|
|
624
|
+
case "com.amazonaws.ssmsap#ResourceNotFoundException":
|
|
625
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
626
|
+
case "ValidationException":
|
|
627
|
+
case "com.amazonaws.ssmsap#ValidationException":
|
|
628
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
629
|
+
default:
|
|
630
|
+
const parsedBody = parsedOutput.body;
|
|
631
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
632
|
+
output,
|
|
633
|
+
parsedBody,
|
|
634
|
+
exceptionCtor: SsmSapServiceException_1.SsmSapServiceException,
|
|
635
|
+
errorCode,
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
const deserializeAws_restJson1ListApplicationsCommand = async (output, context) => {
|
|
640
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
641
|
+
return deserializeAws_restJson1ListApplicationsCommandError(output, context);
|
|
642
|
+
}
|
|
643
|
+
const contents = map({
|
|
644
|
+
$metadata: deserializeMetadata(output),
|
|
645
|
+
});
|
|
646
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
647
|
+
if (data.Applications != null) {
|
|
648
|
+
contents.Applications = deserializeAws_restJson1ApplicationSummaryList(data.Applications, context);
|
|
649
|
+
}
|
|
650
|
+
if (data.NextToken != null) {
|
|
651
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
652
|
+
}
|
|
653
|
+
return contents;
|
|
654
|
+
};
|
|
655
|
+
exports.deserializeAws_restJson1ListApplicationsCommand = deserializeAws_restJson1ListApplicationsCommand;
|
|
656
|
+
const deserializeAws_restJson1ListApplicationsCommandError = async (output, context) => {
|
|
657
|
+
const parsedOutput = {
|
|
658
|
+
...output,
|
|
659
|
+
body: await parseErrorBody(output.body, context),
|
|
660
|
+
};
|
|
661
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
662
|
+
switch (errorCode) {
|
|
663
|
+
case "InternalServerException":
|
|
664
|
+
case "com.amazonaws.ssmsap#InternalServerException":
|
|
665
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
666
|
+
case "ResourceNotFoundException":
|
|
667
|
+
case "com.amazonaws.ssmsap#ResourceNotFoundException":
|
|
668
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
669
|
+
case "ValidationException":
|
|
670
|
+
case "com.amazonaws.ssmsap#ValidationException":
|
|
671
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
672
|
+
default:
|
|
673
|
+
const parsedBody = parsedOutput.body;
|
|
674
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
675
|
+
output,
|
|
676
|
+
parsedBody,
|
|
677
|
+
exceptionCtor: SsmSapServiceException_1.SsmSapServiceException,
|
|
678
|
+
errorCode,
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
};
|
|
682
|
+
const deserializeAws_restJson1ListComponentsCommand = async (output, context) => {
|
|
683
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
684
|
+
return deserializeAws_restJson1ListComponentsCommandError(output, context);
|
|
685
|
+
}
|
|
686
|
+
const contents = map({
|
|
687
|
+
$metadata: deserializeMetadata(output),
|
|
688
|
+
});
|
|
689
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
690
|
+
if (data.Components != null) {
|
|
691
|
+
contents.Components = deserializeAws_restJson1ComponentSummaryList(data.Components, context);
|
|
692
|
+
}
|
|
693
|
+
if (data.NextToken != null) {
|
|
694
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
695
|
+
}
|
|
696
|
+
return contents;
|
|
697
|
+
};
|
|
698
|
+
exports.deserializeAws_restJson1ListComponentsCommand = deserializeAws_restJson1ListComponentsCommand;
|
|
699
|
+
const deserializeAws_restJson1ListComponentsCommandError = async (output, context) => {
|
|
700
|
+
const parsedOutput = {
|
|
701
|
+
...output,
|
|
702
|
+
body: await parseErrorBody(output.body, context),
|
|
703
|
+
};
|
|
704
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
705
|
+
switch (errorCode) {
|
|
706
|
+
case "InternalServerException":
|
|
707
|
+
case "com.amazonaws.ssmsap#InternalServerException":
|
|
708
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
709
|
+
case "ResourceNotFoundException":
|
|
710
|
+
case "com.amazonaws.ssmsap#ResourceNotFoundException":
|
|
711
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
712
|
+
case "ValidationException":
|
|
713
|
+
case "com.amazonaws.ssmsap#ValidationException":
|
|
714
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
715
|
+
default:
|
|
716
|
+
const parsedBody = parsedOutput.body;
|
|
717
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
718
|
+
output,
|
|
719
|
+
parsedBody,
|
|
720
|
+
exceptionCtor: SsmSapServiceException_1.SsmSapServiceException,
|
|
721
|
+
errorCode,
|
|
722
|
+
});
|
|
723
|
+
}
|
|
724
|
+
};
|
|
725
|
+
const deserializeAws_restJson1ListDatabasesCommand = async (output, context) => {
|
|
726
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
727
|
+
return deserializeAws_restJson1ListDatabasesCommandError(output, context);
|
|
728
|
+
}
|
|
729
|
+
const contents = map({
|
|
730
|
+
$metadata: deserializeMetadata(output),
|
|
731
|
+
});
|
|
732
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
733
|
+
if (data.Databases != null) {
|
|
734
|
+
contents.Databases = deserializeAws_restJson1DatabaseSummaryList(data.Databases, context);
|
|
735
|
+
}
|
|
736
|
+
if (data.NextToken != null) {
|
|
737
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
738
|
+
}
|
|
739
|
+
return contents;
|
|
740
|
+
};
|
|
741
|
+
exports.deserializeAws_restJson1ListDatabasesCommand = deserializeAws_restJson1ListDatabasesCommand;
|
|
742
|
+
const deserializeAws_restJson1ListDatabasesCommandError = async (output, context) => {
|
|
743
|
+
const parsedOutput = {
|
|
744
|
+
...output,
|
|
745
|
+
body: await parseErrorBody(output.body, context),
|
|
746
|
+
};
|
|
747
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
748
|
+
switch (errorCode) {
|
|
749
|
+
case "InternalServerException":
|
|
750
|
+
case "com.amazonaws.ssmsap#InternalServerException":
|
|
751
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
752
|
+
case "ResourceNotFoundException":
|
|
753
|
+
case "com.amazonaws.ssmsap#ResourceNotFoundException":
|
|
754
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
755
|
+
case "ValidationException":
|
|
756
|
+
case "com.amazonaws.ssmsap#ValidationException":
|
|
757
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
758
|
+
default:
|
|
759
|
+
const parsedBody = parsedOutput.body;
|
|
760
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
761
|
+
output,
|
|
762
|
+
parsedBody,
|
|
763
|
+
exceptionCtor: SsmSapServiceException_1.SsmSapServiceException,
|
|
764
|
+
errorCode,
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
};
|
|
768
|
+
const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
769
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
770
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
771
|
+
}
|
|
772
|
+
const contents = map({
|
|
773
|
+
$metadata: deserializeMetadata(output),
|
|
774
|
+
});
|
|
775
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
776
|
+
if (data.tags != null) {
|
|
777
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
778
|
+
}
|
|
779
|
+
return contents;
|
|
780
|
+
};
|
|
781
|
+
exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand;
|
|
782
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
783
|
+
const parsedOutput = {
|
|
784
|
+
...output,
|
|
785
|
+
body: await parseErrorBody(output.body, context),
|
|
786
|
+
};
|
|
787
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
788
|
+
switch (errorCode) {
|
|
789
|
+
case "ConflictException":
|
|
790
|
+
case "com.amazonaws.ssmsap#ConflictException":
|
|
791
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
792
|
+
case "ResourceNotFoundException":
|
|
793
|
+
case "com.amazonaws.ssmsap#ResourceNotFoundException":
|
|
794
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
795
|
+
case "ValidationException":
|
|
796
|
+
case "com.amazonaws.ssmsap#ValidationException":
|
|
797
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
798
|
+
default:
|
|
799
|
+
const parsedBody = parsedOutput.body;
|
|
800
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
801
|
+
output,
|
|
802
|
+
parsedBody,
|
|
803
|
+
exceptionCtor: SsmSapServiceException_1.SsmSapServiceException,
|
|
804
|
+
errorCode,
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
};
|
|
808
|
+
const deserializeAws_restJson1PutResourcePermissionCommand = async (output, context) => {
|
|
809
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
810
|
+
return deserializeAws_restJson1PutResourcePermissionCommandError(output, context);
|
|
811
|
+
}
|
|
812
|
+
const contents = map({
|
|
813
|
+
$metadata: deserializeMetadata(output),
|
|
814
|
+
});
|
|
815
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
816
|
+
if (data.Policy != null) {
|
|
817
|
+
contents.Policy = (0, smithy_client_1.expectString)(data.Policy);
|
|
818
|
+
}
|
|
819
|
+
return contents;
|
|
820
|
+
};
|
|
821
|
+
exports.deserializeAws_restJson1PutResourcePermissionCommand = deserializeAws_restJson1PutResourcePermissionCommand;
|
|
822
|
+
const deserializeAws_restJson1PutResourcePermissionCommandError = async (output, context) => {
|
|
823
|
+
const parsedOutput = {
|
|
824
|
+
...output,
|
|
825
|
+
body: await parseErrorBody(output.body, context),
|
|
826
|
+
};
|
|
827
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
828
|
+
switch (errorCode) {
|
|
829
|
+
case "InternalServerException":
|
|
830
|
+
case "com.amazonaws.ssmsap#InternalServerException":
|
|
831
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
832
|
+
case "ResourceNotFoundException":
|
|
833
|
+
case "com.amazonaws.ssmsap#ResourceNotFoundException":
|
|
834
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
835
|
+
case "ValidationException":
|
|
836
|
+
case "com.amazonaws.ssmsap#ValidationException":
|
|
837
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
838
|
+
default:
|
|
839
|
+
const parsedBody = parsedOutput.body;
|
|
840
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
841
|
+
output,
|
|
842
|
+
parsedBody,
|
|
843
|
+
exceptionCtor: SsmSapServiceException_1.SsmSapServiceException,
|
|
844
|
+
errorCode,
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
};
|
|
848
|
+
const deserializeAws_restJson1RegisterApplicationCommand = async (output, context) => {
|
|
849
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
850
|
+
return deserializeAws_restJson1RegisterApplicationCommandError(output, context);
|
|
851
|
+
}
|
|
852
|
+
const contents = map({
|
|
853
|
+
$metadata: deserializeMetadata(output),
|
|
854
|
+
});
|
|
855
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
856
|
+
if (data.Application != null) {
|
|
857
|
+
contents.Application = deserializeAws_restJson1Application(data.Application, context);
|
|
858
|
+
}
|
|
859
|
+
if (data.OperationId != null) {
|
|
860
|
+
contents.OperationId = (0, smithy_client_1.expectString)(data.OperationId);
|
|
861
|
+
}
|
|
862
|
+
return contents;
|
|
863
|
+
};
|
|
864
|
+
exports.deserializeAws_restJson1RegisterApplicationCommand = deserializeAws_restJson1RegisterApplicationCommand;
|
|
865
|
+
const deserializeAws_restJson1RegisterApplicationCommandError = async (output, context) => {
|
|
866
|
+
const parsedOutput = {
|
|
867
|
+
...output,
|
|
868
|
+
body: await parseErrorBody(output.body, context),
|
|
869
|
+
};
|
|
870
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
871
|
+
switch (errorCode) {
|
|
872
|
+
case "ConflictException":
|
|
873
|
+
case "com.amazonaws.ssmsap#ConflictException":
|
|
874
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
875
|
+
case "InternalServerException":
|
|
876
|
+
case "com.amazonaws.ssmsap#InternalServerException":
|
|
877
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
878
|
+
case "ValidationException":
|
|
879
|
+
case "com.amazonaws.ssmsap#ValidationException":
|
|
880
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
881
|
+
default:
|
|
882
|
+
const parsedBody = parsedOutput.body;
|
|
883
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
884
|
+
output,
|
|
885
|
+
parsedBody,
|
|
886
|
+
exceptionCtor: SsmSapServiceException_1.SsmSapServiceException,
|
|
887
|
+
errorCode,
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
};
|
|
891
|
+
const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
892
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
893
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
894
|
+
}
|
|
895
|
+
const contents = map({
|
|
896
|
+
$metadata: deserializeMetadata(output),
|
|
897
|
+
});
|
|
898
|
+
await collectBody(output.body, context);
|
|
899
|
+
return contents;
|
|
900
|
+
};
|
|
901
|
+
exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1TagResourceCommand;
|
|
902
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
903
|
+
const parsedOutput = {
|
|
904
|
+
...output,
|
|
905
|
+
body: await parseErrorBody(output.body, context),
|
|
906
|
+
};
|
|
907
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
908
|
+
switch (errorCode) {
|
|
909
|
+
case "ConflictException":
|
|
910
|
+
case "com.amazonaws.ssmsap#ConflictException":
|
|
911
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
912
|
+
case "ResourceNotFoundException":
|
|
913
|
+
case "com.amazonaws.ssmsap#ResourceNotFoundException":
|
|
914
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
915
|
+
case "ValidationException":
|
|
916
|
+
case "com.amazonaws.ssmsap#ValidationException":
|
|
917
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
918
|
+
default:
|
|
919
|
+
const parsedBody = parsedOutput.body;
|
|
920
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
921
|
+
output,
|
|
922
|
+
parsedBody,
|
|
923
|
+
exceptionCtor: SsmSapServiceException_1.SsmSapServiceException,
|
|
924
|
+
errorCode,
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
};
|
|
928
|
+
const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
929
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
930
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
931
|
+
}
|
|
932
|
+
const contents = map({
|
|
933
|
+
$metadata: deserializeMetadata(output),
|
|
934
|
+
});
|
|
935
|
+
await collectBody(output.body, context);
|
|
936
|
+
return contents;
|
|
937
|
+
};
|
|
938
|
+
exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1UntagResourceCommand;
|
|
939
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
940
|
+
const parsedOutput = {
|
|
941
|
+
...output,
|
|
942
|
+
body: await parseErrorBody(output.body, context),
|
|
943
|
+
};
|
|
944
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
945
|
+
switch (errorCode) {
|
|
946
|
+
case "ConflictException":
|
|
947
|
+
case "com.amazonaws.ssmsap#ConflictException":
|
|
948
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
949
|
+
case "ResourceNotFoundException":
|
|
950
|
+
case "com.amazonaws.ssmsap#ResourceNotFoundException":
|
|
951
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
952
|
+
case "ValidationException":
|
|
953
|
+
case "com.amazonaws.ssmsap#ValidationException":
|
|
954
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
955
|
+
default:
|
|
956
|
+
const parsedBody = parsedOutput.body;
|
|
957
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
958
|
+
output,
|
|
959
|
+
parsedBody,
|
|
960
|
+
exceptionCtor: SsmSapServiceException_1.SsmSapServiceException,
|
|
961
|
+
errorCode,
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
};
|
|
965
|
+
const deserializeAws_restJson1UpdateApplicationSettingsCommand = async (output, context) => {
|
|
966
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
967
|
+
return deserializeAws_restJson1UpdateApplicationSettingsCommandError(output, context);
|
|
968
|
+
}
|
|
969
|
+
const contents = map({
|
|
970
|
+
$metadata: deserializeMetadata(output),
|
|
971
|
+
});
|
|
972
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
973
|
+
if (data.Message != null) {
|
|
974
|
+
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
975
|
+
}
|
|
976
|
+
if (data.OperationIds != null) {
|
|
977
|
+
contents.OperationIds = deserializeAws_restJson1OperationIdList(data.OperationIds, context);
|
|
978
|
+
}
|
|
979
|
+
return contents;
|
|
980
|
+
};
|
|
981
|
+
exports.deserializeAws_restJson1UpdateApplicationSettingsCommand = deserializeAws_restJson1UpdateApplicationSettingsCommand;
|
|
982
|
+
const deserializeAws_restJson1UpdateApplicationSettingsCommandError = async (output, context) => {
|
|
983
|
+
const parsedOutput = {
|
|
984
|
+
...output,
|
|
985
|
+
body: await parseErrorBody(output.body, context),
|
|
986
|
+
};
|
|
987
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
988
|
+
switch (errorCode) {
|
|
989
|
+
case "InternalServerException":
|
|
990
|
+
case "com.amazonaws.ssmsap#InternalServerException":
|
|
991
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
992
|
+
case "ResourceNotFoundException":
|
|
993
|
+
case "com.amazonaws.ssmsap#ResourceNotFoundException":
|
|
994
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
995
|
+
case "ValidationException":
|
|
996
|
+
case "com.amazonaws.ssmsap#ValidationException":
|
|
997
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
998
|
+
default:
|
|
999
|
+
const parsedBody = parsedOutput.body;
|
|
1000
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1001
|
+
output,
|
|
1002
|
+
parsedBody,
|
|
1003
|
+
exceptionCtor: SsmSapServiceException_1.SsmSapServiceException,
|
|
1004
|
+
errorCode,
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
1007
|
+
};
|
|
1008
|
+
const map = smithy_client_1.map;
|
|
1009
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
1010
|
+
const contents = map({});
|
|
1011
|
+
const data = parsedOutput.body;
|
|
1012
|
+
if (data.Message != null) {
|
|
1013
|
+
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1014
|
+
}
|
|
1015
|
+
const exception = new models_0_1.ConflictException({
|
|
1016
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1017
|
+
...contents,
|
|
1018
|
+
});
|
|
1019
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1020
|
+
};
|
|
1021
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
1022
|
+
const contents = map({});
|
|
1023
|
+
const data = parsedOutput.body;
|
|
1024
|
+
if (data.Message != null) {
|
|
1025
|
+
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1026
|
+
}
|
|
1027
|
+
const exception = new models_0_1.InternalServerException({
|
|
1028
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1029
|
+
...contents,
|
|
1030
|
+
});
|
|
1031
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1032
|
+
};
|
|
1033
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1034
|
+
const contents = map({});
|
|
1035
|
+
const data = parsedOutput.body;
|
|
1036
|
+
if (data.Message != null) {
|
|
1037
|
+
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1038
|
+
}
|
|
1039
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
1040
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1041
|
+
...contents,
|
|
1042
|
+
});
|
|
1043
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1044
|
+
};
|
|
1045
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
1046
|
+
const contents = map({});
|
|
1047
|
+
const data = parsedOutput.body;
|
|
1048
|
+
if (data.Message != null) {
|
|
1049
|
+
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1050
|
+
}
|
|
1051
|
+
const exception = new models_0_1.ValidationException({
|
|
1052
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1053
|
+
...contents,
|
|
1054
|
+
});
|
|
1055
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1056
|
+
};
|
|
1057
|
+
const serializeAws_restJson1ApplicationCredential = (input, context) => {
|
|
1058
|
+
return {
|
|
1059
|
+
...(input.CredentialType != null && { CredentialType: input.CredentialType }),
|
|
1060
|
+
...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }),
|
|
1061
|
+
...(input.SecretId != null && { SecretId: input.SecretId }),
|
|
1062
|
+
};
|
|
1063
|
+
};
|
|
1064
|
+
const serializeAws_restJson1ApplicationCredentialList = (input, context) => {
|
|
1065
|
+
return input
|
|
1066
|
+
.filter((e) => e != null)
|
|
1067
|
+
.map((entry) => {
|
|
1068
|
+
return serializeAws_restJson1ApplicationCredential(entry, context);
|
|
1069
|
+
});
|
|
1070
|
+
};
|
|
1071
|
+
const serializeAws_restJson1InstanceList = (input, context) => {
|
|
1072
|
+
return input
|
|
1073
|
+
.filter((e) => e != null)
|
|
1074
|
+
.map((entry) => {
|
|
1075
|
+
return entry;
|
|
1076
|
+
});
|
|
1077
|
+
};
|
|
1078
|
+
const serializeAws_restJson1TagMap = (input, context) => {
|
|
1079
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1080
|
+
if (value === null) {
|
|
1081
|
+
return acc;
|
|
1082
|
+
}
|
|
1083
|
+
acc[key] = value;
|
|
1084
|
+
return acc;
|
|
1085
|
+
}, {});
|
|
1086
|
+
};
|
|
1087
|
+
const deserializeAws_restJson1Application = (output, context) => {
|
|
1088
|
+
return {
|
|
1089
|
+
AppRegistryArn: (0, smithy_client_1.expectString)(output.AppRegistryArn),
|
|
1090
|
+
Arn: (0, smithy_client_1.expectString)(output.Arn),
|
|
1091
|
+
Components: output.Components != null ? deserializeAws_restJson1ComponentIdList(output.Components, context) : undefined,
|
|
1092
|
+
Id: (0, smithy_client_1.expectString)(output.Id),
|
|
1093
|
+
LastUpdated: output.LastUpdated != null
|
|
1094
|
+
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdated)))
|
|
1095
|
+
: undefined,
|
|
1096
|
+
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
1097
|
+
StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
|
|
1098
|
+
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
1099
|
+
};
|
|
1100
|
+
};
|
|
1101
|
+
const deserializeAws_restJson1ApplicationCredential = (output, context) => {
|
|
1102
|
+
return {
|
|
1103
|
+
CredentialType: (0, smithy_client_1.expectString)(output.CredentialType),
|
|
1104
|
+
DatabaseName: (0, smithy_client_1.expectString)(output.DatabaseName),
|
|
1105
|
+
SecretId: (0, smithy_client_1.expectString)(output.SecretId),
|
|
1106
|
+
};
|
|
1107
|
+
};
|
|
1108
|
+
const deserializeAws_restJson1ApplicationCredentialList = (output, context) => {
|
|
1109
|
+
const retVal = (output || [])
|
|
1110
|
+
.filter((e) => e != null)
|
|
1111
|
+
.map((entry) => {
|
|
1112
|
+
if (entry === null) {
|
|
1113
|
+
return null;
|
|
1114
|
+
}
|
|
1115
|
+
return deserializeAws_restJson1ApplicationCredential(entry, context);
|
|
1116
|
+
});
|
|
1117
|
+
return retVal;
|
|
1118
|
+
};
|
|
1119
|
+
const deserializeAws_restJson1ApplicationSummary = (output, context) => {
|
|
1120
|
+
return {
|
|
1121
|
+
Arn: (0, smithy_client_1.expectString)(output.Arn),
|
|
1122
|
+
Id: (0, smithy_client_1.expectString)(output.Id),
|
|
1123
|
+
Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
|
|
1124
|
+
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
1125
|
+
};
|
|
1126
|
+
};
|
|
1127
|
+
const deserializeAws_restJson1ApplicationSummaryList = (output, context) => {
|
|
1128
|
+
const retVal = (output || [])
|
|
1129
|
+
.filter((e) => e != null)
|
|
1130
|
+
.map((entry) => {
|
|
1131
|
+
if (entry === null) {
|
|
1132
|
+
return null;
|
|
1133
|
+
}
|
|
1134
|
+
return deserializeAws_restJson1ApplicationSummary(entry, context);
|
|
1135
|
+
});
|
|
1136
|
+
return retVal;
|
|
1137
|
+
};
|
|
1138
|
+
const deserializeAws_restJson1Component = (output, context) => {
|
|
1139
|
+
return {
|
|
1140
|
+
ApplicationId: (0, smithy_client_1.expectString)(output.ApplicationId),
|
|
1141
|
+
ComponentId: (0, smithy_client_1.expectString)(output.ComponentId),
|
|
1142
|
+
ComponentType: (0, smithy_client_1.expectString)(output.ComponentType),
|
|
1143
|
+
Databases: output.Databases != null ? deserializeAws_restJson1DatabaseIdList(output.Databases, context) : undefined,
|
|
1144
|
+
Hosts: output.Hosts != null ? deserializeAws_restJson1HostList(output.Hosts, context) : undefined,
|
|
1145
|
+
LastUpdated: output.LastUpdated != null
|
|
1146
|
+
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdated)))
|
|
1147
|
+
: undefined,
|
|
1148
|
+
PrimaryHost: (0, smithy_client_1.expectString)(output.PrimaryHost),
|
|
1149
|
+
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
1150
|
+
};
|
|
1151
|
+
};
|
|
1152
|
+
const deserializeAws_restJson1ComponentIdList = (output, context) => {
|
|
1153
|
+
const retVal = (output || [])
|
|
1154
|
+
.filter((e) => e != null)
|
|
1155
|
+
.map((entry) => {
|
|
1156
|
+
if (entry === null) {
|
|
1157
|
+
return null;
|
|
1158
|
+
}
|
|
1159
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
1160
|
+
});
|
|
1161
|
+
return retVal;
|
|
1162
|
+
};
|
|
1163
|
+
const deserializeAws_restJson1ComponentSummary = (output, context) => {
|
|
1164
|
+
return {
|
|
1165
|
+
ApplicationId: (0, smithy_client_1.expectString)(output.ApplicationId),
|
|
1166
|
+
ComponentId: (0, smithy_client_1.expectString)(output.ComponentId),
|
|
1167
|
+
ComponentType: (0, smithy_client_1.expectString)(output.ComponentType),
|
|
1168
|
+
Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
|
|
1169
|
+
};
|
|
1170
|
+
};
|
|
1171
|
+
const deserializeAws_restJson1ComponentSummaryList = (output, context) => {
|
|
1172
|
+
const retVal = (output || [])
|
|
1173
|
+
.filter((e) => e != null)
|
|
1174
|
+
.map((entry) => {
|
|
1175
|
+
if (entry === null) {
|
|
1176
|
+
return null;
|
|
1177
|
+
}
|
|
1178
|
+
return deserializeAws_restJson1ComponentSummary(entry, context);
|
|
1179
|
+
});
|
|
1180
|
+
return retVal;
|
|
1181
|
+
};
|
|
1182
|
+
const deserializeAws_restJson1Database = (output, context) => {
|
|
1183
|
+
return {
|
|
1184
|
+
ApplicationId: (0, smithy_client_1.expectString)(output.ApplicationId),
|
|
1185
|
+
Arn: (0, smithy_client_1.expectString)(output.Arn),
|
|
1186
|
+
ComponentId: (0, smithy_client_1.expectString)(output.ComponentId),
|
|
1187
|
+
Credentials: output.Credentials != null
|
|
1188
|
+
? deserializeAws_restJson1ApplicationCredentialList(output.Credentials, context)
|
|
1189
|
+
: undefined,
|
|
1190
|
+
DatabaseId: (0, smithy_client_1.expectString)(output.DatabaseId),
|
|
1191
|
+
DatabaseName: (0, smithy_client_1.expectString)(output.DatabaseName),
|
|
1192
|
+
DatabaseType: (0, smithy_client_1.expectString)(output.DatabaseType),
|
|
1193
|
+
LastUpdated: output.LastUpdated != null
|
|
1194
|
+
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdated)))
|
|
1195
|
+
: undefined,
|
|
1196
|
+
PrimaryHost: (0, smithy_client_1.expectString)(output.PrimaryHost),
|
|
1197
|
+
SQLPort: (0, smithy_client_1.expectInt32)(output.SQLPort),
|
|
1198
|
+
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
1199
|
+
};
|
|
1200
|
+
};
|
|
1201
|
+
const deserializeAws_restJson1DatabaseIdList = (output, context) => {
|
|
1202
|
+
const retVal = (output || [])
|
|
1203
|
+
.filter((e) => e != null)
|
|
1204
|
+
.map((entry) => {
|
|
1205
|
+
if (entry === null) {
|
|
1206
|
+
return null;
|
|
1207
|
+
}
|
|
1208
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
1209
|
+
});
|
|
1210
|
+
return retVal;
|
|
1211
|
+
};
|
|
1212
|
+
const deserializeAws_restJson1DatabaseSummary = (output, context) => {
|
|
1213
|
+
return {
|
|
1214
|
+
ApplicationId: (0, smithy_client_1.expectString)(output.ApplicationId),
|
|
1215
|
+
Arn: (0, smithy_client_1.expectString)(output.Arn),
|
|
1216
|
+
ComponentId: (0, smithy_client_1.expectString)(output.ComponentId),
|
|
1217
|
+
DatabaseId: (0, smithy_client_1.expectString)(output.DatabaseId),
|
|
1218
|
+
DatabaseType: (0, smithy_client_1.expectString)(output.DatabaseType),
|
|
1219
|
+
Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
|
|
1220
|
+
};
|
|
1221
|
+
};
|
|
1222
|
+
const deserializeAws_restJson1DatabaseSummaryList = (output, context) => {
|
|
1223
|
+
const retVal = (output || [])
|
|
1224
|
+
.filter((e) => e != null)
|
|
1225
|
+
.map((entry) => {
|
|
1226
|
+
if (entry === null) {
|
|
1227
|
+
return null;
|
|
1228
|
+
}
|
|
1229
|
+
return deserializeAws_restJson1DatabaseSummary(entry, context);
|
|
1230
|
+
});
|
|
1231
|
+
return retVal;
|
|
1232
|
+
};
|
|
1233
|
+
const deserializeAws_restJson1Host = (output, context) => {
|
|
1234
|
+
return {
|
|
1235
|
+
HostIp: (0, smithy_client_1.expectString)(output.HostIp),
|
|
1236
|
+
HostName: (0, smithy_client_1.expectString)(output.HostName),
|
|
1237
|
+
HostRole: (0, smithy_client_1.expectString)(output.HostRole),
|
|
1238
|
+
InstanceId: (0, smithy_client_1.expectString)(output.InstanceId),
|
|
1239
|
+
};
|
|
1240
|
+
};
|
|
1241
|
+
const deserializeAws_restJson1HostList = (output, context) => {
|
|
1242
|
+
const retVal = (output || [])
|
|
1243
|
+
.filter((e) => e != null)
|
|
1244
|
+
.map((entry) => {
|
|
1245
|
+
if (entry === null) {
|
|
1246
|
+
return null;
|
|
1247
|
+
}
|
|
1248
|
+
return deserializeAws_restJson1Host(entry, context);
|
|
1249
|
+
});
|
|
1250
|
+
return retVal;
|
|
1251
|
+
};
|
|
1252
|
+
const deserializeAws_restJson1Operation = (output, context) => {
|
|
1253
|
+
return {
|
|
1254
|
+
EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
|
|
1255
|
+
Id: (0, smithy_client_1.expectString)(output.Id),
|
|
1256
|
+
LastUpdatedTime: output.LastUpdatedTime != null
|
|
1257
|
+
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastUpdatedTime)))
|
|
1258
|
+
: undefined,
|
|
1259
|
+
Properties: output.Properties != null ? deserializeAws_restJson1OperationProperties(output.Properties, context) : undefined,
|
|
1260
|
+
ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
|
|
1261
|
+
ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
|
|
1262
|
+
ResourceType: (0, smithy_client_1.expectString)(output.ResourceType),
|
|
1263
|
+
StartTime: output.StartTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTime))) : undefined,
|
|
1264
|
+
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
1265
|
+
StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage),
|
|
1266
|
+
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
1267
|
+
};
|
|
1268
|
+
};
|
|
1269
|
+
const deserializeAws_restJson1OperationIdList = (output, context) => {
|
|
1270
|
+
const retVal = (output || [])
|
|
1271
|
+
.filter((e) => e != null)
|
|
1272
|
+
.map((entry) => {
|
|
1273
|
+
if (entry === null) {
|
|
1274
|
+
return null;
|
|
1275
|
+
}
|
|
1276
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
1277
|
+
});
|
|
1278
|
+
return retVal;
|
|
1279
|
+
};
|
|
1280
|
+
const deserializeAws_restJson1OperationProperties = (output, context) => {
|
|
1281
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1282
|
+
if (value === null) {
|
|
1283
|
+
acc[key] = null;
|
|
1284
|
+
return acc;
|
|
1285
|
+
}
|
|
1286
|
+
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
1287
|
+
return acc;
|
|
1288
|
+
}, {});
|
|
1289
|
+
};
|
|
1290
|
+
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
1291
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1292
|
+
if (value === null) {
|
|
1293
|
+
return acc;
|
|
1294
|
+
}
|
|
1295
|
+
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
1296
|
+
return acc;
|
|
1297
|
+
}, {});
|
|
1298
|
+
};
|
|
1299
|
+
const deserializeMetadata = (output) => ({
|
|
1300
|
+
httpStatusCode: output.statusCode,
|
|
1301
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1302
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1303
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1304
|
+
});
|
|
1305
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1306
|
+
if (streamBody instanceof Uint8Array) {
|
|
1307
|
+
return Promise.resolve(streamBody);
|
|
1308
|
+
}
|
|
1309
|
+
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1310
|
+
};
|
|
1311
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1312
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1313
|
+
value !== null &&
|
|
1314
|
+
value !== "" &&
|
|
1315
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1316
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1317
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1318
|
+
if (encoded.length) {
|
|
1319
|
+
return JSON.parse(encoded);
|
|
1320
|
+
}
|
|
1321
|
+
return {};
|
|
1322
|
+
});
|
|
1323
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1324
|
+
const value = await parseBody(errorBody, context);
|
|
1325
|
+
value.message = value.message ?? value.Message;
|
|
1326
|
+
return value;
|
|
1327
|
+
};
|
|
1328
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1329
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1330
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1331
|
+
let cleanValue = rawValue;
|
|
1332
|
+
if (typeof cleanValue === "number") {
|
|
1333
|
+
cleanValue = cleanValue.toString();
|
|
1334
|
+
}
|
|
1335
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
1336
|
+
cleanValue = cleanValue.split(",")[0];
|
|
1337
|
+
}
|
|
1338
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
1339
|
+
cleanValue = cleanValue.split(":")[0];
|
|
1340
|
+
}
|
|
1341
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
1342
|
+
cleanValue = cleanValue.split("#")[1];
|
|
1343
|
+
}
|
|
1344
|
+
return cleanValue;
|
|
1345
|
+
};
|
|
1346
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1347
|
+
if (headerKey !== undefined) {
|
|
1348
|
+
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1349
|
+
}
|
|
1350
|
+
if (data.code !== undefined) {
|
|
1351
|
+
return sanitizeErrorCode(data.code);
|
|
1352
|
+
}
|
|
1353
|
+
if (data["__type"] !== undefined) {
|
|
1354
|
+
return sanitizeErrorCode(data["__type"]);
|
|
1355
|
+
}
|
|
1356
|
+
};
|