@aws-sdk/client-bedrock 3.476.0 → 3.478.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/pagination/ListCustomModelsPaginator.js +2 -24
- package/dist-cjs/pagination/ListModelCustomizationJobsPaginator.js +2 -24
- package/dist-cjs/pagination/ListProvisionedModelThroughputsPaginator.js +2 -24
- package/dist-cjs/protocols/Aws_restJson1.js +140 -273
- package/dist-es/pagination/ListCustomModelsPaginator.js +2 -23
- package/dist-es/pagination/ListModelCustomizationJobsPaginator.js +2 -23
- package/dist-es/pagination/ListProvisionedModelThroughputsPaginator.js +2 -23
- package/dist-es/protocols/Aws_restJson1.js +141 -274
- package/dist-types/pagination/ListCustomModelsPaginator.d.ts +1 -1
- package/dist-types/pagination/ListModelCustomizationJobsPaginator.d.ts +1 -1
- package/dist-types/pagination/ListProvisionedModelThroughputsPaginator.d.ts +1 -1
- package/dist-types/ts3.4/pagination/ListCustomModelsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListModelCustomizationJobsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListProvisionedModelThroughputsPaginator.d.ts +3 -3
- package/package.json +7 -6
|
@@ -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
|
|
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
|
|
10
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
11
11
|
const headers = {
|
|
12
12
|
"content-type": "application/json",
|
|
13
13
|
};
|
|
14
|
-
|
|
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
|
-
|
|
33
|
-
|
|
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
|
|
37
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
45
38
|
const headers = {
|
|
46
39
|
"content-type": "application/json",
|
|
47
40
|
};
|
|
48
|
-
|
|
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
|
-
|
|
59
|
-
|
|
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
|
|
56
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
71
57
|
const headers = {};
|
|
72
|
-
|
|
73
|
-
|
|
58
|
+
b.bp("/custom-models/{modelIdentifier}");
|
|
59
|
+
b.p("modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
|
|
74
60
|
let body;
|
|
75
|
-
|
|
76
|
-
|
|
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
|
|
66
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
88
67
|
const headers = {
|
|
89
68
|
"content-type": "application/json",
|
|
90
69
|
};
|
|
91
|
-
|
|
70
|
+
b.bp("/logging/modelinvocations");
|
|
92
71
|
let body;
|
|
93
72
|
body = "";
|
|
94
|
-
|
|
95
|
-
|
|
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
|
|
78
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
107
79
|
const headers = {};
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
113
|
-
|
|
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
|
|
88
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
125
89
|
const headers = {};
|
|
126
|
-
|
|
127
|
-
|
|
90
|
+
b.bp("/custom-models/{modelIdentifier}");
|
|
91
|
+
b.p("modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
|
|
128
92
|
let body;
|
|
129
|
-
|
|
130
|
-
|
|
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
|
|
98
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
142
99
|
const headers = {};
|
|
143
|
-
|
|
144
|
-
|
|
100
|
+
b.bp("/foundation-models/{modelIdentifier}");
|
|
101
|
+
b.p("modelIdentifier", () => input.modelIdentifier, "{modelIdentifier}", false);
|
|
145
102
|
let body;
|
|
146
|
-
|
|
147
|
-
|
|
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
|
|
108
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
159
109
|
const headers = {};
|
|
160
|
-
|
|
161
|
-
|
|
110
|
+
b.bp("/model-customization-jobs/{jobIdentifier}");
|
|
111
|
+
b.p("jobIdentifier", () => input.jobIdentifier, "{jobIdentifier}", false);
|
|
162
112
|
let body;
|
|
163
|
-
|
|
164
|
-
|
|
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
|
|
118
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
176
119
|
const headers = {
|
|
177
120
|
"content-type": "application/json",
|
|
178
121
|
};
|
|
179
|
-
|
|
122
|
+
b.bp("/logging/modelinvocations");
|
|
180
123
|
let body;
|
|
181
124
|
body = "";
|
|
182
|
-
|
|
183
|
-
|
|
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
|
|
130
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
195
131
|
const headers = {};
|
|
196
|
-
|
|
197
|
-
|
|
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
|
-
|
|
201
|
-
|
|
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
|
|
140
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
213
141
|
const headers = {};
|
|
214
|
-
|
|
142
|
+
b.bp("/custom-models");
|
|
215
143
|
const query = (0, smithy_client_1.map)({
|
|
216
|
-
|
|
144
|
+
[_cTB]: [
|
|
217
145
|
() => input.creationTimeBefore !== void 0,
|
|
218
|
-
() => (input.
|
|
146
|
+
() => (input[_cTB].toISOString().split(".")[0] + "Z").toString(),
|
|
219
147
|
],
|
|
220
|
-
|
|
148
|
+
[_cTA]: [
|
|
221
149
|
() => input.creationTimeAfter !== void 0,
|
|
222
|
-
() => (input.
|
|
150
|
+
() => (input[_cTA].toISOString().split(".")[0] + "Z").toString(),
|
|
223
151
|
],
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
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
|
-
|
|
234
|
-
|
|
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
|
|
166
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
247
167
|
const headers = {};
|
|
248
|
-
|
|
168
|
+
b.bp("/foundation-models");
|
|
249
169
|
const query = (0, smithy_client_1.map)({
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
170
|
+
[_bP]: [, input[_bP]],
|
|
171
|
+
[_bCT]: [, input[_bCT]],
|
|
172
|
+
[_bOM]: [, input[_bOM]],
|
|
173
|
+
[_bIT]: [, input[_bIT]],
|
|
254
174
|
});
|
|
255
175
|
let body;
|
|
256
|
-
|
|
257
|
-
|
|
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
|
|
181
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
270
182
|
const headers = {};
|
|
271
|
-
|
|
183
|
+
b.bp("/model-customization-jobs");
|
|
272
184
|
const query = (0, smithy_client_1.map)({
|
|
273
|
-
|
|
185
|
+
[_cTA]: [
|
|
274
186
|
() => input.creationTimeAfter !== void 0,
|
|
275
|
-
() => (input.
|
|
187
|
+
() => (input[_cTA].toISOString().split(".")[0] + "Z").toString(),
|
|
276
188
|
],
|
|
277
|
-
|
|
189
|
+
[_cTB]: [
|
|
278
190
|
() => input.creationTimeBefore !== void 0,
|
|
279
|
-
() => (input.
|
|
191
|
+
() => (input[_cTB].toISOString().split(".")[0] + "Z").toString(),
|
|
280
192
|
],
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
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
|
-
|
|
290
|
-
|
|
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
|
|
206
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
303
207
|
const headers = {};
|
|
304
|
-
|
|
208
|
+
b.bp("/provisioned-model-throughputs");
|
|
305
209
|
const query = (0, smithy_client_1.map)({
|
|
306
|
-
|
|
210
|
+
[_cTA]: [
|
|
307
211
|
() => input.creationTimeAfter !== void 0,
|
|
308
|
-
() => (input.
|
|
212
|
+
() => (input[_cTA].toISOString().split(".")[0] + "Z").toString(),
|
|
309
213
|
],
|
|
310
|
-
|
|
214
|
+
[_cTB]: [
|
|
311
215
|
() => input.creationTimeBefore !== void 0,
|
|
312
|
-
() => (input.
|
|
216
|
+
() => (input[_cTB].toISOString().split(".")[0] + "Z").toString(),
|
|
313
217
|
],
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
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
|
-
|
|
324
|
-
|
|
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
|
|
232
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
337
233
|
const headers = {
|
|
338
234
|
"content-type": "application/json",
|
|
339
235
|
};
|
|
340
|
-
|
|
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
|
-
|
|
346
|
-
|
|
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
|
|
246
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
358
247
|
const headers = {
|
|
359
248
|
"content-type": "application/json",
|
|
360
249
|
};
|
|
361
|
-
|
|
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
|
-
|
|
367
|
-
|
|
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
|
|
260
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
379
261
|
const headers = {};
|
|
380
|
-
|
|
381
|
-
|
|
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
|
-
|
|
385
|
-
|
|
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
|
|
270
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
397
271
|
const headers = {
|
|
398
272
|
"content-type": "application/json",
|
|
399
273
|
};
|
|
400
|
-
|
|
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
|
-
|
|
407
|
-
|
|
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
|
|
285
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
419
286
|
const headers = {
|
|
420
287
|
"content-type": "application/json",
|
|
421
288
|
};
|
|
422
|
-
|
|
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
|
-
|
|
429
|
-
|
|
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
|
|
300
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
441
301
|
const headers = {
|
|
442
302
|
"content-type": "application/json",
|
|
443
303
|
};
|
|
444
|
-
|
|
445
|
-
|
|
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
|
-
|
|
453
|
-
|
|
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,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { BedrockClient } from "../BedrockClient";
|
|
2
3
|
import { ListCustomModelsCommand, } from "../commands/ListCustomModelsCommand";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new ListCustomModelsCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateListCustomModels(config, input, ...additionalArguments) {
|
|
7
|
-
let token = config.startingToken || undefined;
|
|
8
|
-
let hasNext = true;
|
|
9
|
-
let page;
|
|
10
|
-
while (hasNext) {
|
|
11
|
-
input.nextToken = token;
|
|
12
|
-
input["maxResults"] = config.pageSize;
|
|
13
|
-
if (config.client instanceof BedrockClient) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected Bedrock | BedrockClient");
|
|
18
|
-
}
|
|
19
|
-
yield page;
|
|
20
|
-
const prevToken = token;
|
|
21
|
-
token = page.nextToken;
|
|
22
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
4
|
+
export const paginateListCustomModels = createPaginator(BedrockClient, ListCustomModelsCommand, "nextToken", "nextToken", "maxResults");
|