Class: AWSCDK::EC2::ConnectionsProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::ConnectionsProps
- Defined in:
- ec2/connections_props.rb
Overview
Properties to intialize a new Connections object.
Instance Attribute Summary collapse
-
#default_port ⇒ AWSCDK::EC2::Port?
readonly
Default port range for initiating connections to and from this object.
-
#peer ⇒ AWSCDK::EC2::IPeer?
readonly
Class that represents the rule by which others can connect to this connectable.
-
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>?
readonly
What securityGroup(s) this object is managing connections for.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(default_port: nil, peer: nil, security_groups: nil) ⇒ ConnectionsProps
constructor
A new instance of ConnectionsProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(default_port: nil, peer: nil, security_groups: nil) ⇒ ConnectionsProps
Returns a new instance of ConnectionsProps.
10 11 12 13 14 15 16 17 |
# File 'ec2/connections_props.rb', line 10 def initialize(default_port: nil, peer: nil, security_groups: nil) @default_port = default_port Jsii::Type.check_type(@default_port, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlBvcnQifQ==")), "defaultPort") unless @default_port.nil? @peer = peer Jsii::Type.check_type(@peer, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklQZWVyIn0=")), "peer") unless @peer.nil? @security_groups = security_groups Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSVNlY3VyaXR5R3JvdXAifSwia2luZCI6ImFycmF5In19")), "securityGroups") unless @security_groups.nil? end |
Instance Attribute Details
#default_port ⇒ AWSCDK::EC2::Port? (readonly)
Note:
Default: - No default port
Default port range for initiating connections to and from this object.
23 24 25 |
# File 'ec2/connections_props.rb', line 23 def default_port @default_port end |
#peer ⇒ AWSCDK::EC2::IPeer? (readonly)
Note:
Default: Derived from securityGroup if set.
Class that represents the rule by which others can connect to this connectable.
This object is required, but will be derived from securityGroup if that is passed.
30 31 32 |
# File 'ec2/connections_props.rb', line 30 def peer @peer end |
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>? (readonly)
Note:
Default: No security groups
What securityGroup(s) this object is managing connections for.
35 36 37 |
# File 'ec2/connections_props.rb', line 35 def security_groups @security_groups end |
Class Method Details
.jsii_properties ⇒ Object
37 38 39 40 41 42 43 |
# File 'ec2/connections_props.rb', line 37 def self.jsii_properties { :default_port => "defaultPort", :peer => "peer", :security_groups => "securityGroups", } end |
Instance Method Details
#to_jsii ⇒ Object
45 46 47 48 49 50 51 52 53 |
# File 'ec2/connections_props.rb', line 45 def to_jsii result = {} result.merge!({ "defaultPort" => @default_port, "peer" => @peer, "securityGroups" => @security_groups, }) result.compact end |