Exemplo n.º 1
0
    private async Task DeleteInstance(DBInstance instance)
    {
        _logger.Info("Deleting old instance.");

        string finalSnapshotID = $"beta-final-snap-{SystemClock.Instance.GetToday().ToISOString()}-{Guid.NewGuid().ToString()[0]}";
        var    deleteRequest   = new DeleteDBInstanceRequest()
        {
            DBInstanceIdentifier      = instance.DBInstanceIdentifier,
            FinalDBSnapshotIdentifier = finalSnapshotID
        };
        await _rdsClient.DeleteDBInstanceAsync(deleteRequest);
    }