Class: AWSCDK::Lightsail::CfnInstanceSnapshotProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lightsail::CfnInstanceSnapshotProps
- Defined in:
- lightsail/cfn_instance_snapshot_props.rb
Overview
Properties for defining a CfnInstanceSnapshot.
Instance Attribute Summary collapse
-
#instance_name ⇒ String
readonly
The name the user gave the instance (
Amazon_Linux_2023-1). -
#instance_snapshot_name ⇒ String
readonly
The name of the snapshot.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tag keys and optional values for the resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(instance_name:, instance_snapshot_name:, tags: nil) ⇒ CfnInstanceSnapshotProps
constructor
A new instance of CfnInstanceSnapshotProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(instance_name:, instance_snapshot_name:, tags: nil) ⇒ CfnInstanceSnapshotProps
Returns a new instance of CfnInstanceSnapshotProps.
12 13 14 15 16 17 18 19 |
# File 'lightsail/cfn_instance_snapshot_props.rb', line 12 def initialize(instance_name:, instance_snapshot_name:, tags: nil) @instance_name = instance_name Jsii::Type.check_type(@instance_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceName") @instance_snapshot_name = instance_snapshot_name Jsii::Type.check_type(@instance_snapshot_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceSnapshotName") @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#instance_name ⇒ String (readonly)
The name the user gave the instance ( Amazon_Linux_2023-1 ).
25 26 27 |
# File 'lightsail/cfn_instance_snapshot_props.rb', line 25 def instance_name @instance_name end |
#instance_snapshot_name ⇒ String (readonly)
The name of the snapshot.
30 31 32 |
# File 'lightsail/cfn_instance_snapshot_props.rb', line 30 def instance_snapshot_name @instance_snapshot_name end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The tag keys and optional values for the resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide .
37 38 39 |
# File 'lightsail/cfn_instance_snapshot_props.rb', line 37 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
39 40 41 42 43 44 45 |
# File 'lightsail/cfn_instance_snapshot_props.rb', line 39 def self.jsii_properties { :instance_name => "instanceName", :instance_snapshot_name => "instanceSnapshotName", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'lightsail/cfn_instance_snapshot_props.rb', line 47 def to_jsii result = {} result.merge!({ "instanceName" => @instance_name, "instanceSnapshotName" => @instance_snapshot_name, "tags" => @tags, }) result.compact end |