Creates a new invocation within a session. An invocation groups the related invocation steps that store the content from + * a conversation. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
+ *Related APIs
+ *+ * ListInvocations + *
+ *+ * ListSessions + *
+ *+ * GetSession + *
+ *The request is denied because of missing access permissions. Check your permissions and retry your request.
+ * + * @throws {@link ConflictException} (client fault) + *There was a conflict performing an operation. Resolve the conflict and retry your request.
+ * + * @throws {@link InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *The number of requests exceeds the service quota. Resubmit your request later.
+ * + * @throws {@link ThrottlingException} (client fault) + *The number of requests exceeds the limit. Resubmit your request later.
+ * + * @throws {@link ValidationException} (client fault) + *Input validation failed. Check your request parameters and retry the request.
+ * + * @throws {@link BedrockAgentRuntimeServiceException} + *Base exception class for all service exceptions from BedrockAgentRuntime service.
+ * + * @public + */ +export class CreateInvocationCommand extends $Command + .classBuilder< + CreateInvocationCommandInput, + CreateInvocationCommandOutput, + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BedrockAgentRuntimeClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonBedrockAgentRunTimeService", "CreateInvocation", {}) + .n("BedrockAgentRuntimeClient", "CreateInvocationCommand") + .f(void 0, void 0) + .ser(se_CreateInvocationCommand) + .de(de_CreateInvocationCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: CreateInvocationRequest; + output: CreateInvocationResponse; + }; + sdk: { + input: CreateInvocationCommandInput; + output: CreateInvocationCommandOutput; + }; + }; +} diff --git a/clients/client-bedrock-agent-runtime/src/commands/CreateSessionCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/CreateSessionCommand.ts new file mode 100644 index 0000000000000..267fd910bf867 --- /dev/null +++ b/clients/client-bedrock-agent-runtime/src/commands/CreateSessionCommand.ts @@ -0,0 +1,158 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../BedrockAgentRuntimeClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { CreateSessionRequest, CreateSessionResponse } from "../models/models_0"; +import { de_CreateSessionCommand, se_CreateSessionCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link CreateSessionCommand}. + */ +export interface CreateSessionCommandInput extends CreateSessionRequest {} +/** + * @public + * + * The output of {@link CreateSessionCommand}. + */ +export interface CreateSessionCommandOutput extends CreateSessionResponse, __MetadataBearer {} + +/** + *Creates a session to temporarily store conversations for generative AI (GenAI) applications built with open-source + * frameworks such as LangGraph and LlamaIndex. Sessions enable you to save the state of + * conversations at checkpoints, with the added security and infrastructure of Amazon Web Services. For more information, see + * Store and retrieve conversation history and context with Amazon Bedrock sessions.
+ *By default, Amazon Bedrock uses Amazon Web Services-managed keys for session encryption, including session metadata, + * or you can use your own KMS key. For more information, see Amazon Bedrock session encryption.
+ *+ * You use a session to store state and conversation history for generative AI applications built with open-source frameworks. + * For Amazon Bedrock Agents, the service automatically manages conversation context and associates them with the agent-specific sessionId you specify in the + * InvokeAgent API operation. + *
+ *Related APIs:
+ *+ * ListSessions + *
+ *+ * GetSession + *
+ *+ * EndSession + *
+ *+ * DeleteSession + *
+ *The request is denied because of missing access permissions. Check your permissions and retry your request.
+ * + * @throws {@link ConflictException} (client fault) + *There was a conflict performing an operation. Resolve the conflict and retry your request.
+ * + * @throws {@link InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *The number of requests exceeds the service quota. Resubmit your request later.
+ * + * @throws {@link ThrottlingException} (client fault) + *The number of requests exceeds the limit. Resubmit your request later.
+ * + * @throws {@link ValidationException} (client fault) + *Input validation failed. Check your request parameters and retry the request.
+ * + * @throws {@link BedrockAgentRuntimeServiceException} + *Base exception class for all service exceptions from BedrockAgentRuntime service.
+ * + * @public + */ +export class CreateSessionCommand extends $Command + .classBuilder< + CreateSessionCommandInput, + CreateSessionCommandOutput, + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BedrockAgentRuntimeClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonBedrockAgentRunTimeService", "CreateSession", {}) + .n("BedrockAgentRuntimeClient", "CreateSessionCommand") + .f(void 0, void 0) + .ser(se_CreateSessionCommand) + .de(de_CreateSessionCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: CreateSessionRequest; + output: CreateSessionResponse; + }; + sdk: { + input: CreateSessionCommandInput; + output: CreateSessionCommandOutput; + }; + }; +} diff --git a/clients/client-bedrock-agent-runtime/src/commands/DeleteSessionCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/DeleteSessionCommand.ts new file mode 100644 index 0000000000000..d72bd2c7d75a7 --- /dev/null +++ b/clients/client-bedrock-agent-runtime/src/commands/DeleteSessionCommand.ts @@ -0,0 +1,114 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../BedrockAgentRuntimeClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteSessionRequest, DeleteSessionResponse } from "../models/models_0"; +import { de_DeleteSessionCommand, se_DeleteSessionCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteSessionCommand}. + */ +export interface DeleteSessionCommandInput extends DeleteSessionRequest {} +/** + * @public + * + * The output of {@link DeleteSessionCommand}. + */ +export interface DeleteSessionCommandOutput extends DeleteSessionResponse, __MetadataBearer {} + +/** + *Deletes a session that you ended. You can't delete a session with an ACTIVE
status. To delete an active session, you must first end it with the
+ * EndSession API operation.
+ * For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
The request is denied because of missing access permissions. Check your permissions and retry your request.
+ * + * @throws {@link ConflictException} (client fault) + *There was a conflict performing an operation. Resolve the conflict and retry your request.
+ * + * @throws {@link InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
+ * + * @throws {@link ThrottlingException} (client fault) + *The number of requests exceeds the limit. Resubmit your request later.
+ * + * @throws {@link ValidationException} (client fault) + *Input validation failed. Check your request parameters and retry the request.
+ * + * @throws {@link BedrockAgentRuntimeServiceException} + *Base exception class for all service exceptions from BedrockAgentRuntime service.
+ * + * @public + */ +export class DeleteSessionCommand extends $Command + .classBuilder< + DeleteSessionCommandInput, + DeleteSessionCommandOutput, + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BedrockAgentRuntimeClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonBedrockAgentRunTimeService", "DeleteSession", {}) + .n("BedrockAgentRuntimeClient", "DeleteSessionCommand") + .f(void 0, void 0) + .ser(se_DeleteSessionCommand) + .de(de_DeleteSessionCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DeleteSessionRequest; + output: {}; + }; + sdk: { + input: DeleteSessionCommandInput; + output: DeleteSessionCommandOutput; + }; + }; +} diff --git a/clients/client-bedrock-agent-runtime/src/commands/EndSessionCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/EndSessionCommand.ts new file mode 100644 index 0000000000000..28f267c7bb6b2 --- /dev/null +++ b/clients/client-bedrock-agent-runtime/src/commands/EndSessionCommand.ts @@ -0,0 +1,118 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../BedrockAgentRuntimeClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { EndSessionRequest, EndSessionResponse } from "../models/models_0"; +import { de_EndSessionCommand, se_EndSessionCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link EndSessionCommand}. + */ +export interface EndSessionCommandInput extends EndSessionRequest {} +/** + * @public + * + * The output of {@link EndSessionCommand}. + */ +export interface EndSessionCommandOutput extends EndSessionResponse, __MetadataBearer {} + +/** + *Ends the session. + * After you end a session, you can still access its content but you can’t add to it. To delete the session and it's content, you use the DeleteSession API operation. + * For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockAgentRuntimeClient, EndSessionCommand } from "@aws-sdk/client-bedrock-agent-runtime"; // ES Modules import + * // const { BedrockAgentRuntimeClient, EndSessionCommand } = require("@aws-sdk/client-bedrock-agent-runtime"); // CommonJS import + * const client = new BedrockAgentRuntimeClient(config); + * const input = { // EndSessionRequest + * sessionIdentifier: "STRING_VALUE", // required + * }; + * const command = new EndSessionCommand(input); + * const response = await client.send(command); + * // { // EndSessionResponse + * // sessionId: "STRING_VALUE", // required + * // sessionArn: "STRING_VALUE", // required + * // sessionStatus: "ACTIVE" || "EXPIRED" || "ENDED", // required + * // }; + * + * ``` + * + * @param EndSessionCommandInput - {@link EndSessionCommandInput} + * @returns {@link EndSessionCommandOutput} + * @see {@link EndSessionCommandInput} for command's `input` shape. + * @see {@link EndSessionCommandOutput} for command's `response` shape. + * @see {@link BedrockAgentRuntimeClientResolvedConfig | config} for BedrockAgentRuntimeClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *The request is denied because of missing access permissions. Check your permissions and retry your request.
+ * + * @throws {@link ConflictException} (client fault) + *There was a conflict performing an operation. Resolve the conflict and retry your request.
+ * + * @throws {@link InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
+ * + * @throws {@link ThrottlingException} (client fault) + *The number of requests exceeds the limit. Resubmit your request later.
+ * + * @throws {@link ValidationException} (client fault) + *Input validation failed. Check your request parameters and retry the request.
+ * + * @throws {@link BedrockAgentRuntimeServiceException} + *Base exception class for all service exceptions from BedrockAgentRuntime service.
+ * + * @public + */ +export class EndSessionCommand extends $Command + .classBuilder< + EndSessionCommandInput, + EndSessionCommandOutput, + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BedrockAgentRuntimeClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonBedrockAgentRunTimeService", "EndSession", {}) + .n("BedrockAgentRuntimeClient", "EndSessionCommand") + .f(void 0, void 0) + .ser(se_EndSessionCommand) + .de(de_EndSessionCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: EndSessionRequest; + output: EndSessionResponse; + }; + sdk: { + input: EndSessionCommandInput; + output: EndSessionCommandOutput; + }; + }; +} diff --git a/clients/client-bedrock-agent-runtime/src/commands/GetInvocationStepCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/GetInvocationStepCommand.ts new file mode 100644 index 0000000000000..3396e24e10300 --- /dev/null +++ b/clients/client-bedrock-agent-runtime/src/commands/GetInvocationStepCommand.ts @@ -0,0 +1,138 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../BedrockAgentRuntimeClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { + GetInvocationStepRequest, + GetInvocationStepResponse, + GetInvocationStepResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_GetInvocationStepCommand, se_GetInvocationStepCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetInvocationStepCommand}. + */ +export interface GetInvocationStepCommandInput extends GetInvocationStepRequest {} +/** + * @public + * + * The output of {@link GetInvocationStepCommand}. + */ +export interface GetInvocationStepCommandOutput extends GetInvocationStepResponse, __MetadataBearer {} + +/** + *Retrieves the details of a specific invocation step within an invocation in a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockAgentRuntimeClient, GetInvocationStepCommand } from "@aws-sdk/client-bedrock-agent-runtime"; // ES Modules import + * // const { BedrockAgentRuntimeClient, GetInvocationStepCommand } = require("@aws-sdk/client-bedrock-agent-runtime"); // CommonJS import + * const client = new BedrockAgentRuntimeClient(config); + * const input = { // GetInvocationStepRequest + * invocationIdentifier: "STRING_VALUE", // required + * invocationStepId: "STRING_VALUE", // required + * sessionIdentifier: "STRING_VALUE", // required + * }; + * const command = new GetInvocationStepCommand(input); + * const response = await client.send(command); + * // { // GetInvocationStepResponse + * // invocationStep: { // InvocationStep + * // sessionId: "STRING_VALUE", // required + * // invocationId: "STRING_VALUE", // required + * // invocationStepId: "STRING_VALUE", // required + * // invocationStepTime: new Date("TIMESTAMP"), // required + * // payload: { // InvocationStepPayload Union: only one key present + * // contentBlocks: [ // BedrockSessionContentBlocks + * // { // BedrockSessionContentBlock Union: only one key present + * // text: "STRING_VALUE", + * // image: { // ImageBlock + * // format: "png" || "jpeg" || "gif" || "webp", // required + * // source: { // ImageSource Union: only one key present + * // bytes: new Uint8Array(), + * // s3Location: { // S3Location + * // uri: "STRING_VALUE", // required + * // }, + * // }, + * // }, + * // }, + * // ], + * // }, + * // }, + * // }; + * + * ``` + * + * @param GetInvocationStepCommandInput - {@link GetInvocationStepCommandInput} + * @returns {@link GetInvocationStepCommandOutput} + * @see {@link GetInvocationStepCommandInput} for command's `input` shape. + * @see {@link GetInvocationStepCommandOutput} for command's `response` shape. + * @see {@link BedrockAgentRuntimeClientResolvedConfig | config} for BedrockAgentRuntimeClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *The request is denied because of missing access permissions. Check your permissions and retry your request.
+ * + * @throws {@link InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
+ * + * @throws {@link ThrottlingException} (client fault) + *The number of requests exceeds the limit. Resubmit your request later.
+ * + * @throws {@link ValidationException} (client fault) + *Input validation failed. Check your request parameters and retry the request.
+ * + * @throws {@link BedrockAgentRuntimeServiceException} + *Base exception class for all service exceptions from BedrockAgentRuntime service.
+ * + * @public + */ +export class GetInvocationStepCommand extends $Command + .classBuilder< + GetInvocationStepCommandInput, + GetInvocationStepCommandOutput, + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BedrockAgentRuntimeClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonBedrockAgentRunTimeService", "GetInvocationStep", {}) + .n("BedrockAgentRuntimeClient", "GetInvocationStepCommand") + .f(void 0, GetInvocationStepResponseFilterSensitiveLog) + .ser(se_GetInvocationStepCommand) + .de(de_GetInvocationStepCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetInvocationStepRequest; + output: GetInvocationStepResponse; + }; + sdk: { + input: GetInvocationStepCommandInput; + output: GetInvocationStepCommandOutput; + }; + }; +} diff --git a/clients/client-bedrock-agent-runtime/src/commands/GetSessionCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/GetSessionCommand.ts new file mode 100644 index 0000000000000..3646b49f99129 --- /dev/null +++ b/clients/client-bedrock-agent-runtime/src/commands/GetSessionCommand.ts @@ -0,0 +1,119 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../BedrockAgentRuntimeClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetSessionRequest, GetSessionResponse } from "../models/models_0"; +import { de_GetSessionCommand, se_GetSessionCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetSessionCommand}. + */ +export interface GetSessionCommandInput extends GetSessionRequest {} +/** + * @public + * + * The output of {@link GetSessionCommand}. + */ +export interface GetSessionCommandOutput extends GetSessionResponse, __MetadataBearer {} + +/** + *Retrieves details about a specific session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockAgentRuntimeClient, GetSessionCommand } from "@aws-sdk/client-bedrock-agent-runtime"; // ES Modules import + * // const { BedrockAgentRuntimeClient, GetSessionCommand } = require("@aws-sdk/client-bedrock-agent-runtime"); // CommonJS import + * const client = new BedrockAgentRuntimeClient(config); + * const input = { // GetSessionRequest + * sessionIdentifier: "STRING_VALUE", // required + * }; + * const command = new GetSessionCommand(input); + * const response = await client.send(command); + * // { // GetSessionResponse + * // sessionId: "STRING_VALUE", // required + * // sessionArn: "STRING_VALUE", // required + * // sessionStatus: "ACTIVE" || "EXPIRED" || "ENDED", // required + * // createdAt: new Date("TIMESTAMP"), // required + * // lastUpdatedAt: new Date("TIMESTAMP"), // required + * // sessionMetadata: { // SessionMetadataMap + * // "The request is denied because of missing access permissions. Check your permissions and retry your request.
+ * + * @throws {@link InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
+ * + * @throws {@link ThrottlingException} (client fault) + *The number of requests exceeds the limit. Resubmit your request later.
+ * + * @throws {@link ValidationException} (client fault) + *Input validation failed. Check your request parameters and retry the request.
+ * + * @throws {@link BedrockAgentRuntimeServiceException} + *Base exception class for all service exceptions from BedrockAgentRuntime service.
+ * + * @public + */ +export class GetSessionCommand extends $Command + .classBuilder< + GetSessionCommandInput, + GetSessionCommandOutput, + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BedrockAgentRuntimeClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonBedrockAgentRunTimeService", "GetSession", {}) + .n("BedrockAgentRuntimeClient", "GetSessionCommand") + .f(void 0, void 0) + .ser(se_GetSessionCommand) + .de(de_GetSessionCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetSessionRequest; + output: GetSessionResponse; + }; + sdk: { + input: GetSessionCommandInput; + output: GetSessionCommandOutput; + }; + }; +} diff --git a/clients/client-bedrock-agent-runtime/src/commands/InvokeAgentCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/InvokeAgentCommand.ts index fe9ba1b173a46..cb8b9cf58fa37 100644 --- a/clients/client-bedrock-agent-runtime/src/commands/InvokeAgentCommand.ts +++ b/clients/client-bedrock-agent-runtime/src/commands/InvokeAgentCommand.ts @@ -10,12 +10,8 @@ import { ServiceOutputTypes, } from "../BedrockAgentRuntimeClient"; import { commonParams } from "../endpoint/EndpointParameters"; -import { - InvokeAgentRequest, - InvokeAgentRequestFilterSensitiveLog, - InvokeAgentResponse, - InvokeAgentResponseFilterSensitiveLog, -} from "../models/models_0"; +import { InvokeAgentResponse, InvokeAgentResponseFilterSensitiveLog } from "../models/models_0"; +import { InvokeAgentRequest, InvokeAgentRequestFilterSensitiveLog } from "../models/models_1"; import { de_InvokeAgentCommand, se_InvokeAgentCommand } from "../protocols/Aws_restJson1"; /** diff --git a/clients/client-bedrock-agent-runtime/src/commands/InvokeInlineAgentCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/InvokeInlineAgentCommand.ts index aebe68fe6164f..eaa3936063aa2 100644 --- a/clients/client-bedrock-agent-runtime/src/commands/InvokeInlineAgentCommand.ts +++ b/clients/client-bedrock-agent-runtime/src/commands/InvokeInlineAgentCommand.ts @@ -10,12 +10,8 @@ import { ServiceOutputTypes, } from "../BedrockAgentRuntimeClient"; import { commonParams } from "../endpoint/EndpointParameters"; -import { - InvokeInlineAgentRequest, - InvokeInlineAgentRequestFilterSensitiveLog, - InvokeInlineAgentResponse, - InvokeInlineAgentResponseFilterSensitiveLog, -} from "../models/models_0"; +import { InvokeInlineAgentResponse, InvokeInlineAgentResponseFilterSensitiveLog } from "../models/models_0"; +import { InvokeInlineAgentRequest, InvokeInlineAgentRequestFilterSensitiveLog } from "../models/models_1"; import { de_InvokeInlineAgentCommand, se_InvokeInlineAgentCommand } from "../protocols/Aws_restJson1"; /** diff --git a/clients/client-bedrock-agent-runtime/src/commands/ListInvocationStepsCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/ListInvocationStepsCommand.ts new file mode 100644 index 0000000000000..59ee687996207 --- /dev/null +++ b/clients/client-bedrock-agent-runtime/src/commands/ListInvocationStepsCommand.ts @@ -0,0 +1,122 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../BedrockAgentRuntimeClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListInvocationStepsRequest, ListInvocationStepsResponse } from "../models/models_0"; +import { de_ListInvocationStepsCommand, se_ListInvocationStepsCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListInvocationStepsCommand}. + */ +export interface ListInvocationStepsCommandInput extends ListInvocationStepsRequest {} +/** + * @public + * + * The output of {@link ListInvocationStepsCommand}. + */ +export interface ListInvocationStepsCommandOutput extends ListInvocationStepsResponse, __MetadataBearer {} + +/** + *Lists all invocation steps associated with a session and optionally, an invocation within the session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockAgentRuntimeClient, ListInvocationStepsCommand } from "@aws-sdk/client-bedrock-agent-runtime"; // ES Modules import + * // const { BedrockAgentRuntimeClient, ListInvocationStepsCommand } = require("@aws-sdk/client-bedrock-agent-runtime"); // CommonJS import + * const client = new BedrockAgentRuntimeClient(config); + * const input = { // ListInvocationStepsRequest + * invocationIdentifier: "STRING_VALUE", + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * sessionIdentifier: "STRING_VALUE", // required + * }; + * const command = new ListInvocationStepsCommand(input); + * const response = await client.send(command); + * // { // ListInvocationStepsResponse + * // invocationStepSummaries: [ // InvocationStepSummaries // required + * // { // InvocationStepSummary + * // sessionId: "STRING_VALUE", // required + * // invocationId: "STRING_VALUE", // required + * // invocationStepId: "STRING_VALUE", // required + * // invocationStepTime: new Date("TIMESTAMP"), // required + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListInvocationStepsCommandInput - {@link ListInvocationStepsCommandInput} + * @returns {@link ListInvocationStepsCommandOutput} + * @see {@link ListInvocationStepsCommandInput} for command's `input` shape. + * @see {@link ListInvocationStepsCommandOutput} for command's `response` shape. + * @see {@link BedrockAgentRuntimeClientResolvedConfig | config} for BedrockAgentRuntimeClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *The request is denied because of missing access permissions. Check your permissions and retry your request.
+ * + * @throws {@link InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
+ * + * @throws {@link ThrottlingException} (client fault) + *The number of requests exceeds the limit. Resubmit your request later.
+ * + * @throws {@link ValidationException} (client fault) + *Input validation failed. Check your request parameters and retry the request.
+ * + * @throws {@link BedrockAgentRuntimeServiceException} + *Base exception class for all service exceptions from BedrockAgentRuntime service.
+ * + * @public + */ +export class ListInvocationStepsCommand extends $Command + .classBuilder< + ListInvocationStepsCommandInput, + ListInvocationStepsCommandOutput, + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BedrockAgentRuntimeClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonBedrockAgentRunTimeService", "ListInvocationSteps", {}) + .n("BedrockAgentRuntimeClient", "ListInvocationStepsCommand") + .f(void 0, void 0) + .ser(se_ListInvocationStepsCommand) + .de(de_ListInvocationStepsCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListInvocationStepsRequest; + output: ListInvocationStepsResponse; + }; + sdk: { + input: ListInvocationStepsCommandInput; + output: ListInvocationStepsCommandOutput; + }; + }; +} diff --git a/clients/client-bedrock-agent-runtime/src/commands/ListInvocationsCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/ListInvocationsCommand.ts new file mode 100644 index 0000000000000..f1d4c11d8d4dd --- /dev/null +++ b/clients/client-bedrock-agent-runtime/src/commands/ListInvocationsCommand.ts @@ -0,0 +1,120 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../BedrockAgentRuntimeClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListInvocationsRequest, ListInvocationsResponse } from "../models/models_0"; +import { de_ListInvocationsCommand, se_ListInvocationsCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListInvocationsCommand}. + */ +export interface ListInvocationsCommandInput extends ListInvocationsRequest {} +/** + * @public + * + * The output of {@link ListInvocationsCommand}. + */ +export interface ListInvocationsCommandOutput extends ListInvocationsResponse, __MetadataBearer {} + +/** + *Lists all invocations associated with a specific session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockAgentRuntimeClient, ListInvocationsCommand } from "@aws-sdk/client-bedrock-agent-runtime"; // ES Modules import + * // const { BedrockAgentRuntimeClient, ListInvocationsCommand } = require("@aws-sdk/client-bedrock-agent-runtime"); // CommonJS import + * const client = new BedrockAgentRuntimeClient(config); + * const input = { // ListInvocationsRequest + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * sessionIdentifier: "STRING_VALUE", // required + * }; + * const command = new ListInvocationsCommand(input); + * const response = await client.send(command); + * // { // ListInvocationsResponse + * // invocationSummaries: [ // InvocationSummaries // required + * // { // InvocationSummary + * // sessionId: "STRING_VALUE", // required + * // invocationId: "STRING_VALUE", // required + * // createdAt: new Date("TIMESTAMP"), // required + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListInvocationsCommandInput - {@link ListInvocationsCommandInput} + * @returns {@link ListInvocationsCommandOutput} + * @see {@link ListInvocationsCommandInput} for command's `input` shape. + * @see {@link ListInvocationsCommandOutput} for command's `response` shape. + * @see {@link BedrockAgentRuntimeClientResolvedConfig | config} for BedrockAgentRuntimeClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *The request is denied because of missing access permissions. Check your permissions and retry your request.
+ * + * @throws {@link InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
+ * + * @throws {@link ThrottlingException} (client fault) + *The number of requests exceeds the limit. Resubmit your request later.
+ * + * @throws {@link ValidationException} (client fault) + *Input validation failed. Check your request parameters and retry the request.
+ * + * @throws {@link BedrockAgentRuntimeServiceException} + *Base exception class for all service exceptions from BedrockAgentRuntime service.
+ * + * @public + */ +export class ListInvocationsCommand extends $Command + .classBuilder< + ListInvocationsCommandInput, + ListInvocationsCommandOutput, + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BedrockAgentRuntimeClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonBedrockAgentRunTimeService", "ListInvocations", {}) + .n("BedrockAgentRuntimeClient", "ListInvocationsCommand") + .f(void 0, void 0) + .ser(se_ListInvocationsCommand) + .de(de_ListInvocationsCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListInvocationsRequest; + output: ListInvocationsResponse; + }; + sdk: { + input: ListInvocationsCommandInput; + output: ListInvocationsCommandOutput; + }; + }; +} diff --git a/clients/client-bedrock-agent-runtime/src/commands/ListSessionsCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/ListSessionsCommand.ts new file mode 100644 index 0000000000000..4e0142762ecaa --- /dev/null +++ b/clients/client-bedrock-agent-runtime/src/commands/ListSessionsCommand.ts @@ -0,0 +1,118 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../BedrockAgentRuntimeClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListSessionsRequest, ListSessionsResponse } from "../models/models_0"; +import { de_ListSessionsCommand, se_ListSessionsCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListSessionsCommand}. + */ +export interface ListSessionsCommandInput extends ListSessionsRequest {} +/** + * @public + * + * The output of {@link ListSessionsCommand}. + */ +export interface ListSessionsCommandOutput extends ListSessionsResponse, __MetadataBearer {} + +/** + *Lists all sessions in your Amazon Web Services account. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockAgentRuntimeClient, ListSessionsCommand } from "@aws-sdk/client-bedrock-agent-runtime"; // ES Modules import + * // const { BedrockAgentRuntimeClient, ListSessionsCommand } = require("@aws-sdk/client-bedrock-agent-runtime"); // CommonJS import + * const client = new BedrockAgentRuntimeClient(config); + * const input = { // ListSessionsRequest + * maxResults: Number("int"), + * nextToken: "STRING_VALUE", + * }; + * const command = new ListSessionsCommand(input); + * const response = await client.send(command); + * // { // ListSessionsResponse + * // sessionSummaries: [ // SessionSummaries // required + * // { // SessionSummary + * // sessionId: "STRING_VALUE", // required + * // sessionArn: "STRING_VALUE", // required + * // sessionStatus: "ACTIVE" || "EXPIRED" || "ENDED", // required + * // createdAt: new Date("TIMESTAMP"), // required + * // lastUpdatedAt: new Date("TIMESTAMP"), // required + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListSessionsCommandInput - {@link ListSessionsCommandInput} + * @returns {@link ListSessionsCommandOutput} + * @see {@link ListSessionsCommandInput} for command's `input` shape. + * @see {@link ListSessionsCommandOutput} for command's `response` shape. + * @see {@link BedrockAgentRuntimeClientResolvedConfig | config} for BedrockAgentRuntimeClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *The request is denied because of missing access permissions. Check your permissions and retry your request.
+ * + * @throws {@link InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ThrottlingException} (client fault) + *The number of requests exceeds the limit. Resubmit your request later.
+ * + * @throws {@link ValidationException} (client fault) + *Input validation failed. Check your request parameters and retry the request.
+ * + * @throws {@link BedrockAgentRuntimeServiceException} + *Base exception class for all service exceptions from BedrockAgentRuntime service.
+ * + * @public + */ +export class ListSessionsCommand extends $Command + .classBuilder< + ListSessionsCommandInput, + ListSessionsCommandOutput, + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BedrockAgentRuntimeClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonBedrockAgentRunTimeService", "ListSessions", {}) + .n("BedrockAgentRuntimeClient", "ListSessionsCommand") + .f(void 0, void 0) + .ser(se_ListSessionsCommand) + .de(de_ListSessionsCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListSessionsRequest; + output: ListSessionsResponse; + }; + sdk: { + input: ListSessionsCommandInput; + output: ListSessionsCommandOutput; + }; + }; +} diff --git a/clients/client-bedrock-agent-runtime/src/commands/ListTagsForResourceCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/ListTagsForResourceCommand.ts new file mode 100644 index 0000000000000..7b4c82e7fbc57 --- /dev/null +++ b/clients/client-bedrock-agent-runtime/src/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,113 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../BedrockAgentRuntimeClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListTagsForResourceRequest, ListTagsForResourceResponse } from "../models/models_0"; +import { de_ListTagsForResourceCommand, se_ListTagsForResourceCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandInput extends ListTagsForResourceRequest {} +/** + * @public + * + * The output of {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResponse, __MetadataBearer {} + +/** + *List all the tags for the resource you specify.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockAgentRuntimeClient, ListTagsForResourceCommand } from "@aws-sdk/client-bedrock-agent-runtime"; // ES Modules import + * // const { BedrockAgentRuntimeClient, ListTagsForResourceCommand } = require("@aws-sdk/client-bedrock-agent-runtime"); // CommonJS import + * const client = new BedrockAgentRuntimeClient(config); + * const input = { // ListTagsForResourceRequest + * resourceArn: "STRING_VALUE", // required + * }; + * const command = new ListTagsForResourceCommand(input); + * const response = await client.send(command); + * // { // ListTagsForResourceResponse + * // tags: { // TagsMap + * // "The request is denied because of missing access permissions. Check your permissions and retry your request.
+ * + * @throws {@link InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
+ * + * @throws {@link ThrottlingException} (client fault) + *The number of requests exceeds the limit. Resubmit your request later.
+ * + * @throws {@link ValidationException} (client fault) + *Input validation failed. Check your request parameters and retry the request.
+ * + * @throws {@link BedrockAgentRuntimeServiceException} + *Base exception class for all service exceptions from BedrockAgentRuntime service.
+ * + * @public + */ +export class ListTagsForResourceCommand extends $Command + .classBuilder< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BedrockAgentRuntimeClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonBedrockAgentRunTimeService", "ListTagsForResource", {}) + .n("BedrockAgentRuntimeClient", "ListTagsForResourceCommand") + .f(void 0, void 0) + .ser(se_ListTagsForResourceCommand) + .de(de_ListTagsForResourceCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListTagsForResourceRequest; + output: ListTagsForResourceResponse; + }; + sdk: { + input: ListTagsForResourceCommandInput; + output: ListTagsForResourceCommandOutput; + }; + }; +} diff --git a/clients/client-bedrock-agent-runtime/src/commands/PutInvocationStepCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/PutInvocationStepCommand.ts new file mode 100644 index 0000000000000..601bbf01cda37 --- /dev/null +++ b/clients/client-bedrock-agent-runtime/src/commands/PutInvocationStepCommand.ts @@ -0,0 +1,163 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../BedrockAgentRuntimeClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { + PutInvocationStepRequest, + PutInvocationStepRequestFilterSensitiveLog, + PutInvocationStepResponse, +} from "../models/models_0"; +import { de_PutInvocationStepCommand, se_PutInvocationStepCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link PutInvocationStepCommand}. + */ +export interface PutInvocationStepCommandInput extends PutInvocationStepRequest {} +/** + * @public + * + * The output of {@link PutInvocationStepCommand}. + */ +export interface PutInvocationStepCommandOutput extends PutInvocationStepResponse, __MetadataBearer {} + +/** + *Add an invocation step to an invocation in a session. An invocation step stores fine-grained state checkpoints, including text and images, for each interaction. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
+ *Related APIs:
+ *+ * GetInvocationStep + *
+ *+ * ListInvocationSteps + *
+ *+ * ListInvocations + *
+ *+ * ListSessions + *
+ *The request is denied because of missing access permissions. Check your permissions and retry your request.
+ * + * @throws {@link ConflictException} (client fault) + *There was a conflict performing an operation. Resolve the conflict and retry your request.
+ * + * @throws {@link InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *The number of requests exceeds the service quota. Resubmit your request later.
+ * + * @throws {@link ThrottlingException} (client fault) + *The number of requests exceeds the limit. Resubmit your request later.
+ * + * @throws {@link ValidationException} (client fault) + *Input validation failed. Check your request parameters and retry the request.
+ * + * @throws {@link BedrockAgentRuntimeServiceException} + *Base exception class for all service exceptions from BedrockAgentRuntime service.
+ * + * @public + */ +export class PutInvocationStepCommand extends $Command + .classBuilder< + PutInvocationStepCommandInput, + PutInvocationStepCommandOutput, + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BedrockAgentRuntimeClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonBedrockAgentRunTimeService", "PutInvocationStep", {}) + .n("BedrockAgentRuntimeClient", "PutInvocationStepCommand") + .f(PutInvocationStepRequestFilterSensitiveLog, void 0) + .ser(se_PutInvocationStepCommand) + .de(de_PutInvocationStepCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: PutInvocationStepRequest; + output: PutInvocationStepResponse; + }; + sdk: { + input: PutInvocationStepCommandInput; + output: PutInvocationStepCommandOutput; + }; + }; +} diff --git a/clients/client-bedrock-agent-runtime/src/commands/RetrieveAndGenerateCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/RetrieveAndGenerateCommand.ts index 1a083f1dda7da..833734bff5b37 100644 --- a/clients/client-bedrock-agent-runtime/src/commands/RetrieveAndGenerateCommand.ts +++ b/clients/client-bedrock-agent-runtime/src/commands/RetrieveAndGenerateCommand.ts @@ -10,12 +10,8 @@ import { ServiceOutputTypes, } from "../BedrockAgentRuntimeClient"; import { commonParams } from "../endpoint/EndpointParameters"; -import { - RetrieveAndGenerateRequest, - RetrieveAndGenerateRequestFilterSensitiveLog, - RetrieveAndGenerateResponse, - RetrieveAndGenerateResponseFilterSensitiveLog, -} from "../models/models_0"; +import { RetrieveAndGenerateResponse, RetrieveAndGenerateResponseFilterSensitiveLog } from "../models/models_0"; +import { RetrieveAndGenerateRequest, RetrieveAndGenerateRequestFilterSensitiveLog } from "../models/models_1"; import { de_RetrieveAndGenerateCommand, se_RetrieveAndGenerateCommand } from "../protocols/Aws_restJson1"; /** diff --git a/clients/client-bedrock-agent-runtime/src/commands/RetrieveAndGenerateStreamCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/RetrieveAndGenerateStreamCommand.ts index 59e47860afb83..2cec6a6da4cfd 100644 --- a/clients/client-bedrock-agent-runtime/src/commands/RetrieveAndGenerateStreamCommand.ts +++ b/clients/client-bedrock-agent-runtime/src/commands/RetrieveAndGenerateStreamCommand.ts @@ -11,11 +11,13 @@ import { } from "../BedrockAgentRuntimeClient"; import { commonParams } from "../endpoint/EndpointParameters"; import { - RetrieveAndGenerateStreamRequest, - RetrieveAndGenerateStreamRequestFilterSensitiveLog, RetrieveAndGenerateStreamResponse, RetrieveAndGenerateStreamResponseFilterSensitiveLog, } from "../models/models_0"; +import { + RetrieveAndGenerateStreamRequest, + RetrieveAndGenerateStreamRequestFilterSensitiveLog, +} from "../models/models_1"; import { de_RetrieveAndGenerateStreamCommand, se_RetrieveAndGenerateStreamCommand } from "../protocols/Aws_restJson1"; /** diff --git a/clients/client-bedrock-agent-runtime/src/commands/RetrieveCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/RetrieveCommand.ts index e5e3f63e6d8de..e3754bdfd8df5 100644 --- a/clients/client-bedrock-agent-runtime/src/commands/RetrieveCommand.ts +++ b/clients/client-bedrock-agent-runtime/src/commands/RetrieveCommand.ts @@ -10,12 +10,8 @@ import { ServiceOutputTypes, } from "../BedrockAgentRuntimeClient"; import { commonParams } from "../endpoint/EndpointParameters"; -import { - RetrieveRequest, - RetrieveRequestFilterSensitiveLog, - RetrieveResponse, - RetrieveResponseFilterSensitiveLog, -} from "../models/models_0"; +import { RetrieveResponse, RetrieveResponseFilterSensitiveLog } from "../models/models_0"; +import { RetrieveRequest, RetrieveRequestFilterSensitiveLog } from "../models/models_1"; import { de_RetrieveCommand, se_RetrieveCommand } from "../protocols/Aws_restJson1"; /** diff --git a/clients/client-bedrock-agent-runtime/src/commands/TagResourceCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/TagResourceCommand.ts new file mode 100644 index 0000000000000..90e305d992a03 --- /dev/null +++ b/clients/client-bedrock-agent-runtime/src/commands/TagResourceCommand.ts @@ -0,0 +1,115 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../BedrockAgentRuntimeClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { TagResourceRequest, TagResourceResponse } from "../models/models_0"; +import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link TagResourceCommand}. + */ +export interface TagResourceCommandInput extends TagResourceRequest {} +/** + * @public + * + * The output of {@link TagResourceCommand}. + */ +export interface TagResourceCommandOutput extends TagResourceResponse, __MetadataBearer {} + +/** + *Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockAgentRuntimeClient, TagResourceCommand } from "@aws-sdk/client-bedrock-agent-runtime"; // ES Modules import + * // const { BedrockAgentRuntimeClient, TagResourceCommand } = require("@aws-sdk/client-bedrock-agent-runtime"); // CommonJS import + * const client = new BedrockAgentRuntimeClient(config); + * const input = { // TagResourceRequest + * resourceArn: "STRING_VALUE", // required + * tags: { // TagsMap // required + * "The request is denied because of missing access permissions. Check your permissions and retry your request.
+ * + * @throws {@link InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *The number of requests exceeds the service quota. Resubmit your request later.
+ * + * @throws {@link ThrottlingException} (client fault) + *The number of requests exceeds the limit. Resubmit your request later.
+ * + * @throws {@link ValidationException} (client fault) + *Input validation failed. Check your request parameters and retry the request.
+ * + * @throws {@link BedrockAgentRuntimeServiceException} + *Base exception class for all service exceptions from BedrockAgentRuntime service.
+ * + * @public + */ +export class TagResourceCommand extends $Command + .classBuilder< + TagResourceCommandInput, + TagResourceCommandOutput, + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BedrockAgentRuntimeClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonBedrockAgentRunTimeService", "TagResource", {}) + .n("BedrockAgentRuntimeClient", "TagResourceCommand") + .f(void 0, void 0) + .ser(se_TagResourceCommand) + .de(de_TagResourceCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: TagResourceRequest; + output: {}; + }; + sdk: { + input: TagResourceCommandInput; + output: TagResourceCommandOutput; + }; + }; +} diff --git a/clients/client-bedrock-agent-runtime/src/commands/UntagResourceCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/UntagResourceCommand.ts new file mode 100644 index 0000000000000..fa91d708f90a1 --- /dev/null +++ b/clients/client-bedrock-agent-runtime/src/commands/UntagResourceCommand.ts @@ -0,0 +1,112 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../BedrockAgentRuntimeClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { UntagResourceRequest, UntagResourceResponse } from "../models/models_0"; +import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandInput extends UntagResourceRequest {} +/** + * @public + * + * The output of {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandOutput extends UntagResourceResponse, __MetadataBearer {} + +/** + *Remove tags from a resource.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockAgentRuntimeClient, UntagResourceCommand } from "@aws-sdk/client-bedrock-agent-runtime"; // ES Modules import + * // const { BedrockAgentRuntimeClient, UntagResourceCommand } = require("@aws-sdk/client-bedrock-agent-runtime"); // CommonJS import + * const client = new BedrockAgentRuntimeClient(config); + * const input = { // UntagResourceRequest + * resourceArn: "STRING_VALUE", // required + * tagKeys: [ // TagKeyList // required + * "STRING_VALUE", + * ], + * }; + * const command = new UntagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UntagResourceCommandInput - {@link UntagResourceCommandInput} + * @returns {@link UntagResourceCommandOutput} + * @see {@link UntagResourceCommandInput} for command's `input` shape. + * @see {@link UntagResourceCommandOutput} for command's `response` shape. + * @see {@link BedrockAgentRuntimeClientResolvedConfig | config} for BedrockAgentRuntimeClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *The request is denied because of missing access permissions. Check your permissions and retry your request.
+ * + * @throws {@link InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
+ * + * @throws {@link ThrottlingException} (client fault) + *The number of requests exceeds the limit. Resubmit your request later.
+ * + * @throws {@link ValidationException} (client fault) + *Input validation failed. Check your request parameters and retry the request.
+ * + * @throws {@link BedrockAgentRuntimeServiceException} + *Base exception class for all service exceptions from BedrockAgentRuntime service.
+ * + * @public + */ +export class UntagResourceCommand extends $Command + .classBuilder< + UntagResourceCommandInput, + UntagResourceCommandOutput, + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BedrockAgentRuntimeClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonBedrockAgentRunTimeService", "UntagResource", {}) + .n("BedrockAgentRuntimeClient", "UntagResourceCommand") + .f(void 0, void 0) + .ser(se_UntagResourceCommand) + .de(de_UntagResourceCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UntagResourceRequest; + output: {}; + }; + sdk: { + input: UntagResourceCommandInput; + output: UntagResourceCommandOutput; + }; + }; +} diff --git a/clients/client-bedrock-agent-runtime/src/commands/UpdateSessionCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/UpdateSessionCommand.ts new file mode 100644 index 0000000000000..8ba141c8b62fa --- /dev/null +++ b/clients/client-bedrock-agent-runtime/src/commands/UpdateSessionCommand.ts @@ -0,0 +1,121 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../BedrockAgentRuntimeClient"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { UpdateSessionRequest, UpdateSessionResponse } from "../models/models_0"; +import { de_UpdateSessionCommand, se_UpdateSessionCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UpdateSessionCommand}. + */ +export interface UpdateSessionCommandInput extends UpdateSessionRequest {} +/** + * @public + * + * The output of {@link UpdateSessionCommand}. + */ +export interface UpdateSessionCommandOutput extends UpdateSessionResponse, __MetadataBearer {} + +/** + *Updates the metadata or encryption settings of a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { BedrockAgentRuntimeClient, UpdateSessionCommand } from "@aws-sdk/client-bedrock-agent-runtime"; // ES Modules import + * // const { BedrockAgentRuntimeClient, UpdateSessionCommand } = require("@aws-sdk/client-bedrock-agent-runtime"); // CommonJS import + * const client = new BedrockAgentRuntimeClient(config); + * const input = { // UpdateSessionRequest + * sessionMetadata: { // SessionMetadataMap + * "The request is denied because of missing access permissions. Check your permissions and retry your request.
+ * + * @throws {@link ConflictException} (client fault) + *There was a conflict performing an operation. Resolve the conflict and retry your request.
+ * + * @throws {@link InternalServerException} (server fault) + *An internal server error occurred. Retry your request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
+ * + * @throws {@link ThrottlingException} (client fault) + *The number of requests exceeds the limit. Resubmit your request later.
+ * + * @throws {@link ValidationException} (client fault) + *Input validation failed. Check your request parameters and retry the request.
+ * + * @throws {@link BedrockAgentRuntimeServiceException} + *Base exception class for all service exceptions from BedrockAgentRuntime service.
+ * + * @public + */ +export class UpdateSessionCommand extends $Command + .classBuilder< + UpdateSessionCommandInput, + UpdateSessionCommandOutput, + BedrockAgentRuntimeClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: BedrockAgentRuntimeClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonBedrockAgentRunTimeService", "UpdateSession", {}) + .n("BedrockAgentRuntimeClient", "UpdateSessionCommand") + .f(void 0, void 0) + .ser(se_UpdateSessionCommand) + .de(de_UpdateSessionCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UpdateSessionRequest; + output: UpdateSessionResponse; + }; + sdk: { + input: UpdateSessionCommandInput; + output: UpdateSessionCommandOutput; + }; + }; +} diff --git a/clients/client-bedrock-agent-runtime/src/commands/index.ts b/clients/client-bedrock-agent-runtime/src/commands/index.ts index b35d1fcb23438..16b1a36897666 100644 --- a/clients/client-bedrock-agent-runtime/src/commands/index.ts +++ b/clients/client-bedrock-agent-runtime/src/commands/index.ts @@ -1,12 +1,26 @@ // smithy-typescript generated code +export * from "./CreateInvocationCommand"; +export * from "./CreateSessionCommand"; export * from "./DeleteAgentMemoryCommand"; +export * from "./DeleteSessionCommand"; +export * from "./EndSessionCommand"; export * from "./GenerateQueryCommand"; export * from "./GetAgentMemoryCommand"; +export * from "./GetInvocationStepCommand"; +export * from "./GetSessionCommand"; export * from "./InvokeAgentCommand"; export * from "./InvokeFlowCommand"; export * from "./InvokeInlineAgentCommand"; +export * from "./ListInvocationStepsCommand"; +export * from "./ListInvocationsCommand"; +export * from "./ListSessionsCommand"; +export * from "./ListTagsForResourceCommand"; export * from "./OptimizePromptCommand"; +export * from "./PutInvocationStepCommand"; export * from "./RerankCommand"; export * from "./RetrieveAndGenerateCommand"; export * from "./RetrieveAndGenerateStreamCommand"; export * from "./RetrieveCommand"; +export * from "./TagResourceCommand"; +export * from "./UntagResourceCommand"; +export * from "./UpdateSessionCommand"; diff --git a/clients/client-bedrock-agent-runtime/src/models/index.ts b/clients/client-bedrock-agent-runtime/src/models/index.ts index 9eaceb12865f8..1657800f73ce5 100644 --- a/clients/client-bedrock-agent-runtime/src/models/index.ts +++ b/clients/client-bedrock-agent-runtime/src/models/index.ts @@ -1,2 +1,3 @@ // smithy-typescript generated code export * from "./models_0"; +export * from "./models_1"; diff --git a/clients/client-bedrock-agent-runtime/src/models/models_0.ts b/clients/client-bedrock-agent-runtime/src/models/models_0.ts index db338d9c02022..02938806ead0a 100644 --- a/clients/client-bedrock-agent-runtime/src/models/models_0.ts +++ b/clients/client-bedrock-agent-runtime/src/models/models_0.ts @@ -8129,982 +8129,882 @@ export interface RetrieveResponse { } /** - *Specifies the filters to use on the metadata attributes in the knowledge base data sources before returning results. For more information, see Query configurations. See the examples below to see how to use these filters.
- *This data type is used in the following API operations:
- *
- * Retrieve request – in the filter
field
- * RetrieveAndGenerate request – in the filter
field
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value matches the value
in this object.
The following example would return data sources with an animal
attribute whose value is cat
:
- * "equals": \{ "key": "animal", "value": "cat" \}
- *
A map of key-value pairs containing attributes to be persisted across the session. For example, the user's ID, their language preference, + * and the type of device they are using.
+ * @public + */ + sessionMetadata?: RecordKnowledge base data sources that contain a metadata attribute whose name matches the key
and whose value doesn't match the value
in this object are returned.
The following example would return data sources that don't contain an animal
attribute whose value is cat
.
- * "notEquals": \{ "key": "animal", "value": "cat" \}
- *
The Amazon Resource Name (ARN) of the KMS key to use to encrypt the session data. The user or role creating the session must have permission to use the key. + * For more information, see Amazon Bedrock session encryption. + *
+ * @public + */ + encryptionKeyArn?: string | undefined; /** - *Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is greater than the value
in this object.
The following example would return data sources with an year
attribute whose value is greater than 1989
:
- * "greaterThan": \{ "key": "year", "value": 1989 \}
- *
Specify the key-value pairs for the tags that you want to attach to the session.
+ * @public + */ + tags?: RecordKnowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is greater than or equal to the value
in this object.
The following example would return data sources with an year
attribute whose value is greater than or equal to 1989
:
- * "greaterThanOrEquals": \{ "key": "year", "value": 1989 \}
- *
The unique identifier for the session.
+ * @public + */ + sessionId: string | undefined; /** - *Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is less than the value
in this object.
The following example would return data sources with an year
attribute whose value is less than to 1989
.
- * "lessThan": \{ "key": "year", "value": 1989 \}
- *
The Amazon Resource Name (ARN) of the created session.
+ * @public + */ + sessionArn: string | undefined; /** - *Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is less than or equal to the value
in this object.
The following example would return data sources with an year
attribute whose value is less than or equal to 1989
.
- * "lessThanOrEquals": \{ "key": "year", "value": 1989 \}
- *
The current status of the session.
+ * @public + */ + sessionStatus: SessionStatus | undefined; /** - *Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is in the list specified in the value
in this object.
The following example would return data sources with an animal
attribute that is either cat
or dog
:
- * "in": \{ "key": "animal", "value": ["cat", "dog"] \}
- *
The timestamp for when the session was created.
+ * @public + */ + createdAt: Date | undefined; +} +/** + * @public + */ +export interface DeleteSessionRequest { /** - *Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value isn't in the list specified in the value
in this object.
The following example would return data sources whose animal
attribute is neither cat
nor dog
.
- * "notIn": \{ "key": "animal", "value": ["cat", "dog"] \}
- *
The unique identifier for the session to be deleted. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value starts with the value
in this object. This filter is currently only supported for Amazon OpenSearch Serverless vector stores.
The following example would return data sources with an animal
attribute starts with ca
(for example, cat
or camel
).
- * "startsWith": \{ "key": "animal", "value": "ca" \}
- *
The unique identifier for the session to end. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is a list that contains the value
as one of its members.
The following example would return data sources with an animals
attribute that is a list containing a cat
member (for example ["dog", "cat"]
).
- * "listContains": \{ "key": "animals", "value": "cat" \}
- *
The unique identifier of the session you ended.
+ * @public + */ + sessionId: string | undefined; /** - *Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is one of the following:
A string that contains the value
as a substring. The following example would return data sources with an animal
attribute that contains the substring at
(for example cat
).
- * "stringContains": \{ "key": "animal", "value": "at" \}
- *
A list with a member that contains the value
as a substring. The following example would return data sources with an animals
attribute that is a list containing a member that contains the substring at
(for example ["dog", "cat"]
).
- * "stringContains": \{ "key": "animals", "value": "at" \}
- *
The Amazon Resource Name (ARN) of the session you ended.
* @public */ - export interface StringContainsMember { - equals?: never; - notEquals?: never; - greaterThan?: never; - greaterThanOrEquals?: never; - lessThan?: never; - lessThanOrEquals?: never; - in?: never; - notIn?: never; - startsWith?: never; - listContains?: never; - stringContains: FilterAttribute; - andAll?: never; - orAll?: never; - $unknown?: never; - } + sessionArn: string | undefined; /** - *Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.
+ *The current status of the session you ended.
* @public */ - export interface AndAllMember { - equals?: never; - notEquals?: never; - greaterThan?: never; - greaterThanOrEquals?: never; - lessThan?: never; - lessThanOrEquals?: never; - in?: never; - notIn?: never; - startsWith?: never; - listContains?: never; - stringContains?: never; - andAll: RetrievalFilter[]; - orAll?: never; - $unknown?: never; - } + sessionStatus: SessionStatus | undefined; +} +/** + * @public + */ +export interface GetSessionRequest { /** - *Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.
+ *A unique identifier for the session to retrieve. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
The unique identifier for the session in UUID format.
* @public */ - export interface $UnknownMember { - equals?: never; - notEquals?: never; - greaterThan?: never; - greaterThanOrEquals?: never; - lessThan?: never; - lessThanOrEquals?: never; - in?: never; - notIn?: never; - startsWith?: never; - listContains?: never; - stringContains?: never; - andAll?: never; - orAll?: never; - $unknown: [string, any]; - } + sessionId: string | undefined; - export interface VisitorThe Amazon Resource Name (ARN) of the session.
+ * @public + */ + sessionArn: string | undefined; - export const visit =The current status of the session.
+ * @public + */ + sessionStatus: SessionStatus | undefined; + + /** + *The timestamp for when the session was created.
+ * @public + */ + createdAt: Date | undefined; + + /** + *The timestamp for when the session was last modified.
+ * @public + */ + lastUpdatedAt: Date | undefined; + + /** + *A map of key-value pairs containing attributes persisted across the session.
+ * @public + */ + sessionMetadata?: RecordThe Amazon Resource Name (ARN) of the Key Management Service key used to encrypt the session data. + * For more information, see Amazon Bedrock session encryption.
+ * @public + */ + encryptionKeyArn?: string | undefined; } /** - *Configurations for how to perform the search query and return results. For more information, see Query configurations.
- *This data type is used in the following API operations:
- *
- * Retrieve request – in the vectorSearchConfiguration
field
- * RetrieveAndGenerate request – in the vectorSearchConfiguration
field
The number of source chunks to retrieve.
+ *A unique identifier for the invocation in UUID format.
* @public */ - numberOfResults?: number | undefined; + invocationId?: string | undefined; + + /** + *A description for the interactions in the invocation. For example, "User asking about weather in Seattle".
+ * @public + */ + description?: string | undefined; + + /** + *The unique identifier for the associated session for the invocation. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
+ *
The unique identifier for the session associated with the invocation.
+ * @public + */ + sessionId: string | undefined; /** - *By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch Serverless vector store that contains a filterable text field, you can specify whether to query the knowledge base with a HYBRID
search using both vector embeddings and raw text, or SEMANTIC
search using only vector embeddings. For other vector store configurations, only SEMANTIC
search is available. For more information, see Test a knowledge base.
The unique identifier for the invocation.
* @public */ - overrideSearchType?: SearchType | undefined; + invocationId: string | undefined; /** - *Specifies the filters to use on the metadata in the knowledge base data sources before returning results. For more information, see Query configurations.
+ *The timestamp for when the invocation was created.
* @public */ - filter?: RetrievalFilter | undefined; + createdAt: Date | undefined; +} +/** + * @public + */ +export interface ListInvocationsRequest { /** - *Contains configurations for reranking the retrieved results. For more information, see Improve the relevance of query responses with a reranker model.
+ *If the total number of results is greater than the maxResults
value provided in the request, enter the
+ * token returned in the nextToken
field in the response in this field to return the next batch of results.
+ *
Settings for implicit filtering.
+ *The maximum number of results to return in the response. If the total number of results is greater than this value,
+ * use the token returned in the response in the nextToken
field when making another request to return the next
+ * batch of results.
The unique identifier for the session to list invocations for. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
Contains details about an invocation in a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
+ * @public + */ +export interface InvocationSummary { + /** + *The unique identifier for the session associated with the invocation.
+ * @public + */ + sessionId: string | undefined; + + /** + *A unique identifier for the invocation in UUID format.
+ * @public + */ + invocationId: string | undefined; + + /** + *The timestamp for when the invocation was created.
+ * @public + */ + createdAt: Date | undefined; } /** - *Contains configurations for knowledge base query. For more information, see Query configurations.
- *This data type is used in the following API operations:
- *
- * Retrieve request – in the retrievalConfiguration
field
- * RetrieveAndGenerate request – in the retrievalConfiguration
field
A list of invocation summaries associated with the session.
+ * @public + */ + invocationSummaries: InvocationSummary[] | undefined; + /** - *Contains details about how the results from the vector search should be returned. For more information, see Query configurations.
+ *If the total number of results is greater than the maxResults
value provided in the request, use this token when making another request in the nextToken
field to return the next batch of results.
- * Details of the knowledge base associated withe inline agent. - *
* @public */ -export interface KnowledgeBase { +export interface GetInvocationStepRequest { /** - *- * The unique identifier for a knowledge base associated with the inline agent. - *
+ *The unique identifier for the invocation in UUID format.
* @public */ - knowledgeBaseId: string | undefined; + invocationIdentifier: string | undefined; /** - *- * The description of the knowledge base associated with the inline agent. - *
+ *The unique identifier (in UUID format) for the specific invocation step to retrieve.
* @public */ - description: string | undefined; + invocationStepId: string | undefined; /** - *- * The configurations to apply to the knowledge base during query. For more information, see Query configurations. - *
+ *The unique identifier for the invocation step's associated session. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
Configurations to apply to a knowledge base attached to the agent during query. For more information, see Knowledge base retrieval configurations.
+ * @public + * @enum + */ +export const ImageFormat = { + GIF: "gif", + JPEG: "jpeg", + PNG: "png", + WEBP: "webp", +} as const; + +/** * @public */ -export interface KnowledgeBaseConfiguration { +export type ImageFormat = (typeof ImageFormat)[keyof typeof ImageFormat]; + +/** + *Information about the Amazon S3 bucket where the image is stored.
+ * @public + */ +export interface S3Location { /** - *The unique identifier for a knowledge base attached to the agent.
+ *The path to the Amazon S3 bucket where the image is stored.
* @public */ - knowledgeBaseId: string | undefined; + uri: string | undefined; +} + +/** + *The source for an image.
+ * @public + */ +export type ImageSource = ImageSource.BytesMember | ImageSource.S3LocationMember | ImageSource.$UnknownMember; + +/** + * @public + */ +export namespace ImageSource { + /** + *The raw image bytes for the image. If you use an Amazon Web Services SDK, you don't need to encode the image bytes in base64.
+ * @public + */ + export interface BytesMember { + bytes: Uint8Array; + s3Location?: never; + $unknown?: never; + } + + /** + *The path to the Amazon S3 bucket where the image is stored.
+ * @public + */ + export interface S3LocationMember { + bytes?: never; + s3Location: S3Location; + $unknown?: never; + } /** - *The configurations to apply to the knowledge base during query. For more information, see Query configurations.
* @public */ - retrievalConfiguration: KnowledgeBaseRetrievalConfiguration | undefined; + export interface $UnknownMember { + bytes?: never; + s3Location?: never; + $unknown: [string, any]; + } + + export interface VisitorContains details about the resource being queried.
- *This data type is used in the following API operations:
- *
- * Retrieve request – in the knowledgeBaseConfiguration
field
- * RetrieveAndGenerate request – in the knowledgeBaseConfiguration
field
Image content for an invocation step.
* @public */ -export interface KnowledgeBaseRetrieveAndGenerateConfiguration { +export interface ImageBlock { /** - *The unique identifier of the knowledge base that is queried.
+ *The format of the image.
* @public */ - knowledgeBaseId: string | undefined; + format: ImageFormat | undefined; /** - *The ARN of the foundation model or inference profile used to generate a response.
+ *The source for the image.
* @public */ - modelArn: string | undefined; + source: ImageSource | undefined; +} + +/** + *A block of content that you pass to, or receive from, a Amazon Bedrock session in an invocation step. You pass the content to a
+ * session in the payLoad
of the PutInvocationStep API operation.
+ * You retrieve the content with the GetInvocationStep API operation.
For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
+ * @public + */ +export type BedrockSessionContentBlock = + | BedrockSessionContentBlock.ImageMember + | BedrockSessionContentBlock.TextMember + | BedrockSessionContentBlock.$UnknownMember; + +/** + * @public + */ +export namespace BedrockSessionContentBlock { + /** + *The text in the invocation step.
+ * @public + */ + export interface TextMember { + text: string; + image?: never; + $unknown?: never; + } + + /** + *The image in the invocation step.
+ * @public + */ + export interface ImageMember { + text?: never; + image: ImageBlock; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + text?: never; + image?: never; + $unknown: [string, any]; + } + + export interface VisitorPayload content, such as text and images, for the invocation step.
+ * @public + */ +export type InvocationStepPayload = InvocationStepPayload.ContentBlocksMember | InvocationStepPayload.$UnknownMember; +/** + * @public + */ +export namespace InvocationStepPayload { /** - *Contains configurations for how to retrieve and return the knowledge base query.
+ *The content for the invocation step.
* @public */ - retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration | undefined; + export interface ContentBlocksMember { + contentBlocks: BedrockSessionContentBlock[]; + $unknown?: never; + } /** - *Contains configurations for response generation based on the knowledge base query results.
* @public */ - generationConfiguration?: GenerationConfiguration | undefined; + export interface $UnknownMember { + contentBlocks?: never; + $unknown: [string, any]; + } - /** - *Settings for how the model processes the prompt prior to retrieval and generation.
- * @public - */ - orchestrationConfiguration?: OrchestrationConfiguration | undefined; + export interface VisitorStores fine-grained state checkpoints, including text and images, for each interaction in an invocation in a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
* @public */ -export interface RetrieveRequest { +export interface InvocationStep { /** - *The unique identifier of the knowledge base to query.
+ *The unique identifier of the session containing the invocation step.
* @public */ - knowledgeBaseId: string | undefined; + sessionId: string | undefined; /** - *Contains the query to send the knowledge base.
+ *The unique identifier (in UUID format) for the invocation that includes the invocation step.
* @public */ - retrievalQuery: KnowledgeBaseQuery | undefined; + invocationId: string | undefined; /** - *Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.
+ *The unique identifier (in UUID format) for the invocation step.
* @public */ - retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration | undefined; + invocationStepId: string | undefined; /** - *Guardrail settings.
+ *The timestamp for when the invocation step was created.
* @public */ - guardrailConfiguration?: GuardrailConfiguration | undefined; + invocationStepTime: Date | undefined; /** - *If there are more results than can fit in the response, the response returns a nextToken
. Use this token in the nextToken
field of another request to retrieve the next batch of results.
Payload content, such as text and images, for the invocation step.
* @public */ - nextToken?: string | undefined; + payload: InvocationStepPayload | undefined; } /** - *Contains details about the resource being queried.
- *This data type is used in the following API operations:
- *
- * RetrieveAndGenerate request – in the retrieveAndGenerateConfiguration
field
The type of resource that contains your data for retrieving information and generating responses.
- *If you choose ot use EXTERNAL_SOURCES
, then currently only Claude 3 Sonnet models for knowledge bases are supported.
Contains details about the knowledge base for retrieving information and generating responses.
- * @public - */ - knowledgeBaseConfiguration?: KnowledgeBaseRetrieveAndGenerateConfiguration | undefined; - +export interface GetInvocationStepResponse { /** - *The configuration for the external source wrapper object in the retrieveAndGenerate
function.
The complete details of the requested invocation step.
* @public */ - externalSourcesConfiguration?: ExternalSourcesRetrieveAndGenerateConfiguration | undefined; + invocationStep: InvocationStep | undefined; } /** * @public */ -export interface InvokeInlineAgentRequest { +export interface ListInvocationStepsRequest { /** - *- * The unique identifier of the session. Use the same value across requests to continue the same conversation. - *
+ *The unique identifier (in UUID format) for the invocation to list invocation steps for.
* @public */ - sessionId: string | undefined; + invocationIdentifier?: string | undefined; /** - *- * The Amazon Resource Name (ARN) of the Amazon Web Services KMS key to use to encrypt your inline agent. - *
+ *If the total number of results is greater than the maxResults
value provided in the request, enter the
+ * token returned in the nextToken
field in the response in this field to return the next batch of results.
+ *
- * Specifies whether to end the session with the inline agent or not. - *
+ *The maximum number of results to return in the response. If the total number of results is greater than this value,
+ * use the token returned in the response in the nextToken
field when making another request to return the next
+ * batch of results.
- * Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see Using trace. - * - *
+ *The unique identifier for the session associated with the invocation steps. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
Contains details about an invocation step within an invocation in a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
+ * @public + */ +export interface InvocationStepSummary { /** - *- * The prompt text to send to the agent. - *
- *If you include returnControlInvocationResults
in the sessionState
field, the inputText
field will be ignored.
The unique identifier for the session associated with the invocation step.
* @public */ - inputText?: string | undefined; + sessionId: string | undefined; /** - *- * Parameters that specify the various attributes of a sessions. You can include attributes for the session or prompt or, if you configured an - * action group to return control, results from invocation of the action group. For more information, see Control session context. - *
- *If you include returnControlInvocationResults
in the sessionState
field, the inputText
field will be ignored.
A unique identifier for the invocation in UUID format.
* @public */ - inlineSessionState?: InlineSessionState | undefined; + invocationId: string | undefined; /** - *
- * The model identifier (ID) of the model to use for orchestration by the inline agent. For example, meta.llama3-1-70b-instruct-v1:0
.
- *
The unique identifier (in UUID format) for the invocation step.
* @public */ - foundationModel: string | undefined; + invocationStepId: string | undefined; /** - *- * The instructions that tell the inline agent what it should do and how it should interact with users. - *
+ *The timestamp for when the invocation step was created.
* @public */ - instruction: string | undefined; + invocationStepTime: Date | undefined; +} +/** + * @public + */ +export interface ListInvocationStepsResponse { /** - *
- * The number of seconds for which the inline agent should maintain session information. After this time expires, the subsequent InvokeInlineAgent
request begins a new session.
- *
A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and the data provided before the timeout is deleted.
+ *A list of summaries for each invocation step associated with a session and if you specified it, an invocation within the session.
* @public */ - idleSessionTTLInSeconds?: number | undefined; + invocationStepSummaries: InvocationStepSummary[] | undefined; /** - *- * A list of action groups with each action group defining the action the inline agent needs to carry out. - *
+ *If the total number of results is greater than the maxResults
value provided in the request, use this token when making another request in the nextToken
field to return the next batch of results.
- * Contains information of the knowledge bases to associate with. - *
+ *The unique identifier for the session to add the invocation step to. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
- * The guardrails to assign to the inline agent. - *
+ *The unique identifier (in UUID format) of the invocation to add the invocation step to.
* @public */ - guardrailConfiguration?: GuardrailConfigurationWithArn | undefined; + invocationIdentifier: string | undefined; /** - *- * Configurations for advanced prompts used to override the default prompts to enhance the accuracy of the inline agent. - *
+ *The timestamp for when the invocation step occurred.
* @public */ - promptOverrideConfiguration?: PromptOverrideConfiguration | undefined; + invocationStepTime: Date | undefined; /** - *Model settings for the request.
+ *The payload for the invocation step, including text and images for the interaction.
* @public */ - bedrockModelConfigurations?: InlineBedrockModelConfigurations | undefined; + payload: InvocationStepPayload | undefined; /** - *- * Specifies the configurations for streaming. - *
- *To use agent streaming, you need permissions to perform the bedrock:InvokeModelWithResponseStream
action.
The unique identifier of the invocation step in UUID format.
* @public */ - streamingConfigurations?: StreamingConfigurations | undefined; + invocationStepId?: string | undefined; } /** * @public */ -export interface RetrieveAndGenerateRequest { - /** - *The unique identifier of the session. When you first make a RetrieveAndGenerate
request, Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous interactions. You can't explicitly set the sessionId
yourself.
Contains the query to be made to the knowledge base.
- * @public - */ - input: RetrieveAndGenerateInput | undefined; - - /** - *Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.
- * @public - */ - retrieveAndGenerateConfiguration?: RetrieveAndGenerateConfiguration | undefined; - +export interface PutInvocationStepResponse { /** - *Contains details about the session with the knowledge base.
+ *The unique identifier of the invocation step in UUID format.
* @public */ - sessionConfiguration?: RetrieveAndGenerateSessionConfiguration | undefined; + invocationStepId: string | undefined; } /** * @public */ -export interface RetrieveAndGenerateStreamRequest { +export interface ListSessionsRequest { /** - *The unique identifier of the session. When you first make a RetrieveAndGenerate
request, Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous interactions. You can't explicitly set the sessionId
yourself.
The maximum number of results to return in the response. If the total number of results is greater than this value,
+ * use the token returned in the response in the nextToken
field when making another request to return the next
+ * batch of results.
Contains the query to be made to the knowledge base.
+ *If the total number of results is greater than the maxResults
value provided in the request, enter the
+ * token returned in the nextToken
field in the response in this field to return the next batch of results.
+ *
Contains details about a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
+ * @public + */ +export interface SessionSummary { /** - *Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.
+ *The unique identifier for the session.
* @public */ - retrieveAndGenerateConfiguration?: RetrieveAndGenerateConfiguration | undefined; + sessionId: string | undefined; /** - *Contains details about the session with the knowledge base.
+ *The Amazon Resource Name (ARN) of the session.
* @public */ - sessionConfiguration?: RetrieveAndGenerateSessionConfiguration | undefined; -} + sessionArn: string | undefined; -/** - *Contains parameters that specify various attributes that persist across a session or prompt. You can define session state attributes as key-value pairs when writing a Lambda function for an action group or pass them when making an InvokeAgent request. Use session state attributes to control and provide conversational context for your agent and to help customize your agent's behavior. For more information, see Control session context.
- * @public - */ -export interface SessionState { /** - *Contains attributes that persist across a session and the values of those attributes.
+ *The current status of the session.
* @public */ - sessionAttributes?: RecordContains attributes that persist across a prompt and the values of those attributes. These attributes replace the $prompt_session_attributes$ placeholder variable in the orchestration prompt template. For more information, see Prompt template placeholder variables.
+ *The timestamp for when the session was created.
* @public */ - promptSessionAttributes?: RecordContains information about the results from the action group invocation. For more information, see Return control to the agent developer and Control session context.
- *If you include this field, the inputText
field will be ignored.
The timestamp for when the session was last modified.
* @public */ - returnControlInvocationResults?: InvocationResultMember[] | undefined; + lastUpdatedAt: Date | undefined; +} +/** + * @public + */ +export interface ListSessionsResponse { /** - *The identifier of the invocation of an action. This value must match the invocationId
returned in the InvokeAgent
response for the action whose results are provided in the returnControlInvocationResults
field. For more information, see Return control to the agent developer and Control session context.
A list of summaries for each session in your Amazon Web Services account.
* @public */ - invocationId?: string | undefined; + sessionSummaries: SessionSummary[] | undefined; /** - *Contains information about the files used by code interpreter.
+ *If the total number of results is greater than the maxResults
value provided in the request, use this token when making another request in the nextToken
field to return the next batch of results.
An array of configurations, each of which applies to a knowledge base attached to the agent.
+ *A map of key-value pairs containing attributes to be persisted across the session. For example the user's ID, their language preference, + * and the type of device they are using.
* @public */ - knowledgeBaseConfigurations?: KnowledgeBaseConfiguration[] | undefined; + sessionMetadata?: RecordThe state's conversation history.
+ *The unique identifier of the session to modify. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
Contains parameters that specify various attributes of the session. For more information, see Control session context.
- *If you include returnControlInvocationResults
in the sessionState
field, the inputText
field will be ignored.
The unique identifier of the session you updated.
* @public */ - sessionState?: SessionState | undefined; + sessionId: string | undefined; /** - *The unique identifier of the agent to use.
+ *The Amazon Resource Name (ARN) of the session that was updated.
* @public */ - agentId: string | undefined; + sessionArn: string | undefined; /** - *The alias of the agent to use.
+ *The status of the session you updated.
* @public */ - agentAliasId: string | undefined; + sessionStatus: SessionStatus | undefined; /** - *The unique identifier of the session. Use the same value across requests to continue the same conversation.
+ *The timestamp for when the session was created.
* @public */ - sessionId: string | undefined; + createdAt: Date | undefined; /** - *Specifies whether to end the session with the agent or not.
+ *The timestamp for when the session was last modified.
* @public */ - endSession?: boolean | undefined; + lastUpdatedAt: Date | undefined; +} +/** + * @public + */ +export interface ListTagsForResourceRequest { /** - *Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see Trace enablement.
+ *The Amazon Resource Name (ARN) of the resource for which to list tags.
* @public */ - enableTrace?: boolean | undefined; + resourceArn: string | undefined; +} +/** + * @public + */ +export interface ListTagsForResourceResponse { /** - *The prompt text to send the agent.
- *If you include returnControlInvocationResults
in the sessionState
field, the inputText
field will be ignored.
The key-value pairs for the tags associated with the resource.
* @public */ - inputText?: string | undefined; + tags?: RecordThe unique identifier of the agent memory.
+ *The Amazon Resource Name (ARN) of the resource to tag.
* @public */ - memoryId?: string | undefined; + resourceArn: string | undefined; /** - *Model performance settings for the request.
+ *An object containing key-value pairs that define the tags to attach to the resource.
* @public */ - bedrockModelConfigurations?: BedrockModelConfigurations | undefined; + tags: Record- * Specifies the configurations for streaming. - *
- *To use agent streaming, you need permissions to perform the bedrock:InvokeModelWithResponseStream
action.
The Amazon Resource Name (ARN) of the resource from which to remove tags.
* @public */ - streamingConfigurations?: StreamingConfigurations | undefined; + resourceArn: string | undefined; /** - *The ARN of the resource making the request.
+ *A list of keys of the tags to remove from the resource.
* @public */ - sourceArn?: string | undefined; + tagKeys: string[] | undefined; } +/** + * @public + */ +export interface UntagResourceResponse {} + /** * @internal */ @@ -10437,185 +10337,40 @@ export const RetrieveResponseFilterSensitiveLog = (obj: RetrieveResponse): any = /** * @internal */ -export const RetrievalFilterFilterSensitiveLog = (obj: RetrievalFilter): any => { - if (obj.equals !== undefined) return { equals: obj.equals }; - if (obj.notEquals !== undefined) return { notEquals: obj.notEquals }; - if (obj.greaterThan !== undefined) return { greaterThan: obj.greaterThan }; - if (obj.greaterThanOrEquals !== undefined) return { greaterThanOrEquals: obj.greaterThanOrEquals }; - if (obj.lessThan !== undefined) return { lessThan: obj.lessThan }; - if (obj.lessThanOrEquals !== undefined) return { lessThanOrEquals: obj.lessThanOrEquals }; - if (obj.in !== undefined) return { in: obj.in }; - if (obj.notIn !== undefined) return { notIn: obj.notIn }; - if (obj.startsWith !== undefined) return { startsWith: obj.startsWith }; - if (obj.listContains !== undefined) return { listContains: obj.listContains }; - if (obj.stringContains !== undefined) return { stringContains: obj.stringContains }; - if (obj.andAll !== undefined) return { andAll: SENSITIVE_STRING }; - if (obj.orAll !== undefined) return { orAll: SENSITIVE_STRING }; +export const BedrockSessionContentBlockFilterSensitiveLog = (obj: BedrockSessionContentBlock): any => { + if (obj.text !== undefined) return { text: obj.text }; + if (obj.image !== undefined) return { image: obj.image }; if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; }; /** * @internal */ -export const KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog = ( - obj: KnowledgeBaseVectorSearchConfiguration -): any => ({ - ...obj, - ...(obj.filter && { filter: SENSITIVE_STRING }), - ...(obj.rerankingConfiguration && { - rerankingConfiguration: VectorSearchRerankingConfigurationFilterSensitiveLog(obj.rerankingConfiguration), - }), - ...(obj.implicitFilterConfiguration && { - implicitFilterConfiguration: ImplicitFilterConfigurationFilterSensitiveLog(obj.implicitFilterConfiguration), - }), -}); - -/** - * @internal - */ -export const KnowledgeBaseRetrievalConfigurationFilterSensitiveLog = ( - obj: KnowledgeBaseRetrievalConfiguration -): any => ({ - ...obj, - ...(obj.vectorSearchConfiguration && { - vectorSearchConfiguration: KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog(obj.vectorSearchConfiguration), - }), -}); - -/** - * @internal - */ -export const KnowledgeBaseFilterSensitiveLog = (obj: KnowledgeBase): any => ({ - ...obj, - ...(obj.description && { description: SENSITIVE_STRING }), - ...(obj.retrievalConfiguration && { - retrievalConfiguration: KnowledgeBaseRetrievalConfigurationFilterSensitiveLog(obj.retrievalConfiguration), - }), -}); - -/** - * @internal - */ -export const KnowledgeBaseConfigurationFilterSensitiveLog = (obj: KnowledgeBaseConfiguration): any => ({ - ...obj, - ...(obj.retrievalConfiguration && { - retrievalConfiguration: KnowledgeBaseRetrievalConfigurationFilterSensitiveLog(obj.retrievalConfiguration), - }), -}); - -/** - * @internal - */ -export const KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog = ( - obj: KnowledgeBaseRetrieveAndGenerateConfiguration -): any => ({ - ...obj, - ...(obj.retrievalConfiguration && { - retrievalConfiguration: KnowledgeBaseRetrievalConfigurationFilterSensitiveLog(obj.retrievalConfiguration), - }), - ...(obj.generationConfiguration && { - generationConfiguration: GenerationConfigurationFilterSensitiveLog(obj.generationConfiguration), - }), - ...(obj.orchestrationConfiguration && { - orchestrationConfiguration: OrchestrationConfigurationFilterSensitiveLog(obj.orchestrationConfiguration), - }), -}); - -/** - * @internal - */ -export const RetrieveRequestFilterSensitiveLog = (obj: RetrieveRequest): any => ({ - ...obj, - ...(obj.retrievalQuery && { retrievalQuery: SENSITIVE_STRING }), - ...(obj.retrievalConfiguration && { - retrievalConfiguration: KnowledgeBaseRetrievalConfigurationFilterSensitiveLog(obj.retrievalConfiguration), - }), -}); - -/** - * @internal - */ -export const RetrieveAndGenerateConfigurationFilterSensitiveLog = (obj: RetrieveAndGenerateConfiguration): any => ({ - ...obj, - ...(obj.knowledgeBaseConfiguration && { - knowledgeBaseConfiguration: KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog( - obj.knowledgeBaseConfiguration - ), - }), - ...(obj.externalSourcesConfiguration && { - externalSourcesConfiguration: ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog( - obj.externalSourcesConfiguration - ), - }), -}); - -/** - * @internal - */ -export const InvokeInlineAgentRequestFilterSensitiveLog = (obj: InvokeInlineAgentRequest): any => ({ - ...obj, - ...(obj.inputText && { inputText: SENSITIVE_STRING }), - ...(obj.inlineSessionState && { inlineSessionState: InlineSessionStateFilterSensitiveLog(obj.inlineSessionState) }), - ...(obj.instruction && { instruction: SENSITIVE_STRING }), - ...(obj.actionGroups && { actionGroups: obj.actionGroups.map((item) => AgentActionGroupFilterSensitiveLog(item)) }), - ...(obj.knowledgeBases && { - knowledgeBases: obj.knowledgeBases.map((item) => KnowledgeBaseFilterSensitiveLog(item)), - }), - ...(obj.promptOverrideConfiguration && { promptOverrideConfiguration: SENSITIVE_STRING }), -}); - -/** - * @internal - */ -export const RetrieveAndGenerateRequestFilterSensitiveLog = (obj: RetrieveAndGenerateRequest): any => ({ - ...obj, - ...(obj.input && { input: SENSITIVE_STRING }), - ...(obj.retrieveAndGenerateConfiguration && { - retrieveAndGenerateConfiguration: RetrieveAndGenerateConfigurationFilterSensitiveLog( - obj.retrieveAndGenerateConfiguration - ), - }), -}); +export const InvocationStepPayloadFilterSensitiveLog = (obj: InvocationStepPayload): any => { + if (obj.contentBlocks !== undefined) return { contentBlocks: SENSITIVE_STRING }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; +}; /** * @internal */ -export const RetrieveAndGenerateStreamRequestFilterSensitiveLog = (obj: RetrieveAndGenerateStreamRequest): any => ({ +export const InvocationStepFilterSensitiveLog = (obj: InvocationStep): any => ({ ...obj, - ...(obj.input && { input: SENSITIVE_STRING }), - ...(obj.retrieveAndGenerateConfiguration && { - retrieveAndGenerateConfiguration: RetrieveAndGenerateConfigurationFilterSensitiveLog( - obj.retrieveAndGenerateConfiguration - ), - }), + ...(obj.payload && { payload: InvocationStepPayloadFilterSensitiveLog(obj.payload) }), }); /** * @internal */ -export const SessionStateFilterSensitiveLog = (obj: SessionState): any => ({ +export const GetInvocationStepResponseFilterSensitiveLog = (obj: GetInvocationStepResponse): any => ({ ...obj, - ...(obj.returnControlInvocationResults && { - returnControlInvocationResults: obj.returnControlInvocationResults.map((item) => - InvocationResultMemberFilterSensitiveLog(item) - ), - }), - ...(obj.files && { files: obj.files.map((item) => InputFileFilterSensitiveLog(item)) }), - ...(obj.knowledgeBaseConfigurations && { - knowledgeBaseConfigurations: obj.knowledgeBaseConfigurations.map((item) => - KnowledgeBaseConfigurationFilterSensitiveLog(item) - ), - }), - ...(obj.conversationHistory && { - conversationHistory: ConversationHistoryFilterSensitiveLog(obj.conversationHistory), - }), + ...(obj.invocationStep && { invocationStep: InvocationStepFilterSensitiveLog(obj.invocationStep) }), }); /** * @internal */ -export const InvokeAgentRequestFilterSensitiveLog = (obj: InvokeAgentRequest): any => ({ +export const PutInvocationStepRequestFilterSensitiveLog = (obj: PutInvocationStepRequest): any => ({ ...obj, - ...(obj.sessionState && { sessionState: SessionStateFilterSensitiveLog(obj.sessionState) }), - ...(obj.inputText && { inputText: SENSITIVE_STRING }), + ...(obj.payload && { payload: InvocationStepPayloadFilterSensitiveLog(obj.payload) }), }); diff --git a/clients/client-bedrock-agent-runtime/src/models/models_1.ts b/clients/client-bedrock-agent-runtime/src/models/models_1.ts new file mode 100644 index 0000000000000..5a70634ec3bd7 --- /dev/null +++ b/clients/client-bedrock-agent-runtime/src/models/models_1.ts @@ -0,0 +1,1200 @@ +// smithy-typescript generated code +import { SENSITIVE_STRING } from "@smithy/smithy-client"; + +import { + AgentActionGroup, + AgentActionGroupFilterSensitiveLog, + BedrockModelConfigurations, + ConversationHistory, + ConversationHistoryFilterSensitiveLog, + ExternalSourcesRetrieveAndGenerateConfiguration, + ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog, + FilterAttribute, + GenerationConfiguration, + GenerationConfigurationFilterSensitiveLog, + GuardrailConfiguration, + GuardrailConfigurationWithArn, + ImplicitFilterConfiguration, + ImplicitFilterConfigurationFilterSensitiveLog, + InlineBedrockModelConfigurations, + InlineSessionState, + InlineSessionStateFilterSensitiveLog, + InputFile, + InputFileFilterSensitiveLog, + InvocationResultMember, + InvocationResultMemberFilterSensitiveLog, + KnowledgeBaseQuery, + OrchestrationConfiguration, + OrchestrationConfigurationFilterSensitiveLog, + PromptOverrideConfiguration, + RetrieveAndGenerateInput, + RetrieveAndGenerateSessionConfiguration, + RetrieveAndGenerateType, + SearchType, + StreamingConfigurations, + VectorSearchRerankingConfiguration, + VectorSearchRerankingConfigurationFilterSensitiveLog, +} from "./models_0"; + +/** + *Specifies the filters to use on the metadata attributes in the knowledge base data sources before returning results. For more information, see Query configurations. See the examples below to see how to use these filters.
+ *This data type is used in the following API operations:
+ *
+ * Retrieve request – in the filter
field
+ * RetrieveAndGenerate request – in the filter
field
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value matches the value
in this object.
The following example would return data sources with an animal
attribute whose value is cat
:
+ * "equals": \{ "key": "animal", "value": "cat" \}
+ *
Knowledge base data sources that contain a metadata attribute whose name matches the key
and whose value doesn't match the value
in this object are returned.
The following example would return data sources that don't contain an animal
attribute whose value is cat
.
+ * "notEquals": \{ "key": "animal", "value": "cat" \}
+ *
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is greater than the value
in this object.
The following example would return data sources with an year
attribute whose value is greater than 1989
:
+ * "greaterThan": \{ "key": "year", "value": 1989 \}
+ *
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is greater than or equal to the value
in this object.
The following example would return data sources with an year
attribute whose value is greater than or equal to 1989
:
+ * "greaterThanOrEquals": \{ "key": "year", "value": 1989 \}
+ *
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is less than the value
in this object.
The following example would return data sources with an year
attribute whose value is less than to 1989
.
+ * "lessThan": \{ "key": "year", "value": 1989 \}
+ *
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is less than or equal to the value
in this object.
The following example would return data sources with an year
attribute whose value is less than or equal to 1989
.
+ * "lessThanOrEquals": \{ "key": "year", "value": 1989 \}
+ *
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is in the list specified in the value
in this object.
The following example would return data sources with an animal
attribute that is either cat
or dog
:
+ * "in": \{ "key": "animal", "value": ["cat", "dog"] \}
+ *
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value isn't in the list specified in the value
in this object.
The following example would return data sources whose animal
attribute is neither cat
nor dog
.
+ * "notIn": \{ "key": "animal", "value": ["cat", "dog"] \}
+ *
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value starts with the value
in this object. This filter is currently only supported for Amazon OpenSearch Serverless vector stores.
The following example would return data sources with an animal
attribute starts with ca
(for example, cat
or camel
).
+ * "startsWith": \{ "key": "animal", "value": "ca" \}
+ *
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is a list that contains the value
as one of its members.
The following example would return data sources with an animals
attribute that is a list containing a cat
member (for example ["dog", "cat"]
).
+ * "listContains": \{ "key": "animals", "value": "cat" \}
+ *
Knowledge base data sources are returned if they contain a metadata attribute whose name matches the key
and whose value is one of the following:
A string that contains the value
as a substring. The following example would return data sources with an animal
attribute that contains the substring at
(for example cat
).
+ * "stringContains": \{ "key": "animal", "value": "at" \}
+ *
A list with a member that contains the value
as a substring. The following example would return data sources with an animals
attribute that is a list containing a member that contains the substring at
(for example ["dog", "cat"]
).
+ * "stringContains": \{ "key": "animals", "value": "at" \}
+ *
Knowledge base data sources are returned if their metadata attributes fulfill all the filter conditions inside this list.
+ * @public + */ + export interface AndAllMember { + equals?: never; + notEquals?: never; + greaterThan?: never; + greaterThanOrEquals?: never; + lessThan?: never; + lessThanOrEquals?: never; + in?: never; + notIn?: never; + startsWith?: never; + listContains?: never; + stringContains?: never; + andAll: RetrievalFilter[]; + orAll?: never; + $unknown?: never; + } + + /** + *Knowledge base data sources are returned if their metadata attributes fulfill at least one of the filter conditions inside this list.
+ * @public + */ + export interface OrAllMember { + equals?: never; + notEquals?: never; + greaterThan?: never; + greaterThanOrEquals?: never; + lessThan?: never; + lessThanOrEquals?: never; + in?: never; + notIn?: never; + startsWith?: never; + listContains?: never; + stringContains?: never; + andAll?: never; + orAll: RetrievalFilter[]; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + equals?: never; + notEquals?: never; + greaterThan?: never; + greaterThanOrEquals?: never; + lessThan?: never; + lessThanOrEquals?: never; + in?: never; + notIn?: never; + startsWith?: never; + listContains?: never; + stringContains?: never; + andAll?: never; + orAll?: never; + $unknown: [string, any]; + } + + export interface VisitorConfigurations for how to perform the search query and return results. For more information, see Query configurations.
+ *This data type is used in the following API operations:
+ *
+ * Retrieve request – in the vectorSearchConfiguration
field
+ * RetrieveAndGenerate request – in the vectorSearchConfiguration
field
The number of source chunks to retrieve.
+ * @public + */ + numberOfResults?: number | undefined; + + /** + *By default, Amazon Bedrock decides a search strategy for you. If you're using an Amazon OpenSearch Serverless vector store that contains a filterable text field, you can specify whether to query the knowledge base with a HYBRID
search using both vector embeddings and raw text, or SEMANTIC
search using only vector embeddings. For other vector store configurations, only SEMANTIC
search is available. For more information, see Test a knowledge base.
Specifies the filters to use on the metadata in the knowledge base data sources before returning results. For more information, see Query configurations.
+ * @public + */ + filter?: RetrievalFilter | undefined; + + /** + *Contains configurations for reranking the retrieved results. For more information, see Improve the relevance of query responses with a reranker model.
+ * @public + */ + rerankingConfiguration?: VectorSearchRerankingConfiguration | undefined; + + /** + *Settings for implicit filtering.
+ * @public + */ + implicitFilterConfiguration?: ImplicitFilterConfiguration | undefined; +} + +/** + *Contains configurations for knowledge base query. For more information, see Query configurations.
+ *This data type is used in the following API operations:
+ *
+ * Retrieve request – in the retrievalConfiguration
field
+ * RetrieveAndGenerate request – in the retrievalConfiguration
field
Contains details about how the results from the vector search should be returned. For more information, see Query configurations.
+ * @public + */ + vectorSearchConfiguration: KnowledgeBaseVectorSearchConfiguration | undefined; +} + +/** + *+ * Details of the knowledge base associated withe inline agent. + *
+ * @public + */ +export interface KnowledgeBase { + /** + *+ * The unique identifier for a knowledge base associated with the inline agent. + *
+ * @public + */ + knowledgeBaseId: string | undefined; + + /** + *+ * The description of the knowledge base associated with the inline agent. + *
+ * @public + */ + description: string | undefined; + + /** + *+ * The configurations to apply to the knowledge base during query. For more information, see Query configurations. + *
+ * @public + */ + retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration | undefined; +} + +/** + *Configurations to apply to a knowledge base attached to the agent during query. For more information, see Knowledge base retrieval configurations.
+ * @public + */ +export interface KnowledgeBaseConfiguration { + /** + *The unique identifier for a knowledge base attached to the agent.
+ * @public + */ + knowledgeBaseId: string | undefined; + + /** + *The configurations to apply to the knowledge base during query. For more information, see Query configurations.
+ * @public + */ + retrievalConfiguration: KnowledgeBaseRetrievalConfiguration | undefined; +} + +/** + *Contains details about the resource being queried.
+ *This data type is used in the following API operations:
+ *
+ * Retrieve request – in the knowledgeBaseConfiguration
field
+ * RetrieveAndGenerate request – in the knowledgeBaseConfiguration
field
The unique identifier of the knowledge base that is queried.
+ * @public + */ + knowledgeBaseId: string | undefined; + + /** + *The ARN of the foundation model or inference profile used to generate a response.
+ * @public + */ + modelArn: string | undefined; + + /** + *Contains configurations for how to retrieve and return the knowledge base query.
+ * @public + */ + retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration | undefined; + + /** + *Contains configurations for response generation based on the knowledge base query results.
+ * @public + */ + generationConfiguration?: GenerationConfiguration | undefined; + + /** + *Settings for how the model processes the prompt prior to retrieval and generation.
+ * @public + */ + orchestrationConfiguration?: OrchestrationConfiguration | undefined; +} + +/** + * @public + */ +export interface RetrieveRequest { + /** + *The unique identifier of the knowledge base to query.
+ * @public + */ + knowledgeBaseId: string | undefined; + + /** + *Contains the query to send the knowledge base.
+ * @public + */ + retrievalQuery: KnowledgeBaseQuery | undefined; + + /** + *Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.
+ * @public + */ + retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration | undefined; + + /** + *Guardrail settings.
+ * @public + */ + guardrailConfiguration?: GuardrailConfiguration | undefined; + + /** + *If there are more results than can fit in the response, the response returns a nextToken
. Use this token in the nextToken
field of another request to retrieve the next batch of results.
Contains details about the resource being queried.
+ *This data type is used in the following API operations:
+ *
+ * RetrieveAndGenerate request – in the retrieveAndGenerateConfiguration
field
The type of resource that contains your data for retrieving information and generating responses.
+ *If you choose to use EXTERNAL_SOURCES
, then currently only Anthropic Claude 3 Sonnet models for knowledge bases are supported.
Contains details about the knowledge base for retrieving information and generating responses.
+ * @public + */ + knowledgeBaseConfiguration?: KnowledgeBaseRetrieveAndGenerateConfiguration | undefined; + + /** + *The configuration for the external source wrapper object in the retrieveAndGenerate
function.
+ * The unique identifier of the session. Use the same value across requests to continue the same conversation. + *
+ * @public + */ + sessionId: string | undefined; + + /** + *+ * The Amazon Resource Name (ARN) of the Amazon Web Services KMS key to use to encrypt your inline agent. + *
+ * @public + */ + customerEncryptionKeyArn?: string | undefined; + + /** + *+ * Specifies whether to end the session with the inline agent or not. + *
+ * @public + */ + endSession?: boolean | undefined; + + /** + *+ * Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see Using trace. + * + *
+ * @public + */ + enableTrace?: boolean | undefined; + + /** + *+ * The prompt text to send to the agent. + *
+ *If you include returnControlInvocationResults
in the sessionState
field, the inputText
field will be ignored.
+ * Parameters that specify the various attributes of a sessions. You can include attributes for the session or prompt or, if you configured an + * action group to return control, results from invocation of the action group. For more information, see Control session context. + *
+ *If you include returnControlInvocationResults
in the sessionState
field, the inputText
field will be ignored.
+ * The model identifier (ID) of the model to use for orchestration by the inline agent. For example, meta.llama3-1-70b-instruct-v1:0
.
+ *
+ * The instructions that tell the inline agent what it should do and how it should interact with users. + *
+ * @public + */ + instruction: string | undefined; + + /** + *
+ * The number of seconds for which the inline agent should maintain session information. After this time expires, the subsequent InvokeInlineAgent
request begins a new session.
+ *
A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and the data provided before the timeout is deleted.
+ * @public + */ + idleSessionTTLInSeconds?: number | undefined; + + /** + *+ * A list of action groups with each action group defining the action the inline agent needs to carry out. + *
+ * @public + */ + actionGroups?: AgentActionGroup[] | undefined; + + /** + *+ * Contains information of the knowledge bases to associate with. + *
+ * @public + */ + knowledgeBases?: KnowledgeBase[] | undefined; + + /** + *+ * The guardrails to assign to the inline agent. + *
+ * @public + */ + guardrailConfiguration?: GuardrailConfigurationWithArn | undefined; + + /** + *+ * Configurations for advanced prompts used to override the default prompts to enhance the accuracy of the inline agent. + *
+ * @public + */ + promptOverrideConfiguration?: PromptOverrideConfiguration | undefined; + + /** + *Model settings for the request.
+ * @public + */ + bedrockModelConfigurations?: InlineBedrockModelConfigurations | undefined; + + /** + *+ * Specifies the configurations for streaming. + *
+ *To use agent streaming, you need permissions to perform the bedrock:InvokeModelWithResponseStream
action.
The unique identifier of the session. When you first make a RetrieveAndGenerate
request, Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous interactions. You can't explicitly set the sessionId
yourself.
Contains the query to be made to the knowledge base.
+ * @public + */ + input: RetrieveAndGenerateInput | undefined; + + /** + *Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.
+ * @public + */ + retrieveAndGenerateConfiguration?: RetrieveAndGenerateConfiguration | undefined; + + /** + *Contains details about the session with the knowledge base.
+ * @public + */ + sessionConfiguration?: RetrieveAndGenerateSessionConfiguration | undefined; +} + +/** + * @public + */ +export interface RetrieveAndGenerateStreamRequest { + /** + *The unique identifier of the session. When you first make a RetrieveAndGenerate
request, Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous interactions. You can't explicitly set the sessionId
yourself.
Contains the query to be made to the knowledge base.
+ * @public + */ + input: RetrieveAndGenerateInput | undefined; + + /** + *Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.
+ * @public + */ + retrieveAndGenerateConfiguration?: RetrieveAndGenerateConfiguration | undefined; + + /** + *Contains details about the session with the knowledge base.
+ * @public + */ + sessionConfiguration?: RetrieveAndGenerateSessionConfiguration | undefined; +} + +/** + *Contains parameters that specify various attributes that persist across a session or prompt. You can define session state attributes as key-value pairs when writing a Lambda function for an action group or pass them when making an InvokeAgent request. Use session state attributes to control and provide conversational context for your agent and to help customize your agent's behavior. For more information, see Control session context.
+ * @public + */ +export interface SessionState { + /** + *Contains attributes that persist across a session and the values of those attributes.
+ * @public + */ + sessionAttributes?: RecordContains attributes that persist across a prompt and the values of those attributes. These attributes replace the $prompt_session_attributes$ placeholder variable in the orchestration prompt template. For more information, see Prompt template placeholder variables.
+ * @public + */ + promptSessionAttributes?: RecordContains information about the results from the action group invocation. For more information, see Return control to the agent developer and Control session context.
+ *If you include this field, the inputText
field will be ignored.
The identifier of the invocation of an action. This value must match the invocationId
returned in the InvokeAgent
response for the action whose results are provided in the returnControlInvocationResults
field. For more information, see Return control to the agent developer and Control session context.
Contains information about the files used by code interpreter.
+ * @public + */ + files?: InputFile[] | undefined; + + /** + *An array of configurations, each of which applies to a knowledge base attached to the agent.
+ * @public + */ + knowledgeBaseConfigurations?: KnowledgeBaseConfiguration[] | undefined; + + /** + *The state's conversation history.
+ * @public + */ + conversationHistory?: ConversationHistory | undefined; +} + +/** + * @public + */ +export interface InvokeAgentRequest { + /** + *Contains parameters that specify various attributes of the session. For more information, see Control session context.
+ *If you include returnControlInvocationResults
in the sessionState
field, the inputText
field will be ignored.
The unique identifier of the agent to use.
+ * @public + */ + agentId: string | undefined; + + /** + *The alias of the agent to use.
+ * @public + */ + agentAliasId: string | undefined; + + /** + *The unique identifier of the session. Use the same value across requests to continue the same conversation.
+ * @public + */ + sessionId: string | undefined; + + /** + *Specifies whether to end the session with the agent or not.
+ * @public + */ + endSession?: boolean | undefined; + + /** + *Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see Trace enablement.
+ * @public + */ + enableTrace?: boolean | undefined; + + /** + *The prompt text to send the agent.
+ *If you include returnControlInvocationResults
in the sessionState
field, the inputText
field will be ignored.
The unique identifier of the agent memory.
+ * @public + */ + memoryId?: string | undefined; + + /** + *Model performance settings for the request.
+ * @public + */ + bedrockModelConfigurations?: BedrockModelConfigurations | undefined; + + /** + *+ * Specifies the configurations for streaming. + *
+ *To use agent streaming, you need permissions to perform the bedrock:InvokeModelWithResponseStream
action.
The ARN of the resource making the request.
+ * @public + */ + sourceArn?: string | undefined; +} + +/** + * @internal + */ +export const RetrievalFilterFilterSensitiveLog = (obj: RetrievalFilter): any => { + if (obj.equals !== undefined) return { equals: obj.equals }; + if (obj.notEquals !== undefined) return { notEquals: obj.notEquals }; + if (obj.greaterThan !== undefined) return { greaterThan: obj.greaterThan }; + if (obj.greaterThanOrEquals !== undefined) return { greaterThanOrEquals: obj.greaterThanOrEquals }; + if (obj.lessThan !== undefined) return { lessThan: obj.lessThan }; + if (obj.lessThanOrEquals !== undefined) return { lessThanOrEquals: obj.lessThanOrEquals }; + if (obj.in !== undefined) return { in: obj.in }; + if (obj.notIn !== undefined) return { notIn: obj.notIn }; + if (obj.startsWith !== undefined) return { startsWith: obj.startsWith }; + if (obj.listContains !== undefined) return { listContains: obj.listContains }; + if (obj.stringContains !== undefined) return { stringContains: obj.stringContains }; + if (obj.andAll !== undefined) return { andAll: SENSITIVE_STRING }; + if (obj.orAll !== undefined) return { orAll: SENSITIVE_STRING }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; +}; + +/** + * @internal + */ +export const KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog = ( + obj: KnowledgeBaseVectorSearchConfiguration +): any => ({ + ...obj, + ...(obj.filter && { filter: SENSITIVE_STRING }), + ...(obj.rerankingConfiguration && { + rerankingConfiguration: VectorSearchRerankingConfigurationFilterSensitiveLog(obj.rerankingConfiguration), + }), + ...(obj.implicitFilterConfiguration && { + implicitFilterConfiguration: ImplicitFilterConfigurationFilterSensitiveLog(obj.implicitFilterConfiguration), + }), +}); + +/** + * @internal + */ +export const KnowledgeBaseRetrievalConfigurationFilterSensitiveLog = ( + obj: KnowledgeBaseRetrievalConfiguration +): any => ({ + ...obj, + ...(obj.vectorSearchConfiguration && { + vectorSearchConfiguration: KnowledgeBaseVectorSearchConfigurationFilterSensitiveLog(obj.vectorSearchConfiguration), + }), +}); + +/** + * @internal + */ +export const KnowledgeBaseFilterSensitiveLog = (obj: KnowledgeBase): any => ({ + ...obj, + ...(obj.description && { description: SENSITIVE_STRING }), + ...(obj.retrievalConfiguration && { + retrievalConfiguration: KnowledgeBaseRetrievalConfigurationFilterSensitiveLog(obj.retrievalConfiguration), + }), +}); + +/** + * @internal + */ +export const KnowledgeBaseConfigurationFilterSensitiveLog = (obj: KnowledgeBaseConfiguration): any => ({ + ...obj, + ...(obj.retrievalConfiguration && { + retrievalConfiguration: KnowledgeBaseRetrievalConfigurationFilterSensitiveLog(obj.retrievalConfiguration), + }), +}); + +/** + * @internal + */ +export const KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog = ( + obj: KnowledgeBaseRetrieveAndGenerateConfiguration +): any => ({ + ...obj, + ...(obj.retrievalConfiguration && { + retrievalConfiguration: KnowledgeBaseRetrievalConfigurationFilterSensitiveLog(obj.retrievalConfiguration), + }), + ...(obj.generationConfiguration && { + generationConfiguration: GenerationConfigurationFilterSensitiveLog(obj.generationConfiguration), + }), + ...(obj.orchestrationConfiguration && { + orchestrationConfiguration: OrchestrationConfigurationFilterSensitiveLog(obj.orchestrationConfiguration), + }), +}); + +/** + * @internal + */ +export const RetrieveRequestFilterSensitiveLog = (obj: RetrieveRequest): any => ({ + ...obj, + ...(obj.retrievalQuery && { retrievalQuery: SENSITIVE_STRING }), + ...(obj.retrievalConfiguration && { + retrievalConfiguration: KnowledgeBaseRetrievalConfigurationFilterSensitiveLog(obj.retrievalConfiguration), + }), +}); + +/** + * @internal + */ +export const RetrieveAndGenerateConfigurationFilterSensitiveLog = (obj: RetrieveAndGenerateConfiguration): any => ({ + ...obj, + ...(obj.knowledgeBaseConfiguration && { + knowledgeBaseConfiguration: KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog( + obj.knowledgeBaseConfiguration + ), + }), + ...(obj.externalSourcesConfiguration && { + externalSourcesConfiguration: ExternalSourcesRetrieveAndGenerateConfigurationFilterSensitiveLog( + obj.externalSourcesConfiguration + ), + }), +}); + +/** + * @internal + */ +export const InvokeInlineAgentRequestFilterSensitiveLog = (obj: InvokeInlineAgentRequest): any => ({ + ...obj, + ...(obj.inputText && { inputText: SENSITIVE_STRING }), + ...(obj.inlineSessionState && { inlineSessionState: InlineSessionStateFilterSensitiveLog(obj.inlineSessionState) }), + ...(obj.instruction && { instruction: SENSITIVE_STRING }), + ...(obj.actionGroups && { actionGroups: obj.actionGroups.map((item) => AgentActionGroupFilterSensitiveLog(item)) }), + ...(obj.knowledgeBases && { + knowledgeBases: obj.knowledgeBases.map((item) => KnowledgeBaseFilterSensitiveLog(item)), + }), + ...(obj.promptOverrideConfiguration && { promptOverrideConfiguration: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const RetrieveAndGenerateRequestFilterSensitiveLog = (obj: RetrieveAndGenerateRequest): any => ({ + ...obj, + ...(obj.input && { input: SENSITIVE_STRING }), + ...(obj.retrieveAndGenerateConfiguration && { + retrieveAndGenerateConfiguration: RetrieveAndGenerateConfigurationFilterSensitiveLog( + obj.retrieveAndGenerateConfiguration + ), + }), +}); + +/** + * @internal + */ +export const RetrieveAndGenerateStreamRequestFilterSensitiveLog = (obj: RetrieveAndGenerateStreamRequest): any => ({ + ...obj, + ...(obj.input && { input: SENSITIVE_STRING }), + ...(obj.retrieveAndGenerateConfiguration && { + retrieveAndGenerateConfiguration: RetrieveAndGenerateConfigurationFilterSensitiveLog( + obj.retrieveAndGenerateConfiguration + ), + }), +}); + +/** + * @internal + */ +export const SessionStateFilterSensitiveLog = (obj: SessionState): any => ({ + ...obj, + ...(obj.returnControlInvocationResults && { + returnControlInvocationResults: obj.returnControlInvocationResults.map((item) => + InvocationResultMemberFilterSensitiveLog(item) + ), + }), + ...(obj.files && { files: obj.files.map((item) => InputFileFilterSensitiveLog(item)) }), + ...(obj.knowledgeBaseConfigurations && { + knowledgeBaseConfigurations: obj.knowledgeBaseConfigurations.map((item) => + KnowledgeBaseConfigurationFilterSensitiveLog(item) + ), + }), + ...(obj.conversationHistory && { + conversationHistory: ConversationHistoryFilterSensitiveLog(obj.conversationHistory), + }), +}); + +/** + * @internal + */ +export const InvokeAgentRequestFilterSensitiveLog = (obj: InvokeAgentRequest): any => ({ + ...obj, + ...(obj.sessionState && { sessionState: SessionStateFilterSensitiveLog(obj.sessionState) }), + ...(obj.inputText && { inputText: SENSITIVE_STRING }), +}); diff --git a/clients/client-bedrock-agent-runtime/src/pagination/ListInvocationStepsPaginator.ts b/clients/client-bedrock-agent-runtime/src/pagination/ListInvocationStepsPaginator.ts new file mode 100644 index 0000000000000..402e29d0bf534 --- /dev/null +++ b/clients/client-bedrock-agent-runtime/src/pagination/ListInvocationStepsPaginator.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { createPaginator } from "@smithy/core"; +import { Paginator } from "@smithy/types"; + +import { BedrockAgentRuntimeClient } from "../BedrockAgentRuntimeClient"; +import { + ListInvocationStepsCommand, + ListInvocationStepsCommandInput, + ListInvocationStepsCommandOutput, +} from "../commands/ListInvocationStepsCommand"; +import { BedrockAgentRuntimePaginationConfiguration } from "./Interfaces"; + +/** + * @public + */ +export const paginateListInvocationSteps: ( + config: BedrockAgentRuntimePaginationConfiguration, + input: ListInvocationStepsCommandInput, + ...rest: any[] +) => PaginatorContains configurations for a reranker model.
" } }, + "com.amazonaws.bedrockagentruntime#BedrockSessionContentBlock": { + "type": "union", + "members": { + "text": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The text in the invocation step.
", + "smithy.api#length": { + "min": 1 + } + } + }, + "image": { + "target": "com.amazonaws.bedrockagentruntime#ImageBlock", + "traits": { + "smithy.api#documentation": "The image in the invocation step.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A block of content that you pass to, or receive from, a Amazon Bedrock session in an invocation step. You pass the content to a\n session in the payLoad
of the PutInvocationStep API operation.\n You retrieve the content with the GetInvocationStep API operation.
For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.bedrockagentruntime#BedrockSessionContentBlocks": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrockagentruntime#BedrockSessionContentBlock" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, "com.amazonaws.bedrockagentruntime#ByteContentBlob": { "type": "blob", "traits": { @@ -1760,6 +1801,204 @@ } } }, + "com.amazonaws.bedrockagentruntime#CreateInvocation": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrockagentruntime#CreateInvocationRequest" + }, + "output": { + "target": "com.amazonaws.bedrockagentruntime#CreateInvocationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrockagentruntime#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ConflictException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#InternalServerException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates a new invocation within a session. An invocation groups the related invocation steps that store the content from\n a conversation. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
\nRelated APIs
\n\n ListInvocations\n
\n\n ListSessions\n
\n\n GetSession\n
\nA unique identifier for the invocation in UUID format.
" + } + }, + "description": { + "target": "com.amazonaws.bedrockagentruntime#InvocationDescription", + "traits": { + "smithy.api#documentation": "A description for the interactions in the invocation. For example, \"User asking about weather in Seattle\".
" + } + }, + "sessionIdentifier": { + "target": "com.amazonaws.bedrockagentruntime#SessionIdentifier", + "traits": { + "smithy.api#documentation": "The unique identifier for the associated session for the invocation. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).\n
The unique identifier for the session associated with the invocation.
", + "smithy.api#required": {} + } + }, + "invocationId": { + "target": "com.amazonaws.bedrockagentruntime#Uuid", + "traits": { + "smithy.api#documentation": "The unique identifier for the invocation.
", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "com.amazonaws.bedrockagentruntime#DateTimestamp", + "traits": { + "smithy.api#documentation": "The timestamp for when the invocation was created.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrockagentruntime#CreateSession": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrockagentruntime#CreateSessionRequest" + }, + "output": { + "target": "com.amazonaws.bedrockagentruntime#CreateSessionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrockagentruntime#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ConflictException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#InternalServerException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates a session to temporarily store conversations for generative AI (GenAI) applications built with open-source\n frameworks such as LangGraph and LlamaIndex. Sessions enable you to save the state of\n conversations at checkpoints, with the added security and infrastructure of Amazon Web Services. For more information, see\n Store and retrieve conversation history and context with Amazon Bedrock sessions.
\nBy default, Amazon Bedrock uses Amazon Web Services-managed keys for session encryption, including session metadata,\n or you can use your own KMS key. For more information, see Amazon Bedrock session encryption.
\n\n You use a session to store state and conversation history for generative AI applications built with open-source frameworks. \n For Amazon Bedrock Agents, the service automatically manages conversation context and associates them with the agent-specific sessionId you specify in the \n InvokeAgent API operation.\n
\nRelated APIs:
\n\n ListSessions\n
\n\n GetSession\n
\n\n EndSession\n
\n\n DeleteSession\n
\nA map of key-value pairs containing attributes to be persisted across the session. For example, the user's ID, their language preference, \n and the type of device they are using.
" + } + }, + "encryptionKeyArn": { + "target": "com.amazonaws.bedrockagentruntime#KmsKeyArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the KMS key to use to encrypt the session data. The user or role creating the session must have permission to use the key.\n For more information, see Amazon Bedrock session encryption.\n
" + } + }, + "tags": { + "target": "com.amazonaws.bedrockagentruntime#TagsMap", + "traits": { + "smithy.api#documentation": "Specify the key-value pairs for the tags that you want to attach to the session.
" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrockagentruntime#CreateSessionResponse": { + "type": "structure", + "members": { + "sessionId": { + "target": "com.amazonaws.bedrockagentruntime#Uuid", + "traits": { + "smithy.api#documentation": "The unique identifier for the session.
", + "smithy.api#required": {} + } + }, + "sessionArn": { + "target": "com.amazonaws.bedrockagentruntime#SessionArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the created session.
", + "smithy.api#required": {} + } + }, + "sessionStatus": { + "target": "com.amazonaws.bedrockagentruntime#SessionStatus", + "traits": { + "smithy.api#documentation": "The current status of the session.
", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "com.amazonaws.bedrockagentruntime#DateTimestamp", + "traits": { + "smithy.api#documentation": "The timestamp for when the session was created.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.bedrockagentruntime#CreationMode": { "type": "enum", "members": { @@ -1923,6 +2162,67 @@ "smithy.api#output": {} } }, + "com.amazonaws.bedrockagentruntime#DeleteSession": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrockagentruntime#DeleteSessionRequest" + }, + "output": { + "target": "com.amazonaws.bedrockagentruntime#DeleteSessionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrockagentruntime#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ConflictException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#InternalServerException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes a session that you ended. You can't delete a session with an ACTIVE
status. To delete an active session, you must first end it with the \n EndSession API operation.\n For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
The unique identifier for the session to be deleted. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
Ends the session. \n After you end a session, you can still access its content but you can’t add to it. To delete the session and it's content, you use the DeleteSession API operation.\n For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
", + "smithy.api#http": { + "code": 200, + "method": "PATCH", + "uri": "/sessions/{sessionIdentifier}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.bedrockagentruntime#EndSessionRequest": { + "type": "structure", + "members": { + "sessionIdentifier": { + "target": "com.amazonaws.bedrockagentruntime#SessionIdentifier", + "traits": { + "smithy.api#documentation": "The unique identifier for the session to end. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
The unique identifier of the session you ended.
", + "smithy.api#required": {} + } + }, + "sessionArn": { + "target": "com.amazonaws.bedrockagentruntime#SessionArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the session you ended.
", + "smithy.api#required": {} + } + }, + "sessionStatus": { + "target": "com.amazonaws.bedrockagentruntime#SessionStatus", + "traits": { + "smithy.api#documentation": "The current status of the session you ended.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrockagentruntime#ExecutionType": { + "type": "enum", + "members": { + "LAMBDA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LAMBDA" + } + }, + "RETURN_CONTROL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETURN_CONTROL" + } + } + } + }, + "com.amazonaws.bedrockagentruntime#ExternalSource": { "type": "structure", "members": { "sourceType": { @@ -3351,6 +3734,193 @@ "smithy.api#output": {} } }, + "com.amazonaws.bedrockagentruntime#GetInvocationStep": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrockagentruntime#GetInvocationStepRequest" + }, + "output": { + "target": "com.amazonaws.bedrockagentruntime#GetInvocationStepResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrockagentruntime#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#InternalServerException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Retrieves the details of a specific invocation step within an invocation in a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/sessions/{sessionIdentifier}/invocationSteps/{invocationStepId}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bedrockagentruntime#GetInvocationStepRequest": { + "type": "structure", + "members": { + "invocationIdentifier": { + "target": "com.amazonaws.bedrockagentruntime#InvocationIdentifier", + "traits": { + "smithy.api#documentation": "The unique identifier for the invocation in UUID format.
", + "smithy.api#required": {} + } + }, + "invocationStepId": { + "target": "com.amazonaws.bedrockagentruntime#Uuid", + "traits": { + "smithy.api#documentation": "The unique identifier (in UUID format) for the specific invocation step to retrieve.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "sessionIdentifier": { + "target": "com.amazonaws.bedrockagentruntime#SessionIdentifier", + "traits": { + "smithy.api#documentation": "The unique identifier for the invocation step's associated session. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
The complete details of the requested invocation step.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrockagentruntime#GetSession": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrockagentruntime#GetSessionRequest" + }, + "output": { + "target": "com.amazonaws.bedrockagentruntime#GetSessionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrockagentruntime#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#InternalServerException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Retrieves details about a specific session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/sessions/{sessionIdentifier}/" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bedrockagentruntime#GetSessionRequest": { + "type": "structure", + "members": { + "sessionIdentifier": { + "target": "com.amazonaws.bedrockagentruntime#SessionIdentifier", + "traits": { + "smithy.api#documentation": "A unique identifier for the session to retrieve. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
The unique identifier for the session in UUID format.
", + "smithy.api#required": {} + } + }, + "sessionArn": { + "target": "com.amazonaws.bedrockagentruntime#SessionArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the session.
", + "smithy.api#required": {} + } + }, + "sessionStatus": { + "target": "com.amazonaws.bedrockagentruntime#SessionStatus", + "traits": { + "smithy.api#documentation": "The current status of the session.
", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "com.amazonaws.bedrockagentruntime#DateTimestamp", + "traits": { + "smithy.api#documentation": "The timestamp for when the session was created.
", + "smithy.api#required": {} + } + }, + "lastUpdatedAt": { + "target": "com.amazonaws.bedrockagentruntime#DateTimestamp", + "traits": { + "smithy.api#documentation": "The timestamp for when the session was last modified.
", + "smithy.api#required": {} + } + }, + "sessionMetadata": { + "target": "com.amazonaws.bedrockagentruntime#SessionMetadataMap", + "traits": { + "smithy.api#documentation": "A map of key-value pairs containing attributes persisted across the session.
" + } + }, + "encryptionKeyArn": { + "target": "com.amazonaws.bedrockagentruntime#KmsKeyArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the Key Management Service key used to encrypt the session data.\n For more information, see Amazon Bedrock session encryption.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.bedrockagentruntime#GuadrailAction": { "type": "enum", "members": { @@ -4174,67 +4744,141 @@ "smithy.api#sensitive": {} } }, - "com.amazonaws.bedrockagentruntime#ImplicitFilterConfiguration": { + "com.amazonaws.bedrockagentruntime#ImageBlock": { "type": "structure", "members": { - "metadataAttributes": { - "target": "com.amazonaws.bedrockagentruntime#MetadataAttributeSchemaList", + "format": { + "target": "com.amazonaws.bedrockagentruntime#ImageFormat", "traits": { - "smithy.api#documentation": "Metadata that can be used in a filter.
", + "smithy.api#documentation": "The format of the image.
", "smithy.api#required": {} } }, - "modelArn": { - "target": "com.amazonaws.bedrockagentruntime#BedrockModelArn", + "source": { + "target": "com.amazonaws.bedrockagentruntime#ImageSource", "traits": { - "smithy.api#documentation": "The model that generates the filter.
", + "smithy.api#documentation": "The source for the image.
", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "Settings for implicit filtering, where a model generates a metadata filter based on the prompt.
" - } - }, - "com.amazonaws.bedrockagentruntime#InferenceConfig": { - "type": "structure", - "members": { - "textInferenceConfig": { - "target": "com.amazonaws.bedrockagentruntime#TextInferenceConfig", - "traits": { - "smithy.api#documentation": "Configuration settings specific to text generation while generating responses using RetrieveAndGenerate.
" - } - } - }, - "traits": { - "smithy.api#documentation": "The configuration for inference settings when generating responses using RetrieveAndGenerate.
" + "smithy.api#documentation": "Image content for an invocation step.
" } }, - "com.amazonaws.bedrockagentruntime#InferenceConfiguration": { - "type": "structure", + "com.amazonaws.bedrockagentruntime#ImageFormat": { + "type": "enum", "members": { - "temperature": { - "target": "com.amazonaws.bedrockagentruntime#Temperature", + "PNG": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "The likelihood of the model selecting higher-probability options while generating a response. A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower-probability options.
" + "smithy.api#enumValue": "png" } }, - "topP": { - "target": "com.amazonaws.bedrockagentruntime#TopP", + "JPEG": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for Top P
determines the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set topP
to 0.8, the model only selects the next token from the top 80% of the probability distribution of next tokens.
While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for topK
is the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set topK
to 50, the model selects the next token from among the top 50 most likely choices.
The maximum number of tokens allowed in the generated response.
" + "smithy.api#enumValue": "webp" + } + } + } + }, + "com.amazonaws.bedrockagentruntime#ImageSource": { + "type": "union", + "members": { + "bytes": { + "target": "smithy.api#Blob", + "traits": { + "smithy.api#documentation": "The raw image bytes for the image. If you use an Amazon Web Services SDK, you don't need to encode the image bytes in base64.
", + "smithy.api#length": { + "min": 1 + } + } + }, + "s3Location": { + "target": "com.amazonaws.bedrockagentruntime#S3Location", + "traits": { + "smithy.api#documentation": "The path to the Amazon S3 bucket where the image is stored.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The source for an image.
" + } + }, + "com.amazonaws.bedrockagentruntime#ImplicitFilterConfiguration": { + "type": "structure", + "members": { + "metadataAttributes": { + "target": "com.amazonaws.bedrockagentruntime#MetadataAttributeSchemaList", + "traits": { + "smithy.api#documentation": "Metadata that can be used in a filter.
", + "smithy.api#required": {} + } + }, + "modelArn": { + "target": "com.amazonaws.bedrockagentruntime#BedrockModelArn", + "traits": { + "smithy.api#documentation": "The model that generates the filter.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Settings for implicit filtering, where a model generates a metadata filter based on the prompt.
" + } + }, + "com.amazonaws.bedrockagentruntime#InferenceConfig": { + "type": "structure", + "members": { + "textInferenceConfig": { + "target": "com.amazonaws.bedrockagentruntime#TextInferenceConfig", + "traits": { + "smithy.api#documentation": "Configuration settings specific to text generation while generating responses using RetrieveAndGenerate.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The configuration for inference settings when generating responses using RetrieveAndGenerate.
" + } + }, + "com.amazonaws.bedrockagentruntime#InferenceConfiguration": { + "type": "structure", + "members": { + "temperature": { + "target": "com.amazonaws.bedrockagentruntime#Temperature", + "traits": { + "smithy.api#documentation": "The likelihood of the model selecting higher-probability options while generating a response. A lower value makes the model more likely to choose higher-probability options, while a higher value makes the model more likely to choose lower-probability options.
" + } + }, + "topP": { + "target": "com.amazonaws.bedrockagentruntime#TopP", + "traits": { + "smithy.api#documentation": "While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for Top P
determines the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set topP
to 0.8, the model only selects the next token from the top 80% of the probability distribution of next tokens.
While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for topK
is the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set topK
to 50, the model selects the next token from among the top 50 most likely choices.
The maximum number of tokens allowed in the generated response.
" } }, "stopSequences": { @@ -4577,6 +5221,21 @@ "smithy.api#httpError": 500 } }, + "com.amazonaws.bedrockagentruntime#InvocationDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, + "com.amazonaws.bedrockagentruntime#InvocationIdentifier": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$" + } + }, "com.amazonaws.bedrockagentruntime#InvocationInput": { "type": "structure", "members": { @@ -4654,6 +5313,23 @@ } } }, + "com.amazonaws.bedrockagentruntime#InvocationResource": { + "type": "resource", + "identifiers": { + "sessionIdentifier": { + "target": "com.amazonaws.bedrockagentruntime#SessionIdentifier" + }, + "invocationIdentifier": { + "target": "com.amazonaws.bedrockagentruntime#InvocationIdentifier" + } + }, + "create": { + "target": "com.amazonaws.bedrockagentruntime#CreateInvocation" + }, + "list": { + "target": "com.amazonaws.bedrockagentruntime#ListInvocations" + } + }, "com.amazonaws.bedrockagentruntime#InvocationResultMember": { "type": "union", "members": { @@ -4674,6 +5350,163 @@ "smithy.api#documentation": "A result from the invocation of an action. For more information, see Return control to the agent developer and Control session context.
\nThis data type is used in the following API operations:
\n\n InvokeAgent request\n
\nThe unique identifier of the session containing the invocation step.
", + "smithy.api#required": {} + } + }, + "invocationId": { + "target": "com.amazonaws.bedrockagentruntime#Uuid", + "traits": { + "smithy.api#documentation": "The unique identifier (in UUID format) for the invocation that includes the invocation step.
", + "smithy.api#required": {} + } + }, + "invocationStepId": { + "target": "com.amazonaws.bedrockagentruntime#Uuid", + "traits": { + "smithy.api#documentation": "The unique identifier (in UUID format) for the invocation step.
", + "smithy.api#required": {} + } + }, + "invocationStepTime": { + "target": "com.amazonaws.bedrockagentruntime#DateTimestamp", + "traits": { + "smithy.api#documentation": "The timestamp for when the invocation step was created.
", + "smithy.api#required": {} + } + }, + "payload": { + "target": "com.amazonaws.bedrockagentruntime#InvocationStepPayload", + "traits": { + "smithy.api#documentation": "Payload content, such as text and images, for the invocation step.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Stores fine-grained state checkpoints, including text and images, for each interaction in an invocation in a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
" + } + }, + "com.amazonaws.bedrockagentruntime#InvocationStepPayload": { + "type": "union", + "members": { + "contentBlocks": { + "target": "com.amazonaws.bedrockagentruntime#BedrockSessionContentBlocks", + "traits": { + "smithy.api#documentation": "The content for the invocation step.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Payload content, such as text and images, for the invocation step.
" + } + }, + "com.amazonaws.bedrockagentruntime#InvocationStepResource": { + "type": "resource", + "identifiers": { + "sessionIdentifier": { + "target": "com.amazonaws.bedrockagentruntime#SessionIdentifier" + }, + "invocationIdentifier": { + "target": "com.amazonaws.bedrockagentruntime#InvocationIdentifier" + }, + "invocationStepId": { + "target": "com.amazonaws.bedrockagentruntime#Uuid" + } + }, + "create": { + "target": "com.amazonaws.bedrockagentruntime#PutInvocationStep" + }, + "read": { + "target": "com.amazonaws.bedrockagentruntime#GetInvocationStep" + }, + "list": { + "target": "com.amazonaws.bedrockagentruntime#ListInvocationSteps" + } + }, + "com.amazonaws.bedrockagentruntime#InvocationStepSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrockagentruntime#InvocationStepSummary" + } + }, + "com.amazonaws.bedrockagentruntime#InvocationStepSummary": { + "type": "structure", + "members": { + "sessionId": { + "target": "com.amazonaws.bedrockagentruntime#Uuid", + "traits": { + "smithy.api#documentation": "The unique identifier for the session associated with the invocation step.
", + "smithy.api#required": {} + } + }, + "invocationId": { + "target": "com.amazonaws.bedrockagentruntime#Uuid", + "traits": { + "smithy.api#documentation": "A unique identifier for the invocation in UUID format.
", + "smithy.api#required": {} + } + }, + "invocationStepId": { + "target": "com.amazonaws.bedrockagentruntime#Uuid", + "traits": { + "smithy.api#documentation": "The unique identifier (in UUID format) for the invocation step.
", + "smithy.api#required": {} + } + }, + "invocationStepTime": { + "target": "com.amazonaws.bedrockagentruntime#DateTimestamp", + "traits": { + "smithy.api#documentation": "The timestamp for when the invocation step was created.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contains details about an invocation step within an invocation in a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
" + } + }, + "com.amazonaws.bedrockagentruntime#InvocationSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrockagentruntime#InvocationSummary" + } + }, + "com.amazonaws.bedrockagentruntime#InvocationSummary": { + "type": "structure", + "members": { + "sessionId": { + "target": "com.amazonaws.bedrockagentruntime#Uuid", + "traits": { + "smithy.api#documentation": "The unique identifier for the session associated with the invocation.
", + "smithy.api#required": {} + } + }, + "invocationId": { + "target": "com.amazonaws.bedrockagentruntime#Uuid", + "traits": { + "smithy.api#documentation": "A unique identifier for the invocation in UUID format.
", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "com.amazonaws.bedrockagentruntime#DateTimestamp", + "traits": { + "smithy.api#documentation": "The timestamp for when the invocation was created.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contains details about an invocation in a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
" + } + }, "com.amazonaws.bedrockagentruntime#InvocationType": { "type": "enum", "members": { @@ -5483,32 +6316,371 @@ "smithy.api#pattern": "^arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}(-gov)?-[a-z]+-\\d{1}:\\d{12}:function:[a-zA-Z0-9-_\\.]+(:(\\$LATEST|[a-zA-Z0-9-_]+))?$" } }, - "com.amazonaws.bedrockagentruntime#MaxResults": { - "type": "integer", - "traits": { - "smithy.api#documentation": "Max Results.", - "smithy.api#range": { - "min": 1, - "max": 1000 + "com.amazonaws.bedrockagentruntime#ListInvocationSteps": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrockagentruntime#ListInvocationStepsRequest" + }, + "output": { + "target": "com.amazonaws.bedrockagentruntime#ListInvocationStepsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrockagentruntime#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#InternalServerException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ValidationException" } - } - }, - "com.amazonaws.bedrockagentruntime#MaxTokens": { - "type": "integer", + ], "traits": { - "smithy.api#range": { - "min": 0, - "max": 65536 - } + "smithy.api#documentation": "Lists all invocation steps associated with a session and optionally, an invocation within the session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/sessions/{sessionIdentifier}/invocationSteps/" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "invocationStepSummaries" + }, + "smithy.api#readonly": {} } }, - "com.amazonaws.bedrockagentruntime#MaximumLength": { - "type": "integer", - "traits": { - "smithy.api#range": { - "min": 0, - "max": 8192 - } + "com.amazonaws.bedrockagentruntime#ListInvocationStepsRequest": { + "type": "structure", + "members": { + "invocationIdentifier": { + "target": "com.amazonaws.bedrockagentruntime#InvocationIdentifier", + "traits": { + "smithy.api#documentation": "The unique identifier (in UUID format) for the invocation to list invocation steps for.
" + } + }, + "nextToken": { + "target": "com.amazonaws.bedrockagentruntime#NextToken", + "traits": { + "smithy.api#documentation": "If the total number of results is greater than the maxResults
value provided in the request, enter the\n token returned in the nextToken
field in the response in this field to return the next batch of results.\n
The maximum number of results to return in the response. If the total number of results is greater than this value,\n use the token returned in the response in the nextToken
field when making another request to return the next\n batch of results.
The unique identifier for the session associated with the invocation steps. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
A list of summaries for each invocation step associated with a session and if you specified it, an invocation within the session.
", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.bedrockagentruntime#NextToken", + "traits": { + "smithy.api#documentation": "If the total number of results is greater than the maxResults
value provided in the request, use this token when making another request in the nextToken
field to return the next batch of results.
Lists all invocations associated with a specific session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/sessions/{sessionIdentifier}/invocations/" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "invocationSummaries" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bedrockagentruntime#ListInvocationsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.bedrockagentruntime#NextToken", + "traits": { + "smithy.api#documentation": "If the total number of results is greater than the maxResults
value provided in the request, enter the\n token returned in the nextToken
field in the response in this field to return the next batch of results.\n
The maximum number of results to return in the response. If the total number of results is greater than this value,\n use the token returned in the response in the nextToken
field when making another request to return the next\n batch of results.
The unique identifier for the session to list invocations for. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
A list of invocation summaries associated with the session.
", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.bedrockagentruntime#NextToken", + "traits": { + "smithy.api#documentation": "If the total number of results is greater than the maxResults
value provided in the request, use this token when making another request in the nextToken
field to return the next batch of results.
Lists all sessions in your Amazon Web Services account. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/sessions/" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "sessionSummaries" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bedrockagentruntime#ListSessionsRequest": { + "type": "structure", + "members": { + "maxResults": { + "target": "com.amazonaws.bedrockagentruntime#MaxResults", + "traits": { + "smithy.api#default": 10, + "smithy.api#documentation": "The maximum number of results to return in the response. If the total number of results is greater than this value,\n use the token returned in the response in the nextToken
field when making another request to return the next\n batch of results.
If the total number of results is greater than the maxResults
value provided in the request, enter the\n token returned in the nextToken
field in the response in this field to return the next batch of results.\n
A list of summaries for each session in your Amazon Web Services account.
", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.bedrockagentruntime#NextToken", + "traits": { + "smithy.api#documentation": "If the total number of results is greater than the maxResults
value provided in the request, use this token when making another request in the nextToken
field to return the next batch of results.
List all the tags for the resource you specify.
", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/tags/{resourceArn}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bedrockagentruntime#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.bedrockagentruntime#TaggableResourcesArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the resource for which to list tags.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrockagentruntime#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.bedrockagentruntime#TagsMap", + "traits": { + "smithy.api#documentation": "The key-value pairs for the tags associated with the resource.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrockagentruntime#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#documentation": "Max Results.", + "smithy.api#range": { + "min": 1, + "max": 1000 + } + } + }, + "com.amazonaws.bedrockagentruntime#MaxTokens": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 0, + "max": 65536 + } + } + }, + "com.amazonaws.bedrockagentruntime#MaximumLength": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 0, + "max": 8192 + } } }, "com.amazonaws.bedrockagentruntime#Memories": { @@ -6831,7 +8003,106 @@ "smithy.api#documentation": "Contains the parameters in the request body.
" } }, - "com.amazonaws.bedrockagentruntime#QueryGenerationInput": { + "com.amazonaws.bedrockagentruntime#PutInvocationStep": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrockagentruntime#PutInvocationStepRequest" + }, + "output": { + "target": "com.amazonaws.bedrockagentruntime#PutInvocationStepResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrockagentruntime#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ConflictException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#InternalServerException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Add an invocation step to an invocation in a session. An invocation step stores fine-grained state checkpoints, including text and images, for each interaction. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
\nRelated APIs:
\n\n GetInvocationStep\n
\n\n ListInvocationSteps\n
\n\n ListInvocations\n
\n\n ListSessions\n
\nThe unique identifier for the session to add the invocation step to. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
The unique identifier (in UUID format) of the invocation to add the invocation step to.
", + "smithy.api#required": {} + } + }, + "invocationStepTime": { + "target": "com.amazonaws.bedrockagentruntime#DateTimestamp", + "traits": { + "smithy.api#documentation": "The timestamp for when the invocation step occurred.
", + "smithy.api#required": {} + } + }, + "payload": { + "target": "com.amazonaws.bedrockagentruntime#InvocationStepPayload", + "traits": { + "smithy.api#documentation": "The payload for the invocation step, including text and images for the interaction.
", + "smithy.api#required": {} + } + }, + "invocationStepId": { + "target": "com.amazonaws.bedrockagentruntime#Uuid", + "traits": { + "smithy.api#documentation": "The unique identifier of the invocation step in UUID format.
" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrockagentruntime#PutInvocationStepResponse": { + "type": "structure", + "members": { + "invocationStepId": { + "target": "com.amazonaws.bedrockagentruntime#Uuid", + "traits": { + "smithy.api#documentation": "The unique identifier of the invocation step in UUID format.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrockagentruntime#QueryGenerationInput": { "type": "structure", "members": { "type": { @@ -7351,7 +8622,7 @@ "smithy.api#documentation": "The text of the document.
", "smithy.api#length": { "min": 1, - "max": 9000 + "max": 32000 } } } @@ -8174,7 +9445,7 @@ "type": { "target": "com.amazonaws.bedrockagentruntime#RetrieveAndGenerateType", "traits": { - "smithy.api#documentation": "The type of resource that contains your data for retrieving information and generating responses.
\nIf you choose ot use EXTERNAL_SOURCES
, then currently only Claude 3 Sonnet models for knowledge bases are supported.
The type of resource that contains your data for retrieving information and generating responses.
\nIf you choose to use EXTERNAL_SOURCES
, then currently only Anthropic Claude 3 Sonnet models for knowledge bases are supported.
\n The identifier information for an Amazon S3 bucket.\n
" } }, + "com.amazonaws.bedrockagentruntime#S3Location": { + "type": "structure", + "members": { + "uri": { + "target": "com.amazonaws.bedrockagentruntime#S3Uri", + "traits": { + "smithy.api#documentation": "The path to the Amazon S3 bucket where the image is stored.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Information about the Amazon S3 bucket where the image is stored.
" + } + }, "com.amazonaws.bedrockagentruntime#S3ObjectDoc": { "type": "structure", "members": { @@ -8876,6 +10162,12 @@ "smithy.api#httpError": 400 } }, + "com.amazonaws.bedrockagentruntime#SessionArn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]+:[0-9]{12}:session/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$" + } + }, "com.amazonaws.bedrockagentruntime#SessionAttributesMap": { "type": "map", "key": { @@ -8895,6 +10187,81 @@ "smithy.api#pattern": "^[0-9a-zA-Z._:-]+$" } }, + "com.amazonaws.bedrockagentruntime#SessionIdentifier": { + "type": "string", + "traits": { + "smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]+:[0-9]{12}:session/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})|([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})$" + } + }, + "com.amazonaws.bedrockagentruntime#SessionMetadataKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.bedrockagentruntime#SessionMetadataMap": { + "type": "map", + "key": { + "target": "com.amazonaws.bedrockagentruntime#SessionMetadataKey" + }, + "value": { + "target": "com.amazonaws.bedrockagentruntime#SessionMetadataValue" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.bedrockagentruntime#SessionMetadataValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 5000 + } + } + }, + "com.amazonaws.bedrockagentruntime#SessionResource": { + "type": "resource", + "identifiers": { + "sessionIdentifier": { + "target": "com.amazonaws.bedrockagentruntime#SessionIdentifier" + } + }, + "create": { + "target": "com.amazonaws.bedrockagentruntime#CreateSession" + }, + "read": { + "target": "com.amazonaws.bedrockagentruntime#GetSession" + }, + "update": { + "target": "com.amazonaws.bedrockagentruntime#UpdateSession" + }, + "delete": { + "target": "com.amazonaws.bedrockagentruntime#DeleteSession" + }, + "list": { + "target": "com.amazonaws.bedrockagentruntime#ListSessions" + }, + "operations": [ + { + "target": "com.amazonaws.bedrockagentruntime#EndSession" + } + ], + "resources": [ + { + "target": "com.amazonaws.bedrockagentruntime#InvocationResource" + }, + { + "target": "com.amazonaws.bedrockagentruntime#InvocationStepResource" + } + ] + }, "com.amazonaws.bedrockagentruntime#SessionState": { "type": "structure", "members": { @@ -8945,6 +10312,78 @@ "smithy.api#documentation": "Contains parameters that specify various attributes that persist across a session or prompt. You can define session state attributes as key-value pairs when writing a Lambda function for an action group or pass them when making an InvokeAgent request. Use session state attributes to control and provide conversational context for your agent and to help customize your agent's behavior. For more information, see Control session context.
" } }, + "com.amazonaws.bedrockagentruntime#SessionStatus": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "EXPIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXPIRED" + } + }, + "ENDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENDED" + } + } + } + }, + "com.amazonaws.bedrockagentruntime#SessionSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrockagentruntime#SessionSummary" + } + }, + "com.amazonaws.bedrockagentruntime#SessionSummary": { + "type": "structure", + "members": { + "sessionId": { + "target": "com.amazonaws.bedrockagentruntime#Uuid", + "traits": { + "smithy.api#documentation": "The unique identifier for the session.
", + "smithy.api#required": {} + } + }, + "sessionArn": { + "target": "com.amazonaws.bedrockagentruntime#SessionArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the session.
", + "smithy.api#required": {} + } + }, + "sessionStatus": { + "target": "com.amazonaws.bedrockagentruntime#SessionStatus", + "traits": { + "smithy.api#documentation": "The current status of the session.
", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "com.amazonaws.bedrockagentruntime#DateTimestamp", + "traits": { + "smithy.api#documentation": "The timestamp for when the session was created.
", + "smithy.api#required": {} + } + }, + "lastUpdatedAt": { + "target": "com.amazonaws.bedrockagentruntime#DateTimestamp", + "traits": { + "smithy.api#documentation": "The timestamp for when the session was last modified.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Contains details about a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
" + } + }, "com.amazonaws.bedrockagentruntime#SessionTTL": { "type": "integer", "traits": { @@ -9051,6 +10490,149 @@ } } }, + "com.amazonaws.bedrockagentruntime#TagKey": { + "type": "string", + "traits": { + "smithy.api#documentation": "Key of a tag", + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[a-zA-Z0-9\\s._:/=+@-]*$" + } + }, + "com.amazonaws.bedrockagentruntime#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrockagentruntime#TagKey" + }, + "traits": { + "smithy.api#documentation": "List of Tag Keys", + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, + "com.amazonaws.bedrockagentruntime#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrockagentruntime#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.bedrockagentruntime#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrockagentruntime#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#InternalServerException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/tags/{resourceArn}" + } + } + }, + "com.amazonaws.bedrockagentruntime#TagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.bedrockagentruntime#TaggableResourcesArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the resource to tag.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.bedrockagentruntime#TagsMap", + "traits": { + "smithy.api#documentation": "An object containing key-value pairs that define the tags to attach to the resource.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrockagentruntime#TagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrockagentruntime#TagValue": { + "type": "string", + "traits": { + "smithy.api#documentation": "Value of a tag", + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9\\s._:/=+@-]*$" + } + }, + "com.amazonaws.bedrockagentruntime#TaggableResourcesArn": { + "type": "string", + "traits": { + "smithy.api#documentation": "ARN of Taggable resources: [session]", + "smithy.api#length": { + "min": 20, + "max": 1011 + }, + "smithy.api#pattern": "(^arn:aws(-[^:]+)?:bedrock:[a-zA-Z0-9-]+:[0-9]{12}:(session)/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$)" + } + }, + "com.amazonaws.bedrockagentruntime#TaggingResource": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.bedrockagentruntime#ListTagsForResource" + }, + { + "target": "com.amazonaws.bedrockagentruntime#TagResource" + }, + { + "target": "com.amazonaws.bedrockagentruntime#UntagResource" + } + ] + }, + "com.amazonaws.bedrockagentruntime#TagsMap": { + "type": "map", + "key": { + "target": "com.amazonaws.bedrockagentruntime#TagKey" + }, + "value": { + "target": "com.amazonaws.bedrockagentruntime#TagValue" + }, + "traits": { + "smithy.api#documentation": "A map of tag keys and values", + "smithy.api#length": { + "min": 1, + "max": 200 + } + } + }, "com.amazonaws.bedrockagentruntime#Temperature": { "type": "float", "traits": { @@ -9400,6 +10982,175 @@ } } }, + "com.amazonaws.bedrockagentruntime#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrockagentruntime#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.bedrockagentruntime#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrockagentruntime#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#InternalServerException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Remove tags from a resource.
", + "smithy.api#http": { + "code": 200, + "method": "DELETE", + "uri": "/tags/{resourceArn}" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.bedrockagentruntime#UntagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "com.amazonaws.bedrockagentruntime#TaggableResourcesArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the resource from which to remove tags.
", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.bedrockagentruntime#TagKeyList", + "traits": { + "smithy.api#documentation": "A list of keys of the tags to remove from the resource.
", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrockagentruntime#UntagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrockagentruntime#UpdateSession": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrockagentruntime#UpdateSessionRequest" + }, + "output": { + "target": "com.amazonaws.bedrockagentruntime#UpdateSessionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrockagentruntime#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ConflictException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#InternalServerException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrockagentruntime#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates the metadata or encryption settings of a session. For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.
", + "smithy.api#http": { + "code": 200, + "method": "PUT", + "uri": "/sessions/{sessionIdentifier}/" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.bedrockagentruntime#UpdateSessionRequest": { + "type": "structure", + "members": { + "sessionMetadata": { + "target": "com.amazonaws.bedrockagentruntime#SessionMetadataMap", + "traits": { + "smithy.api#documentation": "A map of key-value pairs containing attributes to be persisted across the session. For example the user's ID, their language preference, \n and the type of device they are using.
" + } + }, + "sessionIdentifier": { + "target": "com.amazonaws.bedrockagentruntime#SessionIdentifier", + "traits": { + "smithy.api#documentation": "The unique identifier of the session to modify. You can specify either the session's sessionId
or its Amazon Resource Name (ARN).
The unique identifier of the session you updated.
", + "smithy.api#required": {} + } + }, + "sessionArn": { + "target": "com.amazonaws.bedrockagentruntime#SessionArn", + "traits": { + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the session that was updated.
", + "smithy.api#required": {} + } + }, + "sessionStatus": { + "target": "com.amazonaws.bedrockagentruntime#SessionStatus", + "traits": { + "smithy.api#documentation": "The status of the session you updated.
", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "com.amazonaws.bedrockagentruntime#DateTimestamp", + "traits": { + "smithy.api#documentation": "The timestamp for when the session was created.
", + "smithy.api#required": {} + } + }, + "lastUpdatedAt": { + "target": "com.amazonaws.bedrockagentruntime#DateTimestamp", + "traits": { + "smithy.api#documentation": "The timestamp for when the session was last modified.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.bedrockagentruntime#Usage": { "type": "structure", "members": { @@ -9421,6 +11172,12 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.bedrockagentruntime#Uuid": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$" + } + }, "com.amazonaws.bedrockagentruntime#ValidationException": { "type": "structure", "members": {