Class: AWSCDK::EC2::CfnCapacityReservation::CapacityAllocationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnCapacityReservation::CapacityAllocationProperty
- Defined in:
- ec2/cfn_capacity_reservation.rb
Overview
Information about instance capacity usage for a Capacity Reservation.
Instance Attribute Summary collapse
-
#allocation_type ⇒ String?
readonly
The usage type.
-
#count ⇒ Numeric?
readonly
The amount of instance capacity associated with the usage.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(allocation_type: nil, count: nil) ⇒ CapacityAllocationProperty
constructor
A new instance of CapacityAllocationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(allocation_type: nil, count: nil) ⇒ CapacityAllocationProperty
Returns a new instance of CapacityAllocationProperty.
864 865 866 867 868 869 |
# File 'ec2/cfn_capacity_reservation.rb', line 864 def initialize(allocation_type: nil, count: nil) @allocation_type = allocation_type Jsii::Type.check_type(@allocation_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "allocationType") unless @allocation_type.nil? @count = count Jsii::Type.check_type(@count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "count") unless @count.nil? end |
Instance Attribute Details
#allocation_type ⇒ String? (readonly)
The usage type.
used indicates that the instance capacity is in use by instances that are running in the Capacity Reservation.
877 878 879 |
# File 'ec2/cfn_capacity_reservation.rb', line 877 def allocation_type @allocation_type end |
#count ⇒ Numeric? (readonly)
The amount of instance capacity associated with the usage.
For example a value of 4 indicates that instance capacity for 4 instances is currently in use.
884 885 886 |
# File 'ec2/cfn_capacity_reservation.rb', line 884 def count @count end |
Class Method Details
.jsii_properties ⇒ Object
886 887 888 889 890 891 |
# File 'ec2/cfn_capacity_reservation.rb', line 886 def self.jsii_properties { :allocation_type => "allocationType", :count => "count", } end |
Instance Method Details
#to_jsii ⇒ Object
893 894 895 896 897 898 899 900 |
# File 'ec2/cfn_capacity_reservation.rb', line 893 def to_jsii result = {} result.merge!({ "allocationType" => @allocation_type, "count" => @count, }) result.compact end |