updateAutonomousDatabaseBackup method

Future<UpdateAutonomousDatabaseBackupOutput> updateAutonomousDatabaseBackup({
  1. required String autonomousDatabaseBackupId,
  2. int? retentionPeriodInDays,
})

Updates the properties of an Autonomous Database backup.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter autonomousDatabaseBackupId : The unique identifier of the Autonomous Database backup to update.

Parameter retentionPeriodInDays : The retention period, in days, for the Autonomous Database backup.

Implementation

Future<UpdateAutonomousDatabaseBackupOutput> updateAutonomousDatabaseBackup({
  required String autonomousDatabaseBackupId,
  int? retentionPeriodInDays,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'Odb.UpdateAutonomousDatabaseBackup'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'autonomousDatabaseBackupId': autonomousDatabaseBackupId,
      if (retentionPeriodInDays != null)
        'retentionPeriodInDays': retentionPeriodInDays,
    },
  );

  return UpdateAutonomousDatabaseBackupOutput.fromJson(jsonResponse.body);
}