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

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/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:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://bigqueryconnection.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBigQueryConnectionServiceService

Returns a new instance of BigQueryConnectionServiceService.



47
48
49
50
51
52
# File 'lib/google/apis/bigqueryconnection_v1beta1/service.rb', line 47

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-bigqueryconnection_v1beta1',
        client_version: Google::Apis::BigqueryconnectionV1beta1::GEM_VERSION)
  @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.



40
41
42
# File 'lib/google/apis/bigqueryconnection_v1beta1/service.rb', line 40

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.



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

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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/google/apis/bigqueryconnection_v1beta1/service.rb', line 78

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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



112
113
114
115
116
117
118
119
120
# File 'lib/google/apis/bigqueryconnection_v1beta1/service.rb', line 112

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 Resource names 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



177
178
179
180
181
182
183
184
185
186
187
# File 'lib/google/apis/bigqueryconnection_v1beta1/service.rb', line 177

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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



143
144
145
146
147
148
149
150
151
# File 'lib/google/apis/bigqueryconnection_v1beta1/service.rb', line 143

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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



214
215
216
217
218
219
220
221
222
223
224
# File 'lib/google/apis/bigqueryconnection_v1beta1/service.rb', line 214

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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



251
252
253
254
255
256
257
258
259
260
261
262
# File 'lib/google/apis/bigqueryconnection_v1beta1/service.rb', line 251

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 Resource names 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



289
290
291
292
293
294
295
296
297
298
299
# File 'lib/google/apis/bigqueryconnection_v1beta1/service.rb', line 289

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 Resource names 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



328
329
330
331
332
333
334
335
336
337
338
# File 'lib/google/apis/bigqueryconnection_v1beta1/service.rb', line 328

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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



362
363
364
365
366
367
368
369
370
371
372
# File 'lib/google/apis/bigqueryconnection_v1beta1/service.rb', line 362

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