@aws-sdk/client-bedrock 3.1046.0 → 3.1047.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.
Files changed (55) hide show
  1. package/README.md +35 -0
  2. package/dist-cjs/index.js +91 -7
  3. package/dist-cjs/models/errors.js +14 -14
  4. package/dist-cjs/schemas/schemas_0.js +192 -46
  5. package/dist-es/Bedrock.js +12 -0
  6. package/dist-es/commands/BatchDeleteAdvancedPromptOptimizationJobCommand.js +16 -0
  7. package/dist-es/commands/CreateAdvancedPromptOptimizationJobCommand.js +16 -0
  8. package/dist-es/commands/GetAdvancedPromptOptimizationJobCommand.js +16 -0
  9. package/dist-es/commands/ListAdvancedPromptOptimizationJobsCommand.js +16 -0
  10. package/dist-es/commands/StopAdvancedPromptOptimizationJobCommand.js +16 -0
  11. package/dist-es/commands/index.js +5 -0
  12. package/dist-es/models/enums.js +16 -7
  13. package/dist-es/models/errors.js +12 -12
  14. package/dist-es/pagination/ListAdvancedPromptOptimizationJobsPaginator.js +4 -0
  15. package/dist-es/pagination/index.js +1 -0
  16. package/dist-es/schemas/schemas_0.js +180 -34
  17. package/dist-types/Bedrock.d.ts +43 -0
  18. package/dist-types/BedrockClient.d.ts +7 -2
  19. package/dist-types/commands/BatchDeleteAdvancedPromptOptimizationJobCommand.d.ts +102 -0
  20. package/dist-types/commands/CreateAdvancedPromptOptimizationJobCommand.d.ts +131 -0
  21. package/dist-types/commands/CreateGuardrailCommand.d.ts +1 -1
  22. package/dist-types/commands/CreateGuardrailVersionCommand.d.ts +1 -1
  23. package/dist-types/commands/DeleteGuardrailCommand.d.ts +1 -1
  24. package/dist-types/commands/GetAdvancedPromptOptimizationJobCommand.d.ts +120 -0
  25. package/dist-types/commands/GetGuardrailCommand.d.ts +1 -2
  26. package/dist-types/commands/ListAdvancedPromptOptimizationJobsCommand.d.ts +100 -0
  27. package/dist-types/commands/StopAdvancedPromptOptimizationJobCommand.d.ts +92 -0
  28. package/dist-types/commands/index.d.ts +5 -0
  29. package/dist-types/models/enums.d.ts +40 -23
  30. package/dist-types/models/errors.d.ts +12 -12
  31. package/dist-types/models/models_0.d.ts +3481 -3544
  32. package/dist-types/models/models_1.d.ts +417 -2
  33. package/dist-types/pagination/ListAdvancedPromptOptimizationJobsPaginator.d.ts +7 -0
  34. package/dist-types/pagination/index.d.ts +1 -0
  35. package/dist-types/schemas/schemas_0.d.ts +22 -0
  36. package/dist-types/ts3.4/Bedrock.d.ts +117 -0
  37. package/dist-types/ts3.4/BedrockClient.d.ts +30 -0
  38. package/dist-types/ts3.4/commands/BatchDeleteAdvancedPromptOptimizationJobCommand.d.ts +53 -0
  39. package/dist-types/ts3.4/commands/CreateAdvancedPromptOptimizationJobCommand.d.ts +53 -0
  40. package/dist-types/ts3.4/commands/CreateGuardrailCommand.d.ts +1 -1
  41. package/dist-types/ts3.4/commands/CreateGuardrailVersionCommand.d.ts +1 -1
  42. package/dist-types/ts3.4/commands/DeleteGuardrailCommand.d.ts +1 -1
  43. package/dist-types/ts3.4/commands/GetAdvancedPromptOptimizationJobCommand.d.ts +53 -0
  44. package/dist-types/ts3.4/commands/GetGuardrailCommand.d.ts +1 -2
  45. package/dist-types/ts3.4/commands/ListAdvancedPromptOptimizationJobsCommand.d.ts +53 -0
  46. package/dist-types/ts3.4/commands/StopAdvancedPromptOptimizationJobCommand.d.ts +53 -0
  47. package/dist-types/ts3.4/commands/index.d.ts +5 -0
  48. package/dist-types/ts3.4/models/enums.d.ts +20 -9
  49. package/dist-types/ts3.4/models/errors.d.ts +7 -7
  50. package/dist-types/ts3.4/models/models_0.d.ts +90 -107
  51. package/dist-types/ts3.4/models/models_1.d.ts +114 -7
  52. package/dist-types/ts3.4/pagination/ListAdvancedPromptOptimizationJobsPaginator.d.ts +11 -0
  53. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  54. package/dist-types/ts3.4/schemas/schemas_0.d.ts +22 -0
  55. package/package.json +6 -6
@@ -0,0 +1,100 @@
1
+ import { Command as $Command } from "@smithy/core/client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockClient";
4
+ import type { ListAdvancedPromptOptimizationJobsRequest, ListAdvancedPromptOptimizationJobsResponse } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link ListAdvancedPromptOptimizationJobsCommand}.
14
+ */
15
+ export interface ListAdvancedPromptOptimizationJobsCommandInput extends ListAdvancedPromptOptimizationJobsRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ListAdvancedPromptOptimizationJobsCommand}.
21
+ */
22
+ export interface ListAdvancedPromptOptimizationJobsCommandOutput extends ListAdvancedPromptOptimizationJobsResponse, __MetadataBearer {
23
+ }
24
+ declare const ListAdvancedPromptOptimizationJobsCommand_base: {
25
+ new (input: ListAdvancedPromptOptimizationJobsCommandInput): import("@smithy/core/client").CommandImpl<ListAdvancedPromptOptimizationJobsCommandInput, ListAdvancedPromptOptimizationJobsCommandOutput, BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (...[input]: [] | [ListAdvancedPromptOptimizationJobsCommandInput]): import("@smithy/core/client").CommandImpl<ListAdvancedPromptOptimizationJobsCommandInput, ListAdvancedPromptOptimizationJobsCommandOutput, BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): {
28
+ [x: string]: unknown;
29
+ };
30
+ };
31
+ /**
32
+ * Lists all advanced prompt optimization jobs for the account.
33
+ * @example
34
+ * Use a bare-bones client and the command you need to make an API call.
35
+ * ```javascript
36
+ * import { BedrockClient, ListAdvancedPromptOptimizationJobsCommand } from "@aws-sdk/client-bedrock"; // ES Modules import
37
+ * // const { BedrockClient, ListAdvancedPromptOptimizationJobsCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import
38
+ * // import type { BedrockClientConfig } from "@aws-sdk/client-bedrock";
39
+ * const config = {}; // type is BedrockClientConfig
40
+ * const client = new BedrockClient(config);
41
+ * const input = { // ListAdvancedPromptOptimizationJobsRequest
42
+ * maxResults: Number("int"),
43
+ * nextToken: "STRING_VALUE",
44
+ * sortBy: "CreationTime",
45
+ * sortOrder: "Ascending" || "Descending",
46
+ * };
47
+ * const command = new ListAdvancedPromptOptimizationJobsCommand(input);
48
+ * const response = await client.send(command);
49
+ * // { // ListAdvancedPromptOptimizationJobsResponse
50
+ * // jobSummaries: [ // AdvancedPromptOptimizationJobSummaries
51
+ * // { // AdvancedPromptOptimizationJobSummary
52
+ * // jobArn: "STRING_VALUE", // required
53
+ * // jobName: "STRING_VALUE", // required
54
+ * // jobStatus: "InProgress" || "Completed" || "Failed" || "PartiallyCompleted" || "Stopping" || "Stopped" || "Deleting", // required
55
+ * // creationTime: new Date("TIMESTAMP"), // required
56
+ * // lastModifiedTime: new Date("TIMESTAMP"),
57
+ * // },
58
+ * // ],
59
+ * // nextToken: "STRING_VALUE",
60
+ * // };
61
+ *
62
+ * ```
63
+ *
64
+ * @param ListAdvancedPromptOptimizationJobsCommandInput - {@link ListAdvancedPromptOptimizationJobsCommandInput}
65
+ * @returns {@link ListAdvancedPromptOptimizationJobsCommandOutput}
66
+ * @see {@link ListAdvancedPromptOptimizationJobsCommandInput} for command's `input` shape.
67
+ * @see {@link ListAdvancedPromptOptimizationJobsCommandOutput} for command's `response` shape.
68
+ * @see {@link BedrockClientResolvedConfig | config} for BedrockClient's `config` shape.
69
+ *
70
+ * @throws {@link AccessDeniedException} (client fault)
71
+ * <p>The request is denied because of missing access permissions.</p>
72
+ *
73
+ * @throws {@link InternalServerException} (server fault)
74
+ * <p>An internal server error occurred. Retry your request.</p>
75
+ *
76
+ * @throws {@link ThrottlingException} (client fault)
77
+ * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
78
+ *
79
+ * @throws {@link ValidationException} (client fault)
80
+ * <p>Input validation failed. Check your request parameters and retry the request.</p>
81
+ *
82
+ * @throws {@link BedrockServiceException}
83
+ * <p>Base exception class for all service exceptions from Bedrock service.</p>
84
+ *
85
+ *
86
+ * @public
87
+ */
88
+ export declare class ListAdvancedPromptOptimizationJobsCommand extends ListAdvancedPromptOptimizationJobsCommand_base {
89
+ /** @internal type navigation helper, not in runtime. */
90
+ protected static __types: {
91
+ api: {
92
+ input: ListAdvancedPromptOptimizationJobsRequest;
93
+ output: ListAdvancedPromptOptimizationJobsResponse;
94
+ };
95
+ sdk: {
96
+ input: ListAdvancedPromptOptimizationJobsCommandInput;
97
+ output: ListAdvancedPromptOptimizationJobsCommandOutput;
98
+ };
99
+ };
100
+ }
@@ -0,0 +1,92 @@
1
+ import { Command as $Command } from "@smithy/core/client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockClient";
4
+ import type { StopAdvancedPromptOptimizationJobRequest, StopAdvancedPromptOptimizationJobResponse } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link StopAdvancedPromptOptimizationJobCommand}.
14
+ */
15
+ export interface StopAdvancedPromptOptimizationJobCommandInput extends StopAdvancedPromptOptimizationJobRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link StopAdvancedPromptOptimizationJobCommand}.
21
+ */
22
+ export interface StopAdvancedPromptOptimizationJobCommandOutput extends StopAdvancedPromptOptimizationJobResponse, __MetadataBearer {
23
+ }
24
+ declare const StopAdvancedPromptOptimizationJobCommand_base: {
25
+ new (input: StopAdvancedPromptOptimizationJobCommandInput): import("@smithy/core/client").CommandImpl<StopAdvancedPromptOptimizationJobCommandInput, StopAdvancedPromptOptimizationJobCommandOutput, BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: StopAdvancedPromptOptimizationJobCommandInput): import("@smithy/core/client").CommandImpl<StopAdvancedPromptOptimizationJobCommandInput, StopAdvancedPromptOptimizationJobCommandOutput, BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): {
28
+ [x: string]: unknown;
29
+ };
30
+ };
31
+ /**
32
+ * Stops an in-progress advanced prompt optimization job.
33
+ * @example
34
+ * Use a bare-bones client and the command you need to make an API call.
35
+ * ```javascript
36
+ * import { BedrockClient, StopAdvancedPromptOptimizationJobCommand } from "@aws-sdk/client-bedrock"; // ES Modules import
37
+ * // const { BedrockClient, StopAdvancedPromptOptimizationJobCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import
38
+ * // import type { BedrockClientConfig } from "@aws-sdk/client-bedrock";
39
+ * const config = {}; // type is BedrockClientConfig
40
+ * const client = new BedrockClient(config);
41
+ * const input = { // StopAdvancedPromptOptimizationJobRequest
42
+ * jobIdentifier: "STRING_VALUE", // required
43
+ * };
44
+ * const command = new StopAdvancedPromptOptimizationJobCommand(input);
45
+ * const response = await client.send(command);
46
+ * // {};
47
+ *
48
+ * ```
49
+ *
50
+ * @param StopAdvancedPromptOptimizationJobCommandInput - {@link StopAdvancedPromptOptimizationJobCommandInput}
51
+ * @returns {@link StopAdvancedPromptOptimizationJobCommandOutput}
52
+ * @see {@link StopAdvancedPromptOptimizationJobCommandInput} for command's `input` shape.
53
+ * @see {@link StopAdvancedPromptOptimizationJobCommandOutput} for command's `response` shape.
54
+ * @see {@link BedrockClientResolvedConfig | config} for BedrockClient's `config` shape.
55
+ *
56
+ * @throws {@link AccessDeniedException} (client fault)
57
+ * <p>The request is denied because of missing access permissions.</p>
58
+ *
59
+ * @throws {@link ConflictException} (client fault)
60
+ * <p>Error occurred because of a conflict while performing an operation.</p>
61
+ *
62
+ * @throws {@link InternalServerException} (server fault)
63
+ * <p>An internal server error occurred. Retry your request.</p>
64
+ *
65
+ * @throws {@link ResourceNotFoundException} (client fault)
66
+ * <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
67
+ *
68
+ * @throws {@link ThrottlingException} (client fault)
69
+ * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
70
+ *
71
+ * @throws {@link ValidationException} (client fault)
72
+ * <p>Input validation failed. Check your request parameters and retry the request.</p>
73
+ *
74
+ * @throws {@link BedrockServiceException}
75
+ * <p>Base exception class for all service exceptions from Bedrock service.</p>
76
+ *
77
+ *
78
+ * @public
79
+ */
80
+ export declare class StopAdvancedPromptOptimizationJobCommand extends StopAdvancedPromptOptimizationJobCommand_base {
81
+ /** @internal type navigation helper, not in runtime. */
82
+ protected static __types: {
83
+ api: {
84
+ input: StopAdvancedPromptOptimizationJobRequest;
85
+ output: {};
86
+ };
87
+ sdk: {
88
+ input: StopAdvancedPromptOptimizationJobCommandInput;
89
+ output: StopAdvancedPromptOptimizationJobCommandOutput;
90
+ };
91
+ };
92
+ }
@@ -1,5 +1,7 @@
1
+ export * from "./BatchDeleteAdvancedPromptOptimizationJobCommand";
1
2
  export * from "./BatchDeleteEvaluationJobCommand";
2
3
  export * from "./CancelAutomatedReasoningPolicyBuildWorkflowCommand";
4
+ export * from "./CreateAdvancedPromptOptimizationJobCommand";
3
5
  export * from "./CreateAutomatedReasoningPolicyCommand";
4
6
  export * from "./CreateAutomatedReasoningPolicyTestCaseCommand";
5
7
  export * from "./CreateAutomatedReasoningPolicyVersionCommand";
@@ -34,6 +36,7 @@ export * from "./DeleteProvisionedModelThroughputCommand";
34
36
  export * from "./DeleteResourcePolicyCommand";
35
37
  export * from "./DeregisterMarketplaceModelEndpointCommand";
36
38
  export * from "./ExportAutomatedReasoningPolicyVersionCommand";
39
+ export * from "./GetAdvancedPromptOptimizationJobCommand";
37
40
  export * from "./GetAutomatedReasoningPolicyAnnotationsCommand";
38
41
  export * from "./GetAutomatedReasoningPolicyBuildWorkflowCommand";
39
42
  export * from "./GetAutomatedReasoningPolicyBuildWorkflowResultAssetsCommand";
@@ -59,6 +62,7 @@ export * from "./GetPromptRouterCommand";
59
62
  export * from "./GetProvisionedModelThroughputCommand";
60
63
  export * from "./GetResourcePolicyCommand";
61
64
  export * from "./GetUseCaseForModelAccessCommand";
65
+ export * from "./ListAdvancedPromptOptimizationJobsCommand";
62
66
  export * from "./ListAutomatedReasoningPoliciesCommand";
63
67
  export * from "./ListAutomatedReasoningPolicyBuildWorkflowsCommand";
64
68
  export * from "./ListAutomatedReasoningPolicyTestCasesCommand";
@@ -87,6 +91,7 @@ export * from "./PutUseCaseForModelAccessCommand";
87
91
  export * from "./RegisterMarketplaceModelEndpointCommand";
88
92
  export * from "./StartAutomatedReasoningPolicyBuildWorkflowCommand";
89
93
  export * from "./StartAutomatedReasoningPolicyTestWorkflowCommand";
94
+ export * from "./StopAdvancedPromptOptimizationJobCommand";
90
95
  export * from "./StopEvaluationJobCommand";
91
96
  export * from "./StopModelCustomizationJobCommand";
92
97
  export * from "./StopModelInvocationJobCommand";
@@ -36,6 +36,46 @@ export declare const ConfigurationOwner: {
36
36
  * @public
37
37
  */
38
38
  export type ConfigurationOwner = (typeof ConfigurationOwner)[keyof typeof ConfigurationOwner];
39
+ /**
40
+ * @public
41
+ * @enum
42
+ */
43
+ export declare const AdvancedPromptOptimizationJobStatus: {
44
+ readonly COMPLETED: "Completed";
45
+ readonly DELETING: "Deleting";
46
+ readonly FAILED: "Failed";
47
+ readonly IN_PROGRESS: "InProgress";
48
+ readonly PARTIALLY_COMPLETED: "PartiallyCompleted";
49
+ readonly STOPPED: "Stopped";
50
+ readonly STOPPING: "Stopping";
51
+ };
52
+ /**
53
+ * @public
54
+ */
55
+ export type AdvancedPromptOptimizationJobStatus = (typeof AdvancedPromptOptimizationJobStatus)[keyof typeof AdvancedPromptOptimizationJobStatus];
56
+ /**
57
+ * @public
58
+ * @enum
59
+ */
60
+ export declare const SortJobsBy: {
61
+ readonly CREATION_TIME: "CreationTime";
62
+ };
63
+ /**
64
+ * @public
65
+ */
66
+ export type SortJobsBy = (typeof SortJobsBy)[keyof typeof SortJobsBy];
67
+ /**
68
+ * @public
69
+ * @enum
70
+ */
71
+ export declare const SortOrder: {
72
+ readonly ASCENDING: "Ascending";
73
+ readonly DESCENDING: "Descending";
74
+ };
75
+ /**
76
+ * @public
77
+ */
78
+ export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder];
39
79
  /**
40
80
  * @public
41
81
  * @enum
@@ -243,18 +283,6 @@ export declare const SortModelsBy: {
243
283
  * @public
244
284
  */
245
285
  export type SortModelsBy = (typeof SortModelsBy)[keyof typeof SortModelsBy];
246
- /**
247
- * @public
248
- * @enum
249
- */
250
- export declare const SortOrder: {
251
- readonly ASCENDING: "Ascending";
252
- readonly DESCENDING: "Descending";
253
- };
254
- /**
255
- * @public
256
- */
257
- export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder];
258
286
  /**
259
287
  * @public
260
288
  * @enum
@@ -447,17 +475,6 @@ export declare const EvaluationJobType: {
447
475
  * @public
448
476
  */
449
477
  export type EvaluationJobType = (typeof EvaluationJobType)[keyof typeof EvaluationJobType];
450
- /**
451
- * @public
452
- * @enum
453
- */
454
- export declare const SortJobsBy: {
455
- readonly CREATION_TIME: "CreationTime";
456
- };
457
- /**
458
- * @public
459
- */
460
- export type SortJobsBy = (typeof SortJobsBy)[keyof typeof SortJobsBy];
461
478
  /**
462
479
  * @public
463
480
  * @enum
@@ -24,18 +24,6 @@ export declare class InternalServerException extends __BaseException {
24
24
  */
25
25
  constructor(opts: __ExceptionOptionType<InternalServerException, __BaseException>);
26
26
  }
27
- /**
28
- * <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
29
- * @public
30
- */
31
- export declare class ResourceNotFoundException extends __BaseException {
32
- readonly name: "ResourceNotFoundException";
33
- readonly $fault: "client";
34
- /**
35
- * @internal
36
- */
37
- constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
38
- }
39
27
  /**
40
28
  * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
41
29
  * @public
@@ -72,6 +60,18 @@ export declare class ConflictException extends __BaseException {
72
60
  */
73
61
  constructor(opts: __ExceptionOptionType<ConflictException, __BaseException>);
74
62
  }
63
+ /**
64
+ * <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
65
+ * @public
66
+ */
67
+ export declare class ResourceNotFoundException extends __BaseException {
68
+ readonly name: "ResourceNotFoundException";
69
+ readonly $fault: "client";
70
+ /**
71
+ * @internal
72
+ */
73
+ constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
74
+ }
75
75
  /**
76
76
  * <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
77
77
  * @public