Skip to content

Commit 152e14f

Browse files
This release introduces the ability to generate SQL using natural language, through a new GenerateQuery API (with native integration into Knowledge Bases); ability to ingest and retrieve images through Bedrock Data Automation; and ability to create a Knowledge Base backed by Kendra GenAI Index.
1 parent f5bbfb6 commit 152e14f

File tree

78 files changed

+6662
-55
lines changed

Some content is hidden

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

78 files changed

+6662
-55
lines changed

generator/ServiceModels/bedrock-agent/bedrock-agent-2023-06-05.api.json

Lines changed: 318 additions & 9 deletions
Large diffs are not rendered by default.

generator/ServiceModels/bedrock-agent/bedrock-agent-2023-06-05.docs.json

Lines changed: 276 additions & 5 deletions
Large diffs are not rendered by default.

generator/ServiceModels/bedrock-agent/bedrock-agent-2023-06-05.normal.json

Lines changed: 475 additions & 12 deletions
Large diffs are not rendered by default.

sdk/code-analysis/ServiceAnalysis/BedrockAgent/Generated/PropertyValueRules.xml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,6 +1927,16 @@
19271927
<property>Amazon.BedrockAgent.Model.ConfluenceSourceConfiguration.HostUrl</property>
19281928
<pattern>^https://[A-Za-z0-9][^\s]*$</pattern>
19291929
</property-value-rule>
1930+
<property-value-rule>
1931+
<property>Amazon.BedrockAgent.Model.CuratedQuery.NaturalLanguage</property>
1932+
<min>1</min>
1933+
<max>1000</max>
1934+
</property-value-rule>
1935+
<property-value-rule>
1936+
<property>Amazon.BedrockAgent.Model.CuratedQuery.Sql</property>
1937+
<min>1</min>
1938+
<max>1000</max>
1939+
</property-value-rule>
19301940
<property-value-rule>
19311941
<property>Amazon.BedrockAgent.Model.CustomDocumentIdentifier.Id</property>
19321942
<min>1</min>
@@ -2210,6 +2220,10 @@
22102220
<property>Amazon.BedrockAgent.Model.IngestionJobSummary.KnowledgeBaseId</property>
22112221
<pattern>^[0-9a-zA-Z]{10}$</pattern>
22122222
</property-value-rule>
2223+
<property-value-rule>
2224+
<property>Amazon.BedrockAgent.Model.KendraKnowledgeBaseConfiguration.KendraIndexArn</property>
2225+
<pattern>^arn:aws(|-cn|-us-gov):kendra:[a-z0-9-]{1,20}:([0-9]{12}|):index/([a-zA-Z0-9][a-zA-Z0-9-]{35}|[a-zA-Z0-9][a-zA-Z0-9-]{35}-[a-zA-Z0-9][a-zA-Z0-9-]{35})$</pattern>
2226+
</property-value-rule>
22132227
<property-value-rule>
22142228
<property>Amazon.BedrockAgent.Model.KnowledgeBase.Description</property>
22152229
<min>1</min>
@@ -2606,6 +2620,30 @@
26062620
<property>Amazon.BedrockAgent.Model.PromptVariant.Name</property>
26072621
<pattern>^([0-9a-zA-Z][_-]?){1,100}$</pattern>
26082622
</property-value-rule>
2623+
<property-value-rule>
2624+
<property>Amazon.BedrockAgent.Model.QueryGenerationColumn.Description</property>
2625+
<min>1</min>
2626+
<max>200</max>
2627+
</property-value-rule>
2628+
<property-value-rule>
2629+
<property>Amazon.BedrockAgent.Model.QueryGenerationColumn.Name</property>
2630+
<min>1</min>
2631+
<max>127</max>
2632+
</property-value-rule>
2633+
<property-value-rule>
2634+
<property>Amazon.BedrockAgent.Model.QueryGenerationConfiguration.ExecutionTimeoutSeconds</property>
2635+
<min>1</min>
2636+
<max>200</max>
2637+
</property-value-rule>
2638+
<property-value-rule>
2639+
<property>Amazon.BedrockAgent.Model.QueryGenerationTable.Description</property>
2640+
<min>1</min>
2641+
<max>200</max>
2642+
</property-value-rule>
2643+
<property-value-rule>
2644+
<property>Amazon.BedrockAgent.Model.QueryGenerationTable.Name</property>
2645+
<pattern>^.*\..*\..*$</pattern>
2646+
</property-value-rule>
26092647
<property-value-rule>
26102648
<property>Amazon.BedrockAgent.Model.RdsConfiguration.CredentialsSecretArn</property>
26112649
<pattern>^arn:aws(|-cn|-us-gov):secretsmanager:[a-z0-9-]{1,20}:([0-9]{12}|):secret:[a-zA-Z0-9!/_+=.@-]{1,512}$</pattern>
@@ -2684,6 +2722,28 @@
26842722
<max>2048</max>
26852723
<pattern>^.*$</pattern>
26862724
</property-value-rule>
2725+
<property-value-rule>
2726+
<property>Amazon.BedrockAgent.Model.RedshiftProvisionedAuthConfiguration.UsernamePasswordSecretArn</property>
2727+
<pattern>^arn:aws(|-cn|-us-gov):secretsmanager:[a-z0-9-]{1,20}:([0-9]{12}|):secret:[a-zA-Z0-9!/_+=.@-]{1,512}$</pattern>
2728+
</property-value-rule>
2729+
<property-value-rule>
2730+
<property>Amazon.BedrockAgent.Model.RedshiftProvisionedConfiguration.ClusterIdentifier</property>
2731+
<min>1</min>
2732+
<max>63</max>
2733+
</property-value-rule>
2734+
<property-value-rule>
2735+
<property>Amazon.BedrockAgent.Model.RedshiftQueryEngineRedshiftStorageConfiguration.DatabaseName</property>
2736+
<min>1</min>
2737+
<max>200</max>
2738+
</property-value-rule>
2739+
<property-value-rule>
2740+
<property>Amazon.BedrockAgent.Model.RedshiftServerlessAuthConfiguration.UsernamePasswordSecretArn</property>
2741+
<pattern>^arn:aws(|-cn|-us-gov):secretsmanager:[a-z0-9-]{1,20}:([0-9]{12}|):secret:[a-zA-Z0-9!/_+=.@-]{1,512}$</pattern>
2742+
</property-value-rule>
2743+
<property-value-rule>
2744+
<property>Amazon.BedrockAgent.Model.RedshiftServerlessConfiguration.WorkgroupArn</property>
2745+
<pattern>^(arn:(aws(-[a-z]+)*):redshift-serverless:[a-z]{2}(-gov)?-[a-z]+-\d{1}:\d{12}:workgroup/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$</pattern>
2746+
</property-value-rule>
26872747
<property-value-rule>
26882748
<property>Amazon.BedrockAgent.Model.RetrievalFlowNodeS3Configuration.BucketName</property>
26892749
<min>3</min>
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the bedrock-agent-2023-06-05.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.BedrockAgent.Model
31+
{
32+
/// <summary>
33+
/// Contains configurations for using Amazon Bedrock Data Automation as the parser for
34+
/// ingesting your data sources.
35+
/// </summary>
36+
public partial class BedrockDataAutomationConfiguration
37+
{
38+
private ParsingModality _parsingModality;
39+
40+
/// <summary>
41+
/// Gets and sets the property ParsingModality.
42+
/// <para>
43+
/// Specifies whether to enable parsing of multimodal data, including both text and/or
44+
/// images.
45+
/// </para>
46+
/// </summary>
47+
public ParsingModality ParsingModality
48+
{
49+
get { return this._parsingModality; }
50+
set { this._parsingModality = value; }
51+
}
52+
53+
// Check to see if ParsingModality property is set
54+
internal bool IsSetParsingModality()
55+
{
56+
return this._parsingModality != null;
57+
}
58+
59+
}
60+
}

sdk/src/Services/BedrockAgent/Generated/Model/BedrockFoundationModelConfiguration.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ namespace Amazon.BedrockAgent.Model
3636
public partial class BedrockFoundationModelConfiguration
3737
{
3838
private string _modelArn;
39+
private ParsingModality _parsingModality;
3940
private ParsingPrompt _parsingPrompt;
4041

4142
/// <summary>
4243
/// Gets and sets the property ModelArn.
4344
/// <para>
4445
/// The ARN of the foundation model or <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html">inference
45-
/// profile</a>.
46+
/// profile</a> to use for parsing.
4647
/// </para>
4748
/// </summary>
4849
[AWSProperty(Required=true, Min=1, Max=2048)]
@@ -58,6 +59,25 @@ internal bool IsSetModelArn()
5859
return this._modelArn != null;
5960
}
6061

62+
/// <summary>
63+
/// Gets and sets the property ParsingModality.
64+
/// <para>
65+
/// Specifies whether to enable parsing of multimodal data, including both text and/or
66+
/// images.
67+
/// </para>
68+
/// </summary>
69+
public ParsingModality ParsingModality
70+
{
71+
get { return this._parsingModality; }
72+
set { this._parsingModality = value; }
73+
}
74+
75+
// Check to see if ParsingModality property is set
76+
internal bool IsSetParsingModality()
77+
{
78+
return this._parsingModality != null;
79+
}
80+
6181
/// <summary>
6282
/// Gets and sets the property ParsingPrompt.
6383
/// <para>

sdk/src/Services/BedrockAgent/Generated/Model/CreateKnowledgeBaseRequest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ internal bool IsSetRoleArn()
204204
/// base.
205205
/// </para>
206206
/// </summary>
207-
[AWSProperty(Required=true)]
208207
public StorageConfiguration StorageConfiguration
209208
{
210209
get { return this._storageConfiguration; }
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the bedrock-agent-2023-06-05.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Xml.Serialization;
22+
using System.Text;
23+
using System.IO;
24+
using System.Net;
25+
26+
using Amazon.Runtime;
27+
using Amazon.Runtime.Internal;
28+
29+
#pragma warning disable CS0612,CS0618,CS1570
30+
namespace Amazon.BedrockAgent.Model
31+
{
32+
/// <summary>
33+
/// Contains configurations for a query, each of which defines information about example
34+
/// queries to help the query engine generate appropriate SQL queries.
35+
/// </summary>
36+
public partial class CuratedQuery
37+
{
38+
private string _naturalLanguage;
39+
private string _sql;
40+
41+
/// <summary>
42+
/// Gets and sets the property NaturalLanguage.
43+
/// <para>
44+
/// An example natural language query.
45+
/// </para>
46+
/// </summary>
47+
[AWSProperty(Required=true, Min=1, Max=1000)]
48+
public string NaturalLanguage
49+
{
50+
get { return this._naturalLanguage; }
51+
set { this._naturalLanguage = value; }
52+
}
53+
54+
// Check to see if NaturalLanguage property is set
55+
internal bool IsSetNaturalLanguage()
56+
{
57+
return this._naturalLanguage != null;
58+
}
59+
60+
/// <summary>
61+
/// Gets and sets the property Sql.
62+
/// <para>
63+
/// The SQL equivalent of the natural language query.
64+
/// </para>
65+
/// </summary>
66+
[AWSProperty(Required=true, Min=1, Max=1000)]
67+
public string Sql
68+
{
69+
get { return this._sql; }
70+
set { this._sql = value; }
71+
}
72+
73+
// Check to see if Sql property is set
74+
internal bool IsSetSql()
75+
{
76+
return this._sql != null;
77+
}
78+
79+
}
80+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the bedrock-agent-2023-06-05.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Globalization;
22+
using System.IO;
23+
using System.Text;
24+
using System.Xml.Serialization;
25+
26+
using Amazon.BedrockAgent.Model;
27+
using Amazon.Runtime;
28+
using Amazon.Runtime.Internal;
29+
using Amazon.Runtime.Internal.Transform;
30+
using Amazon.Runtime.Internal.Util;
31+
using ThirdParty.Json.LitJson;
32+
33+
#pragma warning disable CS0612,CS0618
34+
namespace Amazon.BedrockAgent.Model.Internal.MarshallTransformations
35+
{
36+
/// <summary>
37+
/// BedrockDataAutomationConfiguration Marshaller
38+
/// </summary>
39+
public class BedrockDataAutomationConfigurationMarshaller : IRequestMarshaller<BedrockDataAutomationConfiguration, JsonMarshallerContext>
40+
{
41+
/// <summary>
42+
/// Unmarshaller the response from the service to the response class.
43+
/// </summary>
44+
/// <param name="requestObject"></param>
45+
/// <param name="context"></param>
46+
/// <returns></returns>
47+
public void Marshall(BedrockDataAutomationConfiguration requestObject, JsonMarshallerContext context)
48+
{
49+
if(requestObject == null)
50+
return;
51+
if(requestObject.IsSetParsingModality())
52+
{
53+
context.Writer.WritePropertyName("parsingModality");
54+
context.Writer.Write(requestObject.ParsingModality);
55+
}
56+
57+
}
58+
59+
/// <summary>
60+
/// Singleton Marshaller.
61+
/// </summary>
62+
public readonly static BedrockDataAutomationConfigurationMarshaller Instance = new BedrockDataAutomationConfigurationMarshaller();
63+
64+
}
65+
}

0 commit comments

Comments
 (0)