@aws-sdk/client-rum 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,90 +1,68 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateRumMetricDefinitionCommand = exports.de_UpdateAppMonitorCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_PutRumMetricsDestinationCommand = exports.de_PutRumEventsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListRumMetricsDestinationsCommand = exports.de_ListAppMonitorsCommand = exports.de_GetAppMonitorDataCommand = exports.de_GetAppMonitorCommand = exports.de_DeleteRumMetricsDestinationCommand = exports.de_DeleteAppMonitorCommand = exports.de_CreateAppMonitorCommand = exports.de_BatchGetRumMetricDefinitionsCommand = exports.de_BatchDeleteRumMetricDefinitionsCommand = exports.de_BatchCreateRumMetricDefinitionsCommand = exports.se_UpdateRumMetricDefinitionCommand = exports.se_UpdateAppMonitorCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_PutRumMetricsDestinationCommand = exports.se_PutRumEventsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListRumMetricsDestinationsCommand = exports.se_ListAppMonitorsCommand = exports.se_GetAppMonitorDataCommand = exports.se_GetAppMonitorCommand = exports.se_DeleteRumMetricsDestinationCommand = exports.se_DeleteAppMonitorCommand = exports.se_CreateAppMonitorCommand = exports.se_BatchGetRumMetricDefinitionsCommand = exports.se_BatchDeleteRumMetricDefinitionsCommand = exports.se_BatchCreateRumMetricDefinitionsCommand = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const protocol_http_1 = require("@smithy/protocol-http");
5
6
  const smithy_client_1 = require("@smithy/smithy-client");
6
7
  const models_0_1 = require("../models/models_0");
7
8
  const RUMServiceException_1 = require("../models/RUMServiceException");
8
9
  const se_BatchCreateRumMetricDefinitionsCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const b = (0, core_1.requestBuilder)(input, context);
10
11
  const headers = {
11
12
  "content-type": "application/json",
12
13
  };
13
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rummetrics/{AppMonitorName}/metrics";
14
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
14
+ b.bp("/rummetrics/{AppMonitorName}/metrics");
15
+ b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
15
16
  let body;
16
17
  body = JSON.stringify((0, smithy_client_1.take)(input, {
17
18
  Destination: [],
18
19
  DestinationArn: [],
19
20
  MetricDefinitions: (_) => (0, smithy_client_1._json)(_),
20
21
  }));
21
- return new protocol_http_1.HttpRequest({
22
- protocol,
23
- hostname,
24
- port,
25
- method: "POST",
26
- headers,
27
- path: resolvedPath,
28
- body,
29
- });
22
+ b.m("POST").h(headers).b(body);
23
+ return b.build();
30
24
  };
31
25
  exports.se_BatchCreateRumMetricDefinitionsCommand = se_BatchCreateRumMetricDefinitionsCommand;
32
26
  const se_BatchDeleteRumMetricDefinitionsCommand = async (input, context) => {
33
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
27
+ const b = (0, core_1.requestBuilder)(input, context);
34
28
  const headers = {};
35
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rummetrics/{AppMonitorName}/metrics";
36
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
29
+ b.bp("/rummetrics/{AppMonitorName}/metrics");
30
+ b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
37
31
  const query = (0, smithy_client_1.map)({
38
- destination: [, (0, smithy_client_1.expectNonNull)(input.Destination, `Destination`)],
39
- destinationArn: [, input.DestinationArn],
40
- metricDefinitionIds: [
32
+ [_d]: [, (0, smithy_client_1.expectNonNull)(input[_D], `Destination`)],
33
+ [_dA]: [, input[_DA]],
34
+ [_mDI]: [
41
35
  (0, smithy_client_1.expectNonNull)(input.MetricDefinitionIds, `MetricDefinitionIds`) != null,
42
- () => (input.MetricDefinitionIds || []).map((_entry) => _entry),
36
+ () => (input[_MDI] || []).map((_entry) => _entry),
43
37
  ],
44
38
  });
45
39
  let body;
46
- return new protocol_http_1.HttpRequest({
47
- protocol,
48
- hostname,
49
- port,
50
- method: "DELETE",
51
- headers,
52
- path: resolvedPath,
53
- query,
54
- body,
55
- });
40
+ b.m("DELETE").h(headers).q(query).b(body);
41
+ return b.build();
56
42
  };
57
43
  exports.se_BatchDeleteRumMetricDefinitionsCommand = se_BatchDeleteRumMetricDefinitionsCommand;
58
44
  const se_BatchGetRumMetricDefinitionsCommand = async (input, context) => {
59
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
45
+ const b = (0, core_1.requestBuilder)(input, context);
60
46
  const headers = {};
61
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rummetrics/{AppMonitorName}/metrics";
62
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
47
+ b.bp("/rummetrics/{AppMonitorName}/metrics");
48
+ b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
63
49
  const query = (0, smithy_client_1.map)({
64
- destination: [, (0, smithy_client_1.expectNonNull)(input.Destination, `Destination`)],
65
- destinationArn: [, input.DestinationArn],
66
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
67
- nextToken: [, input.NextToken],
50
+ [_d]: [, (0, smithy_client_1.expectNonNull)(input[_D], `Destination`)],
51
+ [_dA]: [, input[_DA]],
52
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
53
+ [_nT]: [, input[_NT]],
68
54
  });
69
55
  let body;
70
- return new protocol_http_1.HttpRequest({
71
- protocol,
72
- hostname,
73
- port,
74
- method: "GET",
75
- headers,
76
- path: resolvedPath,
77
- query,
78
- body,
79
- });
56
+ b.m("GET").h(headers).q(query).b(body);
57
+ return b.build();
80
58
  };
81
59
  exports.se_BatchGetRumMetricDefinitionsCommand = se_BatchGetRumMetricDefinitionsCommand;
82
60
  const se_CreateAppMonitorCommand = async (input, context) => {
83
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
61
+ const b = (0, core_1.requestBuilder)(input, context);
84
62
  const headers = {
85
63
  "content-type": "application/json",
86
64
  };
87
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor";
65
+ b.bp("/appmonitor");
88
66
  let body;
89
67
  body = JSON.stringify((0, smithy_client_1.take)(input, {
90
68
  AppMonitorConfiguration: (_) => se_AppMonitorConfiguration(_, context),
@@ -94,81 +72,51 @@ const se_CreateAppMonitorCommand = async (input, context) => {
94
72
  Name: [],
95
73
  Tags: (_) => (0, smithy_client_1._json)(_),
96
74
  }));
97
- return new protocol_http_1.HttpRequest({
98
- protocol,
99
- hostname,
100
- port,
101
- method: "POST",
102
- headers,
103
- path: resolvedPath,
104
- body,
105
- });
75
+ b.m("POST").h(headers).b(body);
76
+ return b.build();
106
77
  };
107
78
  exports.se_CreateAppMonitorCommand = se_CreateAppMonitorCommand;
108
79
  const se_DeleteAppMonitorCommand = async (input, context) => {
109
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
80
+ const b = (0, core_1.requestBuilder)(input, context);
110
81
  const headers = {};
111
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor/{Name}";
112
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
82
+ b.bp("/appmonitor/{Name}");
83
+ b.p("Name", () => input.Name, "{Name}", false);
113
84
  let body;
114
- return new protocol_http_1.HttpRequest({
115
- protocol,
116
- hostname,
117
- port,
118
- method: "DELETE",
119
- headers,
120
- path: resolvedPath,
121
- body,
122
- });
85
+ b.m("DELETE").h(headers).b(body);
86
+ return b.build();
123
87
  };
124
88
  exports.se_DeleteAppMonitorCommand = se_DeleteAppMonitorCommand;
125
89
  const se_DeleteRumMetricsDestinationCommand = async (input, context) => {
126
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
90
+ const b = (0, core_1.requestBuilder)(input, context);
127
91
  const headers = {};
128
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
129
- "/rummetrics/{AppMonitorName}/metricsdestination";
130
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
92
+ b.bp("/rummetrics/{AppMonitorName}/metricsdestination");
93
+ b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
131
94
  const query = (0, smithy_client_1.map)({
132
- destination: [, (0, smithy_client_1.expectNonNull)(input.Destination, `Destination`)],
133
- destinationArn: [, input.DestinationArn],
95
+ [_d]: [, (0, smithy_client_1.expectNonNull)(input[_D], `Destination`)],
96
+ [_dA]: [, input[_DA]],
134
97
  });
135
98
  let body;
136
- return new protocol_http_1.HttpRequest({
137
- protocol,
138
- hostname,
139
- port,
140
- method: "DELETE",
141
- headers,
142
- path: resolvedPath,
143
- query,
144
- body,
145
- });
99
+ b.m("DELETE").h(headers).q(query).b(body);
100
+ return b.build();
146
101
  };
147
102
  exports.se_DeleteRumMetricsDestinationCommand = se_DeleteRumMetricsDestinationCommand;
148
103
  const se_GetAppMonitorCommand = async (input, context) => {
149
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
104
+ const b = (0, core_1.requestBuilder)(input, context);
150
105
  const headers = {};
151
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor/{Name}";
152
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
106
+ b.bp("/appmonitor/{Name}");
107
+ b.p("Name", () => input.Name, "{Name}", false);
153
108
  let body;
154
- return new protocol_http_1.HttpRequest({
155
- protocol,
156
- hostname,
157
- port,
158
- method: "GET",
159
- headers,
160
- path: resolvedPath,
161
- body,
162
- });
109
+ b.m("GET").h(headers).b(body);
110
+ return b.build();
163
111
  };
164
112
  exports.se_GetAppMonitorCommand = se_GetAppMonitorCommand;
165
113
  const se_GetAppMonitorDataCommand = async (input, context) => {
166
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
114
+ const b = (0, core_1.requestBuilder)(input, context);
167
115
  const headers = {
168
116
  "content-type": "application/json",
169
117
  };
170
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor/{Name}/data";
171
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
118
+ b.bp("/appmonitor/{Name}/data");
119
+ b.p("Name", () => input.Name, "{Name}", false);
172
120
  let body;
173
121
  body = JSON.stringify((0, smithy_client_1.take)(input, {
174
122
  Filters: (_) => (0, smithy_client_1._json)(_),
@@ -176,85 +124,54 @@ const se_GetAppMonitorDataCommand = async (input, context) => {
176
124
  NextToken: [],
177
125
  TimeRange: (_) => (0, smithy_client_1._json)(_),
178
126
  }));
179
- return new protocol_http_1.HttpRequest({
180
- protocol,
181
- hostname,
182
- port,
183
- method: "POST",
184
- headers,
185
- path: resolvedPath,
186
- body,
187
- });
127
+ b.m("POST").h(headers).b(body);
128
+ return b.build();
188
129
  };
189
130
  exports.se_GetAppMonitorDataCommand = se_GetAppMonitorDataCommand;
190
131
  const se_ListAppMonitorsCommand = async (input, context) => {
191
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
132
+ const b = (0, core_1.requestBuilder)(input, context);
192
133
  const headers = {};
193
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitors";
134
+ b.bp("/appmonitors");
194
135
  const query = (0, smithy_client_1.map)({
195
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
196
- nextToken: [, input.NextToken],
136
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
137
+ [_nT]: [, input[_NT]],
197
138
  });
198
139
  let body;
199
- return new protocol_http_1.HttpRequest({
200
- protocol,
201
- hostname,
202
- port,
203
- method: "POST",
204
- headers,
205
- path: resolvedPath,
206
- query,
207
- body,
208
- });
140
+ b.m("POST").h(headers).q(query).b(body);
141
+ return b.build();
209
142
  };
210
143
  exports.se_ListAppMonitorsCommand = se_ListAppMonitorsCommand;
211
144
  const se_ListRumMetricsDestinationsCommand = async (input, context) => {
212
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
145
+ const b = (0, core_1.requestBuilder)(input, context);
213
146
  const headers = {};
214
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
215
- "/rummetrics/{AppMonitorName}/metricsdestination";
216
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
147
+ b.bp("/rummetrics/{AppMonitorName}/metricsdestination");
148
+ b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
217
149
  const query = (0, smithy_client_1.map)({
218
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
219
- nextToken: [, input.NextToken],
150
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
151
+ [_nT]: [, input[_NT]],
220
152
  });
221
153
  let body;
222
- return new protocol_http_1.HttpRequest({
223
- protocol,
224
- hostname,
225
- port,
226
- method: "GET",
227
- headers,
228
- path: resolvedPath,
229
- query,
230
- body,
231
- });
154
+ b.m("GET").h(headers).q(query).b(body);
155
+ return b.build();
232
156
  };
233
157
  exports.se_ListRumMetricsDestinationsCommand = se_ListRumMetricsDestinationsCommand;
234
158
  const se_ListTagsForResourceCommand = async (input, context) => {
235
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
159
+ const b = (0, core_1.requestBuilder)(input, context);
236
160
  const headers = {};
237
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
238
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
161
+ b.bp("/tags/{ResourceArn}");
162
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
239
163
  let body;
240
- return new protocol_http_1.HttpRequest({
241
- protocol,
242
- hostname,
243
- port,
244
- method: "GET",
245
- headers,
246
- path: resolvedPath,
247
- body,
248
- });
164
+ b.m("GET").h(headers).b(body);
165
+ return b.build();
249
166
  };
250
167
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
251
168
  const se_PutRumEventsCommand = async (input, context) => {
252
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
169
+ const b = (0, core_1.requestBuilder)(input, context);
253
170
  const headers = {
254
171
  "content-type": "application/json",
255
172
  };
256
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitors/{Id}";
257
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
173
+ b.bp("/appmonitors/{Id}");
174
+ b.p("Id", () => input.Id, "{Id}", false);
258
175
  let body;
259
176
  body = JSON.stringify((0, smithy_client_1.take)(input, {
260
177
  AppMonitorDetails: (_) => (0, smithy_client_1._json)(_),
@@ -269,95 +186,66 @@ const se_PutRumEventsCommand = async (input, context) => {
269
186
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
270
187
  }
271
188
  }
272
- return new protocol_http_1.HttpRequest({
273
- protocol,
274
- hostname: resolvedHostname,
275
- port,
276
- method: "POST",
277
- headers,
278
- path: resolvedPath,
279
- body,
280
- });
189
+ b.hn(resolvedHostname);
190
+ b.m("POST").h(headers).b(body);
191
+ return b.build();
281
192
  };
282
193
  exports.se_PutRumEventsCommand = se_PutRumEventsCommand;
283
194
  const se_PutRumMetricsDestinationCommand = async (input, context) => {
284
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
195
+ const b = (0, core_1.requestBuilder)(input, context);
285
196
  const headers = {
286
197
  "content-type": "application/json",
287
198
  };
288
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
289
- "/rummetrics/{AppMonitorName}/metricsdestination";
290
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
199
+ b.bp("/rummetrics/{AppMonitorName}/metricsdestination");
200
+ b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
291
201
  let body;
292
202
  body = JSON.stringify((0, smithy_client_1.take)(input, {
293
203
  Destination: [],
294
204
  DestinationArn: [],
295
205
  IamRoleArn: [],
296
206
  }));
297
- return new protocol_http_1.HttpRequest({
298
- protocol,
299
- hostname,
300
- port,
301
- method: "POST",
302
- headers,
303
- path: resolvedPath,
304
- body,
305
- });
207
+ b.m("POST").h(headers).b(body);
208
+ return b.build();
306
209
  };
307
210
  exports.se_PutRumMetricsDestinationCommand = se_PutRumMetricsDestinationCommand;
308
211
  const se_TagResourceCommand = async (input, context) => {
309
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
212
+ const b = (0, core_1.requestBuilder)(input, context);
310
213
  const headers = {
311
214
  "content-type": "application/json",
312
215
  };
313
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
314
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
216
+ b.bp("/tags/{ResourceArn}");
217
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
315
218
  let body;
316
219
  body = JSON.stringify((0, smithy_client_1.take)(input, {
317
220
  Tags: (_) => (0, smithy_client_1._json)(_),
318
221
  }));
319
- return new protocol_http_1.HttpRequest({
320
- protocol,
321
- hostname,
322
- port,
323
- method: "POST",
324
- headers,
325
- path: resolvedPath,
326
- body,
327
- });
222
+ b.m("POST").h(headers).b(body);
223
+ return b.build();
328
224
  };
329
225
  exports.se_TagResourceCommand = se_TagResourceCommand;
330
226
  const se_UntagResourceCommand = async (input, context) => {
331
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
227
+ const b = (0, core_1.requestBuilder)(input, context);
332
228
  const headers = {};
333
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
334
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
229
+ b.bp("/tags/{ResourceArn}");
230
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
335
231
  const query = (0, smithy_client_1.map)({
336
- tagKeys: [
232
+ [_tK]: [
337
233
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
338
- () => (input.TagKeys || []).map((_entry) => _entry),
234
+ () => (input[_TK] || []).map((_entry) => _entry),
339
235
  ],
340
236
  });
341
237
  let body;
342
- return new protocol_http_1.HttpRequest({
343
- protocol,
344
- hostname,
345
- port,
346
- method: "DELETE",
347
- headers,
348
- path: resolvedPath,
349
- query,
350
- body,
351
- });
238
+ b.m("DELETE").h(headers).q(query).b(body);
239
+ return b.build();
352
240
  };
353
241
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
354
242
  const se_UpdateAppMonitorCommand = async (input, context) => {
355
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
243
+ const b = (0, core_1.requestBuilder)(input, context);
356
244
  const headers = {
357
245
  "content-type": "application/json",
358
246
  };
359
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor/{Name}";
360
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
247
+ b.bp("/appmonitor/{Name}");
248
+ b.p("Name", () => input.Name, "{Name}", false);
361
249
  let body;
362
250
  body = JSON.stringify((0, smithy_client_1.take)(input, {
363
251
  AppMonitorConfiguration: (_) => se_AppMonitorConfiguration(_, context),
@@ -365,24 +253,17 @@ const se_UpdateAppMonitorCommand = async (input, context) => {
365
253
  CwLogEnabled: [],
366
254
  Domain: [],
367
255
  }));
368
- return new protocol_http_1.HttpRequest({
369
- protocol,
370
- hostname,
371
- port,
372
- method: "PATCH",
373
- headers,
374
- path: resolvedPath,
375
- body,
376
- });
256
+ b.m("PATCH").h(headers).b(body);
257
+ return b.build();
377
258
  };
378
259
  exports.se_UpdateAppMonitorCommand = se_UpdateAppMonitorCommand;
379
260
  const se_UpdateRumMetricDefinitionCommand = async (input, context) => {
380
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
261
+ const b = (0, core_1.requestBuilder)(input, context);
381
262
  const headers = {
382
263
  "content-type": "application/json",
383
264
  };
384
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rummetrics/{AppMonitorName}/metrics";
385
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
265
+ b.bp("/rummetrics/{AppMonitorName}/metrics");
266
+ b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
386
267
  let body;
387
268
  body = JSON.stringify((0, smithy_client_1.take)(input, {
388
269
  Destination: [],
@@ -390,15 +271,8 @@ const se_UpdateRumMetricDefinitionCommand = async (input, context) => {
390
271
  MetricDefinition: (_) => (0, smithy_client_1._json)(_),
391
272
  MetricDefinitionId: [],
392
273
  }));
393
- return new protocol_http_1.HttpRequest({
394
- protocol,
395
- hostname,
396
- port,
397
- method: "PATCH",
398
- headers,
399
- path: resolvedPath,
400
- body,
401
- });
274
+ b.m("PATCH").h(headers).b(body);
275
+ return b.build();
402
276
  };
403
277
  exports.se_UpdateRumMetricDefinitionCommand = se_UpdateRumMetricDefinitionCommand;
404
278
  const de_BatchCreateRumMetricDefinitionsCommand = async (output, context) => {
@@ -1195,10 +1069,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1195
1069
  };
1196
1070
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1197
1071
  const contents = (0, smithy_client_1.map)({
1198
- retryAfterSeconds: [
1199
- () => void 0 !== parsedOutput.headers["retry-after"],
1200
- () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
1201
- ],
1072
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
1202
1073
  });
1203
1074
  const data = parsedOutput.body;
1204
1075
  const doc = (0, smithy_client_1.take)(data, {
@@ -1241,10 +1112,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1241
1112
  };
1242
1113
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1243
1114
  const contents = (0, smithy_client_1.map)({
1244
- retryAfterSeconds: [
1245
- () => void 0 !== parsedOutput.headers["retry-after"],
1246
- () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
1247
- ],
1115
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
1248
1116
  });
1249
1117
  const data = parsedOutput.body;
1250
1118
  const doc = (0, smithy_client_1.take)(data, {
@@ -1340,6 +1208,20 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1340
1208
  value !== "" &&
1341
1209
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1342
1210
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1211
+ const _D = "Destination";
1212
+ const _DA = "DestinationArn";
1213
+ const _MDI = "MetricDefinitionIds";
1214
+ const _MR = "MaxResults";
1215
+ const _NT = "NextToken";
1216
+ const _TK = "TagKeys";
1217
+ const _d = "destination";
1218
+ const _dA = "destinationArn";
1219
+ const _mDI = "metricDefinitionIds";
1220
+ const _mR = "maxResults";
1221
+ const _nT = "nextToken";
1222
+ const _rAS = "retryAfterSeconds";
1223
+ const _ra = "retry-after";
1224
+ const _tK = "tagKeys";
1343
1225
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1344
1226
  if (encoded.length) {
1345
1227
  return JSON.parse(encoded);
@@ -1,84 +1,62 @@
1
- import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseDouble as __limitedParseDouble, map, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseDouble as __limitedParseDouble, map, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
3
4
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
4
5
  import { RUMServiceException as __BaseException } from "../models/RUMServiceException";
5
6
  export const se_BatchCreateRumMetricDefinitionsCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
7
8
  const headers = {
8
9
  "content-type": "application/json",
9
10
  };
10
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rummetrics/{AppMonitorName}/metrics";
11
- resolvedPath = __resolvedPath(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
11
+ b.bp("/rummetrics/{AppMonitorName}/metrics");
12
+ b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
12
13
  let body;
13
14
  body = JSON.stringify(take(input, {
14
15
  Destination: [],
15
16
  DestinationArn: [],
16
17
  MetricDefinitions: (_) => _json(_),
17
18
  }));
18
- return new __HttpRequest({
19
- protocol,
20
- hostname,
21
- port,
22
- method: "POST",
23
- headers,
24
- path: resolvedPath,
25
- body,
26
- });
19
+ b.m("POST").h(headers).b(body);
20
+ return b.build();
27
21
  };
28
22
  export const se_BatchDeleteRumMetricDefinitionsCommand = async (input, context) => {
29
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
23
+ const b = rb(input, context);
30
24
  const headers = {};
31
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rummetrics/{AppMonitorName}/metrics";
32
- resolvedPath = __resolvedPath(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
25
+ b.bp("/rummetrics/{AppMonitorName}/metrics");
26
+ b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
33
27
  const query = map({
34
- destination: [, __expectNonNull(input.Destination, `Destination`)],
35
- destinationArn: [, input.DestinationArn],
36
- metricDefinitionIds: [
28
+ [_d]: [, __expectNonNull(input[_D], `Destination`)],
29
+ [_dA]: [, input[_DA]],
30
+ [_mDI]: [
37
31
  __expectNonNull(input.MetricDefinitionIds, `MetricDefinitionIds`) != null,
38
- () => (input.MetricDefinitionIds || []).map((_entry) => _entry),
32
+ () => (input[_MDI] || []).map((_entry) => _entry),
39
33
  ],
40
34
  });
41
35
  let body;
42
- return new __HttpRequest({
43
- protocol,
44
- hostname,
45
- port,
46
- method: "DELETE",
47
- headers,
48
- path: resolvedPath,
49
- query,
50
- body,
51
- });
36
+ b.m("DELETE").h(headers).q(query).b(body);
37
+ return b.build();
52
38
  };
53
39
  export const se_BatchGetRumMetricDefinitionsCommand = async (input, context) => {
54
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
40
+ const b = rb(input, context);
55
41
  const headers = {};
56
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rummetrics/{AppMonitorName}/metrics";
57
- resolvedPath = __resolvedPath(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
42
+ b.bp("/rummetrics/{AppMonitorName}/metrics");
43
+ b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
58
44
  const query = map({
59
- destination: [, __expectNonNull(input.Destination, `Destination`)],
60
- destinationArn: [, input.DestinationArn],
61
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
62
- nextToken: [, input.NextToken],
45
+ [_d]: [, __expectNonNull(input[_D], `Destination`)],
46
+ [_dA]: [, input[_DA]],
47
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
48
+ [_nT]: [, input[_NT]],
63
49
  });
64
50
  let body;
65
- return new __HttpRequest({
66
- protocol,
67
- hostname,
68
- port,
69
- method: "GET",
70
- headers,
71
- path: resolvedPath,
72
- query,
73
- body,
74
- });
51
+ b.m("GET").h(headers).q(query).b(body);
52
+ return b.build();
75
53
  };
76
54
  export const se_CreateAppMonitorCommand = async (input, context) => {
77
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
55
+ const b = rb(input, context);
78
56
  const headers = {
79
57
  "content-type": "application/json",
80
58
  };
81
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor";
59
+ b.bp("/appmonitor");
82
60
  let body;
83
61
  body = JSON.stringify(take(input, {
84
62
  AppMonitorConfiguration: (_) => se_AppMonitorConfiguration(_, context),
@@ -88,77 +66,47 @@ export const se_CreateAppMonitorCommand = async (input, context) => {
88
66
  Name: [],
89
67
  Tags: (_) => _json(_),
90
68
  }));
91
- return new __HttpRequest({
92
- protocol,
93
- hostname,
94
- port,
95
- method: "POST",
96
- headers,
97
- path: resolvedPath,
98
- body,
99
- });
69
+ b.m("POST").h(headers).b(body);
70
+ return b.build();
100
71
  };
101
72
  export const se_DeleteAppMonitorCommand = async (input, context) => {
102
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
73
+ const b = rb(input, context);
103
74
  const headers = {};
104
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor/{Name}";
105
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
75
+ b.bp("/appmonitor/{Name}");
76
+ b.p("Name", () => input.Name, "{Name}", false);
106
77
  let body;
107
- return new __HttpRequest({
108
- protocol,
109
- hostname,
110
- port,
111
- method: "DELETE",
112
- headers,
113
- path: resolvedPath,
114
- body,
115
- });
78
+ b.m("DELETE").h(headers).b(body);
79
+ return b.build();
116
80
  };
117
81
  export const se_DeleteRumMetricsDestinationCommand = async (input, context) => {
118
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
82
+ const b = rb(input, context);
119
83
  const headers = {};
120
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
121
- "/rummetrics/{AppMonitorName}/metricsdestination";
122
- resolvedPath = __resolvedPath(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
84
+ b.bp("/rummetrics/{AppMonitorName}/metricsdestination");
85
+ b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
123
86
  const query = map({
124
- destination: [, __expectNonNull(input.Destination, `Destination`)],
125
- destinationArn: [, input.DestinationArn],
87
+ [_d]: [, __expectNonNull(input[_D], `Destination`)],
88
+ [_dA]: [, input[_DA]],
126
89
  });
127
90
  let body;
128
- return new __HttpRequest({
129
- protocol,
130
- hostname,
131
- port,
132
- method: "DELETE",
133
- headers,
134
- path: resolvedPath,
135
- query,
136
- body,
137
- });
91
+ b.m("DELETE").h(headers).q(query).b(body);
92
+ return b.build();
138
93
  };
139
94
  export const se_GetAppMonitorCommand = async (input, context) => {
140
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
95
+ const b = rb(input, context);
141
96
  const headers = {};
142
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor/{Name}";
143
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
97
+ b.bp("/appmonitor/{Name}");
98
+ b.p("Name", () => input.Name, "{Name}", false);
144
99
  let body;
145
- return new __HttpRequest({
146
- protocol,
147
- hostname,
148
- port,
149
- method: "GET",
150
- headers,
151
- path: resolvedPath,
152
- body,
153
- });
100
+ b.m("GET").h(headers).b(body);
101
+ return b.build();
154
102
  };
155
103
  export const se_GetAppMonitorDataCommand = async (input, context) => {
156
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
104
+ const b = rb(input, context);
157
105
  const headers = {
158
106
  "content-type": "application/json",
159
107
  };
160
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor/{Name}/data";
161
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
108
+ b.bp("/appmonitor/{Name}/data");
109
+ b.p("Name", () => input.Name, "{Name}", false);
162
110
  let body;
163
111
  body = JSON.stringify(take(input, {
164
112
  Filters: (_) => _json(_),
@@ -166,81 +114,50 @@ export const se_GetAppMonitorDataCommand = async (input, context) => {
166
114
  NextToken: [],
167
115
  TimeRange: (_) => _json(_),
168
116
  }));
169
- return new __HttpRequest({
170
- protocol,
171
- hostname,
172
- port,
173
- method: "POST",
174
- headers,
175
- path: resolvedPath,
176
- body,
177
- });
117
+ b.m("POST").h(headers).b(body);
118
+ return b.build();
178
119
  };
179
120
  export const se_ListAppMonitorsCommand = async (input, context) => {
180
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
121
+ const b = rb(input, context);
181
122
  const headers = {};
182
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitors";
123
+ b.bp("/appmonitors");
183
124
  const query = map({
184
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
185
- nextToken: [, input.NextToken],
125
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
126
+ [_nT]: [, input[_NT]],
186
127
  });
187
128
  let body;
188
- return new __HttpRequest({
189
- protocol,
190
- hostname,
191
- port,
192
- method: "POST",
193
- headers,
194
- path: resolvedPath,
195
- query,
196
- body,
197
- });
129
+ b.m("POST").h(headers).q(query).b(body);
130
+ return b.build();
198
131
  };
199
132
  export const se_ListRumMetricsDestinationsCommand = async (input, context) => {
200
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
133
+ const b = rb(input, context);
201
134
  const headers = {};
202
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
203
- "/rummetrics/{AppMonitorName}/metricsdestination";
204
- resolvedPath = __resolvedPath(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
135
+ b.bp("/rummetrics/{AppMonitorName}/metricsdestination");
136
+ b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
205
137
  const query = map({
206
- maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
207
- nextToken: [, input.NextToken],
138
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
139
+ [_nT]: [, input[_NT]],
208
140
  });
209
141
  let body;
210
- return new __HttpRequest({
211
- protocol,
212
- hostname,
213
- port,
214
- method: "GET",
215
- headers,
216
- path: resolvedPath,
217
- query,
218
- body,
219
- });
142
+ b.m("GET").h(headers).q(query).b(body);
143
+ return b.build();
220
144
  };
221
145
  export const se_ListTagsForResourceCommand = async (input, context) => {
222
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
146
+ const b = rb(input, context);
223
147
  const headers = {};
224
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
225
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
148
+ b.bp("/tags/{ResourceArn}");
149
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
226
150
  let body;
227
- return new __HttpRequest({
228
- protocol,
229
- hostname,
230
- port,
231
- method: "GET",
232
- headers,
233
- path: resolvedPath,
234
- body,
235
- });
151
+ b.m("GET").h(headers).b(body);
152
+ return b.build();
236
153
  };
237
154
  export const se_PutRumEventsCommand = async (input, context) => {
238
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
155
+ const b = rb(input, context);
239
156
  const headers = {
240
157
  "content-type": "application/json",
241
158
  };
242
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitors/{Id}";
243
- resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
159
+ b.bp("/appmonitors/{Id}");
160
+ b.p("Id", () => input.Id, "{Id}", false);
244
161
  let body;
245
162
  body = JSON.stringify(take(input, {
246
163
  AppMonitorDetails: (_) => _json(_),
@@ -255,91 +172,62 @@ export const se_PutRumEventsCommand = async (input, context) => {
255
172
  throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
256
173
  }
257
174
  }
258
- return new __HttpRequest({
259
- protocol,
260
- hostname: resolvedHostname,
261
- port,
262
- method: "POST",
263
- headers,
264
- path: resolvedPath,
265
- body,
266
- });
175
+ b.hn(resolvedHostname);
176
+ b.m("POST").h(headers).b(body);
177
+ return b.build();
267
178
  };
268
179
  export const se_PutRumMetricsDestinationCommand = async (input, context) => {
269
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
180
+ const b = rb(input, context);
270
181
  const headers = {
271
182
  "content-type": "application/json",
272
183
  };
273
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
274
- "/rummetrics/{AppMonitorName}/metricsdestination";
275
- resolvedPath = __resolvedPath(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
184
+ b.bp("/rummetrics/{AppMonitorName}/metricsdestination");
185
+ b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
276
186
  let body;
277
187
  body = JSON.stringify(take(input, {
278
188
  Destination: [],
279
189
  DestinationArn: [],
280
190
  IamRoleArn: [],
281
191
  }));
282
- return new __HttpRequest({
283
- protocol,
284
- hostname,
285
- port,
286
- method: "POST",
287
- headers,
288
- path: resolvedPath,
289
- body,
290
- });
192
+ b.m("POST").h(headers).b(body);
193
+ return b.build();
291
194
  };
292
195
  export const se_TagResourceCommand = async (input, context) => {
293
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
196
+ const b = rb(input, context);
294
197
  const headers = {
295
198
  "content-type": "application/json",
296
199
  };
297
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
298
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
200
+ b.bp("/tags/{ResourceArn}");
201
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
299
202
  let body;
300
203
  body = JSON.stringify(take(input, {
301
204
  Tags: (_) => _json(_),
302
205
  }));
303
- return new __HttpRequest({
304
- protocol,
305
- hostname,
306
- port,
307
- method: "POST",
308
- headers,
309
- path: resolvedPath,
310
- body,
311
- });
206
+ b.m("POST").h(headers).b(body);
207
+ return b.build();
312
208
  };
313
209
  export const se_UntagResourceCommand = async (input, context) => {
314
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
210
+ const b = rb(input, context);
315
211
  const headers = {};
316
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
317
- resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
212
+ b.bp("/tags/{ResourceArn}");
213
+ b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
318
214
  const query = map({
319
- tagKeys: [
215
+ [_tK]: [
320
216
  __expectNonNull(input.TagKeys, `TagKeys`) != null,
321
- () => (input.TagKeys || []).map((_entry) => _entry),
217
+ () => (input[_TK] || []).map((_entry) => _entry),
322
218
  ],
323
219
  });
324
220
  let body;
325
- return new __HttpRequest({
326
- protocol,
327
- hostname,
328
- port,
329
- method: "DELETE",
330
- headers,
331
- path: resolvedPath,
332
- query,
333
- body,
334
- });
221
+ b.m("DELETE").h(headers).q(query).b(body);
222
+ return b.build();
335
223
  };
336
224
  export const se_UpdateAppMonitorCommand = async (input, context) => {
337
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
225
+ const b = rb(input, context);
338
226
  const headers = {
339
227
  "content-type": "application/json",
340
228
  };
341
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor/{Name}";
342
- resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
229
+ b.bp("/appmonitor/{Name}");
230
+ b.p("Name", () => input.Name, "{Name}", false);
343
231
  let body;
344
232
  body = JSON.stringify(take(input, {
345
233
  AppMonitorConfiguration: (_) => se_AppMonitorConfiguration(_, context),
@@ -347,23 +235,16 @@ export const se_UpdateAppMonitorCommand = async (input, context) => {
347
235
  CwLogEnabled: [],
348
236
  Domain: [],
349
237
  }));
350
- return new __HttpRequest({
351
- protocol,
352
- hostname,
353
- port,
354
- method: "PATCH",
355
- headers,
356
- path: resolvedPath,
357
- body,
358
- });
238
+ b.m("PATCH").h(headers).b(body);
239
+ return b.build();
359
240
  };
360
241
  export const se_UpdateRumMetricDefinitionCommand = async (input, context) => {
361
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
242
+ const b = rb(input, context);
362
243
  const headers = {
363
244
  "content-type": "application/json",
364
245
  };
365
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rummetrics/{AppMonitorName}/metrics";
366
- resolvedPath = __resolvedPath(resolvedPath, input, "AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
246
+ b.bp("/rummetrics/{AppMonitorName}/metrics");
247
+ b.p("AppMonitorName", () => input.AppMonitorName, "{AppMonitorName}", false);
367
248
  let body;
368
249
  body = JSON.stringify(take(input, {
369
250
  Destination: [],
@@ -371,15 +252,8 @@ export const se_UpdateRumMetricDefinitionCommand = async (input, context) => {
371
252
  MetricDefinition: (_) => _json(_),
372
253
  MetricDefinitionId: [],
373
254
  }));
374
- return new __HttpRequest({
375
- protocol,
376
- hostname,
377
- port,
378
- method: "PATCH",
379
- headers,
380
- path: resolvedPath,
381
- body,
382
- });
255
+ b.m("PATCH").h(headers).b(body);
256
+ return b.build();
383
257
  };
384
258
  export const de_BatchCreateRumMetricDefinitionsCommand = async (output, context) => {
385
259
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1158,10 +1032,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1158
1032
  };
1159
1033
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1160
1034
  const contents = map({
1161
- retryAfterSeconds: [
1162
- () => void 0 !== parsedOutput.headers["retry-after"],
1163
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
1164
- ],
1035
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1165
1036
  });
1166
1037
  const data = parsedOutput.body;
1167
1038
  const doc = take(data, {
@@ -1204,10 +1075,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1204
1075
  };
1205
1076
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1206
1077
  const contents = map({
1207
- retryAfterSeconds: [
1208
- () => void 0 !== parsedOutput.headers["retry-after"],
1209
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
1210
- ],
1078
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1211
1079
  });
1212
1080
  const data = parsedOutput.body;
1213
1081
  const doc = take(data, {
@@ -1303,6 +1171,20 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1303
1171
  value !== "" &&
1304
1172
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1305
1173
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1174
+ const _D = "Destination";
1175
+ const _DA = "DestinationArn";
1176
+ const _MDI = "MetricDefinitionIds";
1177
+ const _MR = "MaxResults";
1178
+ const _NT = "NextToken";
1179
+ const _TK = "TagKeys";
1180
+ const _d = "destination";
1181
+ const _dA = "destinationArn";
1182
+ const _mDI = "metricDefinitionIds";
1183
+ const _mR = "maxResults";
1184
+ const _nT = "nextToken";
1185
+ const _rAS = "retryAfterSeconds";
1186
+ const _ra = "retry-after";
1187
+ const _tK = "tagKeys";
1306
1188
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1307
1189
  if (encoded.length) {
1308
1190
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-rum",
3
3
  "description": "AWS SDK for JavaScript Rum 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",