@aws-sdk/client-bedrock-runtime 3.704.0 → 3.705.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 (41) hide show
  1. package/README.md +31 -7
  2. package/dist-cjs/index.js +464 -112
  3. package/dist-es/BedrockRuntime.js +6 -0
  4. package/dist-es/commands/GetAsyncInvokeCommand.js +23 -0
  5. package/dist-es/commands/ListAsyncInvokesCommand.js +23 -0
  6. package/dist-es/commands/StartAsyncInvokeCommand.js +23 -0
  7. package/dist-es/commands/index.js +3 -0
  8. package/dist-es/index.js +1 -0
  9. package/dist-es/models/models_0.js +152 -72
  10. package/dist-es/pagination/Interfaces.js +1 -0
  11. package/dist-es/pagination/ListAsyncInvokesPaginator.js +4 -0
  12. package/dist-es/pagination/index.js +2 -0
  13. package/dist-es/protocols/Aws_restJson1.js +190 -2
  14. package/dist-types/BedrockRuntime.d.ts +22 -0
  15. package/dist-types/BedrockRuntimeClient.d.ts +5 -2
  16. package/dist-types/commands/ApplyGuardrailCommand.d.ts +2 -0
  17. package/dist-types/commands/ConverseCommand.d.ts +43 -0
  18. package/dist-types/commands/ConverseStreamCommand.d.ts +23 -0
  19. package/dist-types/commands/GetAsyncInvokeCommand.d.ts +101 -0
  20. package/dist-types/commands/ListAsyncInvokesCommand.d.ts +112 -0
  21. package/dist-types/commands/StartAsyncInvokeCommand.d.ts +124 -0
  22. package/dist-types/commands/index.d.ts +3 -0
  23. package/dist-types/index.d.ts +1 -0
  24. package/dist-types/models/models_0.d.ts +569 -90
  25. package/dist-types/pagination/Interfaces.d.ts +8 -0
  26. package/dist-types/pagination/ListAsyncInvokesPaginator.d.ts +7 -0
  27. package/dist-types/pagination/index.d.ts +2 -0
  28. package/dist-types/protocols/Aws_restJson1.d.ts +27 -0
  29. package/dist-types/ts3.4/BedrockRuntime.d.ts +52 -0
  30. package/dist-types/ts3.4/BedrockRuntimeClient.d.ts +20 -2
  31. package/dist-types/ts3.4/commands/GetAsyncInvokeCommand.d.ts +50 -0
  32. package/dist-types/ts3.4/commands/ListAsyncInvokesCommand.d.ts +50 -0
  33. package/dist-types/ts3.4/commands/StartAsyncInvokeCommand.d.ts +50 -0
  34. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  35. package/dist-types/ts3.4/index.d.ts +1 -0
  36. package/dist-types/ts3.4/models/models_0.d.ts +237 -42
  37. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  38. package/dist-types/ts3.4/pagination/ListAsyncInvokesPaginator.d.ts +11 -0
  39. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  40. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +36 -0
  41. package/package.json +4 -2
@@ -0,0 +1,112 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { BedrockRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockRuntimeClient";
4
+ import { ListAsyncInvokesRequest, ListAsyncInvokesResponse } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link ListAsyncInvokesCommand}.
14
+ */
15
+ export interface ListAsyncInvokesCommandInput extends ListAsyncInvokesRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ListAsyncInvokesCommand}.
21
+ */
22
+ export interface ListAsyncInvokesCommandOutput extends ListAsyncInvokesResponse, __MetadataBearer {
23
+ }
24
+ declare const ListAsyncInvokesCommand_base: {
25
+ new (input: ListAsyncInvokesCommandInput): import("@smithy/smithy-client").CommandImpl<ListAsyncInvokesCommandInput, ListAsyncInvokesCommandOutput, BedrockRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (...[input]: [] | [ListAsyncInvokesCommandInput]): import("@smithy/smithy-client").CommandImpl<ListAsyncInvokesCommandInput, ListAsyncInvokesCommandOutput, BedrockRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Lists asynchronous invocations.</p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { BedrockRuntimeClient, ListAsyncInvokesCommand } from "@aws-sdk/client-bedrock-runtime"; // ES Modules import
35
+ * // const { BedrockRuntimeClient, ListAsyncInvokesCommand } = require("@aws-sdk/client-bedrock-runtime"); // CommonJS import
36
+ * const client = new BedrockRuntimeClient(config);
37
+ * const input = { // ListAsyncInvokesRequest
38
+ * submitTimeAfter: new Date("TIMESTAMP"),
39
+ * submitTimeBefore: new Date("TIMESTAMP"),
40
+ * statusEquals: "InProgress" || "Completed" || "Failed",
41
+ * maxResults: Number("int"),
42
+ * nextToken: "STRING_VALUE",
43
+ * sortBy: "SubmissionTime",
44
+ * sortOrder: "Ascending" || "Descending",
45
+ * };
46
+ * const command = new ListAsyncInvokesCommand(input);
47
+ * const response = await client.send(command);
48
+ * // { // ListAsyncInvokesResponse
49
+ * // nextToken: "STRING_VALUE",
50
+ * // asyncInvokeSummaries: [ // AsyncInvokeSummaries
51
+ * // { // AsyncInvokeSummary
52
+ * // invocationArn: "STRING_VALUE", // required
53
+ * // modelArn: "STRING_VALUE", // required
54
+ * // clientRequestToken: "STRING_VALUE",
55
+ * // status: "InProgress" || "Completed" || "Failed",
56
+ * // failureMessage: "STRING_VALUE",
57
+ * // submitTime: new Date("TIMESTAMP"), // required
58
+ * // lastModifiedTime: new Date("TIMESTAMP"),
59
+ * // endTime: new Date("TIMESTAMP"),
60
+ * // outputDataConfig: { // AsyncInvokeOutputDataConfig Union: only one key present
61
+ * // s3OutputDataConfig: { // AsyncInvokeS3OutputDataConfig
62
+ * // s3Uri: "STRING_VALUE", // required
63
+ * // kmsKeyId: "STRING_VALUE",
64
+ * // bucketOwner: "STRING_VALUE",
65
+ * // },
66
+ * // },
67
+ * // },
68
+ * // ],
69
+ * // };
70
+ *
71
+ * ```
72
+ *
73
+ * @param ListAsyncInvokesCommandInput - {@link ListAsyncInvokesCommandInput}
74
+ * @returns {@link ListAsyncInvokesCommandOutput}
75
+ * @see {@link ListAsyncInvokesCommandInput} for command's `input` shape.
76
+ * @see {@link ListAsyncInvokesCommandOutput} for command's `response` shape.
77
+ * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
78
+ *
79
+ * @throws {@link AccessDeniedException} (client fault)
80
+ * <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
81
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
82
+ *
83
+ * @throws {@link InternalServerException} (server fault)
84
+ * <p>An internal server error occurred. For troubleshooting this error,
85
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
86
+ *
87
+ * @throws {@link ThrottlingException} (client fault)
88
+ * <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
89
+ * troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
90
+ *
91
+ * @throws {@link ValidationException} (client fault)
92
+ * <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
93
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
94
+ *
95
+ * @throws {@link BedrockRuntimeServiceException}
96
+ * <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
97
+ *
98
+ * @public
99
+ */
100
+ export declare class ListAsyncInvokesCommand extends ListAsyncInvokesCommand_base {
101
+ /** @internal type navigation helper, not in runtime. */
102
+ protected static __types: {
103
+ api: {
104
+ input: ListAsyncInvokesRequest;
105
+ output: ListAsyncInvokesResponse;
106
+ };
107
+ sdk: {
108
+ input: ListAsyncInvokesCommandInput;
109
+ output: ListAsyncInvokesCommandOutput;
110
+ };
111
+ };
112
+ }
@@ -0,0 +1,124 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { BedrockRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockRuntimeClient";
4
+ import { StartAsyncInvokeRequest, StartAsyncInvokeResponse } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link StartAsyncInvokeCommand}.
14
+ */
15
+ export interface StartAsyncInvokeCommandInput extends StartAsyncInvokeRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link StartAsyncInvokeCommand}.
21
+ */
22
+ export interface StartAsyncInvokeCommandOutput extends StartAsyncInvokeResponse, __MetadataBearer {
23
+ }
24
+ declare const StartAsyncInvokeCommand_base: {
25
+ new (input: StartAsyncInvokeCommandInput): import("@smithy/smithy-client").CommandImpl<StartAsyncInvokeCommandInput, StartAsyncInvokeCommandOutput, BedrockRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (__0_0: StartAsyncInvokeCommandInput): import("@smithy/smithy-client").CommandImpl<StartAsyncInvokeCommandInput, StartAsyncInvokeCommandOutput, BedrockRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Starts an asynchronous invocation.</p>
31
+ * <p>This operation requires permission for the <code>bedrock:InvokeModel</code> action.</p>
32
+ * <important>
33
+ * <p>To deny all inference access to resources that you specify in the modelId field, you
34
+ * need to deny access to the <code>bedrock:InvokeModel</code> and
35
+ * <code>bedrock:InvokeModelWithResponseStream</code> actions. Doing this also denies
36
+ * access to the resource through the Converse API actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a>). For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny access for inference on specific models</a>.
37
+ * </p>
38
+ * </important>
39
+ * @example
40
+ * Use a bare-bones client and the command you need to make an API call.
41
+ * ```javascript
42
+ * import { BedrockRuntimeClient, StartAsyncInvokeCommand } from "@aws-sdk/client-bedrock-runtime"; // ES Modules import
43
+ * // const { BedrockRuntimeClient, StartAsyncInvokeCommand } = require("@aws-sdk/client-bedrock-runtime"); // CommonJS import
44
+ * const client = new BedrockRuntimeClient(config);
45
+ * const input = { // StartAsyncInvokeRequest
46
+ * clientRequestToken: "STRING_VALUE",
47
+ * modelId: "STRING_VALUE", // required
48
+ * modelInput: "DOCUMENT_VALUE", // required
49
+ * outputDataConfig: { // AsyncInvokeOutputDataConfig Union: only one key present
50
+ * s3OutputDataConfig: { // AsyncInvokeS3OutputDataConfig
51
+ * s3Uri: "STRING_VALUE", // required
52
+ * kmsKeyId: "STRING_VALUE",
53
+ * bucketOwner: "STRING_VALUE",
54
+ * },
55
+ * },
56
+ * tags: [ // TagList
57
+ * { // Tag
58
+ * key: "STRING_VALUE", // required
59
+ * value: "STRING_VALUE", // required
60
+ * },
61
+ * ],
62
+ * };
63
+ * const command = new StartAsyncInvokeCommand(input);
64
+ * const response = await client.send(command);
65
+ * // { // StartAsyncInvokeResponse
66
+ * // invocationArn: "STRING_VALUE", // required
67
+ * // };
68
+ *
69
+ * ```
70
+ *
71
+ * @param StartAsyncInvokeCommandInput - {@link StartAsyncInvokeCommandInput}
72
+ * @returns {@link StartAsyncInvokeCommandOutput}
73
+ * @see {@link StartAsyncInvokeCommandInput} for command's `input` shape.
74
+ * @see {@link StartAsyncInvokeCommandOutput} for command's `response` shape.
75
+ * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
76
+ *
77
+ * @throws {@link AccessDeniedException} (client fault)
78
+ * <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
79
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
80
+ *
81
+ * @throws {@link ConflictException} (client fault)
82
+ * <p>Error occurred because of a conflict while performing an operation.</p>
83
+ *
84
+ * @throws {@link InternalServerException} (server fault)
85
+ * <p>An internal server error occurred. For troubleshooting this error,
86
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
87
+ *
88
+ * @throws {@link ResourceNotFoundException} (client fault)
89
+ * <p>The specified resource ARN was not found. For troubleshooting this error,
90
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
91
+ *
92
+ * @throws {@link ServiceQuotaExceededException} (client fault)
93
+ * <p>Your request exceeds the service quota for your account. You can view your quotas at <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html">Viewing service quotas</a>. You can resubmit your request later.</p>
94
+ *
95
+ * @throws {@link ServiceUnavailableException} (server fault)
96
+ * <p>The service isn't currently available. For troubleshooting this error,
97
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
98
+ *
99
+ * @throws {@link ThrottlingException} (client fault)
100
+ * <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
101
+ * troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
102
+ *
103
+ * @throws {@link ValidationException} (client fault)
104
+ * <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
105
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
106
+ *
107
+ * @throws {@link BedrockRuntimeServiceException}
108
+ * <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
109
+ *
110
+ * @public
111
+ */
112
+ export declare class StartAsyncInvokeCommand extends StartAsyncInvokeCommand_base {
113
+ /** @internal type navigation helper, not in runtime. */
114
+ protected static __types: {
115
+ api: {
116
+ input: StartAsyncInvokeRequest;
117
+ output: StartAsyncInvokeResponse;
118
+ };
119
+ sdk: {
120
+ input: StartAsyncInvokeCommandInput;
121
+ output: StartAsyncInvokeCommandOutput;
122
+ };
123
+ };
124
+ }
@@ -1,5 +1,8 @@
1
1
  export * from "./ApplyGuardrailCommand";
2
2
  export * from "./ConverseCommand";
3
3
  export * from "./ConverseStreamCommand";
4
+ export * from "./GetAsyncInvokeCommand";
4
5
  export * from "./InvokeModelCommand";
5
6
  export * from "./InvokeModelWithResponseStreamCommand";
7
+ export * from "./ListAsyncInvokesCommand";
8
+ export * from "./StartAsyncInvokeCommand";
@@ -9,5 +9,6 @@ export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters";
9
9
  export type { RuntimeExtension } from "./runtimeExtensions";
10
10
  export type { BedrockRuntimeExtensionConfiguration } from "./extensionConfiguration";
11
11
  export * from "./commands";
12
+ export * from "./pagination";
12
13
  export * from "./models";
13
14
  export { BedrockRuntimeServiceException } from "./models/BedrockRuntimeServiceException";