Reference documentation and code samples for the License Manager V1 API class Google::Cloud::LicenseManager::V1::LicenseManager::Client.
Client for the LicenseManager service.
Service describing handlers for resources
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the LicenseManager Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all LicenseManager clients ::Google::Cloud::LicenseManager::V1::LicenseManager::Client.configure do |config| config.timeout = 10.0 end
#aggregate_usage
def aggregate_usage(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Usage>
def aggregate_usage(name: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, start_time: nil, end_time: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Usage>
Aggregates Usage per Instance for a Configuration.
def aggregate_usage(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Usage>
aggregate_usage
via a request object, either of type
AggregateUsageRequest or an equivalent Hash.
- request (::Google::Cloud::LicenseManager::V1::AggregateUsageRequest, ::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 aggregate_usage(name: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, start_time: nil, end_time: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Usage>
aggregate_usage
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. Parent value for AggregateUsageRequest
- page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- page_token (::String) — Optional. A token identifying a page of results the server should return.
- filter (::String) — Optional. Filtering results
- order_by (::String) — Optional. Hint for how to order the results
- start_time (::Google::Protobuf::Timestamp, ::Hash) — Required. Licenses are purchased per month - so usage track needs start time of a month.
- end_time (::Google::Protobuf::Timestamp, ::Hash) — Required. Usage track is always for a month. This parameter is for the end time of the month.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Usage>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Usage>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/license_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::LicenseManager::V1::LicenseManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::LicenseManager::V1::AggregateUsageRequest.new # Call the aggregate_usage method. result = client.aggregate_usage 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::LicenseManager::V1::Usage. p item end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the LicenseManager 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_configuration
def create_configuration(request, options = nil) -> ::Gapic::Operation
def create_configuration(parent: nil, configuration_id: nil, configuration: nil, request_id: nil) -> ::Gapic::Operation
Creates a new Configuration in a given project and location.
def create_configuration(request, options = nil) -> ::Gapic::Operation
create_configuration
via a request object, either of type
CreateConfigurationRequest or an equivalent Hash.
- request (::Google::Cloud::LicenseManager::V1::CreateConfigurationRequest, ::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_configuration(parent: nil, configuration_id: nil, configuration: nil, request_id: nil) -> ::Gapic::Operation
create_configuration
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. Value for parent.
- configuration_id (::String) — Required. Id of the requesting object
- configuration (::Google::Cloud::LicenseManager::V1::Configuration, ::Hash) — Required. The resource being created
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/license_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::LicenseManager::V1::LicenseManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::LicenseManager::V1::CreateConfigurationRequest.new # Call the create_configuration method. result = client.create_configuration 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
#deactivate_configuration
def deactivate_configuration(request, options = nil) -> ::Gapic::Operation
def deactivate_configuration(name: nil, request_id: nil) -> ::Gapic::Operation
Deactivates the given configuration.
def deactivate_configuration(request, options = nil) -> ::Gapic::Operation
deactivate_configuration
via a request object, either of type
DeactivateConfigurationRequest or an equivalent Hash.
- request (::Google::Cloud::LicenseManager::V1::DeactivateConfigurationRequest, ::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 deactivate_configuration(name: nil, request_id: nil) -> ::Gapic::Operation
deactivate_configuration
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. Name of the resource.
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes after the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/license_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::LicenseManager::V1::LicenseManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::LicenseManager::V1::DeactivateConfigurationRequest.new # Call the deactivate_configuration method. result = client.deactivate_configuration 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
#delete_configuration
def delete_configuration(request, options = nil) -> ::Gapic::Operation
def delete_configuration(name: nil, request_id: nil) -> ::Gapic::Operation
Deletes a single Configuration.
def delete_configuration(request, options = nil) -> ::Gapic::Operation
delete_configuration
via a request object, either of type
DeleteConfigurationRequest or an equivalent Hash.
- request (::Google::Cloud::LicenseManager::V1::DeleteConfigurationRequest, ::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 delete_configuration(name: nil, request_id: nil) -> ::Gapic::Operation
delete_configuration
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. Name of the resource
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes after the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/license_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::LicenseManager::V1::LicenseManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::LicenseManager::V1::DeleteConfigurationRequest.new # Call the delete_configuration method. result = client.delete_configuration 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
#get_configuration
def get_configuration(request, options = nil) -> ::Google::Cloud::LicenseManager::V1::Configuration
def get_configuration(name: nil) -> ::Google::Cloud::LicenseManager::V1::Configuration
Gets details of a single Configuration.
def get_configuration(request, options = nil) -> ::Google::Cloud::LicenseManager::V1::Configuration
get_configuration
via a request object, either of type
GetConfigurationRequest or an equivalent Hash.
- request (::Google::Cloud::LicenseManager::V1::GetConfigurationRequest, ::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_configuration(name: nil) -> ::Google::Cloud::LicenseManager::V1::Configuration
get_configuration
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. Name of the resource
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::LicenseManager::V1::Configuration)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/license_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::LicenseManager::V1::LicenseManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::LicenseManager::V1::GetConfigurationRequest.new # Call the get_configuration method. result = client.get_configuration request # The returned object is of type Google::Cloud::LicenseManager::V1::Configuration. p result
#get_instance
def get_instance(request, options = nil) -> ::Google::Cloud::LicenseManager::V1::Instance
def get_instance(name: nil) -> ::Google::Cloud::LicenseManager::V1::Instance
Gets details of a single Instance.
def get_instance(request, options = nil) -> ::Google::Cloud::LicenseManager::V1::Instance
get_instance
via a request object, either of type
GetInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::LicenseManager::V1::GetInstanceRequest, ::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_instance(name: nil) -> ::Google::Cloud::LicenseManager::V1::Instance
get_instance
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. Name of the resource
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::LicenseManager::V1::Instance)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/license_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::LicenseManager::V1::LicenseManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::LicenseManager::V1::GetInstanceRequest.new # Call the get_instance method. result = client.get_instance request # The returned object is of type Google::Cloud::LicenseManager::V1::Instance. p result
#get_product
def get_product(request, options = nil) -> ::Google::Cloud::LicenseManager::V1::Product
def get_product(name: nil) -> ::Google::Cloud::LicenseManager::V1::Product
Gets details of a single Product.
def get_product(request, options = nil) -> ::Google::Cloud::LicenseManager::V1::Product
get_product
via a request object, either of type
GetProductRequest or an equivalent Hash.
- request (::Google::Cloud::LicenseManager::V1::GetProductRequest, ::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_product(name: nil) -> ::Google::Cloud::LicenseManager::V1::Product
get_product
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. Name of the resource
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::LicenseManager::V1::Product)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/license_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::LicenseManager::V1::LicenseManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::LicenseManager::V1::GetProductRequest.new # Call the get_product method. result = client.get_product request # The returned object is of type Google::Cloud::LicenseManager::V1::Product. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new LicenseManager client object.
- (config) — Configure the LicenseManager client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::LicenseManager::V1::LicenseManager::Client.new # Create a client using a custom configuration client = ::Google::Cloud::LicenseManager::V1::LicenseManager::Client.new do |config| config.timeout = 10.0 end
#list_configurations
def list_configurations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Configuration>
def list_configurations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Configuration>
Lists Configurations in a given project and location.
def list_configurations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Configuration>
list_configurations
via a request object, either of type
Google::Cloud::LicenseManager::V1::ListConfigurationsRequest or an equivalent Hash.
- request (::Google::Cloud::LicenseManager::V1::ListConfigurationsRequest, ::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_configurations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Configuration>
list_configurations
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. Parent value for ListConfigurationsRequest
- page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- page_token (::String) — Optional. A token identifying a page of results the server should return.
- filter (::String) — Optional. Filtering results
- order_by (::String) — Optional. Hint for how to order the results
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Configuration>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Configuration>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/license_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::LicenseManager::V1::LicenseManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::LicenseManager::V1::ListConfigurationsRequest.new # Call the list_configurations method. result = client.list_configurations 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::LicenseManager::V1::Configuration. p item end
#list_instances
def list_instances(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Instance>
def list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Instance>
Lists Instances in a given project and location.
def list_instances(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Instance>
list_instances
via a request object, either of type
Google::Cloud::LicenseManager::V1::ListInstancesRequest or an equivalent Hash.
- request (::Google::Cloud::LicenseManager::V1::ListInstancesRequest, ::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_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Instance>
list_instances
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. Parent value for ListInstancesRequest
- page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- page_token (::String) — Optional. A token identifying a page of results the server should return.
- filter (::String) — Optional. Filtering results
- order_by (::String) — Optional. Hint for how to order the results
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Instance>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Instance>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/license_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::LicenseManager::V1::LicenseManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::LicenseManager::V1::ListInstancesRequest.new # Call the list_instances method. result = client.list_instances 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::LicenseManager::V1::Instance. p item end
#list_products
def list_products(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Product>
def list_products(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Product>
Lists Products in a given project and location.
def list_products(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Product>
list_products
via a request object, either of type
Google::Cloud::LicenseManager::V1::ListProductsRequest or an equivalent Hash.
- request (::Google::Cloud::LicenseManager::V1::ListProductsRequest, ::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_products(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Product>
list_products
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. Parent value for ListProductsRequest
- page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- page_token (::String) — Optional. A token identifying a page of results the server should return.
- filter (::String) — Optional. Filtering results
- order_by (::String) — Optional. Hint for how to order the results
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Product>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::LicenseManager::V1::Product>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/license_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::LicenseManager::V1::LicenseManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::LicenseManager::V1::ListProductsRequest.new # Call the list_products method. result = client.list_products 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::LicenseManager::V1::Product. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::LicenseManager::V1::LicenseManager::Operations
Get the associated client for long-running operations.
#query_configuration_license_usage
def query_configuration_license_usage(request, options = nil) -> ::Google::Cloud::LicenseManager::V1::QueryConfigurationLicenseUsageResponse
def query_configuration_license_usage(name: nil, start_time: nil, end_time: nil) -> ::Google::Cloud::LicenseManager::V1::QueryConfigurationLicenseUsageResponse
License Usage information for a Configuration.
def query_configuration_license_usage(request, options = nil) -> ::Google::Cloud::LicenseManager::V1::QueryConfigurationLicenseUsageResponse
query_configuration_license_usage
via a request object, either of type
QueryConfigurationLicenseUsageRequest or an equivalent Hash.
- request (::Google::Cloud::LicenseManager::V1::QueryConfigurationLicenseUsageRequest, ::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 query_configuration_license_usage(name: nil, start_time: nil, end_time: nil) -> ::Google::Cloud::LicenseManager::V1::QueryConfigurationLicenseUsageResponse
query_configuration_license_usage
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. The resource path of the Configuration.
- start_time (::Google::Protobuf::Timestamp, ::Hash) — Required. The start time for retrieving the usage. If not specified, we will use the first day of the current billing period.
- end_time (::Google::Protobuf::Timestamp, ::Hash) — Required. The end time for retrieving the usage. If not specified, we will use the last day of the current billing period.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::LicenseManager::V1::QueryConfigurationLicenseUsageResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/license_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::LicenseManager::V1::LicenseManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::LicenseManager::V1::QueryConfigurationLicenseUsageRequest.new # Call the query_configuration_license_usage method. result = client.query_configuration_license_usage request # The returned object is of type Google::Cloud::LicenseManager::V1::QueryConfigurationLicenseUsageResponse. p result
#reactivate_configuration
def reactivate_configuration(request, options = nil) -> ::Gapic::Operation
def reactivate_configuration(name: nil, request_id: nil) -> ::Gapic::Operation
Reactivates the given configuration.
def reactivate_configuration(request, options = nil) -> ::Gapic::Operation
reactivate_configuration
via a request object, either of type
ReactivateConfigurationRequest or an equivalent Hash.
- request (::Google::Cloud::LicenseManager::V1::ReactivateConfigurationRequest, ::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 reactivate_configuration(name: nil, request_id: nil) -> ::Gapic::Operation
reactivate_configuration
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. Name of the resource.
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes after the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/license_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::LicenseManager::V1::LicenseManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::LicenseManager::V1::ReactivateConfigurationRequest.new # Call the reactivate_configuration method. result = client.reactivate_configuration 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
- (String)
#update_configuration
def update_configuration(request, options = nil) -> ::Gapic::Operation
def update_configuration(update_mask: nil, configuration: nil, request_id: nil) -> ::Gapic::Operation
Updates the parameters of a single Configuration.
def update_configuration(request, options = nil) -> ::Gapic::Operation
update_configuration
via a request object, either of type
UpdateConfigurationRequest or an equivalent Hash.
- request (::Google::Cloud::LicenseManager::V1::UpdateConfigurationRequest, ::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_configuration(update_mask: nil, configuration: nil, request_id: nil) -> ::Gapic::Operation
update_configuration
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).
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Field mask is used to specify the fields to be overwritten in the Configuration resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
- configuration (::Google::Cloud::LicenseManager::V1::Configuration, ::Hash) — Required. The resource being updated
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/license_manager/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::LicenseManager::V1::LicenseManager::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::LicenseManager::V1::UpdateConfigurationRequest.new # Call the update_configuration method. result = client.update_configuration 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