Module: Google::Cloud::NetworkManagement::V1::ReachabilityService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/network_management/v1/reachability_service/paths.rb

Overview

Path helper methods for the ReachabilityService API.

Instance Method Summary collapse

Instance Method Details

#connectivity_test_path(project:, test:) ⇒ ::String

Create a fully-qualified ConnectivityTest resource string.

The resource will be in the following format:

projects/{project}/locations/global/connectivityTests/{test}

Parameters:

  • project (String)
  • test (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


38
39
40
41
42
# File 'lib/google/cloud/network_management/v1/reachability_service/paths.rb', line 38

def connectivity_test_path project:, test:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/locations/global/connectivityTests/#{test}"
end