Skip to content

Commit f14e3b4

Browse files
Added optional "customMetadataField" for Amazon Aurora knowledge bases, allowing single-column metadata. Also added optional "textIndexName" for MongoDB Atlas knowledge bases, enabling hybrid search support.
1 parent d8b8f79 commit f14e3b4

File tree

10 files changed

+90
-0
lines changed

10 files changed

+90
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5307,6 +5307,7 @@
53075307
"endpoint":{"shape":"MongoDbAtlasEndpoint"},
53085308
"endpointServiceName":{"shape":"MongoDbAtlasEndpointServiceName"},
53095309
"fieldMapping":{"shape":"MongoDbAtlasFieldMapping"},
5310+
"textIndexName":{"shape":"MongoDbAtlasIndexName"},
53105311
"vectorIndexName":{"shape":"MongoDbAtlasIndexName"}
53115312
}
53125313
},
@@ -6047,6 +6048,7 @@
60476048
"vectorField"
60486049
],
60496050
"members":{
6051+
"customMetadataField":{"shape":"ColumnName"},
60506052
"metadataField":{"shape":"ColumnName"},
60516053
"primaryKeyField":{"shape":"ColumnName"},
60526054
"textField":{"shape":"ColumnName"},

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,7 @@
558558
"ColumnName": {
559559
"base": null,
560560
"refs": {
561+
"RdsFieldMapping$customMetadataField": "<p>Provide a name for the universal metadata field where Amazon Bedrock will store any custom metadata from your data source.</p>",
561562
"RdsFieldMapping$metadataField": "<p>The name of the field in which Amazon Bedrock stores metadata about the vector store.</p>",
562563
"RdsFieldMapping$primaryKeyField": "<p>The name of the field in which Amazon Bedrock stores the ID for each entry.</p>",
563564
"RdsFieldMapping$textField": "<p>The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose.</p>",
@@ -2795,6 +2796,7 @@
27952796
"MongoDbAtlasIndexName": {
27962797
"base": null,
27972798
"refs": {
2799+
"MongoDbAtlasConfiguration$textIndexName": "<p>The name of the text search index in the MongoDB collection. This is required for using the hybrid search feature.</p>",
27982800
"MongoDbAtlasConfiguration$vectorIndexName": "<p>The name of the MongoDB Atlas vector search index.</p>"
27992801
}
28002802
},

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7639,6 +7639,10 @@
76397639
"shape":"MongoDbAtlasFieldMapping",
76407640
"documentation":"<p>Contains the names of the fields to which to map information about the vector store.</p>"
76417641
},
7642+
"textIndexName":{
7643+
"shape":"MongoDbAtlasIndexName",
7644+
"documentation":"<p>The name of the text search index in the MongoDB collection. This is required for using the hybrid search feature.</p>"
7645+
},
76427646
"vectorIndexName":{
76437647
"shape":"MongoDbAtlasIndexName",
76447648
"documentation":"<p>The name of the MongoDB Atlas vector search index.</p>"
@@ -8749,6 +8753,10 @@
87498753
"vectorField"
87508754
],
87518755
"members":{
8756+
"customMetadataField":{
8757+
"shape":"ColumnName",
8758+
"documentation":"<p>Provide a name for the universal metadata field where Amazon Bedrock will store any custom metadata from your data source.</p>"
8759+
},
87528760
"metadataField":{
87538761
"shape":"ColumnName",
87548762
"documentation":"<p>The name of the field in which Amazon Bedrock stores metadata about the vector store.</p>"

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2417,6 +2417,12 @@
24172417
<max>255</max>
24182418
<pattern>^(?:arn:aws(?:-us-gov|-cn|-iso|-iso-[a-z])*:.+:.*:\d+:.+/.+$|[a-zA-Z0-9*]+[a-zA-Z0-9._-]*)$</pattern>
24192419
</property-value-rule>
2420+
<property-value-rule>
2421+
<property>Amazon.BedrockAgent.Model.MongoDbAtlasConfiguration.TextIndexName</property>
2422+
<min>0</min>
2423+
<max>2048</max>
2424+
<pattern>^.*$</pattern>
2425+
</property-value-rule>
24202426
<property-value-rule>
24212427
<property>Amazon.BedrockAgent.Model.MongoDbAtlasConfiguration.VectorIndexName</property>
24222428
<min>0</min>
@@ -2722,6 +2728,12 @@
27222728
<max>63</max>
27232729
<pattern>^[a-zA-Z0-9_\.\-]+$</pattern>
27242730
</property-value-rule>
2731+
<property-value-rule>
2732+
<property>Amazon.BedrockAgent.Model.RdsFieldMapping.CustomMetadataField</property>
2733+
<min>0</min>
2734+
<max>63</max>
2735+
<pattern>^[a-zA-Z0-9_\-]+$</pattern>
2736+
</property-value-rule>
27252737
<property-value-rule>
27262738
<property>Amazon.BedrockAgent.Model.RdsFieldMapping.MetadataField</property>
27272739
<min>0</min>

sdk/src/Services/BedrockAgent/Generated/Model/Internal/MarshallTransformations/MongoDbAtlasConfigurationMarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ public void Marshall(MongoDbAtlasConfiguration requestObject, JsonMarshallerCont
8989
context.Writer.WriteObjectEnd();
9090
}
9191

92+
if(requestObject.IsSetTextIndexName())
93+
{
94+
context.Writer.WritePropertyName("textIndexName");
95+
context.Writer.Write(requestObject.TextIndexName);
96+
}
97+
9298
if(requestObject.IsSetVectorIndexName())
9399
{
94100
context.Writer.WritePropertyName("vectorIndexName");

sdk/src/Services/BedrockAgent/Generated/Model/Internal/MarshallTransformations/MongoDbAtlasConfigurationUnmarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ public MongoDbAtlasConfiguration Unmarshall(JsonUnmarshallerContext context)
102102
unmarshalledObject.FieldMapping = unmarshaller.Unmarshall(context);
103103
continue;
104104
}
105+
if (context.TestExpression("textIndexName", targetDepth))
106+
{
107+
var unmarshaller = StringUnmarshaller.Instance;
108+
unmarshalledObject.TextIndexName = unmarshaller.Unmarshall(context);
109+
continue;
110+
}
105111
if (context.TestExpression("vectorIndexName", targetDepth))
106112
{
107113
var unmarshaller = StringUnmarshaller.Instance;

sdk/src/Services/BedrockAgent/Generated/Model/Internal/MarshallTransformations/RdsFieldMappingMarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ public void Marshall(RdsFieldMapping requestObject, JsonMarshallerContext contex
4848
{
4949
if(requestObject == null)
5050
return;
51+
if(requestObject.IsSetCustomMetadataField())
52+
{
53+
context.Writer.WritePropertyName("customMetadataField");
54+
context.Writer.Write(requestObject.CustomMetadataField);
55+
}
56+
5157
if(requestObject.IsSetMetadataField())
5258
{
5359
context.Writer.WritePropertyName("metadataField");

sdk/src/Services/BedrockAgent/Generated/Model/Internal/MarshallTransformations/RdsFieldMappingUnmarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ public RdsFieldMapping Unmarshall(JsonUnmarshallerContext context)
6666
int targetDepth = context.CurrentDepth;
6767
while (context.ReadAtDepth(targetDepth))
6868
{
69+
if (context.TestExpression("customMetadataField", targetDepth))
70+
{
71+
var unmarshaller = StringUnmarshaller.Instance;
72+
unmarshalledObject.CustomMetadataField = unmarshaller.Unmarshall(context);
73+
continue;
74+
}
6975
if (context.TestExpression("metadataField", targetDepth))
7076
{
7177
var unmarshaller = StringUnmarshaller.Instance;

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public partial class MongoDbAtlasConfiguration
4141
private string _endpoint;
4242
private string _endpointServiceName;
4343
private MongoDbAtlasFieldMapping _fieldMapping;
44+
private string _textIndexName;
4445
private string _vectorIndexName;
4546

4647
/// <summary>
@@ -159,6 +160,26 @@ internal bool IsSetFieldMapping()
159160
return this._fieldMapping != null;
160161
}
161162

163+
/// <summary>
164+
/// Gets and sets the property TextIndexName.
165+
/// <para>
166+
/// The name of the text search index in the MongoDB collection. This is required for
167+
/// using the hybrid search feature.
168+
/// </para>
169+
/// </summary>
170+
[AWSProperty(Min=0, Max=2048)]
171+
public string TextIndexName
172+
{
173+
get { return this._textIndexName; }
174+
set { this._textIndexName = value; }
175+
}
176+
177+
// Check to see if TextIndexName property is set
178+
internal bool IsSetTextIndexName()
179+
{
180+
return this._textIndexName != null;
181+
}
182+
162183
/// <summary>
163184
/// Gets and sets the property VectorIndexName.
164185
/// <para>

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,32 @@ namespace Amazon.BedrockAgent.Model
3434
/// </summary>
3535
public partial class RdsFieldMapping
3636
{
37+
private string _customMetadataField;
3738
private string _metadataField;
3839
private string _primaryKeyField;
3940
private string _textField;
4041
private string _vectorField;
4142

43+
/// <summary>
44+
/// Gets and sets the property CustomMetadataField.
45+
/// <para>
46+
/// Provide a name for the universal metadata field where Amazon Bedrock will store any
47+
/// custom metadata from your data source.
48+
/// </para>
49+
/// </summary>
50+
[AWSProperty(Min=0, Max=63)]
51+
public string CustomMetadataField
52+
{
53+
get { return this._customMetadataField; }
54+
set { this._customMetadataField = value; }
55+
}
56+
57+
// Check to see if CustomMetadataField property is set
58+
internal bool IsSetCustomMetadataField()
59+
{
60+
return this._customMetadataField != null;
61+
}
62+
4263
/// <summary>
4364
/// Gets and sets the property MetadataField.
4465
/// <para>

0 commit comments

Comments
 (0)