Skip to content
v2.275.0

IEnvironment Interface ​

Properties ​

applicationmay be undefinedIApplicationapplicationmay be undefinedIApplicationapplicationmay be undefinedIApplicationApplicationmay be undefinedIApplicationApplicationmay be undefinedIApplication#
The application associated with the environment.
applicationIdstringapplication_idstrapplicationIdStringApplicationIdstringApplicationId*string#
The ID of the application associated to the environment.
descriptionmay be undefinedstringdescriptionmay be undefinedstrdescriptionmay be undefinedStringDescriptionmay be undefinedstringDescriptionmay be undefined*string#
The description of the environment.
The environment this resource belongs to.
notes

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.

environmentArnstringenvironment_arnstrenvironmentArnStringEnvironmentArnstringEnvironmentArn*string#
The Amazon Resource Name (ARN) of the environment.
environmentIdstringenvironment_idstrenvironmentIdStringEnvironmentIdstringEnvironmentId*string#
The ID of the environment.
environmentRefEnvironmentReferenceenvironment_refEnvironmentReferenceenvironmentRefEnvironmentReferenceEnvironmentRefEnvironmentReferenceEnvironmentRefEnvironmentReference#
A reference to a Environment resource.
monitorsmay be undefinedMonitor[]monitorsmay be undefinedtyping.List[Monitor]monitorsmay be undefinedList<Monitor>Monitorsmay be undefinedMonitor[]Monitorsmay be undefined*[]Monitor#
The monitors for the environment.
namemay be undefinedstringnamemay be undefinedstrnamemay be undefinedStringNamemay be undefinedstringNamemay be undefined*string#
The name of the environment.
nodeNodenodeNodenodeNodeNodeNodeNodeNode#
The tree node.
stackStackstackStackstackStackStackStackStackStack#
The stack in which this resource is defined.

Methods ​

addDeployment(configuration: IConfiguration): voiddef add_deployment(self, configuration: IConfiguration) -> Nonepublic void addDeployment(IConfiguration configuration)public void AddDeployment(IConfiguration configuration)func AddDeployment(Configuration IConfiguration)#
Creates a deployment of the supplied configuration to this environment.
notes · 1 parameter

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

  • configurationconfigurationconfigurationconfigurationConfiguration — The configuration that will be deployed to this environment.
addDeployments(...configurations: IConfiguration[]): voiddef add_deployments(self, configurations: IConfiguration) -> Nonepublic void addDeployments(IConfiguration configurations)public void AddDeployments(IConfiguration configurations)func AddDeployments(Configurations IConfiguration)#
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.

1 parameter

Parameters

  • configurationsconfigurationsconfigurationsconfigurationsConfigurations — The configurations that will be deployed to this environment.
addExtension(extension: IExtension): voiddef add_extension(self, extension: IExtension) -> Nonepublic void addExtension(IExtension extension)public void AddExtension(IExtension extension)func AddExtension(Extension IExtension)#
Adds an extension association to the environment.
1 parameter

Parameters

  • extensionextensionextensionextensionExtension — The extension to create an association for.
applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#
Apply the given removal policy to this resource.
notes

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): voiddef at_deployment_tick(self, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void atDeploymentTick(IEventDestination eventDestination, ExtensionOptions options)public void AtDeploymentTick(IEventDestination eventDestination, ExtensionOptions? options = null)func AtDeploymentTick(EventDestination IEventDestination, Options ExtensionOptions)#
Adds an AT_DEPLOYMENT_TICK extension with the provided event destination and also creates an extension association to an application.
2 parameters

Parameters

  • eventDestinationevent_destinationeventDestinationeventDestinationEventDestination — The event that occurs during the extension.
  • optionsoptionsoptionsoptionsOptions — Options for the extension.
grant(grantee: IGrantable, ...actions: string[]): Grantdef grant(self, grantee: IGrantable, actions: str) -> Grantpublic Grant grant(IGrantable grantee, String actions)public Grant Grant(IGrantable grantee, string actions)func Grant(Grantee IGrantable, Actions *string) Grant#
Adds an IAM policy statement associated with this environment to an IAM principal's policy.
2 parameters

Parameters

  • granteegranteegranteegranteeGrantee — the principal (no-op if undefined).
  • actionsactionsactionsactionsActions — the set of actions to allow (i.e., 'appconfig:GetLatestConfiguration', 'appconfig:StartConfigurationSession', etc.).
grantReadConfig(grantee: IGrantable): Grantdef grant_read_config(self, grantee: IGrantable) -> Grantpublic Grant grantReadConfig(IGrantable grantee)public Grant GrantReadConfig(IGrantable grantee)func GrantReadConfig(Grantee IGrantable) Grant#
Permits an IAM principal to perform read operations on this environment's configurations.

Actions: GetLatestConfiguration, StartConfigurationSession.

1 parameter

Parameters

  • granteegranteegranteegranteeGrantee — Principal to grant read rights to.
on(actionPoint: ActionPoint, eventDestination: IEventDestination, options?: ExtensionOptions): voiddef on(self, action_point: ActionPoint, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void on(ActionPoint actionPoint, IEventDestination eventDestination, ExtensionOptions options)public void On(ActionPoint actionPoint, IEventDestination eventDestination, ExtensionOptions? options = null)func On(ActionPoint ActionPoint, EventDestination IEventDestination, Options ExtensionOptions)#
Adds an extension defined by the action point and event destination and also creates an extension association to the environment.
3 parameters

Parameters

  • actionPointaction_pointactionPointactionPointActionPoint — The action point which triggers the event.
  • eventDestinationevent_destinationeventDestinationeventDestinationEventDestination — The event that occurs during the extension.
  • optionsoptionsoptionsoptionsOptions — Options for the extension.
onDeploymentBaking(eventDestination: IEventDestination, options?: ExtensionOptions): voiddef on_deployment_baking(self, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void onDeploymentBaking(IEventDestination eventDestination, ExtensionOptions options)public void OnDeploymentBaking(IEventDestination eventDestination, ExtensionOptions? options = null)func OnDeploymentBaking(EventDestination IEventDestination, Options ExtensionOptions)#
Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the environment.
2 parameters

Parameters

  • eventDestinationevent_destinationeventDestinationeventDestinationEventDestination — The event that occurs during the extension.
  • optionsoptionsoptionsoptionsOptions — Options for the extension.
onDeploymentComplete(eventDestination: IEventDestination, options?: ExtensionOptions): voiddef on_deployment_complete(self, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void onDeploymentComplete(IEventDestination eventDestination, ExtensionOptions options)public void OnDeploymentComplete(IEventDestination eventDestination, ExtensionOptions? options = null)func OnDeploymentComplete(EventDestination IEventDestination, Options ExtensionOptions)#
Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the environment.
2 parameters

Parameters

  • eventDestinationevent_destinationeventDestinationeventDestinationEventDestination — The event that occurs during the extension.
  • optionsoptionsoptionsoptionsOptions — Options for the extension.
onDeploymentRolledBack(eventDestination: IEventDestination, options?: ExtensionOptions): voiddef on_deployment_rolled_back(self, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void onDeploymentRolledBack(IEventDestination eventDestination, ExtensionOptions options)public void OnDeploymentRolledBack(IEventDestination eventDestination, ExtensionOptions? options = null)func OnDeploymentRolledBack(EventDestination IEventDestination, Options ExtensionOptions)#
Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the environment.
2 parameters

Parameters

  • eventDestinationevent_destinationeventDestinationeventDestinationEventDestination — The event that occurs during the extension.
  • optionsoptionsoptionsoptionsOptions — Options for the extension.
onDeploymentStart(eventDestination: IEventDestination, options?: ExtensionOptions): voiddef on_deployment_start(self, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void onDeploymentStart(IEventDestination eventDestination, ExtensionOptions options)public void OnDeploymentStart(IEventDestination eventDestination, ExtensionOptions? options = null)func OnDeploymentStart(EventDestination IEventDestination, Options ExtensionOptions)#
Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the environment.
2 parameters

Parameters

  • eventDestinationevent_destinationeventDestinationeventDestinationEventDestination — The event that occurs during the extension.
  • optionsoptionsoptionsoptionsOptions — Options for the extension.
onDeploymentStep(eventDestination: IEventDestination, options?: ExtensionOptions): voiddef on_deployment_step(self, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void onDeploymentStep(IEventDestination eventDestination, ExtensionOptions options)public void OnDeploymentStep(IEventDestination eventDestination, ExtensionOptions? options = null)func OnDeploymentStep(EventDestination IEventDestination, Options ExtensionOptions)#
Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the environment.
2 parameters

Parameters

  • eventDestinationevent_destinationeventDestinationeventDestinationEventDestination — The event that occurs during the extension.
  • optionsoptionsoptionsoptionsOptions — Options for the extension.
preCreateHostedConfigurationVersion(eventDestination: IEventDestination, options?: ExtensionOptions): voiddef pre_create_hosted_configuration_version(self, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void preCreateHostedConfigurationVersion(IEventDestination eventDestination, ExtensionOptions options)public void PreCreateHostedConfigurationVersion(IEventDestination eventDestination, ExtensionOptions? options = null)func PreCreateHostedConfigurationVersion(EventDestination IEventDestination, Options ExtensionOptions)#
Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to the environment.
2 parameters

Parameters

  • eventDestinationevent_destinationeventDestinationeventDestinationEventDestination — The event that occurs during the extension.
  • optionsoptionsoptionsoptionsOptions — Options for the extension.
preStartDeployment(eventDestination: IEventDestination, options?: ExtensionOptions): voiddef pre_start_deployment(self, event_destination: IEventDestination, options: typing.Optional[ExtensionOptions] = None) -> Nonepublic void preStartDeployment(IEventDestination eventDestination, ExtensionOptions options)public void PreStartDeployment(IEventDestination eventDestination, ExtensionOptions? options = null)func PreStartDeployment(EventDestination IEventDestination, Options ExtensionOptions)#
Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the environment.
2 parameters

Parameters

  • eventDestinationevent_destinationeventDestinationeventDestinationEventDestination — The event that occurs during the extension.
  • optionsoptionsoptionsoptionsOptions — Options for the extension.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func 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.

1 parameter · returns

Parameters

  • mixinsmixinsmixinsmixinsMixins — The mixins to apply.

Returns: This construct for chaining