Class: Google::Apis::NetworksecurityV1::Rule
- Inherits:
-
Object
- Object
- Google::Apis::NetworksecurityV1::Rule
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/networksecurity_v1/classes.rb,
lib/google/apis/networksecurity_v1/representations.rb,
lib/google/apis/networksecurity_v1/representations.rb
Overview
Specification of rules.
Instance Attribute Summary collapse
-
#destinations ⇒ Array<Google::Apis::NetworksecurityV1::Destination>
Optional.
-
#sources ⇒ Array<Google::Apis::NetworksecurityV1::Source>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Rule
constructor
A new instance of Rule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Rule
Returns a new instance of Rule.
2488 2489 2490 |
# File 'lib/google/apis/networksecurity_v1/classes.rb', line 2488 def initialize(**args) update!(**args) end |
Instance Attribute Details
#destinations ⇒ Array<Google::Apis::NetworksecurityV1::Destination>
Optional. List of attributes for the traffic destination. All of the
destinations must match. A destination is a match if a request matches all the
specified hosts, ports, methods and headers. If not set, the action specified
in the 'action' field will be applied without any rule checks for the
destination.
Corresponds to the JSON property destinations
2478 2479 2480 |
# File 'lib/google/apis/networksecurity_v1/classes.rb', line 2478 def destinations @destinations end |
#sources ⇒ Array<Google::Apis::NetworksecurityV1::Source>
Optional. List of attributes for the traffic source. All of the sources must
match. A source is a match if both principals and ip_blocks match. If not set,
the action specified in the 'action' field will be applied without any rule
checks for the source.
Corresponds to the JSON property sources
2486 2487 2488 |
# File 'lib/google/apis/networksecurity_v1/classes.rb', line 2486 def sources @sources end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2493 2494 2495 2496 |
# File 'lib/google/apis/networksecurity_v1/classes.rb', line 2493 def update!(**args) @destinations = args[:destinations] if args.key?(:destinations) @sources = args[:sources] if args.key?(:sources) end |