restoreAnalysis method

Future<RestoreAnalysisResponse> restoreAnalysis({
  1. required String analysisId,
  2. required String awsAccountId,
})

Restores an analysis.

May throw ThrottlingException. May throw InvalidParameterValueException. May throw ConflictException. May throw ResourceNotFoundException. May throw UnsupportedUserEditionException. May throw InternalFailureException.

Parameter analysisId : The ID of the analysis that you're restoring.

Parameter awsAccountId : The ID of the AWS account that contains the analysis.

Implementation

Future<RestoreAnalysisResponse> restoreAnalysis({
  required String analysisId,
  required String awsAccountId,
}) async {
  ArgumentError.checkNotNull(analysisId, 'analysisId');
  _s.validateStringLength(
    'analysisId',
    analysisId,
    1,
    2048,
    isRequired: true,
  );
  ArgumentError.checkNotNull(awsAccountId, 'awsAccountId');
  _s.validateStringLength(
    'awsAccountId',
    awsAccountId,
    12,
    12,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'POST',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/restore/analyses/${Uri.encodeComponent(analysisId)}',
    exceptionFnMap: _exceptionFns,
  );
  return RestoreAnalysisResponse.fromJson(response);
}