# IEnvironment

Extends: IEnvironment
Extends: IResource, IEnvironmentRef
Implemented by: Environment

- Source: [`aws-appconfig/lib/environment.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-appconfig/lib/environment.ts#L469)
- Type last changed: v2.233.0 · 18 Dec 2025

## Properties

- `application`: [IApplication](/cdk/api/v2/docs/aws-cdk-lib.aws_appconfig.IApplication.html) — The application associated with the environment.

- `applicationId`: string — The ID of the application associated to the environment.

- `description`: string — The description of the environment.

- `env`: [ResourceEnvironment](/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html) — The environment this resource belongs to.

  For resources that are created and managed in a Stack (those created by
  creating new class instances like `new Role()`, `new Bucket()`, etc.), this
  is always the same as the environment of the stack they belong to.

  For referenced resources (those obtained from referencing methods like
  `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
  different than the stack they were imported into.

- `environmentArn`: string — The Amazon Resource Name (ARN) of the environment.

- `environmentId`: string — The ID of the environment.

- `environmentRef`: [EnvironmentReference](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_appconfig.EnvironmentReference.html) — A reference to a Environment resource.

- `monitors`: [Monitor](/cdk/api/v2/docs/aws-cdk-lib.aws_appconfig.Monitor.html)[] — The monitors for the environment.

- `name`: string — The name of the environment.

- `node`: [Node](/cdk/api/v2/docs/constructs.Node.html) — The tree node.

- `stack`: [Stack](/cdk/api/v2/docs/aws-cdk-lib.Stack.html) — The stack in which this resource is defined.

## Methods

- `addDeployment(configuration: IConfiguration): void` — Creates a deployment of the supplied configuration to this environment.

  Note that you can only deploy one configuration at a time to an environment.
  However, you can deploy one configuration each to different environments at the same time.
  If more than one deployment is requested for this environment, they will occur in the same order they were provided.

  **Parameters**

  - `configuration` — The configuration that will be deployed to this environment.

- `addDeployments(...configurations: IConfiguration[]): void` — Creates a deployment for each of the supplied configurations to this environment.

  These configurations will be deployed in the same order as the input array.

  **Parameters**

  - `configurations` — The configurations that will be deployed to this environment.

- `addExtension(extension: IExtension): void` — Adds an extension association to the environment.

  **Parameters**

  - `extension` — The extension to create an association for.

- `applyRemovalPolicy(policy: RemovalPolicy): void` — Apply the given removal policy to this resource.

  The Removal Policy controls what happens to this resource when it stops
  being managed by CloudFormation, either because you've removed it from the
  CDK application or because you've made a change that requires the resource
  to be replaced.

  The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
  account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).

- `atDeploymentTick(eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds an AT_DEPLOYMENT_TICK extension with the provided event destination and also creates an extension association to an application.

  **Parameters**

  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `grant(grantee: IGrantable, ...actions: string[]): Grant` — Adds an IAM policy statement associated with this environment to an IAM principal's policy.

  **Parameters**

  - `grantee` — the principal (no-op if undefined).
  - `actions` — the set of actions to allow (i.e., 'appconfig:GetLatestConfiguration', 'appconfig:StartConfigurationSession', etc.).

- `grantReadConfig(grantee: IGrantable): Grant` — Permits an IAM principal to perform read operations on this environment's configurations.

  Actions: GetLatestConfiguration, StartConfigurationSession.

  **Parameters**

  - `grantee` — Principal to grant read rights to.

- `on(actionPoint: ActionPoint, eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds an extension defined by the action point and event destination and also creates an extension association to the environment.

  **Parameters**

  - `actionPoint` — The action point which triggers the event.
  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `onDeploymentBaking(eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the environment.

  **Parameters**

  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `onDeploymentComplete(eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the environment.

  **Parameters**

  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `onDeploymentRolledBack(eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the environment.

  **Parameters**

  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `onDeploymentStart(eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the environment.

  **Parameters**

  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `onDeploymentStep(eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the environment.

  **Parameters**

  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `preCreateHostedConfigurationVersion(eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to the environment.

  **Parameters**

  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `preStartDeployment(eventDestination: IEventDestination, options?: ExtensionOptions): void` — Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the environment.

  **Parameters**

  - `eventDestination` — The event that occurs during the extension.
  - `options` — Options for the extension.

- `with(...mixins: IMixin[]): IConstruct` — Applies one or more mixins to this construct.

  Mixins are applied in order. The list of constructs is captured at the
  start of the call, so constructs added by a mixin will not be visited.

  **Parameters**

  - `mixins` — The mixins to apply.

  **Returns:** This construct for chaining
