Class: CDK8sPlus25::PodConnectionsAllowFromOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
pod_connections_allow_from_options.rb

Overview

Options for PodConnections.allowFrom.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(isolation: nil, ports: nil) ⇒ PodConnectionsAllowFromOptions

Returns a new instance of PodConnectionsAllowFromOptions.

Parameters:



9
10
11
12
13
14
# File 'pod_connections_allow_from_options.rb', line 9

def initialize(isolation: nil, ports: nil)
  @isolation = isolation
  Jsii::Type.check_type(@isolation, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1LlBvZENvbm5lY3Rpb25zSXNvbGF0aW9uIn0=", "isolation") unless @isolation.nil?
  @ports = ports
  Jsii::Type.check_type(@ports, "eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImNkazhzLXBsdXMtMjUuTmV0d29ya1BvbGljeVBvcnQifSwia2luZCI6ImFycmF5In19", "ports") unless @ports.nil?
end

Instance Attribute Details

#isolationCDK8sPlus25::PodConnectionsIsolation? (readonly)

Note:

Default: - unset, isolates both the pod and the peer.

Which isolation should be applied to establish the connection.



20
21
22
# File 'pod_connections_allow_from_options.rb', line 20

def isolation
  @isolation
end

#portsArray<CDK8sPlus25::NetworkPolicyPort>? (readonly)

Note:

Default: - The pod ports.

Ports to allow incoming traffic to.

Returns:



25
26
27
# File 'pod_connections_allow_from_options.rb', line 25

def ports
  @ports
end

Class Method Details

.jsii_propertiesObject



27
28
29
30
31
32
# File 'pod_connections_allow_from_options.rb', line 27

def self.jsii_properties
  {
    :isolation => "isolation",
    :ports => "ports",
  }
end

Instance Method Details

#to_jsiiObject



34
35
36
37
38
39
40
41
# File 'pod_connections_allow_from_options.rb', line 34

def to_jsii
  result = {}
  result.merge!({
    "isolation" => @isolation,
    "ports" => @ports,
  })
  result.compact
end