Class: Google::Apis::BigqueryconnectionV1beta1::BigQueryConnectionServiceService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
generated/google/apis/bigqueryconnection_v1beta1/service.rb

Overview

BigQuery Connection API

Allows users to manage BigQuery connections to external data sources.

Examples:

require 'google/apis/bigqueryconnection_v1beta1'

Bigqueryconnection = Google::Apis::BigqueryconnectionV1beta1 # Alias the module
service = Bigqueryconnection::BigQueryConnectionServiceService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeBigQueryConnectionServiceService

Returns a new instance of BigQueryConnectionServiceService.


45
46
47
48
# File 'generated/google/apis/bigqueryconnection_v1beta1/service.rb', line 45

def initialize
  super('https://bigqueryconnection.googleapis.com/', '')
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

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.

Returns:

  • (String)

    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 'generated/google/apis/bigqueryconnection_v1beta1/service.rb', line 38

def key
  @key
end

#quota_userString

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.

Returns:

  • (String)

    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 'generated/google/apis/bigqueryconnection_v1beta1/service.rb', line 43

def quota_user
  @quota_user
end

Instance Method Details

#create_project_location_connection(parent, connection_object = nil, connection_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryconnectionV1beta1::Connection

Creates a new connection.

Parameters:

  • parent (String)

    Required. Parent resource name. Must be in the format projects/project_id/ locations/location_id``

  • connection_object (Google::Apis::BigqueryconnectionV1beta1::Connection) (defaults to: nil)
  • connection_id (String) (defaults to: nil)

    Optional. Connection id that should be assigned to the created connection.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


74
75
76
77
78
79
80
81
82
83
84
85
# File 'generated/google/apis/bigqueryconnection_v1beta1/service.rb', line 74

def create_project_location_connection(parent, connection_object = nil, connection_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta1/{+parent}/connections', options)
  command.request_representation = Google::Apis::BigqueryconnectionV1beta1::Connection::Representation
  command.request_object = connection_object
  command.response_representation = Google::Apis::BigqueryconnectionV1beta1::Connection::Representation
  command.response_class = Google::Apis::BigqueryconnectionV1beta1::Connection
  command.params['parent'] = parent unless parent.nil?
  command.query['connectionId'] = connection_id unless connection_id.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_connection(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryconnectionV1beta1::Empty

Deletes connection and associated credential.

Parameters:

  • name (String)

    Required. Name of the deleted connection, for example: projects/project_id/ locations/location_id/connections/connection_id``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


108
109
110
111
112
113
114
115
116
# File 'generated/google/apis/bigqueryconnection_v1beta1/service.rb', line 108

def delete_project_location_connection(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1beta1/{+name}', options)
  command.response_representation = Google::Apis::BigqueryconnectionV1beta1::Empty::Representation
  command.response_class = Google::Apis::BigqueryconnectionV1beta1::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_connection_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryconnectionV1beta1::Policy

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

  • get_iam_policy_request_object (Google::Apis::BigqueryconnectionV1beta1::GetIamPolicyRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


172
173
174
175
176
177
178
179
180
181
182
# File 'generated/google/apis/bigqueryconnection_v1beta1/service.rb', line 172

def get_connection_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options)
  command.request_representation = Google::Apis::BigqueryconnectionV1beta1::GetIamPolicyRequest::Representation
  command.request_object = get_iam_policy_request_object
  command.response_representation = Google::Apis::BigqueryconnectionV1beta1::Policy::Representation
  command.response_class = Google::Apis::BigqueryconnectionV1beta1::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_connection(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryconnectionV1beta1::Connection

Returns specified connection.

Parameters:

  • name (String)

    Required. Name of the requested connection, for example: projects/project_id /locations/location_id/connections/connection_id``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


139
140
141
142
143
144
145
146
147
# File 'generated/google/apis/bigqueryconnection_v1beta1/service.rb', line 139

def get_project_location_connection(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta1/{+name}', options)
  command.response_representation = Google::Apis::BigqueryconnectionV1beta1::Connection::Representation
  command.response_class = Google::Apis::BigqueryconnectionV1beta1::Connection
  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_connections(parent, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryconnectionV1beta1::ListConnectionsResponse

Returns a list of connections in the given project.

Parameters:

  • parent (String)

    Required. Parent resource name. Must be in the form: projects/project_id/ locations/location_id``

  • max_results (Fixnum) (defaults to: nil)

    Required. Maximum number of results per page.

  • page_token (String) (defaults to: nil)

    Page token.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


209
210
211
212
213
214
215
216
217
218
219
# File 'generated/google/apis/bigqueryconnection_v1beta1/service.rb', line 209

def list_project_location_connections(parent, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1beta1/{+parent}/connections', options)
  command.response_representation = Google::Apis::BigqueryconnectionV1beta1::ListConnectionsResponse::Representation
  command.response_class = Google::Apis::BigqueryconnectionV1beta1::ListConnectionsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['maxResults'] = max_results unless max_results.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_connection(name, connection_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryconnectionV1beta1::Connection

Updates the specified connection. For security reasons, also resets credential if connection properties are in the update field mask.

Parameters:

  • name (String)

    Required. Name of the connection to update, for example: projects/project_id /locations/location_id/connections/connection_id``

  • connection_object (Google::Apis::BigqueryconnectionV1beta1::Connection) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Required. Update mask for the connection fields to be updated.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


246
247
248
249
250
251
252
253
254
255
256
257
# File 'generated/google/apis/bigqueryconnection_v1beta1/service.rb', line 246

def patch_project_location_connection(name, connection_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1beta1/{+name}', options)
  command.request_representation = Google::Apis::BigqueryconnectionV1beta1::Connection::Representation
  command.request_object = connection_object
  command.response_representation = Google::Apis::BigqueryconnectionV1beta1::Connection::Representation
  command.response_class = Google::Apis::BigqueryconnectionV1beta1::Connection
  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

#set_connection_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryconnectionV1beta1::Policy

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

  • set_iam_policy_request_object (Google::Apis::BigqueryconnectionV1beta1::SetIamPolicyRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


283
284
285
286
287
288
289
290
291
292
293
# File 'generated/google/apis/bigqueryconnection_v1beta1/service.rb', line 283

def set_connection_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
  command.request_representation = Google::Apis::BigqueryconnectionV1beta1::SetIamPolicyRequest::Representation
  command.request_object = set_iam_policy_request_object
  command.response_representation = Google::Apis::BigqueryconnectionV1beta1::Policy::Representation
  command.response_class = Google::Apis::BigqueryconnectionV1beta1::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_connection_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryconnectionV1beta1::TestIamPermissionsResponse

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.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

  • test_iam_permissions_request_object (Google::Apis::BigqueryconnectionV1beta1::TestIamPermissionsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


321
322
323
324
325
326
327
328
329
330
331
# File 'generated/google/apis/bigqueryconnection_v1beta1/service.rb', line 321

def test_connection_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
  command.request_representation = Google::Apis::BigqueryconnectionV1beta1::TestIamPermissionsRequest::Representation
  command.request_object = test_iam_permissions_request_object
  command.response_representation = Google::Apis::BigqueryconnectionV1beta1::TestIamPermissionsResponse::Representation
  command.response_class = Google::Apis::BigqueryconnectionV1beta1::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

#update_project_location_connection_credential(name, connection_credential_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryconnectionV1beta1::Empty

Sets the credential for the specified connection.

Parameters:

  • name (String)

    Required. Name of the connection, for example: projects/project_id/ locations/location_id/connections/connection_id/credential

  • connection_credential_object (Google::Apis::BigqueryconnectionV1beta1::ConnectionCredential) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:


355
356
357
358
359
360
361
362
363
364
365
# File 'generated/google/apis/bigqueryconnection_v1beta1/service.rb', line 355

def update_project_location_connection_credential(name, connection_credential_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1beta1/{+name}', options)
  command.request_representation = Google::Apis::BigqueryconnectionV1beta1::ConnectionCredential::Representation
  command.request_object = connection_credential_object
  command.response_representation = Google::Apis::BigqueryconnectionV1beta1::Empty::Representation
  command.response_class = Google::Apis::BigqueryconnectionV1beta1::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