Class CfnEnvironment

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-09-24T10:56:26.843Z") @Stability(Stable) public class CfnEnvironment extends CfnResource implements IInspectable, 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
         .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:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnEnvironment

      protected CfnEnvironment(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnEnvironment

      protected 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

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in 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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrEnvironmentId

      @Stability(Stable) @NotNull public String getAttrEnvironmentId()
      The environment ID.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getApplicationId

      @Stability(Stable) @NotNull public String getApplicationId()
      The application ID.
    • setApplicationId

      @Stability(Stable) public void setApplicationId(@NotNull String value)
      The application ID.
    • getName

      @Stability(Stable) @NotNull public String getName()
      A name for the environment.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      A name for the environment.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      A description of the environment.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A description of the environment.
    • getMonitors

      @Stability(Stable) @Nullable public Object getMonitors()
      Amazon CloudWatch alarms to monitor during the deployment process.
    • setMonitors

      @Stability(Stable) public void setMonitors(@Nullable IResolvable value)
      Amazon CloudWatch alarms to monitor during the deployment process.
    • setMonitors

      @Stability(Stable) public void setMonitors(@Nullable List<Object> value)
      Amazon CloudWatch alarms to monitor during the deployment process.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      Metadata to assign to the environment.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      Metadata to assign to the environment.