# AWS::M2::Environment Represents a runtime environment that can run migrated mainframe applications. ## Syntax To declare this entity in your AWS CloudFormation template, use the following syntax: ### JSON
{ "Type" : "AWS::M2::Environment", "Properties" : { "Description" : String, "EngineType" : String, "EngineVersion" : String, "HighAvailabilityConfig" : HighAvailabilityConfig, "InstanceType" : String, "Name" : String, "PreferredMaintenanceWindow" : String, "PubliclyAccessible" : Boolean, "SecurityGroupIds" : [ String, ... ], "StorageConfigurations" : [ StorageConfiguration, ... ], "SubnetIds" : [ String, ... ], "Tags" : Tags } }### YAML
Type: AWS::M2::Environment Properties: Description: String EngineType: String EngineVersion: String HighAvailabilityConfig: HighAvailabilityConfig InstanceType: String Name: String PreferredMaintenanceWindow: String PubliclyAccessible: Boolean SecurityGroupIds: - String StorageConfigurations: - StorageConfiguration SubnetIds: - String Tags: Tags## Properties #### Description The description of the environment. _Required_: No _Type_: String _Maximum_:
500
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
#### EngineType
The target platform for the environment.
_Required_: Yes
_Type_: String
_Allowed Values_: microfocus
| bluage
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
#### EngineVersion
The version of the runtime engine for the environment.
_Required_: No
_Type_: String
_Pattern_: ^\S{1,10}$
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### HighAvailabilityConfig
Defines the details of a high availability configuration.
_Required_: No
_Type_: HighAvailabilityConfig
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### InstanceType
The type of instance underlying the environment.
_Required_: Yes
_Type_: String
_Pattern_: ^\S{1,20}$
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### Name
The name of the environment.
_Required_: Yes
_Type_: String
_Pattern_: ^[A-Za-z0-9][A-Za-z0-9_\-]{1,59}$
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
#### PreferredMaintenanceWindow
Configures a desired maintenance window for the environment. If you do not provide a value, a random system-generated value will be assigned.
_Required_: No
_Type_: String
_Pattern_: ^\S{1,50}$
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### PubliclyAccessible
Specifies whether the environment is publicly accessible.
_Required_: No
_Type_: Boolean
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
#### SecurityGroupIds
The list of security groups for the VPC associated with this environment.
_Required_: No
_Type_: List of String
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
#### StorageConfigurations
The storage configurations defined for the runtime environment.
_Required_: No
_Type_: List of StorageConfiguration
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
#### SubnetIds
The unique identifiers of the subnets assigned to this runtime environment.
_Required_: No
_Type_: List of String
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
#### Tags
Defines tags associated to an environment.
_Required_: No
_Type_: Tags
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
## Return Values
### Ref
When you pass the logical ID of this resource to the intrinsic `Ref` function, Ref returns the EnvironmentArn.
### Fn::GetAtt
The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the `Fn::GetAtt` intrinsic function, see [Fn::GetAtt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html).
#### EnvironmentArn
The Amazon Resource Name (ARN) of the runtime environment.
#### EnvironmentId
The unique identifier of the environment.