Module: Google::Cloud::NetworkConnectivity::V1beta::HubService::Paths

Extended by:
Paths
Included in:
Client, Paths
Defined in:
lib/google/cloud/network_connectivity/v1beta/hub_service/paths.rb

Overview

Path helper methods for the HubService API.

Instance Method Summary collapse

Instance Method Details

#gateway_advertised_route_path(project:, location:, spoke:, gateway_advertised_route:) ⇒ ::String

Create a fully-qualified GatewayAdvertisedRoute resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gateway_advertised_route}

Parameters:

  • project (String)
  • location (String)
  • spoke (String)
  • gateway_advertised_route (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


40
41
42
43
44
45
46
# File 'lib/google/cloud/network_connectivity/v1beta/hub_service/paths.rb', line 40

def gateway_advertised_route_path project:, location:, spoke:, gateway_advertised_route:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "spoke cannot contain /" if spoke.to_s.include? "/"

  "projects/#{project}/locations/#{location}/spokes/#{spoke}/gatewayAdvertisedRoutes/#{gateway_advertised_route}"
end

#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}

Parameters:

  • project (String)
  • hub (String)
  • group (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


60
61
62
63
64
65
# File 'lib/google/cloud/network_connectivity/v1beta/hub_service/paths.rb', line 60

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}

Parameters:

  • project (String)
  • hub (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


78
79
80
81
82
# File 'lib/google/cloud/network_connectivity/v1beta/hub_service/paths.rb', line 78

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}

Parameters:

  • project (String)
  • hub (String)
  • route_table (String)
  • route (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


97
98
99
100
101
102
103
# File 'lib/google/cloud/network_connectivity/v1beta/hub_service/paths.rb', line 97

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}

Parameters:

  • project (String)
  • zone (String)
  • instance (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


117
118
119
120
121
122
# File 'lib/google/cloud/network_connectivity/v1beta/hub_service/paths.rb', line 117

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}

Parameters:

  • project (String)
  • region (String)
  • resource_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


136
137
138
139
140
141
# File 'lib/google/cloud/network_connectivity/v1beta/hub_service/paths.rb', line 136

def interconnect_attachment_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}/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}

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


154
155
156
157
158
# File 'lib/google/cloud/network_connectivity/v1beta/hub_service/paths.rb', line 154

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}

Parameters:

  • project (String)
  • resource_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


171
172
173
174
175
# File 'lib/google/cloud/network_connectivity/v1beta/hub_service/paths.rb', line 171

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}

Parameters:

  • project (String)
  • hub (String)
  • route_table (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


189
190
191
192
193
194
# File 'lib/google/cloud/network_connectivity/v1beta/hub_service/paths.rb', line 189

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

#sac_attachment_path(project:, location:, sac_attachment:) ⇒ ::String

Create a fully-qualified SACAttachment resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/sacAttachments/{sac_attachment}

Parameters:

  • project (String)
  • location (String)
  • sac_attachment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


208
209
210
211
212
213
# File 'lib/google/cloud/network_connectivity/v1beta/hub_service/paths.rb', line 208

def sac_attachment_path project:, location:, sac_attachment:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/sacAttachments/#{sac_attachment}"
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}

Parameters:

  • project (String)
  • location (String)
  • spoke (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


227
228
229
230
231
232
# File 'lib/google/cloud/network_connectivity/v1beta/hub_service/paths.rb', line 227

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}

Parameters:

  • project (String)
  • region (String)
  • resource_id (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


246
247
248
249
250
251
# File 'lib/google/cloud/network_connectivity/v1beta/hub_service/paths.rb', line 246

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