Skip to content
v2.277.0

EnvironmentOptions Struct ​

Options for the Environment construct.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appconfig as appconfig } from 'aws-cdk-lib';

declare const monitor: appconfig.Monitor;
const environmentOptions: appconfig.EnvironmentOptions = {
  deletionProtectionCheck: appconfig.DeletionProtectionCheck.ACCOUNT_DEFAULT,
  description: 'description',
  environmentName: 'environmentName',
  monitors: [monitor],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appconfig as appconfig

# monitor: appconfig.Monitor

environment_options = appconfig.EnvironmentOptions(
    deletion_protection_check=appconfig.DeletionProtectionCheck.ACCOUNT_DEFAULT,
    description="description",
    environment_name="environmentName",
    monitors=[monitor]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appconfig.*;

Monitor monitor;

EnvironmentOptions environmentOptions = EnvironmentOptions.builder()
        .deletionProtectionCheck(DeletionProtectionCheck.ACCOUNT_DEFAULT)
        .description("description")
        .environmentName("environmentName")
        .monitors(List.of(monitor))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppConfig;

Monitor monitor;

var environmentOptions = new EnvironmentOptions {
    DeletionProtectionCheck = DeletionProtectionCheck.ACCOUNT_DEFAULT,
    Description = "description",
    EnvironmentName = "environmentName",
    Monitors = new [] { monitor }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var monitor Monitor

environmentOptions := &EnvironmentOptions{
	DeletionProtectionCheck: awscdk.Aws_appconfig.DeletionProtectionCheck_ACCOUNT_DEFAULT,
	Description: jsii.String("description"),
	EnvironmentName: jsii.String("environmentName"),
	Monitors: []Monitor{
		monitor,
	},
}

Properties ​

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.

monitorsoptionalMonitor[]monitorsoptionaltyping.List[Monitor]monitorsoptionalList<Monitor>MonitorsoptionalMonitor[]Monitorsoptional*[]Monitor #
The monitors for the environment.

Default: No monitors.