createRestoreTestingSelection method
This request can be sent after CreateRestoreTestingPlan request returns successfully. This is the second part of creating a resource testing plan, and it must be completed sequentially.
This consists of RestoreTestingSelectionName,
ProtectedResourceType, and one of the following:
-
ProtectedResourceArns -
ProtectedResourceConditions
A restore testing selection can include a wildcard value ("*") for
ProtectedResourceArns along with
ProtectedResourceConditions. Alternatively, you can include
up to 30 specific protected resource ARNs in
ProtectedResourceArns.
Cannot select by both protected resource types AND specific ARNs. Request will fail if both are included.
May throw AlreadyExistsException.
May throw InvalidParameterValueException.
May throw LimitExceededException.
May throw MissingParameterValueException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
Parameter restoreTestingPlanName :
Input the restore testing plan name that was returned from the related
CreateRestoreTestingPlan request.
Parameter restoreTestingSelection :
This consists of RestoreTestingSelectionName,
ProtectedResourceType, and one of the following:
-
ProtectedResourceArns -
ProtectedResourceConditions
A restore testing selection can include a wildcard value ("*") for
ProtectedResourceArns along with
ProtectedResourceConditions. Alternatively, you can include
up to 30 specific protected resource ARNs in
ProtectedResourceArns.
Parameter creatorRequestId :
This is an optional unique string that identifies the request and allows
failed requests to be retried without the risk of running the operation
twice. If used, this parameter must contain 1 to 50 alphanumeric or '-_.'
characters.
Implementation
Future<CreateRestoreTestingSelectionOutput> createRestoreTestingSelection({
required String restoreTestingPlanName,
required RestoreTestingSelectionForCreate restoreTestingSelection,
String? creatorRequestId,
}) async {
final $payload = <String, dynamic>{
'RestoreTestingSelection': restoreTestingSelection,
if (creatorRequestId != null) 'CreatorRequestId': creatorRequestId,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/restore-testing/plans/${Uri.encodeComponent(restoreTestingPlanName)}/selections',
exceptionFnMap: _exceptionFns,
);
return CreateRestoreTestingSelectionOutput.fromJson(response);
}