Module: Google::Cloud::NetworkConnectivity::V1::PolicyBasedRoutingService::Paths
- Extended by:
- Paths
- Defined in:
- lib/google/cloud/network_connectivity/v1/policy_based_routing_service/paths.rb
Overview
Path helper methods for the PolicyBasedRoutingService API.
Instance Method Summary collapse
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#network_path(project:, resource_id:) ⇒ ::String
Create a fully-qualified Network resource string.
-
#policy_based_route_path(project:, policy_based_route:) ⇒ ::String
Create a fully-qualified PolicyBasedRoute resource string.
Instance Method Details
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
The resource will be in the following format:
projects/{project}/locations/{location}
38 39 40 41 42 |
# File 'lib/google/cloud/network_connectivity/v1/policy_based_routing_service/paths.rb', line 38 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#network_path(project:, resource_id:) ⇒ ::String
Create a fully-qualified Network resource string.
The resource will be in the following format:
projects/{project}/global/networks/{resource_id}
55 56 57 58 59 |
# File 'lib/google/cloud/network_connectivity/v1/policy_based_routing_service/paths.rb', line 55 def network_path project:, resource_id: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/global/networks/#{resource_id}" end |
#policy_based_route_path(project:, policy_based_route:) ⇒ ::String
Create a fully-qualified PolicyBasedRoute resource string.
The resource will be in the following format:
projects/{project}/locations/global/PolicyBasedRoutes/{policy_based_route}
72 73 74 75 76 |
# File 'lib/google/cloud/network_connectivity/v1/policy_based_routing_service/paths.rb', line 72 def policy_based_route_path project:, policy_based_route: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/global/PolicyBasedRoutes/#{policy_based_route}" end |