Class: AWSCDK::Lightsail::CfnInstance::AddOnProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lightsail::CfnInstance::AddOnProperty
- 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
-
#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.
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_type ⇒ String (readonly)
The add-on type (for example, AutoSnapshot ).
AutoSnapshotis 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_request ⇒ AWSCDK::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 |
#status ⇒ String? (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_properties ⇒ Object
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_jsii ⇒ Object
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 |