Class: AWSCDK::Lightsail::CfnDiskProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lightsail::CfnDiskProps
- Defined in:
- lightsail/cfn_disk_props.rb
Overview
Properties for defining a CfnDisk.
Instance Attribute Summary collapse
-
#add_ons ⇒ AWSCDK::IResolvable, ...
readonly
An array of add-ons for the disk.
-
#availability_zone ⇒ String?
readonly
The AWS Region and Availability Zone location for the disk (for example,
us-east-1a). -
#disk_name ⇒ String
readonly
The name of the disk.
-
#location ⇒ AWSCDK::IResolvable, ...
readonly
The AWS Region and Availability Zone where the disk is located.
-
#size_in_gb ⇒ Numeric
readonly
The size of the disk in GB.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
An array of key-value pairs to apply to this resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(disk_name:, size_in_gb:, add_ons: nil, availability_zone: nil, location: nil, tags: nil) ⇒ CfnDiskProps
constructor
A new instance of CfnDiskProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(disk_name:, size_in_gb:, add_ons: nil, availability_zone: nil, location: nil, tags: nil) ⇒ CfnDiskProps
Returns a new instance of CfnDiskProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lightsail/cfn_disk_props.rb', line 15 def initialize(disk_name:, size_in_gb:, add_ons: nil, availability_zone: nil, location: nil, tags: nil) @disk_name = disk_name Jsii::Type.check_type(@disk_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "diskName") @size_in_gb = size_in_gb Jsii::Type.check_type(@size_in_gb, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "sizeInGb") @add_ons = add_ons Jsii::Type.check_type(@add_ons, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGlnaHRzYWlsLkNmbkRpc2suQWRkT25Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "addOns") unless @add_ons.nil? @availability_zone = availability_zone Jsii::Type.check_type(@availability_zone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "availabilityZone") unless @availability_zone.nil? @location = location.is_a?(Hash) ? ::AWSCDK::Lightsail::CfnDisk::LocationProperty.new(**location.transform_keys(&:to_sym)) : location Jsii::Type.check_type(@location, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19saWdodHNhaWwuQ2ZuRGlzay5Mb2NhdGlvblByb3BlcnR5In1dfX0=")), "location") unless @location.nil? @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
#add_ons ⇒ AWSCDK::IResolvable, ... (readonly)
An array of add-ons for the disk.
If the disk has an add-on enabled when performing a delete disk request, the add-on is automatically disabled before the disk is deleted.
46 47 48 |
# File 'lightsail/cfn_disk_props.rb', line 46 def add_ons @add_ons end |
#availability_zone ⇒ String? (readonly)
The AWS Region and Availability Zone location for the disk (for example, us-east-1a ).
51 52 53 |
# File 'lightsail/cfn_disk_props.rb', line 51 def availability_zone @availability_zone end |
#disk_name ⇒ String (readonly)
The name of the disk.
34 35 36 |
# File 'lightsail/cfn_disk_props.rb', line 34 def disk_name @disk_name end |
#location ⇒ AWSCDK::IResolvable, ... (readonly)
The AWS Region and Availability Zone where the disk is located.
56 57 58 |
# File 'lightsail/cfn_disk_props.rb', line 56 def location @location end |
#size_in_gb ⇒ Numeric (readonly)
The size of the disk in GB.
39 40 41 |
# File 'lightsail/cfn_disk_props.rb', line 39 def size_in_gb @size_in_gb end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
An array of key-value pairs to apply to this resource.
For more information, see Tag in the AWS CloudFormation User Guide .
The
ValueofTagsis optional for Lightsail resources.
65 66 67 |
# File 'lightsail/cfn_disk_props.rb', line 65 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
67 68 69 70 71 72 73 74 75 76 |
# File 'lightsail/cfn_disk_props.rb', line 67 def self.jsii_properties { :disk_name => "diskName", :size_in_gb => "sizeInGb", :add_ons => "addOns", :availability_zone => "availabilityZone", :location => "location", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lightsail/cfn_disk_props.rb', line 78 def to_jsii result = {} result.merge!({ "diskName" => @disk_name, "sizeInGb" => @size_in_gb, "addOns" => @add_ons, "availabilityZone" => @availability_zone, "location" => @location, "tags" => @tags, }) result.compact end |