Skip to main content

environments

Creates, updates, deletes or gets an environment resource or lists environments in a region

Overview

Nameenvironments
TypeResource
DescriptionResource Type definition for AWS::AppConfig::Environment
Idaws.appconfig.environments

Fields

NameDatatypeDescription
environment_idstringThe environment ID.
descriptionstringA description of the environment.
monitorsarrayAmazon CloudWatch alarms to monitor during the deployment process.
application_idstringThe application ID.
tagsarrayMetadata 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.
namestringA name for the environment.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, ApplicationId, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.appconfig.environments (
ApplicationId,
Name,
region
)
SELECT
'{{ ApplicationId }}',
'{{ Name }}',
'{{ region }}';

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