Skip to main content

device_pools

Creates, updates, deletes, gets or lists a device_pools resource.

Overview

Namedevice_pools
TypeResource
Idaws.devicefarm.device_pools

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe device pool's name.
arnstringThe device pool's ARN. (pattern: <code>^arn:aws:devicefarm:.+</code>)
descriptionstringThe device pool's description.
max_devicesintegerThe number of devices that Device Farm can add to your device pool. Device Farm adds devices that are available and meet the criteria that you assign for the rules parameter. 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.
rulesarrayInformation about the device pool's rules.
type_stringThe device pool's type. Allowed values include: CURATED: A device pool that is created and managed by AWS Device Farm. PRIVATE: A device pool that is created and managed by the device pool developer. (CURATED, PRIVATE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_device_poolselectregionGets information about a device pool.
create_device_poolinsertregion, projectArn, name, rulesCreates a device pool.
update_device_poolupdateregion, arnModifies 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).
delete_device_pooldeleteregionDeletes a device pool given the pool ARN. Does not allow deletion of curated pools owned by the system.
list_device_poolsexecregion, arnGets information about device pools.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Gets information about a device pool.

SELECT
name,
arn,
description,
max_devices,
rules,
type_
FROM aws.devicefarm.device_pools
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a device pool.

INSERT INTO aws.devicefarm.device_pools (
projectArn,
name,
description,
rules,
maxDevices,
region
)
SELECT
'{{ projectArn }}' /* required */,
'{{ name }}' /* required */,
'{{ description }}',
'{{ rules }}' /* required */,
{{ maxDevices }},
'{{ region }}'
RETURNING
device_pool
;

UPDATE examples

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).

UPDATE aws.devicefarm.device_pools
SET
arn = '{{ arn }}',
name = '{{ name }}',
description = '{{ description }}',
rules = '{{ rules }}',
maxDevices = {{ maxDevices }},
clearMaxDevices = {{ clearMaxDevices }}
WHERE
region = '{{ region }}' --required
AND arn = '{{ arn }}' --required
RETURNING
device_pool;

DELETE examples

Deletes a device pool given the pool ARN. Does not allow deletion of curated pools owned by the system.

DELETE FROM aws.devicefarm.device_pools
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Gets information about device pools.

EXEC aws.devicefarm.device_pools.list_device_pools
@region='{{ region }}' --required
@@json=
'{
"arn": "{{ arn }}",
"type": "{{ type }}",
"nextToken": "{{ nextToken }}"
}'
;