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.116.0 (build 0eddcff)",
date="2025-10-24T13:34:30.700Z")
@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, "MyFirstHostedConfig")
.application(app)
.deployTo(List.of(env))
.content(ConfigurationContent.fromInlineText("This is my first configuration content."))
.build();
HostedConfiguration.Builder.create(this, "MySecondHostedConfig")
.application(app)
.deployTo(List.of(env))
.content(ConfigurationContent.fromInlineText("This is my second configuration content."))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.appconfig.IEnvironment
IEnvironment.Jsii$Default, IEnvironment.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.appconfig.IExtensible
IExtensible.Jsii$Default, IExtensible.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEnvironment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedEnvironment(software.amazon.jsii.JsiiObjectRef objRef) Environment(software.constructs.Construct scope, String id, EnvironmentProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDeployment(IConfiguration configuration) Creates a deployment of the supplied configuration to this environment.voidaddDeployments(IConfiguration... configurations) Creates a deployment for each of the supplied configurations to this environment.voidaddExtension(IExtension extension) Adds an extension association to the environment.voidatDeploymentTick(IEventDestination eventDestination) Adds an AT_DEPLOYMENT_TICK extension with the provided event destination and also creates an extension association to an application.voidatDeploymentTick(IEventDestination eventDestination, ExtensionOptions options) Adds an AT_DEPLOYMENT_TICK extension with the provided event destination and also creates an extension association to an application.static IEnvironmentfromEnvironmentArn(software.constructs.Construct scope, String id, String environmentArn) Imports an environment into the CDK using its Amazon Resource Name (ARN).static IEnvironmentfromEnvironmentAttributes(software.constructs.Construct scope, String id, EnvironmentAttributes attrs) Imports an environment into the CDK from its attributes.The application associated with the environment.The ID of the environment.protected List<CfnDeployment> The description of the environment.The Amazon Resource Name (ARN) of the environment.The ID of the environment.protected ExtensibleBaseThe monitors for the environment.getName()The name of the environment.grant(IGrantable grantee, String... actions) Adds an IAM policy statement associated with this environment to an IAM principal's policy.grantReadConfig(IGrantable identity) Permits an IAM principal to perform read operations on this environment's configurations.voidon(ActionPoint actionPoint, IEventDestination eventDestination) Adds an extension defined by the action point and event destination and also creates an extension association to the environment.voidon(ActionPoint actionPoint, IEventDestination eventDestination, ExtensionOptions options) Adds an extension defined by the action point and event destination and also creates an extension association to the environment.voidonDeploymentBaking(IEventDestination eventDestination) Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the environment.voidonDeploymentBaking(IEventDestination eventDestination, ExtensionOptions options) Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the environment.voidonDeploymentComplete(IEventDestination eventDestination) Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the environment.voidonDeploymentComplete(IEventDestination eventDestination, ExtensionOptions options) Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the environment.voidonDeploymentRolledBack(IEventDestination eventDestination) Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the environment.voidonDeploymentRolledBack(IEventDestination eventDestination, ExtensionOptions options) Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the environment.voidonDeploymentStart(IEventDestination eventDestination) Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the environment.voidonDeploymentStart(IEventDestination eventDestination, ExtensionOptions options) Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the environment.voidonDeploymentStep(IEventDestination eventDestination) Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the environment.voidonDeploymentStep(IEventDestination eventDestination, ExtensionOptions options) Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the environment.voidpreCreateHostedConfigurationVersion(IEventDestination eventDestination) Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to the environment.voidpreCreateHostedConfigurationVersion(IEventDestination eventDestination, ExtensionOptions options) Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to the environment.voidpreStartDeployment(IEventDestination eventDestination) Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the environment.voidpreStartDeployment(IEventDestination eventDestination, ExtensionOptions options) Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the environment.protected voidsetDeploymentQueue(List<CfnDeployment> value) protected voidsetExtensible(ExtensibleBase value) Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
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.
-
addDeployment
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.
- Specified by:
addDeploymentin interfaceIEnvironment- Parameters:
configuration- This parameter is required.
-
addDeployments
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.
- Specified by:
addDeploymentsin interfaceIEnvironment- Parameters:
configurations- This parameter is required.
-
addExtension
Adds an extension association to the environment.- Specified by:
addExtensionin interfaceIEnvironment- Specified by:
addExtensionin interfaceIExtensible- Parameters:
extension- This parameter is required.
-
atDeploymentTick
@Stability(Stable) public void atDeploymentTick(@NotNull IEventDestination eventDestination, @Nullable ExtensionOptions options) Adds an AT_DEPLOYMENT_TICK extension with the provided event destination and also creates an extension association to an application.- Specified by:
atDeploymentTickin interfaceIEnvironment- Specified by:
atDeploymentTickin interfaceIExtensible- Parameters:
eventDestination- This parameter is required.options-
-
atDeploymentTick
Adds an AT_DEPLOYMENT_TICK extension with the provided event destination and also creates an extension association to an application.- Specified by:
atDeploymentTickin interfaceIEnvironment- Specified by:
atDeploymentTickin interfaceIExtensible- Parameters:
eventDestination- This parameter is required.
-
grant
@Stability(Stable) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull String... actions) Adds an IAM policy statement associated with this environment to an IAM principal's policy.- Specified by:
grantin interfaceIEnvironment- Parameters:
grantee- This parameter is required.actions- This parameter is required.
-
grantReadConfig
Permits an IAM principal to perform read operations on this environment's configurations.Actions: GetLatestConfiguration, StartConfigurationSession.
- Specified by:
grantReadConfigin interfaceIEnvironment- Parameters:
identity- 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:
onin interfaceIEnvironment- Specified by:
onin interfaceIExtensible- 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:
onin interfaceIEnvironment- Specified by:
onin interfaceIExtensible- 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:
onDeploymentBakingin interfaceIEnvironment- Specified by:
onDeploymentBakingin interfaceIExtensible- Parameters:
eventDestination- This parameter is required.options-
-
onDeploymentBaking
Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the environment.- Specified by:
onDeploymentBakingin interfaceIEnvironment- Specified by:
onDeploymentBakingin interfaceIExtensible- 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:
onDeploymentCompletein interfaceIEnvironment- Specified by:
onDeploymentCompletein interfaceIExtensible- Parameters:
eventDestination- This parameter is required.options-
-
onDeploymentComplete
Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the environment.- Specified by:
onDeploymentCompletein interfaceIEnvironment- Specified by:
onDeploymentCompletein interfaceIExtensible- 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:
onDeploymentRolledBackin interfaceIEnvironment- Specified by:
onDeploymentRolledBackin interfaceIExtensible- Parameters:
eventDestination- This parameter is required.options-
-
onDeploymentRolledBack
Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the environment.- Specified by:
onDeploymentRolledBackin interfaceIEnvironment- Specified by:
onDeploymentRolledBackin interfaceIExtensible- 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:
onDeploymentStartin interfaceIEnvironment- Specified by:
onDeploymentStartin interfaceIExtensible- Parameters:
eventDestination- This parameter is required.options-
-
onDeploymentStart
Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the environment.- Specified by:
onDeploymentStartin interfaceIEnvironment- Specified by:
onDeploymentStartin interfaceIExtensible- 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:
onDeploymentStepin interfaceIEnvironment- Specified by:
onDeploymentStepin interfaceIExtensible- Parameters:
eventDestination- This parameter is required.options-
-
onDeploymentStep
Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the environment.- Specified by:
onDeploymentStepin interfaceIEnvironment- Specified by:
onDeploymentStepin interfaceIExtensible- 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:
preCreateHostedConfigurationVersionin interfaceIEnvironment- Specified by:
preCreateHostedConfigurationVersionin interfaceIExtensible- 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:
preCreateHostedConfigurationVersionin interfaceIEnvironment- Specified by:
preCreateHostedConfigurationVersionin interfaceIExtensible- 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:
preStartDeploymentin interfaceIEnvironment- Specified by:
preStartDeploymentin interfaceIExtensible- Parameters:
eventDestination- This parameter is required.options-
-
preStartDeployment
Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the environment.- Specified by:
preStartDeploymentin interfaceIEnvironment- Specified by:
preStartDeploymentin interfaceIExtensible- Parameters:
eventDestination- This parameter is required.
-
getApplicationId
The ID of the environment.- Specified by:
getApplicationIdin interfaceIEnvironment
-
getEnvironmentArn
The Amazon Resource Name (ARN) of the environment.- Specified by:
getEnvironmentArnin interfaceIEnvironment
-
getEnvironmentId
The ID of the environment.- Specified by:
getEnvironmentIdin interfaceIEnvironment
-
getApplication
The application associated with the environment.- Specified by:
getApplicationin interfaceIEnvironment
-
getDescription
The description of the environment.- Specified by:
getDescriptionin interfaceIEnvironment
-
getMonitors
The monitors for the environment.- Specified by:
getMonitorsin interfaceIEnvironment
-
getName
The name of the environment.- Specified by:
getNamein interfaceIEnvironment
-
getDeploymentQueue
-
setDeploymentQueue
-
getExtensible
-
setExtensible
-