getDevicePoolCompatibility method

Future<GetDevicePoolCompatibilityResult> getDevicePoolCompatibility({
  1. required String devicePoolArn,
  2. String? appArn,
  3. ScheduleRunConfiguration? configuration,
  4. String? projectArn,
  5. ScheduleRunTest? test,
  6. TestType? testType,
})

Gets information about compatibility with a device pool.

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

Parameter devicePoolArn : The device pool's ARN.

Parameter appArn : The ARN of the app that is associated with the specified device pool.

Parameter configuration : An object that contains information about the settings for a run.

Parameter projectArn : The ARN of the project for which you want to check device pool compatibility.

Parameter test : Information about the uploaded test to be run against the device pool.

Parameter testType : The test type for the specified device pool.

Allowed values include the following:

  • BUILTIN_FUZZ.
  • APPIUM_JAVA_JUNIT.
  • APPIUM_JAVA_TESTNG.
  • APPIUM_PYTHON.
  • APPIUM_NODE.
  • APPIUM_RUBY.
  • APPIUM_WEB_JAVA_JUNIT.
  • APPIUM_WEB_JAVA_TESTNG.
  • APPIUM_WEB_PYTHON.
  • APPIUM_WEB_NODE.
  • APPIUM_WEB_RUBY.
  • INSTRUMENTATION.
  • XCTEST.
  • XCTEST_UI.

Implementation

Future<GetDevicePoolCompatibilityResult> getDevicePoolCompatibility({
  required String devicePoolArn,
  String? appArn,
  ScheduleRunConfiguration? configuration,
  String? projectArn,
  ScheduleRunTest? test,
  TestType? testType,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'DeviceFarm_20150623.GetDevicePoolCompatibility'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'devicePoolArn': devicePoolArn,
      if (appArn != null) 'appArn': appArn,
      if (configuration != null) 'configuration': configuration,
      if (projectArn != null) 'projectArn': projectArn,
      if (test != null) 'test': test,
      if (testType != null) 'testType': testType.value,
    },
  );

  return GetDevicePoolCompatibilityResult.fromJson(jsonResponse.body);
}