Class: Google::Apis::OrgpolicyV2::OrgPolicyAPIService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::OrgpolicyV2::OrgPolicyAPIService
- Defined in:
- lib/google/apis/orgpolicy_v2/service.rb
Overview
Organization Policy API
The Organization Policy API allows users to configure governance rules on their Google Cloud resources across the resource hierarchy.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://orgpolicy.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#create_folder_policy(parent, google_cloud_orgpolicy_v2_policy_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Creates a policy.
-
#create_organization_custom_constraint(parent, google_cloud_orgpolicy_v2_custom_constraint_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint
Creates a custom constraint.
-
#create_organization_policy(parent, google_cloud_orgpolicy_v2_policy_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Creates a policy.
-
#create_project_policy(parent, google_cloud_orgpolicy_v2_policy_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Creates a policy.
-
#delete_folder_policy(name, etag: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleProtobufEmpty
Deletes a policy.
-
#delete_organization_custom_constraint(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleProtobufEmpty
Deletes a custom constraint.
-
#delete_organization_policy(name, etag: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleProtobufEmpty
Deletes a policy.
-
#delete_project_policy(name, etag: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleProtobufEmpty
Deletes a policy.
-
#get_folder_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Gets a policy on a resource.
-
#get_folder_policy_effective_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Gets the effective policy on a resource.
-
#get_organization_custom_constraint(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint
Gets a custom or managed constraint.
-
#get_organization_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Gets a policy on a resource.
-
#get_organization_policy_effective_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Gets the effective policy on a resource.
-
#get_project_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Gets a policy on a resource.
-
#get_project_policy_effective_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Gets the effective policy on a resource.
-
#initialize ⇒ OrgPolicyAPIService
constructor
A new instance of OrgPolicyAPIService.
-
#list_folder_constraints(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListConstraintsResponse
Lists constraints that could be applied on the specified resource.
-
#list_folder_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListPoliciesResponse
Retrieves all of the policies that exist on a particular resource.
-
#list_organization_constraints(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListConstraintsResponse
Lists constraints that could be applied on the specified resource.
-
#list_organization_custom_constraints(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListCustomConstraintsResponse
Retrieves all of the custom constraints that exist on a particular organization resource.
-
#list_organization_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListPoliciesResponse
Retrieves all of the policies that exist on a particular resource.
-
#list_project_constraints(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListConstraintsResponse
Lists constraints that could be applied on the specified resource.
-
#list_project_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListPoliciesResponse
Retrieves all of the policies that exist on a particular resource.
-
#patch_folder_policy(name, google_cloud_orgpolicy_v2_policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Updates a policy.
-
#patch_organization_custom_constraint(name, google_cloud_orgpolicy_v2_custom_constraint_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint
Updates a custom constraint.
-
#patch_organization_policy(name, google_cloud_orgpolicy_v2_policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Updates a policy.
-
#patch_project_policy(name, google_cloud_orgpolicy_v2_policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Updates a policy.
Constructor Details
#initialize ⇒ OrgPolicyAPIService
Returns a new instance of OrgPolicyAPIService.
48 49 50 51 52 53 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 48 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-orgpolicy_v2', client_version: Google::Apis::OrgpolicyV2::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
41 42 43 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 41 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
46 47 48 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 46 def quota_user @quota_user end |
Instance Method Details
#create_folder_policy(parent, google_cloud_orgpolicy_v2_policy_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Creates a policy. Returns a google.rpc.Status with google.rpc.Code.
NOT_FOUND if the constraint does not exist. Returns a google.rpc.Status
with google.rpc.Code.ALREADY_EXISTS if the policy already exists on the
given Google Cloud resource.
123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 123 def create_folder_policy(parent, google_cloud_orgpolicy_v2_policy_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/policies', ) command.request_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.request_object = google_cloud_orgpolicy_v2_policy_object command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_organization_custom_constraint(parent, google_cloud_orgpolicy_v2_custom_constraint_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint
Creates a custom constraint. Returns a google.rpc.Status with google.rpc.
Code.NOT_FOUND if the organization does not exist. Returns a google.rpc.
Status with google.rpc.Code.ALREADY_EXISTS if the constraint already exists
on the given organization.
392 393 394 395 396 397 398 399 400 401 402 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 392 def create_organization_custom_constraint(parent, google_cloud_orgpolicy_v2_custom_constraint_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/customConstraints', ) command.request_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint::Representation command.request_object = google_cloud_orgpolicy_v2_custom_constraint_object command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_organization_policy(parent, google_cloud_orgpolicy_v2_policy_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Creates a policy. Returns a google.rpc.Status with google.rpc.Code.
NOT_FOUND if the constraint does not exist. Returns a google.rpc.Status
with google.rpc.Code.ALREADY_EXISTS if the policy already exists on the
given Google Cloud resource.
576 577 578 579 580 581 582 583 584 585 586 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 576 def create_organization_policy(parent, google_cloud_orgpolicy_v2_policy_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/policies', ) command.request_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.request_object = google_cloud_orgpolicy_v2_policy_object command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_project_policy(parent, google_cloud_orgpolicy_v2_policy_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Creates a policy. Returns a google.rpc.Status with google.rpc.Code.
NOT_FOUND if the constraint does not exist. Returns a google.rpc.Status
with google.rpc.Code.ALREADY_EXISTS if the policy already exists on the
given Google Cloud resource.
848 849 850 851 852 853 854 855 856 857 858 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 848 def create_project_policy(parent, google_cloud_orgpolicy_v2_policy_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/policies', ) command.request_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.request_object = google_cloud_orgpolicy_v2_policy_object command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_folder_policy(name, etag: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleProtobufEmpty
Deletes a policy. Returns a google.rpc.Status with google.rpc.Code.
NOT_FOUND if the constraint or organization policy does not exist.
160 161 162 163 164 165 166 167 168 169 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 160 def delete_folder_policy(name, etag: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2/{+name}', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleProtobufEmpty command.params['name'] = name unless name.nil? command.query['etag'] = etag unless etag.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_organization_custom_constraint(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleProtobufEmpty
Deletes a custom constraint. Returns a google.rpc.Status with google.rpc.
Code.NOT_FOUND if the constraint does not exist.
426 427 428 429 430 431 432 433 434 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 426 def delete_organization_custom_constraint(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2/{+name}', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleProtobufEmpty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_organization_policy(name, etag: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleProtobufEmpty
Deletes a policy. Returns a google.rpc.Status with google.rpc.Code.
NOT_FOUND if the constraint or organization policy does not exist.
613 614 615 616 617 618 619 620 621 622 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 613 def delete_organization_policy(name, etag: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2/{+name}', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleProtobufEmpty command.params['name'] = name unless name.nil? command.query['etag'] = etag unless etag.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_policy(name, etag: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleProtobufEmpty
Deletes a policy. Returns a google.rpc.Status with google.rpc.Code.
NOT_FOUND if the constraint or organization policy does not exist.
885 886 887 888 889 890 891 892 893 894 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 885 def delete_project_policy(name, etag: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2/{+name}', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleProtobufEmpty command.params['name'] = name unless name.nil? command.query['etag'] = etag unless etag.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_folder_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Gets a policy on a resource. If no policy is set on the resource, NOT_FOUND
is returned. The entity tag (ETag) can be used with UpdatePolicy() to update
a policy during read-modify-write.
193 194 195 196 197 198 199 200 201 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 193 def get_folder_policy(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_folder_policy_effective_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Gets the effective policy on a resource. This is the result of merging
policies in the resource hierarchy and evaluating conditions. The returned
policy will not have an ETag or condition set because it is an evaluated
policy across multiple resources. Subtrees of Resource Manager resource
hierarchy with 'under:' prefix will not be expanded.
227 228 229 230 231 232 233 234 235 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 227 def get_folder_policy_effective_policy(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}:getEffectivePolicy', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_organization_custom_constraint(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint
Gets a custom or managed constraint. Returns a google.rpc.Status with
google.rpc.Code.NOT_FOUND if the custom or managed constraint does not exist.
458 459 460 461 462 463 464 465 466 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 458 def get_organization_custom_constraint(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_organization_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Gets a policy on a resource. If no policy is set on the resource, NOT_FOUND
is returned. The entity tag (ETag) can be used with UpdatePolicy() to update
a policy during read-modify-write.
646 647 648 649 650 651 652 653 654 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 646 def get_organization_policy(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_organization_policy_effective_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Gets the effective policy on a resource. This is the result of merging
policies in the resource hierarchy and evaluating conditions. The returned
policy will not have an ETag or condition set because it is an evaluated
policy across multiple resources. Subtrees of Resource Manager resource
hierarchy with 'under:' prefix will not be expanded.
680 681 682 683 684 685 686 687 688 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 680 def get_organization_policy_effective_policy(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}:getEffectivePolicy', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Gets a policy on a resource. If no policy is set on the resource, NOT_FOUND
is returned. The entity tag (ETag) can be used with UpdatePolicy() to update
a policy during read-modify-write.
918 919 920 921 922 923 924 925 926 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 918 def get_project_policy(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_project_policy_effective_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Gets the effective policy on a resource. This is the result of merging
policies in the resource hierarchy and evaluating conditions. The returned
policy will not have an ETag or condition set because it is an evaluated
policy across multiple resources. Subtrees of Resource Manager resource
hierarchy with 'under:' prefix will not be expanded.
952 953 954 955 956 957 958 959 960 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 952 def get_project_policy_effective_policy(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}:getEffectivePolicy', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_folder_constraints(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListConstraintsResponse
Lists constraints that could be applied on the specified resource.
84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 84 def list_folder_constraints(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/constraints', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListConstraintsResponse::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListConstraintsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_folder_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListPoliciesResponse
Retrieves all of the policies that exist on a particular resource.
266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 266 def list_folder_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/policies', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListPoliciesResponse::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListPoliciesResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_organization_constraints(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListConstraintsResponse
Lists constraints that could be applied on the specified resource.
356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 356 def list_organization_constraints(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/constraints', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListConstraintsResponse::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListConstraintsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_organization_custom_constraints(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListCustomConstraintsResponse
Retrieves all of the custom constraints that exist on a particular organization resource.
497 498 499 500 501 502 503 504 505 506 507 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 497 def list_organization_custom_constraints(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/customConstraints', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListCustomConstraintsResponse::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListCustomConstraintsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_organization_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListPoliciesResponse
Retrieves all of the policies that exist on a particular resource.
719 720 721 722 723 724 725 726 727 728 729 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 719 def list_organization_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/policies', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListPoliciesResponse::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListPoliciesResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_constraints(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListConstraintsResponse
Lists constraints that could be applied on the specified resource.
809 810 811 812 813 814 815 816 817 818 819 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 809 def list_project_constraints(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/constraints', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListConstraintsResponse::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListConstraintsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListPoliciesResponse
Retrieves all of the policies that exist on a particular resource.
991 992 993 994 995 996 997 998 999 1000 1001 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 991 def list_project_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/policies', ) command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListPoliciesResponse::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2ListPoliciesResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_folder_policy(name, google_cloud_orgpolicy_v2_policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Updates a policy. Returns a google.rpc.Status with google.rpc.Code.
NOT_FOUND if the constraint or the policy doesn't exist. Returns a google.
rpc.Status with google.rpc.Code.ABORTED if the ETag supplied in the request
doesn't match the persisted ETag of the policy. Note: the supplied policy will
perform a full overwrite of all fields.
314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 314 def patch_folder_policy(name, google_cloud_orgpolicy_v2_policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v2/{+name}', ) command.request_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.request_object = google_cloud_orgpolicy_v2_policy_object command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_organization_custom_constraint(name, google_cloud_orgpolicy_v2_custom_constraint_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint
Updates a custom constraint. Returns a google.rpc.Status with google.rpc.
Code.NOT_FOUND if the constraint does not exist. Note: the supplied policy
will perform a full overwrite of all fields.
537 538 539 540 541 542 543 544 545 546 547 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 537 def patch_organization_custom_constraint(name, google_cloud_orgpolicy_v2_custom_constraint_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v2/{+name}', ) command.request_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint::Representation command.request_object = google_cloud_orgpolicy_v2_custom_constraint_object command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2CustomConstraint command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_organization_policy(name, google_cloud_orgpolicy_v2_policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Updates a policy. Returns a google.rpc.Status with google.rpc.Code.
NOT_FOUND if the constraint or the policy doesn't exist. Returns a google.
rpc.Status with google.rpc.Code.ABORTED if the ETag supplied in the request
doesn't match the persisted ETag of the policy. Note: the supplied policy will
perform a full overwrite of all fields.
767 768 769 770 771 772 773 774 775 776 777 778 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 767 def patch_organization_policy(name, google_cloud_orgpolicy_v2_policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v2/{+name}', ) command.request_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.request_object = google_cloud_orgpolicy_v2_policy_object command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_policy(name, google_cloud_orgpolicy_v2_policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy
Updates a policy. Returns a google.rpc.Status with google.rpc.Code.
NOT_FOUND if the constraint or the policy doesn't exist. Returns a google.
rpc.Status with google.rpc.Code.ABORTED if the ETag supplied in the request
doesn't match the persisted ETag of the policy. Note: the supplied policy will
perform a full overwrite of all fields.
1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 1039 def patch_project_policy(name, google_cloud_orgpolicy_v2_policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v2/{+name}', ) command.request_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.request_object = google_cloud_orgpolicy_v2_policy_object command.response_representation = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy::Representation command.response_class = Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |