CfnEnvironmentProps Struct
Properties for defining a CfnEnvironment.
| Source | |
|---|---|
| Type last changed |
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';
const cfnEnvironmentProps: appconfig.CfnEnvironmentProps = {
applicationId: 'applicationId',
name: 'name',
// the properties below are optional
deletionProtectionCheck: 'deletionProtectionCheck',
description: 'description',
monitors: [{
alarmArn: 'alarmArn',
alarmRoleArn: 'alarmRoleArn',
}],
tags: [{
key: 'key',
value: 'value',
}],
};
python
from aws_cdk import CfnTag
# 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
cfn_environment_props = appconfig.CfnEnvironmentProps(
application_id="applicationId",
name="name",
# the properties below are optional
deletion_protection_check="deletionProtectionCheck",
description="description",
monitors=[appconfig.CfnEnvironment.MonitorsProperty(
alarm_arn="alarmArn",
alarm_role_arn="alarmRoleArn"
)],
tags=[CfnTag(
key="key",
value="value"
)]
)
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.*;
CfnEnvironmentProps cfnEnvironmentProps = CfnEnvironmentProps.builder()
.applicationId("applicationId")
.name("name")
// the properties below are optional
.deletionProtectionCheck("deletionProtectionCheck")
.description("description")
.monitors(List.of(MonitorsProperty.builder()
.alarmArn("alarmArn")
.alarmRoleArn("alarmRoleArn")
.build()))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.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;
var cfnEnvironmentProps = new CfnEnvironmentProps {
ApplicationId = "applicationId",
Name = "name",
// the properties below are optional
DeletionProtectionCheck = "deletionProtectionCheck",
Description = "description",
Monitors = new [] { new MonitorsProperty {
AlarmArn = "alarmArn",
AlarmRoleArn = "alarmRoleArn"
} },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
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"
cfnEnvironmentProps := &CfnEnvironmentProps{
ApplicationId: jsii.String("applicationId"),
Name: jsii.String("name"),
// the properties below are optional
DeletionProtectionCheck: jsii.String("deletionProtectionCheck"),
Description: jsii.String("description"),
Monitors: []interface{}{
&MonitorsProperty{
AlarmArn: jsii.String("alarmArn"),
AlarmRoleArn: jsii.String("alarmRoleArn"),
},
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
applicationIdstring | IApplicationRefapplication_idtyping.Union[str, IApplicationRef]applicationIdStringApplicationIdstringApplicationIdinterface{} required #The application ID.
deletionProtectionCheckoptionalstringdeletion_protection_checkoptionalstrdeletionProtectionCheckoptionalStringDeletionProtectionCheckoptionalstringDeletionProtectionCheckoptional*string #A parameter to configure deletion protection.
notes
Deletion protection prevents a user from deleting an environment if your application called either GetLatestConfiguration or GetConfiguration in the environment during the specified interval.
This parameter supports the following values:
BYPASS: Instructs AWS AppConfig to bypass the deletion protection check and delete a configuration profile even if deletion protection would have otherwise prevented it.APPLY: Instructs the deletion protection check to run, even if deletion protection is disabled at the account level.APPLYalso forces the deletion protection check to run against resources created in the past hour, which are normally excluded from deletion protection checks.ACCOUNT_DEFAULT: The default setting, which instructs AWS AppConfig to implement the deletion protection value specified in theUpdateAccountSettingsAPI.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #A description of the environment.
monitorsoptionalIResolvable | IResolvable | CfnEnvironment.MonitorsProperty[]monitorsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MonitorsProperty]]]monitorsoptionalIResolvableMonitorsoptionalIResolvableMonitorsoptionalinterface{} #Amazon CloudWatch alarms to monitor during the deployment process.
A name for the environment.