policy_based_routes
Creates, updates, deletes, gets or lists a policy_based_routes
resource.
Overview
Name | policy_based_routes |
Type | Resource |
Id | google.networkconnectivity.policy_based_routes |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Immutable. A unique name of the resource in the form of projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id} |
createTime | string (google-datetime) | Output only. Time when the policy-based route was created. |
description | string | Optional. An optional description of this resource. Provide this field when you create the resource. |
filter | object | Required. The filter to match L4 traffic. (id: Filter) |
interconnectAttachment | object | Optional. The interconnect attachments that this policy-based route applies to. (id: InterconnectAttachment) |
kind | string | Output only. Type of this resource. Always networkconnectivity#policyBasedRoute for policy-based Route resources. |
labels | object | User-defined labels. |
network | string | Required. Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network. |
nextHopIlbIp | string | Optional. The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets. For this version, only nextHopIlbIp is supported. |
nextHopOtherRoutes | string | Optional. Other routes that will be referenced to determine the next hop of the packet. |
priority | integer (int32) | 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. |
selfLink | string | Output only. Server-defined fully-qualified URL for this resource. |
updateTime | string (google-datetime) | Output only. Time when the policy-based route was updated. |
virtualMachine | object | Optional. VM instances that this policy-based route applies to. (id: VirtualMachine) |
warnings | array | Output only. If potential misconfigurations are detected for this route, this field will be populated with warning messages. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Immutable. A unique name of the resource in the form of projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id} |
createTime | string (google-datetime) | Output only. Time when the policy-based route was created. |
description | string | Optional. An optional description of this resource. Provide this field when you create the resource. |
filter | object | Required. The filter to match L4 traffic. (id: Filter) |
interconnectAttachment | object | Optional. The interconnect attachments that this policy-based route applies to. (id: InterconnectAttachment) |
kind | string | Output only. Type of this resource. Always networkconnectivity#policyBasedRoute for policy-based Route resources. |
labels | object | User-defined labels. |
network | string | Required. Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network. |
nextHopIlbIp | string | Optional. The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets. For this version, only nextHopIlbIp is supported. |
nextHopOtherRoutes | string | Optional. Other routes that will be referenced to determine the next hop of the packet. |
priority | integer (int32) | 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. |
selfLink | string | Output only. Server-defined fully-qualified URL for this resource. |
updateTime | string (google-datetime) | Output only. Time when the policy-based route was updated. |
virtualMachine | object | Optional. VM instances that this policy-based route applies to. (id: VirtualMachine) |
warnings | array | Output only. If potential misconfigurations are detected for this route, this field will be populated with warning messages. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , policyBasedRoutesId | Gets details of a single policy-based route. | |
list | select | projectsId | pageSize , pageToken , filter , orderBy | Lists policy-based routes in a given project and location. |
create | insert | projectsId | policyBasedRouteId , requestId | Creates a new policy-based route in a given project and location. |
delete | delete | projectsId , policyBasedRoutesId | requestId | Deletes a single policy-based route. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
policyBasedRoutesId | string | |
projectsId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
policyBasedRouteId | string | |
requestId | string |
SELECT
examples
- get
- list
Gets details of a single policy-based route.
SELECT
name,
createTime,
description,
filter,
interconnectAttachment,
kind,
labels,
network,
nextHopIlbIp,
nextHopOtherRoutes,
priority,
selfLink,
updateTime,
virtualMachine,
warnings
FROM google.networkconnectivity.policy_based_routes
WHERE projectsId = '{{ projectsId }}' -- required
AND policyBasedRoutesId = '{{ policyBasedRoutesId }}' -- required;
Lists policy-based routes in a given project and location.
SELECT
name,
createTime,
description,
filter,
interconnectAttachment,
kind,
labels,
network,
nextHopIlbIp,
nextHopOtherRoutes,
priority,
selfLink,
updateTime,
virtualMachine,
warnings
FROM google.networkconnectivity.policy_based_routes
WHERE projectsId = '{{ projectsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a new policy-based route in a given project and location.
INSERT INTO google.networkconnectivity.policy_based_routes (
data__virtualMachine,
data__interconnectAttachment,
data__nextHopIlbIp,
data__nextHopOtherRoutes,
data__name,
data__labels,
data__description,
data__network,
data__filter,
data__priority,
projectsId,
policyBasedRouteId,
requestId
)
SELECT
'{{ virtualMachine }}',
'{{ interconnectAttachment }}',
'{{ nextHopIlbIp }}',
'{{ nextHopOtherRoutes }}',
'{{ name }}',
'{{ labels }}',
'{{ description }}',
'{{ network }}',
'{{ filter }}',
{{ priority }},
'{{ projectsId }}',
'{{ policyBasedRouteId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: policy_based_routes
props:
- name: projectsId
value: string
description: Required parameter for the policy_based_routes resource.
- name: virtualMachine
value: object
description: >
Optional. VM instances that this policy-based route applies to.
- name: interconnectAttachment
value: object
description: >
Optional. The interconnect attachments that this policy-based route applies to.
- name: nextHopIlbIp
value: string
description: >
Optional. The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets. For this version, only nextHopIlbIp is supported.
- name: nextHopOtherRoutes
value: string
description: >
Optional. Other routes that will be referenced to determine the next hop of the packet.
valid_values: ['OTHER_ROUTES_UNSPECIFIED', 'DEFAULT_ROUTING']
- name: name
value: string
description: >
Immutable. A unique name of the resource in the form of `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}`
- name: labels
value: object
description: >
User-defined labels.
- name: description
value: string
description: >
Optional. An optional description of this resource. Provide this field when you create the resource.
- name: network
value: string
description: >
Required. Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.
- name: filter
value: object
description: >
Required. The filter to match L4 traffic.
- name: priority
value: integer
description: >
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.
- name: policyBasedRouteId
value: string
- name: requestId
value: string
DELETE
examples
- delete
Deletes a single policy-based route.
DELETE FROM google.networkconnectivity.policy_based_routes
WHERE projectsId = '{{ projectsId }}' --required
AND policyBasedRoutesId = '{{ policyBasedRoutesId }}' --required
AND requestId = '{{ requestId }}';