Module: Google::Cloud::OsConfig::V1::OsConfigZonalService::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/os_config/v1/os_config_zonal_service/paths.rb
Overview
Path helper methods for the OsConfigZonalService API.
Instance Method Summary collapse
-
#instance_os_policy_assignment_path(project:, location:, instance:, assignment:) ⇒ ::String
Create a fully-qualified InstanceOSPolicyAssignment resource string.
-
#instance_path(**args) ⇒ ::String
Create a fully-qualified Instance resource string.
-
#inventory_path(project:, location:, instance:) ⇒ ::String
Create a fully-qualified Inventory resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#os_policy_assignment_path(project:, location:, os_policy_assignment:) ⇒ ::String
Create a fully-qualified OSPolicyAssignment resource string.
-
#os_policy_assignment_report_path(project:, location:, instance:, assignment:) ⇒ ::String
Create a fully-qualified OSPolicyAssignmentReport resource string.
-
#vulnerability_report_path(project:, location:, instance:) ⇒ ::String
Create a fully-qualified VulnerabilityReport resource string.
Instance Method Details
#instance_os_policy_assignment_path(project:, location:, instance:, assignment:) ⇒ ::String
Create a fully-qualified InstanceOSPolicyAssignment resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}
83 84 85 86 87 88 89 |
# File 'lib/google/cloud/os_config/v1/os_config_zonal_service/paths.rb', line 83 def instance_os_policy_assignment_path project:, location:, instance:, assignment: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" "projects/#{project}/locations/#{location}/instances/#{instance}/osPolicyAssignments/#{assignment}" end |
#instance_path(project: , zone: , instance: ) ⇒ ::String #instance_path(project: , location: , instance: ) ⇒ ::String
Create a fully-qualified Instance 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/os_config/v1/os_config_zonal_service/paths.rb', line 49 def instance_path **args resources = { "instance:project:zone" => (proc do |project:, zone:, instance:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/" "projects/#{project}/zones/#{zone}/instances/#{instance}" end), "instance:location:project" => (proc do |project:, location:, instance:| raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/instances/#{instance}" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |
#inventory_path(project:, location:, instance:) ⇒ ::String
Create a fully-qualified Inventory resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/instances/{instance}/inventory
103 104 105 106 107 108 |
# File 'lib/google/cloud/os_config/v1/os_config_zonal_service/paths.rb', line 103 def inventory_path project:, location:, instance: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/instances/#{instance}/inventory" 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}
121 122 123 124 125 |
# File 'lib/google/cloud/os_config/v1/os_config_zonal_service/paths.rb', line 121 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#os_policy_assignment_path(project:, location:, os_policy_assignment:) ⇒ ::String
Create a fully-qualified OSPolicyAssignment resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}
139 140 141 142 143 144 |
# File 'lib/google/cloud/os_config/v1/os_config_zonal_service/paths.rb', line 139 def os_policy_assignment_path project:, location:, os_policy_assignment: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/osPolicyAssignments/#{os_policy_assignment}" end |
#os_policy_assignment_report_path(project:, location:, instance:, assignment:) ⇒ ::String
Create a fully-qualified OSPolicyAssignmentReport resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report
159 160 161 162 163 164 165 |
# File 'lib/google/cloud/os_config/v1/os_config_zonal_service/paths.rb', line 159 def os_policy_assignment_report_path project:, location:, instance:, assignment: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" "projects/#{project}/locations/#{location}/instances/#{instance}/osPolicyAssignments/#{assignment}/report" end |
#vulnerability_report_path(project:, location:, instance:) ⇒ ::String
Create a fully-qualified VulnerabilityReport resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport
179 180 181 182 183 184 |
# File 'lib/google/cloud/os_config/v1/os_config_zonal_service/paths.rb', line 179 def vulnerability_report_path project:, location:, instance: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/instances/#{instance}/vulnerabilityReport" end |