> **Experimental**
>
> `@aws-cdk/aws-cloud9-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# Ec2EnvironmentProps

Properties for Ec2Environment.

Extends: Ec2EnvironmentProps
Used as props by: Ec2Environment

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/environment.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-cloud9-alpha/lib/environment.ts#L72)

## Example

```ts
import * as iam from 'aws-cdk-lib/aws-iam';

const user = new iam.User(this, 'user');
user.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AWSCloud9Administrator'));
declare const vpc: ec2.Vpc;
new cloud9.Ec2Environment(this, 'C9Env', {
  vpc,
  imageId: cloud9.ImageId.AMAZON_LINUX_2,

  owner: cloud9.Owner.user(user)
})
```

## Properties

- `automaticStop`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = The instance will not be shut down automatically. — The number of minutes until the running instance is shut down after the environment was last used.

  Setting a value of 0 means the instance will never be automatically shut down."

  **Default:** The instance will not be shut down automatically.

- `clonedRepositories`: [CloneRepository](/cdk/api/v2/docs/@aws-cdk_aws-cloud9-alpha.CloneRepository.html)[] = do not clone any repository — The AWS CodeCommit repository to be cloned.

- `connectionType`: [ConnectionType](/cdk/api/v2/docs/@aws-cdk_aws-cloud9-alpha.ConnectionType.html) = CONNECT_SSH — The connection type used for connecting to an Amazon EC2 environment.

  Valid values are: CONNECT_SSH (default) and CONNECT_SSM (connected through AWS Systems Manager)

- `description`: string = no description — Description of the environment.

- `ec2EnvironmentName`: string = automatically generated name — Name of the environment.

- `imageId`: [ImageId](/cdk/api/v2/docs/@aws-cdk_aws-cloud9-alpha.ImageId.html) (required) — The image ID used for creating an Amazon EC2 environment.

- `instanceType`: [InstanceType](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.InstanceType.html) = t2.micro — The type of instance to connect to the environment.

- `owner`: [Owner](/cdk/api/v2/docs/@aws-cdk_aws-cloud9-alpha.Owner.html) = The identity that CloudFormation executes under will be the owner — Owner of the environment.

  The owner has full control of the environment and can invite additional members.

  **Default:** The identity that CloudFormation executes under will be the owner

- `subnetSelection`: [SubnetSelection](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.SubnetSelection.html) = all public subnets of the VPC are selected. — The subnetSelection of the VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.

  **Default:** all public subnets of the VPC are selected.

- `vpc`: [IVpc](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html) (required) — The VPC that AWS Cloud9 will use to communicate with the Amazon Elastic Compute Cloud (Amazon EC2) instance.
