dev_environments
Creates, updates, deletes, gets or lists a dev_environments resource.
Overview
| Name | dev_environments |
| Type | Resource |
| Id | aws.codecatalyst.dev_environments |
Fields
The following fields are returned by SELECT queries:
- get_dev_environment
- list_dev_environments
| Name | Datatype | Description |
|---|---|---|
id | string | The system-generated unique ID of the Dev Environment. (pattern: <code>[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}</code>) |
alias | string | The user-specified alias for the Dev Environment. |
creator_id | string | The system-generated unique ID of the user who created the Dev Environment. |
ides | array | Information about the integrated development environment (IDE) configured for the Dev Environment. |
inactivity_timeout_minutes | integer | The amount of time the Dev Environment will run without any activity detected before stopping, in minutes. |
instance_type | string | The Amazon EC2 instace type to use for the Dev Environment. (dev.standard1.small, dev.standard1.medium, dev.standard1.large, dev.standard1.xlarge) |
last_updated_time | string (date-time) | The time when the Dev Environment was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339. |
persistent_storage | object | Information about the amount of storage allocated to the Dev Environment. By default, a Dev Environment is configured to have 16GB of persistent storage. |
project_name | string | The name of the project in the space. (pattern: <code>[a-zA-Z0-9]+(?:[-_.][a-zA-Z0-9]+)*</code>) |
repositories | array | The source repository that contains the branch cloned into the Dev Environment. |
space_name | string | The name of the space. (pattern: <code>[a-zA-Z0-9]+(?:[-_.][a-zA-Z0-9]+)*</code>) |
status | string | The current status of the Dev Environment. (PENDING, RUNNING, STARTING, STOPPING, STOPPED, FAILED, DELETING, DELETED) |
status_reason | string | The reason for the status. |
vpc_connection_name | string | The name of the connection used to connect to Amazon VPC used when the Dev Environment was created, if any. (pattern: <code>[a-zA-Z0-9]+(?:[-_.][a-zA-Z0-9]+)*</code>) |
| Name | Datatype | Description |
|---|---|---|
id | string | The system-generated unique ID for the Dev Environment. (pattern: <code>[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}</code>) |
alias | string | The user-specified alias for the Dev Environment. |
creator_id | string | The system-generated unique ID of the user who created the Dev Environment. |
ides | array | Information about the integrated development environment (IDE) configured for a Dev Environment. |
inactivity_timeout_minutes | integer | The amount of time the Dev Environment will run without any activity detected before stopping, in minutes. Dev Environments consume compute minutes when running. |
instance_type | string | The Amazon EC2 instace type used for the Dev Environment. (dev.standard1.small, dev.standard1.medium, dev.standard1.large, dev.standard1.xlarge) |
last_updated_time | string (date-time) | The time when the Dev Environment was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339. |
persistent_storage | object | Information about the configuration of persistent storage for the Dev Environment. |
project_name | string | The name of the project in the space. (pattern: <code>[a-zA-Z0-9]+(?:[-_.][a-zA-Z0-9]+)*</code>) |
repositories | array | Information about the repositories that will be cloned into the Dev Environment. If no rvalue is specified, no repository is cloned. |
space_name | string | The name of the space. (pattern: <code>[a-zA-Z0-9]+(?:[-_.][a-zA-Z0-9]+)*</code>) |
status | string | The status of the Dev Environment. (PENDING, RUNNING, STARTING, STOPPING, STOPPED, FAILED, DELETING, DELETED) |
status_reason | string | The reason for the status. |
vpc_connection_name | string | The name of the connection used to connect to Amazon VPC used when the Dev Environment was created, if any. (pattern: <code>[a-zA-Z0-9]+(?:[-_.][a-zA-Z0-9]+)*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_dev_environment | select | space_name, project_name, id, region | Returns information about a Dev Environment for a source repository in a project. Dev Environments are specific to the user who creates them. | |
list_dev_environments | select | space_name, region | Retrieves a list of Dev Environments in a project. | |
create_dev_environment | insert | space_name, project_name, region, instanceType, persistentStorage | Creates a Dev Environment in Amazon CodeCatalyst, a cloud-based development environment that you can use to quickly work on the code stored in the source repositories of your project. When created in the Amazon CodeCatalyst console, by default a Dev Environment is configured to have a 2 core processor, 4GB of RAM, and 16GB of persistent storage. None of these defaults apply to a Dev Environment created programmatically. | |
update_dev_environment | update | space_name, project_name, id, region | Changes one or more values for a Dev Environment. Updating certain values of the Dev Environment will cause a restart. | |
delete_dev_environment | delete | space_name, project_name, id, region | Deletes a Dev Environment. | |
start_dev_environment_session | exec | space_name, project_name, id, region, sessionConfiguration | Starts a session for a specified Dev Environment. | |
stop_dev_environment_session | exec | space_name, project_name, id, session_id, region | Stops a session for a specified Dev Environment. |
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 |
|---|---|---|
id | string | The system-generated unique ID of the Dev Environment. To obtain this ID, use ListDevEnvironments. |
project_name | string | The name of the project in the space. |
region | string | AWS region (default: us-east-1) |
session_id | string | The system-generated unique ID of the Dev Environment session. This ID is returned by StartDevEnvironmentSession. |
space_name | string | The name of the space. |
SELECT examples
- get_dev_environment
- list_dev_environments
Returns information about a Dev Environment for a source repository in a project. Dev Environments are specific to the user who creates them.
SELECT
id,
alias,
creator_id,
ides,
inactivity_timeout_minutes,
instance_type,
last_updated_time,
persistent_storage,
project_name,
repositories,
space_name,
status,
status_reason,
vpc_connection_name
FROM aws.codecatalyst.dev_environments
WHERE space_name = '{{ space_name }}' -- required
AND project_name = '{{ project_name }}' -- required
AND id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;
Retrieves a list of Dev Environments in a project.
SELECT
id,
alias,
creator_id,
ides,
inactivity_timeout_minutes,
instance_type,
last_updated_time,
persistent_storage,
project_name,
repositories,
space_name,
status,
status_reason,
vpc_connection_name
FROM aws.codecatalyst.dev_environments
WHERE space_name = '{{ space_name }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_dev_environment
- Manifest
Creates a Dev Environment in Amazon CodeCatalyst, a cloud-based development environment that you can use to quickly work on the code stored in the source repositories of your project. When created in the Amazon CodeCatalyst console, by default a Dev Environment is configured to have a 2 core processor, 4GB of RAM, and 16GB of persistent storage. None of these defaults apply to a Dev Environment created programmatically.
INSERT INTO aws.codecatalyst.dev_environments (
repositories,
clientToken,
alias,
ides,
instanceType,
inactivityTimeoutMinutes,
persistentStorage,
vpcConnectionName,
space_name,
project_name,
region
)
SELECT
'{{ repositories }}',
'{{ clientToken }}',
'{{ alias }}',
'{{ ides }}',
'{{ instanceType }}' /* required */,
{{ inactivityTimeoutMinutes }},
'{{ persistentStorage }}' /* required */,
'{{ vpcConnectionName }}',
'{{ space_name }}',
'{{ project_name }}',
'{{ region }}'
RETURNING
id,
project_name,
space_name,
vpc_connection_name
;
# Description fields are for documentation purposes
- name: dev_environments
props:
- name: space_name
value: "{{ space_name }}"
description: Required parameter for the dev_environments resource.
- name: project_name
value: "{{ project_name }}"
description: Required parameter for the dev_environments resource.
- name: region
value: "{{ region }}"
description: Required parameter for the dev_environments resource.
- name: repositories
value:
- repositoryName: "{{ repositoryName }}"
branchName: "{{ branchName }}"
- name: clientToken
value: "{{ clientToken }}"
- name: alias
value: "{{ alias }}"
- name: ides
value:
- runtime: "{{ runtime }}"
name: "{{ name }}"
- name: instanceType
value: "{{ instanceType }}"
valid_values: ['dev.standard1.small', 'dev.standard1.medium', 'dev.standard1.large', 'dev.standard1.xlarge']
- name: inactivityTimeoutMinutes
value: {{ inactivityTimeoutMinutes }}
- name: persistentStorage
description: |
Information about the configuration of persistent storage for a Dev Environment.
value:
sizeInGiB: {{ sizeInGiB }}
- name: vpcConnectionName
value: "{{ vpcConnectionName }}"
UPDATE examples
- update_dev_environment
Changes one or more values for a Dev Environment. Updating certain values of the Dev Environment will cause a restart.
UPDATE aws.codecatalyst.dev_environments
SET
alias = '{{ alias }}',
ides = '{{ ides }}',
instanceType = '{{ instanceType }}',
inactivityTimeoutMinutes = {{ inactivityTimeoutMinutes }},
clientToken = '{{ clientToken }}'
WHERE
space_name = '{{ space_name }}' --required
AND project_name = '{{ project_name }}' --required
AND id = '{{ id }}' --required
AND region = '{{ region }}' --required
RETURNING
id,
alias,
client_token,
ides,
inactivity_timeout_minutes,
instance_type,
project_name,
space_name;
DELETE examples
- delete_dev_environment
Deletes a Dev Environment.
DELETE FROM aws.codecatalyst.dev_environments
WHERE space_name = '{{ space_name }}' --required
AND project_name = '{{ project_name }}' --required
AND id = '{{ id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- start_dev_environment_session
- stop_dev_environment_session
Starts a session for a specified Dev Environment.
EXEC aws.codecatalyst.dev_environments.start_dev_environment_session
@space_name='{{ space_name }}' --required,
@project_name='{{ project_name }}' --required,
@id='{{ id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"sessionConfiguration": "{{ sessionConfiguration }}"
}'
;
Stops a session for a specified Dev Environment.
EXEC aws.codecatalyst.dev_environments.stop_dev_environment_session
@space_name='{{ space_name }}' --required,
@project_name='{{ project_name }}' --required,
@id='{{ id }}' --required,
@session_id='{{ session_id }}' --required,
@region='{{ region }}' --required
;