# EnvironmentEC2Reference

A reference to a EnvironmentEC2 resource.

- Source: Generated at build time
- Type last changed: v2.273.0 · 8 Oct 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloud9 as interfaces_cloud9 } from 'aws-cdk-lib/interfaces';
const environmentEC2Reference: interfaces_cloud9.EnvironmentEC2Reference = {
  environmentEc2Arn: 'environmentEc2Arn',
  environmentId: 'environmentId',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.interfaces import aws_cloud9 as interfaces_cloud9

environment_ec2_reference = interfaces_cloud9.EnvironmentEC2Reference(
    environment_ec2_arn="environmentEc2Arn",
    environment_id="environmentId"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.interfaces.cloud9.*;

EnvironmentEC2Reference environmentEC2Reference = EnvironmentEC2Reference.builder()
        .environmentEc2Arn("environmentEc2Arn")
        .environmentId("environmentId")
        .build();
```

C# / .NET:

```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.Interfaces.Cloud9;

var environmentEC2Reference = new EnvironmentEC2Reference {
    EnvironmentEc2Arn = "environmentEc2Arn",
    EnvironmentId = "environmentId"
};
```

Golang:

```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"

environmentEC2Reference := &EnvironmentEC2Reference{
	EnvironmentEc2Arn: jsii.String("environmentEc2Arn"),
	EnvironmentId: jsii.String("environmentId"),
}
```

## Properties

- `environmentEc2Arn`: string (required) — The ARN of the EnvironmentEC2 resource.

- `environmentId`: string (required) — The EnvironmentId of the EnvironmentEC2 resource.
