Skip to content

Commit 60d1a5a

Browse files
author
awstools
committed
feat(client-bedrock-agent-runtime): Releasing the support for Action User Confirmation.
1 parent def8960 commit 60d1a5a

File tree

3 files changed

+121
-0
lines changed

3 files changed

+121
-0
lines changed

clients/client-bedrock-agent-runtime/src/commands/InvokeAgentCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
9090
* actionGroup: "STRING_VALUE", // required
9191
* httpMethod: "STRING_VALUE",
9292
* apiPath: "STRING_VALUE",
93+
* confirmationState: "CONFIRM" || "DENY",
9394
* responseBody: { // ResponseBody
9495
* "<keys>": { // ContentBody
9596
* body: "STRING_VALUE",
@@ -100,6 +101,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
100101
* },
101102
* functionResult: { // FunctionResult
102103
* actionGroup: "STRING_VALUE", // required
104+
* confirmationState: "CONFIRM" || "DENY",
103105
* function: "STRING_VALUE",
104106
* responseBody: {
105107
* "<keys>": {
@@ -578,6 +580,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
578580
* // },
579581
* // },
580582
* // },
583+
* // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT",
581584
* // },
582585
* // functionInvocationInput: { // FunctionInvocationInput
583586
* // actionGroup: "STRING_VALUE", // required
@@ -589,6 +592,7 @@ export interface InvokeAgentCommandOutput extends InvokeAgentResponse, __Metadat
589592
* // },
590593
* // ],
591594
* // function: "STRING_VALUE",
595+
* // actionInvocationType: "RESULT" || "USER_CONFIRMATION" || "USER_CONFIRMATION_AND_RESULT",
592596
* // },
593597
* // },
594598
* // ],

clients/client-bedrock-agent-runtime/src/models/models_0.ts

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,21 @@ export interface ActionGroupInvocationOutput {
141141
text?: string;
142142
}
143143

144+
/**
145+
* @public
146+
* @enum
147+
*/
148+
export const ActionInvocationType = {
149+
RESULT: "RESULT",
150+
USER_CONFIRMATION: "USER_CONFIRMATION",
151+
USER_CONFIRMATION_AND_RESULT: "USER_CONFIRMATION_AND_RESULT",
152+
} as const;
153+
154+
/**
155+
* @public
156+
*/
157+
export type ActionInvocationType = (typeof ActionInvocationType)[keyof typeof ActionInvocationType];
158+
144159
/**
145160
* <p>There was an issue with a dependency due to a server issue. Retry your request.</p>
146161
* @public
@@ -995,6 +1010,20 @@ export const SearchType = {
9951010
*/
9961011
export type SearchType = (typeof SearchType)[keyof typeof SearchType];
9971012

1013+
/**
1014+
* @public
1015+
* @enum
1016+
*/
1017+
export const ConfirmationState = {
1018+
CONFIRM: "CONFIRM",
1019+
DENY: "DENY",
1020+
} as const;
1021+
1022+
/**
1023+
* @public
1024+
*/
1025+
export type ConfirmationState = (typeof ConfirmationState)[keyof typeof ConfirmationState];
1026+
9981027
/**
9991028
* <p>Contains the body of the API response.</p>
10001029
* <p>This data type is used in the following API operations:</p>
@@ -1058,6 +1087,12 @@ export interface ApiResult {
10581087
*/
10591088
apiPath?: string;
10601089

1090+
/**
1091+
* <p>Controls the API operations or functions to invoke based on the user confirmation.</p>
1092+
* @public
1093+
*/
1094+
confirmationState?: ConfirmationState;
1095+
10611096
/**
10621097
* <p>The response body from the API operation. The key of the object is the content type (currently, only <code>TEXT</code> is supported). The response may be returned directly or from the Lambda function.</p>
10631098
* @public
@@ -1095,6 +1130,12 @@ export interface FunctionResult {
10951130
*/
10961131
actionGroup: string | undefined;
10971132

1133+
/**
1134+
* <p>Contains the user confirmation information about the function that was called.</p>
1135+
* @public
1136+
*/
1137+
confirmationState?: ConfirmationState;
1138+
10981139
/**
10991140
* <p>The name of the function that was called.</p>
11001141
* @public
@@ -1670,6 +1711,12 @@ export interface ApiInvocationInput {
16701711
* @public
16711712
*/
16721713
requestBody?: ApiRequestBody;
1714+
1715+
/**
1716+
* <p>Contains information about the API operation to invoke.</p>
1717+
* @public
1718+
*/
1719+
actionInvocationType?: ActionInvocationType;
16731720
}
16741721

16751722
/**
@@ -1732,6 +1779,12 @@ export interface FunctionInvocationInput {
17321779
* @public
17331780
*/
17341781
function?: string;
1782+
1783+
/**
1784+
* <p>Contains information about the function to invoke,</p>
1785+
* @public
1786+
*/
1787+
actionInvocationType?: ActionInvocationType;
17351788
}
17361789

17371790
/**

codegen/sdk-codegen/aws-models/bedrock-agent-runtime.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,29 @@
9696
"smithy.api#sensitive": {}
9797
}
9898
},
99+
"com.amazonaws.bedrockagentruntime#ActionInvocationType": {
100+
"type": "enum",
101+
"members": {
102+
"RESULT": {
103+
"target": "smithy.api#Unit",
104+
"traits": {
105+
"smithy.api#enumValue": "RESULT"
106+
}
107+
},
108+
"USER_CONFIRMATION": {
109+
"target": "smithy.api#Unit",
110+
"traits": {
111+
"smithy.api#enumValue": "USER_CONFIRMATION"
112+
}
113+
},
114+
"USER_CONFIRMATION_AND_RESULT": {
115+
"target": "smithy.api#Unit",
116+
"traits": {
117+
"smithy.api#enumValue": "USER_CONFIRMATION_AND_RESULT"
118+
}
119+
}
120+
}
121+
},
99122
"com.amazonaws.bedrockagentruntime#AdditionalModelRequestFields": {
100123
"type": "map",
101124
"key": {
@@ -886,6 +909,12 @@
886909
"traits": {
887910
"smithy.api#documentation": "<p>The request body to provide for the API request, as the agent elicited from the user.</p>"
888911
}
912+
},
913+
"actionInvocationType": {
914+
"target": "com.amazonaws.bedrockagentruntime#ActionInvocationType",
915+
"traits": {
916+
"smithy.api#documentation": "<p>Contains information about the API operation to invoke.</p>"
917+
}
889918
}
890919
},
891920
"traits": {
@@ -966,6 +995,12 @@
966995
"smithy.api#documentation": "<p>The path to the API operation.</p>"
967996
}
968997
},
998+
"confirmationState": {
999+
"target": "com.amazonaws.bedrockagentruntime#ConfirmationState",
1000+
"traits": {
1001+
"smithy.api#documentation": "<p>Controls the API operations or functions to invoke based on the user confirmation.</p>"
1002+
}
1003+
},
9691004
"responseBody": {
9701005
"target": "com.amazonaws.bedrockagentruntime#ResponseBody",
9711006
"traits": {
@@ -1171,6 +1206,23 @@
11711206
"smithy.api#documentation": "<p>Contains the JSON-formatted string returned by the API invoked by the code interpreter.</p>"
11721207
}
11731208
},
1209+
"com.amazonaws.bedrockagentruntime#ConfirmationState": {
1210+
"type": "enum",
1211+
"members": {
1212+
"CONFIRM": {
1213+
"target": "smithy.api#Unit",
1214+
"traits": {
1215+
"smithy.api#enumValue": "CONFIRM"
1216+
}
1217+
},
1218+
"DENY": {
1219+
"target": "smithy.api#Unit",
1220+
"traits": {
1221+
"smithy.api#enumValue": "DENY"
1222+
}
1223+
}
1224+
}
1225+
},
11741226
"com.amazonaws.bedrockagentruntime#ConflictException": {
11751227
"type": "structure",
11761228
"members": {
@@ -1900,6 +1952,12 @@
19001952
"traits": {
19011953
"smithy.api#documentation": "<p>The name of the function.</p>"
19021954
}
1955+
},
1956+
"actionInvocationType": {
1957+
"target": "com.amazonaws.bedrockagentruntime#ActionInvocationType",
1958+
"traits": {
1959+
"smithy.api#documentation": "<p>Contains information about the function to invoke,</p>"
1960+
}
19031961
}
19041962
},
19051963
"traits": {
@@ -1948,6 +2006,12 @@
19482006
"smithy.api#required": {}
19492007
}
19502008
},
2009+
"confirmationState": {
2010+
"target": "com.amazonaws.bedrockagentruntime#ConfirmationState",
2011+
"traits": {
2012+
"smithy.api#documentation": "<p>Contains the user confirmation information about the function that was called.</p>"
2013+
}
2014+
},
19512015
"function": {
19522016
"target": "smithy.api#String",
19532017
"traits": {

0 commit comments

Comments
 (0)