@aws-sdk/client-docdb-elastic 3.474.0 → 3.477.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.
@@ -1,17 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateClusterCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_RestoreClusterFromSnapshotCommand = exports.de_ListTagsForResourceCommand = exports.de_ListClusterSnapshotsCommand = exports.de_ListClustersCommand = exports.de_GetClusterSnapshotCommand = exports.de_GetClusterCommand = exports.de_DeleteClusterSnapshotCommand = exports.de_DeleteClusterCommand = exports.de_CreateClusterSnapshotCommand = exports.de_CreateClusterCommand = exports.se_UpdateClusterCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_RestoreClusterFromSnapshotCommand = exports.se_ListTagsForResourceCommand = exports.se_ListClusterSnapshotsCommand = exports.se_ListClustersCommand = exports.se_GetClusterSnapshotCommand = exports.se_GetClusterCommand = exports.se_DeleteClusterSnapshotCommand = exports.se_DeleteClusterCommand = exports.se_CreateClusterSnapshotCommand = exports.se_CreateClusterCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const uuid_1 = require("uuid");
7
7
  const DocDBElasticServiceException_1 = require("../models/DocDBElasticServiceException");
8
8
  const models_0_1 = require("../models/models_0");
9
9
  const se_CreateClusterCommand = async (input, context) => {
10
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const b = (0, core_1.requestBuilder)(input, context);
11
11
  const headers = {
12
12
  "content-type": "application/json",
13
13
  };
14
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster";
14
+ b.bp("/cluster");
15
15
  let body;
16
16
  body = JSON.stringify((0, smithy_client_1.take)(input, {
17
17
  adminUserName: [],
@@ -27,175 +27,110 @@ const se_CreateClusterCommand = async (input, context) => {
27
27
  tags: (_) => (0, smithy_client_1._json)(_),
28
28
  vpcSecurityGroupIds: (_) => (0, smithy_client_1._json)(_),
29
29
  }));
30
- return new protocol_http_1.HttpRequest({
31
- protocol,
32
- hostname,
33
- port,
34
- method: "POST",
35
- headers,
36
- path: resolvedPath,
37
- body,
38
- });
30
+ b.m("POST").h(headers).b(body);
31
+ return b.build();
39
32
  };
40
33
  exports.se_CreateClusterCommand = se_CreateClusterCommand;
41
34
  const se_CreateClusterSnapshotCommand = async (input, context) => {
42
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
35
+ const b = (0, core_1.requestBuilder)(input, context);
43
36
  const headers = {
44
37
  "content-type": "application/json",
45
38
  };
46
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-snapshot";
39
+ b.bp("/cluster-snapshot");
47
40
  let body;
48
41
  body = JSON.stringify((0, smithy_client_1.take)(input, {
49
42
  clusterArn: [],
50
43
  snapshotName: [],
51
44
  tags: (_) => (0, smithy_client_1._json)(_),
52
45
  }));
53
- return new protocol_http_1.HttpRequest({
54
- protocol,
55
- hostname,
56
- port,
57
- method: "POST",
58
- headers,
59
- path: resolvedPath,
60
- body,
61
- });
46
+ b.m("POST").h(headers).b(body);
47
+ return b.build();
62
48
  };
63
49
  exports.se_CreateClusterSnapshotCommand = se_CreateClusterSnapshotCommand;
64
50
  const se_DeleteClusterCommand = async (input, context) => {
65
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
51
+ const b = (0, core_1.requestBuilder)(input, context);
66
52
  const headers = {};
67
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster/{clusterArn}";
68
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterArn", () => input.clusterArn, "{clusterArn}", false);
53
+ b.bp("/cluster/{clusterArn}");
54
+ b.p("clusterArn", () => input.clusterArn, "{clusterArn}", false);
69
55
  let body;
70
- return new protocol_http_1.HttpRequest({
71
- protocol,
72
- hostname,
73
- port,
74
- method: "DELETE",
75
- headers,
76
- path: resolvedPath,
77
- body,
78
- });
56
+ b.m("DELETE").h(headers).b(body);
57
+ return b.build();
79
58
  };
80
59
  exports.se_DeleteClusterCommand = se_DeleteClusterCommand;
81
60
  const se_DeleteClusterSnapshotCommand = async (input, context) => {
82
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
61
+ const b = (0, core_1.requestBuilder)(input, context);
83
62
  const headers = {};
84
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-snapshot/{snapshotArn}";
85
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "snapshotArn", () => input.snapshotArn, "{snapshotArn}", false);
63
+ b.bp("/cluster-snapshot/{snapshotArn}");
64
+ b.p("snapshotArn", () => input.snapshotArn, "{snapshotArn}", false);
86
65
  let body;
87
- return new protocol_http_1.HttpRequest({
88
- protocol,
89
- hostname,
90
- port,
91
- method: "DELETE",
92
- headers,
93
- path: resolvedPath,
94
- body,
95
- });
66
+ b.m("DELETE").h(headers).b(body);
67
+ return b.build();
96
68
  };
97
69
  exports.se_DeleteClusterSnapshotCommand = se_DeleteClusterSnapshotCommand;
98
70
  const se_GetClusterCommand = async (input, context) => {
99
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
71
+ const b = (0, core_1.requestBuilder)(input, context);
100
72
  const headers = {};
101
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster/{clusterArn}";
102
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterArn", () => input.clusterArn, "{clusterArn}", false);
73
+ b.bp("/cluster/{clusterArn}");
74
+ b.p("clusterArn", () => input.clusterArn, "{clusterArn}", false);
103
75
  let body;
104
- return new protocol_http_1.HttpRequest({
105
- protocol,
106
- hostname,
107
- port,
108
- method: "GET",
109
- headers,
110
- path: resolvedPath,
111
- body,
112
- });
76
+ b.m("GET").h(headers).b(body);
77
+ return b.build();
113
78
  };
114
79
  exports.se_GetClusterCommand = se_GetClusterCommand;
115
80
  const se_GetClusterSnapshotCommand = async (input, context) => {
116
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
81
+ const b = (0, core_1.requestBuilder)(input, context);
117
82
  const headers = {};
118
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-snapshot/{snapshotArn}";
119
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "snapshotArn", () => input.snapshotArn, "{snapshotArn}", false);
83
+ b.bp("/cluster-snapshot/{snapshotArn}");
84
+ b.p("snapshotArn", () => input.snapshotArn, "{snapshotArn}", false);
120
85
  let body;
121
- return new protocol_http_1.HttpRequest({
122
- protocol,
123
- hostname,
124
- port,
125
- method: "GET",
126
- headers,
127
- path: resolvedPath,
128
- body,
129
- });
86
+ b.m("GET").h(headers).b(body);
87
+ return b.build();
130
88
  };
131
89
  exports.se_GetClusterSnapshotCommand = se_GetClusterSnapshotCommand;
132
90
  const se_ListClustersCommand = async (input, context) => {
133
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
91
+ const b = (0, core_1.requestBuilder)(input, context);
134
92
  const headers = {};
135
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters";
93
+ b.bp("/clusters");
136
94
  const query = (0, smithy_client_1.map)({
137
- nextToken: [, input.nextToken],
138
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
95
+ [_nT]: [, input[_nT]],
96
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
139
97
  });
140
98
  let body;
141
- return new protocol_http_1.HttpRequest({
142
- protocol,
143
- hostname,
144
- port,
145
- method: "GET",
146
- headers,
147
- path: resolvedPath,
148
- query,
149
- body,
150
- });
99
+ b.m("GET").h(headers).q(query).b(body);
100
+ return b.build();
151
101
  };
152
102
  exports.se_ListClustersCommand = se_ListClustersCommand;
153
103
  const se_ListClusterSnapshotsCommand = async (input, context) => {
154
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
104
+ const b = (0, core_1.requestBuilder)(input, context);
155
105
  const headers = {};
156
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-snapshots";
106
+ b.bp("/cluster-snapshots");
157
107
  const query = (0, smithy_client_1.map)({
158
- clusterArn: [, input.clusterArn],
159
- nextToken: [, input.nextToken],
160
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
108
+ [_cA]: [, input[_cA]],
109
+ [_nT]: [, input[_nT]],
110
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
161
111
  });
162
112
  let body;
163
- return new protocol_http_1.HttpRequest({
164
- protocol,
165
- hostname,
166
- port,
167
- method: "GET",
168
- headers,
169
- path: resolvedPath,
170
- query,
171
- body,
172
- });
113
+ b.m("GET").h(headers).q(query).b(body);
114
+ return b.build();
173
115
  };
174
116
  exports.se_ListClusterSnapshotsCommand = se_ListClusterSnapshotsCommand;
175
117
  const se_ListTagsForResourceCommand = async (input, context) => {
176
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
118
+ const b = (0, core_1.requestBuilder)(input, context);
177
119
  const headers = {};
178
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
179
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
120
+ b.bp("/tags/{resourceArn}");
121
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
180
122
  let body;
181
- return new protocol_http_1.HttpRequest({
182
- protocol,
183
- hostname,
184
- port,
185
- method: "GET",
186
- headers,
187
- path: resolvedPath,
188
- body,
189
- });
123
+ b.m("GET").h(headers).b(body);
124
+ return b.build();
190
125
  };
191
126
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
192
127
  const se_RestoreClusterFromSnapshotCommand = async (input, context) => {
193
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
128
+ const b = (0, core_1.requestBuilder)(input, context);
194
129
  const headers = {
195
130
  "content-type": "application/json",
196
131
  };
197
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-snapshot/{snapshotArn}/restore";
198
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "snapshotArn", () => input.snapshotArn, "{snapshotArn}", false);
132
+ b.bp("/cluster-snapshot/{snapshotArn}/restore");
133
+ b.p("snapshotArn", () => input.snapshotArn, "{snapshotArn}", false);
199
134
  let body;
200
135
  body = JSON.stringify((0, smithy_client_1.take)(input, {
201
136
  clusterName: [],
@@ -204,70 +139,48 @@ const se_RestoreClusterFromSnapshotCommand = async (input, context) => {
204
139
  tags: (_) => (0, smithy_client_1._json)(_),
205
140
  vpcSecurityGroupIds: (_) => (0, smithy_client_1._json)(_),
206
141
  }));
207
- return new protocol_http_1.HttpRequest({
208
- protocol,
209
- hostname,
210
- port,
211
- method: "POST",
212
- headers,
213
- path: resolvedPath,
214
- body,
215
- });
142
+ b.m("POST").h(headers).b(body);
143
+ return b.build();
216
144
  };
217
145
  exports.se_RestoreClusterFromSnapshotCommand = se_RestoreClusterFromSnapshotCommand;
218
146
  const se_TagResourceCommand = async (input, context) => {
219
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
147
+ const b = (0, core_1.requestBuilder)(input, context);
220
148
  const headers = {
221
149
  "content-type": "application/json",
222
150
  };
223
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
224
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
151
+ b.bp("/tags/{resourceArn}");
152
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
225
153
  let body;
226
154
  body = JSON.stringify((0, smithy_client_1.take)(input, {
227
155
  tags: (_) => (0, smithy_client_1._json)(_),
228
156
  }));
229
- return new protocol_http_1.HttpRequest({
230
- protocol,
231
- hostname,
232
- port,
233
- method: "POST",
234
- headers,
235
- path: resolvedPath,
236
- body,
237
- });
157
+ b.m("POST").h(headers).b(body);
158
+ return b.build();
238
159
  };
239
160
  exports.se_TagResourceCommand = se_TagResourceCommand;
240
161
  const se_UntagResourceCommand = async (input, context) => {
241
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
162
+ const b = (0, core_1.requestBuilder)(input, context);
242
163
  const headers = {};
243
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
244
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
164
+ b.bp("/tags/{resourceArn}");
165
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
245
166
  const query = (0, smithy_client_1.map)({
246
- tagKeys: [
167
+ [_tK]: [
247
168
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
248
- () => (input.tagKeys || []).map((_entry) => _entry),
169
+ () => (input[_tK] || []).map((_entry) => _entry),
249
170
  ],
250
171
  });
251
172
  let body;
252
- return new protocol_http_1.HttpRequest({
253
- protocol,
254
- hostname,
255
- port,
256
- method: "DELETE",
257
- headers,
258
- path: resolvedPath,
259
- query,
260
- body,
261
- });
173
+ b.m("DELETE").h(headers).q(query).b(body);
174
+ return b.build();
262
175
  };
263
176
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
264
177
  const se_UpdateClusterCommand = async (input, context) => {
265
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
178
+ const b = (0, core_1.requestBuilder)(input, context);
266
179
  const headers = {
267
180
  "content-type": "application/json",
268
181
  };
269
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster/{clusterArn}";
270
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clusterArn", () => input.clusterArn, "{clusterArn}", false);
182
+ b.bp("/cluster/{clusterArn}");
183
+ b.p("clusterArn", () => input.clusterArn, "{clusterArn}", false);
271
184
  let body;
272
185
  body = JSON.stringify((0, smithy_client_1.take)(input, {
273
186
  adminUserPassword: [],
@@ -279,15 +192,8 @@ const se_UpdateClusterCommand = async (input, context) => {
279
192
  subnetIds: (_) => (0, smithy_client_1._json)(_),
280
193
  vpcSecurityGroupIds: (_) => (0, smithy_client_1._json)(_),
281
194
  }));
282
- return new protocol_http_1.HttpRequest({
283
- protocol,
284
- hostname,
285
- port,
286
- method: "PUT",
287
- headers,
288
- path: resolvedPath,
289
- body,
290
- });
195
+ b.m("PUT").h(headers).b(body);
196
+ return b.build();
291
197
  };
292
198
  exports.se_UpdateClusterCommand = se_UpdateClusterCommand;
293
199
  const de_CreateClusterCommand = async (output, context) => {
@@ -963,10 +869,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
963
869
  };
964
870
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
965
871
  const contents = (0, smithy_client_1.map)({
966
- retryAfterSeconds: [
967
- () => void 0 !== parsedOutput.headers["retry-after"],
968
- () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
969
- ],
872
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
970
873
  });
971
874
  const data = parsedOutput.body;
972
875
  const doc = (0, smithy_client_1.take)(data, {
@@ -1006,6 +909,12 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1006
909
  value !== "" &&
1007
910
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1008
911
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
912
+ const _cA = "clusterArn";
913
+ const _mR = "maxResults";
914
+ const _nT = "nextToken";
915
+ const _rAS = "retryAfterSeconds";
916
+ const _ra = "retry-after";
917
+ const _tK = "tagKeys";
1009
918
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1010
919
  if (encoded.length) {
1011
920
  return JSON.parse(encoded);
@@ -1,14 +1,14 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { DocDBElasticServiceException as __BaseException } from "../models/DocDBElasticServiceException";
5
5
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  export const se_CreateClusterCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = {
9
9
  "content-type": "application/json",
10
10
  };
11
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster";
11
+ b.bp("/cluster");
12
12
  let body;
13
13
  body = JSON.stringify(take(input, {
14
14
  adminUserName: [],
@@ -24,166 +24,101 @@ export const se_CreateClusterCommand = async (input, context) => {
24
24
  tags: (_) => _json(_),
25
25
  vpcSecurityGroupIds: (_) => _json(_),
26
26
  }));
27
- return new __HttpRequest({
28
- protocol,
29
- hostname,
30
- port,
31
- method: "POST",
32
- headers,
33
- path: resolvedPath,
34
- body,
35
- });
27
+ b.m("POST").h(headers).b(body);
28
+ return b.build();
36
29
  };
37
30
  export const se_CreateClusterSnapshotCommand = async (input, context) => {
38
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
31
+ const b = rb(input, context);
39
32
  const headers = {
40
33
  "content-type": "application/json",
41
34
  };
42
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-snapshot";
35
+ b.bp("/cluster-snapshot");
43
36
  let body;
44
37
  body = JSON.stringify(take(input, {
45
38
  clusterArn: [],
46
39
  snapshotName: [],
47
40
  tags: (_) => _json(_),
48
41
  }));
49
- return new __HttpRequest({
50
- protocol,
51
- hostname,
52
- port,
53
- method: "POST",
54
- headers,
55
- path: resolvedPath,
56
- body,
57
- });
42
+ b.m("POST").h(headers).b(body);
43
+ return b.build();
58
44
  };
59
45
  export const se_DeleteClusterCommand = async (input, context) => {
60
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
46
+ const b = rb(input, context);
61
47
  const headers = {};
62
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster/{clusterArn}";
63
- resolvedPath = __resolvedPath(resolvedPath, input, "clusterArn", () => input.clusterArn, "{clusterArn}", false);
48
+ b.bp("/cluster/{clusterArn}");
49
+ b.p("clusterArn", () => input.clusterArn, "{clusterArn}", false);
64
50
  let body;
65
- return new __HttpRequest({
66
- protocol,
67
- hostname,
68
- port,
69
- method: "DELETE",
70
- headers,
71
- path: resolvedPath,
72
- body,
73
- });
51
+ b.m("DELETE").h(headers).b(body);
52
+ return b.build();
74
53
  };
75
54
  export const se_DeleteClusterSnapshotCommand = async (input, context) => {
76
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
55
+ const b = rb(input, context);
77
56
  const headers = {};
78
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-snapshot/{snapshotArn}";
79
- resolvedPath = __resolvedPath(resolvedPath, input, "snapshotArn", () => input.snapshotArn, "{snapshotArn}", false);
57
+ b.bp("/cluster-snapshot/{snapshotArn}");
58
+ b.p("snapshotArn", () => input.snapshotArn, "{snapshotArn}", false);
80
59
  let body;
81
- return new __HttpRequest({
82
- protocol,
83
- hostname,
84
- port,
85
- method: "DELETE",
86
- headers,
87
- path: resolvedPath,
88
- body,
89
- });
60
+ b.m("DELETE").h(headers).b(body);
61
+ return b.build();
90
62
  };
91
63
  export const se_GetClusterCommand = async (input, context) => {
92
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
64
+ const b = rb(input, context);
93
65
  const headers = {};
94
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster/{clusterArn}";
95
- resolvedPath = __resolvedPath(resolvedPath, input, "clusterArn", () => input.clusterArn, "{clusterArn}", false);
66
+ b.bp("/cluster/{clusterArn}");
67
+ b.p("clusterArn", () => input.clusterArn, "{clusterArn}", false);
96
68
  let body;
97
- return new __HttpRequest({
98
- protocol,
99
- hostname,
100
- port,
101
- method: "GET",
102
- headers,
103
- path: resolvedPath,
104
- body,
105
- });
69
+ b.m("GET").h(headers).b(body);
70
+ return b.build();
106
71
  };
107
72
  export const se_GetClusterSnapshotCommand = async (input, context) => {
108
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
73
+ const b = rb(input, context);
109
74
  const headers = {};
110
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-snapshot/{snapshotArn}";
111
- resolvedPath = __resolvedPath(resolvedPath, input, "snapshotArn", () => input.snapshotArn, "{snapshotArn}", false);
75
+ b.bp("/cluster-snapshot/{snapshotArn}");
76
+ b.p("snapshotArn", () => input.snapshotArn, "{snapshotArn}", false);
112
77
  let body;
113
- return new __HttpRequest({
114
- protocol,
115
- hostname,
116
- port,
117
- method: "GET",
118
- headers,
119
- path: resolvedPath,
120
- body,
121
- });
78
+ b.m("GET").h(headers).b(body);
79
+ return b.build();
122
80
  };
123
81
  export const se_ListClustersCommand = async (input, context) => {
124
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
82
+ const b = rb(input, context);
125
83
  const headers = {};
126
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters";
84
+ b.bp("/clusters");
127
85
  const query = map({
128
- nextToken: [, input.nextToken],
129
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
86
+ [_nT]: [, input[_nT]],
87
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
130
88
  });
131
89
  let body;
132
- return new __HttpRequest({
133
- protocol,
134
- hostname,
135
- port,
136
- method: "GET",
137
- headers,
138
- path: resolvedPath,
139
- query,
140
- body,
141
- });
90
+ b.m("GET").h(headers).q(query).b(body);
91
+ return b.build();
142
92
  };
143
93
  export const se_ListClusterSnapshotsCommand = async (input, context) => {
144
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
94
+ const b = rb(input, context);
145
95
  const headers = {};
146
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-snapshots";
96
+ b.bp("/cluster-snapshots");
147
97
  const query = map({
148
- clusterArn: [, input.clusterArn],
149
- nextToken: [, input.nextToken],
150
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
98
+ [_cA]: [, input[_cA]],
99
+ [_nT]: [, input[_nT]],
100
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
151
101
  });
152
102
  let body;
153
- return new __HttpRequest({
154
- protocol,
155
- hostname,
156
- port,
157
- method: "GET",
158
- headers,
159
- path: resolvedPath,
160
- query,
161
- body,
162
- });
103
+ b.m("GET").h(headers).q(query).b(body);
104
+ return b.build();
163
105
  };
164
106
  export const se_ListTagsForResourceCommand = async (input, context) => {
165
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
107
+ const b = rb(input, context);
166
108
  const headers = {};
167
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
168
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
109
+ b.bp("/tags/{resourceArn}");
110
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
169
111
  let body;
170
- return new __HttpRequest({
171
- protocol,
172
- hostname,
173
- port,
174
- method: "GET",
175
- headers,
176
- path: resolvedPath,
177
- body,
178
- });
112
+ b.m("GET").h(headers).b(body);
113
+ return b.build();
179
114
  };
180
115
  export const se_RestoreClusterFromSnapshotCommand = async (input, context) => {
181
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
116
+ const b = rb(input, context);
182
117
  const headers = {
183
118
  "content-type": "application/json",
184
119
  };
185
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-snapshot/{snapshotArn}/restore";
186
- resolvedPath = __resolvedPath(resolvedPath, input, "snapshotArn", () => input.snapshotArn, "{snapshotArn}", false);
120
+ b.bp("/cluster-snapshot/{snapshotArn}/restore");
121
+ b.p("snapshotArn", () => input.snapshotArn, "{snapshotArn}", false);
187
122
  let body;
188
123
  body = JSON.stringify(take(input, {
189
124
  clusterName: [],
@@ -192,67 +127,45 @@ export const se_RestoreClusterFromSnapshotCommand = async (input, context) => {
192
127
  tags: (_) => _json(_),
193
128
  vpcSecurityGroupIds: (_) => _json(_),
194
129
  }));
195
- return new __HttpRequest({
196
- protocol,
197
- hostname,
198
- port,
199
- method: "POST",
200
- headers,
201
- path: resolvedPath,
202
- body,
203
- });
130
+ b.m("POST").h(headers).b(body);
131
+ return b.build();
204
132
  };
205
133
  export const se_TagResourceCommand = async (input, context) => {
206
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
134
+ const b = rb(input, context);
207
135
  const headers = {
208
136
  "content-type": "application/json",
209
137
  };
210
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
211
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
138
+ b.bp("/tags/{resourceArn}");
139
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
212
140
  let body;
213
141
  body = JSON.stringify(take(input, {
214
142
  tags: (_) => _json(_),
215
143
  }));
216
- return new __HttpRequest({
217
- protocol,
218
- hostname,
219
- port,
220
- method: "POST",
221
- headers,
222
- path: resolvedPath,
223
- body,
224
- });
144
+ b.m("POST").h(headers).b(body);
145
+ return b.build();
225
146
  };
226
147
  export const se_UntagResourceCommand = async (input, context) => {
227
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
148
+ const b = rb(input, context);
228
149
  const headers = {};
229
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
230
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
150
+ b.bp("/tags/{resourceArn}");
151
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
231
152
  const query = map({
232
- tagKeys: [
153
+ [_tK]: [
233
154
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
234
- () => (input.tagKeys || []).map((_entry) => _entry),
155
+ () => (input[_tK] || []).map((_entry) => _entry),
235
156
  ],
236
157
  });
237
158
  let body;
238
- return new __HttpRequest({
239
- protocol,
240
- hostname,
241
- port,
242
- method: "DELETE",
243
- headers,
244
- path: resolvedPath,
245
- query,
246
- body,
247
- });
159
+ b.m("DELETE").h(headers).q(query).b(body);
160
+ return b.build();
248
161
  };
249
162
  export const se_UpdateClusterCommand = async (input, context) => {
250
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
163
+ const b = rb(input, context);
251
164
  const headers = {
252
165
  "content-type": "application/json",
253
166
  };
254
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster/{clusterArn}";
255
- resolvedPath = __resolvedPath(resolvedPath, input, "clusterArn", () => input.clusterArn, "{clusterArn}", false);
167
+ b.bp("/cluster/{clusterArn}");
168
+ b.p("clusterArn", () => input.clusterArn, "{clusterArn}", false);
256
169
  let body;
257
170
  body = JSON.stringify(take(input, {
258
171
  adminUserPassword: [],
@@ -264,15 +177,8 @@ export const se_UpdateClusterCommand = async (input, context) => {
264
177
  subnetIds: (_) => _json(_),
265
178
  vpcSecurityGroupIds: (_) => _json(_),
266
179
  }));
267
- return new __HttpRequest({
268
- protocol,
269
- hostname,
270
- port,
271
- method: "PUT",
272
- headers,
273
- path: resolvedPath,
274
- body,
275
- });
180
+ b.m("PUT").h(headers).b(body);
181
+ return b.build();
276
182
  };
277
183
  export const de_CreateClusterCommand = async (output, context) => {
278
184
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -934,10 +840,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
934
840
  };
935
841
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
936
842
  const contents = map({
937
- retryAfterSeconds: [
938
- () => void 0 !== parsedOutput.headers["retry-after"],
939
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
940
- ],
843
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
941
844
  });
942
845
  const data = parsedOutput.body;
943
846
  const doc = take(data, {
@@ -977,6 +880,12 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
977
880
  value !== "" &&
978
881
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
979
882
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
883
+ const _cA = "clusterArn";
884
+ const _mR = "maxResults";
885
+ const _nT = "nextToken";
886
+ const _rAS = "retryAfterSeconds";
887
+ const _ra = "retry-after";
888
+ const _tK = "tagKeys";
980
889
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
981
890
  if (encoded.length) {
982
891
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-docdb-elastic",
3
3
  "description": "AWS SDK for JavaScript Docdb Elastic Client for Node.js, Browser and React Native",
4
- "version": "3.474.0",
4
+ "version": "3.477.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.474.0",
24
- "@aws-sdk/core": "3.474.0",
25
- "@aws-sdk/credential-provider-node": "3.474.0",
23
+ "@aws-sdk/client-sts": "3.477.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.477.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
@@ -34,6 +34,7 @@
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",