Class: AWSCDK::EC2::CfnCapacityReservationFleet::InstanceTypeSpecificationProperty

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

Overview

Specifies information about an instance type to use in a Capacity Reservation Fleet.

InstanceTypeSpecification is a property of the AWS::EC2::CapacityReservationFleet resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(availability_zone: nil, availability_zone_id: nil, ebs_optimized: nil, instance_platform: nil, instance_type: nil, priority: nil, weight: nil) ⇒ InstanceTypeSpecificationProperty

Returns a new instance of InstanceTypeSpecificationProperty.

Parameters:

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

    The Availability Zone in which the Capacity Reservation Fleet reserves the capacity.

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

    The ID of the Availability Zone in which the Capacity Reservation Fleet reserves the capacity.

  • ebs_optimized (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Indicates whether the Capacity Reservation Fleet supports EBS-optimized instances types.

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

    The type of operating system for which the Capacity Reservation Fleet reserves capacity.

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

    The instance type for which the Capacity Reservation Fleet reserves capacity.

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

    The priority to assign to the instance type.

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

    The number of capacity units provided by the specified instance type.



634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
# File 'ec2/cfn_capacity_reservation_fleet.rb', line 634

def initialize(availability_zone: nil, availability_zone_id: nil, ebs_optimized: nil, instance_platform: nil, instance_type: nil, priority: nil, weight: nil)
  @availability_zone = availability_zone
  Jsii::Type.check_type(@availability_zone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "availabilityZone") unless @availability_zone.nil?
  @availability_zone_id = availability_zone_id
  Jsii::Type.check_type(@availability_zone_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "availabilityZoneId") unless @availability_zone_id.nil?
  @ebs_optimized = ebs_optimized
  Jsii::Type.check_type(@ebs_optimized, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "ebsOptimized") unless @ebs_optimized.nil?
  @instance_platform = instance_platform
  Jsii::Type.check_type(@instance_platform, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instancePlatform") unless @instance_platform.nil?
  @instance_type = instance_type
  Jsii::Type.check_type(@instance_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceType") unless @instance_type.nil?
  @priority = priority
  Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "priority") unless @priority.nil?
  @weight = weight
  Jsii::Type.check_type(@weight, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "weight") unless @weight.nil?
end

Instance Attribute Details

#availability_zoneString? (readonly)

The Availability Zone in which the Capacity Reservation Fleet reserves the capacity.

A Capacity Reservation Fleet can't span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.



657
658
659
# File 'ec2/cfn_capacity_reservation_fleet.rb', line 657

def availability_zone
  @availability_zone
end

#availability_zone_idString? (readonly)

The ID of the Availability Zone in which the Capacity Reservation Fleet reserves the capacity.

A Capacity Reservation Fleet can't span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.



664
665
666
# File 'ec2/cfn_capacity_reservation_fleet.rb', line 664

def availability_zone_id
  @availability_zone_id
end

#ebs_optimizedBoolean, ... (readonly)

Indicates whether the Capacity Reservation Fleet supports EBS-optimized instances types.

This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using EBS-optimized instance types.



671
672
673
# File 'ec2/cfn_capacity_reservation_fleet.rb', line 671

def ebs_optimized
  @ebs_optimized
end

#instance_platformString? (readonly)

The type of operating system for which the Capacity Reservation Fleet reserves capacity.



676
677
678
# File 'ec2/cfn_capacity_reservation_fleet.rb', line 676

def instance_platform
  @instance_platform
end

#instance_typeString? (readonly)

The instance type for which the Capacity Reservation Fleet reserves capacity.



681
682
683
# File 'ec2/cfn_capacity_reservation_fleet.rb', line 681

def instance_type
  @instance_type
end

#priorityNumeric? (readonly)

The priority to assign to the instance type.

This value is used to determine which of the instance types specified for the Fleet should be prioritized for use. A lower value indicates a high priority. For more information, see Instance type priority in the Amazon EC2 User Guide .



688
689
690
# File 'ec2/cfn_capacity_reservation_fleet.rb', line 688

def priority
  @priority
end

#weightNumeric? (readonly)

The number of capacity units provided by the specified instance type.

This value, together with the total target capacity that you specify for the Fleet determine the number of instances for which the Fleet reserves capacity. Both values are based on units that make sense for your workload. For more information, see Total target capacity in the Amazon EC2 User Guide.

Valid Range: Minimum value of 0.001 . Maximum value of 99.999 .



697
698
699
# File 'ec2/cfn_capacity_reservation_fleet.rb', line 697

def weight
  @weight
end

Class Method Details

.jsii_propertiesObject



699
700
701
702
703
704
705
706
707
708
709
# File 'ec2/cfn_capacity_reservation_fleet.rb', line 699

def self.jsii_properties
  {
    :availability_zone => "availabilityZone",
    :availability_zone_id => "availabilityZoneId",
    :ebs_optimized => "ebsOptimized",
    :instance_platform => "instancePlatform",
    :instance_type => "instanceType",
    :priority => "priority",
    :weight => "weight",
  }
end

Instance Method Details

#to_jsiiObject



711
712
713
714
715
716
717
718
719
720
721
722
723
# File 'ec2/cfn_capacity_reservation_fleet.rb', line 711

def to_jsii
  result = {}
  result.merge!({
    "availabilityZone" => @availability_zone,
    "availabilityZoneId" => @availability_zone_id,
    "ebsOptimized" => @ebs_optimized,
    "instancePlatform" => @instance_platform,
    "instanceType" => @instance_type,
    "priority" => @priority,
    "weight" => @weight,
  })
  result.compact
end