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.
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
-
#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, force: nil, 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, allow_missing: 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.
47 48 49 50 51 52 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 47 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', 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.
40 41 42 |
# File 'lib/google/apis/bigquerydatapolicy_v1/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_v1/service.rb', line 45 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.
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 77 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, force: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigquerydatapolicyV1::Empty
Deletes the data policy specified by its resource name.
113 114 115 116 117 118 119 120 121 122 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 113 def delete_project_location_data_policy(name, force: nil, 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['force'] = force unless force.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.
178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 178 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.
145 146 147 148 149 150 151 152 153 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 145 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.
224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 224 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, allow_missing: 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.
268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 268 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, '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['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 |
#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.
304 305 306 307 308 309 310 311 312 313 314 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 304 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.
339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 339 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.
374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/google/apis/bigquerydatapolicy_v1/service.rb', line 374 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 |