@aws-sdk/client-devops-guru 3.476.0 → 3.478.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.
Files changed (59) hide show
  1. package/dist-cjs/pagination/DescribeOrganizationResourceCollectionHealthPaginator.js +2 -23
  2. package/dist-cjs/pagination/DescribeResourceCollectionHealthPaginator.js +2 -23
  3. package/dist-cjs/pagination/GetCostEstimationPaginator.js +2 -23
  4. package/dist-cjs/pagination/GetResourceCollectionPaginator.js +2 -23
  5. package/dist-cjs/pagination/ListAnomaliesForInsightPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListAnomalousLogGroupsPaginator.js +2 -24
  7. package/dist-cjs/pagination/ListEventsPaginator.js +2 -24
  8. package/dist-cjs/pagination/ListInsightsPaginator.js +2 -24
  9. package/dist-cjs/pagination/ListMonitoredResourcesPaginator.js +2 -24
  10. package/dist-cjs/pagination/ListNotificationChannelsPaginator.js +2 -23
  11. package/dist-cjs/pagination/ListOrganizationInsightsPaginator.js +2 -24
  12. package/dist-cjs/pagination/ListRecommendationsPaginator.js +2 -23
  13. package/dist-cjs/pagination/SearchInsightsPaginator.js +2 -24
  14. package/dist-cjs/pagination/SearchOrganizationInsightsPaginator.js +2 -24
  15. package/dist-cjs/protocols/Aws_restJson1.js +143 -369
  16. package/dist-es/pagination/DescribeOrganizationResourceCollectionHealthPaginator.js +2 -22
  17. package/dist-es/pagination/DescribeResourceCollectionHealthPaginator.js +2 -22
  18. package/dist-es/pagination/GetCostEstimationPaginator.js +2 -22
  19. package/dist-es/pagination/GetResourceCollectionPaginator.js +2 -22
  20. package/dist-es/pagination/ListAnomaliesForInsightPaginator.js +2 -23
  21. package/dist-es/pagination/ListAnomalousLogGroupsPaginator.js +2 -23
  22. package/dist-es/pagination/ListEventsPaginator.js +2 -23
  23. package/dist-es/pagination/ListInsightsPaginator.js +2 -23
  24. package/dist-es/pagination/ListMonitoredResourcesPaginator.js +2 -23
  25. package/dist-es/pagination/ListNotificationChannelsPaginator.js +2 -22
  26. package/dist-es/pagination/ListOrganizationInsightsPaginator.js +2 -23
  27. package/dist-es/pagination/ListRecommendationsPaginator.js +2 -22
  28. package/dist-es/pagination/SearchInsightsPaginator.js +2 -23
  29. package/dist-es/pagination/SearchOrganizationInsightsPaginator.js +2 -23
  30. package/dist-es/protocols/Aws_restJson1.js +144 -370
  31. package/dist-types/pagination/DescribeOrganizationResourceCollectionHealthPaginator.d.ts +1 -1
  32. package/dist-types/pagination/DescribeResourceCollectionHealthPaginator.d.ts +1 -1
  33. package/dist-types/pagination/GetCostEstimationPaginator.d.ts +1 -1
  34. package/dist-types/pagination/GetResourceCollectionPaginator.d.ts +1 -1
  35. package/dist-types/pagination/ListAnomaliesForInsightPaginator.d.ts +1 -1
  36. package/dist-types/pagination/ListAnomalousLogGroupsPaginator.d.ts +1 -1
  37. package/dist-types/pagination/ListEventsPaginator.d.ts +1 -1
  38. package/dist-types/pagination/ListInsightsPaginator.d.ts +1 -1
  39. package/dist-types/pagination/ListMonitoredResourcesPaginator.d.ts +1 -1
  40. package/dist-types/pagination/ListNotificationChannelsPaginator.d.ts +1 -1
  41. package/dist-types/pagination/ListOrganizationInsightsPaginator.d.ts +1 -1
  42. package/dist-types/pagination/ListRecommendationsPaginator.d.ts +1 -1
  43. package/dist-types/pagination/SearchInsightsPaginator.d.ts +1 -1
  44. package/dist-types/pagination/SearchOrganizationInsightsPaginator.d.ts +1 -1
  45. package/dist-types/ts3.4/pagination/DescribeOrganizationResourceCollectionHealthPaginator.d.ts +3 -3
  46. package/dist-types/ts3.4/pagination/DescribeResourceCollectionHealthPaginator.d.ts +3 -3
  47. package/dist-types/ts3.4/pagination/GetCostEstimationPaginator.d.ts +3 -3
  48. package/dist-types/ts3.4/pagination/GetResourceCollectionPaginator.d.ts +3 -3
  49. package/dist-types/ts3.4/pagination/ListAnomaliesForInsightPaginator.d.ts +3 -3
  50. package/dist-types/ts3.4/pagination/ListAnomalousLogGroupsPaginator.d.ts +3 -3
  51. package/dist-types/ts3.4/pagination/ListEventsPaginator.d.ts +3 -3
  52. package/dist-types/ts3.4/pagination/ListInsightsPaginator.d.ts +3 -3
  53. package/dist-types/ts3.4/pagination/ListMonitoredResourcesPaginator.d.ts +3 -3
  54. package/dist-types/ts3.4/pagination/ListNotificationChannelsPaginator.d.ts +3 -3
  55. package/dist-types/ts3.4/pagination/ListOrganizationInsightsPaginator.d.ts +3 -3
  56. package/dist-types/ts3.4/pagination/ListRecommendationsPaginator.d.ts +3 -3
  57. package/dist-types/ts3.4/pagination/SearchInsightsPaginator.d.ts +3 -3
  58. package/dist-types/ts3.4/pagination/SearchOrganizationInsightsPaginator.d.ts +3 -3
  59. package/package.json +7 -6
@@ -1,188 +1,123 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, 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, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { DevOpsGuruServiceException as __BaseException } from "../models/DevOpsGuruServiceException";
5
5
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  export const se_AddNotificationChannelCommand = 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 || ""}` + "/channels";
11
+ b.bp("/channels");
12
12
  let body;
13
13
  body = JSON.stringify(take(input, {
14
14
  Config: (_) => _json(_),
15
15
  }));
16
- return new __HttpRequest({
17
- protocol,
18
- hostname,
19
- port,
20
- method: "PUT",
21
- headers,
22
- path: resolvedPath,
23
- body,
24
- });
16
+ b.m("PUT").h(headers).b(body);
17
+ return b.build();
25
18
  };
26
19
  export const se_DeleteInsightCommand = async (input, context) => {
27
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
20
+ const b = rb(input, context);
28
21
  const headers = {};
29
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/insights/{Id}";
30
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
22
+ b.bp("/insights/{Id}");
23
+ b.p("Id", () => input.Id, "{Id}", false);
31
24
  let body;
32
- return new __HttpRequest({
33
- protocol,
34
- hostname,
35
- port,
36
- method: "DELETE",
37
- headers,
38
- path: resolvedPath,
39
- body,
40
- });
25
+ b.m("DELETE").h(headers).b(body);
26
+ return b.build();
41
27
  };
42
28
  export const se_DescribeAccountHealthCommand = async (input, context) => {
43
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
29
+ const b = rb(input, context);
44
30
  const headers = {
45
31
  "content-type": "application/json",
46
32
  };
47
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/health";
33
+ b.bp("/accounts/health");
48
34
  let body;
49
35
  body = "";
50
- return new __HttpRequest({
51
- protocol,
52
- hostname,
53
- port,
54
- method: "GET",
55
- headers,
56
- path: resolvedPath,
57
- body,
58
- });
36
+ b.m("GET").h(headers).b(body);
37
+ return b.build();
59
38
  };
60
39
  export const se_DescribeAccountOverviewCommand = async (input, context) => {
61
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
40
+ const b = rb(input, context);
62
41
  const headers = {
63
42
  "content-type": "application/json",
64
43
  };
65
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/overview";
44
+ b.bp("/accounts/overview");
66
45
  let body;
67
46
  body = JSON.stringify(take(input, {
68
47
  FromTime: (_) => Math.round(_.getTime() / 1000),
69
48
  ToTime: (_) => Math.round(_.getTime() / 1000),
70
49
  }));
71
- return new __HttpRequest({
72
- protocol,
73
- hostname,
74
- port,
75
- method: "POST",
76
- headers,
77
- path: resolvedPath,
78
- body,
79
- });
50
+ b.m("POST").h(headers).b(body);
51
+ return b.build();
80
52
  };
81
53
  export const se_DescribeAnomalyCommand = async (input, context) => {
82
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
54
+ const b = rb(input, context);
83
55
  const headers = {};
84
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/anomalies/{Id}";
85
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
56
+ b.bp("/anomalies/{Id}");
57
+ b.p("Id", () => input.Id, "{Id}", false);
86
58
  const query = map({
87
- AccountId: [, input.AccountId],
59
+ [_AI]: [, input[_AI]],
88
60
  });
89
61
  let body;
90
- return new __HttpRequest({
91
- protocol,
92
- hostname,
93
- port,
94
- method: "GET",
95
- headers,
96
- path: resolvedPath,
97
- query,
98
- body,
99
- });
62
+ b.m("GET").h(headers).q(query).b(body);
63
+ return b.build();
100
64
  };
101
65
  export const se_DescribeEventSourcesConfigCommand = async (input, context) => {
102
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
66
+ const b = rb(input, context);
103
67
  const headers = {
104
68
  "content-type": "application/json",
105
69
  };
106
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/event-sources";
70
+ b.bp("/event-sources");
107
71
  let body;
108
72
  body = "";
109
- return new __HttpRequest({
110
- protocol,
111
- hostname,
112
- port,
113
- method: "POST",
114
- headers,
115
- path: resolvedPath,
116
- body,
117
- });
73
+ b.m("POST").h(headers).b(body);
74
+ return b.build();
118
75
  };
119
76
  export const se_DescribeFeedbackCommand = async (input, context) => {
120
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
77
+ const b = rb(input, context);
121
78
  const headers = {
122
79
  "content-type": "application/json",
123
80
  };
124
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/feedback";
81
+ b.bp("/feedback");
125
82
  let body;
126
83
  body = JSON.stringify(take(input, {
127
84
  InsightId: [],
128
85
  }));
129
- return new __HttpRequest({
130
- protocol,
131
- hostname,
132
- port,
133
- method: "POST",
134
- headers,
135
- path: resolvedPath,
136
- body,
137
- });
86
+ b.m("POST").h(headers).b(body);
87
+ return b.build();
138
88
  };
139
89
  export const se_DescribeInsightCommand = async (input, context) => {
140
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
90
+ const b = rb(input, context);
141
91
  const headers = {};
142
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/insights/{Id}";
143
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
92
+ b.bp("/insights/{Id}");
93
+ b.p("Id", () => input.Id, "{Id}", false);
144
94
  const query = map({
145
- AccountId: [, input.AccountId],
95
+ [_AI]: [, input[_AI]],
146
96
  });
147
97
  let body;
148
- return new __HttpRequest({
149
- protocol,
150
- hostname,
151
- port,
152
- method: "GET",
153
- headers,
154
- path: resolvedPath,
155
- query,
156
- body,
157
- });
98
+ b.m("GET").h(headers).q(query).b(body);
99
+ return b.build();
158
100
  };
159
101
  export const se_DescribeOrganizationHealthCommand = async (input, context) => {
160
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
102
+ const b = rb(input, context);
161
103
  const headers = {
162
104
  "content-type": "application/json",
163
105
  };
164
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/health";
106
+ b.bp("/organization/health");
165
107
  let body;
166
108
  body = JSON.stringify(take(input, {
167
109
  AccountIds: (_) => _json(_),
168
110
  OrganizationalUnitIds: (_) => _json(_),
169
111
  }));
170
- return new __HttpRequest({
171
- protocol,
172
- hostname,
173
- port,
174
- method: "POST",
175
- headers,
176
- path: resolvedPath,
177
- body,
178
- });
112
+ b.m("POST").h(headers).b(body);
113
+ return b.build();
179
114
  };
180
115
  export const se_DescribeOrganizationOverviewCommand = 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
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/overview";
120
+ b.bp("/organization/overview");
186
121
  let body;
187
122
  body = JSON.stringify(take(input, {
188
123
  AccountIds: (_) => _json(_),
@@ -190,22 +125,15 @@ export const se_DescribeOrganizationOverviewCommand = async (input, context) =>
190
125
  OrganizationalUnitIds: (_) => _json(_),
191
126
  ToTime: (_) => Math.round(_.getTime() / 1000),
192
127
  }));
193
- return new __HttpRequest({
194
- protocol,
195
- hostname,
196
- port,
197
- method: "POST",
198
- headers,
199
- path: resolvedPath,
200
- body,
201
- });
128
+ b.m("POST").h(headers).b(body);
129
+ return b.build();
202
130
  };
203
131
  export const se_DescribeOrganizationResourceCollectionHealthCommand = async (input, context) => {
204
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
132
+ const b = rb(input, context);
205
133
  const headers = {
206
134
  "content-type": "application/json",
207
135
  };
208
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/health/resource-collection";
136
+ b.bp("/organization/health/resource-collection");
209
137
  let body;
210
138
  body = JSON.stringify(take(input, {
211
139
  AccountIds: (_) => _json(_),
@@ -214,102 +142,62 @@ export const se_DescribeOrganizationResourceCollectionHealthCommand = async (inp
214
142
  OrganizationResourceCollectionType: [],
215
143
  OrganizationalUnitIds: (_) => _json(_),
216
144
  }));
217
- return new __HttpRequest({
218
- protocol,
219
- hostname,
220
- port,
221
- method: "POST",
222
- headers,
223
- path: resolvedPath,
224
- body,
225
- });
145
+ b.m("POST").h(headers).b(body);
146
+ return b.build();
226
147
  };
227
148
  export const se_DescribeResourceCollectionHealthCommand = async (input, context) => {
228
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
149
+ const b = rb(input, context);
229
150
  const headers = {};
230
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
231
- "/accounts/health/resource-collection/{ResourceCollectionType}";
232
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceCollectionType", () => input.ResourceCollectionType, "{ResourceCollectionType}", false);
151
+ b.bp("/accounts/health/resource-collection/{ResourceCollectionType}");
152
+ b.p("ResourceCollectionType", () => input.ResourceCollectionType, "{ResourceCollectionType}", false);
233
153
  const query = map({
234
- NextToken: [, input.NextToken],
154
+ [_NT]: [, input[_NT]],
235
155
  });
236
156
  let body;
237
- return new __HttpRequest({
238
- protocol,
239
- hostname,
240
- port,
241
- method: "GET",
242
- headers,
243
- path: resolvedPath,
244
- query,
245
- body,
246
- });
157
+ b.m("GET").h(headers).q(query).b(body);
158
+ return b.build();
247
159
  };
248
160
  export const se_DescribeServiceIntegrationCommand = async (input, context) => {
249
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
161
+ const b = rb(input, context);
250
162
  const headers = {
251
163
  "content-type": "application/json",
252
164
  };
253
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/service-integrations";
165
+ b.bp("/service-integrations");
254
166
  let body;
255
167
  body = "";
256
- return new __HttpRequest({
257
- protocol,
258
- hostname,
259
- port,
260
- method: "GET",
261
- headers,
262
- path: resolvedPath,
263
- body,
264
- });
168
+ b.m("GET").h(headers).b(body);
169
+ return b.build();
265
170
  };
266
171
  export const se_GetCostEstimationCommand = async (input, context) => {
267
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
172
+ const b = rb(input, context);
268
173
  const headers = {};
269
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cost-estimation";
174
+ b.bp("/cost-estimation");
270
175
  const query = map({
271
- NextToken: [, input.NextToken],
176
+ [_NT]: [, input[_NT]],
272
177
  });
273
178
  let body;
274
- return new __HttpRequest({
275
- protocol,
276
- hostname,
277
- port,
278
- method: "GET",
279
- headers,
280
- path: resolvedPath,
281
- query,
282
- body,
283
- });
179
+ b.m("GET").h(headers).q(query).b(body);
180
+ return b.build();
284
181
  };
285
182
  export const se_GetResourceCollectionCommand = async (input, context) => {
286
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
183
+ const b = rb(input, context);
287
184
  const headers = {};
288
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
289
- "/resource-collections/{ResourceCollectionType}";
290
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceCollectionType", () => input.ResourceCollectionType, "{ResourceCollectionType}", false);
185
+ b.bp("/resource-collections/{ResourceCollectionType}");
186
+ b.p("ResourceCollectionType", () => input.ResourceCollectionType, "{ResourceCollectionType}", false);
291
187
  const query = map({
292
- NextToken: [, input.NextToken],
188
+ [_NT]: [, input[_NT]],
293
189
  });
294
190
  let body;
295
- return new __HttpRequest({
296
- protocol,
297
- hostname,
298
- port,
299
- method: "GET",
300
- headers,
301
- path: resolvedPath,
302
- query,
303
- body,
304
- });
191
+ b.m("GET").h(headers).q(query).b(body);
192
+ return b.build();
305
193
  };
306
194
  export const se_ListAnomaliesForInsightCommand = async (input, context) => {
307
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
195
+ const b = rb(input, context);
308
196
  const headers = {
309
197
  "content-type": "application/json",
310
198
  };
311
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/anomalies/insight/{InsightId}";
312
- resolvedPath = __resolvedPath(resolvedPath, input, "InsightId", () => input.InsightId, "{InsightId}", false);
199
+ b.bp("/anomalies/insight/{InsightId}");
200
+ b.p("InsightId", () => input.InsightId, "{InsightId}", false);
313
201
  let body;
314
202
  body = JSON.stringify(take(input, {
315
203
  AccountId: [],
@@ -318,44 +206,30 @@ export const se_ListAnomaliesForInsightCommand = async (input, context) => {
318
206
  NextToken: [],
319
207
  StartTimeRange: (_) => se_StartTimeRange(_, context),
320
208
  }));
321
- return new __HttpRequest({
322
- protocol,
323
- hostname,
324
- port,
325
- method: "POST",
326
- headers,
327
- path: resolvedPath,
328
- body,
329
- });
209
+ b.m("POST").h(headers).b(body);
210
+ return b.build();
330
211
  };
331
212
  export const se_ListAnomalousLogGroupsCommand = async (input, context) => {
332
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
213
+ const b = rb(input, context);
333
214
  const headers = {
334
215
  "content-type": "application/json",
335
216
  };
336
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-log-anomalies";
217
+ b.bp("/list-log-anomalies");
337
218
  let body;
338
219
  body = JSON.stringify(take(input, {
339
220
  InsightId: [],
340
221
  MaxResults: [],
341
222
  NextToken: [],
342
223
  }));
343
- return new __HttpRequest({
344
- protocol,
345
- hostname,
346
- port,
347
- method: "POST",
348
- headers,
349
- path: resolvedPath,
350
- body,
351
- });
224
+ b.m("POST").h(headers).b(body);
225
+ return b.build();
352
226
  };
353
227
  export const se_ListEventsCommand = async (input, context) => {
354
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
228
+ const b = rb(input, context);
355
229
  const headers = {
356
230
  "content-type": "application/json",
357
231
  };
358
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/events";
232
+ b.bp("/events");
359
233
  let body;
360
234
  body = JSON.stringify(take(input, {
361
235
  AccountId: [],
@@ -363,86 +237,58 @@ export const se_ListEventsCommand = async (input, context) => {
363
237
  MaxResults: [],
364
238
  NextToken: [],
365
239
  }));
366
- return new __HttpRequest({
367
- protocol,
368
- hostname,
369
- port,
370
- method: "POST",
371
- headers,
372
- path: resolvedPath,
373
- body,
374
- });
240
+ b.m("POST").h(headers).b(body);
241
+ return b.build();
375
242
  };
376
243
  export const se_ListInsightsCommand = async (input, context) => {
377
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
244
+ const b = rb(input, context);
378
245
  const headers = {
379
246
  "content-type": "application/json",
380
247
  };
381
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/insights";
248
+ b.bp("/insights");
382
249
  let body;
383
250
  body = JSON.stringify(take(input, {
384
251
  MaxResults: [],
385
252
  NextToken: [],
386
253
  StatusFilter: (_) => se_ListInsightsStatusFilter(_, context),
387
254
  }));
388
- return new __HttpRequest({
389
- protocol,
390
- hostname,
391
- port,
392
- method: "POST",
393
- headers,
394
- path: resolvedPath,
395
- body,
396
- });
255
+ b.m("POST").h(headers).b(body);
256
+ return b.build();
397
257
  };
398
258
  export const se_ListMonitoredResourcesCommand = async (input, context) => {
399
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
259
+ const b = rb(input, context);
400
260
  const headers = {
401
261
  "content-type": "application/json",
402
262
  };
403
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/monitoredResources";
263
+ b.bp("/monitoredResources");
404
264
  let body;
405
265
  body = JSON.stringify(take(input, {
406
266
  Filters: (_) => _json(_),
407
267
  MaxResults: [],
408
268
  NextToken: [],
409
269
  }));
410
- return new __HttpRequest({
411
- protocol,
412
- hostname,
413
- port,
414
- method: "POST",
415
- headers,
416
- path: resolvedPath,
417
- body,
418
- });
270
+ b.m("POST").h(headers).b(body);
271
+ return b.build();
419
272
  };
420
273
  export const se_ListNotificationChannelsCommand = async (input, context) => {
421
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
274
+ const b = rb(input, context);
422
275
  const headers = {
423
276
  "content-type": "application/json",
424
277
  };
425
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
278
+ b.bp("/channels");
426
279
  let body;
427
280
  body = JSON.stringify(take(input, {
428
281
  NextToken: [],
429
282
  }));
430
- return new __HttpRequest({
431
- protocol,
432
- hostname,
433
- port,
434
- method: "POST",
435
- headers,
436
- path: resolvedPath,
437
- body,
438
- });
283
+ b.m("POST").h(headers).b(body);
284
+ return b.build();
439
285
  };
440
286
  export const se_ListOrganizationInsightsCommand = async (input, context) => {
441
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
287
+ const b = rb(input, context);
442
288
  const headers = {
443
289
  "content-type": "application/json",
444
290
  };
445
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/insights";
291
+ b.bp("/organization/insights");
446
292
  let body;
447
293
  body = JSON.stringify(take(input, {
448
294
  AccountIds: (_) => _json(_),
@@ -451,22 +297,15 @@ export const se_ListOrganizationInsightsCommand = async (input, context) => {
451
297
  OrganizationalUnitIds: (_) => _json(_),
452
298
  StatusFilter: (_) => se_ListInsightsStatusFilter(_, context),
453
299
  }));
454
- return new __HttpRequest({
455
- protocol,
456
- hostname,
457
- port,
458
- method: "POST",
459
- headers,
460
- path: resolvedPath,
461
- body,
462
- });
300
+ b.m("POST").h(headers).b(body);
301
+ return b.build();
463
302
  };
464
303
  export const se_ListRecommendationsCommand = async (input, context) => {
465
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
304
+ const b = rb(input, context);
466
305
  const headers = {
467
306
  "content-type": "application/json",
468
307
  };
469
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recommendations";
308
+ b.bp("/recommendations");
470
309
  let body;
471
310
  body = JSON.stringify(take(input, {
472
311
  AccountId: [],
@@ -474,58 +313,37 @@ export const se_ListRecommendationsCommand = async (input, context) => {
474
313
  Locale: [],
475
314
  NextToken: [],
476
315
  }));
477
- return new __HttpRequest({
478
- protocol,
479
- hostname,
480
- port,
481
- method: "POST",
482
- headers,
483
- path: resolvedPath,
484
- body,
485
- });
316
+ b.m("POST").h(headers).b(body);
317
+ return b.build();
486
318
  };
487
319
  export const se_PutFeedbackCommand = async (input, context) => {
488
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
320
+ const b = rb(input, context);
489
321
  const headers = {
490
322
  "content-type": "application/json",
491
323
  };
492
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/feedback";
324
+ b.bp("/feedback");
493
325
  let body;
494
326
  body = JSON.stringify(take(input, {
495
327
  InsightFeedback: (_) => _json(_),
496
328
  }));
497
- return new __HttpRequest({
498
- protocol,
499
- hostname,
500
- port,
501
- method: "PUT",
502
- headers,
503
- path: resolvedPath,
504
- body,
505
- });
329
+ b.m("PUT").h(headers).b(body);
330
+ return b.build();
506
331
  };
507
332
  export const se_RemoveNotificationChannelCommand = async (input, context) => {
508
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
333
+ const b = rb(input, context);
509
334
  const headers = {};
510
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{Id}";
511
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
335
+ b.bp("/channels/{Id}");
336
+ b.p("Id", () => input.Id, "{Id}", false);
512
337
  let body;
513
- return new __HttpRequest({
514
- protocol,
515
- hostname,
516
- port,
517
- method: "DELETE",
518
- headers,
519
- path: resolvedPath,
520
- body,
521
- });
338
+ b.m("DELETE").h(headers).b(body);
339
+ return b.build();
522
340
  };
523
341
  export const se_SearchInsightsCommand = async (input, context) => {
524
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
342
+ const b = rb(input, context);
525
343
  const headers = {
526
344
  "content-type": "application/json",
527
345
  };
528
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/insights/search";
346
+ b.bp("/insights/search");
529
347
  let body;
530
348
  body = JSON.stringify(take(input, {
531
349
  Filters: (_) => _json(_),
@@ -534,22 +352,15 @@ export const se_SearchInsightsCommand = async (input, context) => {
534
352
  StartTimeRange: (_) => se_StartTimeRange(_, context),
535
353
  Type: [],
536
354
  }));
537
- return new __HttpRequest({
538
- protocol,
539
- hostname,
540
- port,
541
- method: "POST",
542
- headers,
543
- path: resolvedPath,
544
- body,
545
- });
355
+ b.m("POST").h(headers).b(body);
356
+ return b.build();
546
357
  };
547
358
  export const se_SearchOrganizationInsightsCommand = async (input, context) => {
548
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
359
+ const b = rb(input, context);
549
360
  const headers = {
550
361
  "content-type": "application/json",
551
362
  };
552
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/insights/search";
363
+ b.bp("/organization/insights/search");
553
364
  let body;
554
365
  body = JSON.stringify(take(input, {
555
366
  AccountIds: (_) => _json(_),
@@ -559,97 +370,62 @@ export const se_SearchOrganizationInsightsCommand = async (input, context) => {
559
370
  StartTimeRange: (_) => se_StartTimeRange(_, context),
560
371
  Type: [],
561
372
  }));
562
- return new __HttpRequest({
563
- protocol,
564
- hostname,
565
- port,
566
- method: "POST",
567
- headers,
568
- path: resolvedPath,
569
- body,
570
- });
373
+ b.m("POST").h(headers).b(body);
374
+ return b.build();
571
375
  };
572
376
  export const se_StartCostEstimationCommand = async (input, context) => {
573
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
377
+ const b = rb(input, context);
574
378
  const headers = {
575
379
  "content-type": "application/json",
576
380
  };
577
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cost-estimation";
381
+ b.bp("/cost-estimation");
578
382
  let body;
579
383
  body = JSON.stringify(take(input, {
580
384
  ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
581
385
  ResourceCollection: (_) => _json(_),
582
386
  }));
583
- return new __HttpRequest({
584
- protocol,
585
- hostname,
586
- port,
587
- method: "PUT",
588
- headers,
589
- path: resolvedPath,
590
- body,
591
- });
387
+ b.m("PUT").h(headers).b(body);
388
+ return b.build();
592
389
  };
593
390
  export const se_UpdateEventSourcesConfigCommand = async (input, context) => {
594
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
391
+ const b = rb(input, context);
595
392
  const headers = {
596
393
  "content-type": "application/json",
597
394
  };
598
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/event-sources";
395
+ b.bp("/event-sources");
599
396
  let body;
600
397
  body = JSON.stringify(take(input, {
601
398
  EventSources: (_) => _json(_),
602
399
  }));
603
- return new __HttpRequest({
604
- protocol,
605
- hostname,
606
- port,
607
- method: "PUT",
608
- headers,
609
- path: resolvedPath,
610
- body,
611
- });
400
+ b.m("PUT").h(headers).b(body);
401
+ return b.build();
612
402
  };
613
403
  export const se_UpdateResourceCollectionCommand = async (input, context) => {
614
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
404
+ const b = rb(input, context);
615
405
  const headers = {
616
406
  "content-type": "application/json",
617
407
  };
618
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resource-collections";
408
+ b.bp("/resource-collections");
619
409
  let body;
620
410
  body = JSON.stringify(take(input, {
621
411
  Action: [],
622
412
  ResourceCollection: (_) => _json(_),
623
413
  }));
624
- return new __HttpRequest({
625
- protocol,
626
- hostname,
627
- port,
628
- method: "PUT",
629
- headers,
630
- path: resolvedPath,
631
- body,
632
- });
414
+ b.m("PUT").h(headers).b(body);
415
+ return b.build();
633
416
  };
634
417
  export const se_UpdateServiceIntegrationCommand = async (input, context) => {
635
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
418
+ const b = rb(input, context);
636
419
  const headers = {
637
420
  "content-type": "application/json",
638
421
  };
639
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/service-integrations";
422
+ b.bp("/service-integrations");
640
423
  let body;
641
424
  body = JSON.stringify(take(input, {
642
425
  ServiceIntegration: (_) => _json(_),
643
426
  }));
644
- return new __HttpRequest({
645
- protocol,
646
- hostname,
647
- port,
648
- method: "PUT",
649
- headers,
650
- path: resolvedPath,
651
- body,
652
- });
427
+ b.m("PUT").h(headers).b(body);
428
+ return b.build();
653
429
  };
654
430
  export const de_AddNotificationChannelCommand = async (output, context) => {
655
431
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -2066,10 +1842,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
2066
1842
  };
2067
1843
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
2068
1844
  const contents = map({
2069
- RetryAfterSeconds: [
2070
- () => void 0 !== parsedOutput.headers["retry-after"],
2071
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
2072
- ],
1845
+ [_RAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
2073
1846
  });
2074
1847
  const data = parsedOutput.body;
2075
1848
  const doc = take(data, {
@@ -2112,10 +1885,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
2112
1885
  };
2113
1886
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2114
1887
  const contents = map({
2115
- RetryAfterSeconds: [
2116
- () => void 0 !== parsedOutput.headers["retry-after"],
2117
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
2118
- ],
1888
+ [_RAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
2119
1889
  });
2120
1890
  const data = parsedOutput.body;
2121
1891
  const doc = take(data, {
@@ -2634,6 +2404,10 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
2634
2404
  value !== "" &&
2635
2405
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2636
2406
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2407
+ const _AI = "AccountId";
2408
+ const _NT = "NextToken";
2409
+ const _RAS = "RetryAfterSeconds";
2410
+ const _ra = "retry-after";
2637
2411
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2638
2412
  if (encoded.length) {
2639
2413
  return JSON.parse(encoded);