Skip to content

Commit 5a8151f

Browse files
StartDBCluster and StopDBCluster can now throw InvalidDBShardGroupStateFault.
1 parent 3bc680e commit 5a8151f

File tree

10 files changed

+64
-4
lines changed

10 files changed

+64
-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/_bcl35/AmazonRDSClient.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12359,6 +12359,9 @@ public virtual StartActivityStreamResponse EndStartActivityStream(IAsyncResult a
1235912359
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
1236012360
/// The DB instance isn't in a valid state.
1236112361
/// </exception>
12362+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
12363+
/// The DB shard group must be in the available state.
12364+
/// </exception>
1236212365
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster">REST API Reference for StartDBCluster Operation</seealso>
1236312366
public virtual StartDBClusterResponse StartDBCluster(StartDBClusterRequest request)
1236412367
{
@@ -12811,6 +12814,9 @@ public virtual StopActivityStreamResponse EndStopActivityStream(IAsyncResult asy
1281112814
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
1281212815
/// The DB instance isn't in a valid state.
1281312816
/// </exception>
12817+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
12818+
/// The DB shard group must be in the available state.
12819+
/// </exception>
1281412820
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster">REST API Reference for StopDBCluster Operation</seealso>
1281512821
public virtual StopDBClusterResponse StopDBCluster(StopDBClusterRequest request)
1281612822
{

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9973,6 +9973,9 @@ public partial interface IAmazonRDS : IAmazonService, IDisposable
99739973
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
99749974
/// The DB instance isn't in a valid state.
99759975
/// </exception>
9976+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
9977+
/// The DB shard group must be in the available state.
9978+
/// </exception>
99769979
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster">REST API Reference for StartDBCluster Operation</seealso>
99779980
StartDBClusterResponse StartDBCluster(StartDBClusterRequest request);
99789981

@@ -10355,6 +10358,9 @@ public partial interface IAmazonRDS : IAmazonService, IDisposable
1035510358
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
1035610359
/// The DB instance isn't in a valid state.
1035710360
/// </exception>
10361+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
10362+
/// The DB shard group must be in the available state.
10363+
/// </exception>
1035810364
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster">REST API Reference for StopDBCluster Operation</seealso>
1035910365
StopDBClusterResponse StopDBCluster(StopDBClusterRequest request);
1036010366

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14226,6 +14226,9 @@ public virtual StartActivityStreamResponse StartActivityStream(StartActivityStre
1422614226
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
1422714227
/// The DB instance isn't in a valid state.
1422814228
/// </exception>
14229+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
14230+
/// The DB shard group must be in the available state.
14231+
/// </exception>
1422914232
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster">REST API Reference for StartDBCluster Operation</seealso>
1423014233
public virtual StartDBClusterResponse StartDBCluster(StartDBClusterRequest request)
1423114234
{
@@ -14267,6 +14270,9 @@ public virtual StartDBClusterResponse StartDBCluster(StartDBClusterRequest reque
1426714270
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
1426814271
/// The DB instance isn't in a valid state.
1426914272
/// </exception>
14273+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
14274+
/// The DB shard group must be in the available state.
14275+
/// </exception>
1427014276
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster">REST API Reference for StartDBCluster Operation</seealso>
1427114277
public virtual Task<StartDBClusterResponse> StartDBClusterAsync(StartDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
1427214278
{
@@ -14794,6 +14800,9 @@ public virtual StopActivityStreamResponse StopActivityStream(StopActivityStreamR
1479414800
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
1479514801
/// The DB instance isn't in a valid state.
1479614802
/// </exception>
14803+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
14804+
/// The DB shard group must be in the available state.
14805+
/// </exception>
1479714806
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster">REST API Reference for StopDBCluster Operation</seealso>
1479814807
public virtual StopDBClusterResponse StopDBCluster(StopDBClusterRequest request)
1479914808
{
@@ -14836,6 +14845,9 @@ public virtual StopDBClusterResponse StopDBCluster(StopDBClusterRequest request)
1483614845
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
1483714846
/// The DB instance isn't in a valid state.
1483814847
/// </exception>
14848+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
14849+
/// The DB shard group must be in the available state.
14850+
/// </exception>
1483914851
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster">REST API Reference for StopDBCluster Operation</seealso>
1484014852
public virtual Task<StopDBClusterResponse> StopDBClusterAsync(StopDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
1484114853
{

sdk/src/Services/RDS/Generated/_bcl45/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
@@ -9441,6 +9441,9 @@ internal virtual StartDBClusterResponse StartDBCluster(StartDBClusterRequest req
94419441
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
94429442
/// The DB instance isn't in a valid state.
94439443
/// </exception>
9444+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
9445+
/// The DB shard group must be in the available state.
9446+
/// </exception>
94449447
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster">REST API Reference for StartDBCluster Operation</seealso>
94459448
public virtual Task<StartDBClusterResponse> StartDBClusterAsync(StartDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
94469449
{
@@ -9793,6 +9796,9 @@ internal virtual StopDBClusterResponse StopDBCluster(StopDBClusterRequest reques
97939796
/// <exception cref="Amazon.RDS.Model.InvalidDBInstanceStateException">
97949797
/// The DB instance isn't in a valid state.
97959798
/// </exception>
9799+
/// <exception cref="Amazon.RDS.Model.InvalidDBShardGroupStateException">
9800+
/// The DB shard group must be in the available state.
9801+
/// </exception>
97969802
/// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster">REST API Reference for StopDBCluster Operation</seealso>
97979803
public virtual Task<StopDBClusterResponse> StopDBClusterAsync(StopDBClusterRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
97989804
{

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)