Class: AWSCDK::Batch::CfnComputeEnvironment::LaunchTemplateSpecificationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Batch::CfnComputeEnvironment::LaunchTemplateSpecificationProperty
- Defined in:
- batch/cfn_compute_environment.rb
Overview
An object that represents a launch template that's associated with a compute resource.
You must specify either the launch template ID or launch template name in the request, but not both.
If security groups are specified using both the security_group_ids parameter of CreateComputeEnvironment and the launch template, the values in the security_group_ids parameter of CreateComputeEnvironment will be used.
This object isn't applicable to jobs that are running on Fargate resources.
Instance Attribute Summary collapse
-
#launch_template_id ⇒ String?
readonly
The ID of the launch template.
-
#launch_template_name ⇒ String?
readonly
The name of the launch template.
-
#overrides ⇒ AWSCDK::IResolvable, ...
readonly
A launch template to use in place of the default launch template.
-
#userdata_type ⇒ String?
readonly
The EKS node initialization process to use.
-
#version ⇒ String?
readonly
The version number of the launch template,
$Default, or$Latest.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(launch_template_id: nil, launch_template_name: nil, overrides: nil, userdata_type: nil, version: nil) ⇒ LaunchTemplateSpecificationProperty
constructor
A new instance of LaunchTemplateSpecificationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(launch_template_id: nil, launch_template_name: nil, overrides: nil, userdata_type: nil, version: nil) ⇒ LaunchTemplateSpecificationProperty
Returns a new instance of LaunchTemplateSpecificationProperty.
1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 |
# File 'batch/cfn_compute_environment.rb', line 1305 def initialize(launch_template_id: nil, launch_template_name: nil, overrides: nil, userdata_type: nil, version: nil) @launch_template_id = launch_template_id Jsii::Type.check_type(@launch_template_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "launchTemplateId") unless @launch_template_id.nil? @launch_template_name = launch_template_name Jsii::Type.check_type(@launch_template_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "launchTemplateName") unless @launch_template_name.nil? @overrides = overrides Jsii::Type.check_type(@overrides, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQ2ZuQ29tcHV0ZUVudmlyb25tZW50LkxhdW5jaFRlbXBsYXRlU3BlY2lmaWNhdGlvbk92ZXJyaWRlUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "overrides") unless @overrides.nil? @userdata_type = userdata_type Jsii::Type.check_type(@userdata_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "userdataType") unless @userdata_type.nil? @version = version Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "version") unless @version.nil? end |
Instance Attribute Details
#launch_template_id ⇒ String? (readonly)
The ID of the launch template.
1322 1323 1324 |
# File 'batch/cfn_compute_environment.rb', line 1322 def launch_template_id @launch_template_id end |
#launch_template_name ⇒ String? (readonly)
The name of the launch template.
1327 1328 1329 |
# File 'batch/cfn_compute_environment.rb', line 1327 def launch_template_name @launch_template_name end |
#overrides ⇒ AWSCDK::IResolvable, ... (readonly)
A launch template to use in place of the default launch template.
You must specify either the launch template ID or launch template name in the request, but not both.
You can specify up to ten (10) launch template overrides that are associated to unique instance types or families for each compute environment.
To unset all override templates for a compute environment, you can pass an empty array to the UpdateComputeEnvironment.overrides parameter, or not include the
overridesparameter when submitting theUpdateComputeEnvironmentAPI operation.
1338 1339 1340 |
# File 'batch/cfn_compute_environment.rb', line 1338 def overrides @overrides end |
#userdata_type ⇒ String? (readonly)
The EKS node initialization process to use.
You only need to specify this value if you are using a custom AMI. The default value is EKS_BOOTSTRAP_SH . If imageType is a custom AMI based on EKS_AL2023 or EKS_AL2023_NVIDIA then you must choose EKS_NODEADM .
1345 1346 1347 |
# File 'batch/cfn_compute_environment.rb', line 1345 def userdata_type @userdata_type end |
#version ⇒ String? (readonly)
The version number of the launch template, $Default , or $Latest .
If the value is $Default , the default version of the launch template is used. If the value is $Latest , the latest version of the launch template is used.
If the AMI ID that's used in a compute environment is from the launch template, the AMI isn't changed when the compute environment is updated. It's only changed if the
update_to_latest_image_versionparameter for the compute environment is set totrue. During an infrastructure update, if either$Defaultor$Latestis specified, AWS Batch re-evaluates the launch template version, and it might use a different version of the launch template. This is the case even if the launch template isn't specified in the update. When updating a compute environment, changing the launch template requires an infrastructure update of the compute environment. For more information, see Updating compute environments in the AWS Batch User Guide .
Default: $Default
Latest: $Latest
1358 1359 1360 |
# File 'batch/cfn_compute_environment.rb', line 1358 def version @version end |
Class Method Details
.jsii_properties ⇒ Object
1360 1361 1362 1363 1364 1365 1366 1367 1368 |
# File 'batch/cfn_compute_environment.rb', line 1360 def self.jsii_properties { :launch_template_id => "launchTemplateId", :launch_template_name => "launchTemplateName", :overrides => "overrides", :userdata_type => "userdataType", :version => "version", } end |
Instance Method Details
#to_jsii ⇒ Object
1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 |
# File 'batch/cfn_compute_environment.rb', line 1370 def to_jsii result = {} result.merge!({ "launchTemplateId" => @launch_template_id, "launchTemplateName" => @launch_template_name, "overrides" => @overrides, "userdataType" => @userdata_type, "version" => @version, }) result.compact end |