Class Environment

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.appconfig.Environment
All Implemented Interfaces:
IResource, IEnvironment, IExtensible, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.94.0 (build b380f01)", date="2024-03-14T22:21:49.821Z") @Stability(Stable) public class Environment extends Resource implements IEnvironment, IExtensible
An AWS AppConfig environment.

Example:

 Application app = new Application(this, "MyApp");
 Environment env = Environment.Builder.create(this, "MyEnv")
         .application(app)
         .build();
 HostedConfiguration.Builder.create(this, "MyHostedConfig")
         .application(app)
         .deployTo(List.of(env))
         .content(ConfigurationContent.fromInlineText("This is my configuration content."))
         .build();
 

See Also:
  • Constructor Details

    • Environment

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

      protected Environment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Environment

      @Stability(Stable) public Environment(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull EnvironmentProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromEnvironmentArn

      @Stability(Stable) @NotNull public static IEnvironment fromEnvironmentArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String environmentArn)
      Imports an environment into the CDK using its Amazon Resource Name (ARN).

      Parameters:
      scope - The parent construct. This parameter is required.
      id - The name of the environment construct. This parameter is required.
      environmentArn - The Amazon Resource Name (ARN) of the environment. This parameter is required.
    • fromEnvironmentAttributes

      @Stability(Stable) @NotNull public static IEnvironment fromEnvironmentAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull EnvironmentAttributes attrs)
      Imports an environment into the CDK from its attributes.

      Parameters:
      scope - The parent construct. This parameter is required.
      id - The name of the environment construct. This parameter is required.
      attrs - The attributes of the environment. This parameter is required.
    • addExtension

      @Stability(Stable) public void addExtension(@NotNull IExtension extension)
      Adds an extension association to the environment.

      Specified by:
      addExtension in interface IEnvironment
      Specified by:
      addExtension in interface IExtensible
      Parameters:
      extension - This parameter is required.
    • on

      @Stability(Stable) public void on(@NotNull ActionPoint actionPoint, @NotNull IEventDestination eventDestination, @Nullable ExtensionOptions options)
      Adds an extension defined by the action point and event destination and also creates an extension association to the environment.

      Specified by:
      on in interface IEnvironment
      Specified by:
      on in interface IExtensible
      Parameters:
      actionPoint - This parameter is required.
      eventDestination - This parameter is required.
      options -
    • on

      @Stability(Stable) public void on(@NotNull ActionPoint actionPoint, @NotNull IEventDestination eventDestination)
      Adds an extension defined by the action point and event destination and also creates an extension association to the environment.

      Specified by:
      on in interface IEnvironment
      Specified by:
      on in interface IExtensible
      Parameters:
      actionPoint - This parameter is required.
      eventDestination - This parameter is required.
    • onDeploymentBaking

      @Stability(Stable) public void onDeploymentBaking(@NotNull IEventDestination eventDestination, @Nullable ExtensionOptions options)
      Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the environment.

      Specified by:
      onDeploymentBaking in interface IEnvironment
      Specified by:
      onDeploymentBaking in interface IExtensible
      Parameters:
      eventDestination - This parameter is required.
      options -
    • onDeploymentBaking

      @Stability(Stable) public void onDeploymentBaking(@NotNull IEventDestination eventDestination)
      Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the environment.

      Specified by:
      onDeploymentBaking in interface IEnvironment
      Specified by:
      onDeploymentBaking in interface IExtensible
      Parameters:
      eventDestination - This parameter is required.
    • onDeploymentComplete

      @Stability(Stable) public void onDeploymentComplete(@NotNull IEventDestination eventDestination, @Nullable ExtensionOptions options)
      Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the environment.

      Specified by:
      onDeploymentComplete in interface IEnvironment
      Specified by:
      onDeploymentComplete in interface IExtensible
      Parameters:
      eventDestination - This parameter is required.
      options -
    • onDeploymentComplete

      @Stability(Stable) public void onDeploymentComplete(@NotNull IEventDestination eventDestination)
      Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the environment.

      Specified by:
      onDeploymentComplete in interface IEnvironment
      Specified by:
      onDeploymentComplete in interface IExtensible
      Parameters:
      eventDestination - This parameter is required.
    • onDeploymentRolledBack

      @Stability(Stable) public void onDeploymentRolledBack(@NotNull IEventDestination eventDestination, @Nullable ExtensionOptions options)
      Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the environment.

      Specified by:
      onDeploymentRolledBack in interface IEnvironment
      Specified by:
      onDeploymentRolledBack in interface IExtensible
      Parameters:
      eventDestination - This parameter is required.
      options -
    • onDeploymentRolledBack

      @Stability(Stable) public void onDeploymentRolledBack(@NotNull IEventDestination eventDestination)
      Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the environment.

      Specified by:
      onDeploymentRolledBack in interface IEnvironment
      Specified by:
      onDeploymentRolledBack in interface IExtensible
      Parameters:
      eventDestination - This parameter is required.
    • onDeploymentStart

      @Stability(Stable) public void onDeploymentStart(@NotNull IEventDestination eventDestination, @Nullable ExtensionOptions options)
      Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the environment.

      Specified by:
      onDeploymentStart in interface IEnvironment
      Specified by:
      onDeploymentStart in interface IExtensible
      Parameters:
      eventDestination - This parameter is required.
      options -
    • onDeploymentStart

      @Stability(Stable) public void onDeploymentStart(@NotNull IEventDestination eventDestination)
      Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the environment.

      Specified by:
      onDeploymentStart in interface IEnvironment
      Specified by:
      onDeploymentStart in interface IExtensible
      Parameters:
      eventDestination - This parameter is required.
    • onDeploymentStep

      @Stability(Stable) public void onDeploymentStep(@NotNull IEventDestination eventDestination, @Nullable ExtensionOptions options)
      Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the environment.

      Specified by:
      onDeploymentStep in interface IEnvironment
      Specified by:
      onDeploymentStep in interface IExtensible
      Parameters:
      eventDestination - This parameter is required.
      options -
    • onDeploymentStep

      @Stability(Stable) public void onDeploymentStep(@NotNull IEventDestination eventDestination)
      Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the environment.

      Specified by:
      onDeploymentStep in interface IEnvironment
      Specified by:
      onDeploymentStep in interface IExtensible
      Parameters:
      eventDestination - This parameter is required.
    • preCreateHostedConfigurationVersion

      @Stability(Stable) public void preCreateHostedConfigurationVersion(@NotNull IEventDestination eventDestination, @Nullable ExtensionOptions options)
      Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to the environment.

      Specified by:
      preCreateHostedConfigurationVersion in interface IEnvironment
      Specified by:
      preCreateHostedConfigurationVersion in interface IExtensible
      Parameters:
      eventDestination - This parameter is required.
      options -
    • preCreateHostedConfigurationVersion

      @Stability(Stable) public void preCreateHostedConfigurationVersion(@NotNull IEventDestination eventDestination)
      Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to the environment.

      Specified by:
      preCreateHostedConfigurationVersion in interface IEnvironment
      Specified by:
      preCreateHostedConfigurationVersion in interface IExtensible
      Parameters:
      eventDestination - This parameter is required.
    • preStartDeployment

      @Stability(Stable) public void preStartDeployment(@NotNull IEventDestination eventDestination, @Nullable ExtensionOptions options)
      Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the environment.

      Specified by:
      preStartDeployment in interface IEnvironment
      Specified by:
      preStartDeployment in interface IExtensible
      Parameters:
      eventDestination - This parameter is required.
      options -
    • preStartDeployment

      @Stability(Stable) public void preStartDeployment(@NotNull IEventDestination eventDestination)
      Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the environment.

      Specified by:
      preStartDeployment in interface IEnvironment
      Specified by:
      preStartDeployment in interface IExtensible
      Parameters:
      eventDestination - This parameter is required.
    • getApplicationId

      @Stability(Stable) @NotNull public String getApplicationId()
      The ID of the environment.
      Specified by:
      getApplicationId in interface IEnvironment
    • getEnvironmentArn

      @Stability(Stable) @NotNull public String getEnvironmentArn()
      The Amazon Resource Name (ARN) of the environment.
      Specified by:
      getEnvironmentArn in interface IEnvironment
    • getEnvironmentId

      @Stability(Stable) @NotNull public String getEnvironmentId()
      The ID of the environment.
      Specified by:
      getEnvironmentId in interface IEnvironment
    • getApplication

      @Stability(Stable) @Nullable public IApplication getApplication()
      The application associated with the environment.
      Specified by:
      getApplication in interface IEnvironment
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The description of the environment.
      Specified by:
      getDescription in interface IEnvironment
    • getMonitors

      @Stability(Stable) @Nullable public List<Monitor> getMonitors()
      The monitors for the environment.
      Specified by:
      getMonitors in interface IEnvironment
    • getName

      @Stability(Stable) @Nullable public String getName()
      The name of the environment.
      Specified by:
      getName in interface IEnvironment
    • getExtensible

      @Stability(Stable) @NotNull protected ExtensibleBase getExtensible()
    • setExtensible

      @Stability(Stable) protected void setExtensible(@NotNull ExtensibleBase value)