Reference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::LicenseConfigService::Rest::Client.
REST client for the LicenseConfigService service.
Service for managing license config related resources.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the LicenseConfigService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all LicenseConfigService clients ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfigService::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#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::LicenseConfigCreates a LicenseConfig This method should only be used for creating NotebookLm licenses or Gemini Enterprise free trial licenses.
def create_license_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfigcreate_license_config via a request object, either of type
CreateLicenseConfigRequest or an equivalent Hash.
- 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::LicenseConfigcreate_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).
-
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
searchorsearch_and_assistant.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::DistributeLicenseConfigResponseDistributes a LicenseConfig from billing account level to project level.
def distribute_license_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::DistributeLicenseConfigResponsedistribute_license_config via a request object, either of type
DistributeLicenseConfigRequest or an equivalent Hash.
- 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::DistributeLicenseConfigResponsedistribute_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).
-
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DiscoveryEngine::V1beta::DistributeLicenseConfigResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::LicenseConfigGets a LicenseConfig.
def get_license_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfigget_license_config via a request object, either of type
GetLicenseConfigRequest or an equivalent Hash.
- 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::LicenseConfigget_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).
-
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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| ... } -> ClientCreate a new LicenseConfigService REST client object.
- (config) — Configure the LicenseConfigService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfigService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfigService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_license_configs
def list_license_configs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig>
def list_license_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig>Lists all the {::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig LicenseConfig}s associated with the project.
def list_license_configs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig>list_license_configs via a request object, either of type
Google::Cloud::DiscoveryEngine::V1beta::ListLicenseConfigsRequest or an equivalent Hash.
- 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::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig>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).
-
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_tierstate
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig>)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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::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)
#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::RetractLicenseConfigResponseThis method is called from the billing account side to retract the LicenseConfig from the given project back to the billing account.
def retract_license_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::RetractLicenseConfigResponseretract_license_config via a request object, either of type
RetractLicenseConfigRequest or an equivalent Hash.
- 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::RetractLicenseConfigResponseretract_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).
-
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DiscoveryEngine::V1beta::RetractLicenseConfigResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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() -> StringThe effective universe domain
- (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::LicenseConfigUpdates the LicenseConfig
def update_license_config(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfigupdate_license_config via a request object, either of type
UpdateLicenseConfigRequest or an equivalent Hash.
- 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::LicenseConfigupdate_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).
- license_config (::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig, ::Hash) — Required. The LicenseConfig to update.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Indicates which fields in the provided
LicenseConfig to
update.
If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
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::Rest::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