コード例 #1
0
def createDatabaseSnapshot(ctx, stack, region, githash=None, environment=None):
    session, config = configtasks.getConfig(region, stack, githash,
                                            environment)
    cftasks = cloudformationtasks.cloudformationtasks()
    rds = database.rds(session)
    cfstackname = cftasks.generateStackName(config["stackname"], githash,
                                            environment)
    resources = cftasks.getStackResources(stackname=cfstackname)
    rds.SnapshotfromResources(stackresources=resources)
コード例 #2
0
def addTagToDatabase(ctx, region, arn, key, value):
    session = getBaseSession(region)
    rds = database.rds(session)
    rds.addTag(arn, key, value)
コード例 #3
0
def listTagsForDatabase(ctx, region, arn):
    session = getBaseSession(region)
    rds = database.rds(session)
    pprint.pprint(rds.listTags(arn))
コード例 #4
0
def listDatabases(ctx, region):
    session = getBaseSession(region)
    rds = database.rds(session)
    pprint.pprint(rds.listDatabases())
コード例 #5
0
def restoreDatabaseClusterFromSnapshot(ctx, region, cluster, snapshot, engine):
    session = getBaseSession(region)
    rds = database.rds(session)
    rds.restoreClusterFromSnapshot(cluster=cluster,
                                   snapshot=snapshot,
                                   engine=engine)