Package com.azure.monitor.query.models
Class LogsQueryOptions
java.lang.Object
com.azure.monitor.query.models.LogsQueryOptions
The options type to configure the logs query
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the list of additional workspaces on which this query is executed.Returns the server timeout for this query.boolean
If a query has partial errors, the result is returned instead of throwing an exception if this is set to true.boolean
Returns the flag that indicates if the query should include statistics.boolean
Returns the flag that indicates if the query should return visualization details.setAdditionalWorkspaces
(String... additionalWorkspaces) Sets the list of additional workspaces on which this query is executed.setAdditionalWorkspaces
(List<String> additionalWorkspaces) Sets the list of additional workspaces on which this query is executed.setAllowPartialErrors
(boolean allowPartialErrors) If set totrue
, exception is not thrown if query returns partial errors.setIncludeStatistics
(boolean includeStatistics) Sets the flag that indicates if the query should include statistics.setIncludeVisualization
(boolean includeVisualization) Sets the flag that indicates if the query should return visualization details.setServerTimeout
(Duration serverTimeout) Sets the server timeout for this query.
-
Constructor Details
-
LogsQueryOptions
public LogsQueryOptions()
-
-
Method Details
-
getServerTimeout
Returns the server timeout for this query.- Returns:
- The server timeout duration.
-
setServerTimeout
Sets the server timeout for this query.- Parameters:
serverTimeout
- The server timeout duration.- Returns:
- The updated options instance.
-
isIncludeVisualization
public boolean isIncludeVisualization()Returns the flag that indicates if the query should return visualization details.- Returns:
- The flag that indicates if the query should return visualization details.
-
setIncludeVisualization
Sets the flag that indicates if the query should return visualization details.- Parameters:
includeVisualization
- The flag that indicates if the query should return visualization details.- Returns:
- The updated options instance.
-
isIncludeStatistics
public boolean isIncludeStatistics()Returns the flag that indicates if the query should include statistics.- Returns:
- the flag that indicates if the query should include statistics.
-
setIncludeStatistics
Sets the flag that indicates if the query should include statistics.- Parameters:
includeStatistics
- the flag that indicates if the query should include statistics.- Returns:
- The updated options instance.
-
isAllowPartialErrors
public boolean isAllowPartialErrors()If a query has partial errors, the result is returned instead of throwing an exception if this is set to true. The partial error information is available as part of the query result.- Returns:
- Returns true if partial errors should not throw exception.
-
setAllowPartialErrors
If set totrue
, exception is not thrown if query returns partial errors. The partial error information is available as part of the query result.- Parameters:
allowPartialErrors
- set this totrue
to not throw exception if a query returns partial errors.- Returns:
- The updated options instance.
-
getAdditionalWorkspaces
Returns the list of additional workspaces on which this query is executed. The list can contain any of the following workspace identifiers:- Workspace Name - human-readable string
<workspaceName>
of the OMS workspace - Qualified Name - string with format
<subscriptionName>/<resourceGroup>/<workspaceName>
- Workspace ID - GUID string
- Azure Resource ID - string with format
/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/microsoft .operationalinsights/workspaces/<workspaceName>
- Returns:
- the list of additional workspaces on which this query is executed.
- Workspace Name - human-readable string
-
setAdditionalWorkspaces
Sets the list of additional workspaces on which this query is executed. The list can contain any of the following workspace identifiers:- Workspace Name - human-readable string
<workspaceName>
of the OMS workspace - Qualified Name - string with format
<subscriptionName>/<resourceGroup>/<workspaceName>
- Workspace ID - GUID string
- Azure Resource ID - string with format
/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/microsoft .operationalinsights/workspaces/<workspaceName>
- Parameters:
additionalWorkspaces
- the list of additional workspaces on which this query is executed.- Returns:
- The updated options instance.
- Workspace Name - human-readable string
-
setAdditionalWorkspaces
Sets the list of additional workspaces on which this query is executed. The list can contain any of the following workspace identifiers:- Workspace Name - human-readable string
<workspaceName>
of the OMS workspace - Qualified Name - string with format
<subscriptionName>/<resourceGroup>/<workspaceName>
- Workspace ID - GUID string
- Azure Resource ID - string with format
/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/microsoft .operationalinsights/workspaces/<workspaceName>
- Parameters:
additionalWorkspaces
- additional workspaces on which this query is executed.- Returns:
- The updated options instance.
- Workspace Name - human-readable string
-