Skip to content

Commit ec21bc0

Browse files
Make DefaultExecutorDpuSize and CoordinatorDpuSize fields optional in StartSession
1 parent 05517a2 commit ec21bc0

File tree

6 files changed

+134
-8
lines changed

6 files changed

+134
-8
lines changed

generator/ServiceModels/athena/athena-2017-05-18.api.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,8 @@
10731073
},
10741074
"CoordinatorDpuSize":{
10751075
"type":"integer",
1076-
"max":5000,
1076+
"box":true,
1077+
"max":1,
10771078
"min":1
10781079
},
10791080
"CreateDataCatalogInput":{
@@ -1258,7 +1259,8 @@
12581259
},
12591260
"DefaultExecutorDpuSize":{
12601261
"type":"integer",
1261-
"max":5000,
1262+
"box":true,
1263+
"max":1,
12621264
"min":1
12631265
},
12641266
"DeleteDataCatalogInput":{

generator/ServiceModels/athena/athena-2017-05-18.endpoint-tests.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,17 @@
494494
"UseDualStack": true
495495
}
496496
},
497+
{
498+
"documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled",
499+
"expect": {
500+
"error": "FIPS and DualStack are enabled, but this partition does not support one or both"
501+
},
502+
"params": {
503+
"Region": "us-iso-east-1",
504+
"UseFIPS": true,
505+
"UseDualStack": true
506+
}
507+
},
497508
{
498509
"documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled",
499510
"expect": {
@@ -507,6 +518,17 @@
507518
"UseDualStack": false
508519
}
509520
},
521+
{
522+
"documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled",
523+
"expect": {
524+
"error": "DualStack is enabled but this partition does not support DualStack"
525+
},
526+
"params": {
527+
"Region": "us-iso-east-1",
528+
"UseFIPS": false,
529+
"UseDualStack": true
530+
}
531+
},
510532
{
511533
"documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled",
512534
"expect": {
@@ -520,6 +542,17 @@
520542
"UseDualStack": false
521543
}
522544
},
545+
{
546+
"documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled",
547+
"expect": {
548+
"error": "FIPS and DualStack are enabled, but this partition does not support one or both"
549+
},
550+
"params": {
551+
"Region": "us-isob-east-1",
552+
"UseFIPS": true,
553+
"UseDualStack": true
554+
}
555+
},
523556
{
524557
"documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled",
525558
"expect": {
@@ -533,6 +566,17 @@
533566
"UseDualStack": false
534567
}
535568
},
569+
{
570+
"documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled",
571+
"expect": {
572+
"error": "DualStack is enabled but this partition does not support DualStack"
573+
},
574+
"params": {
575+
"Region": "us-isob-east-1",
576+
"UseFIPS": false,
577+
"UseDualStack": true
578+
}
579+
},
536580
{
537581
"documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled",
538582
"expect": {
@@ -596,6 +640,12 @@
596640
"UseDualStack": true,
597641
"Endpoint": "https://example.com"
598642
}
643+
},
644+
{
645+
"documentation": "Missing region",
646+
"expect": {
647+
"error": "Invalid Configuration: Missing Region"
648+
}
599649
}
600650
],
601651
"version": "1.0"

generator/ServiceModels/athena/athena-2017-05-18.normal.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,8 @@
12771277
},
12781278
"CoordinatorDpuSize":{
12791279
"type":"integer",
1280-
"max":5000,
1280+
"box":true,
1281+
"max":1,
12811282
"min":1
12821283
},
12831284
"CreateDataCatalogInput":{
@@ -1582,7 +1583,8 @@
15821583
},
15831584
"DefaultExecutorDpuSize":{
15841585
"type":"integer",
1585-
"max":5000,
1586+
"box":true,
1587+
"max":1,
15861588
"min":1
15871589
},
15881590
"DeleteDataCatalogInput":{

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -934,12 +934,12 @@
934934
<property-value-rule>
935935
<property>Amazon.Athena.Model.EngineConfiguration.CoordinatorDpuSize</property>
936936
<min>1</min>
937-
<max>5000</max>
937+
<max>1</max>
938938
</property-value-rule>
939939
<property-value-rule>
940940
<property>Amazon.Athena.Model.EngineConfiguration.DefaultExecutorDpuSize</property>
941941
<min>1</min>
942-
<max>5000</max>
942+
<max>1</max>
943943
</property-value-rule>
944944
<property-value-rule>
945945
<property>Amazon.Athena.Model.EngineConfiguration.MaxConcurrentDpus</property>

sdk/src/Services/Athena/Generated/Model/EngineConfiguration.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ internal bool IsSetAdditionalConfigs()
6868
/// that orchestrates processing work and manages other executors in a notebook session.
6969
/// </para>
7070
/// </summary>
71-
[AWSProperty(Min=1, Max=5000)]
71+
[AWSProperty(Min=1, Max=1)]
7272
public int CoordinatorDpuSize
7373
{
7474
get { return this._coordinatorDpuSize.GetValueOrDefault(); }
@@ -88,7 +88,7 @@ internal bool IsSetCoordinatorDpuSize()
8888
/// of compute that a notebook session can request from Athena.
8989
/// </para>
9090
/// </summary>
91-
[AWSProperty(Min=1, Max=5000)]
91+
[AWSProperty(Min=1, Max=1)]
9292
public int DefaultExecutorDpuSize
9393
{
9494
get { return this._defaultExecutorDpuSize.GetValueOrDefault(); }

sdk/test/Services/Athena/UnitTests/Generated/Endpoints/AthenaEndpointProviderTests.cs

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,21 @@ public void For_region_usgoveast1_with_FIPS_disabled_and_DualStack_enabled_Test(
597597
Assert.AreEqual("https://athena.us-gov-east-1.api.aws", endpoint.URL);
598598
}
599599

600+
[TestMethod]
601+
[TestCategory("UnitTest")]
602+
[TestCategory("Endpoints")]
603+
[TestCategory("Athena")]
604+
[Description("For region us-iso-east-1 with FIPS enabled and DualStack enabled")]
605+
[ExpectedException(typeof(AmazonClientException), @"FIPS and DualStack are enabled, but this partition does not support one or both")]
606+
public void For_region_usisoeast1_with_FIPS_enabled_and_DualStack_enabled_Test()
607+
{
608+
var parameters = new AthenaEndpointParameters();
609+
parameters["Region"] = "us-iso-east-1";
610+
parameters["UseFIPS"] = true;
611+
parameters["UseDualStack"] = true;
612+
var endpoint = new AmazonAthenaEndpointProvider().ResolveEndpoint(parameters);
613+
}
614+
600615
[TestMethod]
601616
[TestCategory("UnitTest")]
602617
[TestCategory("Endpoints")]
@@ -612,6 +627,21 @@ public void For_region_usisoeast1_with_FIPS_enabled_and_DualStack_disabled_Test(
612627
Assert.AreEqual("https://athena-fips.us-iso-east-1.c2s.ic.gov", endpoint.URL);
613628
}
614629

630+
[TestMethod]
631+
[TestCategory("UnitTest")]
632+
[TestCategory("Endpoints")]
633+
[TestCategory("Athena")]
634+
[Description("For region us-iso-east-1 with FIPS disabled and DualStack enabled")]
635+
[ExpectedException(typeof(AmazonClientException), @"DualStack is enabled but this partition does not support DualStack")]
636+
public void For_region_usisoeast1_with_FIPS_disabled_and_DualStack_enabled_Test()
637+
{
638+
var parameters = new AthenaEndpointParameters();
639+
parameters["Region"] = "us-iso-east-1";
640+
parameters["UseFIPS"] = false;
641+
parameters["UseDualStack"] = true;
642+
var endpoint = new AmazonAthenaEndpointProvider().ResolveEndpoint(parameters);
643+
}
644+
615645
[TestMethod]
616646
[TestCategory("UnitTest")]
617647
[TestCategory("Endpoints")]
@@ -627,6 +657,21 @@ public void For_region_usisoeast1_with_FIPS_disabled_and_DualStack_disabled_Test
627657
Assert.AreEqual("https://athena.us-iso-east-1.c2s.ic.gov", endpoint.URL);
628658
}
629659

660+
[TestMethod]
661+
[TestCategory("UnitTest")]
662+
[TestCategory("Endpoints")]
663+
[TestCategory("Athena")]
664+
[Description("For region us-isob-east-1 with FIPS enabled and DualStack enabled")]
665+
[ExpectedException(typeof(AmazonClientException), @"FIPS and DualStack are enabled, but this partition does not support one or both")]
666+
public void For_region_usisobeast1_with_FIPS_enabled_and_DualStack_enabled_Test()
667+
{
668+
var parameters = new AthenaEndpointParameters();
669+
parameters["Region"] = "us-isob-east-1";
670+
parameters["UseFIPS"] = true;
671+
parameters["UseDualStack"] = true;
672+
var endpoint = new AmazonAthenaEndpointProvider().ResolveEndpoint(parameters);
673+
}
674+
630675
[TestMethod]
631676
[TestCategory("UnitTest")]
632677
[TestCategory("Endpoints")]
@@ -642,6 +687,21 @@ public void For_region_usisobeast1_with_FIPS_enabled_and_DualStack_disabled_Test
642687
Assert.AreEqual("https://athena-fips.us-isob-east-1.sc2s.sgov.gov", endpoint.URL);
643688
}
644689

690+
[TestMethod]
691+
[TestCategory("UnitTest")]
692+
[TestCategory("Endpoints")]
693+
[TestCategory("Athena")]
694+
[Description("For region us-isob-east-1 with FIPS disabled and DualStack enabled")]
695+
[ExpectedException(typeof(AmazonClientException), @"DualStack is enabled but this partition does not support DualStack")]
696+
public void For_region_usisobeast1_with_FIPS_disabled_and_DualStack_enabled_Test()
697+
{
698+
var parameters = new AthenaEndpointParameters();
699+
parameters["Region"] = "us-isob-east-1";
700+
parameters["UseFIPS"] = false;
701+
parameters["UseDualStack"] = true;
702+
var endpoint = new AmazonAthenaEndpointProvider().ResolveEndpoint(parameters);
703+
}
704+
645705
[TestMethod]
646706
[TestCategory("UnitTest")]
647707
[TestCategory("Endpoints")]
@@ -720,5 +780,17 @@ public void For_custom_endpoint_with_fips_disabled_and_dualstack_enabled_Test()
720780
var endpoint = new AmazonAthenaEndpointProvider().ResolveEndpoint(parameters);
721781
}
722782

783+
[TestMethod]
784+
[TestCategory("UnitTest")]
785+
[TestCategory("Endpoints")]
786+
[TestCategory("Athena")]
787+
[Description("Missing region")]
788+
[ExpectedException(typeof(AmazonClientException), @"Invalid Configuration: Missing Region")]
789+
public void Missing_region_Test()
790+
{
791+
var parameters = new AthenaEndpointParameters();
792+
var endpoint = new AmazonAthenaEndpointProvider().ResolveEndpoint(parameters);
793+
}
794+
723795
}
724796
}

0 commit comments

Comments
 (0)