class Environment (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppConfig.Alpha.Environment |
Go | github.com/aws/aws-cdk-go/awscdkappconfigalpha/v2#Environment |
Java | software.amazon.awscdk.services.appconfig.alpha.Environment |
Python | aws_cdk.aws_appconfig_alpha.Environment |
TypeScript (source) | @aws-cdk/aws-appconfig-alpha » Environment |
⚠️ Deprecated: undefined
Implements
IConstruct
, IDependable
, IResource
, IEnvironment
, IExtensible
An AWS AppConfig environment.
See also: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as appconfig_alpha from '@aws-cdk/aws-appconfig-alpha';
declare const application: appconfig_alpha.Application;
declare const monitor: appconfig_alpha.Monitor;
const environment = new appconfig_alpha.Environment(this, 'MyEnvironment', {
application: application,
// the properties below are optional
description: 'description',
environmentName: 'environmentName',
monitors: [monitor],
});
Initializer
new Environment(scope: Construct, id: string, props: EnvironmentProps)
⚠️ Deprecated: undefined
Parameters
- scope
Construct
- id
string
- props
Environment
Props
Construct Props
Name | Type | Description |
---|---|---|
application | IApplication | The application to be associated with the environment. |
description? | string | The description of the environment. |
environment | string | The name of the environment. |
monitors? | Monitor [] | The monitors for the environment. |
application
⚠️ Deprecated: undefined
Type:
IApplication
The application to be associated with the environment.
description?
⚠️ Deprecated: undefined
Type:
string
(optional, default: No description.)
The description of the environment.
environmentName?
⚠️ Deprecated: undefined
Type:
string
(optional, default: A name is generated.)
The name of the environment.
monitors?
⚠️ Deprecated: undefined
Type:
Monitor
[]
(optional, default: No monitors.)
The monitors for the environment.
Properties
Name | Type | Description |
---|---|---|
application | string | The ID of 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. |
extensible | Extensible | |
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
⚠️ Deprecated: undefined
Type:
string
The ID of the environment.
env
⚠️ Deprecated: undefined
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
⚠️ Deprecated: undefined
Type:
string
The Amazon Resource Name (ARN) of the environment.
environmentId
⚠️ Deprecated: undefined
Type:
string
The ID of the environment.
extensible
⚠️ Deprecated: undefined
Type:
Extensible
node
⚠️ Deprecated: undefined
Type:
Node
The tree node.
stack
⚠️ Deprecated: undefined
Type:
Stack
The stack in which this resource is defined.
application?
⚠️ Deprecated: undefined
Type:
IApplication
(optional)
The application associated with the environment.
description?
⚠️ Deprecated: undefined
Type:
string
(optional)
The description of the environment.
monitors?
⚠️ Deprecated: undefined
Type:
Monitor
[]
(optional)
The monitors for the environment.
name?
⚠️ Deprecated: undefined
Type:
string
(optional)
The name of the environment.
Methods
Name | Description |
---|---|
add | Adds an extension association to the environment. |
apply | Apply the given removal policy to this resource. |
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. |
to | Returns a string representation of this construct. |
static from | Imports an environment into the CDK using its Amazon Resource Name (ARN). |
static from | Imports an environment into the CDK from its attributes. |
Extension(extension)
addpublic addExtension(extension: IExtension): void
⚠️ Deprecated: undefined
Parameters
- extension
IExtension
Adds an extension association to the environment.
RemovalPolicy(policy)
applypublic applyRemovalPolicy(policy: RemovalPolicy): void
⚠️ Deprecated: undefined
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
).
on(actionPoint, eventDestination, options?)
public on(actionPoint: ActionPoint, eventDestination: IEventDestination, options?: ExtensionOptions): void
⚠️ Deprecated: undefined
Parameters
- actionPoint
Action
Point - eventDestination
IEvent
Destination - options
Extension
Options
Adds an extension defined by the action point and event destination and also creates an extension association to the environment.
DeploymentBaking(eventDestination, options?)
onpublic onDeploymentBaking(eventDestination: IEventDestination, options?: ExtensionOptions): void
⚠️ Deprecated: undefined
Parameters
- eventDestination
IEvent
Destination - options
Extension
Options
Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the environment.
DeploymentComplete(eventDestination, options?)
onpublic onDeploymentComplete(eventDestination: IEventDestination, options?: ExtensionOptions): void
⚠️ Deprecated: undefined
Parameters
- eventDestination
IEvent
Destination - options
Extension
Options
Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the environment.
DeploymentRolledBack(eventDestination, options?)
onpublic onDeploymentRolledBack(eventDestination: IEventDestination, options?: ExtensionOptions): void
⚠️ Deprecated: undefined
Parameters
- eventDestination
IEvent
Destination - options
Extension
Options
Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the environment.
DeploymentStart(eventDestination, options?)
onpublic onDeploymentStart(eventDestination: IEventDestination, options?: ExtensionOptions): void
⚠️ Deprecated: undefined
Parameters
- eventDestination
IEvent
Destination - options
Extension
Options
Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the environment.
DeploymentStep(eventDestination, options?)
onpublic onDeploymentStep(eventDestination: IEventDestination, options?: ExtensionOptions): void
⚠️ Deprecated: undefined
Parameters
- eventDestination
IEvent
Destination - options
Extension
Options
Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the environment.
CreateHostedConfigurationVersion(eventDestination, options?)
prepublic preCreateHostedConfigurationVersion(eventDestination: IEventDestination, options?: ExtensionOptions): void
⚠️ Deprecated: undefined
Parameters
- eventDestination
IEvent
Destination - options
Extension
Options
Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to the environment.
StartDeployment(eventDestination, options?)
prepublic preStartDeployment(eventDestination: IEventDestination, options?: ExtensionOptions): void
⚠️ Deprecated: undefined
Parameters
- eventDestination
IEvent
Destination - options
Extension
Options
Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the environment.
String()
topublic toString(): string
⚠️ Deprecated: undefined
Returns
string
Returns a string representation of this construct.
EnvironmentArn(scope, id, environmentArn)
static frompublic static fromEnvironmentArn(scope: Construct, id: string, environmentArn: string): IEnvironment
⚠️ Deprecated: undefined
Parameters
- scope
Construct
— The parent construct. - id
string
— The name of the environment construct. - environmentArn
string
— The Amazon Resource Name (ARN) of the environment.
Returns
Imports an environment into the CDK using its Amazon Resource Name (ARN).
EnvironmentAttributes(scope, id, attrs)
static frompublic static fromEnvironmentAttributes(scope: Construct, id: string, attrs: EnvironmentAttributes): IEnvironment
⚠️ Deprecated: undefined
Parameters
- scope
Construct
— The parent construct. - id
string
— The name of the environment construct. - attrs
Environment
— The attributes of the environment.Attributes
Returns
Imports an environment into the CDK from its attributes.