Module: Google::Cloud::NetworkConnectivity::V1beta::TransportManager::Paths
- Extended by:
- Paths
- Defined in:
- lib/google/cloud/network_connectivity/v1beta/transport_manager/paths.rb
Overview
Path helper methods for the TransportManager 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.
-
#remote_transport_profile_path(project:, location:, remote_transport_profile:) ⇒ ::String
Create a fully-qualified RemoteTransportProfile resource string.
-
#transport_path(project:, location:, transport:) ⇒ ::String
Create a fully-qualified Transport 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/v1beta/transport_manager/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/v1beta/transport_manager/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 |
#remote_transport_profile_path(project:, location:, remote_transport_profile:) ⇒ ::String
Create a fully-qualified RemoteTransportProfile resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/remoteTransportProfiles/{remote_transport_profile}
73 74 75 76 77 78 |
# File 'lib/google/cloud/network_connectivity/v1beta/transport_manager/paths.rb', line 73 def remote_transport_profile_path project:, location:, remote_transport_profile: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/remoteTransportProfiles/#{remote_transport_profile}" end |
#transport_path(project:, location:, transport:) ⇒ ::String
Create a fully-qualified Transport resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/transports/{transport}
92 93 94 95 96 97 |
# File 'lib/google/cloud/network_connectivity/v1beta/transport_manager/paths.rb', line 92 def transport_path project:, location:, transport: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/transports/#{transport}" end |