startMisconfiguredStateRecovery method

Future<StartMisconfiguredStateRecoveryResponse> startMisconfiguredStateRecovery({
  1. required String fileSystemId,
  2. String? clientRequestToken,
})

After performing steps to repair the Active Directory configuration of an FSx for Windows File Server file system, use this action to initiate the process of Amazon FSx attempting to reconnect to the file system.

May throw BadRequest. May throw FileSystemNotFound. May throw InternalServerError.

Implementation

Future<StartMisconfiguredStateRecoveryResponse>
    startMisconfiguredStateRecovery({
  required String fileSystemId,
  String? clientRequestToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'AWSSimbaAPIService_v20180301.StartMisconfiguredStateRecovery'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'FileSystemId': fileSystemId,
      'ClientRequestToken':
          clientRequestToken ?? _s.generateIdempotencyToken(),
    },
  );

  return StartMisconfiguredStateRecoveryResponse.fromJson(jsonResponse.body);
}