Skip to content

Commit f6cf100

Browse files
author
awstools
committed
feat(client-bedrock-agent): This changes introduces metadata documents statistics and also updates the documentation for bedrock agent.
1 parent 7238c53 commit f6cf100

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1963
-1286
lines changed

clients/client-bedrock-agent/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77
AWS SDK for JavaScript BedrockAgent Client for Node.js, Browser and React Native.
88

9-
An example service, deployed with the Octane Service creator,
10-
which will echo the string
9+
<p>Describes the API operations for creating and managing Amazon Bedrock agents.</p>
1110

1211
## Installing
1312

clients/client-bedrock-agent/src/BedrockAgent.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -839,8 +839,7 @@ export interface BedrockAgent {
839839
}
840840

841841
/**
842-
* An example service, deployed with the Octane Service creator,
843-
* which will echo the string
842+
* <p>Describes the API operations for creating and managing Amazon Bedrock agents.</p>
844843
* @public
845844
*/
846845
export class BedrockAgent extends BedrockAgentClient implements BedrockAgent {}

clients/client-bedrock-agent/src/BedrockAgentClient.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,7 @@ export type BedrockAgentClientResolvedConfigType = __SmithyResolvedConfiguration
408408
export interface BedrockAgentClientResolvedConfig extends BedrockAgentClientResolvedConfigType {}
409409

410410
/**
411-
* An example service, deployed with the Octane Service creator,
412-
* which will echo the string
411+
* <p>Describes the API operations for creating and managing Amazon Bedrock agents.</p>
413412
* @public
414413
*/
415414
export class BedrockAgentClient extends __Client<

clients/client-bedrock-agent/src/commands/AssociateAgentKnowledgeBaseCommand.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface AssociateAgentKnowledgeBaseCommandOutput
3232
__MetadataBearer {}
3333

3434
/**
35-
* Associate a Knowledge Base to an existing Amazon Bedrock Agent
35+
* <p>Associates a knowledge base with an agent. If a knowledge base is associated and its <code>indexState</code> is set to <code>Enabled</code>, the agent queries the knowledge base for information to augment its response to the user.</p>
3636
* @example
3737
* Use a bare-bones client and the command you need to make an API call.
3838
* ```javascript
@@ -69,25 +69,25 @@ export interface AssociateAgentKnowledgeBaseCommandOutput
6969
* @see {@link BedrockAgentClientResolvedConfig | config} for BedrockAgentClient's `config` shape.
7070
*
7171
* @throws {@link AccessDeniedException} (client fault)
72-
* This exception is thrown when a request is denied per access permissions
72+
* <p>The request is denied because of missing access permissions.</p>
7373
*
7474
* @throws {@link ConflictException} (client fault)
75-
* This exception is thrown when there is a conflict performing an operation
75+
* <p>There was a conflict performing an operation.</p>
7676
*
7777
* @throws {@link InternalServerException} (server fault)
78-
* This exception is thrown if there was an unexpected error during processing of request
78+
* <p>An internal server error occurred. Retry your request.</p>
7979
*
8080
* @throws {@link ResourceNotFoundException} (client fault)
81-
* This exception is thrown when a resource referenced by the operation does not exist
81+
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
8282
*
8383
* @throws {@link ServiceQuotaExceededException} (client fault)
84-
* This exception is thrown when a request is made beyond the service quota
84+
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
8585
*
8686
* @throws {@link ThrottlingException} (client fault)
87-
* This exception is thrown when the number of requests exceeds the limit
87+
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
8888
*
8989
* @throws {@link ValidationException} (client fault)
90-
* This exception is thrown when the request's input validation fails
90+
* <p>Input validation failed. Check your request parameters and retry the request.</p>
9191
*
9292
* @throws {@link BedrockAgentServiceException}
9393
* <p>Base exception class for all service exceptions from BedrockAgent service.</p>

clients/client-bedrock-agent/src/commands/CreateAgentActionGroupCommand.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ export interface CreateAgentActionGroupCommandInput extends CreateAgentActionGro
3232
export interface CreateAgentActionGroupCommandOutput extends CreateAgentActionGroupResponse, __MetadataBearer {}
3333

3434
/**
35-
* Creates an Action Group for existing Amazon Bedrock Agent
35+
* <p>Creates an action group for an agent. An action group represents the actions that an agent can carry out for the customer by defining the APIs that an agent can call and the logic for calling them.</p>
36+
* <p>To allow your agent to request the user for additional information when trying to complete a task, add an action group with the <code>parentActionGroupSignature</code> field set to <code>AMAZON.UserInput</code>. You must leave the <code>description</code>, <code>apiSchema</code>, and <code>actionGroupExecutor</code> fields blank for this action group. During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Observation.html">Observation</a> reprompting the user for more information.</p>
3637
* @example
3738
* Use a bare-bones client and the command you need to make an API call.
3839
* ```javascript
@@ -94,25 +95,25 @@ export interface CreateAgentActionGroupCommandOutput extends CreateAgentActionGr
9495
* @see {@link BedrockAgentClientResolvedConfig | config} for BedrockAgentClient's `config` shape.
9596
*
9697
* @throws {@link AccessDeniedException} (client fault)
97-
* This exception is thrown when a request is denied per access permissions
98+
* <p>The request is denied because of missing access permissions.</p>
9899
*
99100
* @throws {@link ConflictException} (client fault)
100-
* This exception is thrown when there is a conflict performing an operation
101+
* <p>There was a conflict performing an operation.</p>
101102
*
102103
* @throws {@link InternalServerException} (server fault)
103-
* This exception is thrown if there was an unexpected error during processing of request
104+
* <p>An internal server error occurred. Retry your request.</p>
104105
*
105106
* @throws {@link ResourceNotFoundException} (client fault)
106-
* This exception is thrown when a resource referenced by the operation does not exist
107+
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
107108
*
108109
* @throws {@link ServiceQuotaExceededException} (client fault)
109-
* This exception is thrown when a request is made beyond the service quota
110+
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
110111
*
111112
* @throws {@link ThrottlingException} (client fault)
112-
* This exception is thrown when the number of requests exceeds the limit
113+
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
113114
*
114115
* @throws {@link ValidationException} (client fault)
115-
* This exception is thrown when the request's input validation fails
116+
* <p>Input validation failed. Check your request parameters and retry the request.</p>
116117
*
117118
* @throws {@link BedrockAgentServiceException}
118119
* <p>Base exception class for all service exceptions from BedrockAgent service.</p>

clients/client-bedrock-agent/src/commands/CreateAgentAliasCommand.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface CreateAgentAliasCommandInput extends CreateAgentAliasRequest {}
2727
export interface CreateAgentAliasCommandOutput extends CreateAgentAliasResponse, __MetadataBearer {}
2828

2929
/**
30-
* Creates an Alias for an existing Amazon Bedrock Agent
30+
* <p>Creates an alias of an agent that can be used to deploy the agent.</p>
3131
* @example
3232
* Use a bare-bones client and the command you need to make an API call.
3333
* ```javascript
@@ -89,25 +89,25 @@ export interface CreateAgentAliasCommandOutput extends CreateAgentAliasResponse,
8989
* @see {@link BedrockAgentClientResolvedConfig | config} for BedrockAgentClient's `config` shape.
9090
*
9191
* @throws {@link AccessDeniedException} (client fault)
92-
* This exception is thrown when a request is denied per access permissions
92+
* <p>The request is denied because of missing access permissions.</p>
9393
*
9494
* @throws {@link ConflictException} (client fault)
95-
* This exception is thrown when there is a conflict performing an operation
95+
* <p>There was a conflict performing an operation.</p>
9696
*
9797
* @throws {@link InternalServerException} (server fault)
98-
* This exception is thrown if there was an unexpected error during processing of request
98+
* <p>An internal server error occurred. Retry your request.</p>
9999
*
100100
* @throws {@link ResourceNotFoundException} (client fault)
101-
* This exception is thrown when a resource referenced by the operation does not exist
101+
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
102102
*
103103
* @throws {@link ServiceQuotaExceededException} (client fault)
104-
* This exception is thrown when a request is made beyond the service quota
104+
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
105105
*
106106
* @throws {@link ThrottlingException} (client fault)
107-
* This exception is thrown when the number of requests exceeds the limit
107+
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
108108
*
109109
* @throws {@link ValidationException} (client fault)
110-
* This exception is thrown when the request's input validation fails
110+
* <p>Input validation failed. Check your request parameters and retry the request.</p>
111111
*
112112
* @throws {@link BedrockAgentServiceException}
113113
* <p>Base exception class for all service exceptions from BedrockAgent service.</p>

clients/client-bedrock-agent/src/commands/CreateAgentCommand.ts

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,30 @@ export interface CreateAgentCommandInput extends CreateAgentRequest {}
3232
export interface CreateAgentCommandOutput extends CreateAgentResponse, __MetadataBearer {}
3333

3434
/**
35-
* Creates an Amazon Bedrock Agent
35+
* <p>Creates an agent that orchestrates interactions between foundation models, data sources, software applications, user conversations, and APIs to carry out tasks to help customers.</p>
36+
* <ul>
37+
* <li>
38+
* <p>Specify the following fields for security purposes.</p>
39+
* <ul>
40+
* <li>
41+
* <p>
42+
* <code>agentResourceRoleArn</code> – The ARN of the role with permissions to create an agent.</p>
43+
* </li>
44+
* <li>
45+
* <p>(Optional) <code>customerEncryptionKeyArn</code> – The ARN of a KMS key to encrypt the creation of the agent.</p>
46+
* </li>
47+
* <li>
48+
* <p>(Optional) <code>idleSessionTTLinSeconds</code> – Specify the number of seconds for which the agent should maintain session information. After this time expires, the subsequent <code>InvokeAgent</code> request begins a new session.</p>
49+
* </li>
50+
* </ul>
51+
* </li>
52+
* <li>
53+
* <p>To override the default prompt behavior for agent orchestration and to use advanced prompts, include a <code>promptOverrideConfiguration</code> object. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html">Advanced prompts</a>.</p>
54+
* </li>
55+
* <li>
56+
* <p>If you agent fails to be created, the response returns a list of <code>failureReasons</code> alongside a list of <code>recommendedActions</code> for you to troubleshoot.</p>
57+
* </li>
58+
* </ul>
3659
* @example
3760
* Use a bare-bones client and the command you need to make an API call.
3861
* ```javascript
@@ -131,22 +154,22 @@ export interface CreateAgentCommandOutput extends CreateAgentResponse, __Metadat
131154
* @see {@link BedrockAgentClientResolvedConfig | config} for BedrockAgentClient's `config` shape.
132155
*
133156
* @throws {@link AccessDeniedException} (client fault)
134-
* This exception is thrown when a request is denied per access permissions
157+
* <p>The request is denied because of missing access permissions.</p>
135158
*
136159
* @throws {@link ConflictException} (client fault)
137-
* This exception is thrown when there is a conflict performing an operation
160+
* <p>There was a conflict performing an operation.</p>
138161
*
139162
* @throws {@link InternalServerException} (server fault)
140-
* This exception is thrown if there was an unexpected error during processing of request
163+
* <p>An internal server error occurred. Retry your request.</p>
141164
*
142165
* @throws {@link ServiceQuotaExceededException} (client fault)
143-
* This exception is thrown when a request is made beyond the service quota
166+
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
144167
*
145168
* @throws {@link ThrottlingException} (client fault)
146-
* This exception is thrown when the number of requests exceeds the limit
169+
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
147170
*
148171
* @throws {@link ValidationException} (client fault)
149-
* This exception is thrown when the request's input validation fails
172+
* <p>Input validation failed. Check your request parameters and retry the request.</p>
150173
*
151174
* @throws {@link BedrockAgentServiceException}
152175
* <p>Base exception class for all service exceptions from BedrockAgent service.</p>

clients/client-bedrock-agent/src/commands/CreateDataSourceCommand.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ export interface CreateDataSourceCommandInput extends CreateDataSourceRequest {}
2727
export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse, __MetadataBearer {}
2828

2929
/**
30-
* Create a new data source
30+
* <p>Sets up a data source to be added to a knowledge base.</p>
31+
* <important>
32+
* <p>You can't change the <code>chunkingConfiguration</code> after you create the data source.</p>
33+
* </important>
3134
* @example
3235
* Use a bare-bones client and the command you need to make an API call.
3336
* ```javascript
@@ -105,25 +108,25 @@ export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse,
105108
* @see {@link BedrockAgentClientResolvedConfig | config} for BedrockAgentClient's `config` shape.
106109
*
107110
* @throws {@link AccessDeniedException} (client fault)
108-
* This exception is thrown when a request is denied per access permissions
111+
* <p>The request is denied because of missing access permissions.</p>
109112
*
110113
* @throws {@link ConflictException} (client fault)
111-
* This exception is thrown when there is a conflict performing an operation
114+
* <p>There was a conflict performing an operation.</p>
112115
*
113116
* @throws {@link InternalServerException} (server fault)
114-
* This exception is thrown if there was an unexpected error during processing of request
117+
* <p>An internal server error occurred. Retry your request.</p>
115118
*
116119
* @throws {@link ResourceNotFoundException} (client fault)
117-
* This exception is thrown when a resource referenced by the operation does not exist
120+
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
118121
*
119122
* @throws {@link ServiceQuotaExceededException} (client fault)
120-
* This exception is thrown when a request is made beyond the service quota
123+
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
121124
*
122125
* @throws {@link ThrottlingException} (client fault)
123-
* This exception is thrown when the number of requests exceeds the limit
126+
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
124127
*
125128
* @throws {@link ValidationException} (client fault)
126-
* This exception is thrown when the request's input validation fails
129+
* <p>Input validation failed. Check your request parameters and retry the request.</p>
127130
*
128131
* @throws {@link BedrockAgentServiceException}
129132
* <p>Base exception class for all service exceptions from BedrockAgent service.</p>

clients/client-bedrock-agent/src/commands/CreateKnowledgeBaseCommand.ts

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,38 @@ export interface CreateKnowledgeBaseCommandInput extends CreateKnowledgeBaseRequ
2727
export interface CreateKnowledgeBaseCommandOutput extends CreateKnowledgeBaseResponse, __MetadataBearer {}
2828

2929
/**
30-
* Create a new knowledge base
30+
* <p>Creates a knowledge base that contains data sources from which information can be queried and used by LLMs. To create a knowledge base, you must first set up your data sources and configure a supported vector store. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-setup.html">Set up your data for ingestion</a>.</p>
31+
* <note>
32+
* <p>If you prefer to let Amazon Bedrock create and manage a vector store for you in Amazon OpenSearch Service, use the console. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-create">Create a knowledge base</a>.</p>
33+
* </note>
34+
* <ul>
35+
* <li>
36+
* <p>Provide the <code>name</code> and an optional <code>description</code>.</p>
37+
* </li>
38+
* <li>
39+
* <p>Provide the ARN with permissions to create a knowledge base in the <code>roleArn</code> field.</p>
40+
* </li>
41+
* <li>
42+
* <p>Provide the embedding model to use in the <code>embeddingModelArn</code> field in the <code>knowledgeBaseConfiguration</code> object.</p>
43+
* </li>
44+
* <li>
45+
* <p>Provide the configuration for your vector store in the <code>storageConfiguration</code> object.</p>
46+
* <ul>
47+
* <li>
48+
* <p>For an Amazon OpenSearch Service database, use the <code>opensearchServerlessConfiguration</code> object. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-setup-oss.html">Create a vector store in Amazon OpenSearch Service</a>.</p>
49+
* </li>
50+
* <li>
51+
* <p>For an Amazon Aurora database, use the <code>RdsConfiguration</code> object. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-setup-rds.html">Create a vector store in Amazon Aurora</a>.</p>
52+
* </li>
53+
* <li>
54+
* <p>For a Pinecone database, use the <code>pineconeConfiguration</code> object. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-setup-pinecone.html">Create a vector store in Pinecone</a>.</p>
55+
* </li>
56+
* <li>
57+
* <p>For a Redis Enterprise Cloud database, use the <code>redisEnterpriseCloudConfiguration</code> object. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-setup-redis.html">Create a vector store in Redis Enterprise Cloud</a>.</p>
58+
* </li>
59+
* </ul>
60+
* </li>
61+
* </ul>
3162
* @example
3263
* Use a bare-bones client and the command you need to make an API call.
3364
* ```javascript
@@ -168,22 +199,22 @@ export interface CreateKnowledgeBaseCommandOutput extends CreateKnowledgeBaseRes
168199
* @see {@link BedrockAgentClientResolvedConfig | config} for BedrockAgentClient's `config` shape.
169200
*
170201
* @throws {@link AccessDeniedException} (client fault)
171-
* This exception is thrown when a request is denied per access permissions
202+
* <p>The request is denied because of missing access permissions.</p>
172203
*
173204
* @throws {@link ConflictException} (client fault)
174-
* This exception is thrown when there is a conflict performing an operation
205+
* <p>There was a conflict performing an operation.</p>
175206
*
176207
* @throws {@link InternalServerException} (server fault)
177-
* This exception is thrown if there was an unexpected error during processing of request
208+
* <p>An internal server error occurred. Retry your request.</p>
178209
*
179210
* @throws {@link ServiceQuotaExceededException} (client fault)
180-
* This exception is thrown when a request is made beyond the service quota
211+
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
181212
*
182213
* @throws {@link ThrottlingException} (client fault)
183-
* This exception is thrown when the number of requests exceeds the limit
214+
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
184215
*
185216
* @throws {@link ValidationException} (client fault)
186-
* This exception is thrown when the request's input validation fails
217+
* <p>Input validation failed. Check your request parameters and retry the request.</p>
187218
*
188219
* @throws {@link BedrockAgentServiceException}
189220
* <p>Base exception class for all service exceptions from BedrockAgent service.</p>

0 commit comments

Comments
 (0)