Class: AWSCDK::Batch::CfnQuotaShare::QuotaShareResourceSharingConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
batch/cfn_quota_share.rb

Overview

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(strategy:, borrow_limit: nil) ⇒ QuotaShareResourceSharingConfigurationProperty

Returns a new instance of QuotaShareResourceSharingConfigurationProperty.

Parameters:

  • strategy (String)

    The resource sharing strategy for the quota share.

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

    The maximum percentage of additional capacity that the quota share can borrow from other shares.



667
668
669
670
671
672
# File 'batch/cfn_quota_share.rb', line 667

def initialize(strategy:, borrow_limit: nil)
  @strategy = strategy
  Jsii::Type.check_type(@strategy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "strategy")
  @borrow_limit = borrow_limit
  Jsii::Type.check_type(@borrow_limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "borrowLimit") unless @borrow_limit.nil?
end

Instance Attribute Details

#borrow_limitNumeric? (readonly)

The maximum percentage of additional capacity that the quota share can borrow from other shares.

BorrowLimit can only be applied to quota shares with a strategy of LEND_AND_BORROW. This value is expressed as a percentage of the quota share's configured CapacityLimits. The BorrowLimit is applied uniformly across all capacity units. For example, if the BorrowLimit is 200, the quota share can borrow up to 200% of its configured max_capacity for each capacity unit. The default BorrowLimit is -1, which indicates unlimited borrowing.



687
688
689
# File 'batch/cfn_quota_share.rb', line 687

def borrow_limit
  @borrow_limit
end

#strategyString (readonly)

The resource sharing strategy for the quota share.

The RESERVE strategy allows a quota share to reserve idle capacity for itself. LEND configures the share to lend its idle capacity to another share in need of capacity. The LEND_AND_BORROW strategy configures the share to borrow idle capacity from an underutilized share, as well as lend to another share.



680
681
682
# File 'batch/cfn_quota_share.rb', line 680

def strategy
  @strategy
end

Class Method Details

.jsii_propertiesObject



689
690
691
692
693
694
# File 'batch/cfn_quota_share.rb', line 689

def self.jsii_properties
  {
    :strategy => "strategy",
    :borrow_limit => "borrowLimit",
  }
end

Instance Method Details

#to_jsiiObject



696
697
698
699
700
701
702
703
# File 'batch/cfn_quota_share.rb', line 696

def to_jsii
  result = {}
  result.merge!({
    "strategy" => @strategy,
    "borrowLimit" => @borrow_limit,
  })
  result.compact
end