environments
Creates, updates, deletes or gets an environment
resource or lists environments
in a region
Overview
Name | environments |
Type | Resource |
Description | Resource Type definition for AWS::AppConfig::Environment |
Id | aws.appconfig.environments |
Fields
Name | Datatype | Description |
---|---|---|
environment_id | string | The environment ID. |
description | string | A description of the environment. |
monitors | array | Amazon CloudWatch alarms to monitor during the deployment process. |
application_id | string | The application ID. |
tags | array | Metadata to assign to the environment. Tags help organize and categorize your AWS AppConfig resources. Each tag consists of a key and an optional value, both of which you define. |
name | string | A name for the environment. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, ApplicationId, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all environments
in a region.
SELECT
region,
environment_id,
description,
monitors,
application_id,
tags,
name
FROM aws.appconfig.environments
WHERE region = 'us-east-1';
Gets all properties from an individual environment
.
SELECT
region,
environment_id,
description,
monitors,
application_id,
tags,
name
FROM aws.appconfig.environments
WHERE region = 'us-east-1' AND data__Identifier = '<ApplicationId>|<EnvironmentId>';
INSERT
example
Use the following StackQL query and manifest file to create a new environment
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.appconfig.environments (
ApplicationId,
Name,
region
)
SELECT
'{{ ApplicationId }}',
'{{ Name }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.appconfig.environments (
Description,
Monitors,
ApplicationId,
Tags,
Name,
region
)
SELECT
'{{ Description }}',
'{{ Monitors }}',
'{{ ApplicationId }}',
'{{ Tags }}',
'{{ Name }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: environment
props:
- name: Description
value: '{{ Description }}'
- name: Monitors
value:
- AlarmArn: '{{ AlarmArn }}'
AlarmRoleArn: '{{ AlarmRoleArn }}'
- name: ApplicationId
value: '{{ ApplicationId }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: Name
value: '{{ Name }}'
DELETE
example
/*+ delete */
DELETE FROM aws.appconfig.environments
WHERE data__Identifier = '<ApplicationId|EnvironmentId>'
AND region = 'us-east-1';
Permissions
To operate on the environments
resource, the following permissions are required:
Read
appconfig:GetEnvironment,
appconfig:ListTagsForResource
Create
appconfig:CreateEnvironment,
appconfig:GetEnvironment,
appconfig:ListTagsForResource,
appconfig:TagResource,
iam:PassRole
Update
appconfig:UpdateEnvironment,
appconfig:TagResource,
appconfig:UntagResource,
iam:PassRole
List
appconfig:ListEnvironments
Delete
appconfig:GetEnvironment,
appconfig:DeleteEnvironment