Class CfnEnvironment
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.appconfig.CfnEnvironment
- All Implemented Interfaces:
- IInspectable,- ITaggableV2,- IEnvironmentRef,- software.amazon.jsii.JsiiSerializable,- software.constructs.IConstruct,- software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
           date="2025-10-29T11:15:31.860Z")
@Stability(Stable)
public class CfnEnvironment
extends CfnResource
implements IInspectable, IEnvironmentRef, ITaggableV2
The 
AWS::AppConfig::Environment resource creates an environment, which is a logical deployment group of AWS AppConfig targets, such as applications in a Beta or Production environment.
 
 You define one or more environments for each AWS AppConfig application. You can also define environments for application subcomponents such as the Web , Mobile and Back-end components for your application. You can configure Amazon CloudWatch alarms for each environment. The system monitors alarms during a configuration deployment. If an alarm is triggered, the system rolls back the configuration.
 
AWS AppConfig requires that you create resources and deploy a configuration in the following order:
- Create an application
- Create an environment
- Create a configuration profile
- Choose a pre-defined deployment strategy or create your own
- Deploy the configuration
For more information, see AWS AppConfig in the AWS AppConfig User Guide .
Example:
 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.appconfig.*;
 CfnEnvironment cfnEnvironment = CfnEnvironment.Builder.create(this, "MyCfnEnvironment")
         .applicationId("applicationId")
         .name("name")
         // the properties below are optional
         .deletionProtectionCheck("deletionProtectionCheck")
         .description("description")
         .monitors(List.of(MonitorsProperty.builder()
                 .alarmArn("alarmArn")
                 .alarmRoleArn("alarmRoleArn")
                 .build()))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 - See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnEnvironment.static interfaceAmazon CloudWatch alarms to monitor during the deployment process.static interfaceExample:Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObjectsoftware.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstructsoftware.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.appconfig.IEnvironmentRefIEnvironmentRef.Jsii$Default, IEnvironmentRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectableIInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedCfnEnvironment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnEnvironment(software.amazon.jsii.JsiiObjectRef objRef) CfnEnvironment(software.constructs.Construct scope, String id, CfnEnvironmentProps props) 
- 
Method SummaryModifier and TypeMethodDescriptionThe application ID.The environment ID.Tag Manager which manages the tags for this resource.A parameter to configure deletion protection.A description of the environment.A reference to a Environment resource.Amazon CloudWatch alarms to monitor during the deployment process.getName()A name for the environment.getTags()Metadata to assign to the environment.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetApplicationId(String value) The application ID.voidsetDeletionProtectionCheck(String value) A parameter to configure deletion protection.voidsetDescription(String value) A description of the environment.voidsetMonitors(List<Object> value) Amazon CloudWatch alarms to monitor during the deployment process.voidsetMonitors(IResolvable value) Amazon CloudWatch alarms to monitor during the deployment process.voidA name for the environment.voidMetadata to assign to the environment.Methods inherited from class software.amazon.awscdk.CfnResourceaddDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElementgetRefMethods inherited from class software.amazon.awscdk.CfnElementgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.ConstructgetNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObjectjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstructgetNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Field Details- 
CFN_RESOURCE_TYPE_NAMEThe CloudFormation resource type name for this resource class.
 
- 
- 
Constructor Details- 
CfnEnvironmentprotected CfnEnvironment(software.amazon.jsii.JsiiObjectRef objRef) 
- 
CfnEnvironmentprotected CfnEnvironment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) 
- 
CfnEnvironment@Stability(Stable) public CfnEnvironment(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnEnvironmentProps props) - Parameters:
- scope- Scope in which this resource is defined. This parameter is required.
- id- Construct identifier for this resource (unique in its scope). This parameter is required.
- props- Resource properties. This parameter is required.
 
 
- 
- 
Method Details- 
inspectExamines the CloudFormation resource and discloses attributes.- Specified by:
- inspectin interface- IInspectable
- Parameters:
- inspector- tree inspector to collect and process attributes. This parameter is required.
 
- 
renderProperties@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
- renderPropertiesin class- CfnResource
- Parameters:
- props- This parameter is required.
 
- 
getAttrEnvironmentIdThe environment ID.
- 
getCdkTagManagerTag Manager which manages the tags for this resource.- Specified by:
- getCdkTagManagerin interface- ITaggableV2
 
- 
getCfnProperties- Overrides:
- getCfnPropertiesin class- CfnResource
 
- 
getEnvironmentRefA reference to a Environment resource.- Specified by:
- getEnvironmentRefin interface- IEnvironmentRef
 
- 
getApplicationIdThe application ID.
- 
setApplicationIdThe application ID.
- 
getNameA name for the environment.
- 
setNameA name for the environment.
- 
getDeletionProtectionCheckA parameter to configure deletion protection.
- 
setDeletionProtectionCheckA parameter to configure deletion protection.
- 
getDescriptionA description of the environment.
- 
setDescriptionA description of the environment.
- 
getMonitorsAmazon CloudWatch alarms to monitor during the deployment process.Returns union: either IResolvableor Listinvalid input: '<'eitherIResolvableorCfnEnvironment.MonitorsProperty>
- 
setMonitorsAmazon CloudWatch alarms to monitor during the deployment process.
- 
setMonitorsAmazon CloudWatch alarms to monitor during the deployment process.
- 
getTagsMetadata to assign to the environment.
- 
setTagsMetadata to assign to the environment.
 
-