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
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} |
description | string | Optional. An optional description of this resource. Provide this field when you create the resource. |
createTime | string | Output only. Time when the policy-based route was created. |
filter | object | Filter matches L4 traffic. |
interconnectAttachment | object | InterconnectAttachment that this route applies to. |
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 | 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 | Output only. Time when the policy-based route was updated. |
virtualMachine | object | VM instances that this policy-based route applies to. |
warnings | array | Output only. If potential misconfigurations are detected for this route, this field will be populated with warning messages. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | policyBasedRoutesId, projectsId | Gets details of a single policy-based route. |
list | SELECT | projectsId | Lists policy-based routes in a given project and location. |
create | INSERT | projectsId | Creates a new policy-based route in a given project and location. |
delete | DELETE | policyBasedRoutesId, projectsId | Deletes a single policy-based route. |
SELECT
examples
Lists policy-based routes in a given project and location.
SELECT
name,
description,
createTime,
filter,
interconnectAttachment,
kind,
labels,
network,
nextHopIlbIp,
nextHopOtherRoutes,
priority,
selfLink,
updateTime,
virtualMachine,
warnings
FROM google.networkconnectivity.policy_based_routes
WHERE projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new policy_based_routes
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.networkconnectivity.policy_based_routes (
projectsId,
virtualMachine,
interconnectAttachment,
nextHopIlbIp,
nextHopOtherRoutes,
name,
labels,
description,
network,
filter,
priority
)
SELECT
'{{ projectsId }}',
'{{ virtualMachine }}',
'{{ interconnectAttachment }}',
'{{ nextHopIlbIp }}',
'{{ nextHopOtherRoutes }}',
'{{ name }}',
'{{ labels }}',
'{{ description }}',
'{{ network }}',
'{{ filter }}',
'{{ priority }}'
;
- name: your_resource_model_name
props:
- name: virtualMachine
value:
- name: tags
value:
- string
- name: interconnectAttachment
value:
- name: region
value: string
- name: nextHopIlbIp
value: string
- name: nextHopOtherRoutes
value: string
- name: name
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: labels
value: object
- name: description
value: string
- name: network
value: string
- name: filter
value:
- name: ipProtocol
value: string
- name: srcRange
value: string
- name: destRange
value: string
- name: protocolVersion
value: string
- name: priority
value: integer
- name: warnings
value:
- - name: code
value: string
- name: data
value: object
- name: warningMessage
value: string
- name: selfLink
value: string
- name: kind
value: string
DELETE
example
Deletes the specified policy_based_routes
resource.
/*+ delete */
DELETE FROM google.networkconnectivity.policy_based_routes
WHERE policyBasedRoutesId = '{{ policyBasedRoutesId }}'
AND projectsId = '{{ projectsId }}';