EnvironmentProps Struct
Properties for the Environment construct.
| Source | aws-appconfig/lib/environment.ts |
|---|---|
| Type last changed |
Example
ts
const app = new appconfig.Application(this, 'MyApp');
const env = new appconfig.Environment(this, 'MyEnv', {
application: app,
});
new appconfig.HostedConfiguration(this, 'MyFirstHostedConfig', {
application: app,
deployTo: [env],
content: appconfig.ConfigurationContent.fromInlineText('This is my first configuration content.'),
});
new appconfig.HostedConfiguration(this, 'MySecondHostedConfig', {
application: app,
deployTo: [env],
content: appconfig.ConfigurationContent.fromInlineText('This is my second configuration content.'),
});
python
app = appconfig.Application(self, "MyApp")
env = appconfig.Environment(self, "MyEnv",
application=app
)
appconfig.HostedConfiguration(self, "MyFirstHostedConfig",
application=app,
deploy_to=[env],
content=appconfig.ConfigurationContent.from_inline_text("This is my first configuration content.")
)
appconfig.HostedConfiguration(self, "MySecondHostedConfig",
application=app,
deploy_to=[env],
content=appconfig.ConfigurationContent.from_inline_text("This is my second configuration content.")
)
java
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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
var app = new Application(this, "MyApp");
var env = new Environment(this, "MyEnv", new EnvironmentProps {
Application = app
});
new HostedConfiguration(this, "MyFirstHostedConfig", new HostedConfigurationProps {
Application = app,
DeployTo = new [] { env },
Content = ConfigurationContent.FromInlineText("This is my first configuration content.")
});
new HostedConfiguration(this, "MySecondHostedConfig", new HostedConfigurationProps {
Application = app,
DeployTo = new [] { env },
Content = ConfigurationContent.FromInlineText("This is my second configuration content.")
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
app := appconfig.NewApplication(this, jsii.String("MyApp"))
env := appconfig.NewEnvironment(this, jsii.String("MyEnv"), &EnvironmentProps{
Application: app,
})
appconfig.NewHostedConfiguration(this, jsii.String("MyFirstHostedConfig"), &HostedConfigurationProps{
Application: app,
DeployTo: []IEnvironment{
env,
},
Content: appconfig.ConfigurationContent_FromInlineText(jsii.String("This is my first configuration content.")),
})
appconfig.NewHostedConfiguration(this, jsii.String("MySecondHostedConfig"), &HostedConfigurationProps{
Application: app,
DeployTo: []IEnvironment{
env,
},
Content: appconfig.ConfigurationContent_*FromInlineText(jsii.String("This is my second configuration content.")),
})
Properties
applicationIApplicationapplicationIApplicationapplicationIApplicationApplicationIApplicationApplicationIApplication required #The application to be associated with the environment.
deletionProtectionCheckoptionalDeletionProtectionCheckdeletion_protection_checkoptionalDeletionProtectionCheckdeletionProtectionCheckoptionalDeletionProtectionCheckDeletionProtectionCheckoptionalDeletionProtectionCheckDeletionProtectionCheckoptionalDeletionProtectionCheck #A property to prevent accidental deletion of active environments.
Default: undefined - AppConfig default is ACCOUNT_DEFAULT
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #The description of the environment.
Default: No description.
environmentNameoptionalstringenvironment_nameoptionalstrenvironmentNameoptionalStringEnvironmentNameoptionalstringEnvironmentNameoptional*string #The name of the environment.
Default: A name is generated.