Class: AWSCDK::EC2::CfnLaunchTemplate::InstanceMarketOptionsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnLaunchTemplate::InstanceMarketOptionsProperty
- Defined in:
- ec2/cfn_launch_template.rb
Overview
Specifies the market (purchasing) option for an instance.
InstanceMarketOptions is a property of the AWS::EC2::LaunchTemplate LaunchTemplateData .
Instance Attribute Summary collapse
-
#market_type ⇒ String?
readonly
The market type.
-
#spot_options ⇒ AWSCDK::IResolvable, ...
readonly
The options for Spot Instances.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(market_type: nil, spot_options: nil) ⇒ InstanceMarketOptionsProperty
constructor
A new instance of InstanceMarketOptionsProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(market_type: nil, spot_options: nil) ⇒ InstanceMarketOptionsProperty
Returns a new instance of InstanceMarketOptionsProperty.
1537 1538 1539 1540 1541 1542 |
# File 'ec2/cfn_launch_template.rb', line 1537 def initialize(market_type: nil, spot_options: nil) @market_type = market_type Jsii::Type.check_type(@market_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "marketType") unless @market_type.nil? @spot_options = .is_a?(Hash) ? ::AWSCDK::EC2::CfnLaunchTemplate::SpotOptionsProperty.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@spot_options, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuTGF1bmNoVGVtcGxhdGUuU3BvdE9wdGlvbnNQcm9wZXJ0eSJ9XX19")), "spotOptions") unless @spot_options.nil? end |
Instance Attribute Details
#market_type ⇒ String? (readonly)
The market type.
1548 1549 1550 |
# File 'ec2/cfn_launch_template.rb', line 1548 def market_type @market_type end |
#spot_options ⇒ AWSCDK::IResolvable, ... (readonly)
The options for Spot Instances.
1553 1554 1555 |
# File 'ec2/cfn_launch_template.rb', line 1553 def @spot_options end |
Class Method Details
.jsii_properties ⇒ Object
1555 1556 1557 1558 1559 1560 |
# File 'ec2/cfn_launch_template.rb', line 1555 def self.jsii_properties { :market_type => "marketType", :spot_options => "spotOptions", } end |
Instance Method Details
#to_jsii ⇒ Object
1562 1563 1564 1565 1566 1567 1568 1569 |
# File 'ec2/cfn_launch_template.rb', line 1562 def to_jsii result = {} result.merge!({ "marketType" => @market_type, "spotOptions" => @spot_options, }) result.compact end |