Class: AWSCDK::Batch::CfnSchedulingPolicy::ShareAttributesProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Batch::CfnSchedulingPolicy::ShareAttributesProperty
- Defined in:
- batch/cfn_scheduling_policy.rb
Overview
Specifies the weights for the share identifiers for the fair-share policy.
Share identifiers that aren't included have a default weight of 1.0 .
Instance Attribute Summary collapse
-
#share_identifier ⇒ String?
readonly
A share identifier or share identifier prefix.
-
#weight_factor ⇒ Numeric?
readonly
The weight factor for the share identifier.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(share_identifier: nil, weight_factor: nil) ⇒ ShareAttributesProperty
constructor
A new instance of ShareAttributesProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(share_identifier: nil, weight_factor: nil) ⇒ ShareAttributesProperty
Returns a new instance of ShareAttributesProperty.
658 659 660 661 662 663 |
# File 'batch/cfn_scheduling_policy.rb', line 658 def initialize(share_identifier: nil, weight_factor: nil) @share_identifier = share_identifier Jsii::Type.check_type(@share_identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "shareIdentifier") unless @share_identifier.nil? @weight_factor = weight_factor Jsii::Type.check_type(@weight_factor, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "weightFactor") unless @weight_factor.nil? end |
Instance Attribute Details
#share_identifier ⇒ String? (readonly)
A share identifier or share identifier prefix.
If the string ends with an asterisk (), this entry specifies the weight factor to use for share identifiers that start with that prefix. The list of share identifiers in a fair-share policy can't overlap. For example, you can't have one that specifies a share_identifier of `UserAand another that specifies ashare_identifierofUserA1` .
There can be no more than 500 share identifiers active in a job queue.
The string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).
675 676 677 |
# File 'batch/cfn_scheduling_policy.rb', line 675 def share_identifier @share_identifier end |
#weight_factor ⇒ Numeric? (readonly)
The weight factor for the share identifier.
The default value is 1.0. A lower value has a higher priority for compute resources. For example, jobs that use a share identifier with a weight factor of 0.125 (1/8) get 8 times the compute resources of jobs that use a share identifier with a weight factor of 1.
The smallest supported value is 0.0001, and the largest supported value is 999.9999.
684 685 686 |
# File 'batch/cfn_scheduling_policy.rb', line 684 def weight_factor @weight_factor end |
Class Method Details
.jsii_properties ⇒ Object
686 687 688 689 690 691 |
# File 'batch/cfn_scheduling_policy.rb', line 686 def self.jsii_properties { :share_identifier => "shareIdentifier", :weight_factor => "weightFactor", } end |
Instance Method Details
#to_jsii ⇒ Object
693 694 695 696 697 698 699 700 |
# File 'batch/cfn_scheduling_policy.rb', line 693 def to_jsii result = {} result.merge!({ "shareIdentifier" => @share_identifier, "weightFactor" => @weight_factor, }) result.compact end |