installToRemoteAccessSession method

Future<InstallToRemoteAccessSessionResult> installToRemoteAccessSession({
  1. required String appArn,
  2. required String remoteAccessSessionArn,
})

Installs an application to the device in a remote access session. For Android applications, the file must be in .apk format. For iOS applications, the file must be in .ipa format.

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

Parameter appArn : The ARN of the app about which you are requesting information.

Parameter remoteAccessSessionArn : The Amazon Resource Name (ARN) of the remote access session about which you are requesting information.

Implementation

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

  return InstallToRemoteAccessSessionResult.fromJson(jsonResponse.body);
}