Class: AWSCDK::Lightsail::CfnDisk::AddOnProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lightsail::CfnDisk::AddOnProperty
- 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
-
#add_on_type ⇒ String
readonly
The add-on type (for example,
AutoSnapshot). -
#auto_snapshot_add_on_request ⇒ AWSCDK::IResolvable, ...
readonly
The parameters for the automatic snapshot add-on, such as the daily time when an automatic snapshot will be created.
-
#status ⇒ String?
readonly
The status of the add-on.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(add_on_type:, auto_snapshot_add_on_request: nil, status: nil) ⇒ AddOnProperty
constructor
A new instance of AddOnProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(add_on_type:, auto_snapshot_add_on_request: nil, status: nil) ⇒ AddOnProperty
Returns a new instance of AddOnProperty.
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_type ⇒ String (readonly)
The add-on type (for example, AutoSnapshot ).
AutoSnapshotis 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_request ⇒ AWSCDK::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 |
#status ⇒ String? (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_properties ⇒ Object
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_jsii ⇒ Object
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 |