Class: AWSCDK::EC2::CfnCapacityReservationFleetProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnCapacityReservationFleetProps
- Defined in:
- ec2/cfn_capacity_reservation_fleet_props.rb
Overview
Properties for defining a CfnCapacityReservationFleet.
Instance Attribute Summary collapse
-
#allocation_strategy ⇒ String?
readonly
The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use.
-
#end_date ⇒ String?
readonly
The date and time at which the Capacity Reservation Fleet expires.
-
#instance_match_criteria ⇒ String?
readonly
Indicates the type of instance launches that the Capacity Reservation Fleet accepts.
-
#instance_type_specifications ⇒ AWSCDK::IResolvable, ...
readonly
Information about the instance types for which to reserve the capacity.
-
#no_remove_end_date ⇒ Boolean, ...
readonly
Used to add an end date to a Capacity Reservation Fleet that has no end date and time.
-
#remove_end_date ⇒ Boolean, ...
readonly
Used to remove an end date from a Capacity Reservation Fleet that is configured to end automatically at a specific date and time.
-
#tag_specifications ⇒ AWSCDK::IResolvable, ...
readonly
The tags to assign to the Capacity Reservation Fleet.
-
#tenancy ⇒ String?
readonly
Indicates the tenancy of the Capacity Reservation Fleet.
-
#total_target_capacity ⇒ Numeric?
readonly
The total number of capacity units to be reserved by the Capacity Reservation Fleet.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(allocation_strategy: nil, end_date: nil, instance_match_criteria: nil, instance_type_specifications: nil, no_remove_end_date: nil, remove_end_date: nil, tag_specifications: nil, tenancy: nil, total_target_capacity: nil) ⇒ CfnCapacityReservationFleetProps
constructor
A new instance of CfnCapacityReservationFleetProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(allocation_strategy: nil, end_date: nil, instance_match_criteria: nil, instance_type_specifications: nil, no_remove_end_date: nil, remove_end_date: nil, tag_specifications: nil, tenancy: nil, total_target_capacity: nil) ⇒ CfnCapacityReservationFleetProps
Returns a new instance of CfnCapacityReservationFleetProps.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'ec2/cfn_capacity_reservation_fleet_props.rb', line 18 def initialize(allocation_strategy: nil, end_date: nil, instance_match_criteria: nil, instance_type_specifications: nil, no_remove_end_date: nil, remove_end_date: nil, tag_specifications: nil, tenancy: nil, total_target_capacity: nil) @allocation_strategy = allocation_strategy Jsii::Type.check_type(@allocation_strategy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "allocationStrategy") unless @allocation_strategy.nil? @end_date = end_date Jsii::Type.check_type(@end_date, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endDate") unless @end_date.nil? @instance_match_criteria = instance_match_criteria Jsii::Type.check_type(@instance_match_criteria, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceMatchCriteria") unless @instance_match_criteria.nil? @instance_type_specifications = instance_type_specifications Jsii::Type.check_type(@instance_type_specifications, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNmbkNhcGFjaXR5UmVzZXJ2YXRpb25GbGVldC5JbnN0YW5jZVR5cGVTcGVjaWZpY2F0aW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "instanceTypeSpecifications") unless @instance_type_specifications.nil? @no_remove_end_date = no_remove_end_date Jsii::Type.check_type(@no_remove_end_date, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "noRemoveEndDate") unless @no_remove_end_date.nil? @remove_end_date = remove_end_date Jsii::Type.check_type(@remove_end_date, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "removeEndDate") unless @remove_end_date.nil? @tag_specifications = tag_specifications Jsii::Type.check_type(@tag_specifications, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNmbkNhcGFjaXR5UmVzZXJ2YXRpb25GbGVldC5UYWdTcGVjaWZpY2F0aW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "tagSpecifications") unless @tag_specifications.nil? @tenancy = tenancy Jsii::Type.check_type(@tenancy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tenancy") unless @tenancy.nil? @total_target_capacity = total_target_capacity Jsii::Type.check_type(@total_target_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "totalTargetCapacity") unless @total_target_capacity.nil? end |
Instance Attribute Details
#allocation_strategy ⇒ String? (readonly)
The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use.
Currently, only the prioritized allocation strategy is supported. For more information, see Allocation strategy in the Amazon EC2 User Guide .
Valid values: prioritized
47 48 49 |
# File 'ec2/cfn_capacity_reservation_fleet_props.rb', line 47 def allocation_strategy @allocation_strategy end |
#end_date ⇒ String? (readonly)
The date and time at which the Capacity Reservation Fleet expires.
When the Capacity Reservation Fleet expires, its state changes to expired and all of the Capacity Reservations in the Fleet expire.
The Capacity Reservation Fleet expires within an hour after the specified time. For example, if you specify 5/31/2019 , 13:30:55 , the Capacity Reservation Fleet is guaranteed to expire between 13:30:55 and 14:30:55 on 5/31/2019 .
56 57 58 |
# File 'ec2/cfn_capacity_reservation_fleet_props.rb', line 56 def end_date @end_date end |
#instance_match_criteria ⇒ String? (readonly)
Indicates the type of instance launches that the Capacity Reservation Fleet accepts.
All Capacity Reservations in the Fleet inherit this instance matching criteria.
Currently, Capacity Reservation Fleets support open instance matching criteria only. This means that instances that have matching attributes (instance type, platform, and Availability Zone) run in the Capacity Reservations automatically. Instances do not need to explicitly target a Capacity Reservation Fleet to use its reserved capacity.
65 66 67 |
# File 'ec2/cfn_capacity_reservation_fleet_props.rb', line 65 def instance_match_criteria @instance_match_criteria end |
#instance_type_specifications ⇒ AWSCDK::IResolvable, ... (readonly)
Information about the instance types for which to reserve the capacity.
70 71 72 |
# File 'ec2/cfn_capacity_reservation_fleet_props.rb', line 70 def instance_type_specifications @instance_type_specifications end |
#no_remove_end_date ⇒ Boolean, ... (readonly)
Used to add an end date to a Capacity Reservation Fleet that has no end date and time.
To add an end date to a Capacity Reservation Fleet, specify true for this paramater and specify the end date and time (in UTC time format) for the EndDate parameter.
77 78 79 |
# File 'ec2/cfn_capacity_reservation_fleet_props.rb', line 77 def no_remove_end_date @no_remove_end_date end |
#remove_end_date ⇒ Boolean, ... (readonly)
Used to remove an end date from a Capacity Reservation Fleet that is configured to end automatically at a specific date and time.
To remove the end date from a Capacity Reservation Fleet, specify true for this paramater and omit the EndDate parameter.
84 85 86 |
# File 'ec2/cfn_capacity_reservation_fleet_props.rb', line 84 def remove_end_date @remove_end_date end |
#tag_specifications ⇒ AWSCDK::IResolvable, ... (readonly)
The tags to assign to the Capacity Reservation Fleet.
The tags are automatically assigned to the Capacity Reservations in the Fleet.
91 92 93 |
# File 'ec2/cfn_capacity_reservation_fleet_props.rb', line 91 def tag_specifications @tag_specifications end |
#tenancy ⇒ String? (readonly)
Indicates the tenancy of the Capacity Reservation Fleet.
All Capacity Reservations in the Fleet inherit this tenancy. The Capacity Reservation Fleet can have one of the following tenancy settings:
default- The Capacity Reservation Fleet is created on hardware that is shared with other AWS accounts .dedicated- The Capacity Reservations are created on single-tenant hardware that is dedicated to a single AWS account .
101 102 103 |
# File 'ec2/cfn_capacity_reservation_fleet_props.rb', line 101 def tenancy @tenancy end |
#total_target_capacity ⇒ Numeric? (readonly)
The total number of capacity units to be reserved by the Capacity Reservation Fleet.
This value, together with the instance type weights that you assign to each instance type used by 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 .
108 109 110 |
# File 'ec2/cfn_capacity_reservation_fleet_props.rb', line 108 def total_target_capacity @total_target_capacity end |
Class Method Details
.jsii_properties ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'ec2/cfn_capacity_reservation_fleet_props.rb', line 110 def self.jsii_properties { :allocation_strategy => "allocationStrategy", :end_date => "endDate", :instance_match_criteria => "instanceMatchCriteria", :instance_type_specifications => "instanceTypeSpecifications", :no_remove_end_date => "noRemoveEndDate", :remove_end_date => "removeEndDate", :tag_specifications => "tagSpecifications", :tenancy => "tenancy", :total_target_capacity => "totalTargetCapacity", } end |
Instance Method Details
#to_jsii ⇒ Object
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'ec2/cfn_capacity_reservation_fleet_props.rb', line 124 def to_jsii result = {} result.merge!({ "allocationStrategy" => @allocation_strategy, "endDate" => @end_date, "instanceMatchCriteria" => @instance_match_criteria, "instanceTypeSpecifications" => @instance_type_specifications, "noRemoveEndDate" => @no_remove_end_date, "removeEndDate" => @remove_end_date, "tagSpecifications" => @tag_specifications, "tenancy" => @tenancy, "totalTargetCapacity" => @total_target_capacity, }) result.compact end |