Class: Google::Apis::BigquerydatapolicyV2::BigQueryDataPolicyServiceService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::BigquerydatapolicyV2::BigQueryDataPolicyServiceService
- Defined in:
- lib/google/apis/bigquerydatapolicy_v2/service.rb
Overview
BigQuery Data Policy API
Allows users to manage BigQuery data policies.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://bigquerydatapolicy.$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
-
#add_data_policy_grantees(data_policy, add_grantees_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::DataPolicy
Adds new grantees to a data policy.
-
#create_data_policy(parent, create_data_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::DataPolicy
Creates a new data policy under a project with the given
data_policy_id( used as the display name), and data policy type. -
#delete_project_location_data_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::Empty
Deletes the data policy specified by its resource name.
-
#get_data_policy_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::Policy
Gets the IAM policy for the specified data policy.
-
#get_project_location_data_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::DataPolicy
Gets the data policy specified by its resource name.
-
#initialize ⇒ BigQueryDataPolicyServiceService
constructor
A new instance of BigQueryDataPolicyServiceService.
-
#list_project_location_data_policies(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::ListDataPoliciesResponse
List all of the data policies in the specified parent project.
-
#patch_project_location_data_policy(name, data_policy_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::DataPolicy
Updates the metadata for an existing data policy.
-
#remove_data_policy_grantees(data_policy, remove_grantees_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::DataPolicy
Removes grantees from a data policy.
-
#set_data_policy_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::Policy
Sets the IAM policy for the specified data policy.
-
#test_data_policy_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::TestIamPermissionsResponse
Returns the caller's permission on the specified data policy resource.
Constructor Details
#initialize ⇒ BigQueryDataPolicyServiceService
Returns a new instance of BigQueryDataPolicyServiceService.
47 48 49 50 51 52 |
# File 'lib/google/apis/bigquerydatapolicy_v2/service.rb', line 47 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-bigquerydatapolicy_v2', client_version: Google::Apis::BigquerydatapolicyV2::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.
40 41 42 |
# File 'lib/google/apis/bigquerydatapolicy_v2/service.rb', line 40 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.
45 46 47 |
# File 'lib/google/apis/bigquerydatapolicy_v2/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#add_data_policy_grantees(data_policy, add_grantees_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::DataPolicy
Adds new grantees to a data policy. The new grantees will be added to the existing grantees. If the request contains a duplicate grantee, the grantee will be ignored. If the request contains a grantee that already exists, the grantee will be ignored.
79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/google/apis/bigquerydatapolicy_v2/service.rb', line 79 def add_data_policy_grantees(data_policy, add_grantees_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+dataPolicy}:addGrantees', ) command.request_representation = Google::Apis::BigquerydatapolicyV2::AddGranteesRequest::Representation command.request_object = add_grantees_request_object command.response_representation = Google::Apis::BigquerydatapolicyV2::DataPolicy::Representation command.response_class = Google::Apis::BigquerydatapolicyV2::DataPolicy command.params['dataPolicy'] = data_policy unless data_policy.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_data_policy(parent, create_data_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::DataPolicy
Creates a new data policy under a project with the given data_policy_id (
used as the display name), and data policy type.
114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/google/apis/bigquerydatapolicy_v2/service.rb', line 114 def create_data_policy(parent, create_data_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+parent}/dataPolicies', ) command.request_representation = Google::Apis::BigquerydatapolicyV2::CreateDataPolicyRequest::Representation command.request_object = create_data_policy_request_object command.response_representation = Google::Apis::BigquerydatapolicyV2::DataPolicy::Representation command.response_class = Google::Apis::BigquerydatapolicyV2::DataPolicy 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_project_location_data_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::Empty
Deletes the data policy specified by its resource name.
147 148 149 150 151 152 153 154 155 |
# File 'lib/google/apis/bigquerydatapolicy_v2/service.rb', line 147 def delete_project_location_data_policy(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2/{+name}', ) command.response_representation = Google::Apis::BigquerydatapolicyV2::Empty::Representation command.response_class = Google::Apis::BigquerydatapolicyV2::Empty 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_data_policy_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::Policy
Gets the IAM policy for the specified data policy.
211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/google/apis/bigquerydatapolicy_v2/service.rb', line 211 def get_data_policy_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+resource}:getIamPolicy', ) command.request_representation = Google::Apis::BigquerydatapolicyV2::GetIamPolicyRequest::Representation command.request_object = get_iam_policy_request_object command.response_representation = Google::Apis::BigquerydatapolicyV2::Policy::Representation command.response_class = Google::Apis::BigquerydatapolicyV2::Policy command.params['resource'] = resource unless resource.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_location_data_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::DataPolicy
Gets the data policy specified by its resource name.
178 179 180 181 182 183 184 185 186 |
# File 'lib/google/apis/bigquerydatapolicy_v2/service.rb', line 178 def get_project_location_data_policy(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::BigquerydatapolicyV2::DataPolicy::Representation command.response_class = Google::Apis::BigquerydatapolicyV2::DataPolicy 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_project_location_data_policies(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::ListDataPoliciesResponse
List all of the data policies in the specified parent project.
257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/google/apis/bigquerydatapolicy_v2/service.rb', line 257 def list_project_location_data_policies(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/dataPolicies', ) command.response_representation = Google::Apis::BigquerydatapolicyV2::ListDataPoliciesResponse::Representation command.response_class = Google::Apis::BigquerydatapolicyV2::ListDataPoliciesResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.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_project_location_data_policy(name, data_policy_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::DataPolicy
Updates the metadata for an existing data policy. The target data policy can be specified by the resource name.
302 303 304 305 306 307 308 309 310 311 312 313 314 |
# File 'lib/google/apis/bigquerydatapolicy_v2/service.rb', line 302 def patch_project_location_data_policy(name, data_policy_object = nil, allow_missing: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v2/{+name}', ) command.request_representation = Google::Apis::BigquerydatapolicyV2::DataPolicy::Representation command.request_object = data_policy_object command.response_representation = Google::Apis::BigquerydatapolicyV2::DataPolicy::Representation command.response_class = Google::Apis::BigquerydatapolicyV2::DataPolicy command.params['name'] = name unless name.nil? command.query['allowMissing'] = allow_missing unless allow_missing.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 |
#remove_data_policy_grantees(data_policy, remove_grantees_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::DataPolicy
Removes grantees from a data policy. The grantees will be removed from the existing grantees. If the request contains a grantee that does not exist, the grantee will be ignored.
340 341 342 343 344 345 346 347 348 349 350 |
# File 'lib/google/apis/bigquerydatapolicy_v2/service.rb', line 340 def remove_data_policy_grantees(data_policy, remove_grantees_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+dataPolicy}:removeGrantees', ) command.request_representation = Google::Apis::BigquerydatapolicyV2::RemoveGranteesRequest::Representation command.request_object = remove_grantees_request_object command.response_representation = Google::Apis::BigquerydatapolicyV2::DataPolicy::Representation command.response_class = Google::Apis::BigquerydatapolicyV2::DataPolicy command.params['dataPolicy'] = data_policy unless data_policy.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#set_data_policy_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::Policy
Sets the IAM policy for the specified data policy.
375 376 377 378 379 380 381 382 383 384 385 |
# File 'lib/google/apis/bigquerydatapolicy_v2/service.rb', line 375 def set_data_policy_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+resource}:setIamPolicy', ) command.request_representation = Google::Apis::BigquerydatapolicyV2::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::BigquerydatapolicyV2::Policy::Representation command.response_class = Google::Apis::BigquerydatapolicyV2::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#test_data_policy_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV2::TestIamPermissionsResponse
Returns the caller's permission on the specified data policy resource.
410 411 412 413 414 415 416 417 418 419 420 |
# File 'lib/google/apis/bigquerydatapolicy_v2/service.rb', line 410 def (resource, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+resource}:testIamPermissions', ) command.request_representation = Google::Apis::BigquerydatapolicyV2::TestIamPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::BigquerydatapolicyV2::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::BigquerydatapolicyV2::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |