updateBackupPlan method

Future<UpdateBackupPlanOutput> updateBackupPlan({
  1. required BackupPlanInput backupPlan,
  2. required String backupPlanId,
})

Updates an existing backup plan identified by its backupPlanId with the input document in JSON format. The new version is uniquely identified by a VersionId.

May throw ResourceNotFoundException. May throw InvalidParameterValueException. May throw MissingParameterValueException. May throw ServiceUnavailableException.

Parameter backupPlan : Specifies the body of a backup plan. Includes a BackupPlanName and one or more sets of Rules.

Parameter backupPlanId : Uniquely identifies a backup plan.

Implementation

Future<UpdateBackupPlanOutput> updateBackupPlan({
  required BackupPlanInput backupPlan,
  required String backupPlanId,
}) async {
  ArgumentError.checkNotNull(backupPlan, 'backupPlan');
  ArgumentError.checkNotNull(backupPlanId, 'backupPlanId');
  final $payload = <String, dynamic>{
    'BackupPlan': backupPlan,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/backup/plans/${Uri.encodeComponent(backupPlanId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateBackupPlanOutput.fromJson(response);
}