CI/CD - CodeBuild + CodeDeploy + CodePipeline
This commit is contained in:
@@ -6,6 +6,9 @@ import {
|
||||
DescribeDBSnapshotsCommand,
|
||||
DescribeOrderableDBInstanceOptionsCommand,
|
||||
ModifyDBInstanceCommand,
|
||||
RebootDBInstanceCommand,
|
||||
StartDBInstanceCommand,
|
||||
StopDBInstanceCommand,
|
||||
type CreateDBInstanceCommandInput,
|
||||
type DBInstance,
|
||||
type DBSnapshot,
|
||||
@@ -194,6 +197,24 @@ export function createRdsService(client: RDSClient = awsClients.rds) {
|
||||
);
|
||||
},
|
||||
|
||||
async startInstance(identifier: string): Promise<void> {
|
||||
await client.send(
|
||||
new StartDBInstanceCommand({ DBInstanceIdentifier: identifier }),
|
||||
);
|
||||
},
|
||||
|
||||
async stopInstance(identifier: string): Promise<void> {
|
||||
await client.send(
|
||||
new StopDBInstanceCommand({ DBInstanceIdentifier: identifier }),
|
||||
);
|
||||
},
|
||||
|
||||
async rebootInstance(identifier: string): Promise<void> {
|
||||
await client.send(
|
||||
new RebootDBInstanceCommand({ DBInstanceIdentifier: identifier }),
|
||||
);
|
||||
},
|
||||
|
||||
async listSnapshots(instanceIdentifier?: string): Promise<RdsSnapshot[]> {
|
||||
const snapshots: RdsSnapshot[] = [];
|
||||
let marker: string | undefined;
|
||||
|
||||
Reference in New Issue
Block a user