Class: Google::Apis::SecuritycenterV1beta2::GoogleCloudSecuritycenterV2IpRule

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

Overview

IP rule information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudSecuritycenterV2IpRule

Returns a new instance of GoogleCloudSecuritycenterV2IpRule.



7253
7254
7255
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 7253

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

Instance Attribute Details

#port_rangesArray<Google::Apis::SecuritycenterV1beta2::GoogleCloudSecuritycenterV2PortRange>

Optional. An optional list of ports to which this rule applies. This field is only applicable for the UDP or (S)TCP protocols. Each entry must be either an integer or a range including a min and max port number. Corresponds to the JSON property portRanges



7244
7245
7246
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 7244

def port_ranges
  @port_ranges
end

#protocolString

The IP protocol this rule applies to. This value can either be one of the following well known protocol strings (TCP, UDP, ICMP, ESP, AH, IPIP, SCTP) or a string representation of the integer value. Corresponds to the JSON property protocol

Returns:

  • (String)


7251
7252
7253
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 7251

def protocol
  @protocol
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7258
7259
7260
7261
# File 'lib/google/apis/securitycenter_v1beta2/classes.rb', line 7258

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