createEnvironmentEc2

Creates an Cloud9 development environment, launches an Amazon Elastic Compute Cloud (Amazon EC2) instance, and then connects from the instance to the environment.

Samples


fun main() { 
   //sampleStart 
   val resp = cloud9Client.createEnvironmentEc2 {
    name = "my-demo-environment"
    description = "This is my demonstration environment."
    instanceType = "t2.micro"
    imageId = "amazonlinux-2023-x86_64"
    subnetId = "subnet-6300cd1b"
    automaticStopTimeMinutes = 60
    ownerArn = "arn:aws:iam::123456789012:user/MyDemoUser"
} 
   //sampleEnd
}