@aws-sdk/client-bedrock 3.632.0 → 3.635.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 (35) hide show
  1. package/README.md +32 -0
  2. package/dist-cjs/index.js +296 -1
  3. package/dist-es/Bedrock.js +8 -0
  4. package/dist-es/commands/CreateModelInvocationJobCommand.js +24 -0
  5. package/dist-es/commands/GetModelInvocationJobCommand.js +25 -0
  6. package/dist-es/commands/ListModelInvocationJobsCommand.js +25 -0
  7. package/dist-es/commands/StopModelInvocationJobCommand.js +24 -0
  8. package/dist-es/commands/index.js +4 -0
  9. package/dist-es/models/models_0.js +49 -0
  10. package/dist-es/pagination/ListModelInvocationJobsPaginator.js +4 -0
  11. package/dist-es/pagination/index.js +1 -0
  12. package/dist-es/protocols/Aws_restJson1.js +150 -0
  13. package/dist-types/Bedrock.d.ts +29 -0
  14. package/dist-types/BedrockClient.d.ts +6 -2
  15. package/dist-types/commands/CreateModelInvocationJobCommand.d.ts +104 -0
  16. package/dist-types/commands/GetModelInvocationJobCommand.d.ts +99 -0
  17. package/dist-types/commands/ListModelInvocationJobsCommand.d.ts +107 -0
  18. package/dist-types/commands/StopModelInvocationJobCommand.d.ts +76 -0
  19. package/dist-types/commands/index.d.ts +4 -0
  20. package/dist-types/models/models_0.d.ts +433 -0
  21. package/dist-types/pagination/ListModelInvocationJobsPaginator.d.ts +7 -0
  22. package/dist-types/pagination/index.d.ts +1 -0
  23. package/dist-types/protocols/Aws_restJson1.d.ts +36 -0
  24. package/dist-types/ts3.4/Bedrock.d.ts +69 -0
  25. package/dist-types/ts3.4/BedrockClient.d.ts +24 -0
  26. package/dist-types/ts3.4/commands/CreateModelInvocationJobCommand.d.ts +40 -0
  27. package/dist-types/ts3.4/commands/GetModelInvocationJobCommand.d.ts +40 -0
  28. package/dist-types/ts3.4/commands/ListModelInvocationJobsCommand.d.ts +40 -0
  29. package/dist-types/ts3.4/commands/StopModelInvocationJobCommand.d.ts +40 -0
  30. package/dist-types/ts3.4/commands/index.d.ts +4 -0
  31. package/dist-types/ts3.4/models/models_0.d.ts +143 -0
  32. package/dist-types/ts3.4/pagination/ListModelInvocationJobsPaginator.d.ts +11 -0
  33. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  34. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +48 -0
  35. package/package.json +10 -10
@@ -0,0 +1,99 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockClient";
4
+ import { GetModelInvocationJobRequest, GetModelInvocationJobResponse } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link GetModelInvocationJobCommand}.
14
+ */
15
+ export interface GetModelInvocationJobCommandInput extends GetModelInvocationJobRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetModelInvocationJobCommand}.
21
+ */
22
+ export interface GetModelInvocationJobCommandOutput extends GetModelInvocationJobResponse, __MetadataBearer {
23
+ }
24
+ declare const GetModelInvocationJobCommand_base: {
25
+ new (input: GetModelInvocationJobCommandInput): import("@smithy/smithy-client").CommandImpl<GetModelInvocationJobCommandInput, GetModelInvocationJobCommandOutput, BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: GetModelInvocationJobCommandInput): import("@smithy/smithy-client").CommandImpl<GetModelInvocationJobCommandInput, GetModelInvocationJobCommandOutput, BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Gets details about a batch inference job. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/batch-inference-manage.html#batch-inference-view">View details about a batch inference job</a>
31
+ * </p>
32
+ * @example
33
+ * Use a bare-bones client and the command you need to make an API call.
34
+ * ```javascript
35
+ * import { BedrockClient, GetModelInvocationJobCommand } from "@aws-sdk/client-bedrock"; // ES Modules import
36
+ * // const { BedrockClient, GetModelInvocationJobCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import
37
+ * const client = new BedrockClient(config);
38
+ * const input = { // GetModelInvocationJobRequest
39
+ * jobIdentifier: "STRING_VALUE", // required
40
+ * };
41
+ * const command = new GetModelInvocationJobCommand(input);
42
+ * const response = await client.send(command);
43
+ * // { // GetModelInvocationJobResponse
44
+ * // jobArn: "STRING_VALUE", // required
45
+ * // jobName: "STRING_VALUE",
46
+ * // modelId: "STRING_VALUE", // required
47
+ * // clientRequestToken: "STRING_VALUE",
48
+ * // roleArn: "STRING_VALUE", // required
49
+ * // status: "Submitted" || "InProgress" || "Completed" || "Failed" || "Stopping" || "Stopped" || "PartiallyCompleted" || "Expired" || "Validating" || "Scheduled",
50
+ * // message: "STRING_VALUE",
51
+ * // submitTime: new Date("TIMESTAMP"), // required
52
+ * // lastModifiedTime: new Date("TIMESTAMP"),
53
+ * // endTime: new Date("TIMESTAMP"),
54
+ * // inputDataConfig: { // ModelInvocationJobInputDataConfig Union: only one key present
55
+ * // s3InputDataConfig: { // ModelInvocationJobS3InputDataConfig
56
+ * // s3InputFormat: "JSONL",
57
+ * // s3Uri: "STRING_VALUE", // required
58
+ * // },
59
+ * // },
60
+ * // outputDataConfig: { // ModelInvocationJobOutputDataConfig Union: only one key present
61
+ * // s3OutputDataConfig: { // ModelInvocationJobS3OutputDataConfig
62
+ * // s3Uri: "STRING_VALUE", // required
63
+ * // s3EncryptionKeyId: "STRING_VALUE",
64
+ * // },
65
+ * // },
66
+ * // timeoutDurationInHours: Number("int"),
67
+ * // jobExpirationTime: new Date("TIMESTAMP"),
68
+ * // };
69
+ *
70
+ * ```
71
+ *
72
+ * @param GetModelInvocationJobCommandInput - {@link GetModelInvocationJobCommandInput}
73
+ * @returns {@link GetModelInvocationJobCommandOutput}
74
+ * @see {@link GetModelInvocationJobCommandInput} for command's `input` shape.
75
+ * @see {@link GetModelInvocationJobCommandOutput} for command's `response` shape.
76
+ * @see {@link BedrockClientResolvedConfig | config} for BedrockClient's `config` shape.
77
+ *
78
+ * @throws {@link AccessDeniedException} (client fault)
79
+ * <p>The request is denied because of missing access permissions.</p>
80
+ *
81
+ * @throws {@link InternalServerException} (server fault)
82
+ * <p>An internal server error occurred. Retry your request.</p>
83
+ *
84
+ * @throws {@link ResourceNotFoundException} (client fault)
85
+ * <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
86
+ *
87
+ * @throws {@link ThrottlingException} (client fault)
88
+ * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
89
+ *
90
+ * @throws {@link ValidationException} (client fault)
91
+ * <p>Input validation failed. Check your request parameters and retry the request.</p>
92
+ *
93
+ * @throws {@link BedrockServiceException}
94
+ * <p>Base exception class for all service exceptions from Bedrock service.</p>
95
+ *
96
+ * @public
97
+ */
98
+ export declare class GetModelInvocationJobCommand extends GetModelInvocationJobCommand_base {
99
+ }
@@ -0,0 +1,107 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockClient";
4
+ import { ListModelInvocationJobsRequest, ListModelInvocationJobsResponse } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link ListModelInvocationJobsCommand}.
14
+ */
15
+ export interface ListModelInvocationJobsCommandInput extends ListModelInvocationJobsRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ListModelInvocationJobsCommand}.
21
+ */
22
+ export interface ListModelInvocationJobsCommandOutput extends ListModelInvocationJobsResponse, __MetadataBearer {
23
+ }
24
+ declare const ListModelInvocationJobsCommand_base: {
25
+ new (input: ListModelInvocationJobsCommandInput): import("@smithy/smithy-client").CommandImpl<ListModelInvocationJobsCommandInput, ListModelInvocationJobsCommandOutput, BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (...[input]: [] | [ListModelInvocationJobsCommandInput]): import("@smithy/smithy-client").CommandImpl<ListModelInvocationJobsCommandInput, ListModelInvocationJobsCommandOutput, BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Lists all batch inference jobs in the account. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/batch-inference-manage.html#batch-inference-view">View details about a batch inference job</a>.</p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { BedrockClient, ListModelInvocationJobsCommand } from "@aws-sdk/client-bedrock"; // ES Modules import
35
+ * // const { BedrockClient, ListModelInvocationJobsCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import
36
+ * const client = new BedrockClient(config);
37
+ * const input = { // ListModelInvocationJobsRequest
38
+ * submitTimeAfter: new Date("TIMESTAMP"),
39
+ * submitTimeBefore: new Date("TIMESTAMP"),
40
+ * statusEquals: "Submitted" || "InProgress" || "Completed" || "Failed" || "Stopping" || "Stopped" || "PartiallyCompleted" || "Expired" || "Validating" || "Scheduled",
41
+ * nameContains: "STRING_VALUE",
42
+ * maxResults: Number("int"),
43
+ * nextToken: "STRING_VALUE",
44
+ * sortBy: "CreationTime",
45
+ * sortOrder: "Ascending" || "Descending",
46
+ * };
47
+ * const command = new ListModelInvocationJobsCommand(input);
48
+ * const response = await client.send(command);
49
+ * // { // ListModelInvocationJobsResponse
50
+ * // nextToken: "STRING_VALUE",
51
+ * // invocationJobSummaries: [ // ModelInvocationJobSummaries
52
+ * // { // ModelInvocationJobSummary
53
+ * // jobArn: "STRING_VALUE", // required
54
+ * // jobName: "STRING_VALUE", // required
55
+ * // modelId: "STRING_VALUE", // required
56
+ * // clientRequestToken: "STRING_VALUE",
57
+ * // roleArn: "STRING_VALUE", // required
58
+ * // status: "Submitted" || "InProgress" || "Completed" || "Failed" || "Stopping" || "Stopped" || "PartiallyCompleted" || "Expired" || "Validating" || "Scheduled",
59
+ * // message: "STRING_VALUE",
60
+ * // submitTime: new Date("TIMESTAMP"), // required
61
+ * // lastModifiedTime: new Date("TIMESTAMP"),
62
+ * // endTime: new Date("TIMESTAMP"),
63
+ * // inputDataConfig: { // ModelInvocationJobInputDataConfig Union: only one key present
64
+ * // s3InputDataConfig: { // ModelInvocationJobS3InputDataConfig
65
+ * // s3InputFormat: "JSONL",
66
+ * // s3Uri: "STRING_VALUE", // required
67
+ * // },
68
+ * // },
69
+ * // outputDataConfig: { // ModelInvocationJobOutputDataConfig Union: only one key present
70
+ * // s3OutputDataConfig: { // ModelInvocationJobS3OutputDataConfig
71
+ * // s3Uri: "STRING_VALUE", // required
72
+ * // s3EncryptionKeyId: "STRING_VALUE",
73
+ * // },
74
+ * // },
75
+ * // timeoutDurationInHours: Number("int"),
76
+ * // jobExpirationTime: new Date("TIMESTAMP"),
77
+ * // },
78
+ * // ],
79
+ * // };
80
+ *
81
+ * ```
82
+ *
83
+ * @param ListModelInvocationJobsCommandInput - {@link ListModelInvocationJobsCommandInput}
84
+ * @returns {@link ListModelInvocationJobsCommandOutput}
85
+ * @see {@link ListModelInvocationJobsCommandInput} for command's `input` shape.
86
+ * @see {@link ListModelInvocationJobsCommandOutput} for command's `response` shape.
87
+ * @see {@link BedrockClientResolvedConfig | config} for BedrockClient's `config` shape.
88
+ *
89
+ * @throws {@link AccessDeniedException} (client fault)
90
+ * <p>The request is denied because of missing access permissions.</p>
91
+ *
92
+ * @throws {@link InternalServerException} (server fault)
93
+ * <p>An internal server error occurred. Retry your request.</p>
94
+ *
95
+ * @throws {@link ThrottlingException} (client fault)
96
+ * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
97
+ *
98
+ * @throws {@link ValidationException} (client fault)
99
+ * <p>Input validation failed. Check your request parameters and retry the request.</p>
100
+ *
101
+ * @throws {@link BedrockServiceException}
102
+ * <p>Base exception class for all service exceptions from Bedrock service.</p>
103
+ *
104
+ * @public
105
+ */
106
+ export declare class ListModelInvocationJobsCommand extends ListModelInvocationJobsCommand_base {
107
+ }
@@ -0,0 +1,76 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockClient";
4
+ import { StopModelInvocationJobRequest, StopModelInvocationJobResponse } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link StopModelInvocationJobCommand}.
14
+ */
15
+ export interface StopModelInvocationJobCommandInput extends StopModelInvocationJobRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link StopModelInvocationJobCommand}.
21
+ */
22
+ export interface StopModelInvocationJobCommandOutput extends StopModelInvocationJobResponse, __MetadataBearer {
23
+ }
24
+ declare const StopModelInvocationJobCommand_base: {
25
+ new (input: StopModelInvocationJobCommandInput): import("@smithy/smithy-client").CommandImpl<StopModelInvocationJobCommandInput, StopModelInvocationJobCommandOutput, BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: StopModelInvocationJobCommandInput): import("@smithy/smithy-client").CommandImpl<StopModelInvocationJobCommandInput, StopModelInvocationJobCommandOutput, BedrockClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Stops a batch inference job. You're only charged for tokens that were already processed. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/batch-inference-manage.html#batch-inference-stop">Stop a batch inference job</a>.</p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { BedrockClient, StopModelInvocationJobCommand } from "@aws-sdk/client-bedrock"; // ES Modules import
35
+ * // const { BedrockClient, StopModelInvocationJobCommand } = require("@aws-sdk/client-bedrock"); // CommonJS import
36
+ * const client = new BedrockClient(config);
37
+ * const input = { // StopModelInvocationJobRequest
38
+ * jobIdentifier: "STRING_VALUE", // required
39
+ * };
40
+ * const command = new StopModelInvocationJobCommand(input);
41
+ * const response = await client.send(command);
42
+ * // {};
43
+ *
44
+ * ```
45
+ *
46
+ * @param StopModelInvocationJobCommandInput - {@link StopModelInvocationJobCommandInput}
47
+ * @returns {@link StopModelInvocationJobCommandOutput}
48
+ * @see {@link StopModelInvocationJobCommandInput} for command's `input` shape.
49
+ * @see {@link StopModelInvocationJobCommandOutput} for command's `response` shape.
50
+ * @see {@link BedrockClientResolvedConfig | config} for BedrockClient's `config` shape.
51
+ *
52
+ * @throws {@link AccessDeniedException} (client fault)
53
+ * <p>The request is denied because of missing access permissions.</p>
54
+ *
55
+ * @throws {@link ConflictException} (client fault)
56
+ * <p>Error occurred because of a conflict while performing an operation.</p>
57
+ *
58
+ * @throws {@link InternalServerException} (server fault)
59
+ * <p>An internal server error occurred. Retry your request.</p>
60
+ *
61
+ * @throws {@link ResourceNotFoundException} (client fault)
62
+ * <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
63
+ *
64
+ * @throws {@link ThrottlingException} (client fault)
65
+ * <p>The number of requests exceeds the limit. Resubmit your request later.</p>
66
+ *
67
+ * @throws {@link ValidationException} (client fault)
68
+ * <p>Input validation failed. Check your request parameters and retry the request.</p>
69
+ *
70
+ * @throws {@link BedrockServiceException}
71
+ * <p>Base exception class for all service exceptions from Bedrock service.</p>
72
+ *
73
+ * @public
74
+ */
75
+ export declare class StopModelInvocationJobCommand extends StopModelInvocationJobCommand_base {
76
+ }
@@ -3,6 +3,7 @@ export * from "./CreateGuardrailCommand";
3
3
  export * from "./CreateGuardrailVersionCommand";
4
4
  export * from "./CreateModelCopyJobCommand";
5
5
  export * from "./CreateModelCustomizationJobCommand";
6
+ export * from "./CreateModelInvocationJobCommand";
6
7
  export * from "./CreateProvisionedModelThroughputCommand";
7
8
  export * from "./DeleteCustomModelCommand";
8
9
  export * from "./DeleteGuardrailCommand";
@@ -14,6 +15,7 @@ export * from "./GetFoundationModelCommand";
14
15
  export * from "./GetGuardrailCommand";
15
16
  export * from "./GetModelCopyJobCommand";
16
17
  export * from "./GetModelCustomizationJobCommand";
18
+ export * from "./GetModelInvocationJobCommand";
17
19
  export * from "./GetModelInvocationLoggingConfigurationCommand";
18
20
  export * from "./GetProvisionedModelThroughputCommand";
19
21
  export * from "./ListCustomModelsCommand";
@@ -22,11 +24,13 @@ export * from "./ListFoundationModelsCommand";
22
24
  export * from "./ListGuardrailsCommand";
23
25
  export * from "./ListModelCopyJobsCommand";
24
26
  export * from "./ListModelCustomizationJobsCommand";
27
+ export * from "./ListModelInvocationJobsCommand";
25
28
  export * from "./ListProvisionedModelThroughputsCommand";
26
29
  export * from "./ListTagsForResourceCommand";
27
30
  export * from "./PutModelInvocationLoggingConfigurationCommand";
28
31
  export * from "./StopEvaluationJobCommand";
29
32
  export * from "./StopModelCustomizationJobCommand";
33
+ export * from "./StopModelInvocationJobCommand";
30
34
  export * from "./TagResourceCommand";
31
35
  export * from "./UntagResourceCommand";
32
36
  export * from "./UpdateGuardrailCommand";