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
Idawscc.appconfig.environments

Fields

NameDatatypeDescription
environment_idstringThe environment ID.
descriptionstringA description of the environment.
monitorsarrayAmazon CloudWatch alarms to monitor during the deployment process.
deletion_protection_checkstringOn resource deletion this controls whether the Deletion Protection check should be applied, bypassed, or (the default) whether the behavior should be controlled by the account-level Deletion Protection setting. See https://docs.aws.amazon.com/appconfig/latest/userguide/deletion-protection.html
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.

For more information, see AWS::AppConfig::Environment.

Methods

NameResourceAccessible byRequired Params
create_resourceenvironmentsINSERTName, ApplicationId, region
delete_resourceenvironmentsDELETEIdentifier, region
update_resourceenvironmentsUPDATEIdentifier, PatchDocument, region
list_resourcesenvironments_list_onlySELECTregion
get_resourceenvironmentsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual environment.

SELECT
region,
environment_id,
description,
monitors,
deletion_protection_check,
application_id,
tags,
name
FROM awscc.appconfig.environments
WHERE
region = 'us-east-1' AND
Identifier = '{{ application_id }}|{{ environment_id }}';

INSERT example

Use the following StackQL query and manifest file to create a new environment resource, using stack-deploy.

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

UPDATE example

Use the following StackQL query and manifest file to update a environment resource, using stack-deploy.

/*+ update */
UPDATE awscc.appconfig.environments
SET PatchDocument = string('{{ {
"Description": description,
"Monitors": monitors,
"DeletionProtectionCheck": deletion_protection_check,
"Tags": tags,
"Name": name
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ application_id }}|{{ environment_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.appconfig.environments
WHERE
Identifier = '{{ application_id }}|{{ environment_id }}' AND
region = 'us-east-1';

Permissions

To operate on the environments resource, the following permissions are required:

appconfig:GetEnvironment,
appconfig:ListTagsForResource