Class: AWSCDK::Lightsail::CfnInstance::NetworkingProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lightsail::CfnInstance::NetworkingProperty
- Defined in:
- lightsail/cfn_instance.rb
Overview
Networking is a property of the AWS::Lightsail::Instance resource. It describes the public ports and the monthly amount of data transfer allocated for the instance.
Instance Attribute Summary collapse
-
#monthly_transfer ⇒ AWSCDK::IResolvable, ...
readonly
The monthly amount of data transfer, in GB, allocated for the instance.
-
#ports ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Lightsail::CfnInstance::PortProperty>
readonly
An array of ports to open on the instance.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(ports:, monthly_transfer: nil) ⇒ NetworkingProperty
constructor
A new instance of NetworkingProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(ports:, monthly_transfer: nil) ⇒ NetworkingProperty
Returns a new instance of NetworkingProperty.
1113 1114 1115 1116 1117 1118 |
# File 'lightsail/cfn_instance.rb', line 1113 def initialize(ports:, monthly_transfer: nil) @ports = ports Jsii::Type.check_type(@ports, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGlnaHRzYWlsLkNmbkluc3RhbmNlLlBvcnRQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "ports") @monthly_transfer = monthly_transfer.is_a?(Hash) ? ::AWSCDK::Lightsail::CfnInstance::MonthlyTransferProperty.new(**monthly_transfer.transform_keys(&:to_sym)) : monthly_transfer Jsii::Type.check_type(@monthly_transfer, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19saWdodHNhaWwuQ2ZuSW5zdGFuY2UuTW9udGhseVRyYW5zZmVyUHJvcGVydHkifV19fQ==")), "monthlyTransfer") unless @monthly_transfer.nil? end |
Instance Attribute Details
#monthly_transfer ⇒ AWSCDK::IResolvable, ... (readonly)
The monthly amount of data transfer, in GB, allocated for the instance.
1129 1130 1131 |
# File 'lightsail/cfn_instance.rb', line 1129 def monthly_transfer @monthly_transfer end |
#ports ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Lightsail::CfnInstance::PortProperty> (readonly)
An array of ports to open on the instance.
1124 1125 1126 |
# File 'lightsail/cfn_instance.rb', line 1124 def ports @ports end |
Class Method Details
.jsii_properties ⇒ Object
1131 1132 1133 1134 1135 1136 |
# File 'lightsail/cfn_instance.rb', line 1131 def self.jsii_properties { :ports => "ports", :monthly_transfer => "monthlyTransfer", } end |
Instance Method Details
#to_jsii ⇒ Object
1138 1139 1140 1141 1142 1143 1144 1145 |
# File 'lightsail/cfn_instance.rb', line 1138 def to_jsii result = {} result.merge!({ "ports" => @ports, "monthlyTransfer" => @monthly_transfer, }) result.compact end |