google-cloud-org_policy-v2 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,6 +24,23 @@ module Google
24
24
  module OrgPolicy
25
25
  # Path helper methods for the OrgPolicy API.
26
26
  module Paths
27
+ ##
28
+ # Create a fully-qualified CustomConstraint resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `organizations/{organization}/customConstraints/{custom_constraint}`
33
+ #
34
+ # @param organization [String]
35
+ # @param custom_constraint [String]
36
+ #
37
+ # @return [::String]
38
+ def custom_constraint_path organization:, custom_constraint:
39
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
40
+
41
+ "organizations/#{organization}/customConstraints/#{custom_constraint}"
42
+ end
43
+
27
44
  ##
28
45
  # Create a fully-qualified Folder resource string.
29
46
  #