Module: Google::Cloud::CloudSecurityCompliance::V1::Deployment::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb
Overview
Path helper methods for the Deployment API.
Instance Method Summary collapse
-
#cloud_control_deployment_path(**args) ⇒ ::String
Create a fully-qualified CloudControlDeployment resource string.
-
#framework_deployment_path(**args) ⇒ ::String
Create a fully-qualified FrameworkDeployment resource string.
-
#framework_path(**args) ⇒ ::String
Create a fully-qualified Framework resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#organization_location_path(organization:, location:) ⇒ ::String
Create a fully-qualified OrganizationLocation resource string.
Instance Method Details
#cloud_control_deployment_path(organization:, location:, cloud_control_deployment:) ⇒ ::String #cloud_control_deployment_path(project:, location:, cloud_control_deployment:) ⇒ ::String
Create a fully-qualified CloudControlDeployment resource string.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb', line 49 def cloud_control_deployment_path **args resources = { "cloud_control_deployment:location:organization" => (proc do |organization:, location:, cloud_control_deployment:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "organizations/#{organization}/locations/#{location}/cloudControlDeployments/#{cloud_control_deployment}" end), "cloud_control_deployment:location:project" => (proc do |project:, location:, cloud_control_deployment:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/cloudControlDeployments/#{cloud_control_deployment}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#framework_deployment_path(organization:, location:, framework_deployment:) ⇒ ::String #framework_deployment_path(project:, location:, framework_deployment:) ⇒ ::String
Create a fully-qualified FrameworkDeployment resource string.
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb', line 135 def framework_deployment_path **args resources = { "framework_deployment:location:organization" => (proc do |organization:, location:, framework_deployment:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "organizations/#{organization}/locations/#{location}/frameworkDeployments/#{framework_deployment}" end), "framework_deployment:location:project" => (proc do |project:, location:, framework_deployment:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/frameworkDeployments/#{framework_deployment}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#framework_path(organization:, location:, framework:) ⇒ ::String #framework_path(project:, location:, framework:) ⇒ ::String
Create a fully-qualified Framework resource string.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb', line 92 def framework_path **args resources = { "framework:location:organization" => (proc do |organization:, location:, framework:| raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "organizations/#{organization}/locations/#{location}/frameworks/#{framework}" end), "framework:location:project" => (proc do |project:, location:, framework:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/frameworks/#{framework}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) 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}
167 168 169 170 171 |
# File 'lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb', line 167 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" 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}
184 185 186 187 188 |
# File 'lib/google/cloud/cloud_security_compliance/v1/deployment/paths.rb', line 184 def organization_location_path organization:, location: raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" "organizations/#{organization}/locations/#{location}" end |