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 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.
121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 121 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.
389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 389 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.
572 573 574 575 576 577 578 579 580 581 582 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 572 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.
842 843 844 845 846 847 848 849 850 851 852 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 842 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.
158 159 160 161 162 163 164 165 166 167 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 158 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.
423 424 425 426 427 428 429 430 431 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 423 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.
609 610 611 612 613 614 615 616 617 618 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 609 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.
879 880 881 882 883 884 885 886 887 888 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 879 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 etag
value can be used with UpdatePolicy()
to update a
policy during read-modify-write.
191 192 193 194 195 196 197 198 199 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 191 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.
225 226 227 228 229 230 231 232 233 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 225 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 constraint. Returns a google.rpc.Status
with google.rpc.Code.
NOT_FOUND
if the custom constraint does not exist.
455 456 457 458 459 460 461 462 463 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 455 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 etag
value can be used with UpdatePolicy()
to update a
policy during read-modify-write.
642 643 644 645 646 647 648 649 650 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 642 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.
676 677 678 679 680 681 682 683 684 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 676 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 etag
value can be used with UpdatePolicy()
to update a
policy during read-modify-write.
912 913 914 915 916 917 918 919 920 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 912 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.
946 947 948 949 950 951 952 953 954 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 946 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.
83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 83 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.
264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 264 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.
353 354 355 356 357 358 359 360 361 362 363 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 353 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.
494 495 496 497 498 499 500 501 502 503 504 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 494 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.
715 716 717 718 719 720 721 722 723 724 725 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 715 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.
804 805 806 807 808 809 810 811 812 813 814 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 804 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.
985 986 987 988 989 990 991 992 993 994 995 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 985 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 do not exist. Returns a google.rpc.
Status
with google.rpc.Code.ABORTED
if the etag supplied in the request
does not match the persisted etag of the policy Note: the supplied policy will
perform a full overwrite of all fields.
312 313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 312 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.
534 535 536 537 538 539 540 541 542 543 544 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 534 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 do not exist. Returns a google.rpc.
Status
with google.rpc.Code.ABORTED
if the etag supplied in the request
does not match the persisted etag of the policy Note: the supplied policy will
perform a full overwrite of all fields.
763 764 765 766 767 768 769 770 771 772 773 774 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 763 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 do not exist. Returns a google.rpc.
Status
with google.rpc.Code.ABORTED
if the etag supplied in the request
does not match the persisted etag of the policy Note: the supplied policy will
perform a full overwrite of all fields.
1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 |
# File 'lib/google/apis/orgpolicy_v2/service.rb', line 1033 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 |