disableSchedule static method
Future<void>
disableSchedule(
- Client cloudApiClient, {
- required CommandLogger logger,
- required String projectId,
Disables the automated backup schedule for the project's database.
Implementation
static Future<void> disableSchedule(
final Client cloudApiClient, {
required final CommandLogger logger,
required final String projectId,
}) async {
try {
await cloudApiClient.database.setBackupSchedule(
cloudCapsuleId: projectId,
frequency: null,
);
} on Exception catch (e, s) {
throw FailureException.nested(e, s, 'Failed to disable backup schedule');
}
logger.success(
'Backup schedule disabled for project "$projectId".',
newParagraph: true,
);
}