Class: Google::Apis::NetworkconnectivityV1::PolicyBasedRoute
- Inherits:
-
Object
- Object
- Google::Apis::NetworkconnectivityV1::PolicyBasedRoute
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/networkconnectivity_v1/classes.rb,
lib/google/apis/networkconnectivity_v1/representations.rb,
lib/google/apis/networkconnectivity_v1/representations.rb
Overview
Policy Based Routes (PBR) are more powerful routes that allows GCP customers to route their L4 network traffic based on not just destination IP, but also source IP, protocol and more. A PBR always take precedence when it conflicts with other types of routes. Next id: 22
Instance Attribute Summary collapse
-
#create_time ⇒ String
Output only.
-
#description ⇒ String
Optional.
-
#filter ⇒ Google::Apis::NetworkconnectivityV1::Filter
Filter matches L4 traffic.
-
#interconnect_attachment ⇒ Google::Apis::NetworkconnectivityV1::InterconnectAttachment
InterconnectAttachment to which this route applies to.
-
#kind ⇒ String
Output only.
-
#labels ⇒ Hash<String,String>
User-defined labels.
-
#name ⇒ String
Immutable.
-
#network ⇒ String
Required.
-
#next_hop_ilb_ip ⇒ String
Optional.
-
#next_hop_other_routes ⇒ String
Optional.
-
#priority ⇒ Fixnum
Optional.
-
#self_link ⇒ String
Output only.
-
#update_time ⇒ String
Output only.
-
#virtual_machine ⇒ Google::Apis::NetworkconnectivityV1::VirtualMachine
VM instances to which this policy based route applies to.
-
#warnings ⇒ Array<Google::Apis::NetworkconnectivityV1::Warnings>
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ PolicyBasedRoute
constructor
A new instance of PolicyBasedRoute.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ PolicyBasedRoute
Returns a new instance of PolicyBasedRoute.
1817 1818 1819 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1817 def initialize(**args) update!(**args) end |
Instance Attribute Details
#create_time ⇒ String
Output only. Time when the PolicyBasedRoute was created.
Corresponds to the JSON property createTime
1733 1734 1735 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1733 def create_time @create_time end |
#description ⇒ String
Optional. An optional description of this resource. Provide this field when
you create the resource.
Corresponds to the JSON property description
1739 1740 1741 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1739 def description @description end |
#filter ⇒ Google::Apis::NetworkconnectivityV1::Filter
Filter matches L4 traffic.
Corresponds to the JSON property filter
1744 1745 1746 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1744 def filter @filter end |
#interconnect_attachment ⇒ Google::Apis::NetworkconnectivityV1::InterconnectAttachment
InterconnectAttachment to which this route applies to.
Corresponds to the JSON property interconnectAttachment
1749 1750 1751 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1749 def @interconnect_attachment end |
#kind ⇒ String
Output only. Type of this resource. Always networkconnectivity#
policyBasedRoute for Policy Based Route resources.
Corresponds to the JSON property kind
1755 1756 1757 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1755 def kind @kind end |
#labels ⇒ Hash<String,String>
User-defined labels.
Corresponds to the JSON property labels
1760 1761 1762 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1760 def labels @labels end |
#name ⇒ String
Immutable. A unique name of the resource in the form of projects/
project_number/locations/global/PolicyBasedRoutes/policy_based_route_id`
Corresponds to the JSON propertyname`
1766 1767 1768 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1766 def name @name end |
#network ⇒ String
Required. Fully-qualified URL of the network that this route applies to. e.g.
projects/my-project/global/networks/my-network.
Corresponds to the JSON property network
1772 1773 1774 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1772 def network @network end |
#next_hop_ilb_ip ⇒ String
Optional. The IP of a global access enabled L4 ILB that should be the next hop
to handle matching packets. For this version, only next_hop_ilb_ip is
supported.
Corresponds to the JSON property nextHopIlbIp
1779 1780 1781 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1779 def next_hop_ilb_ip @next_hop_ilb_ip end |
#next_hop_other_routes ⇒ String
Optional. Other routes that will be referenced to determine the next hop of
the packet.
Corresponds to the JSON property nextHopOtherRoutes
1785 1786 1787 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1785 def next_hop_other_routes @next_hop_other_routes end |
#priority ⇒ Fixnum
Optional. The priority of this policy based route. Priority is used to break
ties in cases where there are more than one matching policy based routes found.
In cases where multiple policy based routes are matched, the one with the
lowest-numbered priority value wins. The default value is 1000. The priority
value must be from 1 to 65535, inclusive.
Corresponds to the JSON property priority
1794 1795 1796 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1794 def priority @priority end |
#self_link ⇒ String
Output only. Server-defined fully-qualified URL for this resource.
Corresponds to the JSON property selfLink
1799 1800 1801 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1799 def self_link @self_link end |
#update_time ⇒ String
Output only. Time when the PolicyBasedRoute was updated.
Corresponds to the JSON property updateTime
1804 1805 1806 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1804 def update_time @update_time end |
#virtual_machine ⇒ Google::Apis::NetworkconnectivityV1::VirtualMachine
VM instances to which this policy based route applies to.
Corresponds to the JSON property virtualMachine
1809 1810 1811 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1809 def virtual_machine @virtual_machine end |
#warnings ⇒ Array<Google::Apis::NetworkconnectivityV1::Warnings>
Output only. If potential misconfigurations are detected for this route, this
field will be populated with warning messages.
Corresponds to the JSON property warnings
1815 1816 1817 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1815 def warnings @warnings end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 |
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 1822 def update!(**args) @create_time = args[:create_time] if args.key?(:create_time) @description = args[:description] if args.key?(:description) @filter = args[:filter] if args.key?(:filter) @interconnect_attachment = args[:interconnect_attachment] if args.key?(:interconnect_attachment) @kind = args[:kind] if args.key?(:kind) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @network = args[:network] if args.key?(:network) @next_hop_ilb_ip = args[:next_hop_ilb_ip] if args.key?(:next_hop_ilb_ip) @next_hop_other_routes = args[:next_hop_other_routes] if args.key?(:next_hop_other_routes) @priority = args[:priority] if args.key?(:priority) @self_link = args[:self_link] if args.key?(:self_link) @update_time = args[:update_time] if args.key?(:update_time) @virtual_machine = args[:virtual_machine] if args.key?(:virtual_machine) @warnings = args[:warnings] if args.key?(:warnings) end |