device_pools
Creates, updates, deletes, gets or lists a device_pools resource.
Overview
| Name | device_pools |
| Type | Resource |
| Id | aws.devicefarm.device_pools |
Fields
The following fields are returned by SELECT queries:
- get_device_pool
| Name | Datatype | Description |
|---|---|---|
name | string | The device pool's name. |
arn | string | The device pool's ARN. (pattern: <code>^arn:aws:devicefarm:.+</code>) |
description | string | The device pool's description. |
max_devices | integer | The 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. |
rules | array | Information about the device pool's rules. |
type_ | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_device_pool | select | region | Gets information about a device pool. | |
create_device_pool | insert | region, projectArn, name, rules | Creates a device pool. | |
update_device_pool | update | region, arn | 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). | |
delete_device_pool | delete | region | Deletes a device pool given the pool ARN. Does not allow deletion of curated pools owned by the system. | |
list_device_pools | exec | region, arn | Gets 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_device_pool
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
- create_device_pool
- Manifest
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
;
# Description fields are for documentation purposes
- name: device_pools
props:
- name: region
value: "{{ region }}"
description: Required parameter for the device_pools resource.
- name: projectArn
value: "{{ projectArn }}"
description: |
The ARN of the project for the device pool.
- name: name
value: "{{ name }}"
description: |
The device pool's name.
- name: description
value: "{{ description }}"
description: |
The device pool's description.
- name: rules
description: |
The device pool's rules.
value:
- attribute: "{{ attribute }}"
operator: "{{ operator }}"
value: "{{ value }}"
- name: maxDevices
value: {{ maxDevices }}
description: |
The 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.
UPDATE examples
- update_device_pool
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
- delete_device_pool
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
- list_device_pools
Gets information about device pools.
EXEC aws.devicefarm.device_pools.list_device_pools
@region='{{ region }}' --required
@@json=
'{
"arn": "{{ arn }}",
"type": "{{ type }}",
"nextToken": "{{ nextToken }}"
}'
;