Skip to main content

dev_environments

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

Overview

Namedev_environments
TypeResource
Idaws.codecatalyst.dev_environments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe 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>)
aliasstringThe user-specified alias for the Dev Environment.
creator_idstringThe system-generated unique ID of the user who created the Dev Environment.
idesarrayInformation about the integrated development environment (IDE) configured for the Dev Environment.
inactivity_timeout_minutesintegerThe amount of time the Dev Environment will run without any activity detected before stopping, in minutes.
instance_typestringThe Amazon EC2 instace type to use for the Dev Environment. (dev.standard1.small, dev.standard1.medium, dev.standard1.large, dev.standard1.xlarge)
last_updated_timestring (date-time)The time when the Dev Environment was last updated, in coordinated universal time (UTC) timestamp format as specified in RFC 3339.
persistent_storageobjectInformation about the amount of storage allocated to the Dev Environment. By default, a Dev Environment is configured to have 16GB of persistent storage.
project_namestringThe name of the project in the space. (pattern: <code>[a-zA-Z0-9]+(?:[-_.][a-zA-Z0-9]+)*</code>)
repositoriesarrayThe source repository that contains the branch cloned into the Dev Environment.
space_namestringThe name of the space. (pattern: <code>[a-zA-Z0-9]+(?:[-_.][a-zA-Z0-9]+)*</code>)
statusstringThe current status of the Dev Environment. (PENDING, RUNNING, STARTING, STOPPING, STOPPED, FAILED, DELETING, DELETED)
status_reasonstringThe reason for the status.
vpc_connection_namestringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_dev_environmentselectspace_name, project_name, id, regionReturns information about a Dev Environment for a source repository in a project. Dev Environments are specific to the user who creates them.
list_dev_environmentsselectspace_name, regionRetrieves a list of Dev Environments in a project.
create_dev_environmentinsertspace_name, project_name, region, instanceType, persistentStorageCreates 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_environmentupdatespace_name, project_name, id, regionChanges one or more values for a Dev Environment. Updating certain values of the Dev Environment will cause a restart.
delete_dev_environmentdeletespace_name, project_name, id, regionDeletes a Dev Environment.
start_dev_environment_sessionexecspace_name, project_name, id, region, sessionConfigurationStarts a session for a specified Dev Environment.
stop_dev_environment_sessionexecspace_name, project_name, id, session_id, regionStops 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.

NameDatatypeDescription
idstringThe system-generated unique ID of the Dev Environment. To obtain this ID, use ListDevEnvironments.
project_namestringThe name of the project in the space.
regionstringAWS region (default: us-east-1)
session_idstringThe system-generated unique ID of the Dev Environment session. This ID is returned by StartDevEnvironmentSession.
space_namestringThe name of the space.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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

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 }}"
}'
;