createRestoreTestingPlan method

Future<CreateRestoreTestingPlanOutput> createRestoreTestingPlan({
  1. required RestoreTestingPlanForCreate restoreTestingPlan,
  2. String? creatorRequestId,
  3. Map<String, String>? tags,
})

Creates a restore testing plan.

The first of two steps to create a restore testing plan. After this request is successful, finish the procedure using CreateRestoreTestingSelection.

May throw AlreadyExistsException. May throw ConflictException. May throw InvalidParameterValueException. May throw LimitExceededException. May throw MissingParameterValueException. May throw ServiceUnavailableException.

Parameter restoreTestingPlan : A restore testing plan must contain a unique RestoreTestingPlanName string you create and must contain a ScheduleExpression cron. You may optionally include a StartWindowHours integer and a CreatorRequestId string.

The RestoreTestingPlanName is a unique string that is the name of the restore testing plan. This cannot be changed after creation, and it must consist of only alphanumeric characters and underscores.

Parameter creatorRequestId : This is a unique string that identifies the request and allows failed requests to be retriedwithout the risk of running the operation twice. This parameter is optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.

Parameter tags : The tags to assign to the restore testing plan.

Implementation

Future<CreateRestoreTestingPlanOutput> createRestoreTestingPlan({
  required RestoreTestingPlanForCreate restoreTestingPlan,
  String? creatorRequestId,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'RestoreTestingPlan': restoreTestingPlan,
    if (creatorRequestId != null) 'CreatorRequestId': creatorRequestId,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/restore-testing/plans',
    exceptionFnMap: _exceptionFns,
  );
  return CreateRestoreTestingPlanOutput.fromJson(response);
}