Class: Google::Apis::ManagerV1beta2::AllowedRule

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/manager_v1beta2/classes.rb,
generated/google/apis/manager_v1beta2/representations.rb,
generated/google/apis/manager_v1beta2/representations.rb

Overview

An allowed port resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AllowedRule

Returns a new instance of AllowedRule



99
100
101
# File 'generated/google/apis/manager_v1beta2/classes.rb', line 99

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#ip_protocolString

?tcp?, ?udp? or ?icmp? Corresponds to the JSON property IPProtocol

Returns:

  • (String)


91
92
93
# File 'generated/google/apis/manager_v1beta2/classes.rb', line 91

def ip_protocol
  @ip_protocol
end

#portsArray<String>

List of ports or port ranges (Example inputs include: ["22"], [?33?, "12345- 12349"]. Corresponds to the JSON property ports

Returns:

  • (Array<String>)


97
98
99
# File 'generated/google/apis/manager_v1beta2/classes.rb', line 97

def ports
  @ports
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



104
105
106
107
# File 'generated/google/apis/manager_v1beta2/classes.rb', line 104

def update!(**args)
  @ip_protocol = args[:ip_protocol] if args.key?(:ip_protocol)
  @ports = args[:ports] if args.key?(:ports)
end