Chronicle V1 API - Class Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client (v0.6.0)

Reference documentation and code samples for the Chronicle V1 API class Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.

REST client for the DashboardQueryService service.

A service providing functionality for managing dashboards' queries.

Inherits

  • Object

Methods

.configure

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

Configure the DashboardQueryService 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 DashboardQueryService clients
::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

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

#execute_dashboard_query

def execute_dashboard_query(request, options = nil) -> ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse
def execute_dashboard_query(parent: nil, query: nil, filters: nil, clear_cache: nil, use_previous_time_range: nil) -> ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse

Execute a query and return the data.

Overloads
def execute_dashboard_query(request, options = nil) -> ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse
Pass arguments to execute_dashboard_query via a request object, either of type ExecuteDashboardQueryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest, ::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 execute_dashboard_query(parent: nil, query: nil, filters: nil, clear_cache: nil, use_previous_time_range: nil) -> ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse
Pass arguments to execute_dashboard_query 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, under which to run this dashboardQuery. Format: projects/{project}/locations/{location}/instances/{instance}
  • query (::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash) — Required. The query to execute and get results back for. QueryID or 'query', 'input.time_window' fields will be used. Use 'native_dashboard' and 'dashboard_chart' fields if it is an in-dashboard query.
  • filters (::Array<::Google::Cloud::Chronicle::V1::DashboardFilter, ::Hash>) — Optional. Dashboard level filters other than query string.
  • clear_cache (::Boolean) — Optional. When true, the backend would read from the database, rather than fetching data directly from the cache.
  • use_previous_time_range (::Boolean) — Optional. When true, the backend will execute the query against the previous time range of the query.
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/chronicle/v1"

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

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

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

# The returned object is of type Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse.
p result

#get_dashboard_query

def get_dashboard_query(request, options = nil) -> ::Google::Cloud::Chronicle::V1::DashboardQuery
def get_dashboard_query(name: nil) -> ::Google::Cloud::Chronicle::V1::DashboardQuery

Get a dashboard query.

Overloads
def get_dashboard_query(request, options = nil) -> ::Google::Cloud::Chronicle::V1::DashboardQuery
Pass arguments to get_dashboard_query via a request object, either of type GetDashboardQueryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest, ::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_dashboard_query(name: nil) -> ::Google::Cloud::Chronicle::V1::DashboardQuery
Pass arguments to get_dashboard_query 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. The name of the dashboardQuery to retrieve. Format: projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}
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/chronicle/v1"

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

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

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

# The returned object is of type Google::Cloud::Chronicle::V1::DashboardQuery.
p result

#initialize

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

Create a new DashboardQueryService REST client object.

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

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

#logger

def logger() -> Logger

The logger used for request/response debug logging.

Returns
  • (Logger)

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)