Service Client: Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::PolicyBasedRoutingServiceClient

Client stub representing the remote PolicyBasedRoutingService gRPC service. Delegates call dispatching to Google::gRPC::Client.

target

The endpoint target address. Defaults to networkconnectivity.googleapis.com:443.

credentials

The authentication credentials provider. Defaults to application default credentials via Google::Auth.

NAME

Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting - Compiled Protocol Buffers messages for google/cloud/networkconnectivity/v1beta/policy_based_routing.proto

SYNOPSIS

use Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting;

my $msg = Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::PolicyBasedRoute->new({
    virtual_machine => $virtual_machine,
    interconnect_attachment => $interconnect_attachment,
    next_hop_ilb_ip => $next_hop_ilb_ip,
    next_hop_other_routes => $next_hop_other_routes,
});

# Read or update a field
my $val = $msg->virtual_machine();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::PolicyBasedRoute->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/networkconnectivity/v1beta/policy_based_routing.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::PolicyBasedRoute

Policy-based routes route L4 network traffic based on not just destination IP address, but also source IP address, protocol, and more. If a policy-based route conflicts with other types of routes, the policy-based route always takes precedence.

Inherits from Protobuf::Message.

Accessors

  • $msg->virtual_machine() / $msg->virtual_machine($value)

    Type: Message (Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::PolicyBasedRoute::VirtualMachine)

    Optional. VM instances that this policy-based route applies to.

  • $msg->interconnect_attachment() / $msg->interconnect_attachment($value)

    Type: Message (Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::PolicyBasedRoute::InterconnectAttachment)

    Optional. The interconnect attachments that this policy-based route applies to.

  • $msg->next_hop_ilb_ip() / $msg->next_hop_ilb_ip($value)

    Type: 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.

  • $msg->next_hop_other_routes() / $msg->next_hop_other_routes($value)

    Type: Enum (Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRoute::OtherRoutes)

    Optional. Other routes that will be referenced to determine the next hop of the packet.

  • $msg->name() / $msg->name($value)

    Type: String

    Immutable. Identifier. A unique name of the resource in the form of `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}`

  • $msg->create_time() / $msg->create_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. Time when the policy-based route was created.

  • $msg->update_time() / $msg->update_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. Time when the policy-based route was updated.

  • $msg->labels() / $msg->labels($value)

    Type: Message (Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::PolicyBasedRoute::LabelsEntry)

    User-defined labels.

  • $msg->description() / $msg->description($value)

    Type: String

    Optional. An optional description of this resource. Provide this field when you create the resource.

  • $msg->network() / $msg->network($value)

    Type: String

    Required. Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.

  • $msg->filter() / $msg->filter($value)

    Type: Message (Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::PolicyBasedRoute::Filter)

    Required. The filter to match L4 traffic.

  • $msg->priority() / $msg->priority($value)

    Type: 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.

  • $msg->warnings() / $msg->warnings($value)

    Type: Message (Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::PolicyBasedRoute::Warnings)

    Output only. If potential misconfigurations are detected for this route, this field will be populated with warning messages.

  • $msg->self_link() / $msg->self_link($value)

    Type: String

    Output only. Server-defined fully-qualified URL for this resource.

  • $msg->kind() / $msg->kind($value)

    Type: String

    Output only. Type of this resource. Always networkconnectivity#policyBasedRoute for policy-based Route resources.

Enum: PolicyBasedRoute::OtherRoutes

  • OTHER_ROUTES_UNSPECIFIED => 0

  • DEFAULT_ROUTING => 1

Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::ListPolicyBasedRoutesRequest

Request for [PolicyBasedRoutingService.ListPolicyBasedRoutes][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.ListPolicyBasedRoutes] method.

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The parent resource's name.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    The maximum number of results per page that should be returned.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    The page token.

  • $msg->filter() / $msg->filter($value)

    Type: String

    A filter expression that filters the results listed in the response.

  • $msg->order_by() / $msg->order_by($value)

    Type: String

    Sort the results by a certain order.

Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::ListPolicyBasedRoutesResponse

Response for [PolicyBasedRoutingService.ListPolicyBasedRoutes][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.ListPolicyBasedRoutes] method.

Inherits from Protobuf::Message.

Accessors

  • $msg->policy_based_routes() / $msg->policy_based_routes($value)

    Type: Message (Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::PolicyBasedRoute)

    Policy-based routes to be returned.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.

  • $msg->unreachable() / $msg->unreachable($value)

    Type: String

    Locations that could not be reached.

Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::GetPolicyBasedRouteRequest

Request for [PolicyBasedRoutingService.GetPolicyBasedRoute][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.GetPolicyBasedRoute] method.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. Name of the PolicyBasedRoute resource to get.

Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::CreatePolicyBasedRouteRequest

Request for [PolicyBasedRoutingService.CreatePolicyBasedRoute][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.CreatePolicyBasedRoute] method.

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The parent resource's name of the PolicyBasedRoute.

  • $msg->policy_based_route_id() / $msg->policy_based_route_id($value)

    Type: String

    Required. Unique id for the policy-based route to create. Provided by the client when the resource is created. The name must comply with https://google.aip.dev/122#resource-id-segments. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([a-z0-9-]*[a-z0-9])?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.

  • $msg->policy_based_route() / $msg->policy_based_route($value)

    Type: Message (Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::PolicyBasedRoute)

    Required. Initial values for a new policy-based route.

  • $msg->request_id() / $msg->request_id($value)

    Type: String

    Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::DeletePolicyBasedRouteRequest

Request for [PolicyBasedRoutingService.DeletePolicyBasedRoute][google.cloud.networkconnectivity.v1beta.PolicyBasedRoutingService.DeletePolicyBasedRoute] method.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. Name of the policy-based route resource to delete.

  • $msg->request_id() / $msg->request_id($value)

    Type: String

    Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Networkconnectivity::V1beta::PolicyBasedRouting::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.