Class: AWSCDK::EC2::CfnCapacityReservationFleet::InstanceTypeSpecificationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnCapacityReservationFleet::InstanceTypeSpecificationProperty
- 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
-
#availability_zone ⇒ String?
readonly
The Availability Zone in which the Capacity Reservation Fleet reserves the capacity.
-
#availability_zone_id ⇒ String?
readonly
The ID of the Availability Zone in which the Capacity Reservation Fleet reserves the capacity.
-
#ebs_optimized ⇒ Boolean, ...
readonly
Indicates whether the Capacity Reservation Fleet supports EBS-optimized instances types.
-
#instance_platform ⇒ String?
readonly
The type of operating system for which the Capacity Reservation Fleet reserves capacity.
-
#instance_type ⇒ String?
readonly
The instance type for which the Capacity Reservation Fleet reserves capacity.
-
#priority ⇒ Numeric?
readonly
The priority to assign to the instance type.
-
#weight ⇒ Numeric?
readonly
The number of capacity units provided by the specified instance type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(availability_zone: nil, availability_zone_id: nil, ebs_optimized: nil, instance_platform: nil, instance_type: nil, priority: nil, weight: nil) ⇒ InstanceTypeSpecificationProperty
constructor
A new instance of InstanceTypeSpecificationProperty.
- #to_jsii ⇒ Object
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.
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_zone ⇒ String? (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_id ⇒ String? (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_optimized ⇒ Boolean, ... (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_platform ⇒ String? (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_type ⇒ String? (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 |
#priority ⇒ Numeric? (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 |
#weight ⇒ Numeric? (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_properties ⇒ Object
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_jsii ⇒ Object
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 |