Discovery Engine V1 API - Class Google::Cloud::DiscoveryEngine::V1::DataConnectorService::Rest::Client (v2.14.0)

Reference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::DataConnectorService::Rest::Client.

REST client for the DataConnectorService service.

Service for data connector management.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the DataConnectorService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all DataConnectorService clients
::Google::Cloud::DiscoveryEngine::V1::DataConnectorService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the DataConnectorService Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#get_data_connector

def get_data_connector(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::DataConnector
def get_data_connector(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1::DataConnector

Gets the DataConnector. DataConnector is a singleton resource for each Collection.

Overloads
def get_data_connector(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::DataConnector
Pass arguments to get_data_connector via a request object, either of type GetDataConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1::GetDataConnectorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_data_connector(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1::DataConnector
Pass arguments to get_data_connector via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. Full resource name of DataConnector, such as projects/{project}/locations/{location}/collections/{collection_id}/dataConnector.

    If the caller does not have permission to access the DataConnector, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

    If the requested DataConnector does not exist, a NOT_FOUND error is returned.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/discovery_engine/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DiscoveryEngine::V1::DataConnectorService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DiscoveryEngine::V1::GetDataConnectorRequest.new

# Call the get_data_connector method.
result = client.get_data_connector request

# The returned object is of type Google::Cloud::DiscoveryEngine::V1::DataConnector.
p result

#initialize

def initialize() { |config| ... } -> Client

Create a new DataConnectorService REST client object.

Yields
  • (config) — Configure the DataConnectorService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::DiscoveryEngine::V1::DataConnectorService::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::DiscoveryEngine::V1::DataConnectorService::Rest::Client.new do |config|
  config.timeout = 10.0
end

#location_client

def location_client() -> Google::Cloud::Location::Locations::Rest::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Rest::Client)

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#operations_client

def operations_client() -> ::Google::Cloud::DiscoveryEngine::V1::DataConnectorService::Rest::Operations

Get the associated client for long-running operations.

#set_up_data_connector

def set_up_data_connector(request, options = nil) -> ::Gapic::Operation
def set_up_data_connector(parent: nil, collection_id: nil, collection_display_name: nil, data_connector: nil) -> ::Gapic::Operation

Creates a Collection and sets up the DataConnector for it. To stop a DataConnector after setup, use the CollectionService.DeleteCollection method.

Overloads
def set_up_data_connector(request, options = nil) -> ::Gapic::Operation
Pass arguments to set_up_data_connector via a request object, either of type SetUpDataConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1::SetUpDataConnectorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def set_up_data_connector(parent: nil, collection_id: nil, collection_display_name: nil, data_connector: nil) -> ::Gapic::Operation
Pass arguments to set_up_data_connector via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/discovery_engine/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DiscoveryEngine::V1::DataConnectorService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DiscoveryEngine::V1::SetUpDataConnectorRequest.new

# Call the set_up_data_connector method.
result = client.set_up_data_connector request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_data_connector

def update_data_connector(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::DataConnector
def update_data_connector(data_connector: nil, update_mask: nil) -> ::Google::Cloud::DiscoveryEngine::V1::DataConnector

Updates a DataConnector.

Overloads
def update_data_connector(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::DataConnector
Pass arguments to update_data_connector via a request object, either of type UpdateDataConnectorRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1::UpdateDataConnectorRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_data_connector(data_connector: nil, update_mask: nil) -> ::Google::Cloud::DiscoveryEngine::V1::DataConnector
Pass arguments to update_data_connector via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • data_connector (::Google::Cloud::DiscoveryEngine::V1::DataConnector, ::Hash) — Required. The DataConnector to update.

    If the caller does not have permission to update the DataConnector, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

    If the DataConnector does not exist, a NOT_FOUND error is returned.

  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Indicates which fields in the provided DataConnector to update.

    Supported field paths include:

    • refresh_interval
    • params
    • auto_run_disabled
    • action_config
    • action_config.action_params
    • action_config.service_name
    • destination_configs
    • blocking_reasons
    • sync_mode
    • incremental_sync_disabled
    • incremental_refresh_interval
    • data_protection_policy

    Note: Support for these fields may vary depending on the connector type. For example, not all connectors support destination_configs.

    If an unsupported or unknown field path is provided, the request will return an INVALID_ARGUMENT error.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/discovery_engine/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DiscoveryEngine::V1::DataConnectorService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DiscoveryEngine::V1::UpdateDataConnectorRequest.new

# Call the update_data_connector method.
result = client.update_data_connector request

# The returned object is of type Google::Cloud::DiscoveryEngine::V1::DataConnector.
p result