QueryDetails

class oci.log_analytics.models.QueryDetails(**kwargs)

Bases: object

Input arguments for running a log anlaytics query. If the request is set to run in asynchronous mode then shouldIncludeColumns and shouldIncludeFields can be overwritten when retrieving the results.

Attributes

ASYNC_MODE_BACKGROUND A constant which can be used with the async_mode property of a QueryDetails.
ASYNC_MODE_FOREGROUND A constant which can be used with the async_mode property of a QueryDetails.
SUB_SYSTEM_LOG A constant which can be used with the sub_system property of a QueryDetails.
async_mode Gets the async_mode of this QueryDetails.
compartment_id [Required] Gets the compartment_id of this QueryDetails.
compartment_id_in_subtree Gets the compartment_id_in_subtree of this QueryDetails.
max_total_count Gets the max_total_count of this QueryDetails.
query_string [Required] Gets the query_string of this QueryDetails.
query_timeout_in_seconds Gets the query_timeout_in_seconds of this QueryDetails.
saved_search_id Gets the saved_search_id of this QueryDetails.
scope_filters Gets the scope_filters of this QueryDetails.
should_include_columns Gets the should_include_columns of this QueryDetails.
should_include_fields Gets the should_include_fields of this QueryDetails.
should_include_total_count Gets the should_include_total_count of this QueryDetails.
should_run_async Gets the should_run_async of this QueryDetails.
should_use_acceleration Gets the should_use_acceleration of this QueryDetails.
sub_system [Required] Gets the sub_system of this QueryDetails.
time_filter Gets the time_filter of this QueryDetails.

Methods

__init__(**kwargs) Initializes a new QueryDetails object with values from keyword arguments.
ASYNC_MODE_BACKGROUND = 'BACKGROUND'

A constant which can be used with the async_mode property of a QueryDetails. This constant has a value of “BACKGROUND”

ASYNC_MODE_FOREGROUND = 'FOREGROUND'

A constant which can be used with the async_mode property of a QueryDetails. This constant has a value of “FOREGROUND”

SUB_SYSTEM_LOG = 'LOG'

A constant which can be used with the sub_system property of a QueryDetails. This constant has a value of “LOG”

__init__(**kwargs)

Initializes a new QueryDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • compartment_id (str) – The value to assign to the compartment_id property of this QueryDetails.
  • compartment_id_in_subtree (bool) – The value to assign to the compartment_id_in_subtree property of this QueryDetails.
  • saved_search_id (str) – The value to assign to the saved_search_id property of this QueryDetails.
  • query_string (str) – The value to assign to the query_string property of this QueryDetails.
  • sub_system (str) – The value to assign to the sub_system property of this QueryDetails. Allowed values for this property are: “LOG”
  • max_total_count (int) – The value to assign to the max_total_count property of this QueryDetails.
  • time_filter (oci.log_analytics.models.TimeRange) – The value to assign to the time_filter property of this QueryDetails.
  • scope_filters (list[oci.log_analytics.models.ScopeFilter]) – The value to assign to the scope_filters property of this QueryDetails.
  • query_timeout_in_seconds (int) – The value to assign to the query_timeout_in_seconds property of this QueryDetails.
  • should_run_async (bool) – The value to assign to the should_run_async property of this QueryDetails.
  • async_mode (str) – The value to assign to the async_mode property of this QueryDetails. Allowed values for this property are: “FOREGROUND”, “BACKGROUND”
  • should_include_total_count (bool) – The value to assign to the should_include_total_count property of this QueryDetails.
  • should_include_columns (bool) – The value to assign to the should_include_columns property of this QueryDetails.
  • should_include_fields (bool) – The value to assign to the should_include_fields property of this QueryDetails.
  • should_use_acceleration (bool) – The value to assign to the should_use_acceleration property of this QueryDetails.
async_mode

Gets the async_mode of this QueryDetails. Execution mode for the query if running asynchronously i.e (shouldRunAsync is set to true).

Allowed values for this property are: “FOREGROUND”, “BACKGROUND”

Returns:The async_mode of this QueryDetails.
Return type:str
compartment_id

[Required] Gets the compartment_id of this QueryDetails. Compartment Identifier OCID].

Returns:The compartment_id of this QueryDetails.
Return type:str
compartment_id_in_subtree

Gets the compartment_id_in_subtree of this QueryDetails. Flag to search all child compartments of the compartment Id specified in the compartmentId query parameter.

Returns:The compartment_id_in_subtree of this QueryDetails.
Return type:bool
max_total_count

Gets the max_total_count of this QueryDetails. Maximum number of results to count. Note a maximum of 2001 will be enforced; that is, actualMaxTotalCountUsed = Math.min(maxTotalCount, 2001).

Returns:The max_total_count of this QueryDetails.
Return type:int
query_string

[Required] Gets the query_string of this QueryDetails. Query to perform. Must conform to logging analytic querylanguage syntax. Syntax errors will be returned if present.

Returns:The query_string of this QueryDetails.
Return type:str
query_timeout_in_seconds

Gets the query_timeout_in_seconds of this QueryDetails. Amount of time, in seconds, allowed for a query to execute. If this time expires before the query is complete, any partial results will be returned.

Returns:The query_timeout_in_seconds of this QueryDetails.
Return type:int
saved_search_id

Gets the saved_search_id of this QueryDetails. Saved search OCID for this query if known.

Returns:The saved_search_id of this QueryDetails.
Return type:str
scope_filters

Gets the scope_filters of this QueryDetails. List of filters to be applied when the query executes. More than one filter per field is not permitted.

Returns:The scope_filters of this QueryDetails.
Return type:list[oci.log_analytics.models.ScopeFilter]
should_include_columns

Gets the should_include_columns of this QueryDetails. Include columns in response

Returns:The should_include_columns of this QueryDetails.
Return type:bool
should_include_fields

Gets the should_include_fields of this QueryDetails. Include fields in response

Returns:The should_include_fields of this QueryDetails.
Return type:bool
should_include_total_count

Gets the should_include_total_count of this QueryDetails. Include the total number of results from the query. Note, this value will always be equal to or less than maxTotalCount.

Returns:The should_include_total_count of this QueryDetails.
Return type:bool
should_run_async

Gets the should_run_async of this QueryDetails. Option to run the query asynchronously. This will lead to a LogAnalyticsQueryJobWorkRequest being submitted and the {workRequestId} will be returned to use for fetching the results.

Returns:The should_run_async of this QueryDetails.
Return type:bool
should_use_acceleration

Gets the should_use_acceleration of this QueryDetails. Controls if query should ignore pre-calculated results if available and only use raw data. If set and no acceleration data is found it will fallback to raw data.

Returns:The should_use_acceleration of this QueryDetails.
Return type:bool
sub_system

[Required] Gets the sub_system of this QueryDetails. Default subsystem to qualify fields with in the queryString if not specified.

Allowed values for this property are: “LOG”

Returns:The sub_system of this QueryDetails.
Return type:str
time_filter

Gets the time_filter of this QueryDetails.

Returns:The time_filter of this QueryDetails.
Return type:oci.log_analytics.models.TimeRange