generated/google/apis/bigquery_v2/service.rb in google-api-client-0.39.0 vs generated/google/apis/bigquery_v2/service.rb in google-api-client-0.39.1
- old
+ new
@@ -1211,10 +1211,49 @@
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
+ # Gets the access control policy for a resource.
+ # Returns an empty policy if the resource exists and does not have a policy
+ # set.
+ # @param [String] resource
+ # REQUIRED: The resource for which the policy is being requested.
+ # See the operation documentation for the appropriate value for this field.
+ # @param [Google::Apis::BigqueryV2::GetIamPolicyRequest] get_iam_policy_request_object
+ # @param [String] fields
+ # Selector specifying which fields to include in a partial response.
+ # @param [String] quota_user
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
+ # characters.
+ # @param [String] user_ip
+ # Deprecated. Please use quotaUser instead.
+ # @param [Google::Apis::RequestOptions] options
+ # Request-specific options
+ #
+ # @yield [result, err] Result & error if block supplied
+ # @yieldparam result [Google::Apis::BigqueryV2::Policy] parsed result object
+ # @yieldparam err [StandardError] error object if request failed
+ #
+ # @return [Google::Apis::BigqueryV2::Policy]
+ #
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
+ def get_table_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
+ command = make_simple_command(:post, '{+resource}:getIamPolicy', options)
+ command.request_representation = Google::Apis::BigqueryV2::GetIamPolicyRequest::Representation
+ command.request_object = get_iam_policy_request_object
+ command.response_representation = Google::Apis::BigqueryV2::Policy::Representation
+ command.response_class = Google::Apis::BigqueryV2::Policy
+ command.params['resource'] = resource unless resource.nil?
+ command.query['fields'] = fields unless fields.nil?
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
+ command.query['userIp'] = user_ip unless user_ip.nil?
+ execute_or_queue_command(command, &block)
+ end
+
# Creates a new, empty table in the dataset.
# @param [String] project_id
# Project ID of the new table
# @param [String] dataset_id
# Dataset ID of the new table
@@ -1330,9 +1369,90 @@
command.response_representation = Google::Apis::BigqueryV2::Table::Representation
command.response_class = Google::Apis::BigqueryV2::Table
command.params['projectId'] = project_id unless project_id.nil?
command.params['datasetId'] = dataset_id unless dataset_id.nil?
command.params['tableId'] = table_id unless table_id.nil?
+ command.query['fields'] = fields unless fields.nil?
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
+ command.query['userIp'] = user_ip unless user_ip.nil?
+ execute_or_queue_command(command, &block)
+ end
+
+ # Sets the access control policy on the specified resource. Replaces any
+ # existing policy.
+ # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
+ # @param [String] resource
+ # REQUIRED: The resource for which the policy is being specified.
+ # See the operation documentation for the appropriate value for this field.
+ # @param [Google::Apis::BigqueryV2::SetIamPolicyRequest] set_iam_policy_request_object
+ # @param [String] fields
+ # Selector specifying which fields to include in a partial response.
+ # @param [String] quota_user
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
+ # characters.
+ # @param [String] user_ip
+ # Deprecated. Please use quotaUser instead.
+ # @param [Google::Apis::RequestOptions] options
+ # Request-specific options
+ #
+ # @yield [result, err] Result & error if block supplied
+ # @yieldparam result [Google::Apis::BigqueryV2::Policy] parsed result object
+ # @yieldparam err [StandardError] error object if request failed
+ #
+ # @return [Google::Apis::BigqueryV2::Policy]
+ #
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
+ def set_table_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
+ command = make_simple_command(:post, '{+resource}:setIamPolicy', options)
+ command.request_representation = Google::Apis::BigqueryV2::SetIamPolicyRequest::Representation
+ command.request_object = set_iam_policy_request_object
+ command.response_representation = Google::Apis::BigqueryV2::Policy::Representation
+ command.response_class = Google::Apis::BigqueryV2::Policy
+ command.params['resource'] = resource unless resource.nil?
+ command.query['fields'] = fields unless fields.nil?
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
+ command.query['userIp'] = user_ip unless user_ip.nil?
+ execute_or_queue_command(command, &block)
+ end
+
+ # Returns permissions that a caller has on the specified resource.
+ # If the resource does not exist, this will return an empty set of
+ # permissions, not a `NOT_FOUND` error.
+ # Note: This operation is designed to be used for building permission-aware
+ # UIs and command-line tools, not for authorization checking. This operation
+ # may "fail open" without warning.
+ # @param [String] resource
+ # REQUIRED: The resource for which the policy detail is being requested.
+ # See the operation documentation for the appropriate value for this field.
+ # @param [Google::Apis::BigqueryV2::TestIamPermissionsRequest] test_iam_permissions_request_object
+ # @param [String] fields
+ # Selector specifying which fields to include in a partial response.
+ # @param [String] quota_user
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
+ # characters.
+ # @param [String] user_ip
+ # Deprecated. Please use quotaUser instead.
+ # @param [Google::Apis::RequestOptions] options
+ # Request-specific options
+ #
+ # @yield [result, err] Result & error if block supplied
+ # @yieldparam result [Google::Apis::BigqueryV2::TestIamPermissionsResponse] parsed result object
+ # @yieldparam err [StandardError] error object if request failed
+ #
+ # @return [Google::Apis::BigqueryV2::TestIamPermissionsResponse]
+ #
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
+ def test_table_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
+ command = make_simple_command(:post, '{+resource}:testIamPermissions', options)
+ command.request_representation = Google::Apis::BigqueryV2::TestIamPermissionsRequest::Representation
+ command.request_object = test_iam_permissions_request_object
+ command.response_representation = Google::Apis::BigqueryV2::TestIamPermissionsResponse::Representation
+ command.response_class = Google::Apis::BigqueryV2::TestIamPermissionsResponse
+ command.params['resource'] = resource unless resource.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end