module Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Paths
Path helper methods for the BinauthzManagementService
API.
Public Instance Methods
attestor_path(project:, attestor: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/")
click to toggle source
Create a fully-qualified Attestor resource string.
The resource will be in the following format:
‘projects/{project}/attestors/{attestor}`
@param project [String] @param attestor [String]
@return [::String]
# File lib/google/cloud/binary_authorization/v1/binauthz_management_service/paths.rb, line 38 def attestor_path project:, attestor: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/attestors/#{attestor}" end
policy_path(**args)
click to toggle source
Create a fully-qualified Policy
resource string.
@overload policy_path
(project:)
The resource will be in the following format: `projects/{project}/policy` @param project [String]
@overload policy_path
(location:)
The resource will be in the following format: `locations/{location}/policy` @param location [String]
@return [::String]
# File lib/google/cloud/binary_authorization/v1/binauthz_management_service/paths.rb, line 62 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
project_path(project: "projects/
click to toggle source
Create a fully-qualified Project resource string.
The resource will be in the following format:
‘projects/{project}`
@param project [String]
@return [::String]
# File lib/google/cloud/binary_authorization/v1/binauthz_management_service/paths.rb, line 87 def project_path project: "projects/#{project}" end