Class: AWSCDK::Lightsail::CfnInstance::StateProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code: nil, name: nil) ⇒ StateProperty

Returns a new instance of StateProperty.

Parameters:

  • code (Numeric, nil) (defaults to: nil)

    The status code of the instance.

  • name (String, nil) (defaults to: nil)

    The state of the instance (for example, running or pending ).



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

#codeNumeric? (readonly)

The status code of the instance.



1326
1327
1328
# File 'lightsail/cfn_instance.rb', line 1326

def code
  @code
end

#nameString? (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_propertiesObject



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_jsiiObject



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