Discovery Engine V1BETA API - Class Google::Cloud::DiscoveryEngine::V1beta::LicenseConfigService::Client (v0.28.0)

Reference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::LicenseConfigService::Client.

Client for the LicenseConfigService service.

Service for managing license config related resources.

Inherits

  • Object

Methods

.configure

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

Configure the LicenseConfigService 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 LicenseConfigService clients
::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfigService::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the LicenseConfigService 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

#create_license_config

def create_license_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig
def create_license_config(parent: nil, license_config: nil, license_config_id: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig

Creates a LicenseConfig This method should only be used for creating NotebookLm licenses or Gemini Enterprise free trial licenses.

Overloads
def create_license_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig
Pass arguments to create_license_config via a request object, either of type CreateLicenseConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::CreateLicenseConfigRequest, ::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 create_license_config(parent: nil, license_config: nil, license_config_id: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig
Pass arguments to create_license_config 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
  • parent (::String) — Required. The parent resource name, such as projects/{project}/locations/{location}.
  • license_config (::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig, ::Hash) — Required. The LicenseConfig to create.
  • license_config_id (::String) — Optional. The ID to use for the LicenseConfig, which will become the final component of the LicenseConfig's resource name. We are using the tier (product edition) name as the license config id such as search or search_and_assistant.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/discovery_engine/v1beta"

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

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

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

# The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig.
p result

#distribute_license_config

def distribute_license_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::DistributeLicenseConfigResponse
def distribute_license_config(billing_account_license_config: nil, project_number: nil, location: nil, license_count: nil, license_config_id: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::DistributeLicenseConfigResponse

Distributes a LicenseConfig from billing account level to project level.

Overloads
def distribute_license_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::DistributeLicenseConfigResponse
Pass arguments to distribute_license_config via a request object, either of type DistributeLicenseConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::DistributeLicenseConfigRequest, ::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 distribute_license_config(billing_account_license_config: nil, project_number: nil, location: nil, license_count: nil, license_config_id: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::DistributeLicenseConfigResponse
Pass arguments to distribute_license_config 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
  • billing_account_license_config (::String) — Required. Full resource name of [BillingAccountLicenseConfig][].

    Format: billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}.

  • project_number (::Integer) — Required. The target GCP project number to distribute the license config to.
  • location (::String) — Required. The target GCP project region to distribute the license config to.
  • license_count (::Integer) — Required. The number of licenses to distribute.
  • license_config_id (::String) — Optional. Distribute seats to this license config instead of creating a new one. If not specified, a new license config will be created from the billing account license config.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/discovery_engine/v1beta"

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

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

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

# The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::DistributeLicenseConfigResponse.
p result

#get_license_config

def get_license_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig
def get_license_config(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig

Gets a LicenseConfig.

Overloads
def get_license_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig
Pass arguments to get_license_config via a request object, either of type GetLicenseConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::GetLicenseConfigRequest, ::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_license_config(name: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig
Pass arguments to get_license_config 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 LicenseConfig, such as projects/{project}/locations/{location}/licenseConfigs/*.

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

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

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

Basic example

require "google/cloud/discovery_engine/v1beta"

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

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

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

# The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig.
p result

#initialize

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

Create a new LicenseConfigService client object.

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

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

#list_license_configs

def list_license_configs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig>
def list_license_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig>

Lists all the {::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig LicenseConfig}s associated with the project.

Overloads
def list_license_configs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig>
Pass arguments to list_license_configs via a request object, either of type Google::Cloud::DiscoveryEngine::V1beta::ListLicenseConfigsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::ListLicenseConfigsRequest, ::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 list_license_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig>
Pass arguments to list_license_configs 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
  • parent (::String) — Required. The parent branch resource name, such as projects/{project}/locations/{location}.
  • page_size (::Integer) — Optional. Not supported.
  • page_token (::String) — Optional. Not supported.
  • filter (::String) — Optional. The filter to apply to the list results.

    The supported fields are:

    • subscription_tier
    • state

    Examples:

    • subscription_tier=SUBSCRIPTION_TIER_SEARCH,state=ACTIVE - Lists all active search license configs.
    • state=ACTIVE - Lists all active license configs.

    The filter string should be a comma-separated list of field=value pairs.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/discovery_engine/v1beta"

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

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

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig.
  p item
end

#location_client

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

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

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

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#retract_license_config

def retract_license_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::RetractLicenseConfigResponse
def retract_license_config(billing_account_license_config: nil, license_config: nil, full_retract: nil, license_count: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::RetractLicenseConfigResponse

This method is called from the billing account side to retract the LicenseConfig from the given project back to the billing account.

Overloads
def retract_license_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::RetractLicenseConfigResponse
Pass arguments to retract_license_config via a request object, either of type RetractLicenseConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::RetractLicenseConfigRequest, ::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 retract_license_config(billing_account_license_config: nil, license_config: nil, full_retract: nil, license_count: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::RetractLicenseConfigResponse
Pass arguments to retract_license_config 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
  • billing_account_license_config (::String) — Required. Full resource name of [BillingAccountLicenseConfig][].

    Format: billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}.

  • license_config (::String) — Required. Full resource name of LicenseConfig.

    Format: projects/{project}/locations/{location}/licenseConfigs/{license_config_id}.

  • full_retract (::Boolean) — Optional. If set to true, retract the entire license config. Otherwise, retract the specified license count.
  • license_count (::Integer) — Optional. The number of licenses to retract. Only used when full_retract is false.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/discovery_engine/v1beta"

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

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

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

# The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::RetractLicenseConfigResponse.
p result

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_license_config

def update_license_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig
def update_license_config(license_config: nil, update_mask: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig

Updates the LicenseConfig

Overloads
def update_license_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig
Pass arguments to update_license_config via a request object, either of type UpdateLicenseConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DiscoveryEngine::V1beta::UpdateLicenseConfigRequest, ::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_license_config(license_config: nil, update_mask: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig
Pass arguments to update_license_config 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
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/discovery_engine/v1beta"

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

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

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

# The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig.
p result