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.104.0 (build e79254c)",
date="2024-12-11T23:26:28.271Z")
@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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.appconfig.IEnvironment
IEnvironment.Jsii$Default, IEnvironment.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.appconfig.IExtensible
IExtensible.Jsii$Default, IExtensible.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
Environment
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
Environment
(software.amazon.jsii.JsiiObjectRef objRef) Environment
(software.constructs.Construct scope, String id, EnvironmentProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDeployment
(IConfiguration configuration) Creates a deployment of the supplied configuration to this environment.void
addDeployments
(@NotNull IConfiguration... configurations) Creates a deployment for each of the supplied configurations to this environment.void
addExtension
(IExtension extension) Adds an extension association to the environment.static IEnvironment
fromEnvironmentArn
(software.constructs.Construct scope, String id, String environmentArn) Imports an environment into the CDK using its Amazon Resource Name (ARN).static IEnvironment
fromEnvironmentAttributes
(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 ExtensibleBase
The monitors for the environment.getName()
The name of the environment.grant
(IGrantable grantee, @NotNull 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.void
on
(ActionPoint actionPoint, IEventDestination eventDestination) Adds an extension defined by the action point and event destination and also creates an extension association to the environment.void
on
(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.void
onDeploymentBaking
(IEventDestination eventDestination) Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the environment.void
onDeploymentBaking
(IEventDestination eventDestination, ExtensionOptions options) Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the environment.void
onDeploymentComplete
(IEventDestination eventDestination) Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the environment.void
onDeploymentComplete
(IEventDestination eventDestination, ExtensionOptions options) Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the environment.void
onDeploymentRolledBack
(IEventDestination eventDestination) Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the environment.void
onDeploymentRolledBack
(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.void
onDeploymentStart
(IEventDestination eventDestination) Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the environment.void
onDeploymentStart
(IEventDestination eventDestination, ExtensionOptions options) Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the environment.void
onDeploymentStep
(IEventDestination eventDestination) Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the environment.void
onDeploymentStep
(IEventDestination eventDestination, ExtensionOptions options) Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the environment.void
preCreateHostedConfigurationVersion
(IEventDestination eventDestination) Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to the environment.void
preCreateHostedConfigurationVersion
(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.void
preStartDeployment
(IEventDestination eventDestination) Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the environment.void
preStartDeployment
(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 void
setDeploymentQueue
(List<CfnDeployment> value) protected void
setExtensible
(ExtensibleBase value) Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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:
addDeployment
in 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:
addDeployments
in interfaceIEnvironment
- Parameters:
configurations
- This parameter is required.
-
addExtension
Adds an extension association to the environment.- Specified by:
addExtension
in interfaceIEnvironment
- Specified by:
addExtension
in interfaceIExtensible
- Parameters:
extension
- This parameter is required.
-
grant
@Stability(Stable) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull @NotNull String... actions) Adds an IAM policy statement associated with this environment to an IAM principal's policy.- Specified by:
grant
in 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:
grantReadConfig
in 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:
on
in interfaceIEnvironment
- Specified by:
on
in 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:
on
in interfaceIEnvironment
- Specified by:
on
in 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:
onDeploymentBaking
in interfaceIEnvironment
- Specified by:
onDeploymentBaking
in 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:
onDeploymentBaking
in interfaceIEnvironment
- Specified by:
onDeploymentBaking
in 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:
onDeploymentComplete
in interfaceIEnvironment
- Specified by:
onDeploymentComplete
in 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:
onDeploymentComplete
in interfaceIEnvironment
- Specified by:
onDeploymentComplete
in 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:
onDeploymentRolledBack
in interfaceIEnvironment
- Specified by:
onDeploymentRolledBack
in 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:
onDeploymentRolledBack
in interfaceIEnvironment
- Specified by:
onDeploymentRolledBack
in 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:
onDeploymentStart
in interfaceIEnvironment
- Specified by:
onDeploymentStart
in 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:
onDeploymentStart
in interfaceIEnvironment
- Specified by:
onDeploymentStart
in 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:
onDeploymentStep
in interfaceIEnvironment
- Specified by:
onDeploymentStep
in 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:
onDeploymentStep
in interfaceIEnvironment
- Specified by:
onDeploymentStep
in 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:
preCreateHostedConfigurationVersion
in interfaceIEnvironment
- Specified by:
preCreateHostedConfigurationVersion
in 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:
preCreateHostedConfigurationVersion
in interfaceIEnvironment
- Specified by:
preCreateHostedConfigurationVersion
in 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:
preStartDeployment
in interfaceIEnvironment
- Specified by:
preStartDeployment
in 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:
preStartDeployment
in interfaceIEnvironment
- Specified by:
preStartDeployment
in interfaceIExtensible
- Parameters:
eventDestination
- This parameter is required.
-
getApplicationId
The ID of the environment.- Specified by:
getApplicationId
in interfaceIEnvironment
-
getEnvironmentArn
The Amazon Resource Name (ARN) of the environment.- Specified by:
getEnvironmentArn
in interfaceIEnvironment
-
getEnvironmentId
The ID of the environment.- Specified by:
getEnvironmentId
in interfaceIEnvironment
-
getApplication
The application associated with the environment.- Specified by:
getApplication
in interfaceIEnvironment
-
getDescription
The description of the environment.- Specified by:
getDescription
in interfaceIEnvironment
-
getMonitors
The monitors for the environment.- Specified by:
getMonitors
in interfaceIEnvironment
-
getName
The name of the environment.- Specified by:
getName
in interfaceIEnvironment
-
getDeploymentQueue
-
setDeploymentQueue
-
getExtensible
-
setExtensible
-