Class: AWSCDK::Sagemaker::CfnCluster::ClusterCapacityRequirementsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Sagemaker::CfnCluster::ClusterCapacityRequirementsProperty
- Defined in:
- sagemaker/cfn_cluster.rb
Overview
Defines the instance capacity requirements for an instance group, including configurations for both Spot and On-Demand capacity types.
Instance Attribute Summary collapse
-
#on_demand ⇒ Object?
readonly
Configuration options specific to On-Demand instances.
-
#spot ⇒ Object?
readonly
Configuration options specific to Spot instances.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(on_demand: nil, spot: nil) ⇒ ClusterCapacityRequirementsProperty
constructor
A new instance of ClusterCapacityRequirementsProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(on_demand: nil, spot: nil) ⇒ ClusterCapacityRequirementsProperty
Returns a new instance of ClusterCapacityRequirementsProperty.
818 819 820 821 822 823 |
# File 'sagemaker/cfn_cluster.rb', line 818 def initialize(on_demand: nil, spot: nil) @on_demand = on_demand Jsii::Type.check_type(@on_demand, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "onDemand") unless @on_demand.nil? @spot = spot Jsii::Type.check_type(@spot, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "spot") unless @spot.nil? end |
Instance Attribute Details
#on_demand ⇒ Object? (readonly)
Configuration options specific to On-Demand instances.
829 830 831 |
# File 'sagemaker/cfn_cluster.rb', line 829 def on_demand @on_demand end |
#spot ⇒ Object? (readonly)
Configuration options specific to Spot instances.
834 835 836 |
# File 'sagemaker/cfn_cluster.rb', line 834 def spot @spot end |
Class Method Details
.jsii_properties ⇒ Object
836 837 838 839 840 841 |
# File 'sagemaker/cfn_cluster.rb', line 836 def self.jsii_properties { :on_demand => "onDemand", :spot => "spot", } end |
Instance Method Details
#to_jsii ⇒ Object
843 844 845 846 847 848 849 850 |
# File 'sagemaker/cfn_cluster.rb', line 843 def to_jsii result = {} result.merge!({ "onDemand" => @on_demand, "spot" => @spot, }) result.compact end |