Skip to content

Commit cb401b6

Browse files
StartDBCluster and StopDBCluster can now throw InvalidDBShardGroupStateFault.
1 parent 5572e67 commit cb401b6

File tree

8 files changed

+52
-4
lines changed

8 files changed

+52
-4
lines changed

generator/ServiceModels/rds/rds-2014-10-31.api.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2697,7 +2697,8 @@
26972697
"errors":[
26982698
{"shape":"DBClusterNotFoundFault"},
26992699
{"shape":"InvalidDBClusterStateFault"},
2700-
{"shape":"InvalidDBInstanceStateFault"}
2700+
{"shape":"InvalidDBInstanceStateFault"},
2701+
{"shape":"InvalidDBShardGroupStateFault"}
27012702
]
27022703
},
27032704
"StartDBInstance":{
@@ -2801,7 +2802,8 @@
28012802
"errors":[
28022803
{"shape":"DBClusterNotFoundFault"},
28032804
{"shape":"InvalidDBClusterStateFault"},
2804-
{"shape":"InvalidDBInstanceStateFault"}
2805+
{"shape":"InvalidDBInstanceStateFault"},
2806+
{"shape":"InvalidDBShardGroupStateFault"}
28052807
]
28062808
},
28072809
"StopDBInstance":{

generator/ServiceModels/rds/rds-2014-10-31.normal.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2849,7 +2849,8 @@
28492849
"errors":[
28502850
{"shape":"DBClusterNotFoundFault"},
28512851
{"shape":"InvalidDBClusterStateFault"},
2852-
{"shape":"InvalidDBInstanceStateFault"}
2852+
{"shape":"InvalidDBInstanceStateFault"},
2853+
{"shape":"InvalidDBShardGroupStateFault"}
28532854
],
28542855
"documentation":"<p>Starts an Amazon Aurora DB cluster that was stopped using the Amazon Web Services console, the stop-db-cluster CLI command, or the <code>StopDBCluster</code> operation.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-cluster-stop-start.html\"> Stopping and Starting an Aurora Cluster</a> in the <i>Amazon Aurora User Guide</i>.</p> <note> <p>This operation only applies to Aurora DB clusters.</p> </note>"
28552856
},
@@ -2958,7 +2959,8 @@
29582959
"errors":[
29592960
{"shape":"DBClusterNotFoundFault"},
29602961
{"shape":"InvalidDBClusterStateFault"},
2961-
{"shape":"InvalidDBInstanceStateFault"}
2962+
{"shape":"InvalidDBInstanceStateFault"},
2963+
{"shape":"InvalidDBShardGroupStateFault"}
29622964
],
29632965
"documentation":"<p>Stops an Amazon Aurora DB cluster. When you stop a DB cluster, Aurora retains the DB cluster's metadata, including its endpoints and DB parameter groups. Aurora also retains the transaction logs so you can do a point-in-time restore if necessary.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-cluster-stop-start.html\"> Stopping and Starting an Aurora Cluster</a> in the <i>Amazon Aurora User Guide</i>.</p> <note> <p>This operation only applies to Aurora DB clusters.</p> </note>"
29642966
},

sdk/src/Services/RDS/Generated/Model/Internal/MarshallTransformations/StartDBClusterResponseUnmarshaller.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ public override AmazonServiceException UnmarshallException(XmlUnmarshallerContex
125125
{
126126
return InvalidDBInstanceStateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
127127
}
128+
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidDBShardGroupState"))
129+
{
130+
return InvalidDBShardGroupStateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
131+
}
128132
}
129133
return new AmazonRDSException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
130134
}

sdk/src/Services/RDS/Generated/Model/Internal/MarshallTransformations/StopDBClusterResponseUnmarshaller.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ public override AmazonServiceException UnmarshallException(XmlUnmarshallerContex
125125
{
126126
return InvalidDBInstanceStateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
127127
}
128+
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidDBShardGroupState"))
129+
{
130+
return InvalidDBShardGroupStateExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
131+
}
128132
}
129133
return new AmazonRDSException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
130134
}

sdk/src/Services/RDS/Generated/_bcl/AmazonRDSClient.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14221,6 +14221,9 @@ public virtual StartActivityStreamResponse StartActivityStream(StartActivityStre
1422114221
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
1422214222
/// The DB instance isn't in a valid state.
1422314223
/// </exception>
14224+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
14225+
/// The DB shard group must be in the available state.
14226+
/// </exception>
1422414227
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster">REST API Reference for StartDBCluster Operation</seealso>
1422514228
public virtual StartDBClusterResponse StartDBCluster(StartDBClusterRequest request)
1422614229
{
@@ -14262,6 +14265,9 @@ public virtual StartDBClusterResponse StartDBCluster(StartDBClusterRequest reque
1426214265
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
1426314266
/// The DB instance isn't in a valid state.
1426414267
/// </exception>
14268+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
14269+
/// The DB shard group must be in the available state.
14270+
/// </exception>
1426514271
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster">REST API Reference for StartDBCluster Operation</seealso>
1426614272
public virtual Task<StartDBClusterResponse> StartDBClusterAsync(StartDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
1426714273
{
@@ -14789,6 +14795,9 @@ public virtual StopActivityStreamResponse StopActivityStream(StopActivityStreamR
1478914795
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
1479014796
/// The DB instance isn't in a valid state.
1479114797
/// </exception>
14798+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
14799+
/// The DB shard group must be in the available state.
14800+
/// </exception>
1479214801
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster">REST API Reference for StopDBCluster Operation</seealso>
1479314802
public virtual StopDBClusterResponse StopDBCluster(StopDBClusterRequest request)
1479414803
{
@@ -14831,6 +14840,9 @@ public virtual StopDBClusterResponse StopDBCluster(StopDBClusterRequest request)
1483114840
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
1483214841
/// The DB instance isn't in a valid state.
1483314842
/// </exception>
14843+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
14844+
/// The DB shard group must be in the available state.
14845+
/// </exception>
1483414846
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster">REST API Reference for StopDBCluster Operation</seealso>
1483514847
public virtual Task<StopDBClusterResponse> StopDBClusterAsync(StopDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
1483614848
{

sdk/src/Services/RDS/Generated/_bcl/IAmazonRDS.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11963,6 +11963,9 @@ public partial interface IAmazonRDS : IAmazonService, IDisposable
1196311963
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
1196411964
/// The DB instance isn't in a valid state.
1196511965
/// </exception>
11966+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
11967+
/// The DB shard group must be in the available state.
11968+
/// </exception>
1196611969
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster">REST API Reference for StartDBCluster Operation</seealso>
1196711970
StartDBClusterResponse StartDBCluster(StartDBClusterRequest request);
1196811971

@@ -11998,6 +12001,9 @@ public partial interface IAmazonRDS : IAmazonService, IDisposable
1199812001
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
1199912002
/// The DB instance isn't in a valid state.
1200012003
/// </exception>
12004+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
12005+
/// The DB shard group must be in the available state.
12006+
/// </exception>
1200112007
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster">REST API Reference for StartDBCluster Operation</seealso>
1200212008
Task<StartDBClusterResponse> StartDBClusterAsync(StartDBClusterRequest request, CancellationToken cancellationToken = default(CancellationToken));
1200312009

@@ -12466,6 +12472,9 @@ public partial interface IAmazonRDS : IAmazonService, IDisposable
1246612472
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
1246712473
/// The DB instance isn't in a valid state.
1246812474
/// </exception>
12475+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
12476+
/// The DB shard group must be in the available state.
12477+
/// </exception>
1246912478
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster">REST API Reference for StopDBCluster Operation</seealso>
1247012479
StopDBClusterResponse StopDBCluster(StopDBClusterRequest request);
1247112480

@@ -12502,6 +12511,9 @@ public partial interface IAmazonRDS : IAmazonService, IDisposable
1250212511
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
1250312512
/// The DB instance isn't in a valid state.
1250412513
/// </exception>
12514+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
12515+
/// The DB shard group must be in the available state.
12516+
/// </exception>
1250512517
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster">REST API Reference for StopDBCluster Operation</seealso>
1250612518
Task<StopDBClusterResponse> StopDBClusterAsync(StopDBClusterRequest request, CancellationToken cancellationToken = default(CancellationToken));
1250712519

sdk/src/Services/RDS/Generated/_netstandard/AmazonRDSClient.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9284,6 +9284,9 @@ internal virtual StartDBClusterResponse StartDBCluster(StartDBClusterRequest req
92849284
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
92859285
/// The DB instance isn't in a valid state.
92869286
/// </exception>
9287+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
9288+
/// The DB shard group must be in the available state.
9289+
/// </exception>
92879290
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster">REST API Reference for StartDBCluster Operation</seealso>
92889291
public virtual Task<StartDBClusterResponse> StartDBClusterAsync(StartDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
92899292
{
@@ -9631,6 +9634,9 @@ internal virtual StopDBClusterResponse StopDBCluster(StopDBClusterRequest reques
96319634
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
96329635
/// The DB instance isn't in a valid state.
96339636
/// </exception>
9637+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
9638+
/// The DB shard group must be in the available state.
9639+
/// </exception>
96349640
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster">REST API Reference for StopDBCluster Operation</seealso>
96359641
public virtual Task<StopDBClusterResponse> StopDBClusterAsync(StopDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
96369642
{

sdk/src/Services/RDS/Generated/_netstandard/IAmazonRDS.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6683,6 +6683,9 @@ public partial interface IAmazonRDS : IAmazonService, IDisposable
66836683
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
66846684
/// The DB instance isn't in a valid state.
66856685
/// </exception>
6686+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
6687+
/// The DB shard group must be in the available state.
6688+
/// </exception>
66866689
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster">REST API Reference for StartDBCluster Operation</seealso>
66876690
Task<StartDBClusterResponse> StartDBClusterAsync(StartDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
66886691

@@ -6955,6 +6958,9 @@ public partial interface IAmazonRDS : IAmazonService, IDisposable
69556958
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
69566959
/// The DB instance isn't in a valid state.
69576960
/// </exception>
6961+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
6962+
/// The DB shard group must be in the available state.
6963+
/// </exception>
69586964
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster">REST API Reference for StopDBCluster Operation</seealso>
69596965
Task<StopDBClusterResponse> StopDBClusterAsync(StopDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
69606966

0 commit comments

Comments
 (0)