Module: Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb
Overview
Path helper methods for the SystemPolicy API.
Instance Method Summary collapse
-
#policy_path(**args) ⇒ ::String
Create a fully-qualified Policy resource string.
Instance Method Details
#policy_path(project: ) ⇒ ::String #policy_path(location: ) ⇒ ::String
Create a fully-qualified Policy resource string.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb', line 45 def policy_path **args resources = { "project" => (proc do |project:| "projects/#{project}/policy" end), "location" => (proc do |location:| "locations/#{location}/policy" end) } resource = resources[args.keys.sort.join(":")] raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? resource.call(**args) end |