@aws-sdk/client-grafana 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,36 +1,28 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateWorkspaceConfigurationCommand = exports.de_UpdateWorkspaceAuthenticationCommand = exports.de_UpdateWorkspaceCommand = exports.de_UpdatePermissionsCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListWorkspacesCommand = exports.de_ListVersionsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListPermissionsCommand = exports.de_DisassociateLicenseCommand = exports.de_DescribeWorkspaceConfigurationCommand = exports.de_DescribeWorkspaceAuthenticationCommand = exports.de_DescribeWorkspaceCommand = exports.de_DeleteWorkspaceApiKeyCommand = exports.de_DeleteWorkspaceCommand = exports.de_CreateWorkspaceApiKeyCommand = exports.de_CreateWorkspaceCommand = exports.de_AssociateLicenseCommand = exports.se_UpdateWorkspaceConfigurationCommand = exports.se_UpdateWorkspaceAuthenticationCommand = exports.se_UpdateWorkspaceCommand = exports.se_UpdatePermissionsCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListWorkspacesCommand = exports.se_ListVersionsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListPermissionsCommand = exports.se_DisassociateLicenseCommand = exports.se_DescribeWorkspaceConfigurationCommand = exports.se_DescribeWorkspaceAuthenticationCommand = exports.se_DescribeWorkspaceCommand = exports.se_DeleteWorkspaceApiKeyCommand = exports.se_DeleteWorkspaceCommand = exports.se_CreateWorkspaceApiKeyCommand = exports.se_CreateWorkspaceCommand = exports.se_AssociateLicenseCommand = 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 GrafanaServiceException_1 = require("../models/GrafanaServiceException");
8
8
  const models_0_1 = require("../models/models_0");
9
9
  const se_AssociateLicenseCommand = 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
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
13
- "/workspaces/{workspaceId}/licenses/{licenseType}";
14
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
15
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "licenseType", () => input.licenseType, "{licenseType}", false);
12
+ b.bp("/workspaces/{workspaceId}/licenses/{licenseType}");
13
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
14
+ b.p("licenseType", () => input.licenseType, "{licenseType}", false);
16
15
  let body;
17
- return new protocol_http_1.HttpRequest({
18
- protocol,
19
- hostname,
20
- port,
21
- method: "POST",
22
- headers,
23
- path: resolvedPath,
24
- body,
25
- });
16
+ b.m("POST").h(headers).b(body);
17
+ return b.build();
26
18
  };
27
19
  exports.se_AssociateLicenseCommand = se_AssociateLicenseCommand;
28
20
  const se_CreateWorkspaceCommand = async (input, context) => {
29
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
21
+ const b = (0, core_1.requestBuilder)(input, context);
30
22
  const headers = {
31
23
  "content-type": "application/json",
32
24
  };
33
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
25
+ b.bp("/workspaces");
34
26
  let body;
35
27
  body = JSON.stringify((0, smithy_client_1.take)(input, {
36
28
  accountAccessType: [],
@@ -51,307 +43,196 @@ const se_CreateWorkspaceCommand = async (input, context) => {
51
43
  workspaceOrganizationalUnits: (_) => (0, smithy_client_1._json)(_),
52
44
  workspaceRoleArn: [],
53
45
  }));
54
- return new protocol_http_1.HttpRequest({
55
- protocol,
56
- hostname,
57
- port,
58
- method: "POST",
59
- headers,
60
- path: resolvedPath,
61
- body,
62
- });
46
+ b.m("POST").h(headers).b(body);
47
+ return b.build();
63
48
  };
64
49
  exports.se_CreateWorkspaceCommand = se_CreateWorkspaceCommand;
65
50
  const se_CreateWorkspaceApiKeyCommand = async (input, context) => {
66
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
51
+ const b = (0, core_1.requestBuilder)(input, context);
67
52
  const headers = {
68
53
  "content-type": "application/json",
69
54
  };
70
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/apikeys";
71
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
55
+ b.bp("/workspaces/{workspaceId}/apikeys");
56
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
72
57
  let body;
73
58
  body = JSON.stringify((0, smithy_client_1.take)(input, {
74
59
  keyName: [],
75
60
  keyRole: [],
76
61
  secondsToLive: [],
77
62
  }));
78
- return new protocol_http_1.HttpRequest({
79
- protocol,
80
- hostname,
81
- port,
82
- method: "POST",
83
- headers,
84
- path: resolvedPath,
85
- body,
86
- });
63
+ b.m("POST").h(headers).b(body);
64
+ return b.build();
87
65
  };
88
66
  exports.se_CreateWorkspaceApiKeyCommand = se_CreateWorkspaceApiKeyCommand;
89
67
  const se_DeleteWorkspaceCommand = async (input, context) => {
90
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
68
+ const b = (0, core_1.requestBuilder)(input, context);
91
69
  const headers = {};
92
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
93
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
70
+ b.bp("/workspaces/{workspaceId}");
71
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
94
72
  let body;
95
- return new protocol_http_1.HttpRequest({
96
- protocol,
97
- hostname,
98
- port,
99
- method: "DELETE",
100
- headers,
101
- path: resolvedPath,
102
- body,
103
- });
73
+ b.m("DELETE").h(headers).b(body);
74
+ return b.build();
104
75
  };
105
76
  exports.se_DeleteWorkspaceCommand = se_DeleteWorkspaceCommand;
106
77
  const se_DeleteWorkspaceApiKeyCommand = async (input, context) => {
107
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
78
+ const b = (0, core_1.requestBuilder)(input, context);
108
79
  const headers = {};
109
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
110
- "/workspaces/{workspaceId}/apikeys/{keyName}";
111
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "keyName", () => input.keyName, "{keyName}", false);
112
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
80
+ b.bp("/workspaces/{workspaceId}/apikeys/{keyName}");
81
+ b.p("keyName", () => input.keyName, "{keyName}", false);
82
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
113
83
  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
- });
84
+ b.m("DELETE").h(headers).b(body);
85
+ return b.build();
123
86
  };
124
87
  exports.se_DeleteWorkspaceApiKeyCommand = se_DeleteWorkspaceApiKeyCommand;
125
88
  const se_DescribeWorkspaceCommand = async (input, context) => {
126
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
89
+ const b = (0, core_1.requestBuilder)(input, context);
127
90
  const headers = {};
128
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
129
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
91
+ b.bp("/workspaces/{workspaceId}");
92
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
130
93
  let body;
131
- return new protocol_http_1.HttpRequest({
132
- protocol,
133
- hostname,
134
- port,
135
- method: "GET",
136
- headers,
137
- path: resolvedPath,
138
- body,
139
- });
94
+ b.m("GET").h(headers).b(body);
95
+ return b.build();
140
96
  };
141
97
  exports.se_DescribeWorkspaceCommand = se_DescribeWorkspaceCommand;
142
98
  const se_DescribeWorkspaceAuthenticationCommand = async (input, context) => {
143
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
99
+ const b = (0, core_1.requestBuilder)(input, context);
144
100
  const headers = {};
145
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/authentication";
146
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
101
+ b.bp("/workspaces/{workspaceId}/authentication");
102
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
147
103
  let body;
148
- return new protocol_http_1.HttpRequest({
149
- protocol,
150
- hostname,
151
- port,
152
- method: "GET",
153
- headers,
154
- path: resolvedPath,
155
- body,
156
- });
104
+ b.m("GET").h(headers).b(body);
105
+ return b.build();
157
106
  };
158
107
  exports.se_DescribeWorkspaceAuthenticationCommand = se_DescribeWorkspaceAuthenticationCommand;
159
108
  const se_DescribeWorkspaceConfigurationCommand = async (input, context) => {
160
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
109
+ const b = (0, core_1.requestBuilder)(input, context);
161
110
  const headers = {};
162
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/configuration";
163
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
111
+ b.bp("/workspaces/{workspaceId}/configuration");
112
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
164
113
  let body;
165
- return new protocol_http_1.HttpRequest({
166
- protocol,
167
- hostname,
168
- port,
169
- method: "GET",
170
- headers,
171
- path: resolvedPath,
172
- body,
173
- });
114
+ b.m("GET").h(headers).b(body);
115
+ return b.build();
174
116
  };
175
117
  exports.se_DescribeWorkspaceConfigurationCommand = se_DescribeWorkspaceConfigurationCommand;
176
118
  const se_DisassociateLicenseCommand = async (input, context) => {
177
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
119
+ const b = (0, core_1.requestBuilder)(input, context);
178
120
  const headers = {};
179
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
180
- "/workspaces/{workspaceId}/licenses/{licenseType}";
181
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
182
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "licenseType", () => input.licenseType, "{licenseType}", false);
121
+ b.bp("/workspaces/{workspaceId}/licenses/{licenseType}");
122
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
123
+ b.p("licenseType", () => input.licenseType, "{licenseType}", false);
183
124
  let body;
184
- return new protocol_http_1.HttpRequest({
185
- protocol,
186
- hostname,
187
- port,
188
- method: "DELETE",
189
- headers,
190
- path: resolvedPath,
191
- body,
192
- });
125
+ b.m("DELETE").h(headers).b(body);
126
+ return b.build();
193
127
  };
194
128
  exports.se_DisassociateLicenseCommand = se_DisassociateLicenseCommand;
195
129
  const se_ListPermissionsCommand = async (input, context) => {
196
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
130
+ const b = (0, core_1.requestBuilder)(input, context);
197
131
  const headers = {};
198
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/permissions";
199
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
132
+ b.bp("/workspaces/{workspaceId}/permissions");
133
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
200
134
  const query = (0, smithy_client_1.map)({
201
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
202
- nextToken: [, input.nextToken],
203
- userType: [, input.userType],
204
- userId: [, input.userId],
205
- groupId: [, input.groupId],
135
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
136
+ [_nT]: [, input[_nT]],
137
+ [_uT]: [, input[_uT]],
138
+ [_uI]: [, input[_uI]],
139
+ [_gI]: [, input[_gI]],
206
140
  });
207
141
  let body;
208
- return new protocol_http_1.HttpRequest({
209
- protocol,
210
- hostname,
211
- port,
212
- method: "GET",
213
- headers,
214
- path: resolvedPath,
215
- query,
216
- body,
217
- });
142
+ b.m("GET").h(headers).q(query).b(body);
143
+ return b.build();
218
144
  };
219
145
  exports.se_ListPermissionsCommand = se_ListPermissionsCommand;
220
146
  const se_ListTagsForResourceCommand = async (input, context) => {
221
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
147
+ const b = (0, core_1.requestBuilder)(input, context);
222
148
  const headers = {};
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);
149
+ b.bp("/tags/{resourceArn}");
150
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
225
151
  let body;
226
- return new protocol_http_1.HttpRequest({
227
- protocol,
228
- hostname,
229
- port,
230
- method: "GET",
231
- headers,
232
- path: resolvedPath,
233
- body,
234
- });
152
+ b.m("GET").h(headers).b(body);
153
+ return b.build();
235
154
  };
236
155
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
237
156
  const se_ListVersionsCommand = async (input, context) => {
238
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
157
+ const b = (0, core_1.requestBuilder)(input, context);
239
158
  const headers = {};
240
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/versions";
159
+ b.bp("/versions");
241
160
  const query = (0, smithy_client_1.map)({
242
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
243
- nextToken: [, input.nextToken],
244
- "workspace-id": [, input.workspaceId],
161
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
162
+ [_nT]: [, input[_nT]],
163
+ [_wi]: [, input[_wI]],
245
164
  });
246
165
  let body;
247
- return new protocol_http_1.HttpRequest({
248
- protocol,
249
- hostname,
250
- port,
251
- method: "GET",
252
- headers,
253
- path: resolvedPath,
254
- query,
255
- body,
256
- });
166
+ b.m("GET").h(headers).q(query).b(body);
167
+ return b.build();
257
168
  };
258
169
  exports.se_ListVersionsCommand = se_ListVersionsCommand;
259
170
  const se_ListWorkspacesCommand = async (input, context) => {
260
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
171
+ const b = (0, core_1.requestBuilder)(input, context);
261
172
  const headers = {};
262
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
173
+ b.bp("/workspaces");
263
174
  const query = (0, smithy_client_1.map)({
264
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
265
- nextToken: [, input.nextToken],
175
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
176
+ [_nT]: [, input[_nT]],
266
177
  });
267
178
  let body;
268
- return new protocol_http_1.HttpRequest({
269
- protocol,
270
- hostname,
271
- port,
272
- method: "GET",
273
- headers,
274
- path: resolvedPath,
275
- query,
276
- body,
277
- });
179
+ b.m("GET").h(headers).q(query).b(body);
180
+ return b.build();
278
181
  };
279
182
  exports.se_ListWorkspacesCommand = se_ListWorkspacesCommand;
280
183
  const se_TagResourceCommand = async (input, context) => {
281
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
184
+ const b = (0, core_1.requestBuilder)(input, context);
282
185
  const headers = {
283
186
  "content-type": "application/json",
284
187
  };
285
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
286
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
188
+ b.bp("/tags/{resourceArn}");
189
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
287
190
  let body;
288
191
  body = JSON.stringify((0, smithy_client_1.take)(input, {
289
192
  tags: (_) => (0, smithy_client_1._json)(_),
290
193
  }));
291
- return new protocol_http_1.HttpRequest({
292
- protocol,
293
- hostname,
294
- port,
295
- method: "POST",
296
- headers,
297
- path: resolvedPath,
298
- body,
299
- });
194
+ b.m("POST").h(headers).b(body);
195
+ return b.build();
300
196
  };
301
197
  exports.se_TagResourceCommand = se_TagResourceCommand;
302
198
  const se_UntagResourceCommand = async (input, context) => {
303
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
199
+ const b = (0, core_1.requestBuilder)(input, context);
304
200
  const headers = {};
305
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
306
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
201
+ b.bp("/tags/{resourceArn}");
202
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
307
203
  const query = (0, smithy_client_1.map)({
308
- tagKeys: [
204
+ [_tK]: [
309
205
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
310
- () => (input.tagKeys || []).map((_entry) => _entry),
206
+ () => (input[_tK] || []).map((_entry) => _entry),
311
207
  ],
312
208
  });
313
209
  let body;
314
- return new protocol_http_1.HttpRequest({
315
- protocol,
316
- hostname,
317
- port,
318
- method: "DELETE",
319
- headers,
320
- path: resolvedPath,
321
- query,
322
- body,
323
- });
210
+ b.m("DELETE").h(headers).q(query).b(body);
211
+ return b.build();
324
212
  };
325
213
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
326
214
  const se_UpdatePermissionsCommand = async (input, context) => {
327
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
215
+ const b = (0, core_1.requestBuilder)(input, context);
328
216
  const headers = {
329
217
  "content-type": "application/json",
330
218
  };
331
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/permissions";
332
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
219
+ b.bp("/workspaces/{workspaceId}/permissions");
220
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
333
221
  let body;
334
222
  body = JSON.stringify((0, smithy_client_1.take)(input, {
335
223
  updateInstructionBatch: (_) => (0, smithy_client_1._json)(_),
336
224
  }));
337
- return new protocol_http_1.HttpRequest({
338
- protocol,
339
- hostname,
340
- port,
341
- method: "PATCH",
342
- headers,
343
- path: resolvedPath,
344
- body,
345
- });
225
+ b.m("PATCH").h(headers).b(body);
226
+ return b.build();
346
227
  };
347
228
  exports.se_UpdatePermissionsCommand = se_UpdatePermissionsCommand;
348
229
  const se_UpdateWorkspaceCommand = async (input, context) => {
349
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
230
+ const b = (0, core_1.requestBuilder)(input, context);
350
231
  const headers = {
351
232
  "content-type": "application/json",
352
233
  };
353
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
354
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
234
+ b.bp("/workspaces/{workspaceId}");
235
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
355
236
  let body;
356
237
  body = JSON.stringify((0, smithy_client_1.take)(input, {
357
238
  accountAccessType: [],
@@ -369,61 +250,40 @@ const se_UpdateWorkspaceCommand = async (input, context) => {
369
250
  workspaceOrganizationalUnits: (_) => (0, smithy_client_1._json)(_),
370
251
  workspaceRoleArn: [],
371
252
  }));
372
- return new protocol_http_1.HttpRequest({
373
- protocol,
374
- hostname,
375
- port,
376
- method: "PUT",
377
- headers,
378
- path: resolvedPath,
379
- body,
380
- });
253
+ b.m("PUT").h(headers).b(body);
254
+ return b.build();
381
255
  };
382
256
  exports.se_UpdateWorkspaceCommand = se_UpdateWorkspaceCommand;
383
257
  const se_UpdateWorkspaceAuthenticationCommand = async (input, context) => {
384
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
258
+ const b = (0, core_1.requestBuilder)(input, context);
385
259
  const headers = {
386
260
  "content-type": "application/json",
387
261
  };
388
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/authentication";
389
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
262
+ b.bp("/workspaces/{workspaceId}/authentication");
263
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
390
264
  let body;
391
265
  body = JSON.stringify((0, smithy_client_1.take)(input, {
392
266
  authenticationProviders: (_) => (0, smithy_client_1._json)(_),
393
267
  samlConfiguration: (_) => (0, smithy_client_1._json)(_),
394
268
  }));
395
- return new protocol_http_1.HttpRequest({
396
- protocol,
397
- hostname,
398
- port,
399
- method: "POST",
400
- headers,
401
- path: resolvedPath,
402
- body,
403
- });
269
+ b.m("POST").h(headers).b(body);
270
+ return b.build();
404
271
  };
405
272
  exports.se_UpdateWorkspaceAuthenticationCommand = se_UpdateWorkspaceAuthenticationCommand;
406
273
  const se_UpdateWorkspaceConfigurationCommand = async (input, context) => {
407
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
274
+ const b = (0, core_1.requestBuilder)(input, context);
408
275
  const headers = {
409
276
  "content-type": "application/json",
410
277
  };
411
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/configuration";
412
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
278
+ b.bp("/workspaces/{workspaceId}/configuration");
279
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
413
280
  let body;
414
281
  body = JSON.stringify((0, smithy_client_1.take)(input, {
415
282
  configuration: (_) => smithy_client_1.LazyJsonString.fromObject(_),
416
283
  grafanaVersion: [],
417
284
  }));
418
- return new protocol_http_1.HttpRequest({
419
- protocol,
420
- hostname,
421
- port,
422
- method: "PUT",
423
- headers,
424
- path: resolvedPath,
425
- body,
426
- });
285
+ b.m("PUT").h(headers).b(body);
286
+ return b.build();
427
287
  };
428
288
  exports.se_UpdateWorkspaceConfigurationCommand = se_UpdateWorkspaceConfigurationCommand;
429
289
  const de_AssociateLicenseCommand = async (output, context) => {
@@ -1341,10 +1201,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1341
1201
  };
1342
1202
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1343
1203
  const contents = (0, smithy_client_1.map)({
1344
- retryAfterSeconds: [
1345
- () => void 0 !== parsedOutput.headers["retry-after"],
1346
- () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
1347
- ],
1204
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
1348
1205
  });
1349
1206
  const data = parsedOutput.body;
1350
1207
  const doc = (0, smithy_client_1.take)(data, {
@@ -1391,10 +1248,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1391
1248
  };
1392
1249
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1393
1250
  const contents = (0, smithy_client_1.map)({
1394
- retryAfterSeconds: [
1395
- () => void 0 !== parsedOutput.headers["retry-after"],
1396
- () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
1397
- ],
1251
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
1398
1252
  });
1399
1253
  const data = parsedOutput.body;
1400
1254
  const doc = (0, smithy_client_1.take)(data, {
@@ -1487,6 +1341,16 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1487
1341
  value !== "" &&
1488
1342
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1489
1343
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1344
+ const _gI = "groupId";
1345
+ const _mR = "maxResults";
1346
+ const _nT = "nextToken";
1347
+ const _rAS = "retryAfterSeconds";
1348
+ const _ra = "retry-after";
1349
+ const _tK = "tagKeys";
1350
+ const _uI = "userId";
1351
+ const _uT = "userType";
1352
+ const _wI = "workspaceId";
1353
+ const _wi = "workspace-id";
1490
1354
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1491
1355
  if (encoded.length) {
1492
1356
  return JSON.parse(encoded);
@@ -1,32 +1,24 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, 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, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, map, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { GrafanaServiceException as __BaseException } from "../models/GrafanaServiceException";
5
5
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  export const se_AssociateLicenseCommand = 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
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
10
- "/workspaces/{workspaceId}/licenses/{licenseType}";
11
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
12
- resolvedPath = __resolvedPath(resolvedPath, input, "licenseType", () => input.licenseType, "{licenseType}", false);
9
+ b.bp("/workspaces/{workspaceId}/licenses/{licenseType}");
10
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
11
+ b.p("licenseType", () => input.licenseType, "{licenseType}", false);
13
12
  let body;
14
- return new __HttpRequest({
15
- protocol,
16
- hostname,
17
- port,
18
- method: "POST",
19
- headers,
20
- path: resolvedPath,
21
- body,
22
- });
13
+ b.m("POST").h(headers).b(body);
14
+ return b.build();
23
15
  };
24
16
  export const se_CreateWorkspaceCommand = async (input, context) => {
25
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
17
+ const b = rb(input, context);
26
18
  const headers = {
27
19
  "content-type": "application/json",
28
20
  };
29
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
21
+ b.bp("/workspaces");
30
22
  let body;
31
23
  body = JSON.stringify(take(input, {
32
24
  accountAccessType: [],
@@ -47,292 +39,181 @@ export const se_CreateWorkspaceCommand = async (input, context) => {
47
39
  workspaceOrganizationalUnits: (_) => _json(_),
48
40
  workspaceRoleArn: [],
49
41
  }));
50
- return new __HttpRequest({
51
- protocol,
52
- hostname,
53
- port,
54
- method: "POST",
55
- headers,
56
- path: resolvedPath,
57
- body,
58
- });
42
+ b.m("POST").h(headers).b(body);
43
+ return b.build();
59
44
  };
60
45
  export const se_CreateWorkspaceApiKeyCommand = async (input, context) => {
61
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
46
+ const b = rb(input, context);
62
47
  const headers = {
63
48
  "content-type": "application/json",
64
49
  };
65
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/apikeys";
66
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
50
+ b.bp("/workspaces/{workspaceId}/apikeys");
51
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
67
52
  let body;
68
53
  body = JSON.stringify(take(input, {
69
54
  keyName: [],
70
55
  keyRole: [],
71
56
  secondsToLive: [],
72
57
  }));
73
- return new __HttpRequest({
74
- protocol,
75
- hostname,
76
- port,
77
- method: "POST",
78
- headers,
79
- path: resolvedPath,
80
- body,
81
- });
58
+ b.m("POST").h(headers).b(body);
59
+ return b.build();
82
60
  };
83
61
  export const se_DeleteWorkspaceCommand = async (input, context) => {
84
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
62
+ const b = rb(input, context);
85
63
  const headers = {};
86
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
87
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
64
+ b.bp("/workspaces/{workspaceId}");
65
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
88
66
  let body;
89
- return new __HttpRequest({
90
- protocol,
91
- hostname,
92
- port,
93
- method: "DELETE",
94
- headers,
95
- path: resolvedPath,
96
- body,
97
- });
67
+ b.m("DELETE").h(headers).b(body);
68
+ return b.build();
98
69
  };
99
70
  export const se_DeleteWorkspaceApiKeyCommand = async (input, context) => {
100
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
71
+ const b = rb(input, context);
101
72
  const headers = {};
102
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
103
- "/workspaces/{workspaceId}/apikeys/{keyName}";
104
- resolvedPath = __resolvedPath(resolvedPath, input, "keyName", () => input.keyName, "{keyName}", false);
105
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
73
+ b.bp("/workspaces/{workspaceId}/apikeys/{keyName}");
74
+ b.p("keyName", () => input.keyName, "{keyName}", false);
75
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
106
76
  let body;
107
- return new __HttpRequest({
108
- protocol,
109
- hostname,
110
- port,
111
- method: "DELETE",
112
- headers,
113
- path: resolvedPath,
114
- body,
115
- });
77
+ b.m("DELETE").h(headers).b(body);
78
+ return b.build();
116
79
  };
117
80
  export const se_DescribeWorkspaceCommand = async (input, context) => {
118
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
81
+ const b = rb(input, context);
119
82
  const headers = {};
120
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
121
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
83
+ b.bp("/workspaces/{workspaceId}");
84
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
122
85
  let body;
123
- return new __HttpRequest({
124
- protocol,
125
- hostname,
126
- port,
127
- method: "GET",
128
- headers,
129
- path: resolvedPath,
130
- body,
131
- });
86
+ b.m("GET").h(headers).b(body);
87
+ return b.build();
132
88
  };
133
89
  export const se_DescribeWorkspaceAuthenticationCommand = async (input, context) => {
134
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
90
+ const b = rb(input, context);
135
91
  const headers = {};
136
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/authentication";
137
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
92
+ b.bp("/workspaces/{workspaceId}/authentication");
93
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
138
94
  let body;
139
- return new __HttpRequest({
140
- protocol,
141
- hostname,
142
- port,
143
- method: "GET",
144
- headers,
145
- path: resolvedPath,
146
- body,
147
- });
95
+ b.m("GET").h(headers).b(body);
96
+ return b.build();
148
97
  };
149
98
  export const se_DescribeWorkspaceConfigurationCommand = async (input, context) => {
150
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
99
+ const b = rb(input, context);
151
100
  const headers = {};
152
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/configuration";
153
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
101
+ b.bp("/workspaces/{workspaceId}/configuration");
102
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
154
103
  let body;
155
- return new __HttpRequest({
156
- protocol,
157
- hostname,
158
- port,
159
- method: "GET",
160
- headers,
161
- path: resolvedPath,
162
- body,
163
- });
104
+ b.m("GET").h(headers).b(body);
105
+ return b.build();
164
106
  };
165
107
  export const se_DisassociateLicenseCommand = async (input, context) => {
166
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
108
+ const b = rb(input, context);
167
109
  const headers = {};
168
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
169
- "/workspaces/{workspaceId}/licenses/{licenseType}";
170
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
171
- resolvedPath = __resolvedPath(resolvedPath, input, "licenseType", () => input.licenseType, "{licenseType}", false);
110
+ b.bp("/workspaces/{workspaceId}/licenses/{licenseType}");
111
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
112
+ b.p("licenseType", () => input.licenseType, "{licenseType}", false);
172
113
  let body;
173
- return new __HttpRequest({
174
- protocol,
175
- hostname,
176
- port,
177
- method: "DELETE",
178
- headers,
179
- path: resolvedPath,
180
- body,
181
- });
114
+ b.m("DELETE").h(headers).b(body);
115
+ return b.build();
182
116
  };
183
117
  export const se_ListPermissionsCommand = async (input, context) => {
184
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
118
+ const b = rb(input, context);
185
119
  const headers = {};
186
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/permissions";
187
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
120
+ b.bp("/workspaces/{workspaceId}/permissions");
121
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
188
122
  const query = map({
189
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
190
- nextToken: [, input.nextToken],
191
- userType: [, input.userType],
192
- userId: [, input.userId],
193
- groupId: [, input.groupId],
123
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
124
+ [_nT]: [, input[_nT]],
125
+ [_uT]: [, input[_uT]],
126
+ [_uI]: [, input[_uI]],
127
+ [_gI]: [, input[_gI]],
194
128
  });
195
129
  let body;
196
- return new __HttpRequest({
197
- protocol,
198
- hostname,
199
- port,
200
- method: "GET",
201
- headers,
202
- path: resolvedPath,
203
- query,
204
- body,
205
- });
130
+ b.m("GET").h(headers).q(query).b(body);
131
+ return b.build();
206
132
  };
207
133
  export const se_ListTagsForResourceCommand = async (input, context) => {
208
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
134
+ const b = rb(input, context);
209
135
  const headers = {};
210
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
211
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
136
+ b.bp("/tags/{resourceArn}");
137
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
212
138
  let body;
213
- return new __HttpRequest({
214
- protocol,
215
- hostname,
216
- port,
217
- method: "GET",
218
- headers,
219
- path: resolvedPath,
220
- body,
221
- });
139
+ b.m("GET").h(headers).b(body);
140
+ return b.build();
222
141
  };
223
142
  export const se_ListVersionsCommand = async (input, context) => {
224
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
143
+ const b = rb(input, context);
225
144
  const headers = {};
226
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/versions";
145
+ b.bp("/versions");
227
146
  const query = map({
228
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
229
- nextToken: [, input.nextToken],
230
- "workspace-id": [, input.workspaceId],
147
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
148
+ [_nT]: [, input[_nT]],
149
+ [_wi]: [, input[_wI]],
231
150
  });
232
151
  let body;
233
- return new __HttpRequest({
234
- protocol,
235
- hostname,
236
- port,
237
- method: "GET",
238
- headers,
239
- path: resolvedPath,
240
- query,
241
- body,
242
- });
152
+ b.m("GET").h(headers).q(query).b(body);
153
+ return b.build();
243
154
  };
244
155
  export const se_ListWorkspacesCommand = async (input, context) => {
245
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
156
+ const b = rb(input, context);
246
157
  const headers = {};
247
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
158
+ b.bp("/workspaces");
248
159
  const query = map({
249
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
250
- nextToken: [, input.nextToken],
160
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
161
+ [_nT]: [, input[_nT]],
251
162
  });
252
163
  let body;
253
- return new __HttpRequest({
254
- protocol,
255
- hostname,
256
- port,
257
- method: "GET",
258
- headers,
259
- path: resolvedPath,
260
- query,
261
- body,
262
- });
164
+ b.m("GET").h(headers).q(query).b(body);
165
+ return b.build();
263
166
  };
264
167
  export const se_TagResourceCommand = async (input, context) => {
265
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
168
+ const b = rb(input, context);
266
169
  const headers = {
267
170
  "content-type": "application/json",
268
171
  };
269
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
270
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
172
+ b.bp("/tags/{resourceArn}");
173
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
271
174
  let body;
272
175
  body = JSON.stringify(take(input, {
273
176
  tags: (_) => _json(_),
274
177
  }));
275
- return new __HttpRequest({
276
- protocol,
277
- hostname,
278
- port,
279
- method: "POST",
280
- headers,
281
- path: resolvedPath,
282
- body,
283
- });
178
+ b.m("POST").h(headers).b(body);
179
+ return b.build();
284
180
  };
285
181
  export const se_UntagResourceCommand = async (input, context) => {
286
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
182
+ const b = rb(input, context);
287
183
  const headers = {};
288
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
289
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
184
+ b.bp("/tags/{resourceArn}");
185
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
290
186
  const query = map({
291
- tagKeys: [
187
+ [_tK]: [
292
188
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
293
- () => (input.tagKeys || []).map((_entry) => _entry),
189
+ () => (input[_tK] || []).map((_entry) => _entry),
294
190
  ],
295
191
  });
296
192
  let body;
297
- return new __HttpRequest({
298
- protocol,
299
- hostname,
300
- port,
301
- method: "DELETE",
302
- headers,
303
- path: resolvedPath,
304
- query,
305
- body,
306
- });
193
+ b.m("DELETE").h(headers).q(query).b(body);
194
+ return b.build();
307
195
  };
308
196
  export const se_UpdatePermissionsCommand = async (input, context) => {
309
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
197
+ const b = rb(input, context);
310
198
  const headers = {
311
199
  "content-type": "application/json",
312
200
  };
313
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/permissions";
314
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
201
+ b.bp("/workspaces/{workspaceId}/permissions");
202
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
315
203
  let body;
316
204
  body = JSON.stringify(take(input, {
317
205
  updateInstructionBatch: (_) => _json(_),
318
206
  }));
319
- return new __HttpRequest({
320
- protocol,
321
- hostname,
322
- port,
323
- method: "PATCH",
324
- headers,
325
- path: resolvedPath,
326
- body,
327
- });
207
+ b.m("PATCH").h(headers).b(body);
208
+ return b.build();
328
209
  };
329
210
  export const se_UpdateWorkspaceCommand = async (input, context) => {
330
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
211
+ const b = rb(input, context);
331
212
  const headers = {
332
213
  "content-type": "application/json",
333
214
  };
334
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}";
335
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
215
+ b.bp("/workspaces/{workspaceId}");
216
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
336
217
  let body;
337
218
  body = JSON.stringify(take(input, {
338
219
  accountAccessType: [],
@@ -350,59 +231,38 @@ export const se_UpdateWorkspaceCommand = async (input, context) => {
350
231
  workspaceOrganizationalUnits: (_) => _json(_),
351
232
  workspaceRoleArn: [],
352
233
  }));
353
- return new __HttpRequest({
354
- protocol,
355
- hostname,
356
- port,
357
- method: "PUT",
358
- headers,
359
- path: resolvedPath,
360
- body,
361
- });
234
+ b.m("PUT").h(headers).b(body);
235
+ return b.build();
362
236
  };
363
237
  export const se_UpdateWorkspaceAuthenticationCommand = async (input, context) => {
364
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
238
+ const b = rb(input, context);
365
239
  const headers = {
366
240
  "content-type": "application/json",
367
241
  };
368
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/authentication";
369
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
242
+ b.bp("/workspaces/{workspaceId}/authentication");
243
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
370
244
  let body;
371
245
  body = JSON.stringify(take(input, {
372
246
  authenticationProviders: (_) => _json(_),
373
247
  samlConfiguration: (_) => _json(_),
374
248
  }));
375
- return new __HttpRequest({
376
- protocol,
377
- hostname,
378
- port,
379
- method: "POST",
380
- headers,
381
- path: resolvedPath,
382
- body,
383
- });
249
+ b.m("POST").h(headers).b(body);
250
+ return b.build();
384
251
  };
385
252
  export const se_UpdateWorkspaceConfigurationCommand = async (input, context) => {
386
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
253
+ const b = rb(input, context);
387
254
  const headers = {
388
255
  "content-type": "application/json",
389
256
  };
390
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/configuration";
391
- resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId, "{workspaceId}", false);
257
+ b.bp("/workspaces/{workspaceId}/configuration");
258
+ b.p("workspaceId", () => input.workspaceId, "{workspaceId}", false);
392
259
  let body;
393
260
  body = JSON.stringify(take(input, {
394
261
  configuration: (_) => __LazyJsonString.fromObject(_),
395
262
  grafanaVersion: [],
396
263
  }));
397
- return new __HttpRequest({
398
- protocol,
399
- hostname,
400
- port,
401
- method: "PUT",
402
- headers,
403
- path: resolvedPath,
404
- body,
405
- });
264
+ b.m("PUT").h(headers).b(body);
265
+ return b.build();
406
266
  };
407
267
  export const de_AssociateLicenseCommand = async (output, context) => {
408
268
  if (output.statusCode !== 202 && output.statusCode >= 300) {
@@ -1300,10 +1160,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1300
1160
  };
1301
1161
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1302
1162
  const contents = map({
1303
- retryAfterSeconds: [
1304
- () => void 0 !== parsedOutput.headers["retry-after"],
1305
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
1306
- ],
1163
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1307
1164
  });
1308
1165
  const data = parsedOutput.body;
1309
1166
  const doc = take(data, {
@@ -1350,10 +1207,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1350
1207
  };
1351
1208
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1352
1209
  const contents = map({
1353
- retryAfterSeconds: [
1354
- () => void 0 !== parsedOutput.headers["retry-after"],
1355
- () => __strictParseInt32(parsedOutput.headers["retry-after"]),
1356
- ],
1210
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1357
1211
  });
1358
1212
  const data = parsedOutput.body;
1359
1213
  const doc = take(data, {
@@ -1446,6 +1300,16 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1446
1300
  value !== "" &&
1447
1301
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1448
1302
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1303
+ const _gI = "groupId";
1304
+ const _mR = "maxResults";
1305
+ const _nT = "nextToken";
1306
+ const _rAS = "retryAfterSeconds";
1307
+ const _ra = "retry-after";
1308
+ const _tK = "tagKeys";
1309
+ const _uI = "userId";
1310
+ const _uT = "userType";
1311
+ const _wI = "workspaceId";
1312
+ const _wi = "workspace-id";
1449
1313
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1450
1314
  if (encoded.length) {
1451
1315
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-grafana",
3
3
  "description": "AWS SDK for JavaScript Grafana 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",