/AWS1/IF_DFM=>CREATEREMOTEACCESSSESSION()¶
About CreateRemoteAccessSession¶
Specifies and starts a remote access session.
Method Signature¶
METHODS /AWS1/IF_DFM~CREATEREMOTEACCESSSESSION
IMPORTING
!IV_PROJECTARN TYPE /AWS1/DFMAMAZONRESOURCENAME OPTIONAL
!IV_DEVICEARN TYPE /AWS1/DFMAMAZONRESOURCENAME OPTIONAL
!IV_APPARN TYPE /AWS1/DFMAMAZONRESOURCENAME OPTIONAL
!IV_INSTANCEARN TYPE /AWS1/DFMAMAZONRESOURCENAME OPTIONAL
!IV_NAME TYPE /AWS1/DFMNAME OPTIONAL
!IO_CONFIGURATION TYPE REF TO /AWS1/CL_DFMCREREMOTEACCSESS01 OPTIONAL
!IV_INTERACTIONMODE TYPE /AWS1/DFMINTERACTIONMODE OPTIONAL
!IV_SKIPAPPRESIGN TYPE /AWS1/DFMBOOLEAN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_dfmcreremoteaccsessrs
RAISING
/AWS1/CX_DFMARGUMENTEXCEPTION
/AWS1/CX_DFMLIMITEXCEEDEDEX
/AWS1/CX_DFMNOTFOUNDEXCEPTION
/AWS1/CX_DFMSERVICEACCOUNTEX
/AWS1/CX_DFMCLIENTEXC
/AWS1/CX_DFMSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_projectarn TYPE /AWS1/DFMAMAZONRESOURCENAME /AWS1/DFMAMAZONRESOURCENAME¶
The Amazon Resource Name (ARN) of the project for which you want to create a remote access session.
iv_devicearn TYPE /AWS1/DFMAMAZONRESOURCENAME /AWS1/DFMAMAZONRESOURCENAME¶
The ARN of the device for which you want to create a remote access session.
Optional arguments:¶
iv_apparn TYPE /AWS1/DFMAMAZONRESOURCENAME /AWS1/DFMAMAZONRESOURCENAME¶
The Amazon Resource Name (ARN) of the app to create the remote access session.
iv_instancearn TYPE /AWS1/DFMAMAZONRESOURCENAME /AWS1/DFMAMAZONRESOURCENAME¶
The Amazon Resource Name (ARN) of the device instance for which you want to create a remote access session.
iv_name TYPE /AWS1/DFMNAME /AWS1/DFMNAME¶
The name of the remote access session to create.
io_configuration TYPE REF TO /AWS1/CL_DFMCREREMOTEACCSESS01 /AWS1/CL_DFMCREREMOTEACCSESS01¶
The configuration information for the remote access session request.
iv_interactionmode TYPE /AWS1/DFMINTERACTIONMODE /AWS1/DFMINTERACTIONMODE¶
The interaction mode of the remote access session. Changing the interactive mode of remote access sessions is no longer available.
iv_skipappresign TYPE /AWS1/DFMBOOLEAN /AWS1/DFMBOOLEAN¶
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?
RETURNING¶
oo_output TYPE REF TO /aws1/cl_dfmcreremoteaccsessrs /AWS1/CL_DFMCREREMOTEACCSESSRS¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createremoteaccesssession(
io_configuration = new /aws1/cl_dfmcreremoteaccsess01(
io_deviceproxy = new /aws1/cl_dfmdeviceproxy(
iv_host = |string|
iv_port = 123
)
it_auxiliaryapps = VALUE /aws1/cl_dfmauxiliaryapparnl00=>tt_auxiliaryapparnlist(
( new /aws1/cl_dfmauxiliaryapparnl00( |string| ) )
)
it_vpceconfigurationarns = VALUE /aws1/cl_dfmamazonresrcnames_w=>tt_amazonresourcenames(
( new /aws1/cl_dfmamazonresrcnames_w( |string| ) )
)
iv_billingmethod = |string|
)
iv_apparn = |string|
iv_devicearn = |string|
iv_instancearn = |string|
iv_interactionmode = |string|
iv_name = |string|
iv_projectarn = |string|
iv_skipappresign = ABAP_TRUE
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_remoteaccesssession = lo_result->get_remoteaccesssession( ).
IF lo_remoteaccesssession IS NOT INITIAL.
lv_amazonresourcename = lo_remoteaccesssession->get_arn( ).
lv_name = lo_remoteaccesssession->get_name( ).
lv_datetime = lo_remoteaccesssession->get_created( ).
lv_executionstatus = lo_remoteaccesssession->get_status( ).
lv_executionresult = lo_remoteaccesssession->get_result( ).
lv_message = lo_remoteaccesssession->get_message( ).
lv_datetime = lo_remoteaccesssession->get_started( ).
lv_datetime = lo_remoteaccesssession->get_stopped( ).
lo_device = lo_remoteaccesssession->get_device( ).
IF lo_device IS NOT INITIAL.
lv_amazonresourcename = lo_device->get_arn( ).
lv_name = lo_device->get_name( ).
lv_string = lo_device->get_manufacturer( ).
lv_string = lo_device->get_model( ).
lv_string = lo_device->get_modelid( ).
lv_deviceformfactor = lo_device->get_formfactor( ).
lv_deviceplatform = lo_device->get_platform( ).
lv_string = lo_device->get_os( ).
lo_cpu = lo_device->get_cpu( ).
IF lo_cpu IS NOT INITIAL.
lv_string = lo_cpu->get_frequency( ).
lv_string = lo_cpu->get_architecture( ).
lv_double = lo_cpu->get_clock( ).
ENDIF.
lo_resolution = lo_device->get_resolution( ).
IF lo_resolution IS NOT INITIAL.
lv_integer = lo_resolution->get_width( ).
lv_integer = lo_resolution->get_height( ).
ENDIF.
lv_long = lo_device->get_heapsize( ).
lv_long = lo_device->get_memory( ).
lv_string = lo_device->get_image( ).
lv_string = lo_device->get_carrier( ).
lv_string = lo_device->get_radio( ).
lv_boolean = lo_device->get_remoteaccessenabled( ).
lv_boolean = lo_device->get_remotedebugenabled( ).
lv_string = lo_device->get_fleettype( ).
lv_string = lo_device->get_fleetname( ).
LOOP AT lo_device->get_instances( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_amazonresourcename = lo_row_1->get_arn( ).
lv_amazonresourcename = lo_row_1->get_devicearn( ).
LOOP AT lo_row_1->get_labels( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_string = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lv_instancestatus = lo_row_1->get_status( ).
lv_string = lo_row_1->get_udid( ).
lo_instanceprofile = lo_row_1->get_instanceprofile( ).
IF lo_instanceprofile IS NOT INITIAL.
lv_amazonresourcename = lo_instanceprofile->get_arn( ).
lv_boolean = lo_instanceprofile->get_packagecleanup( ).
LOOP AT lo_instanceprofile->get_excludeapppackagesfrmc00( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_string = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
lv_boolean = lo_instanceprofile->get_rebootafteruse( ).
lv_name = lo_instanceprofile->get_name( ).
lv_message = lo_instanceprofile->get_description( ).
ENDIF.
ENDIF.
ENDLOOP.
lv_deviceavailability = lo_device->get_availability( ).
ENDIF.
lv_amazonresourcename = lo_remoteaccesssession->get_instancearn( ).
lv_billingmethod = lo_remoteaccesssession->get_billingmethod( ).
lo_deviceminutes = lo_remoteaccesssession->get_deviceminutes( ).
IF lo_deviceminutes IS NOT INITIAL.
lv_double = lo_deviceminutes->get_total( ).
lv_double = lo_deviceminutes->get_metered( ).
lv_double = lo_deviceminutes->get_unmetered( ).
ENDIF.
lv_string = lo_remoteaccesssession->get_endpoint( ).
lv_string = lo_remoteaccesssession->get_deviceudid( ).
lv_interactionmode = lo_remoteaccesssession->get_interactionmode( ).
lv_skipappresign = lo_remoteaccesssession->get_skipappresign( ).
lo_vpcconfig = lo_remoteaccesssession->get_vpcconfig( ).
IF lo_vpcconfig IS NOT INITIAL.
LOOP AT lo_vpcconfig->get_securitygroupids( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_securitygroupid = lo_row_7->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_vpcconfig->get_subnetids( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_subnetid = lo_row_9->get_value( ).
ENDIF.
ENDLOOP.
lv_nonemptystring = lo_vpcconfig->get_vpcid( ).
ENDIF.
lo_deviceproxy = lo_remoteaccesssession->get_deviceproxy( ).
IF lo_deviceproxy IS NOT INITIAL.
lv_deviceproxyhost = lo_deviceproxy->get_host( ).
lv_deviceproxyport = lo_deviceproxy->get_port( ).
ENDIF.
lv_amazonresourcename = lo_remoteaccesssession->get_appupload( ).
lo_remoteaccessendpoints = lo_remoteaccesssession->get_endpoints( ).
IF lo_remoteaccessendpoints IS NOT INITIAL.
lv_sensitiveurl = lo_remoteaccessendpoints->get_remotedriverendpoint( ).
lv_sensitiveurl = lo_remoteaccessendpoints->get_interactiveendpoint( ).
ENDIF.
ENDIF.
ENDIF.
To create a remote access session¶
The following example creates a remote access session named MySession.
DATA(lo_result) = lo_client->createremoteaccesssession(
io_configuration = new /aws1/cl_dfmcreremoteaccsess01( iv_billingmethod = |METERED| )
iv_devicearn = |arn:aws:devicefarm:us-west-2::device:123EXAMPLE|
iv_name = |MySession|
iv_projectarn = |arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456|
).