Class: AWSCDK::Lightsail::CfnDisk::AddOnProperty

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

Overview

AddOn is a property of the AWS::Lightsail::Disk resource. It describes the add-ons for a disk.

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::CfnDisk::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.



669
670
671
672
673
674
675
676
# File 'lightsail/cfn_disk.rb', line 669

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::CfnDisk::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("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19saWdodHNhaWwuQ2ZuRGlzay5BdXRvU25hcHNob3RBZGRPblByb3BlcnR5In1dfX0=")), "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 a disk.



684
685
686
# File 'lightsail/cfn_disk.rb', line 684

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.



689
690
691
# File 'lightsail/cfn_disk.rb', line 689

def auto_snapshot_add_on_request
  @auto_snapshot_add_on_request
end

#statusString? (readonly)

The status of the add-on.

Valid Values: Enabled | Disabled



696
697
698
# File 'lightsail/cfn_disk.rb', line 696

def status
  @status
end

Class Method Details

.jsii_propertiesObject



698
699
700
701
702
703
704
# File 'lightsail/cfn_disk.rb', line 698

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

Instance Method Details

#to_jsiiObject



706
707
708
709
710
711
712
713
714
# File 'lightsail/cfn_disk.rb', line 706

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