projects
Creates, updates, deletes, gets or lists a projects resource.
Overview
| Name | projects |
| Type | Resource |
| Id | aws.devicefarm.projects |
Fields
The following fields are returned by SELECT queries:
- get_project
- list_projects
| Name | Datatype | Description |
|---|---|---|
name | string | The project's name. |
arn | string | The project's ARN. (pattern: <code>^arn:aws:devicefarm:.+</code>) |
created | string (date-time) | When the project was created. |
default_job_timeout_minutes | integer | The default number of minutes (at the project level) a test run executes before it times out. The default value is 150 minutes. |
environment_variables | array | Environment variables associated with the project. |
execution_role_arn | string | The IAM execution role associated with the project. (pattern: <code>^arn:aws:iam::[0-9]{12}:role/.+</code>) |
vpc_config | object | The VPC security groups and subnets that are attached to a project. |
| Name | Datatype | Description |
|---|---|---|
name | string | The project's name. |
arn | string | The project's ARN. (pattern: <code>^arn:aws:devicefarm:.+</code>) |
created | string (date-time) | When the project was created. |
default_job_timeout_minutes | integer | The default number of minutes (at the project level) a test run executes before it times out. The default value is 150 minutes. |
environment_variables | array | Environment variables associated with the project. |
execution_role_arn | string | The IAM execution role associated with the project. (pattern: <code>^arn:aws:iam::[0-9]{12}:role/.+</code>) |
vpc_config | object | The VPC security groups and subnets that are attached to a project. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_project | select | region | Gets information about a project. | |
list_projects | select | region | Gets information about projects. | |
create_project | insert | region, name | Creates a project. | |
update_project | update | region, arn | Modifies the specified project name, given the project ARN and a new name. | |
delete_project | delete | region | Deletes an AWS Device Farm project, given the project ARN. You cannot delete a project if it has an active run or session. You cannot undo this operation. | |
schedule_run | exec | region, projectArn, test | Schedules a run. |
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_project
- list_projects
Gets information about a project.
SELECT
name,
arn,
created,
default_job_timeout_minutes,
environment_variables,
execution_role_arn,
vpc_config
FROM aws.devicefarm.projects
WHERE region = '{{ region }}' -- required
;
Gets information about projects.
SELECT
name,
arn,
created,
default_job_timeout_minutes,
environment_variables,
execution_role_arn,
vpc_config
FROM aws.devicefarm.projects
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_project
- Manifest
Creates a project.
INSERT INTO aws.devicefarm.projects (
name,
defaultJobTimeoutMinutes,
vpcConfig,
environmentVariables,
executionRoleArn,
region
)
SELECT
'{{ name }}' /* required */,
{{ defaultJobTimeoutMinutes }},
'{{ vpcConfig }}',
'{{ environmentVariables }}',
'{{ executionRoleArn }}',
'{{ region }}'
RETURNING
project
;
# Description fields are for documentation purposes
- name: projects
props:
- name: region
value: "{{ region }}"
description: Required parameter for the projects resource.
- name: name
value: "{{ name }}"
description: |
The project's name.
- name: defaultJobTimeoutMinutes
value: {{ defaultJobTimeoutMinutes }}
description: |
Sets the execution timeout value (in minutes) for a project. All test runs in this project use the specified execution timeout value unless overridden when scheduling a run.
- name: vpcConfig
description: |
The VPC security groups and subnets that are attached to a project.
value:
securityGroupIds:
- "{{ securityGroupIds }}"
subnetIds:
- "{{ subnetIds }}"
vpcId: "{{ vpcId }}"
- name: environmentVariables
description: |
A set of environment variables which are used by default for all runs in the project. These environment variables are applied to the test run during the execution of a test spec file. For more information about using test spec files, please see Custom test environments in AWS Device Farm.
value:
- name: "{{ name }}"
value: "{{ value }}"
- name: executionRoleArn
value: "{{ executionRoleArn }}"
description: |
An IAM role to be assumed by the test host for all runs in the project.
UPDATE examples
- update_project
Modifies the specified project name, given the project ARN and a new name.
UPDATE aws.devicefarm.projects
SET
arn = '{{ arn }}',
name = '{{ name }}',
defaultJobTimeoutMinutes = {{ defaultJobTimeoutMinutes }},
vpcConfig = '{{ vpcConfig }}',
environmentVariables = '{{ environmentVariables }}',
executionRoleArn = '{{ executionRoleArn }}'
WHERE
region = '{{ region }}' --required
AND arn = '{{ arn }}' --required
RETURNING
project;
DELETE examples
- delete_project
Deletes an AWS Device Farm project, given the project ARN. You cannot delete a project if it has an active run or session. You cannot undo this operation.
DELETE FROM aws.devicefarm.projects
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- schedule_run
Schedules a run.
EXEC aws.devicefarm.projects.schedule_run
@region='{{ region }}' --required
@@json=
'{
"projectArn": "{{ projectArn }}",
"appArn": "{{ appArn }}",
"devicePoolArn": "{{ devicePoolArn }}",
"deviceSelectionConfiguration": "{{ deviceSelectionConfiguration }}",
"name": "{{ name }}",
"test": "{{ test }}",
"configuration": "{{ configuration }}",
"executionConfiguration": "{{ executionConfiguration }}"
}'
;