Class: AWSCDK::EC2::CfnEC2Fleet::PlacementProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_ec2_fleet.rb

Overview

Describes the placement of an instance.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(affinity: nil, availability_zone: 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.

Parameters:

  • affinity (String, nil) (defaults to: nil)

    The affinity setting for the instance on the Dedicated Host.

  • availability_zone (String, nil) (defaults to: nil)

    The Availability Zone of the instance.

  • group_name (String, nil) (defaults to: nil)

    The name of the placement group that the instance is in.

  • host_id (String, nil) (defaults to: nil)

    The ID of the Dedicated Host on which the instance resides.

  • host_resource_group_arn (String, nil) (defaults to: nil)

    The ARN of the host resource group in which to launch the instances.

  • partition_number (Numeric, nil) (defaults to: nil)

    The number of the partition that the instance is in.

  • spread_domain (String, nil) (defaults to: nil)

    Reserved for future use.

  • tenancy (String, nil) (defaults to: nil)

    The tenancy of the instance. An instance with a tenancy of dedicated runs on single-tenant hardware.



2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
# File 'ec2/cfn_ec2_fleet.rb', line 2621

def initialize(affinity: nil, availability_zone: 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_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

#affinityString? (readonly)

The affinity setting for the instance on the Dedicated Host.

This parameter is not supported for CreateFleet or ImportInstance .



2646
2647
2648
# File 'ec2/cfn_ec2_fleet.rb', line 2646

def affinity
  @affinity
end

#availability_zoneString? (readonly)

The Availability Zone of the instance.

On input, you can specify AvailabilityZone or AvailabilityZoneId , but not both. If you specify neither one, Amazon EC2 automatically selects an Availability Zone for you.

This parameter is not supported for CreateFleet .



2655
2656
2657
# File 'ec2/cfn_ec2_fleet.rb', line 2655

def availability_zone
  @availability_zone
end

#group_nameString? (readonly)

The name of the placement group that the instance is in.

On input, you can specify GroupId or GroupName , but not both.



2662
2663
2664
# File 'ec2/cfn_ec2_fleet.rb', line 2662

def group_name
  @group_name
end

#host_idString? (readonly)

The ID of the Dedicated Host on which the instance resides.

This parameter is not supported for CreateFleet or ImportInstance .



2669
2670
2671
# File 'ec2/cfn_ec2_fleet.rb', line 2669

def host_id
  @host_id
end

#host_resource_group_arnString? (readonly)

The ARN of the host resource group in which to launch the instances.

On input, if you specify this parameter, either omit the Tenancy parameter or set it to host .

This parameter is not supported for CreateFleet .



2678
2679
2680
# File 'ec2/cfn_ec2_fleet.rb', line 2678

def host_resource_group_arn
  @host_resource_group_arn
end

#partition_numberNumeric? (readonly)

The number of the partition that the instance is in.

Valid only if the placement group strategy is set to partition .

This parameter is not supported for CreateFleet .



2687
2688
2689
# File 'ec2/cfn_ec2_fleet.rb', line 2687

def partition_number
  @partition_number
end

#spread_domainString? (readonly)

Reserved for future use.



2692
2693
2694
# File 'ec2/cfn_ec2_fleet.rb', line 2692

def spread_domain
  @spread_domain
end

#tenancyString? (readonly)

The tenancy of the instance. An instance with a tenancy of dedicated runs on single-tenant hardware.

This parameter is not supported for CreateFleet . The host tenancy is not supported for ImportInstance or for T3 instances that are configured for the unlimited CPU credit option.



2699
2700
2701
# File 'ec2/cfn_ec2_fleet.rb', line 2699

def tenancy
  @tenancy
end

Class Method Details

.jsii_propertiesObject



2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
# File 'ec2/cfn_ec2_fleet.rb', line 2701

def self.jsii_properties
  {
    :affinity => "affinity",
    :availability_zone => "availabilityZone",
    :group_name => "groupName",
    :host_id => "hostId",
    :host_resource_group_arn => "hostResourceGroupArn",
    :partition_number => "partitionNumber",
    :spread_domain => "spreadDomain",
    :tenancy => "tenancy",
  }
end

Instance Method Details

#to_jsiiObject



2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
# File 'ec2/cfn_ec2_fleet.rb', line 2714

def to_jsii
  result = {}
  result.merge!({
    "affinity" => @affinity,
    "availabilityZone" => @availability_zone,
    "groupName" => @group_name,
    "hostId" => @host_id,
    "hostResourceGroupArn" => @host_resource_group_arn,
    "partitionNumber" => @partition_number,
    "spreadDomain" => @spread_domain,
    "tenancy" => @tenancy,
  })
  result.compact
end