Class: AWSCDK::Lightsail::CfnDiskSnapshotProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lightsail::CfnDiskSnapshotProps
- Defined in:
- lightsail/cfn_disk_snapshot_props.rb
Overview
Properties for defining a CfnDiskSnapshot.
Instance Attribute Summary collapse
-
#disk_name ⇒ String
readonly
The unique name of the disk.
-
#disk_snapshot_name ⇒ String
readonly
The name of the disk snapshot (
my-disk-snapshot). -
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tag keys and optional values for the resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(disk_name:, disk_snapshot_name:, tags: nil) ⇒ CfnDiskSnapshotProps
constructor
A new instance of CfnDiskSnapshotProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(disk_name:, disk_snapshot_name:, tags: nil) ⇒ CfnDiskSnapshotProps
Returns a new instance of CfnDiskSnapshotProps.
12 13 14 15 16 17 18 19 |
# File 'lightsail/cfn_disk_snapshot_props.rb', line 12 def initialize(disk_name:, disk_snapshot_name:, tags: nil) @disk_name = disk_name Jsii::Type.check_type(@disk_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "diskName") @disk_snapshot_name = disk_snapshot_name Jsii::Type.check_type(@disk_snapshot_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "diskSnapshotName") @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
#disk_name ⇒ String (readonly)
The unique name of the disk.
25 26 27 |
# File 'lightsail/cfn_disk_snapshot_props.rb', line 25 def disk_name @disk_name end |
#disk_snapshot_name ⇒ String (readonly)
The name of the disk snapshot ( my-disk-snapshot ).
30 31 32 |
# File 'lightsail/cfn_disk_snapshot_props.rb', line 30 def disk_snapshot_name @disk_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_disk_snapshot_props.rb', line 37 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
39 40 41 42 43 44 45 |
# File 'lightsail/cfn_disk_snapshot_props.rb', line 39 def self.jsii_properties { :disk_name => "diskName", :disk_snapshot_name => "diskSnapshotName", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'lightsail/cfn_disk_snapshot_props.rb', line 47 def to_jsii result = {} result.merge!({ "diskName" => @disk_name, "diskSnapshotName" => @disk_snapshot_name, "tags" => @tags, }) result.compact end |