Skip to content

/AWS1/IF_DFM=>LISTDEVICES()

About ListDevices

Gets information about unique device types.

Method Signature

IMPORTING

Optional arguments:

iv_arn TYPE /AWS1/DFMAMAZONRESOURCENAME /AWS1/DFMAMAZONRESOURCENAME

The Amazon Resource Name (ARN) of the project.

iv_nexttoken TYPE /AWS1/DFMPAGINATIONTOKEN /AWS1/DFMPAGINATIONTOKEN

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

it_filters TYPE /AWS1/CL_DFMDEVICEFILTER=>TT_DEVICEFILTERS TT_DEVICEFILTERS

Used to select a set of devices. A filter is made up of an attribute, an operator, and one or more values.

  • Attribute: The aspect of a device such as platform or model used as the selection criteria in a device filter.

    Allowed values include:

    • ARN: The Amazon Resource Name (ARN) of the device (for example, arn:aws:devicefarm:us-west-2::device:12345Example).

    • PLATFORM: The device platform. Valid values are ANDROID or IOS.

    • OS_VERSION: The operating system version (for example, 10.3.2).

    • MODEL: The device model (for example, iPad 5th Gen).

    • AVAILABILITY: The current availability of the device. Valid values are AVAILABLE, HIGHLY_AVAILABLE, BUSY, or TEMPORARY_NOT_AVAILABLE.

    • FORM_FACTOR: The device form factor. Valid values are PHONE or TABLET.

    • MANUFACTURER: The device manufacturer (for example, Apple).

    • REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. Valid values are TRUE or FALSE.

    • REMOTE_DEBUG_ENABLED: Whether the device is enabled for remote debugging. Valid values are TRUE or FALSE. Because remote debugging is no longer supported, this attribute is ignored.

    • INSTANCE_ARN: The Amazon Resource Name (ARN) of the device instance.

    • INSTANCE_LABELS: The label of the device instance.

    • FLEET_TYPE: The fleet type. Valid values are PUBLIC or PRIVATE.

  • Operator: The filter operator.

    • The EQUALS operator is available for every attribute except INSTANCE_LABELS.

    • The CONTAINS operator is available for the INSTANCE_LABELS and MODEL attributes.

    • The IN and NOT_IN operators are available for the ARN, OS_VERSION, MODEL, MANUFACTURER, and INSTANCE_ARN attributes.

    • The LESS_THAN, GREATER_THAN, LESS_THAN_OR_EQUALS, and GREATER_THAN_OR_EQUALS operators are also available for the OS_VERSION attribute.

  • Values: An array of one or more filter values.

    • The IN and NOT_IN operators take a values array that has one or more elements.

    • The other operators require an array with a single element.

    • In a request, the AVAILABILITY attribute takes the following values: AVAILABLE, HIGHLY_AVAILABLE, BUSY, or TEMPORARY_NOT_AVAILABLE.

RETURNING

oo_output TYPE REF TO /aws1/cl_dfmlistdevicesresult /AWS1/CL_DFMLISTDEVICESRESULT

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->/aws1/if_dfm~listdevices(
  it_filters = VALUE /aws1/cl_dfmdevicefilter=>tt_devicefilters(
    (
      new /aws1/cl_dfmdevicefilter(
        it_values = VALUE /aws1/cl_dfmdevfiltervalues_w=>tt_devicefiltervalues(
          ( new /aws1/cl_dfmdevfiltervalues_w( |string| ) )
        )
        iv_attribute = |string|
        iv_operator = |string|
      )
    )
  )
  iv_arn = |string|
  iv_nexttoken = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  LOOP AT lo_result->get_devices( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_amazonresourcename = lo_row_1->get_arn( ).
      lv_name = lo_row_1->get_name( ).
      lv_string = lo_row_1->get_manufacturer( ).
      lv_string = lo_row_1->get_model( ).
      lv_string = lo_row_1->get_modelid( ).
      lv_deviceformfactor = lo_row_1->get_formfactor( ).
      lv_deviceplatform = lo_row_1->get_platform( ).
      lv_string = lo_row_1->get_os( ).
      lo_cpu = lo_row_1->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_row_1->get_resolution( ).
      IF lo_resolution IS NOT INITIAL.
        lv_integer = lo_resolution->get_width( ).
        lv_integer = lo_resolution->get_height( ).
      ENDIF.
      lv_long = lo_row_1->get_heapsize( ).
      lv_long = lo_row_1->get_memory( ).
      lv_string = lo_row_1->get_image( ).
      lv_string = lo_row_1->get_carrier( ).
      lv_string = lo_row_1->get_radio( ).
      lv_boolean = lo_row_1->get_remoteaccessenabled( ).
      lv_boolean = lo_row_1->get_remotedebugenabled( ).
      lv_string = lo_row_1->get_fleettype( ).
      lv_string = lo_row_1->get_fleetname( ).
      LOOP AT lo_row_1->get_instances( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_amazonresourcename = lo_row_3->get_arn( ).
          lv_amazonresourcename = lo_row_3->get_devicearn( ).
          LOOP AT lo_row_3->get_labels( ) 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_instancestatus = lo_row_3->get_status( ).
          lv_string = lo_row_3->get_udid( ).
          lo_instanceprofile = lo_row_3->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_6.
              lo_row_7 = lo_row_6.
              IF lo_row_7 IS NOT INITIAL.
                lv_string = lo_row_7->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_row_1->get_availability( ).
    ENDIF.
  ENDLOOP.
  lv_paginationtoken = lo_result->get_nexttoken( ).
ENDIF.

To get information about devices

The following example returns information about the available devices in a specific project.

DATA(lo_result) = lo_client->/aws1/if_dfm~listdevices( iv_arn = |arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456| ) .