Class: AWSCDK::Cloud9::CfnEnvironmentEC2Props
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Cloud9::CfnEnvironmentEC2Props
- Defined in:
- cloud9/cfn_environment_ec2_props.rb
Overview
Properties for defining a CfnEnvironmentEC2.
Instance Attribute Summary collapse
-
#automatic_stop_time_minutes ⇒ Numeric?
readonly
The number of minutes until the running instance is shut down after the environment was last used.
-
#connection_type ⇒ String?
readonly
The connection type used for connecting to an Amazon EC2 environment.
-
#description ⇒ String?
readonly
The description of the environment to create.
-
#image_id ⇒ String
readonly
The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance.
-
#instance_type ⇒ String
readonly
The type of instance to connect to the environment (for example,
t2.micro). -
#name ⇒ String?
readonly
The name of the environment.
-
#owner_arn ⇒ String?
readonly
The Amazon Resource Name (ARN) of the environment owner.
-
#repositories ⇒ AWSCDK::IResolvable, ...
readonly
Any AWS CodeCommit source code repositories to be cloned into the development environment.
-
#subnet_id ⇒ String?
readonly
The ID of the subnet in Amazon Virtual Private Cloud (Amazon VPC) that AWS Cloud9 will use to communicate with the Amazon Elastic Compute Cloud (Amazon EC2) instance.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
An array of key-value pairs that will be associated with the new AWS Cloud9 development environment.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(image_id:, instance_type:, automatic_stop_time_minutes: nil, connection_type: nil, description: nil, name: nil, owner_arn: nil, repositories: nil, subnet_id: nil, tags: nil) ⇒ CfnEnvironmentEC2Props
constructor
A new instance of CfnEnvironmentEC2Props.
- #to_jsii ⇒ Object
Constructor Details
#initialize(image_id:, instance_type:, automatic_stop_time_minutes: nil, connection_type: nil, description: nil, name: nil, owner_arn: nil, repositories: nil, subnet_id: nil, tags: nil) ⇒ CfnEnvironmentEC2Props
Returns a new instance of CfnEnvironmentEC2Props.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'cloud9/cfn_environment_ec2_props.rb', line 19 def initialize(image_id:, instance_type:, automatic_stop_time_minutes: nil, connection_type: nil, description: nil, name: nil, owner_arn: nil, repositories: nil, subnet_id: nil, tags: nil) @image_id = image_id Jsii::Type.check_type(@image_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageId") @instance_type = instance_type Jsii::Type.check_type(@instance_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceType") @automatic_stop_time_minutes = automatic_stop_time_minutes Jsii::Type.check_type(@automatic_stop_time_minutes, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "automaticStopTimeMinutes") unless @automatic_stop_time_minutes.nil? @connection_type = connection_type Jsii::Type.check_type(@connection_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "connectionType") unless @connection_type.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @owner_arn = owner_arn Jsii::Type.check_type(@owner_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ownerArn") unless @owner_arn.nil? @repositories = repositories Jsii::Type.check_type(@repositories, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWQ5LkNmbkVudmlyb25tZW50RUMyLlJlcG9zaXRvcnlQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "repositories") unless @repositories.nil? @subnet_id = subnet_id Jsii::Type.check_type(@subnet_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subnetId") unless @subnet_id.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#automatic_stop_time_minutes ⇒ Numeric? (readonly)
The number of minutes until the running instance is shut down after the environment was last used.
76 77 78 |
# File 'cloud9/cfn_environment_ec2_props.rb', line 76 def automatic_stop_time_minutes @automatic_stop_time_minutes end |
#connection_type ⇒ String? (readonly)
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 ).
83 84 85 |
# File 'cloud9/cfn_environment_ec2_props.rb', line 83 def connection_type @connection_type end |
#description ⇒ String? (readonly)
The description of the environment to create.
88 89 90 |
# File 'cloud9/cfn_environment_ec2_props.rb', line 88 def description @description end |
#image_id ⇒ String (readonly)
The identifier for the Amazon Machine Image (AMI) that's used to create the EC2 instance.
To choose an AMI for the instance, you must specify a valid AMI alias or a valid AWS Systems Manager path.
From December 04, 2023, you will be required to include the ImageId parameter for the CreateEnvironmentEC2 action. This change will be reflected across all direct methods of communicating with the API, such as AWS SDK, AWS CLI and AWS CloudFormation. This change will only affect direct API consumers, and not AWS Cloud9 console users.
Since Ubuntu 18.04 has ended standard support as of May 31, 2023, we recommend you choose Ubuntu 22.04.
AMI aliases
- Amazon Linux 2:
amazonlinux-2-x86_64 - Amazon Linux 2023 (recommended):
amazonlinux-2023-x86_64 - Ubuntu 18.04:
ubuntu-18.04-x86_64 - Ubuntu 22.04:
ubuntu-22.04-x86_64
SSM paths
- Amazon Linux 2:
resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2-x86_64 - Amazon Linux 2023 (recommended):
resolve:ssm:/aws/service/cloud9/amis/amazonlinux-2023-x86_64 - Ubuntu 18.04:
resolve:ssm:/aws/service/cloud9/amis/ubuntu-18.04-x86_64 - Ubuntu 22.04:
resolve:ssm:/aws/service/cloud9/amis/ubuntu-22.04-x86_64
66 67 68 |
# File 'cloud9/cfn_environment_ec2_props.rb', line 66 def image_id @image_id end |
#instance_type ⇒ String (readonly)
The type of instance to connect to the environment (for example, t2.micro ).
71 72 73 |
# File 'cloud9/cfn_environment_ec2_props.rb', line 71 def instance_type @instance_type end |
#name ⇒ String? (readonly)
The name of the environment.
93 94 95 |
# File 'cloud9/cfn_environment_ec2_props.rb', line 93 def name @name end |
#owner_arn ⇒ String? (readonly)
The Amazon Resource Name (ARN) of the environment owner.
This ARN can be the ARN of any AWS Identity and Access Management principal. If this value is not specified, the ARN defaults to this environment's creator.
100 101 102 |
# File 'cloud9/cfn_environment_ec2_props.rb', line 100 def owner_arn @owner_arn end |
#repositories ⇒ AWSCDK::IResolvable, ... (readonly)
Any AWS CodeCommit source code repositories to be cloned into the development environment.
105 106 107 |
# File 'cloud9/cfn_environment_ec2_props.rb', line 105 def repositories @repositories end |
#subnet_id ⇒ String? (readonly)
The ID of the subnet in Amazon Virtual Private Cloud (Amazon VPC) that AWS Cloud9 will use to communicate with the Amazon Elastic Compute Cloud (Amazon EC2) instance.
110 111 112 |
# File 'cloud9/cfn_environment_ec2_props.rb', line 110 def subnet_id @subnet_id end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
An array of key-value pairs that will be associated with the new AWS Cloud9 development environment.
115 116 117 |
# File 'cloud9/cfn_environment_ec2_props.rb', line 115 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'cloud9/cfn_environment_ec2_props.rb', line 117 def self.jsii_properties { :image_id => "imageId", :instance_type => "instanceType", :automatic_stop_time_minutes => "automaticStopTimeMinutes", :connection_type => "connectionType", :description => "description", :name => "name", :owner_arn => "ownerArn", :repositories => "repositories", :subnet_id => "subnetId", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'cloud9/cfn_environment_ec2_props.rb', line 132 def to_jsii result = {} result.merge!({ "imageId" => @image_id, "instanceType" => @instance_type, "automaticStopTimeMinutes" => @automatic_stop_time_minutes, "connectionType" => @connection_type, "description" => @description, "name" => @name, "ownerArn" => @owner_arn, "repositories" => @repositories, "subnetId" => @subnet_id, "tags" => @tags, }) result.compact end |