Module: Google::Cloud::NetworkConnectivity::V1::HubService::Paths
- Extended by:
- Paths
- Defined in:
- lib/google/cloud/network_connectivity/v1/hub_service/paths.rb
Overview
Path helper methods for the HubService API.
Instance Method Summary collapse
-
#group_path(project:, hub:, group:) ⇒ ::String
Create a fully-qualified Group resource string.
-
#hub_path(project:, hub:) ⇒ ::String
Create a fully-qualified Hub resource string.
-
#hub_route_path(project:, hub:, route_table:, route:) ⇒ ::String
Create a fully-qualified HubRoute resource string.
-
#instance_path(project:, zone:, instance:) ⇒ ::String
Create a fully-qualified Instance resource string.
-
#interconnect_attachment_path(project:, region:, resource_id:) ⇒ ::String
Create a fully-qualified InterconnectAttachment resource string.
-
#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.
-
#route_table_path(project:, hub:, route_table:) ⇒ ::String
Create a fully-qualified RouteTable resource string.
-
#spoke_path(project:, location:, spoke:) ⇒ ::String
Create a fully-qualified Spoke resource string.
-
#vpn_tunnel_path(project:, region:, resource_id:) ⇒ ::String
Create a fully-qualified VpnTunnel resource string.
Instance Method Details
#group_path(project:, hub:, group:) ⇒ ::String
Create a fully-qualified Group resource string.
The resource will be in the following format:
projects/{project}/locations/global/hubs/{hub}/groups/{group}
39 40 41 42 43 44 |
# File 'lib/google/cloud/network_connectivity/v1/hub_service/paths.rb', line 39 def group_path project:, hub:, group: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "hub cannot contain /" if hub.to_s.include? "/" "projects/#{project}/locations/global/hubs/#{hub}/groups/#{group}" end |
#hub_path(project:, hub:) ⇒ ::String
Create a fully-qualified Hub resource string.
The resource will be in the following format:
projects/{project}/locations/global/hubs/{hub}
57 58 59 60 61 |
# File 'lib/google/cloud/network_connectivity/v1/hub_service/paths.rb', line 57 def hub_path project:, hub: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/global/hubs/#{hub}" end |
#hub_route_path(project:, hub:, route_table:, route:) ⇒ ::String
Create a fully-qualified HubRoute resource string.
The resource will be in the following format:
projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}/routes/{route}
76 77 78 79 80 81 82 |
# File 'lib/google/cloud/network_connectivity/v1/hub_service/paths.rb', line 76 def hub_route_path project:, hub:, route_table:, route: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "hub cannot contain /" if hub.to_s.include? "/" raise ::ArgumentError, "route_table cannot contain /" if route_table.to_s.include? "/" "projects/#{project}/locations/global/hubs/#{hub}/routeTables/#{route_table}/routes/#{route}" end |
#instance_path(project:, zone:, instance:) ⇒ ::String
Create a fully-qualified Instance resource string.
The resource will be in the following format:
projects/{project}/zones/{zone}/instances/{instance}
96 97 98 99 100 101 |
# File 'lib/google/cloud/network_connectivity/v1/hub_service/paths.rb', line 96 def instance_path project:, zone:, instance: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" "projects/#{project}/zones/#{zone}/instances/#{instance}" end |
#interconnect_attachment_path(project:, region:, resource_id:) ⇒ ::String
Create a fully-qualified InterconnectAttachment resource string.
The resource will be in the following format:
projects/{project}/regions/{region}/interconnectAttachments/{resource_id}
115 116 117 118 119 120 |
# File 'lib/google/cloud/network_connectivity/v1/hub_service/paths.rb', line 115 def project:, region:, resource_id: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" "projects/#{project}/regions/#{region}/interconnectAttachments/#{resource_id}" end |
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
The resource will be in the following format:
projects/{project}/locations/{location}
133 134 135 136 137 |
# File 'lib/google/cloud/network_connectivity/v1/hub_service/paths.rb', line 133 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}
150 151 152 153 154 |
# File 'lib/google/cloud/network_connectivity/v1/hub_service/paths.rb', line 150 def network_path project:, resource_id: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/global/networks/#{resource_id}" end |
#route_table_path(project:, hub:, route_table:) ⇒ ::String
Create a fully-qualified RouteTable resource string.
The resource will be in the following format:
projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}
168 169 170 171 172 173 |
# File 'lib/google/cloud/network_connectivity/v1/hub_service/paths.rb', line 168 def route_table_path project:, hub:, route_table: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "hub cannot contain /" if hub.to_s.include? "/" "projects/#{project}/locations/global/hubs/#{hub}/routeTables/#{route_table}" end |
#spoke_path(project:, location:, spoke:) ⇒ ::String
Create a fully-qualified Spoke resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/spokes/{spoke}
187 188 189 190 191 192 |
# File 'lib/google/cloud/network_connectivity/v1/hub_service/paths.rb', line 187 def spoke_path project:, location:, spoke: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/spokes/#{spoke}" end |
#vpn_tunnel_path(project:, region:, resource_id:) ⇒ ::String
Create a fully-qualified VpnTunnel resource string.
The resource will be in the following format:
projects/{project}/regions/{region}/vpnTunnels/{resource_id}
206 207 208 209 210 211 |
# File 'lib/google/cloud/network_connectivity/v1/hub_service/paths.rb', line 206 def vpn_tunnel_path project:, region:, resource_id: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" "projects/#{project}/regions/#{region}/vpnTunnels/#{resource_id}" end |