Module: Google::Cloud::NetworkSecurity::V1::SecurityProfileGroupService::Paths
- Extended by:
- Paths
- Defined in:
- lib/google/cloud/network_security/v1/security_profile_group_service/paths.rb
Overview
Path helper methods for the SecurityProfileGroupService API.
Instance Method Summary collapse
-
#intercept_endpoint_group_path(project:, location:, intercept_endpoint_group:) ⇒ ::String
Create a fully-qualified InterceptEndpointGroup resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#mirroring_endpoint_group_path(project:, location:, mirroring_endpoint_group:) ⇒ ::String
Create a fully-qualified MirroringEndpointGroup resource string.
-
#organization_location_path(organization:, location:) ⇒ ::String
Create a fully-qualified OrganizationLocation resource string.
-
#security_profile_group_path(**args) ⇒ ::String
Create a fully-qualified SecurityProfileGroup resource string.
-
#security_profile_path(**args) ⇒ ::String
Create a fully-qualified SecurityProfile resource string.
Instance Method Details
#intercept_endpoint_group_path(project:, location:, intercept_endpoint_group:) ⇒ ::String
Create a fully-qualified InterceptEndpointGroup resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/interceptEndpointGroups/{intercept_endpoint_group}
39 40 41 42 43 44 |
# File 'lib/google/cloud/network_security/v1/security_profile_group_service/paths.rb', line 39 def intercept_endpoint_group_path project:, location:, intercept_endpoint_group: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/interceptEndpointGroups/#{intercept_endpoint_group}" 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}
57 58 59 60 61 |
# File 'lib/google/cloud/network_security/v1/security_profile_group_service/paths.rb', line 57 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#mirroring_endpoint_group_path(project:, location:, mirroring_endpoint_group:) ⇒ ::String
Create a fully-qualified MirroringEndpointGroup resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/mirroringEndpointGroups/{mirroring_endpoint_group}
75 76 77 78 79 80 |
# File 'lib/google/cloud/network_security/v1/security_profile_group_service/paths.rb', line 75 def mirroring_endpoint_group_path project:, location:, mirroring_endpoint_group: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/mirroringEndpointGroups/#{mirroring_endpoint_group}" end |
#organization_location_path(organization:, location:) ⇒ ::String
Create a fully-qualified OrganizationLocation resource string.
The resource will be in the following format:
organizations/{organization}/locations/{location}
93 94 95 96 97 |
# File 'lib/google/cloud/network_security/v1/security_profile_group_service/paths.rb', line 93 def organization_location_path organization:, location: raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" "organizations/#{organization}/locations/#{location}" end |
#security_profile_group_path(organization:, location:, security_profile_group:) ⇒ ::String #security_profile_group_path(project:, location:, security_profile_group:) ⇒ ::String
Create a fully-qualified SecurityProfileGroup resource string.
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/google/cloud/network_security/v1/security_profile_group_service/paths.rb', line 164 def security_profile_group_path **args resources = { "location:organization:security_profile_group" => (proc do |organization:, location:, security_profile_group:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "organizations/#{organization}/locations/#{location}/securityProfileGroups/#{security_profile_group}" end), "location:project:security_profile_group" => (proc do |project:, location:, security_profile_group:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/securityProfileGroups/#{security_profile_group}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#security_profile_path(organization:, location:, security_profile:) ⇒ ::String #security_profile_path(project:, location:, security_profile:) ⇒ ::String
Create a fully-qualified SecurityProfile resource string.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/google/cloud/network_security/v1/security_profile_group_service/paths.rb', line 121 def security_profile_path **args resources = { "location:organization:security_profile" => (proc do |organization:, location:, security_profile:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "organizations/#{organization}/locations/#{location}/securityProfiles/#{security_profile}" end), "location:project:security_profile" => (proc do |project:, location:, security_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}/securityProfiles/#{security_profile}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |