createRemoteAccessSession method
Specifies and starts a remote access session.
May throw ArgumentException.
May throw LimitExceededException.
May throw NotFoundException.
May throw ServiceAccountException.
Parameter deviceArn :
The ARN of the device for which you want to create a remote access
session.
Parameter projectArn :
The Amazon Resource Name (ARN) of the project for which you want to create
a remote access session.
Parameter appArn :
The Amazon Resource Name (ARN) of the app to create the remote access
session.
Parameter configuration :
The configuration information for the remote access session request.
Parameter instanceArn :
The Amazon Resource Name (ARN) of the device instance for which you want
to create a remote access session.
Parameter interactionMode :
The interaction mode of the remote access session. Changing the
interactive mode of remote access sessions is no longer available.
Parameter name :
The name of the remote access session to create.
Parameter skipAppResign :
When set to true, for private devices, Device Farm does not
sign your app again. For public devices, Device Farm always signs your
apps again.
For more information on how Device Farm modifies your uploads during tests, see Do you modify my app?
Implementation
Future<CreateRemoteAccessSessionResult> createRemoteAccessSession({
required String deviceArn,
required String projectArn,
String? appArn,
CreateRemoteAccessSessionConfiguration? configuration,
String? instanceArn,
InteractionMode? interactionMode,
String? name,
bool? skipAppResign,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'DeviceFarm_20150623.CreateRemoteAccessSession'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'deviceArn': deviceArn,
'projectArn': projectArn,
if (appArn != null) 'appArn': appArn,
if (configuration != null) 'configuration': configuration,
if (instanceArn != null) 'instanceArn': instanceArn,
if (interactionMode != null) 'interactionMode': interactionMode.value,
if (name != null) 'name': name,
if (skipAppResign != null) 'skipAppResign': skipAppResign,
},
);
return CreateRemoteAccessSessionResult.fromJson(jsonResponse.body);
}