Class: AWSCDK::Lightsail::CfnInstance::AddOnProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lightsail/cfn_instance.rb

Overview

AddOn is a property of the AWS::Lightsail::Instance resource. It describes the add-ons for an instance.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(add_on_type:, auto_snapshot_add_on_request: nil, status: nil) ⇒ AddOnProperty

Returns a new instance of AddOnProperty.

Parameters:

  • add_on_type (String)

    The add-on type (for example, AutoSnapshot ).

  • auto_snapshot_add_on_request (AWSCDK::IResolvable, AWSCDK::Lightsail::CfnInstance::AutoSnapshotAddOnProperty, nil) (defaults to: nil)

    The parameters for the automatic snapshot add-on, such as the daily time when an automatic snapshot will be created.

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

    The status of the add-on.



788
789
790
791
792
793
794
795
# File 'lightsail/cfn_instance.rb', line 788

def initialize(add_on_type:, auto_snapshot_add_on_request: nil, status: nil)
  @add_on_type = add_on_type
  Jsii::Type.check_type(@add_on_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "addOnType")
  @auto_snapshot_add_on_request = auto_snapshot_add_on_request.is_a?(Hash) ? ::AWSCDK::Lightsail::CfnInstance::AutoSnapshotAddOnProperty.new(**auto_snapshot_add_on_request.transform_keys(&:to_sym)) : auto_snapshot_add_on_request
  Jsii::Type.check_type(@auto_snapshot_add_on_request, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19saWdodHNhaWwuQ2ZuSW5zdGFuY2UuQXV0b1NuYXBzaG90QWRkT25Qcm9wZXJ0eSJ9XX19")), "autoSnapshotAddOnRequest") unless @auto_snapshot_add_on_request.nil?
  @status = status
  Jsii::Type.check_type(@status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "status") unless @status.nil?
end

Instance Attribute Details

#add_on_typeString (readonly)

The add-on type (for example, AutoSnapshot ).

AutoSnapshot is the only add-on that can be enabled for an instance.



803
804
805
# File 'lightsail/cfn_instance.rb', line 803

def add_on_type
  @add_on_type
end

#auto_snapshot_add_on_requestAWSCDK::IResolvable, ... (readonly)

The parameters for the automatic snapshot add-on, such as the daily time when an automatic snapshot will be created.



808
809
810
# File 'lightsail/cfn_instance.rb', line 808

def auto_snapshot_add_on_request
  @auto_snapshot_add_on_request
end

#statusString? (readonly)

The status of the add-on.

Valid Values: Enabled | Disabled



815
816
817
# File 'lightsail/cfn_instance.rb', line 815

def status
  @status
end

Class Method Details

.jsii_propertiesObject



817
818
819
820
821
822
823
# File 'lightsail/cfn_instance.rb', line 817

def self.jsii_properties
  {
    :add_on_type => "addOnType",
    :auto_snapshot_add_on_request => "autoSnapshotAddOnRequest",
    :status => "status",
  }
end

Instance Method Details

#to_jsiiObject



825
826
827
828
829
830
831
832
833
# File 'lightsail/cfn_instance.rb', line 825

def to_jsii
  result = {}
  result.merge!({
    "addOnType" => @add_on_type,
    "autoSnapshotAddOnRequest" => @auto_snapshot_add_on_request,
    "status" => @status,
  })
  result.compact
end