@aws-sdk/client-bedrock-runtime 3.699.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.
- package/README.md +31 -7
- package/dist-cjs/index.js +484 -116
- package/dist-es/BedrockRuntime.js +6 -0
- package/dist-es/commands/GetAsyncInvokeCommand.js +23 -0
- package/dist-es/commands/ListAsyncInvokesCommand.js +23 -0
- package/dist-es/commands/StartAsyncInvokeCommand.js +23 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/index.js +1 -0
- package/dist-es/models/models_0.js +156 -72
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListAsyncInvokesPaginator.js +4 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +200 -2
- package/dist-types/BedrockRuntime.d.ts +22 -0
- package/dist-types/BedrockRuntimeClient.d.ts +5 -2
- package/dist-types/commands/ApplyGuardrailCommand.d.ts +12 -5
- package/dist-types/commands/ConverseCommand.d.ts +73 -9
- package/dist-types/commands/ConverseStreamCommand.d.ts +53 -9
- package/dist-types/commands/GetAsyncInvokeCommand.d.ts +101 -0
- package/dist-types/commands/InvokeModelCommand.d.ts +26 -9
- package/dist-types/commands/InvokeModelWithResponseStreamCommand.d.ts +26 -9
- package/dist-types/commands/ListAsyncInvokesCommand.d.ts +112 -0
- package/dist-types/commands/StartAsyncInvokeCommand.d.ts +124 -0
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +652 -97
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListAsyncInvokesPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +27 -0
- package/dist-types/ts3.4/BedrockRuntime.d.ts +52 -0
- package/dist-types/ts3.4/BedrockRuntimeClient.d.ts +20 -2
- package/dist-types/ts3.4/commands/GetAsyncInvokeCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/ListAsyncInvokesCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/StartAsyncInvokeCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +254 -42
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListAsyncInvokesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +36 -0
- package/package.json +4 -2
|
@@ -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";
|
package/dist-types/index.d.ts
CHANGED
|
@@ -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";
|