Skip to content
v2.277.0

CfnEnvironmentProps Struct ​

Properties for defining a CfnEnvironment.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_m2 as m2 } from 'aws-cdk-lib';
const cfnEnvironmentProps: m2.CfnEnvironmentProps = {
  engineType: 'engineType',
  instanceType: 'instanceType',
  name: 'name',

  // the properties below are optional
  description: 'description',
  engineVersion: 'engineVersion',
  highAvailabilityConfig: {
    desiredCapacity: 123,
  },
  kmsKeyId: 'kmsKeyId',
  networkType: 'networkType',
  preferredMaintenanceWindow: 'preferredMaintenanceWindow',
  publiclyAccessible: false,
  securityGroupIds: ['securityGroupIds'],
  storageConfigurations: [{
    efs: {
      fileSystemId: 'fileSystemId',
      mountPoint: 'mountPoint',
    },
    fsx: {
      fileSystemId: 'fileSystemId',
      mountPoint: 'mountPoint',
    },
  }],
  subnetIds: ['subnetIds'],
  tags: {
    tagsKey: 'tags',
  },
};
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_m2 as m2

cfn_environment_props = m2.CfnEnvironmentProps(
    engine_type="engineType",
    instance_type="instanceType",
    name="name",

    # the properties below are optional
    description="description",
    engine_version="engineVersion",
    high_availability_config=m2.CfnEnvironment.HighAvailabilityConfigProperty(
        desired_capacity=123
    ),
    kms_key_id="kmsKeyId",
    network_type="networkType",
    preferred_maintenance_window="preferredMaintenanceWindow",
    publicly_accessible=False,
    security_group_ids=["securityGroupIds"],
    storage_configurations=[m2.CfnEnvironment.StorageConfigurationProperty(
        efs=m2.CfnEnvironment.EfsStorageConfigurationProperty(
            file_system_id="fileSystemId",
            mount_point="mountPoint"
        ),
        fsx=m2.CfnEnvironment.FsxStorageConfigurationProperty(
            file_system_id="fileSystemId",
            mount_point="mountPoint"
        )
    )],
    subnet_ids=["subnetIds"],
    tags={
        "tags_key": "tags"
    }
)
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.m2.*;

CfnEnvironmentProps cfnEnvironmentProps = CfnEnvironmentProps.builder()
        .engineType("engineType")
        .instanceType("instanceType")
        .name("name")

        // the properties below are optional
        .description("description")
        .engineVersion("engineVersion")
        .highAvailabilityConfig(HighAvailabilityConfigProperty.builder()
                .desiredCapacity(123)
                .build())
        .kmsKeyId("kmsKeyId")
        .networkType("networkType")
        .preferredMaintenanceWindow("preferredMaintenanceWindow")
        .publiclyAccessible(false)
        .securityGroupIds(List.of("securityGroupIds"))
        .storageConfigurations(List.of(StorageConfigurationProperty.builder()
                .efs(EfsStorageConfigurationProperty.builder()
                        .fileSystemId("fileSystemId")
                        .mountPoint("mountPoint")
                        .build())
                .fsx(FsxStorageConfigurationProperty.builder()
                        .fileSystemId("fileSystemId")
                        .mountPoint("mountPoint")
                        .build())
                .build()))
        .subnetIds(List.of("subnetIds"))
        .tags(Map.of(
                "tagsKey", "tags"))
        .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.M2;

var cfnEnvironmentProps = new CfnEnvironmentProps {
    EngineType = "engineType",
    InstanceType = "instanceType",
    Name = "name",

    // the properties below are optional
    Description = "description",
    EngineVersion = "engineVersion",
    HighAvailabilityConfig = new HighAvailabilityConfigProperty {
        DesiredCapacity = 123
    },
    KmsKeyId = "kmsKeyId",
    NetworkType = "networkType",
    PreferredMaintenanceWindow = "preferredMaintenanceWindow",
    PubliclyAccessible = false,
    SecurityGroupIds = new [] { "securityGroupIds" },
    StorageConfigurations = new [] { new StorageConfigurationProperty {
        Efs = new EfsStorageConfigurationProperty {
            FileSystemId = "fileSystemId",
            MountPoint = "mountPoint"
        },
        Fsx = new FsxStorageConfigurationProperty {
            FileSystemId = "fileSystemId",
            MountPoint = "mountPoint"
        }
    } },
    SubnetIds = new [] { "subnetIds" },
    Tags = new Dictionary<string, string> {
        { "tagsKey", "tags" }
    }
};
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{
	EngineType: jsii.String("engineType"),
	InstanceType: jsii.String("instanceType"),
	Name: jsii.String("name"),

	// the properties below are optional
	Description: jsii.String("description"),
	EngineVersion: jsii.String("engineVersion"),
	HighAvailabilityConfig: &HighAvailabilityConfigProperty{
		DesiredCapacity: jsii.Number(123),
	},
	KmsKeyId: jsii.String("kmsKeyId"),
	NetworkType: jsii.String("networkType"),
	PreferredMaintenanceWindow: jsii.String("preferredMaintenanceWindow"),
	PubliclyAccessible: jsii.Boolean(false),
	SecurityGroupIds: []*string{
		jsii.String("securityGroupIds"),
	},
	StorageConfigurations: []interface{}{
		&StorageConfigurationProperty{
			Efs: &EfsStorageConfigurationProperty{
				FileSystemId: jsii.String("fileSystemId"),
				MountPoint: jsii.String("mountPoint"),
			},
			Fsx: &FsxStorageConfigurationProperty{
				FileSystemId: jsii.String("fileSystemId"),
				MountPoint: jsii.String("mountPoint"),
			},
		},
	},
	SubnetIds: []*string{
		jsii.String("subnetIds"),
	},
	Tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
}

Properties ​

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
The description of the runtime environment.
engineTypestringengine_typestrengineTypeStringEngineTypestringEngineType*stringrequired#
The target platform for the runtime environment.
engineVersionoptionalstringengine_versionoptionalstrengineVersionoptionalStringEngineVersionoptionalstringEngineVersionoptional*string#
The version of the runtime engine.
highAvailabilityConfigoptionalIResolvable | CfnEnvironment.HighAvailabilityConfigPropertyhigh_availability_configoptionaltyping.Union[IResolvable, HighAvailabilityConfigProperty]highAvailabilityConfigoptionalIResolvableHighAvailabilityConfigoptionalIResolvableHighAvailabilityConfigoptionalinterface{}#
> AWS Mainframe Modernization Service (Managed Runtime Environment experience) will no longer be open to new customers starting on November 7, 2025.
notes

If you would like to use the service, please sign up prior to November 7, 2025. For capabilities similar to AWS Mainframe Modernization Service (Managed Runtime Environment experience) explore AWS Mainframe Modernization Service (Self-Managed Experience). Existing customers can continue to use the service as normal. For more information, see AWS Mainframe Modernization availability change .

Defines the details of a high availability configuration.

instanceTypestringinstance_typestrinstanceTypeStringInstanceTypestringInstanceType*stringrequired#
The instance type of the runtime environment.
kmsKeyIdoptionalstringkms_key_idoptionalstrkmsKeyIdoptionalStringKmsKeyIdoptionalstringKmsKeyIdoptional*string#
The identifier of a customer managed key.
namestringnamestrnameStringNamestringName*stringrequired#
The name of the runtime environment.
networkTypeoptionalstringnetwork_typeoptionalstrnetworkTypeoptionalStringNetworkTypeoptionalstringNetworkTypeoptional*string#
The network type supported by the runtime environment.
preferredMaintenanceWindowoptionalstringpreferred_maintenance_windowoptionalstrpreferredMaintenanceWindowoptionalStringPreferredMaintenanceWindowoptionalstringPreferredMaintenanceWindowoptional*string#
Configures the maintenance window that you want for the runtime environment.
notes

The maintenance window must have the format ddd:hh24:mi-ddd:hh24:mi and must be less than 24 hours. The following two examples are valid maintenance windows: sun:23:45-mon:00:15 or sat:01:00-sat:03:00 .

If you do not provide a value, a random system-generated value will be assigned.

publiclyAccessibleoptionalboolean | IResolvablepublicly_accessibleoptionaltyping.Union[bool, IResolvable]publiclyAccessibleoptionalBooleanPubliclyAccessibleoptionalboolPubliclyAccessibleoptionalinterface{}#
Specifies whether the runtime environment is publicly accessible.
securityGroupIdsoptionalstring[]security_group_idsoptionaltyping.List[str]securityGroupIdsoptionalList<String>SecurityGroupIdsoptionalstring[]SecurityGroupIdsoptional*[]*string#
The list of security groups for the VPC associated with this runtime environment.
storageConfigurationsoptionalIResolvable | IResolvable | CfnEnvironment.StorageConfigurationProperty[]storage_configurationsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, StorageConfigurationProperty]]]storageConfigurationsoptionalIResolvableStorageConfigurationsoptionalIResolvableStorageConfigurationsoptionalinterface{}#
> AWS Mainframe Modernization Service (Managed Runtime Environment experience) will no longer be open to new customers starting on November 7, 2025.
notes

If you would like to use the service, please sign up prior to November 7, 2025. For capabilities similar to AWS Mainframe Modernization Service (Managed Runtime Environment experience) explore AWS Mainframe Modernization Service (Self-Managed Experience). Existing customers can continue to use the service as normal. For more information, see AWS Mainframe Modernization availability change .

Defines the storage configuration for a runtime environment.

subnetIdsoptionalstring[]subnet_idsoptionaltyping.List[str]subnetIdsoptionalList<String>SubnetIdsoptionalstring[]SubnetIdsoptional*[]*string#
The list of subnets associated with the VPC for this runtime environment.
tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string#
An array of key-value pairs to apply to this resource.

For more information, see Tag .