Skip to content

Commit 1bd97f0

Browse files
AWS Kendra now supports featured results for a query.
1 parent ffb7f4a commit 1bd97f0

File tree

98 files changed

+11645
-2789
lines changed

Some content is hidden

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

98 files changed

+11645
-2789
lines changed

generator/ServiceModels/kendra/kendra-2019-02-03.api.json

Lines changed: 345 additions & 1 deletion
Large diffs are not rendered by default.

generator/ServiceModels/kendra/kendra-2019-02-03.docs.json

Lines changed: 331 additions & 80 deletions
Large diffs are not rendered by default.

generator/ServiceModels/kendra/kendra-2019-02-03.endpoint-rule-set.json

Lines changed: 218 additions & 174 deletions
Large diffs are not rendered by default.

generator/ServiceModels/kendra/kendra-2019-02-03.endpoint-tests.json

Lines changed: 129 additions & 352 deletions
Large diffs are not rendered by default.

generator/ServiceModels/kendra/kendra-2019-02-03.normal.json

Lines changed: 646 additions & 78 deletions
Large diffs are not rendered by default.

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

Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
<max>36</max>
3131
<pattern>[a-zA-Z0-9][a-zA-Z0-9-]*</pattern>
3232
</property-value-rule>
33+
<property-value-rule>
34+
<property>Amazon.Kendra.Model.BatchDeleteFeaturedResultsSetRequest.IndexId</property>
35+
<min>36</min>
36+
<max>36</max>
37+
<pattern>[a-zA-Z0-9][a-zA-Z0-9-]*</pattern>
38+
</property-value-rule>
3339
<property-value-rule>
3440
<property>Amazon.Kendra.Model.BatchGetDocumentStatusRequest.IndexId</property>
3541
<min>36</min>
@@ -200,6 +206,29 @@
200206
<max>100</max>
201207
<pattern>[a-zA-Z0-9][a-zA-Z0-9_-]*</pattern>
202208
</property-value-rule>
209+
<property-value-rule>
210+
<property>Amazon.Kendra.Model.CreateFeaturedResultsSetRequest.ClientToken</property>
211+
<min>1</min>
212+
<max>100</max>
213+
</property-value-rule>
214+
<property-value-rule>
215+
<property>Amazon.Kendra.Model.CreateFeaturedResultsSetRequest.Description</property>
216+
<min>0</min>
217+
<max>1000</max>
218+
<pattern>^\P{C}*$</pattern>
219+
</property-value-rule>
220+
<property-value-rule>
221+
<property>Amazon.Kendra.Model.CreateFeaturedResultsSetRequest.FeaturedResultsSetName</property>
222+
<min>1</min>
223+
<max>1000</max>
224+
<pattern>[a-zA-Z0-9][ a-zA-Z0-9_-]*</pattern>
225+
</property-value-rule>
226+
<property-value-rule>
227+
<property>Amazon.Kendra.Model.CreateFeaturedResultsSetRequest.IndexId</property>
228+
<min>36</min>
229+
<max>36</max>
230+
<pattern>[a-zA-Z0-9][a-zA-Z0-9-]*</pattern>
231+
</property-value-rule>
203232
<property-value-rule>
204233
<property>Amazon.Kendra.Model.CreateIndexRequest.ClientToken</property>
205234
<min>1</min>
@@ -586,6 +615,36 @@
586615
<max>1284</max>
587616
<pattern>arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}:[^/].{0,1023}</pattern>
588617
</property-value-rule>
618+
<property-value-rule>
619+
<property>Amazon.Kendra.Model.DescribeFeaturedResultsSetRequest.FeaturedResultsSetId</property>
620+
<min>36</min>
621+
<max>36</max>
622+
<pattern>^[a-zA-Z-0-9]*</pattern>
623+
</property-value-rule>
624+
<property-value-rule>
625+
<property>Amazon.Kendra.Model.DescribeFeaturedResultsSetRequest.IndexId</property>
626+
<min>36</min>
627+
<max>36</max>
628+
<pattern>[a-zA-Z0-9][a-zA-Z0-9-]*</pattern>
629+
</property-value-rule>
630+
<property-value-rule>
631+
<property>Amazon.Kendra.Model.DescribeFeaturedResultsSetResponse.Description</property>
632+
<min>0</min>
633+
<max>1000</max>
634+
<pattern>^\P{C}*$</pattern>
635+
</property-value-rule>
636+
<property-value-rule>
637+
<property>Amazon.Kendra.Model.DescribeFeaturedResultsSetResponse.FeaturedResultsSetId</property>
638+
<min>36</min>
639+
<max>36</max>
640+
<pattern>^[a-zA-Z-0-9]*</pattern>
641+
</property-value-rule>
642+
<property-value-rule>
643+
<property>Amazon.Kendra.Model.DescribeFeaturedResultsSetResponse.FeaturedResultsSetName</property>
644+
<min>1</min>
645+
<max>1000</max>
646+
<pattern>[a-zA-Z0-9][ a-zA-Z0-9_-]*</pattern>
647+
</property-value-rule>
589648
<property-value-rule>
590649
<property>Amazon.Kendra.Model.DescribeIndexRequest.Id</property>
591650
<min>36</min>
@@ -985,6 +1044,27 @@
9851044
<min>1</min>
9861045
<max>800</max>
9871046
</property-value-rule>
1047+
<property-value-rule>
1048+
<property>Amazon.Kendra.Model.ListFeaturedResultsSetsRequest.IndexId</property>
1049+
<min>36</min>
1050+
<max>36</max>
1051+
<pattern>[a-zA-Z0-9][a-zA-Z0-9-]*</pattern>
1052+
</property-value-rule>
1053+
<property-value-rule>
1054+
<property>Amazon.Kendra.Model.ListFeaturedResultsSetsRequest.MaxResults</property>
1055+
<min>1</min>
1056+
<max>100</max>
1057+
</property-value-rule>
1058+
<property-value-rule>
1059+
<property>Amazon.Kendra.Model.ListFeaturedResultsSetsRequest.NextToken</property>
1060+
<min>1</min>
1061+
<max>800</max>
1062+
</property-value-rule>
1063+
<property-value-rule>
1064+
<property>Amazon.Kendra.Model.ListFeaturedResultsSetsResponse.NextToken</property>
1065+
<min>1</min>
1066+
<max>800</max>
1067+
</property-value-rule>
9881068
<property-value-rule>
9891069
<property>Amazon.Kendra.Model.ListGroupsOlderThanOrderingIdRequest.DataSourceId</property>
9901070
<min>1</min>
@@ -1272,6 +1352,30 @@
12721352
<max>1284</max>
12731353
<pattern>arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}:[^/].{0,1023}</pattern>
12741354
</property-value-rule>
1355+
<property-value-rule>
1356+
<property>Amazon.Kendra.Model.UpdateFeaturedResultsSetRequest.Description</property>
1357+
<min>0</min>
1358+
<max>1000</max>
1359+
<pattern>^\P{C}*$</pattern>
1360+
</property-value-rule>
1361+
<property-value-rule>
1362+
<property>Amazon.Kendra.Model.UpdateFeaturedResultsSetRequest.FeaturedResultsSetId</property>
1363+
<min>36</min>
1364+
<max>36</max>
1365+
<pattern>^[a-zA-Z-0-9]*</pattern>
1366+
</property-value-rule>
1367+
<property-value-rule>
1368+
<property>Amazon.Kendra.Model.UpdateFeaturedResultsSetRequest.FeaturedResultsSetName</property>
1369+
<min>1</min>
1370+
<max>1000</max>
1371+
<pattern>[a-zA-Z0-9][ a-zA-Z0-9_-]*</pattern>
1372+
</property-value-rule>
1373+
<property-value-rule>
1374+
<property>Amazon.Kendra.Model.UpdateFeaturedResultsSetRequest.IndexId</property>
1375+
<min>36</min>
1376+
<max>36</max>
1377+
<pattern>[a-zA-Z0-9][a-zA-Z0-9-]*</pattern>
1378+
</property-value-rule>
12751379
<property-value-rule>
12761380
<property>Amazon.Kendra.Model.UpdateIndexRequest.Description</property>
12771381
<min>0</min>
@@ -1440,6 +1544,18 @@
14401544
<min>1</min>
14411545
<max>2048</max>
14421546
</property-value-rule>
1547+
<property-value-rule>
1548+
<property>Amazon.Kendra.Model.BatchDeleteFeaturedResultsSetError.ErrorMessage</property>
1549+
<min>1</min>
1550+
<max>2048</max>
1551+
<pattern>^\P{C}*$</pattern>
1552+
</property-value-rule>
1553+
<property-value-rule>
1554+
<property>Amazon.Kendra.Model.BatchDeleteFeaturedResultsSetError.Id</property>
1555+
<min>36</min>
1556+
<max>36</max>
1557+
<pattern>^[a-zA-Z-0-9]*</pattern>
1558+
</property-value-rule>
14431559
<property-value-rule>
14441560
<property>Amazon.Kendra.Model.BatchGetDocumentStatusResponseError.DocumentId</property>
14451561
<min>1</min>
@@ -1505,6 +1621,21 @@
15051621
<max>100</max>
15061622
<pattern>^[a-zA-Z][a-zA-Z0-9_]*$</pattern>
15071623
</property-value-rule>
1624+
<property-value-rule>
1625+
<property>Amazon.Kendra.Model.ConflictingItem.QueryText</property>
1626+
<min>1</min>
1627+
<max>1000</max>
1628+
</property-value-rule>
1629+
<property-value-rule>
1630+
<property>Amazon.Kendra.Model.ConflictingItem.SetId</property>
1631+
<min>1</min>
1632+
<max>2048</max>
1633+
</property-value-rule>
1634+
<property-value-rule>
1635+
<property>Amazon.Kendra.Model.ConflictingItem.SetName</property>
1636+
<min>1</min>
1637+
<max>2048</max>
1638+
</property-value-rule>
15081639
<property-value-rule>
15091640
<property>Amazon.Kendra.Model.ConfluenceAttachmentToIndexFieldMapping.DateFieldFormat</property>
15101641
<min>4</min>
@@ -1876,6 +2007,84 @@
18762007
<max>100</max>
18772008
<pattern>[a-zA-Z0-9][a-zA-Z0-9_-]*</pattern>
18782009
</property-value-rule>
2010+
<property-value-rule>
2011+
<property>Amazon.Kendra.Model.FeaturedDocument.Id</property>
2012+
<min>1</min>
2013+
<max>2048</max>
2014+
</property-value-rule>
2015+
<property-value-rule>
2016+
<property>Amazon.Kendra.Model.FeaturedDocumentMissing.Id</property>
2017+
<min>1</min>
2018+
<max>2048</max>
2019+
</property-value-rule>
2020+
<property-value-rule>
2021+
<property>Amazon.Kendra.Model.FeaturedDocumentWithMetadata.Id</property>
2022+
<min>1</min>
2023+
<max>2048</max>
2024+
</property-value-rule>
2025+
<property-value-rule>
2026+
<property>Amazon.Kendra.Model.FeaturedDocumentWithMetadata.Title</property>
2027+
<min>1</min>
2028+
<max>2048</max>
2029+
</property-value-rule>
2030+
<property-value-rule>
2031+
<property>Amazon.Kendra.Model.FeaturedDocumentWithMetadata.URI</property>
2032+
<min>1</min>
2033+
<max>2048</max>
2034+
<pattern>^(https?|ftp|file):\/\/([^\s]*)</pattern>
2035+
</property-value-rule>
2036+
<property-value-rule>
2037+
<property>Amazon.Kendra.Model.FeaturedResultsItem.DocumentId</property>
2038+
<min>1</min>
2039+
<max>2048</max>
2040+
</property-value-rule>
2041+
<property-value-rule>
2042+
<property>Amazon.Kendra.Model.FeaturedResultsItem.DocumentURI</property>
2043+
<min>1</min>
2044+
<max>2048</max>
2045+
<pattern>^(https?|ftp|file):\/\/([^\s]*)</pattern>
2046+
</property-value-rule>
2047+
<property-value-rule>
2048+
<property>Amazon.Kendra.Model.FeaturedResultsItem.FeedbackToken</property>
2049+
<min>1</min>
2050+
<max>2048</max>
2051+
<pattern>^\P{C}*.\P{C}*$</pattern>
2052+
</property-value-rule>
2053+
<property-value-rule>
2054+
<property>Amazon.Kendra.Model.FeaturedResultsItem.Id</property>
2055+
<min>1</min>
2056+
<max>73</max>
2057+
</property-value-rule>
2058+
<property-value-rule>
2059+
<property>Amazon.Kendra.Model.FeaturedResultsSet.Description</property>
2060+
<min>0</min>
2061+
<max>1000</max>
2062+
<pattern>^\P{C}*$</pattern>
2063+
</property-value-rule>
2064+
<property-value-rule>
2065+
<property>Amazon.Kendra.Model.FeaturedResultsSet.FeaturedResultsSetId</property>
2066+
<min>36</min>
2067+
<max>36</max>
2068+
<pattern>^[a-zA-Z-0-9]*</pattern>
2069+
</property-value-rule>
2070+
<property-value-rule>
2071+
<property>Amazon.Kendra.Model.FeaturedResultsSet.FeaturedResultsSetName</property>
2072+
<min>1</min>
2073+
<max>1000</max>
2074+
<pattern>[a-zA-Z0-9][ a-zA-Z0-9_-]*</pattern>
2075+
</property-value-rule>
2076+
<property-value-rule>
2077+
<property>Amazon.Kendra.Model.FeaturedResultsSetSummary.FeaturedResultsSetId</property>
2078+
<min>36</min>
2079+
<max>36</max>
2080+
<pattern>^[a-zA-Z-0-9]*</pattern>
2081+
</property-value-rule>
2082+
<property-value-rule>
2083+
<property>Amazon.Kendra.Model.FeaturedResultsSetSummary.FeaturedResultsSetName</property>
2084+
<min>1</min>
2085+
<max>1000</max>
2086+
<pattern>[a-zA-Z0-9][ a-zA-Z0-9_-]*</pattern>
2087+
</property-value-rule>
18792088
<property-value-rule>
18802089
<property>Amazon.Kendra.Model.FsxConfiguration.FileSystemId</property>
18812090
<min>11</min>

sdk/src/Services/Kendra/Generated/Internal/AmazonKendraEndpointProvider.cs

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ public Endpoint ResolveEndpoint(EndpointParameters parameters)
4040
if (parameters == null)
4141
throw new ArgumentNullException("parameters");
4242

43-
if (parameters["Region"] == null)
44-
throw new AmazonClientException("Region parameter must be set for endpoint resolution");
4543
if (parameters["UseDualStack"] == null)
4644
throw new AmazonClientException("UseDualStack parameter must be set for endpoint resolution");
4745
if (parameters["UseFIPS"] == null)
@@ -54,46 +52,50 @@ public Endpoint ResolveEndpoint(EndpointParameters parameters)
5452
["UseFIPS"] = parameters["UseFIPS"],
5553
["Endpoint"] = parameters["Endpoint"],
5654
};
57-
if ((refs["PartitionResult"] = Partition((string)refs["Region"])) != null)
55+
if (IsSet(refs["Endpoint"]))
5856
{
59-
if (IsSet(refs["Endpoint"]))
57+
if (Equals(refs["UseFIPS"], true))
6058
{
61-
if (Equals(refs["UseFIPS"], true))
62-
{
63-
throw new AmazonClientException("Invalid Configuration: FIPS and custom endpoint are not supported");
64-
}
65-
if (Equals(refs["UseDualStack"], true))
66-
{
67-
throw new AmazonClientException("Invalid Configuration: Dualstack and custom endpoint are not supported");
68-
}
69-
return new Endpoint((string)refs["Endpoint"], InterpolateJson(@"", refs), InterpolateJson(@"", refs));
59+
throw new AmazonClientException("Invalid Configuration: FIPS and custom endpoint are not supported");
7060
}
71-
if (Equals(refs["UseFIPS"], true) && Equals(refs["UseDualStack"], true))
61+
if (Equals(refs["UseDualStack"], true))
7262
{
73-
if (Equals(true, GetAttr(refs["PartitionResult"], "supportsFIPS")) && Equals(true, GetAttr(refs["PartitionResult"], "supportsDualStack")))
74-
{
75-
return new Endpoint(Interpolate(@"https://kendra-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
76-
}
77-
throw new AmazonClientException("FIPS and DualStack are enabled, but this partition does not support one or both");
63+
throw new AmazonClientException("Invalid Configuration: Dualstack and custom endpoint are not supported");
7864
}
79-
if (Equals(refs["UseFIPS"], true))
65+
return new Endpoint((string)refs["Endpoint"], InterpolateJson(@"", refs), InterpolateJson(@"", refs));
66+
}
67+
if (IsSet(refs["Region"]))
68+
{
69+
if ((refs["PartitionResult"] = Partition((string)refs["Region"])) != null)
8070
{
81-
if (Equals(true, GetAttr(refs["PartitionResult"], "supportsFIPS")))
71+
if (Equals(refs["UseFIPS"], true) && Equals(refs["UseDualStack"], true))
8272
{
83-
return new Endpoint(Interpolate(@"https://kendra-fips.{Region}.{PartitionResult#dnsSuffix}", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
73+
if (Equals(true, GetAttr(refs["PartitionResult"], "supportsFIPS")) && Equals(true, GetAttr(refs["PartitionResult"], "supportsDualStack")))
74+
{
75+
return new Endpoint(Interpolate(@"https://kendra-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
76+
}
77+
throw new AmazonClientException("FIPS and DualStack are enabled, but this partition does not support one or both");
8478
}
85-
throw new AmazonClientException("FIPS is enabled but this partition does not support FIPS");
86-
}
87-
if (Equals(refs["UseDualStack"], true))
88-
{
89-
if (Equals(true, GetAttr(refs["PartitionResult"], "supportsDualStack")))
79+
if (Equals(refs["UseFIPS"], true))
80+
{
81+
if (Equals(true, GetAttr(refs["PartitionResult"], "supportsFIPS")))
82+
{
83+
return new Endpoint(Interpolate(@"https://kendra-fips.{Region}.{PartitionResult#dnsSuffix}", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
84+
}
85+
throw new AmazonClientException("FIPS is enabled but this partition does not support FIPS");
86+
}
87+
if (Equals(refs["UseDualStack"], true))
9088
{
91-
return new Endpoint(Interpolate(@"https://kendra.{Region}.{PartitionResult#dualStackDnsSuffix}", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
89+
if (Equals(true, GetAttr(refs["PartitionResult"], "supportsDualStack")))
90+
{
91+
return new Endpoint(Interpolate(@"https://kendra.{Region}.{PartitionResult#dualStackDnsSuffix}", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
92+
}
93+
throw new AmazonClientException("DualStack is enabled but this partition does not support DualStack");
9294
}
93-
throw new AmazonClientException("DualStack is enabled but this partition does not support DualStack");
95+
return new Endpoint(Interpolate(@"https://kendra.{Region}.{PartitionResult#dnsSuffix}", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
9496
}
95-
return new Endpoint(Interpolate(@"https://kendra.{Region}.{PartitionResult#dnsSuffix}", refs), InterpolateJson(@"", refs), InterpolateJson(@"", refs));
9697
}
98+
throw new AmazonClientException("Invalid Configuration: Missing Region");
9799

98100
throw new AmazonClientException("Cannot resolve endpoint");
99101
}

0 commit comments

Comments
 (0)