Class: AWSCDK::Lightsail::CfnInstance::StateProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lightsail::CfnInstance::StateProperty
- Defined in:
- lightsail/cfn_instance.rb
Overview
State is a property of the AWS::Lightsail::Instance resource. It describes the status code and the state (for example, running ) of an instance.
Instance Attribute Summary collapse
-
#code ⇒ Numeric?
readonly
The status code of the instance.
-
#name ⇒ String?
readonly
The state of the instance (for example,
runningorpending).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(code: nil, name: nil) ⇒ StateProperty
constructor
A new instance of StateProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(code: nil, name: nil) ⇒ StateProperty
Returns a new instance of StateProperty.
1315 1316 1317 1318 1319 1320 |
# File 'lightsail/cfn_instance.rb', line 1315 def initialize(code: nil, name: nil) @code = code Jsii::Type.check_type(@code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "code") unless @code.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? end |
Instance Attribute Details
#code ⇒ Numeric? (readonly)
The status code of the instance.
1326 1327 1328 |
# File 'lightsail/cfn_instance.rb', line 1326 def code @code end |
#name ⇒ String? (readonly)
The state of the instance (for example, running or pending ).
1331 1332 1333 |
# File 'lightsail/cfn_instance.rb', line 1331 def name @name end |
Class Method Details
.jsii_properties ⇒ Object
1333 1334 1335 1336 1337 1338 |
# File 'lightsail/cfn_instance.rb', line 1333 def self.jsii_properties { :code => "code", :name => "name", } end |
Instance Method Details
#to_jsii ⇒ Object
1340 1341 1342 1343 1344 1345 1346 1347 |
# File 'lightsail/cfn_instance.rb', line 1340 def to_jsii result = {} result.merge!({ "code" => @code, "name" => @name, }) result.compact end |