@aws-sdk/client-bedrock 3.1046.0 → 3.1048.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/README.md +35 -0
- package/dist-cjs/endpoint/endpointResolver.js +2 -2
- package/dist-cjs/index.js +100 -20
- package/dist-cjs/models/errors.js +14 -14
- package/dist-cjs/runtimeConfig.browser.js +5 -5
- package/dist-cjs/runtimeConfig.js +2 -3
- package/dist-cjs/schemas/schemas_0.js +192 -46
- package/dist-es/Bedrock.js +12 -0
- package/dist-es/BedrockClient.js +1 -4
- package/dist-es/commands/BatchDeleteAdvancedPromptOptimizationJobCommand.js +16 -0
- package/dist-es/commands/CreateAdvancedPromptOptimizationJobCommand.js +16 -0
- package/dist-es/commands/GetAdvancedPromptOptimizationJobCommand.js +16 -0
- package/dist-es/commands/ListAdvancedPromptOptimizationJobsCommand.js +16 -0
- package/dist-es/commands/StopAdvancedPromptOptimizationJobCommand.js +16 -0
- package/dist-es/commands/index.js +5 -0
- package/dist-es/endpoint/endpointResolver.js +1 -1
- package/dist-es/models/enums.js +16 -7
- package/dist-es/models/errors.js +12 -12
- package/dist-es/pagination/ListAdvancedPromptOptimizationJobsPaginator.js +4 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/runtimeConfig.browser.js +1 -1
- package/dist-es/runtimeConfig.js +1 -2
- package/dist-es/runtimeExtensions.js +1 -1
- package/dist-es/schemas/schemas_0.js +180 -34
- package/dist-types/Bedrock.d.ts +43 -0
- package/dist-types/BedrockClient.d.ts +8 -4
- package/dist-types/commands/BatchDeleteAdvancedPromptOptimizationJobCommand.d.ts +102 -0
- package/dist-types/commands/CreateAdvancedPromptOptimizationJobCommand.d.ts +131 -0
- package/dist-types/commands/CreateGuardrailCommand.d.ts +1 -1
- package/dist-types/commands/CreateGuardrailVersionCommand.d.ts +1 -1
- package/dist-types/commands/DeleteGuardrailCommand.d.ts +1 -1
- package/dist-types/commands/GetAdvancedPromptOptimizationJobCommand.d.ts +120 -0
- package/dist-types/commands/GetGuardrailCommand.d.ts +1 -2
- package/dist-types/commands/ListAdvancedPromptOptimizationJobsCommand.d.ts +100 -0
- package/dist-types/commands/StopAdvancedPromptOptimizationJobCommand.d.ts +92 -0
- package/dist-types/commands/index.d.ts +5 -0
- package/dist-types/models/enums.d.ts +40 -23
- package/dist-types/models/errors.d.ts +12 -12
- package/dist-types/models/models_0.d.ts +3481 -3544
- package/dist-types/models/models_1.d.ts +417 -2
- package/dist-types/pagination/ListAdvancedPromptOptimizationJobsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/schemas/schemas_0.d.ts +22 -0
- package/dist-types/ts3.4/Bedrock.d.ts +117 -0
- package/dist-types/ts3.4/BedrockClient.d.ts +31 -3
- package/dist-types/ts3.4/commands/BatchDeleteAdvancedPromptOptimizationJobCommand.d.ts +53 -0
- package/dist-types/ts3.4/commands/CreateAdvancedPromptOptimizationJobCommand.d.ts +53 -0
- package/dist-types/ts3.4/commands/CreateGuardrailCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/CreateGuardrailVersionCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/DeleteGuardrailCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/GetAdvancedPromptOptimizationJobCommand.d.ts +53 -0
- package/dist-types/ts3.4/commands/GetGuardrailCommand.d.ts +1 -2
- package/dist-types/ts3.4/commands/ListAdvancedPromptOptimizationJobsCommand.d.ts +53 -0
- package/dist-types/ts3.4/commands/StopAdvancedPromptOptimizationJobCommand.d.ts +53 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -0
- package/dist-types/ts3.4/models/enums.d.ts +20 -9
- package/dist-types/ts3.4/models/errors.d.ts +7 -7
- package/dist-types/ts3.4/models/models_0.d.ts +90 -107
- package/dist-types/ts3.4/models/models_1.d.ts +114 -7
- package/dist-types/ts3.4/pagination/ListAdvancedPromptOptimizationJobsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +22 -0
- package/package.json +7 -15
package/README.md
CHANGED
|
@@ -179,6 +179,13 @@ see LICENSE for more information.
|
|
|
179
179
|
|
|
180
180
|
## Client Commands (Operations List)
|
|
181
181
|
|
|
182
|
+
<details>
|
|
183
|
+
<summary>
|
|
184
|
+
BatchDeleteAdvancedPromptOptimizationJob
|
|
185
|
+
</summary>
|
|
186
|
+
|
|
187
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/BatchDeleteAdvancedPromptOptimizationJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/BatchDeleteAdvancedPromptOptimizationJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/BatchDeleteAdvancedPromptOptimizationJobCommandOutput/)
|
|
188
|
+
</details>
|
|
182
189
|
<details>
|
|
183
190
|
<summary>
|
|
184
191
|
BatchDeleteEvaluationJob
|
|
@@ -195,6 +202,13 @@ CancelAutomatedReasoningPolicyBuildWorkflow
|
|
|
195
202
|
</details>
|
|
196
203
|
<details>
|
|
197
204
|
<summary>
|
|
205
|
+
CreateAdvancedPromptOptimizationJob
|
|
206
|
+
</summary>
|
|
207
|
+
|
|
208
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/CreateAdvancedPromptOptimizationJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/CreateAdvancedPromptOptimizationJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/CreateAdvancedPromptOptimizationJobCommandOutput/)
|
|
209
|
+
</details>
|
|
210
|
+
<details>
|
|
211
|
+
<summary>
|
|
198
212
|
CreateAutomatedReasoningPolicy
|
|
199
213
|
</summary>
|
|
200
214
|
|
|
@@ -433,6 +447,13 @@ ExportAutomatedReasoningPolicyVersion
|
|
|
433
447
|
</details>
|
|
434
448
|
<details>
|
|
435
449
|
<summary>
|
|
450
|
+
GetAdvancedPromptOptimizationJob
|
|
451
|
+
</summary>
|
|
452
|
+
|
|
453
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/GetAdvancedPromptOptimizationJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/GetAdvancedPromptOptimizationJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/GetAdvancedPromptOptimizationJobCommandOutput/)
|
|
454
|
+
</details>
|
|
455
|
+
<details>
|
|
456
|
+
<summary>
|
|
436
457
|
GetAutomatedReasoningPolicy
|
|
437
458
|
</summary>
|
|
438
459
|
|
|
@@ -608,6 +629,13 @@ GetUseCaseForModelAccess
|
|
|
608
629
|
</details>
|
|
609
630
|
<details>
|
|
610
631
|
<summary>
|
|
632
|
+
ListAdvancedPromptOptimizationJobs
|
|
633
|
+
</summary>
|
|
634
|
+
|
|
635
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/ListAdvancedPromptOptimizationJobsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/ListAdvancedPromptOptimizationJobsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/ListAdvancedPromptOptimizationJobsCommandOutput/)
|
|
636
|
+
</details>
|
|
637
|
+
<details>
|
|
638
|
+
<summary>
|
|
611
639
|
ListAutomatedReasoningPolicies
|
|
612
640
|
</summary>
|
|
613
641
|
|
|
@@ -804,6 +832,13 @@ StartAutomatedReasoningPolicyTestWorkflow
|
|
|
804
832
|
</details>
|
|
805
833
|
<details>
|
|
806
834
|
<summary>
|
|
835
|
+
StopAdvancedPromptOptimizationJob
|
|
836
|
+
</summary>
|
|
837
|
+
|
|
838
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/bedrock/command/StopAdvancedPromptOptimizationJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/StopAdvancedPromptOptimizationJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-bedrock/Interface/StopAdvancedPromptOptimizationJobCommandOutput/)
|
|
839
|
+
</details>
|
|
840
|
+
<details>
|
|
841
|
+
<summary>
|
|
807
842
|
StopEvaluationJob
|
|
808
843
|
</summary>
|
|
809
844
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultEndpointResolver = void 0;
|
|
4
|
-
const
|
|
4
|
+
const client_1 = require("@aws-sdk/core/client");
|
|
5
5
|
const endpoints_1 = require("@smithy/core/endpoints");
|
|
6
6
|
const bdd_1 = require("./bdd");
|
|
7
7
|
const cache = new endpoints_1.EndpointCache({
|
|
@@ -15,4 +15,4 @@ const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
|
15
15
|
}));
|
|
16
16
|
};
|
|
17
17
|
exports.defaultEndpointResolver = defaultEndpointResolver;
|
|
18
|
-
endpoints_1.customEndpointFunctions.aws =
|
|
18
|
+
endpoints_1.customEndpointFunctions.aws = client_1.awsEndpointFunctions;
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var middlewareLogger = require('@aws-sdk/middleware-logger');
|
|
5
|
-
var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
|
|
6
|
-
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
|
3
|
+
var client$1 = require('@aws-sdk/core/client');
|
|
7
4
|
var core = require('@smithy/core');
|
|
8
5
|
var client = require('@smithy/core/client');
|
|
9
6
|
var config = require('@smithy/core/config');
|
|
@@ -13,7 +10,6 @@ var retry = require('@smithy/core/retry');
|
|
|
13
10
|
var schema = require('@smithy/core/schema');
|
|
14
11
|
var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
15
12
|
var runtimeConfig = require('./runtimeConfig');
|
|
16
|
-
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
17
13
|
var schemas_0 = require('./schemas/schemas_0');
|
|
18
14
|
var errors = require('./models/errors');
|
|
19
15
|
var BedrockServiceException = require('./models/BedrockServiceException');
|
|
@@ -80,9 +76,9 @@ const resolveHttpAuthRuntimeConfig = (config) => {
|
|
|
80
76
|
};
|
|
81
77
|
|
|
82
78
|
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
83
|
-
const extensionConfiguration = Object.assign(
|
|
79
|
+
const extensionConfiguration = Object.assign(client$1.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
84
80
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
85
|
-
return Object.assign(runtimeConfig,
|
|
81
|
+
return Object.assign(runtimeConfig, client$1.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
86
82
|
};
|
|
87
83
|
|
|
88
84
|
class BedrockClient extends client.Client {
|
|
@@ -92,21 +88,21 @@ class BedrockClient extends client.Client {
|
|
|
92
88
|
super(_config_0);
|
|
93
89
|
this.initConfig = _config_0;
|
|
94
90
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
95
|
-
const _config_2 =
|
|
91
|
+
const _config_2 = client$1.resolveUserAgentConfig(_config_1);
|
|
96
92
|
const _config_3 = retry.resolveRetryConfig(_config_2);
|
|
97
93
|
const _config_4 = config.resolveRegionConfig(_config_3);
|
|
98
|
-
const _config_5 =
|
|
94
|
+
const _config_5 = client$1.resolveHostHeaderConfig(_config_4);
|
|
99
95
|
const _config_6 = endpoints.resolveEndpointConfig(_config_5);
|
|
100
96
|
const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
|
|
101
97
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
102
98
|
this.config = _config_8;
|
|
103
99
|
this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
|
|
104
|
-
this.middlewareStack.use(
|
|
100
|
+
this.middlewareStack.use(client$1.getUserAgentPlugin(this.config));
|
|
105
101
|
this.middlewareStack.use(retry.getRetryPlugin(this.config));
|
|
106
102
|
this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));
|
|
107
|
-
this.middlewareStack.use(
|
|
108
|
-
this.middlewareStack.use(
|
|
109
|
-
this.middlewareStack.use(
|
|
103
|
+
this.middlewareStack.use(client$1.getHostHeaderPlugin(this.config));
|
|
104
|
+
this.middlewareStack.use(client$1.getLoggerPlugin(this.config));
|
|
105
|
+
this.middlewareStack.use(client$1.getRecursionDetectionPlugin(this.config));
|
|
110
106
|
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
111
107
|
httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultBedrockHttpAuthSchemeParametersProvider,
|
|
112
108
|
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
|
|
@@ -121,6 +117,18 @@ class BedrockClient extends client.Client {
|
|
|
121
117
|
}
|
|
122
118
|
}
|
|
123
119
|
|
|
120
|
+
class BatchDeleteAdvancedPromptOptimizationJobCommand extends client.Command
|
|
121
|
+
.classBuilder()
|
|
122
|
+
.ep(commonParams)
|
|
123
|
+
.m(function (Command, cs, config, o) {
|
|
124
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
125
|
+
})
|
|
126
|
+
.s("AmazonBedrockControlPlaneService", "BatchDeleteAdvancedPromptOptimizationJob", {})
|
|
127
|
+
.n("BedrockClient", "BatchDeleteAdvancedPromptOptimizationJobCommand")
|
|
128
|
+
.sc(schemas_0.BatchDeleteAdvancedPromptOptimizationJob$)
|
|
129
|
+
.build() {
|
|
130
|
+
}
|
|
131
|
+
|
|
124
132
|
class BatchDeleteEvaluationJobCommand extends client.Command
|
|
125
133
|
.classBuilder()
|
|
126
134
|
.ep(commonParams)
|
|
@@ -145,6 +153,18 @@ class CancelAutomatedReasoningPolicyBuildWorkflowCommand extends client.Command
|
|
|
145
153
|
.build() {
|
|
146
154
|
}
|
|
147
155
|
|
|
156
|
+
class CreateAdvancedPromptOptimizationJobCommand extends client.Command
|
|
157
|
+
.classBuilder()
|
|
158
|
+
.ep(commonParams)
|
|
159
|
+
.m(function (Command, cs, config, o) {
|
|
160
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
161
|
+
})
|
|
162
|
+
.s("AmazonBedrockControlPlaneService", "CreateAdvancedPromptOptimizationJob", {})
|
|
163
|
+
.n("BedrockClient", "CreateAdvancedPromptOptimizationJobCommand")
|
|
164
|
+
.sc(schemas_0.CreateAdvancedPromptOptimizationJob$)
|
|
165
|
+
.build() {
|
|
166
|
+
}
|
|
167
|
+
|
|
148
168
|
class CreateAutomatedReasoningPolicyCommand extends client.Command
|
|
149
169
|
.classBuilder()
|
|
150
170
|
.ep(commonParams)
|
|
@@ -553,6 +573,18 @@ class ExportAutomatedReasoningPolicyVersionCommand extends client.Command
|
|
|
553
573
|
.build() {
|
|
554
574
|
}
|
|
555
575
|
|
|
576
|
+
class GetAdvancedPromptOptimizationJobCommand extends client.Command
|
|
577
|
+
.classBuilder()
|
|
578
|
+
.ep(commonParams)
|
|
579
|
+
.m(function (Command, cs, config, o) {
|
|
580
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
581
|
+
})
|
|
582
|
+
.s("AmazonBedrockControlPlaneService", "GetAdvancedPromptOptimizationJob", {})
|
|
583
|
+
.n("BedrockClient", "GetAdvancedPromptOptimizationJobCommand")
|
|
584
|
+
.sc(schemas_0.GetAdvancedPromptOptimizationJob$)
|
|
585
|
+
.build() {
|
|
586
|
+
}
|
|
587
|
+
|
|
556
588
|
class GetAutomatedReasoningPolicyAnnotationsCommand extends client.Command
|
|
557
589
|
.classBuilder()
|
|
558
590
|
.ep(commonParams)
|
|
@@ -853,6 +885,18 @@ class GetUseCaseForModelAccessCommand extends client.Command
|
|
|
853
885
|
.build() {
|
|
854
886
|
}
|
|
855
887
|
|
|
888
|
+
class ListAdvancedPromptOptimizationJobsCommand extends client.Command
|
|
889
|
+
.classBuilder()
|
|
890
|
+
.ep(commonParams)
|
|
891
|
+
.m(function (Command, cs, config, o) {
|
|
892
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
893
|
+
})
|
|
894
|
+
.s("AmazonBedrockControlPlaneService", "ListAdvancedPromptOptimizationJobs", {})
|
|
895
|
+
.n("BedrockClient", "ListAdvancedPromptOptimizationJobsCommand")
|
|
896
|
+
.sc(schemas_0.ListAdvancedPromptOptimizationJobs$)
|
|
897
|
+
.build() {
|
|
898
|
+
}
|
|
899
|
+
|
|
856
900
|
class ListAutomatedReasoningPoliciesCommand extends client.Command
|
|
857
901
|
.classBuilder()
|
|
858
902
|
.ep(commonParams)
|
|
@@ -1189,6 +1233,18 @@ class StartAutomatedReasoningPolicyTestWorkflowCommand extends client.Command
|
|
|
1189
1233
|
.build() {
|
|
1190
1234
|
}
|
|
1191
1235
|
|
|
1236
|
+
class StopAdvancedPromptOptimizationJobCommand extends client.Command
|
|
1237
|
+
.classBuilder()
|
|
1238
|
+
.ep(commonParams)
|
|
1239
|
+
.m(function (Command, cs, config, o) {
|
|
1240
|
+
return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
1241
|
+
})
|
|
1242
|
+
.s("AmazonBedrockControlPlaneService", "StopAdvancedPromptOptimizationJob", {})
|
|
1243
|
+
.n("BedrockClient", "StopAdvancedPromptOptimizationJobCommand")
|
|
1244
|
+
.sc(schemas_0.StopAdvancedPromptOptimizationJob$)
|
|
1245
|
+
.build() {
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1192
1248
|
class StopEvaluationJobCommand extends client.Command
|
|
1193
1249
|
.classBuilder()
|
|
1194
1250
|
.ep(commonParams)
|
|
@@ -1333,6 +1389,8 @@ class UpdateProvisionedModelThroughputCommand extends client.Command
|
|
|
1333
1389
|
.build() {
|
|
1334
1390
|
}
|
|
1335
1391
|
|
|
1392
|
+
const paginateListAdvancedPromptOptimizationJobs = core.createPaginator(BedrockClient, ListAdvancedPromptOptimizationJobsCommand, "nextToken", "nextToken", "maxResults");
|
|
1393
|
+
|
|
1336
1394
|
const paginateListAutomatedReasoningPolicies = core.createPaginator(BedrockClient, ListAutomatedReasoningPoliciesCommand, "nextToken", "nextToken", "maxResults");
|
|
1337
1395
|
|
|
1338
1396
|
const paginateListAutomatedReasoningPolicyBuildWorkflows = core.createPaginator(BedrockClient, ListAutomatedReasoningPolicyBuildWorkflowsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -1370,8 +1428,10 @@ const paginateListPromptRouters = core.createPaginator(BedrockClient, ListPrompt
|
|
|
1370
1428
|
const paginateListProvisionedModelThroughputs = core.createPaginator(BedrockClient, ListProvisionedModelThroughputsCommand, "nextToken", "nextToken", "maxResults");
|
|
1371
1429
|
|
|
1372
1430
|
const commands = {
|
|
1431
|
+
BatchDeleteAdvancedPromptOptimizationJobCommand,
|
|
1373
1432
|
BatchDeleteEvaluationJobCommand,
|
|
1374
1433
|
CancelAutomatedReasoningPolicyBuildWorkflowCommand,
|
|
1434
|
+
CreateAdvancedPromptOptimizationJobCommand,
|
|
1375
1435
|
CreateAutomatedReasoningPolicyCommand,
|
|
1376
1436
|
CreateAutomatedReasoningPolicyTestCaseCommand,
|
|
1377
1437
|
CreateAutomatedReasoningPolicyVersionCommand,
|
|
@@ -1406,6 +1466,7 @@ const commands = {
|
|
|
1406
1466
|
DeleteResourcePolicyCommand,
|
|
1407
1467
|
DeregisterMarketplaceModelEndpointCommand,
|
|
1408
1468
|
ExportAutomatedReasoningPolicyVersionCommand,
|
|
1469
|
+
GetAdvancedPromptOptimizationJobCommand,
|
|
1409
1470
|
GetAutomatedReasoningPolicyCommand,
|
|
1410
1471
|
GetAutomatedReasoningPolicyAnnotationsCommand,
|
|
1411
1472
|
GetAutomatedReasoningPolicyBuildWorkflowCommand,
|
|
@@ -1431,6 +1492,7 @@ const commands = {
|
|
|
1431
1492
|
GetProvisionedModelThroughputCommand,
|
|
1432
1493
|
GetResourcePolicyCommand,
|
|
1433
1494
|
GetUseCaseForModelAccessCommand,
|
|
1495
|
+
ListAdvancedPromptOptimizationJobsCommand,
|
|
1434
1496
|
ListAutomatedReasoningPoliciesCommand,
|
|
1435
1497
|
ListAutomatedReasoningPolicyBuildWorkflowsCommand,
|
|
1436
1498
|
ListAutomatedReasoningPolicyTestCasesCommand,
|
|
@@ -1459,6 +1521,7 @@ const commands = {
|
|
|
1459
1521
|
RegisterMarketplaceModelEndpointCommand,
|
|
1460
1522
|
StartAutomatedReasoningPolicyBuildWorkflowCommand,
|
|
1461
1523
|
StartAutomatedReasoningPolicyTestWorkflowCommand,
|
|
1524
|
+
StopAdvancedPromptOptimizationJobCommand,
|
|
1462
1525
|
StopEvaluationJobCommand,
|
|
1463
1526
|
StopModelCustomizationJobCommand,
|
|
1464
1527
|
StopModelInvocationJobCommand,
|
|
@@ -1473,6 +1536,7 @@ const commands = {
|
|
|
1473
1536
|
UpdateProvisionedModelThroughputCommand,
|
|
1474
1537
|
};
|
|
1475
1538
|
const paginators = {
|
|
1539
|
+
paginateListAdvancedPromptOptimizationJobs,
|
|
1476
1540
|
paginateListAutomatedReasoningPolicies,
|
|
1477
1541
|
paginateListAutomatedReasoningPolicyBuildWorkflows,
|
|
1478
1542
|
paginateListAutomatedReasoningPolicyTestCases,
|
|
@@ -1507,6 +1571,22 @@ const InputTags = {
|
|
|
1507
1571
|
const ConfigurationOwner = {
|
|
1508
1572
|
ACCOUNT: "ACCOUNT",
|
|
1509
1573
|
};
|
|
1574
|
+
const AdvancedPromptOptimizationJobStatus = {
|
|
1575
|
+
COMPLETED: "Completed",
|
|
1576
|
+
DELETING: "Deleting",
|
|
1577
|
+
FAILED: "Failed",
|
|
1578
|
+
IN_PROGRESS: "InProgress",
|
|
1579
|
+
PARTIALLY_COMPLETED: "PartiallyCompleted",
|
|
1580
|
+
STOPPED: "Stopped",
|
|
1581
|
+
STOPPING: "Stopping",
|
|
1582
|
+
};
|
|
1583
|
+
const SortJobsBy = {
|
|
1584
|
+
CREATION_TIME: "CreationTime",
|
|
1585
|
+
};
|
|
1586
|
+
const SortOrder = {
|
|
1587
|
+
ASCENDING: "Ascending",
|
|
1588
|
+
DESCENDING: "Descending",
|
|
1589
|
+
};
|
|
1510
1590
|
const AgreementStatus = {
|
|
1511
1591
|
AVAILABLE: "AVAILABLE",
|
|
1512
1592
|
ERROR: "ERROR",
|
|
@@ -1594,10 +1674,6 @@ const CustomModelDeploymentUpdateStatus = {
|
|
|
1594
1674
|
const SortModelsBy = {
|
|
1595
1675
|
CREATION_TIME: "CreationTime",
|
|
1596
1676
|
};
|
|
1597
|
-
const SortOrder = {
|
|
1598
|
-
ASCENDING: "Ascending",
|
|
1599
|
-
DESCENDING: "Descending",
|
|
1600
|
-
};
|
|
1601
1677
|
const ReasoningEffort = {
|
|
1602
1678
|
HIGH: "high",
|
|
1603
1679
|
LOW: "low",
|
|
@@ -1670,9 +1746,6 @@ const EvaluationJobType = {
|
|
|
1670
1746
|
AUTOMATED: "Automated",
|
|
1671
1747
|
HUMAN: "Human",
|
|
1672
1748
|
};
|
|
1673
|
-
const SortJobsBy = {
|
|
1674
|
-
CREATION_TIME: "CreationTime",
|
|
1675
|
-
};
|
|
1676
1749
|
const GuardrailContentFilterAction = {
|
|
1677
1750
|
BLOCK: "BLOCK",
|
|
1678
1751
|
NONE: "NONE",
|
|
@@ -1887,6 +1960,7 @@ const FineTuningJobStatus = {
|
|
|
1887
1960
|
exports.$Command = client.Command;
|
|
1888
1961
|
exports.__Client = client.Client;
|
|
1889
1962
|
exports.BedrockServiceException = BedrockServiceException.BedrockServiceException;
|
|
1963
|
+
exports.AdvancedPromptOptimizationJobStatus = AdvancedPromptOptimizationJobStatus;
|
|
1890
1964
|
exports.AgreementStatus = AgreementStatus;
|
|
1891
1965
|
exports.ApplicationType = ApplicationType;
|
|
1892
1966
|
exports.AttributeType = AttributeType;
|
|
@@ -1901,12 +1975,14 @@ exports.AutomatedReasoningPolicyBuildWorkflowStatus = AutomatedReasoningPolicyBu
|
|
|
1901
1975
|
exports.AutomatedReasoningPolicyBuildWorkflowType = AutomatedReasoningPolicyBuildWorkflowType;
|
|
1902
1976
|
exports.AutomatedReasoningPolicyTestRunResult = AutomatedReasoningPolicyTestRunResult;
|
|
1903
1977
|
exports.AutomatedReasoningPolicyTestRunStatus = AutomatedReasoningPolicyTestRunStatus;
|
|
1978
|
+
exports.BatchDeleteAdvancedPromptOptimizationJobCommand = BatchDeleteAdvancedPromptOptimizationJobCommand;
|
|
1904
1979
|
exports.BatchDeleteEvaluationJobCommand = BatchDeleteEvaluationJobCommand;
|
|
1905
1980
|
exports.Bedrock = Bedrock;
|
|
1906
1981
|
exports.BedrockClient = BedrockClient;
|
|
1907
1982
|
exports.CancelAutomatedReasoningPolicyBuildWorkflowCommand = CancelAutomatedReasoningPolicyBuildWorkflowCommand;
|
|
1908
1983
|
exports.CommitmentDuration = CommitmentDuration;
|
|
1909
1984
|
exports.ConfigurationOwner = ConfigurationOwner;
|
|
1985
|
+
exports.CreateAdvancedPromptOptimizationJobCommand = CreateAdvancedPromptOptimizationJobCommand;
|
|
1910
1986
|
exports.CreateAutomatedReasoningPolicyCommand = CreateAutomatedReasoningPolicyCommand;
|
|
1911
1987
|
exports.CreateAutomatedReasoningPolicyTestCaseCommand = CreateAutomatedReasoningPolicyTestCaseCommand;
|
|
1912
1988
|
exports.CreateAutomatedReasoningPolicyVersionCommand = CreateAutomatedReasoningPolicyVersionCommand;
|
|
@@ -1951,6 +2027,7 @@ exports.ExportAutomatedReasoningPolicyVersionCommand = ExportAutomatedReasoningP
|
|
|
1951
2027
|
exports.ExternalSourceType = ExternalSourceType;
|
|
1952
2028
|
exports.FineTuningJobStatus = FineTuningJobStatus;
|
|
1953
2029
|
exports.FoundationModelLifecycleStatus = FoundationModelLifecycleStatus;
|
|
2030
|
+
exports.GetAdvancedPromptOptimizationJobCommand = GetAdvancedPromptOptimizationJobCommand;
|
|
1954
2031
|
exports.GetAutomatedReasoningPolicyAnnotationsCommand = GetAutomatedReasoningPolicyAnnotationsCommand;
|
|
1955
2032
|
exports.GetAutomatedReasoningPolicyBuildWorkflowCommand = GetAutomatedReasoningPolicyBuildWorkflowCommand;
|
|
1956
2033
|
exports.GetAutomatedReasoningPolicyBuildWorkflowResultAssetsCommand = GetAutomatedReasoningPolicyBuildWorkflowResultAssetsCommand;
|
|
@@ -1996,6 +2073,7 @@ exports.InferenceProfileType = InferenceProfileType;
|
|
|
1996
2073
|
exports.InferenceType = InferenceType;
|
|
1997
2074
|
exports.InputTags = InputTags;
|
|
1998
2075
|
exports.JobStatusDetails = JobStatusDetails;
|
|
2076
|
+
exports.ListAdvancedPromptOptimizationJobsCommand = ListAdvancedPromptOptimizationJobsCommand;
|
|
1999
2077
|
exports.ListAutomatedReasoningPoliciesCommand = ListAutomatedReasoningPoliciesCommand;
|
|
2000
2078
|
exports.ListAutomatedReasoningPolicyBuildWorkflowsCommand = ListAutomatedReasoningPolicyBuildWorkflowsCommand;
|
|
2001
2079
|
exports.ListAutomatedReasoningPolicyTestCasesCommand = ListAutomatedReasoningPolicyTestCasesCommand;
|
|
@@ -2050,6 +2128,7 @@ exports.SortOrder = SortOrder;
|
|
|
2050
2128
|
exports.StartAutomatedReasoningPolicyBuildWorkflowCommand = StartAutomatedReasoningPolicyBuildWorkflowCommand;
|
|
2051
2129
|
exports.StartAutomatedReasoningPolicyTestWorkflowCommand = StartAutomatedReasoningPolicyTestWorkflowCommand;
|
|
2052
2130
|
exports.Status = Status;
|
|
2131
|
+
exports.StopAdvancedPromptOptimizationJobCommand = StopAdvancedPromptOptimizationJobCommand;
|
|
2053
2132
|
exports.StopEvaluationJobCommand = StopEvaluationJobCommand;
|
|
2054
2133
|
exports.StopModelCustomizationJobCommand = StopModelCustomizationJobCommand;
|
|
2055
2134
|
exports.StopModelInvocationJobCommand = StopModelInvocationJobCommand;
|
|
@@ -2063,6 +2142,7 @@ exports.UpdateGuardrailCommand = UpdateGuardrailCommand;
|
|
|
2063
2142
|
exports.UpdateMarketplaceModelEndpointCommand = UpdateMarketplaceModelEndpointCommand;
|
|
2064
2143
|
exports.UpdateProvisionedModelThroughputCommand = UpdateProvisionedModelThroughputCommand;
|
|
2065
2144
|
exports.VectorSearchRerankingConfigurationType = VectorSearchRerankingConfigurationType;
|
|
2145
|
+
exports.paginateListAdvancedPromptOptimizationJobs = paginateListAdvancedPromptOptimizationJobs;
|
|
2066
2146
|
exports.paginateListAutomatedReasoningPolicies = paginateListAutomatedReasoningPolicies;
|
|
2067
2147
|
exports.paginateListAutomatedReasoningPolicyBuildWorkflows = paginateListAutomatedReasoningPolicyBuildWorkflows;
|
|
2068
2148
|
exports.paginateListAutomatedReasoningPolicyTestCases = paginateListAutomatedReasoningPolicyTestCases;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServiceUnavailableException = exports.ResourceInUseException = exports.TooManyTagsException = exports.ServiceQuotaExceededException = exports.
|
|
3
|
+
exports.ServiceUnavailableException = exports.ResourceInUseException = exports.TooManyTagsException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.ConflictException = exports.ValidationException = exports.ThrottlingException = exports.InternalServerException = exports.AccessDeniedException = void 0;
|
|
4
4
|
const BedrockServiceException_1 = require("./BedrockServiceException");
|
|
5
5
|
class AccessDeniedException extends BedrockServiceException_1.BedrockServiceException {
|
|
6
6
|
name = "AccessDeniedException";
|
|
@@ -28,19 +28,6 @@ class InternalServerException extends BedrockServiceException_1.BedrockServiceEx
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
exports.InternalServerException = InternalServerException;
|
|
31
|
-
class ResourceNotFoundException extends BedrockServiceException_1.BedrockServiceException {
|
|
32
|
-
name = "ResourceNotFoundException";
|
|
33
|
-
$fault = "client";
|
|
34
|
-
constructor(opts) {
|
|
35
|
-
super({
|
|
36
|
-
name: "ResourceNotFoundException",
|
|
37
|
-
$fault: "client",
|
|
38
|
-
...opts,
|
|
39
|
-
});
|
|
40
|
-
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
44
31
|
class ThrottlingException extends BedrockServiceException_1.BedrockServiceException {
|
|
45
32
|
name = "ThrottlingException";
|
|
46
33
|
$fault = "client";
|
|
@@ -80,6 +67,19 @@ class ConflictException extends BedrockServiceException_1.BedrockServiceExceptio
|
|
|
80
67
|
}
|
|
81
68
|
}
|
|
82
69
|
exports.ConflictException = ConflictException;
|
|
70
|
+
class ResourceNotFoundException extends BedrockServiceException_1.BedrockServiceException {
|
|
71
|
+
name = "ResourceNotFoundException";
|
|
72
|
+
$fault = "client";
|
|
73
|
+
constructor(opts) {
|
|
74
|
+
super({
|
|
75
|
+
name: "ResourceNotFoundException",
|
|
76
|
+
$fault: "client",
|
|
77
|
+
...opts,
|
|
78
|
+
});
|
|
79
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.ResourceNotFoundException = ResourceNotFoundException;
|
|
83
83
|
class ServiceQuotaExceededException extends BedrockServiceException_1.BedrockServiceException {
|
|
84
84
|
name = "ServiceQuotaExceededException";
|
|
85
85
|
$fault = "client";
|
|
@@ -4,8 +4,8 @@ exports.getRuntimeConfig = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
|
6
6
|
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const client_1 = require("@aws-sdk/core/client");
|
|
8
|
+
const client_2 = require("@smithy/core/client");
|
|
9
9
|
const config_1 = require("@smithy/core/config");
|
|
10
10
|
const retry_1 = require("@smithy/core/retry");
|
|
11
11
|
const serde_1 = require("@smithy/core/serde");
|
|
@@ -13,7 +13,7 @@ const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
|
13
13
|
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
14
14
|
const getRuntimeConfig = (config) => {
|
|
15
15
|
const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
|
|
16
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
16
|
+
const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
|
|
17
17
|
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
18
18
|
return {
|
|
19
19
|
...clientSharedValues,
|
|
@@ -22,9 +22,9 @@ const getRuntimeConfig = (config) => {
|
|
|
22
22
|
defaultsMode,
|
|
23
23
|
bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
|
|
24
24
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
25
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0,
|
|
25
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, client_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
26
26
|
maxAttempts: config?.maxAttempts ?? retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
27
|
-
region: config?.region ?? (0,
|
|
27
|
+
region: config?.region ?? (0, client_2.invalidProvider)("Region is missing"),
|
|
28
28
|
requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
29
29
|
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE),
|
|
30
30
|
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
|
@@ -7,7 +7,6 @@ const client_1 = require("@aws-sdk/core/client");
|
|
|
7
7
|
const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
|
|
8
8
|
const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
|
|
9
9
|
const token_providers_1 = require("@aws-sdk/token-providers");
|
|
10
|
-
const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
|
|
11
10
|
const core_1 = require("@smithy/core");
|
|
12
11
|
const client_2 = require("@smithy/core/client");
|
|
13
12
|
const config_1 = require("@smithy/core/config");
|
|
@@ -34,7 +33,7 @@ const getRuntimeConfig = (config) => {
|
|
|
34
33
|
authSchemePreference: config?.authSchemePreference ?? (0, config_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
35
34
|
bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
|
|
36
35
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
|
|
37
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0,
|
|
36
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, client_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
38
37
|
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
39
38
|
{
|
|
40
39
|
schemeId: "aws.auth#sigv4",
|
|
@@ -66,7 +65,7 @@ const getRuntimeConfig = (config) => {
|
|
|
66
65
|
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
|
67
66
|
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, config_1.loadConfig)(config_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
68
67
|
useFipsEndpoint: config?.useFipsEndpoint ?? (0, config_1.loadConfig)(config_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
69
|
-
userAgentAppId: config?.userAgentAppId ?? (0, config_1.loadConfig)(
|
|
68
|
+
userAgentAppId: config?.userAgentAppId ?? (0, config_1.loadConfig)(client_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
70
69
|
};
|
|
71
70
|
};
|
|
72
71
|
exports.getRuntimeConfig = getRuntimeConfig;
|