Class: AWSCDK::Batch::CfnServiceEnvironment::CapacityLimitProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Batch::CfnServiceEnvironment::CapacityLimitProperty
- Defined in:
- batch/cfn_service_environment.rb
Overview
Defines the capacity limit for a service environment.
This structure specifies the maximum amount of resources that can be used by service jobs in the environment.
Instance Attribute Summary collapse
-
#capacity_unit ⇒ String?
readonly
The unit of measure for the capacity limit.
-
#max_capacity ⇒ Numeric?
readonly
The maximum capacity available for the service environment.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(capacity_unit: nil, max_capacity: nil) ⇒ CapacityLimitProperty
constructor
A new instance of CapacityLimitProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(capacity_unit: nil, max_capacity: nil) ⇒ CapacityLimitProperty
Returns a new instance of CapacityLimitProperty.
573 574 575 576 577 578 |
# File 'batch/cfn_service_environment.rb', line 573 def initialize(capacity_unit: nil, max_capacity: nil) @capacity_unit = capacity_unit Jsii::Type.check_type(@capacity_unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "capacityUnit") unless @capacity_unit.nil? @max_capacity = max_capacity Jsii::Type.check_type(@max_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxCapacity") unless @max_capacity.nil? end |
Instance Attribute Details
#capacity_unit ⇒ String? (readonly)
The unit of measure for the capacity limit.
This defines how the maxCapacity value should be interpreted. For SAGEMAKER_TRAINING jobs, use NUM_INSTANCES .
586 587 588 |
# File 'batch/cfn_service_environment.rb', line 586 def capacity_unit @capacity_unit end |
#max_capacity ⇒ Numeric? (readonly)
The maximum capacity available for the service environment.
This value represents the maximum amount resources that can be allocated to service jobs.
For example, maxCapacity=50 , capacityUnit=NUM_INSTANCES . This indicates that the maximum number of instances that can be run on this service environment is 50. You could then run 5 SageMaker Training jobs that each use 10 instances. However, if you submit another job that requires 10 instances, it will wait in the queue.
595 596 597 |
# File 'batch/cfn_service_environment.rb', line 595 def max_capacity @max_capacity end |
Class Method Details
.jsii_properties ⇒ Object
597 598 599 600 601 602 |
# File 'batch/cfn_service_environment.rb', line 597 def self.jsii_properties { :capacity_unit => "capacityUnit", :max_capacity => "maxCapacity", } end |
Instance Method Details
#to_jsii ⇒ Object
604 605 606 607 608 609 610 611 |
# File 'batch/cfn_service_environment.rb', line 604 def to_jsii result = {} result.merge!({ "capacityUnit" => @capacity_unit, "maxCapacity" => @max_capacity, }) result.compact end |