interface IEnvironment
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppConfig.IEnvironment |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsappconfig#IEnvironment |
Java | software.amazon.awscdk.services.appconfig.IEnvironment |
Python | aws_cdk.aws_appconfig.IEnvironment |
TypeScript (source) | aws-cdk-lib » aws_appconfig » IEnvironment |
Implemented by
Environment
Obtainable from
Application
.addEnvironment()
, Environment
.fromEnvironmentArn()
, Environment
.fromEnvironmentAttributes()
Properties
Name | Type | Description |
---|---|---|
application | string | The ID of the application associated to the environment. |
env | Resource | The environment this resource belongs to. |
environment | string | The Amazon Resource Name (ARN) of the environment. |
environment | string | The ID of the environment. |
node | Node | The tree node. |
stack | Stack | The stack in which this resource is defined. |
application? | IApplication | The application associated with the environment. |
description? | string | The description of the environment. |
monitors? | Monitor [] | The monitors for the environment. |
name? | string | The name of the environment. |
applicationId
Type:
string
The ID of the application associated to the environment.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
environmentArn
Type:
string
The Amazon Resource Name (ARN) of the environment.
environmentId
Type:
string
The ID of the environment.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
application?
Type:
IApplication
(optional)
The application associated with the environment.
description?
Type:
string
(optional)
The description of the environment.
monitors?
Type:
Monitor
[]
(optional)
The monitors for the environment.
name?
Type:
string
(optional)
The name of the environment.
Methods
Name | Description |
---|---|
add | Creates a deployment of the supplied configuration to this environment. |
add | Creates a deployment for each of the supplied configurations to this environment. |
add | Adds an extension association to the environment. |
apply | Apply the given removal policy to this resource. |
grant(grantee, ...actions) | Adds an IAM policy statement associated with this environment to an IAM principal's policy. |
grant | Permits an IAM principal to perform read operations on this environment's configurations. |
on(actionPoint, eventDestination, options?) | Adds an extension defined by the action point and event destination and also creates an extension association to the environment. |
on | Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the environment. |
on | Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the environment. |
on | Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the environment. |
on | Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the environment. |
on | Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the environment. |
pre | Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to the environment. |
pre | Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the environment. |
addDeployment(configuration)
public addDeployment(configuration: IConfiguration): void
Parameters
- configuration
IConfiguration
— The configuration that will be deployed to this environment.
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.
addDeployments(...configurations)
public addDeployments(...configurations: IConfiguration[]): void
Parameters
- configurations
IConfiguration
— The configurations that will be deployed to this environment.
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.
addExtension(extension)
public addExtension(extension: IExtension): void
Parameters
- extension
IExtension
— The extension to create an association for.
Adds an extension association to the environment.
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
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
).
grant(grantee, ...actions)
public grant(grantee: IGrantable, ...actions: string[]): Grant
Parameters
- grantee
IGrantable
— the principal (no-op if undefined). - actions
string
— the set of actions to allow (i.e., 'appconfig:GetLatestConfiguration', 'appconfig:StartConfigurationSession', etc.).
Returns
Adds an IAM policy statement associated with this environment to an IAM principal's policy.
grantReadConfig(grantee)
public grantReadConfig(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
— Principal to grant read rights to.
Returns
Permits an IAM principal to perform read operations on this environment's configurations.
Actions: GetLatestConfiguration, StartConfigurationSession.
on(actionPoint, eventDestination, options?)
public on(actionPoint: ActionPoint, eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- actionPoint
Action
— The action point which triggers the event.Point - eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an extension defined by the action point and event destination and also creates an extension association to the environment.
onDeploymentBaking(eventDestination, options?)
public onDeploymentBaking(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the environment.
onDeploymentComplete(eventDestination, options?)
public onDeploymentComplete(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the environment.
onDeploymentRolledBack(eventDestination, options?)
public onDeploymentRolledBack(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the environment.
onDeploymentStart(eventDestination, options?)
public onDeploymentStart(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the environment.
onDeploymentStep(eventDestination, options?)
public onDeploymentStep(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the environment.
preCreateHostedConfigurationVersion(eventDestination, options?)
public preCreateHostedConfigurationVersion(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to the environment.
preStartDeployment(eventDestination, options?)
public preStartDeployment(eventDestination: IEventDestination, options?: ExtensionOptions): void
Parameters
- eventDestination
IEvent
— The event that occurs during the extension.Destination - options
Extension
— Options for the extension.Options
Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the environment.