Module: Google::Cloud::NetworkConnectivity::V1::CrossNetworkAutomationService::Paths
- Extended by:
- Paths
- Defined in:
- lib/google/cloud/network_connectivity/v1/cross_network_automation_service/paths.rb
Overview
Path helper methods for the CrossNetworkAutomationService 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.
-
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
-
#service_attachment_path(project:, region:, service_attachment:) ⇒ ::String
Create a fully-qualified ServiceAttachment resource string.
-
#service_class_path(project:, location:, service_class:) ⇒ ::String
Create a fully-qualified ServiceClass resource string.
-
#service_connection_map_path(project:, location:, service_connection_map:) ⇒ ::String
Create a fully-qualified ServiceConnectionMap resource string.
-
#service_connection_policy_path(project:, location:, service_connection_policy:) ⇒ ::String
Create a fully-qualified ServiceConnectionPolicy resource string.
-
#service_connection_token_path(project:, location:, service_connection_token:) ⇒ ::String
Create a fully-qualified ServiceConnectionToken resource string.
-
#subnetwork_path(project:, region:, subnetwork:) ⇒ ::String
Create a fully-qualified Subnetwork 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/v1/cross_network_automation_service/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/v1/cross_network_automation_service/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 |
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
The resource will be in the following format:
projects/{project}
71 72 73 |
# File 'lib/google/cloud/network_connectivity/v1/cross_network_automation_service/paths.rb', line 71 def project_path project: "projects/#{project}" end |
#service_attachment_path(project:, region:, service_attachment:) ⇒ ::String
Create a fully-qualified ServiceAttachment resource string.
The resource will be in the following format:
projects/{project}/regions/{region}/serviceAttachments/{service_attachment}
87 88 89 90 91 92 |
# File 'lib/google/cloud/network_connectivity/v1/cross_network_automation_service/paths.rb', line 87 def project:, region:, service_attachment: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" "projects/#{project}/regions/#{region}/serviceAttachments/#{service_attachment}" end |
#service_class_path(project:, location:, service_class:) ⇒ ::String
Create a fully-qualified ServiceClass resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/serviceClasses/{service_class}
106 107 108 109 110 111 |
# File 'lib/google/cloud/network_connectivity/v1/cross_network_automation_service/paths.rb', line 106 def service_class_path project:, location:, service_class: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/serviceClasses/#{service_class}" end |
#service_connection_map_path(project:, location:, service_connection_map:) ⇒ ::String
Create a fully-qualified ServiceConnectionMap resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/serviceConnectionMaps/{service_connection_map}
125 126 127 128 129 130 |
# File 'lib/google/cloud/network_connectivity/v1/cross_network_automation_service/paths.rb', line 125 def service_connection_map_path project:, location:, service_connection_map: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/serviceConnectionMaps/#{service_connection_map}" end |
#service_connection_policy_path(project:, location:, service_connection_policy:) ⇒ ::String
Create a fully-qualified ServiceConnectionPolicy resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy}
144 145 146 147 148 149 |
# File 'lib/google/cloud/network_connectivity/v1/cross_network_automation_service/paths.rb', line 144 def service_connection_policy_path project:, location:, service_connection_policy: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/serviceConnectionPolicies/#{service_connection_policy}" end |
#service_connection_token_path(project:, location:, service_connection_token:) ⇒ ::String
Create a fully-qualified ServiceConnectionToken resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/serviceConnectionTokens/{service_connection_token}
163 164 165 166 167 168 |
# File 'lib/google/cloud/network_connectivity/v1/cross_network_automation_service/paths.rb', line 163 def service_connection_token_path project:, location:, service_connection_token: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/serviceConnectionTokens/#{service_connection_token}" end |
#subnetwork_path(project:, region:, subnetwork:) ⇒ ::String
Create a fully-qualified Subnetwork resource string.
The resource will be in the following format:
projects/{project}/regions/{region}/subnetworks/{subnetwork}
182 183 184 185 186 187 |
# File 'lib/google/cloud/network_connectivity/v1/cross_network_automation_service/paths.rb', line 182 def subnetwork_path project:, region:, subnetwork: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" "projects/#{project}/regions/#{region}/subnetworks/#{subnetwork}" end |