@aws-sdk/client-bedrock 3.474.0 → 3.477.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateProvisionedModelThroughputCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopModelCustomizationJobCommand = exports.de_PutModelInvocationLoggingConfigurationCommand = exports.de_ListTagsForResourceCommand = exports.de_ListProvisionedModelThroughputsCommand = exports.de_ListModelCustomizationJobsCommand = exports.de_ListFoundationModelsCommand = exports.de_ListCustomModelsCommand = exports.de_GetProvisionedModelThroughputCommand = exports.de_GetModelInvocationLoggingConfigurationCommand = exports.de_GetModelCustomizationJobCommand = exports.de_GetFoundationModelCommand = exports.de_GetCustomModelCommand = exports.de_DeleteProvisionedModelThroughputCommand = exports.de_DeleteModelInvocationLoggingConfigurationCommand = exports.de_DeleteCustomModelCommand = exports.de_CreateProvisionedModelThroughputCommand = exports.de_CreateModelCustomizationJobCommand = exports.se_UpdateProvisionedModelThroughputCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopModelCustomizationJobCommand = exports.se_PutModelInvocationLoggingConfigurationCommand = exports.se_ListTagsForResourceCommand = exports.se_ListProvisionedModelThroughputsCommand = exports.se_ListModelCustomizationJobsCommand = exports.se_ListFoundationModelsCommand = exports.se_ListCustomModelsCommand = exports.se_GetProvisionedModelThroughputCommand = exports.se_GetModelInvocationLoggingConfigurationCommand = exports.se_GetModelCustomizationJobCommand = exports.se_GetFoundationModelCommand = exports.se_GetCustomModelCommand = exports.se_DeleteProvisionedModelThroughputCommand = exports.se_DeleteModelInvocationLoggingConfigurationCommand = exports.se_DeleteCustomModelCommand = exports.se_CreateProvisionedModelThroughputCommand = exports.se_CreateModelCustomizationJobCommand = 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 BedrockServiceException_1 = require("../models/BedrockServiceException");
8
8
  const models_0_1 = require("../models/models_0");
9
9
  const se_CreateModelCustomizationJobCommand = async (input, context) => {
10
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const b = (0, core_1.requestBuilder)(input, context);
11
11
  const headers = {
12
12
  "content-type": "application/json",
13
13
  };
14
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/model-customization-jobs";
14
+ b.bp("/model-customization-jobs");
15
15
  let body;
16
16
  body = JSON.stringify((0, smithy_client_1.take)(input, {
17
17
  baseModelIdentifier: [],
@@ -29,23 +29,16 @@ const se_CreateModelCustomizationJobCommand = async (input, context) => {
29
29
  validationDataConfig: (_) => (0, smithy_client_1._json)(_),
30
30
  vpcConfig: (_) => (0, smithy_client_1._json)(_),
31
31
  }));
32
- return new protocol_http_1.HttpRequest({
33
- protocol,
34
- hostname,
35
- port,
36
- method: "POST",
37
- headers,
38
- path: resolvedPath,
39
- body,
40
- });
32
+ b.m("POST").h(headers).b(body);
33
+ return b.build();
41
34
  };
42
35
  exports.se_CreateModelCustomizationJobCommand = se_CreateModelCustomizationJobCommand;
43
36
  const se_CreateProvisionedModelThroughputCommand = async (input, context) => {
44
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
37
+ const b = (0, core_1.requestBuilder)(input, context);
45
38
  const headers = {
46
39
  "content-type": "application/json",
47
40
  };
48
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/provisioned-model-throughput";
41
+ b.bp("/provisioned-model-throughput");
49
42
  let body;
50
43
  body = JSON.stringify((0, smithy_client_1.take)(input, {
51
44
  clientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -55,409 +48,268 @@ const se_CreateProvisionedModelThroughputCommand = async (input, context) => {
55
48
  provisionedModelName: [],
56
49
  tags: (_) => (0, smithy_client_1._json)(_),
57
50
  }));
58
- return new protocol_http_1.HttpRequest({
59
- protocol,
60
- hostname,
61
- port,
62
- method: "POST",
63
- headers,
64
- path: resolvedPath,
65
- body,
66
- });
51
+ b.m("POST").h(headers).b(body);
52
+ return b.build();
67
53
  };
68
54
  exports.se_CreateProvisionedModelThroughputCommand = se_CreateProvisionedModelThroughputCommand;
69
55
  const se_DeleteCustomModelCommand = async (input, context) => {
70
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
56
+ const b = (0, core_1.requestBuilder)(input, context);
71
57
  const headers = {};
72
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/custom-models/{modelIdentifier}";
73
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
58
+ b.bp("/custom-models/{modelIdentifier}");
59
+ b.p("modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
74
60
  let body;
75
- return new protocol_http_1.HttpRequest({
76
- protocol,
77
- hostname,
78
- port,
79
- method: "DELETE",
80
- headers,
81
- path: resolvedPath,
82
- body,
83
- });
61
+ b.m("DELETE").h(headers).b(body);
62
+ return b.build();
84
63
  };
85
64
  exports.se_DeleteCustomModelCommand = se_DeleteCustomModelCommand;
86
65
  const se_DeleteModelInvocationLoggingConfigurationCommand = async (input, context) => {
87
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
66
+ const b = (0, core_1.requestBuilder)(input, context);
88
67
  const headers = {
89
68
  "content-type": "application/json",
90
69
  };
91
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/logging/modelinvocations";
70
+ b.bp("/logging/modelinvocations");
92
71
  let body;
93
72
  body = "";
94
- return new protocol_http_1.HttpRequest({
95
- protocol,
96
- hostname,
97
- port,
98
- method: "DELETE",
99
- headers,
100
- path: resolvedPath,
101
- body,
102
- });
73
+ b.m("DELETE").h(headers).b(body);
74
+ return b.build();
103
75
  };
104
76
  exports.se_DeleteModelInvocationLoggingConfigurationCommand = se_DeleteModelInvocationLoggingConfigurationCommand;
105
77
  const se_DeleteProvisionedModelThroughputCommand = async (input, context) => {
106
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
78
+ const b = (0, core_1.requestBuilder)(input, context);
107
79
  const headers = {};
108
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
109
- "/provisioned-model-throughput/{provisionedModelId}";
110
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
80
+ b.bp("/provisioned-model-throughput/{provisionedModelId}");
81
+ b.p("provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
111
82
  let body;
112
- return new protocol_http_1.HttpRequest({
113
- protocol,
114
- hostname,
115
- port,
116
- method: "DELETE",
117
- headers,
118
- path: resolvedPath,
119
- body,
120
- });
83
+ b.m("DELETE").h(headers).b(body);
84
+ return b.build();
121
85
  };
122
86
  exports.se_DeleteProvisionedModelThroughputCommand = se_DeleteProvisionedModelThroughputCommand;
123
87
  const se_GetCustomModelCommand = async (input, context) => {
124
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
88
+ const b = (0, core_1.requestBuilder)(input, context);
125
89
  const headers = {};
126
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/custom-models/{modelIdentifier}";
127
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
90
+ b.bp("/custom-models/{modelIdentifier}");
91
+ b.p("modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
128
92
  let body;
129
- return new protocol_http_1.HttpRequest({
130
- protocol,
131
- hostname,
132
- port,
133
- method: "GET",
134
- headers,
135
- path: resolvedPath,
136
- body,
137
- });
93
+ b.m("GET").h(headers).b(body);
94
+ return b.build();
138
95
  };
139
96
  exports.se_GetCustomModelCommand = se_GetCustomModelCommand;
140
97
  const se_GetFoundationModelCommand = async (input, context) => {
141
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
98
+ const b = (0, core_1.requestBuilder)(input, context);
142
99
  const headers = {};
143
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/foundation-models/{modelIdentifier}";
144
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
100
+ b.bp("/foundation-models/{modelIdentifier}");
101
+ b.p("modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
145
102
  let body;
146
- return new protocol_http_1.HttpRequest({
147
- protocol,
148
- hostname,
149
- port,
150
- method: "GET",
151
- headers,
152
- path: resolvedPath,
153
- body,
154
- });
103
+ b.m("GET").h(headers).b(body);
104
+ return b.build();
155
105
  };
156
106
  exports.se_GetFoundationModelCommand = se_GetFoundationModelCommand;
157
107
  const se_GetModelCustomizationJobCommand = async (input, context) => {
158
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
108
+ const b = (0, core_1.requestBuilder)(input, context);
159
109
  const headers = {};
160
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/model-customization-jobs/{jobIdentifier}";
161
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "jobIdentifier", () => input.jobIdentifier, "{jobIdentifier}", false);
110
+ b.bp("/model-customization-jobs/{jobIdentifier}");
111
+ b.p("jobIdentifier", () => input.jobIdentifier, "{jobIdentifier}", false);
162
112
  let body;
163
- return new protocol_http_1.HttpRequest({
164
- protocol,
165
- hostname,
166
- port,
167
- method: "GET",
168
- headers,
169
- path: resolvedPath,
170
- body,
171
- });
113
+ b.m("GET").h(headers).b(body);
114
+ return b.build();
172
115
  };
173
116
  exports.se_GetModelCustomizationJobCommand = se_GetModelCustomizationJobCommand;
174
117
  const se_GetModelInvocationLoggingConfigurationCommand = async (input, context) => {
175
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
118
+ const b = (0, core_1.requestBuilder)(input, context);
176
119
  const headers = {
177
120
  "content-type": "application/json",
178
121
  };
179
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/logging/modelinvocations";
122
+ b.bp("/logging/modelinvocations");
180
123
  let body;
181
124
  body = "";
182
- return new protocol_http_1.HttpRequest({
183
- protocol,
184
- hostname,
185
- port,
186
- method: "GET",
187
- headers,
188
- path: resolvedPath,
189
- body,
190
- });
125
+ b.m("GET").h(headers).b(body);
126
+ return b.build();
191
127
  };
192
128
  exports.se_GetModelInvocationLoggingConfigurationCommand = se_GetModelInvocationLoggingConfigurationCommand;
193
129
  const se_GetProvisionedModelThroughputCommand = async (input, context) => {
194
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
130
+ const b = (0, core_1.requestBuilder)(input, context);
195
131
  const headers = {};
196
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
197
- "/provisioned-model-throughput/{provisionedModelId}";
198
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
132
+ b.bp("/provisioned-model-throughput/{provisionedModelId}");
133
+ b.p("provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
199
134
  let body;
200
- return new protocol_http_1.HttpRequest({
201
- protocol,
202
- hostname,
203
- port,
204
- method: "GET",
205
- headers,
206
- path: resolvedPath,
207
- body,
208
- });
135
+ b.m("GET").h(headers).b(body);
136
+ return b.build();
209
137
  };
210
138
  exports.se_GetProvisionedModelThroughputCommand = se_GetProvisionedModelThroughputCommand;
211
139
  const se_ListCustomModelsCommand = async (input, context) => {
212
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
140
+ const b = (0, core_1.requestBuilder)(input, context);
213
141
  const headers = {};
214
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/custom-models";
142
+ b.bp("/custom-models");
215
143
  const query = (0, smithy_client_1.map)({
216
- creationTimeBefore: [
144
+ [_cTB]: [
217
145
  () => input.creationTimeBefore !== void 0,
218
- () => (input.creationTimeBefore.toISOString().split(".")[0] + "Z").toString(),
146
+ () => (input[_cTB].toISOString().split(".")[0] + "Z").toString(),
219
147
  ],
220
- creationTimeAfter: [
148
+ [_cTA]: [
221
149
  () => input.creationTimeAfter !== void 0,
222
- () => (input.creationTimeAfter.toISOString().split(".")[0] + "Z").toString(),
150
+ () => (input[_cTA].toISOString().split(".")[0] + "Z").toString(),
223
151
  ],
224
- nameContains: [, input.nameContains],
225
- baseModelArnEquals: [, input.baseModelArnEquals],
226
- foundationModelArnEquals: [, input.foundationModelArnEquals],
227
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
228
- nextToken: [, input.nextToken],
229
- sortBy: [, input.sortBy],
230
- sortOrder: [, input.sortOrder],
152
+ [_nC]: [, input[_nC]],
153
+ [_bMAE]: [, input[_bMAE]],
154
+ [_fMAE]: [, input[_fMAE]],
155
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
156
+ [_nT]: [, input[_nT]],
157
+ [_sB]: [, input[_sB]],
158
+ [_sO]: [, input[_sO]],
231
159
  });
232
160
  let body;
233
- return new protocol_http_1.HttpRequest({
234
- protocol,
235
- hostname,
236
- port,
237
- method: "GET",
238
- headers,
239
- path: resolvedPath,
240
- query,
241
- body,
242
- });
161
+ b.m("GET").h(headers).q(query).b(body);
162
+ return b.build();
243
163
  };
244
164
  exports.se_ListCustomModelsCommand = se_ListCustomModelsCommand;
245
165
  const se_ListFoundationModelsCommand = async (input, context) => {
246
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
166
+ const b = (0, core_1.requestBuilder)(input, context);
247
167
  const headers = {};
248
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/foundation-models";
168
+ b.bp("/foundation-models");
249
169
  const query = (0, smithy_client_1.map)({
250
- byProvider: [, input.byProvider],
251
- byCustomizationType: [, input.byCustomizationType],
252
- byOutputModality: [, input.byOutputModality],
253
- byInferenceType: [, input.byInferenceType],
170
+ [_bP]: [, input[_bP]],
171
+ [_bCT]: [, input[_bCT]],
172
+ [_bOM]: [, input[_bOM]],
173
+ [_bIT]: [, input[_bIT]],
254
174
  });
255
175
  let body;
256
- return new protocol_http_1.HttpRequest({
257
- protocol,
258
- hostname,
259
- port,
260
- method: "GET",
261
- headers,
262
- path: resolvedPath,
263
- query,
264
- body,
265
- });
176
+ b.m("GET").h(headers).q(query).b(body);
177
+ return b.build();
266
178
  };
267
179
  exports.se_ListFoundationModelsCommand = se_ListFoundationModelsCommand;
268
180
  const se_ListModelCustomizationJobsCommand = async (input, context) => {
269
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
181
+ const b = (0, core_1.requestBuilder)(input, context);
270
182
  const headers = {};
271
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/model-customization-jobs";
183
+ b.bp("/model-customization-jobs");
272
184
  const query = (0, smithy_client_1.map)({
273
- creationTimeAfter: [
185
+ [_cTA]: [
274
186
  () => input.creationTimeAfter !== void 0,
275
- () => (input.creationTimeAfter.toISOString().split(".")[0] + "Z").toString(),
187
+ () => (input[_cTA].toISOString().split(".")[0] + "Z").toString(),
276
188
  ],
277
- creationTimeBefore: [
189
+ [_cTB]: [
278
190
  () => input.creationTimeBefore !== void 0,
279
- () => (input.creationTimeBefore.toISOString().split(".")[0] + "Z").toString(),
191
+ () => (input[_cTB].toISOString().split(".")[0] + "Z").toString(),
280
192
  ],
281
- statusEquals: [, input.statusEquals],
282
- nameContains: [, input.nameContains],
283
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
284
- nextToken: [, input.nextToken],
285
- sortBy: [, input.sortBy],
286
- sortOrder: [, input.sortOrder],
193
+ [_sE]: [, input[_sE]],
194
+ [_nC]: [, input[_nC]],
195
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
196
+ [_nT]: [, input[_nT]],
197
+ [_sB]: [, input[_sB]],
198
+ [_sO]: [, input[_sO]],
287
199
  });
288
200
  let body;
289
- return new protocol_http_1.HttpRequest({
290
- protocol,
291
- hostname,
292
- port,
293
- method: "GET",
294
- headers,
295
- path: resolvedPath,
296
- query,
297
- body,
298
- });
201
+ b.m("GET").h(headers).q(query).b(body);
202
+ return b.build();
299
203
  };
300
204
  exports.se_ListModelCustomizationJobsCommand = se_ListModelCustomizationJobsCommand;
301
205
  const se_ListProvisionedModelThroughputsCommand = async (input, context) => {
302
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
206
+ const b = (0, core_1.requestBuilder)(input, context);
303
207
  const headers = {};
304
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/provisioned-model-throughputs";
208
+ b.bp("/provisioned-model-throughputs");
305
209
  const query = (0, smithy_client_1.map)({
306
- creationTimeAfter: [
210
+ [_cTA]: [
307
211
  () => input.creationTimeAfter !== void 0,
308
- () => (input.creationTimeAfter.toISOString().split(".")[0] + "Z").toString(),
212
+ () => (input[_cTA].toISOString().split(".")[0] + "Z").toString(),
309
213
  ],
310
- creationTimeBefore: [
214
+ [_cTB]: [
311
215
  () => input.creationTimeBefore !== void 0,
312
- () => (input.creationTimeBefore.toISOString().split(".")[0] + "Z").toString(),
216
+ () => (input[_cTB].toISOString().split(".")[0] + "Z").toString(),
313
217
  ],
314
- statusEquals: [, input.statusEquals],
315
- modelArnEquals: [, input.modelArnEquals],
316
- nameContains: [, input.nameContains],
317
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
318
- nextToken: [, input.nextToken],
319
- sortBy: [, input.sortBy],
320
- sortOrder: [, input.sortOrder],
218
+ [_sE]: [, input[_sE]],
219
+ [_mAE]: [, input[_mAE]],
220
+ [_nC]: [, input[_nC]],
221
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
222
+ [_nT]: [, input[_nT]],
223
+ [_sB]: [, input[_sB]],
224
+ [_sO]: [, input[_sO]],
321
225
  });
322
226
  let body;
323
- return new protocol_http_1.HttpRequest({
324
- protocol,
325
- hostname,
326
- port,
327
- method: "GET",
328
- headers,
329
- path: resolvedPath,
330
- query,
331
- body,
332
- });
227
+ b.m("GET").h(headers).q(query).b(body);
228
+ return b.build();
333
229
  };
334
230
  exports.se_ListProvisionedModelThroughputsCommand = se_ListProvisionedModelThroughputsCommand;
335
231
  const se_ListTagsForResourceCommand = async (input, context) => {
336
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
232
+ const b = (0, core_1.requestBuilder)(input, context);
337
233
  const headers = {
338
234
  "content-type": "application/json",
339
235
  };
340
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listTagsForResource";
236
+ b.bp("/listTagsForResource");
341
237
  let body;
342
238
  body = JSON.stringify((0, smithy_client_1.take)(input, {
343
239
  resourceARN: [],
344
240
  }));
345
- return new protocol_http_1.HttpRequest({
346
- protocol,
347
- hostname,
348
- port,
349
- method: "POST",
350
- headers,
351
- path: resolvedPath,
352
- body,
353
- });
241
+ b.m("POST").h(headers).b(body);
242
+ return b.build();
354
243
  };
355
244
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
356
245
  const se_PutModelInvocationLoggingConfigurationCommand = async (input, context) => {
357
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
246
+ const b = (0, core_1.requestBuilder)(input, context);
358
247
  const headers = {
359
248
  "content-type": "application/json",
360
249
  };
361
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/logging/modelinvocations";
250
+ b.bp("/logging/modelinvocations");
362
251
  let body;
363
252
  body = JSON.stringify((0, smithy_client_1.take)(input, {
364
253
  loggingConfig: (_) => (0, smithy_client_1._json)(_),
365
254
  }));
366
- return new protocol_http_1.HttpRequest({
367
- protocol,
368
- hostname,
369
- port,
370
- method: "PUT",
371
- headers,
372
- path: resolvedPath,
373
- body,
374
- });
255
+ b.m("PUT").h(headers).b(body);
256
+ return b.build();
375
257
  };
376
258
  exports.se_PutModelInvocationLoggingConfigurationCommand = se_PutModelInvocationLoggingConfigurationCommand;
377
259
  const se_StopModelCustomizationJobCommand = async (input, context) => {
378
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
260
+ const b = (0, core_1.requestBuilder)(input, context);
379
261
  const headers = {};
380
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
381
- "/model-customization-jobs/{jobIdentifier}/stop";
382
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "jobIdentifier", () => input.jobIdentifier, "{jobIdentifier}", false);
262
+ b.bp("/model-customization-jobs/{jobIdentifier}/stop");
263
+ b.p("jobIdentifier", () => input.jobIdentifier, "{jobIdentifier}", false);
383
264
  let body;
384
- return new protocol_http_1.HttpRequest({
385
- protocol,
386
- hostname,
387
- port,
388
- method: "POST",
389
- headers,
390
- path: resolvedPath,
391
- body,
392
- });
265
+ b.m("POST").h(headers).b(body);
266
+ return b.build();
393
267
  };
394
268
  exports.se_StopModelCustomizationJobCommand = se_StopModelCustomizationJobCommand;
395
269
  const se_TagResourceCommand = async (input, context) => {
396
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
270
+ const b = (0, core_1.requestBuilder)(input, context);
397
271
  const headers = {
398
272
  "content-type": "application/json",
399
273
  };
400
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tagResource";
274
+ b.bp("/tagResource");
401
275
  let body;
402
276
  body = JSON.stringify((0, smithy_client_1.take)(input, {
403
277
  resourceARN: [],
404
278
  tags: (_) => (0, smithy_client_1._json)(_),
405
279
  }));
406
- return new protocol_http_1.HttpRequest({
407
- protocol,
408
- hostname,
409
- port,
410
- method: "POST",
411
- headers,
412
- path: resolvedPath,
413
- body,
414
- });
280
+ b.m("POST").h(headers).b(body);
281
+ return b.build();
415
282
  };
416
283
  exports.se_TagResourceCommand = se_TagResourceCommand;
417
284
  const se_UntagResourceCommand = async (input, context) => {
418
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
285
+ const b = (0, core_1.requestBuilder)(input, context);
419
286
  const headers = {
420
287
  "content-type": "application/json",
421
288
  };
422
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/untagResource";
289
+ b.bp("/untagResource");
423
290
  let body;
424
291
  body = JSON.stringify((0, smithy_client_1.take)(input, {
425
292
  resourceARN: [],
426
293
  tagKeys: (_) => (0, smithy_client_1._json)(_),
427
294
  }));
428
- return new protocol_http_1.HttpRequest({
429
- protocol,
430
- hostname,
431
- port,
432
- method: "POST",
433
- headers,
434
- path: resolvedPath,
435
- body,
436
- });
295
+ b.m("POST").h(headers).b(body);
296
+ return b.build();
437
297
  };
438
298
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
439
299
  const se_UpdateProvisionedModelThroughputCommand = async (input, context) => {
440
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
300
+ const b = (0, core_1.requestBuilder)(input, context);
441
301
  const headers = {
442
302
  "content-type": "application/json",
443
303
  };
444
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
445
- "/provisioned-model-throughput/{provisionedModelId}";
446
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
304
+ b.bp("/provisioned-model-throughput/{provisionedModelId}");
305
+ b.p("provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
447
306
  let body;
448
307
  body = JSON.stringify((0, smithy_client_1.take)(input, {
449
308
  desiredModelId: [],
450
309
  desiredProvisionedModelName: [],
451
310
  }));
452
- return new protocol_http_1.HttpRequest({
453
- protocol,
454
- hostname,
455
- port,
456
- method: "PATCH",
457
- headers,
458
- path: resolvedPath,
459
- body,
460
- });
311
+ b.m("PATCH").h(headers).b(body);
312
+ return b.build();
461
313
  };
462
314
  exports.se_UpdateProvisionedModelThroughputCommand = se_UpdateProvisionedModelThroughputCommand;
463
315
  const de_CreateModelCustomizationJobCommand = async (output, context) => {
@@ -1596,6 +1448,21 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1596
1448
  value !== "" &&
1597
1449
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1598
1450
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1451
+ const _bCT = "byCustomizationType";
1452
+ const _bIT = "byInferenceType";
1453
+ const _bMAE = "baseModelArnEquals";
1454
+ const _bOM = "byOutputModality";
1455
+ const _bP = "byProvider";
1456
+ const _cTA = "creationTimeAfter";
1457
+ const _cTB = "creationTimeBefore";
1458
+ const _fMAE = "foundationModelArnEquals";
1459
+ const _mAE = "modelArnEquals";
1460
+ const _mR = "maxResults";
1461
+ const _nC = "nameContains";
1462
+ const _nT = "nextToken";
1463
+ const _sB = "sortBy";
1464
+ const _sE = "statusEquals";
1465
+ const _sO = "sortOrder";
1599
1466
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1600
1467
  if (encoded.length) {
1601
1468
  return JSON.parse(encoded);
@@ -1,14 +1,14 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { BedrockServiceException as __BaseException } from "../models/BedrockServiceException";
5
5
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, TooManyTagsException, ValidationException, } from "../models/models_0";
6
6
  export const se_CreateModelCustomizationJobCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = {
9
9
  "content-type": "application/json",
10
10
  };
11
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/model-customization-jobs";
11
+ b.bp("/model-customization-jobs");
12
12
  let body;
13
13
  body = JSON.stringify(take(input, {
14
14
  baseModelIdentifier: [],
@@ -26,22 +26,15 @@ export const se_CreateModelCustomizationJobCommand = async (input, context) => {
26
26
  validationDataConfig: (_) => _json(_),
27
27
  vpcConfig: (_) => _json(_),
28
28
  }));
29
- return new __HttpRequest({
30
- protocol,
31
- hostname,
32
- port,
33
- method: "POST",
34
- headers,
35
- path: resolvedPath,
36
- body,
37
- });
29
+ b.m("POST").h(headers).b(body);
30
+ return b.build();
38
31
  };
39
32
  export const se_CreateProvisionedModelThroughputCommand = async (input, context) => {
40
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
33
+ const b = rb(input, context);
41
34
  const headers = {
42
35
  "content-type": "application/json",
43
36
  };
44
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/provisioned-model-throughput";
37
+ b.bp("/provisioned-model-throughput");
45
38
  let body;
46
39
  body = JSON.stringify(take(input, {
47
40
  clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -51,391 +44,250 @@ export const se_CreateProvisionedModelThroughputCommand = async (input, context)
51
44
  provisionedModelName: [],
52
45
  tags: (_) => _json(_),
53
46
  }));
54
- return new __HttpRequest({
55
- protocol,
56
- hostname,
57
- port,
58
- method: "POST",
59
- headers,
60
- path: resolvedPath,
61
- body,
62
- });
47
+ b.m("POST").h(headers).b(body);
48
+ return b.build();
63
49
  };
64
50
  export const se_DeleteCustomModelCommand = async (input, context) => {
65
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
51
+ const b = rb(input, context);
66
52
  const headers = {};
67
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/custom-models/{modelIdentifier}";
68
- resolvedPath = __resolvedPath(resolvedPath, input, "modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
53
+ b.bp("/custom-models/{modelIdentifier}");
54
+ b.p("modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
69
55
  let body;
70
- return new __HttpRequest({
71
- protocol,
72
- hostname,
73
- port,
74
- method: "DELETE",
75
- headers,
76
- path: resolvedPath,
77
- body,
78
- });
56
+ b.m("DELETE").h(headers).b(body);
57
+ return b.build();
79
58
  };
80
59
  export const se_DeleteModelInvocationLoggingConfigurationCommand = async (input, context) => {
81
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
60
+ const b = rb(input, context);
82
61
  const headers = {
83
62
  "content-type": "application/json",
84
63
  };
85
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/logging/modelinvocations";
64
+ b.bp("/logging/modelinvocations");
86
65
  let body;
87
66
  body = "";
88
- return new __HttpRequest({
89
- protocol,
90
- hostname,
91
- port,
92
- method: "DELETE",
93
- headers,
94
- path: resolvedPath,
95
- body,
96
- });
67
+ b.m("DELETE").h(headers).b(body);
68
+ return b.build();
97
69
  };
98
70
  export const se_DeleteProvisionedModelThroughputCommand = async (input, context) => {
99
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
71
+ const b = rb(input, context);
100
72
  const headers = {};
101
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
102
- "/provisioned-model-throughput/{provisionedModelId}";
103
- resolvedPath = __resolvedPath(resolvedPath, input, "provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
73
+ b.bp("/provisioned-model-throughput/{provisionedModelId}");
74
+ b.p("provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
104
75
  let body;
105
- return new __HttpRequest({
106
- protocol,
107
- hostname,
108
- port,
109
- method: "DELETE",
110
- headers,
111
- path: resolvedPath,
112
- body,
113
- });
76
+ b.m("DELETE").h(headers).b(body);
77
+ return b.build();
114
78
  };
115
79
  export const se_GetCustomModelCommand = async (input, context) => {
116
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
80
+ const b = rb(input, context);
117
81
  const headers = {};
118
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/custom-models/{modelIdentifier}";
119
- resolvedPath = __resolvedPath(resolvedPath, input, "modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
82
+ b.bp("/custom-models/{modelIdentifier}");
83
+ b.p("modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
120
84
  let body;
121
- return new __HttpRequest({
122
- protocol,
123
- hostname,
124
- port,
125
- method: "GET",
126
- headers,
127
- path: resolvedPath,
128
- body,
129
- });
85
+ b.m("GET").h(headers).b(body);
86
+ return b.build();
130
87
  };
131
88
  export const se_GetFoundationModelCommand = async (input, context) => {
132
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
89
+ const b = rb(input, context);
133
90
  const headers = {};
134
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/foundation-models/{modelIdentifier}";
135
- resolvedPath = __resolvedPath(resolvedPath, input, "modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
91
+ b.bp("/foundation-models/{modelIdentifier}");
92
+ b.p("modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
136
93
  let body;
137
- return new __HttpRequest({
138
- protocol,
139
- hostname,
140
- port,
141
- method: "GET",
142
- headers,
143
- path: resolvedPath,
144
- body,
145
- });
94
+ b.m("GET").h(headers).b(body);
95
+ return b.build();
146
96
  };
147
97
  export const se_GetModelCustomizationJobCommand = async (input, context) => {
148
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
98
+ const b = rb(input, context);
149
99
  const headers = {};
150
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/model-customization-jobs/{jobIdentifier}";
151
- resolvedPath = __resolvedPath(resolvedPath, input, "jobIdentifier", () => input.jobIdentifier, "{jobIdentifier}", false);
100
+ b.bp("/model-customization-jobs/{jobIdentifier}");
101
+ b.p("jobIdentifier", () => input.jobIdentifier, "{jobIdentifier}", false);
152
102
  let body;
153
- return new __HttpRequest({
154
- protocol,
155
- hostname,
156
- port,
157
- method: "GET",
158
- headers,
159
- path: resolvedPath,
160
- body,
161
- });
103
+ b.m("GET").h(headers).b(body);
104
+ return b.build();
162
105
  };
163
106
  export const se_GetModelInvocationLoggingConfigurationCommand = async (input, context) => {
164
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
107
+ const b = rb(input, context);
165
108
  const headers = {
166
109
  "content-type": "application/json",
167
110
  };
168
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/logging/modelinvocations";
111
+ b.bp("/logging/modelinvocations");
169
112
  let body;
170
113
  body = "";
171
- return new __HttpRequest({
172
- protocol,
173
- hostname,
174
- port,
175
- method: "GET",
176
- headers,
177
- path: resolvedPath,
178
- body,
179
- });
114
+ b.m("GET").h(headers).b(body);
115
+ return b.build();
180
116
  };
181
117
  export const se_GetProvisionedModelThroughputCommand = async (input, context) => {
182
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
118
+ const b = rb(input, context);
183
119
  const headers = {};
184
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
185
- "/provisioned-model-throughput/{provisionedModelId}";
186
- resolvedPath = __resolvedPath(resolvedPath, input, "provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
120
+ b.bp("/provisioned-model-throughput/{provisionedModelId}");
121
+ b.p("provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
187
122
  let body;
188
- return new __HttpRequest({
189
- protocol,
190
- hostname,
191
- port,
192
- method: "GET",
193
- headers,
194
- path: resolvedPath,
195
- body,
196
- });
123
+ b.m("GET").h(headers).b(body);
124
+ return b.build();
197
125
  };
198
126
  export const se_ListCustomModelsCommand = async (input, context) => {
199
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
127
+ const b = rb(input, context);
200
128
  const headers = {};
201
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/custom-models";
129
+ b.bp("/custom-models");
202
130
  const query = map({
203
- creationTimeBefore: [
131
+ [_cTB]: [
204
132
  () => input.creationTimeBefore !== void 0,
205
- () => (input.creationTimeBefore.toISOString().split(".")[0] + "Z").toString(),
133
+ () => (input[_cTB].toISOString().split(".")[0] + "Z").toString(),
206
134
  ],
207
- creationTimeAfter: [
135
+ [_cTA]: [
208
136
  () => input.creationTimeAfter !== void 0,
209
- () => (input.creationTimeAfter.toISOString().split(".")[0] + "Z").toString(),
137
+ () => (input[_cTA].toISOString().split(".")[0] + "Z").toString(),
210
138
  ],
211
- nameContains: [, input.nameContains],
212
- baseModelArnEquals: [, input.baseModelArnEquals],
213
- foundationModelArnEquals: [, input.foundationModelArnEquals],
214
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
215
- nextToken: [, input.nextToken],
216
- sortBy: [, input.sortBy],
217
- sortOrder: [, input.sortOrder],
139
+ [_nC]: [, input[_nC]],
140
+ [_bMAE]: [, input[_bMAE]],
141
+ [_fMAE]: [, input[_fMAE]],
142
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
143
+ [_nT]: [, input[_nT]],
144
+ [_sB]: [, input[_sB]],
145
+ [_sO]: [, input[_sO]],
218
146
  });
219
147
  let body;
220
- return new __HttpRequest({
221
- protocol,
222
- hostname,
223
- port,
224
- method: "GET",
225
- headers,
226
- path: resolvedPath,
227
- query,
228
- body,
229
- });
148
+ b.m("GET").h(headers).q(query).b(body);
149
+ return b.build();
230
150
  };
231
151
  export const se_ListFoundationModelsCommand = async (input, context) => {
232
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
152
+ const b = rb(input, context);
233
153
  const headers = {};
234
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/foundation-models";
154
+ b.bp("/foundation-models");
235
155
  const query = map({
236
- byProvider: [, input.byProvider],
237
- byCustomizationType: [, input.byCustomizationType],
238
- byOutputModality: [, input.byOutputModality],
239
- byInferenceType: [, input.byInferenceType],
156
+ [_bP]: [, input[_bP]],
157
+ [_bCT]: [, input[_bCT]],
158
+ [_bOM]: [, input[_bOM]],
159
+ [_bIT]: [, input[_bIT]],
240
160
  });
241
161
  let body;
242
- return new __HttpRequest({
243
- protocol,
244
- hostname,
245
- port,
246
- method: "GET",
247
- headers,
248
- path: resolvedPath,
249
- query,
250
- body,
251
- });
162
+ b.m("GET").h(headers).q(query).b(body);
163
+ return b.build();
252
164
  };
253
165
  export const se_ListModelCustomizationJobsCommand = async (input, context) => {
254
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
166
+ const b = rb(input, context);
255
167
  const headers = {};
256
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/model-customization-jobs";
168
+ b.bp("/model-customization-jobs");
257
169
  const query = map({
258
- creationTimeAfter: [
170
+ [_cTA]: [
259
171
  () => input.creationTimeAfter !== void 0,
260
- () => (input.creationTimeAfter.toISOString().split(".")[0] + "Z").toString(),
172
+ () => (input[_cTA].toISOString().split(".")[0] + "Z").toString(),
261
173
  ],
262
- creationTimeBefore: [
174
+ [_cTB]: [
263
175
  () => input.creationTimeBefore !== void 0,
264
- () => (input.creationTimeBefore.toISOString().split(".")[0] + "Z").toString(),
176
+ () => (input[_cTB].toISOString().split(".")[0] + "Z").toString(),
265
177
  ],
266
- statusEquals: [, input.statusEquals],
267
- nameContains: [, input.nameContains],
268
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
269
- nextToken: [, input.nextToken],
270
- sortBy: [, input.sortBy],
271
- sortOrder: [, input.sortOrder],
178
+ [_sE]: [, input[_sE]],
179
+ [_nC]: [, input[_nC]],
180
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
181
+ [_nT]: [, input[_nT]],
182
+ [_sB]: [, input[_sB]],
183
+ [_sO]: [, input[_sO]],
272
184
  });
273
185
  let body;
274
- return new __HttpRequest({
275
- protocol,
276
- hostname,
277
- port,
278
- method: "GET",
279
- headers,
280
- path: resolvedPath,
281
- query,
282
- body,
283
- });
186
+ b.m("GET").h(headers).q(query).b(body);
187
+ return b.build();
284
188
  };
285
189
  export const se_ListProvisionedModelThroughputsCommand = async (input, context) => {
286
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
190
+ const b = rb(input, context);
287
191
  const headers = {};
288
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/provisioned-model-throughputs";
192
+ b.bp("/provisioned-model-throughputs");
289
193
  const query = map({
290
- creationTimeAfter: [
194
+ [_cTA]: [
291
195
  () => input.creationTimeAfter !== void 0,
292
- () => (input.creationTimeAfter.toISOString().split(".")[0] + "Z").toString(),
196
+ () => (input[_cTA].toISOString().split(".")[0] + "Z").toString(),
293
197
  ],
294
- creationTimeBefore: [
198
+ [_cTB]: [
295
199
  () => input.creationTimeBefore !== void 0,
296
- () => (input.creationTimeBefore.toISOString().split(".")[0] + "Z").toString(),
200
+ () => (input[_cTB].toISOString().split(".")[0] + "Z").toString(),
297
201
  ],
298
- statusEquals: [, input.statusEquals],
299
- modelArnEquals: [, input.modelArnEquals],
300
- nameContains: [, input.nameContains],
301
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
302
- nextToken: [, input.nextToken],
303
- sortBy: [, input.sortBy],
304
- sortOrder: [, input.sortOrder],
202
+ [_sE]: [, input[_sE]],
203
+ [_mAE]: [, input[_mAE]],
204
+ [_nC]: [, input[_nC]],
205
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
206
+ [_nT]: [, input[_nT]],
207
+ [_sB]: [, input[_sB]],
208
+ [_sO]: [, input[_sO]],
305
209
  });
306
210
  let body;
307
- return new __HttpRequest({
308
- protocol,
309
- hostname,
310
- port,
311
- method: "GET",
312
- headers,
313
- path: resolvedPath,
314
- query,
315
- body,
316
- });
211
+ b.m("GET").h(headers).q(query).b(body);
212
+ return b.build();
317
213
  };
318
214
  export const se_ListTagsForResourceCommand = async (input, context) => {
319
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
215
+ const b = rb(input, context);
320
216
  const headers = {
321
217
  "content-type": "application/json",
322
218
  };
323
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listTagsForResource";
219
+ b.bp("/listTagsForResource");
324
220
  let body;
325
221
  body = JSON.stringify(take(input, {
326
222
  resourceARN: [],
327
223
  }));
328
- return new __HttpRequest({
329
- protocol,
330
- hostname,
331
- port,
332
- method: "POST",
333
- headers,
334
- path: resolvedPath,
335
- body,
336
- });
224
+ b.m("POST").h(headers).b(body);
225
+ return b.build();
337
226
  };
338
227
  export const se_PutModelInvocationLoggingConfigurationCommand = async (input, context) => {
339
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
228
+ const b = rb(input, context);
340
229
  const headers = {
341
230
  "content-type": "application/json",
342
231
  };
343
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/logging/modelinvocations";
232
+ b.bp("/logging/modelinvocations");
344
233
  let body;
345
234
  body = JSON.stringify(take(input, {
346
235
  loggingConfig: (_) => _json(_),
347
236
  }));
348
- return new __HttpRequest({
349
- protocol,
350
- hostname,
351
- port,
352
- method: "PUT",
353
- headers,
354
- path: resolvedPath,
355
- body,
356
- });
237
+ b.m("PUT").h(headers).b(body);
238
+ return b.build();
357
239
  };
358
240
  export const se_StopModelCustomizationJobCommand = async (input, context) => {
359
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
241
+ const b = rb(input, context);
360
242
  const headers = {};
361
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
362
- "/model-customization-jobs/{jobIdentifier}/stop";
363
- resolvedPath = __resolvedPath(resolvedPath, input, "jobIdentifier", () => input.jobIdentifier, "{jobIdentifier}", false);
243
+ b.bp("/model-customization-jobs/{jobIdentifier}/stop");
244
+ b.p("jobIdentifier", () => input.jobIdentifier, "{jobIdentifier}", false);
364
245
  let body;
365
- return new __HttpRequest({
366
- protocol,
367
- hostname,
368
- port,
369
- method: "POST",
370
- headers,
371
- path: resolvedPath,
372
- body,
373
- });
246
+ b.m("POST").h(headers).b(body);
247
+ return b.build();
374
248
  };
375
249
  export const se_TagResourceCommand = async (input, context) => {
376
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
250
+ const b = rb(input, context);
377
251
  const headers = {
378
252
  "content-type": "application/json",
379
253
  };
380
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tagResource";
254
+ b.bp("/tagResource");
381
255
  let body;
382
256
  body = JSON.stringify(take(input, {
383
257
  resourceARN: [],
384
258
  tags: (_) => _json(_),
385
259
  }));
386
- return new __HttpRequest({
387
- protocol,
388
- hostname,
389
- port,
390
- method: "POST",
391
- headers,
392
- path: resolvedPath,
393
- body,
394
- });
260
+ b.m("POST").h(headers).b(body);
261
+ return b.build();
395
262
  };
396
263
  export const se_UntagResourceCommand = async (input, context) => {
397
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
264
+ const b = rb(input, context);
398
265
  const headers = {
399
266
  "content-type": "application/json",
400
267
  };
401
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/untagResource";
268
+ b.bp("/untagResource");
402
269
  let body;
403
270
  body = JSON.stringify(take(input, {
404
271
  resourceARN: [],
405
272
  tagKeys: (_) => _json(_),
406
273
  }));
407
- return new __HttpRequest({
408
- protocol,
409
- hostname,
410
- port,
411
- method: "POST",
412
- headers,
413
- path: resolvedPath,
414
- body,
415
- });
274
+ b.m("POST").h(headers).b(body);
275
+ return b.build();
416
276
  };
417
277
  export const se_UpdateProvisionedModelThroughputCommand = async (input, context) => {
418
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
278
+ const b = rb(input, context);
419
279
  const headers = {
420
280
  "content-type": "application/json",
421
281
  };
422
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
423
- "/provisioned-model-throughput/{provisionedModelId}";
424
- resolvedPath = __resolvedPath(resolvedPath, input, "provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
282
+ b.bp("/provisioned-model-throughput/{provisionedModelId}");
283
+ b.p("provisionedModelId", () => input.provisionedModelId, "{provisionedModelId}", false);
425
284
  let body;
426
285
  body = JSON.stringify(take(input, {
427
286
  desiredModelId: [],
428
287
  desiredProvisionedModelName: [],
429
288
  }));
430
- return new __HttpRequest({
431
- protocol,
432
- hostname,
433
- port,
434
- method: "PATCH",
435
- headers,
436
- path: resolvedPath,
437
- body,
438
- });
289
+ b.m("PATCH").h(headers).b(body);
290
+ return b.build();
439
291
  };
440
292
  export const de_CreateModelCustomizationJobCommand = async (output, context) => {
441
293
  if (output.statusCode !== 201 && output.statusCode >= 300) {
@@ -1553,6 +1405,21 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1553
1405
  value !== "" &&
1554
1406
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1555
1407
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1408
+ const _bCT = "byCustomizationType";
1409
+ const _bIT = "byInferenceType";
1410
+ const _bMAE = "baseModelArnEquals";
1411
+ const _bOM = "byOutputModality";
1412
+ const _bP = "byProvider";
1413
+ const _cTA = "creationTimeAfter";
1414
+ const _cTB = "creationTimeBefore";
1415
+ const _fMAE = "foundationModelArnEquals";
1416
+ const _mAE = "modelArnEquals";
1417
+ const _mR = "maxResults";
1418
+ const _nC = "nameContains";
1419
+ const _nT = "nextToken";
1420
+ const _sB = "sortBy";
1421
+ const _sE = "statusEquals";
1422
+ const _sO = "sortOrder";
1556
1423
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1557
1424
  if (encoded.length) {
1558
1425
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-bedrock",
3
3
  "description": "AWS SDK for JavaScript Bedrock 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",