Class: Google::Apis::BigquerydatapolicyV1::BigQueryDataPolicyServiceService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::BigquerydatapolicyV1::BigQueryDataPolicyServiceService
- Defined in:
- lib/google/apis/bigquerydatapolicy_v1/service.rb
Overview
BigQuery Data Policy API
Allows users to manage BigQuery data policies.
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_project_location_data_policy(parent, data_policy_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV1::DataPolicy
Creates a new data policy under a project with the given
dataPolicyId(used as the display name), policy tag, and data policy type. -
#delete_project_location_data_policy(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV1::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::BigquerydatapolicyV1::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::BigquerydatapolicyV1::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::BigquerydatapolicyV1::ListDataPoliciesResponse
List all of the data policies in the specified parent project.
-
#patch_project_location_data_policy(name, data_policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV1::DataPolicy
Updates the metadata for an existing data policy.
-
#rename_data_policy(name, rename_data_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV1::DataPolicy
Renames the id (display name) of the specified 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::BigquerydatapolicyV1::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::BigquerydatapolicyV1::TestIamPermissionsResponse
Returns the caller's permission on the specified data policy resource.
Constructor Details
#initialize ⇒ BigQueryDataPolicyServiceService
Returns a new instance of BigQueryDataPolicyServiceService.
45 46 47 48 49 50 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 45 def initialize super('https://bigquerydatapolicy.googleapis.com/', '', client_name: 'google-apis-bigquerydatapolicy_v1', client_version: Google::Apis::BigquerydatapolicyV1::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.
38 39 40 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 38 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.
43 44 45 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 43 def quota_user @quota_user end |
Instance Method Details
#create_project_location_data_policy(parent, data_policy_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV1::DataPolicy
Creates a new data policy under a project with the given dataPolicyId (used
as the display name), policy tag, and data policy type.
75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 75 def create_project_location_data_policy(parent, data_policy_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/dataPolicies', ) command.request_representation = Google::Apis::BigquerydatapolicyV1::DataPolicy::Representation command.request_object = data_policy_object command.response_representation = Google::Apis::BigquerydatapolicyV1::DataPolicy::Representation command.response_class = Google::Apis::BigquerydatapolicyV1::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::BigquerydatapolicyV1::Empty
Deletes the data policy specified by its resource name.
108 109 110 111 112 113 114 115 116 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 108 def delete_project_location_data_policy(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::BigquerydatapolicyV1::Empty::Representation command.response_class = Google::Apis::BigquerydatapolicyV1::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::BigquerydatapolicyV1::Policy
Gets the IAM policy for the specified data policy.
172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 172 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, 'v1/{+resource}:getIamPolicy', ) command.request_representation = Google::Apis::BigquerydatapolicyV1::GetIamPolicyRequest::Representation command.request_object = get_iam_policy_request_object command.response_representation = Google::Apis::BigquerydatapolicyV1::Policy::Representation command.response_class = Google::Apis::BigquerydatapolicyV1::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::BigquerydatapolicyV1::DataPolicy
Gets the data policy specified by its resource name.
139 140 141 142 143 144 145 146 147 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 139 def get_project_location_data_policy(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::BigquerydatapolicyV1::DataPolicy::Representation command.response_class = Google::Apis::BigquerydatapolicyV1::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::BigquerydatapolicyV1::ListDataPoliciesResponse
List all of the data policies in the specified parent project.
218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 218 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, 'v1/{+parent}/dataPolicies', ) command.response_representation = Google::Apis::BigquerydatapolicyV1::ListDataPoliciesResponse::Representation command.response_class = Google::Apis::BigquerydatapolicyV1::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, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV1::DataPolicy
Updates the metadata for an existing data policy. The target data policy can be specified by the resource name.
259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 259 def patch_project_location_data_policy(name, data_policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::BigquerydatapolicyV1::DataPolicy::Representation command.request_object = data_policy_object command.response_representation = Google::Apis::BigquerydatapolicyV1::DataPolicy::Representation command.response_class = Google::Apis::BigquerydatapolicyV1::DataPolicy 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 |
#rename_data_policy(name, rename_data_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV1::DataPolicy
Renames the id (display name) of the specified data policy.
294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 294 def rename_data_policy(name, rename_data_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:rename', ) command.request_representation = Google::Apis::BigquerydatapolicyV1::RenameDataPolicyRequest::Representation command.request_object = rename_data_policy_request_object command.response_representation = Google::Apis::BigquerydatapolicyV1::DataPolicy::Representation command.response_class = Google::Apis::BigquerydatapolicyV1::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 |
#set_data_policy_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV1::Policy
Sets the IAM policy for the specified data policy.
329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 329 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, 'v1/{+resource}:setIamPolicy', ) command.request_representation = Google::Apis::BigquerydatapolicyV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::BigquerydatapolicyV1::Policy::Representation command.response_class = Google::Apis::BigquerydatapolicyV1::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::BigquerydatapolicyV1::TestIamPermissionsResponse
Returns the caller's permission on the specified data policy resource.
364 365 366 367 368 369 370 371 372 373 374 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 364 def (resource, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', ) command.request_representation = Google::Apis::BigquerydatapolicyV1::TestIamPermissionsRequest::Representation command.request_object = command.response_representation = Google::Apis::BigquerydatapolicyV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::BigquerydatapolicyV1::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 |