Class: AWSCDK::EC2::CfnLaunchTemplate::PlacementProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnLaunchTemplate::PlacementProperty
- Defined in:
- ec2/cfn_launch_template.rb
Overview
Specifies the placement of an instance.
Placement is a property of AWS::EC2::LaunchTemplate LaunchTemplateData .
Instance Attribute Summary collapse
-
#affinity ⇒ String?
readonly
The affinity setting for an instance on a Dedicated Host.
-
#availability_zone ⇒ String?
readonly
The Availability Zone for the instance.
-
#group_id ⇒ String?
readonly
The Group Id of a placement group.
-
#group_name ⇒ String?
readonly
The name of the placement group for the instance.
-
#host_id ⇒ String?
readonly
The ID of the Dedicated Host for the instance.
-
#host_resource_group_arn ⇒ String?
readonly
The ARN of the host resource group in which to launch the instances.
-
#partition_number ⇒ Numeric?
readonly
The number of the partition the instance should launch in.
-
#spread_domain ⇒ String?
readonly
Reserved for future use.
-
#tenancy ⇒ String?
readonly
The tenancy of the instance.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(affinity: nil, availability_zone: nil, group_id: nil, group_name: nil, host_id: nil, host_resource_group_arn: nil, partition_number: nil, spread_domain: nil, tenancy: nil) ⇒ PlacementProperty
constructor
A new instance of PlacementProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(affinity: nil, availability_zone: nil, group_id: nil, group_name: nil, host_id: nil, host_resource_group_arn: nil, partition_number: nil, spread_domain: nil, tenancy: nil) ⇒ PlacementProperty
Returns a new instance of PlacementProperty.
3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 |
# File 'ec2/cfn_launch_template.rb', line 3363 def initialize(affinity: nil, availability_zone: nil, group_id: nil, group_name: nil, host_id: nil, host_resource_group_arn: nil, partition_number: nil, spread_domain: nil, tenancy: nil) @affinity = affinity Jsii::Type.check_type(@affinity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "affinity") unless @affinity.nil? @availability_zone = availability_zone Jsii::Type.check_type(@availability_zone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "availabilityZone") unless @availability_zone.nil? @group_id = group_id Jsii::Type.check_type(@group_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "groupId") unless @group_id.nil? @group_name = group_name Jsii::Type.check_type(@group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "groupName") unless @group_name.nil? @host_id = host_id Jsii::Type.check_type(@host_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostId") unless @host_id.nil? @host_resource_group_arn = host_resource_group_arn Jsii::Type.check_type(@host_resource_group_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostResourceGroupArn") unless @host_resource_group_arn.nil? @partition_number = partition_number Jsii::Type.check_type(@partition_number, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "partitionNumber") unless @partition_number.nil? @spread_domain = spread_domain Jsii::Type.check_type(@spread_domain, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "spreadDomain") unless @spread_domain.nil? @tenancy = tenancy Jsii::Type.check_type(@tenancy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tenancy") unless @tenancy.nil? end |
Instance Attribute Details
#affinity ⇒ String? (readonly)
The affinity setting for an instance on a Dedicated Host.
3388 3389 3390 |
# File 'ec2/cfn_launch_template.rb', line 3388 def affinity @affinity end |
#availability_zone ⇒ String? (readonly)
The Availability Zone for the instance.
Either AvailabilityZone or AvailabilityZoneId can be specified, but not both
3395 3396 3397 |
# File 'ec2/cfn_launch_template.rb', line 3395 def availability_zone @availability_zone end |
#group_id ⇒ String? (readonly)
The Group Id of a placement group.
You must specify the Placement Group Group Id to launch an instance in a shared placement group.
3402 3403 3404 |
# File 'ec2/cfn_launch_template.rb', line 3402 def group_id @group_id end |
#group_name ⇒ String? (readonly)
The name of the placement group for the instance.
3407 3408 3409 |
# File 'ec2/cfn_launch_template.rb', line 3407 def group_name @group_name end |
#host_id ⇒ String? (readonly)
The ID of the Dedicated Host for the instance.
3412 3413 3414 |
# File 'ec2/cfn_launch_template.rb', line 3412 def host_id @host_id end |
#host_resource_group_arn ⇒ String? (readonly)
The ARN of the host resource group in which to launch the instances.
If you specify a host resource group ARN, omit the Tenancy parameter or set it to host .
3419 3420 3421 |
# File 'ec2/cfn_launch_template.rb', line 3419 def host_resource_group_arn @host_resource_group_arn end |
#partition_number ⇒ Numeric? (readonly)
The number of the partition the instance should launch in.
Valid only if the placement group strategy is set to partition .
3426 3427 3428 |
# File 'ec2/cfn_launch_template.rb', line 3426 def partition_number @partition_number end |
#spread_domain ⇒ String? (readonly)
Reserved for future use.
3431 3432 3433 |
# File 'ec2/cfn_launch_template.rb', line 3431 def spread_domain @spread_domain end |
#tenancy ⇒ String? (readonly)
The tenancy of the instance.
An instance with a tenancy of dedicated runs on single-tenant hardware.
3438 3439 3440 |
# File 'ec2/cfn_launch_template.rb', line 3438 def tenancy @tenancy end |
Class Method Details
.jsii_properties ⇒ Object
3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 |
# File 'ec2/cfn_launch_template.rb', line 3440 def self.jsii_properties { :affinity => "affinity", :availability_zone => "availabilityZone", :group_id => "groupId", :group_name => "groupName", :host_id => "hostId", :host_resource_group_arn => "hostResourceGroupArn", :partition_number => "partitionNumber", :spread_domain => "spreadDomain", :tenancy => "tenancy", } end |
Instance Method Details
#to_jsii ⇒ Object
3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 |
# File 'ec2/cfn_launch_template.rb', line 3454 def to_jsii result = {} result.merge!({ "affinity" => @affinity, "availabilityZone" => @availability_zone, "groupId" => @group_id, "groupName" => @group_name, "hostId" => @host_id, "hostResourceGroupArn" => @host_resource_group_arn, "partitionNumber" => @partition_number, "spreadDomain" => @spread_domain, "tenancy" => @tenancy, }) result.compact end |