/AWS1/IF_DFM=>UPDATEDEVICEPOOL()¶
About UpdateDevicePool¶
Modifies the name, description, and rules in a device pool given the attributes and the pool ARN. Rule updates are all-or-nothing, meaning they can only be updated as a whole (or not at all).
Method Signature¶
METHODS /AWS1/IF_DFM~UPDATEDEVICEPOOL
IMPORTING
!IV_ARN TYPE /AWS1/DFMAMAZONRESOURCENAME OPTIONAL
!IV_NAME TYPE /AWS1/DFMNAME OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/DFMMESSAGE OPTIONAL
!IT_RULES TYPE /AWS1/CL_DFMRULE=>TT_RULES OPTIONAL
!IV_MAXDEVICES TYPE /AWS1/DFMINTEGER OPTIONAL
!IV_CLEARMAXDEVICES TYPE /AWS1/DFMBOOLEAN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_dfmupdatedevpoolrslt
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_arn TYPE /AWS1/DFMAMAZONRESOURCENAME /AWS1/DFMAMAZONRESOURCENAME¶
The Amazon Resource Name (ARN) of the Device Farm device pool to update.
Optional arguments:¶
iv_name TYPE /AWS1/DFMNAME /AWS1/DFMNAME¶
A string that represents the name of the device pool to update.
iv_description TYPE /AWS1/DFMMESSAGE /AWS1/DFMMESSAGE¶
A description of the device pool to update.
it_rules TYPE /AWS1/CL_DFMRULE=>TT_RULES TT_RULES¶
Represents the rules to modify for the device pool. Updating rules is optional. If you update rules for your request, the update replaces the existing rules.
iv_maxdevices TYPE /AWS1/DFMINTEGER /AWS1/DFMINTEGER¶
The number of devices that Device Farm can add to your device pool. Device Farm adds devices that are available and that meet the criteria that you assign for the
rulesparameter. Depending on how many devices meet these constraints, your device pool might contain fewer devices than the value for this parameter.By specifying the maximum number of devices, you can control the costs that you incur by running tests.
If you use this parameter in your request, you cannot use the
clearMaxDevicesparameter in the same request.
iv_clearmaxdevices TYPE /AWS1/DFMBOOLEAN /AWS1/DFMBOOLEAN¶
Sets whether the
maxDevicesparameter applies to your device pool. If you set this parameter totrue, themaxDevicesparameter does not apply, and Device Farm does not limit the number of devices that it adds to your device pool. In this case, Device Farm adds all available devices that meet the criteria specified in therulesparameter.If you use this parameter in your request, you cannot use the
maxDevicesparameter in the same request.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_dfmupdatedevpoolrslt /AWS1/CL_DFMUPDATEDEVPOOLRSLT¶
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->updatedevicepool(
it_rules = VALUE /aws1/cl_dfmrule=>tt_rules(
(
new /aws1/cl_dfmrule(
iv_attribute = |string|
iv_operator = |string|
iv_value = |string|
)
)
)
iv_arn = |string|
iv_clearmaxdevices = ABAP_TRUE
iv_description = |string|
iv_maxdevices = 123
iv_name = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_devicepool = lo_result->get_devicepool( ).
IF lo_devicepool IS NOT INITIAL.
lv_amazonresourcename = lo_devicepool->get_arn( ).
lv_name = lo_devicepool->get_name( ).
lv_message = lo_devicepool->get_description( ).
lv_devicepooltype = lo_devicepool->get_type( ).
LOOP AT lo_devicepool->get_rules( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_deviceattribute = lo_row_1->get_attribute( ).
lv_ruleoperator = lo_row_1->get_operator( ).
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_integer = lo_devicepool->get_maxdevices( ).
ENDIF.
ENDIF.
To update a device pool¶
The following example updates the specified device pool with a new name and description. It also enables remote access of devices in the device pool.
DATA(lo_result) = lo_client->updatedevicepool(
it_rules = VALUE /aws1/cl_dfmrule=>tt_rules(
(
new /aws1/cl_dfmrule(
iv_attribute = |REMOTE_ACCESS_ENABLED|
iv_operator = |EQUALS|
iv_value = |True|
)
)
)
iv_arn = |arn:aws:devicefarm:us-west-2::devicepool:082d10e5-d7d7-48a5-ba5c-12345EXAMPLE|
iv_description = |NewDescription|
iv_name = |NewName|
).