disableSchedule static method

Future<void> disableSchedule(
  1. Client cloudApiClient, {
  2. required CommandLogger logger,
  3. 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,
  );
}