restoreAnalysis method
Restores an analysis.
May throw ConflictException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw LimitExceededException.
May throw PreconditionNotMetException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnsupportedUserEditionException.
Parameter analysisId :
The ID of the analysis that you're restoring.
Parameter awsAccountId :
The ID of the Amazon Web Services account that contains the analysis.
Parameter restoreToFolders :
A boolean value that determines if the analysis will be restored to
folders that it previously resided in. A True value restores
analysis back to all folders that it previously resided in. A
False value restores the analysis but does not restore the
analysis back to all previously resided folders. Restoring a restricted
analysis requires this parameter to be set to True.
Implementation
Future<RestoreAnalysisResponse> restoreAnalysis({
required String analysisId,
required String awsAccountId,
bool? restoreToFolders,
}) async {
final $query = <String, List<String>>{
if (restoreToFolders != null)
'restore-to-folders': [restoreToFolders.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'POST',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/restore/analyses/${Uri.encodeComponent(analysisId)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return RestoreAnalysisResponse.fromJson(response);
}