-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DBInstance] Support for Oracle Multitenant SID
- Loading branch information
Showing
8 changed files
with
165 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...nstance/src/main/java/software/amazon/rds/dbinstance/validators/OracleCustomSystemId.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package software.amazon.rds.dbinstance.validators; | ||
|
||
import software.amazon.rds.common.request.RequestValidationException; | ||
import software.amazon.rds.dbinstance.ResourceModel; | ||
import software.amazon.rds.dbinstance.util.ResourceModelHelper; | ||
|
||
public class OracleCustomSystemId { | ||
public static void validateRequest(final ResourceModel model) throws RequestValidationException { | ||
if (ResourceModelHelper.isRestoreToPointInTime(model) && model.getDBSystemId() != null) { | ||
throw new RequestValidationException("The DBSystemId parameter cannot be specified when you create a DB instance from a point-in-time restore."); | ||
} | ||
|
||
if (ResourceModelHelper.isDBInstanceReadReplica(model) && model.getDBSystemId() != null) { | ||
throw new RequestValidationException("The DBSystemId parameter cannot be specified when you create a read replica."); | ||
} | ||
|
||
if (ResourceModelHelper.isRestoreFromSnapshot(model) && model.getDBSystemId() != null) { | ||
throw new RequestValidationException("The DBSystemId parameter cannot be specified when you create a DB instance from a snapshot restore."); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters