Class: AWSCDK::EC2::CfnCapacityReservation::CapacityAllocationProperty

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

Overview

Information about instance capacity usage for a Capacity Reservation.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allocation_type: nil, count: nil) ⇒ CapacityAllocationProperty

Returns a new instance of CapacityAllocationProperty.

Parameters:

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

    The usage type.

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

    The amount of instance capacity associated with the usage.



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_typeString? (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

#countNumeric? (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_propertiesObject



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_jsiiObject



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