stopRun method

Future<StopRunResult> stopRun({
  1. required String arn,
})

Initiates a stop request for the current test run. AWS Device Farm immediately stops the run on devices where tests have not started. You are not billed for these devices. On devices where tests have started executing, setup suite and teardown suite tests run to completion on those devices. You are billed for setup, teardown, and any tests that were in progress or already completed.

May throw ArgumentException. May throw NotFoundException. May throw LimitExceededException. May throw ServiceAccountException.

Parameter arn : Represents the Amazon Resource Name (ARN) of the Device Farm run to stop.

Implementation

Future<StopRunResult> stopRun({
  required String arn,
}) async {
  ArgumentError.checkNotNull(arn, 'arn');
  _s.validateStringLength(
    'arn',
    arn,
    32,
    1011,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'DeviceFarm_20150623.StopRun'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'arn': arn,
    },
  );

  return StopRunResult.fromJson(jsonResponse.body);
}