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::ConfigurationConfigure the DataConnectorService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# 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::ConfigurationConfigure 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#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::DataConnectorGets the DataConnector. DataConnector is a singleton resource for each Collection.
def get_data_connector(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::DataConnectorget_data_connector via a request object, either of type
GetDataConnectorRequest or an equivalent Hash.
- 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::DataConnectorget_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).
-
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_DENIEDerror is returned.If the requested DataConnector does not exist, a
NOT_FOUNDerror is returned.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DiscoveryEngine::V1::DataConnector)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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| ... } -> ClientCreate a new DataConnectorService REST client object.
- (config) — Configure the DataConnectorService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# 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::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::DiscoveryEngine::V1::DataConnectorService::Rest::OperationsGet 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::OperationCreates a Collection and sets up the DataConnector for it. To stop a DataConnector after setup, use the CollectionService.DeleteCollection method.
def set_up_data_connector(request, options = nil) -> ::Gapic::Operationset_up_data_connector via a request object, either of type
SetUpDataConnectorRequest or an equivalent Hash.
- 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::Operationset_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).
-
parent (::String) — Required. The parent of
Collection, in the format of
projects/{project}/locations/{location}. -
collection_id (::String) — Required. The ID to use for the
Collection, which will become
the final component of the
Collection's resource name. A
new Collection is created as
part of the DataConnector
setup. DataConnector is a
singleton resource under
Collection, managing all
DataStores of the
Collection.
Should conform to RFC-1034 standard with a length limit of 63 characters. Otherwise, an
INVALID_ARGUMENTerror is returned. -
collection_display_name (::String) — Required. The display name of the
Collection.
Should be human readable, used to display collections in the Console Dashboard. UTF-8 encoded string with limit of 1024 characters.
- data_connector (::Google::Cloud::DiscoveryEngine::V1::DataConnector, ::Hash) — Required. The DataConnector to initialize in the newly created Collection.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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() -> StringThe effective universe domain
- (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::DataConnectorUpdates a DataConnector.
def update_data_connector(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1::DataConnectorupdate_data_connector via a request object, either of type
UpdateDataConnectorRequest or an equivalent Hash.
- 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::DataConnectorupdate_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).
-
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_DENIEDerror is returned.If the DataConnector does not exist, a
NOT_FOUNDerror is returned. -
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Indicates which fields in the provided
DataConnector to update.
Supported field paths include:
refresh_intervalparamsauto_run_disabledaction_configaction_config.action_paramsaction_config.service_namedestination_configsblocking_reasonssync_modeincremental_sync_disabledincremental_refresh_intervaldata_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_ARGUMENTerror.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DiscoveryEngine::V1::DataConnector)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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