module Google::Cloud::NetworkConnectivity::V1::HubService::Paths

Path helper methods for the HubService API.

Public Instance Methods

hub_path(project:, hub: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/") click to toggle source

Create a fully-qualified Hub resource string.

The resource will be in the following format:

`projects/{project}/locations/global/hubs/{hub}`

@param project [String] @param hub [String]

@return [::String]

# File lib/google/cloud/network_connectivity/v1/hub_service/paths.rb, line 38
def hub_path project:, hub:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/locations/global/hubs/#{hub}"
end
instance_path(project:, zone:, instance: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/") click to toggle source

Create a fully-qualified Instance resource string.

The resource will be in the following format:

`projects/{project}/zones/{zone}/instances/{instance}`

@param project [String] @param zone [String] @param instance [String]

@return [::String]

# File lib/google/cloud/network_connectivity/v1/hub_service/paths.rb, line 56
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: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/") click to toggle source

Create a fully-qualified InterconnectAttachment resource string.

The resource will be in the following format:

`projects/{project}/regions/{region}/interconnectAttachments/{resource_id}`

@param project [String] @param region [String] @param resource_id [String]

@return [::String]

# File lib/google/cloud/network_connectivity/v1/hub_service/paths.rb, line 75
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: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/") click to toggle source

Create a fully-qualified Location resource string.

The resource will be in the following format:

`projects/{project}/locations/{location}`

@param project [String] @param location [String]

@return [::String]

# File lib/google/cloud/network_connectivity/v1/hub_service/paths.rb, line 93
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: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/") click to toggle source

Create a fully-qualified Network resource string.

The resource will be in the following format:

`projects/{project}/global/networks/{resource_id}`

@param project [String] @param resource_id [String]

@return [::String]

# File lib/google/cloud/network_connectivity/v1/hub_service/paths.rb, line 110
def network_path project:, resource_id:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/global/networks/#{resource_id}"
end
spoke_path(project:, location:, spoke: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/") click to toggle source

Create a fully-qualified Spoke resource string.

The resource will be in the following format:

`projects/{project}/locations/{location}/spokes/{spoke}`

@param project [String] @param location [String] @param spoke [String]

@return [::String]

# File lib/google/cloud/network_connectivity/v1/hub_service/paths.rb, line 128
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: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/") click to toggle source

Create a fully-qualified VpnTunnel resource string.

The resource will be in the following format:

`projects/{project}/regions/{region}/vpnTunnels/{resource_id}`

@param project [String] @param region [String] @param resource_id [String]

@return [::String]

# File lib/google/cloud/network_connectivity/v1/hub_service/paths.rb, line 147
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