Class LogsQueryOptions

java.lang.Object
com.azure.monitor.query.models.LogsQueryOptions

public final class LogsQueryOptions extends Object
The options type to configure the logs query
  • Constructor Details

    • LogsQueryOptions

      public LogsQueryOptions()
  • Method Details

    • getServerTimeout

      public Duration getServerTimeout()
      Returns the server timeout for this query.
      Returns:
      The server timeout duration.
    • setServerTimeout

      public LogsQueryOptions setServerTimeout(Duration serverTimeout)
      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

      public LogsQueryOptions setIncludeVisualization(boolean includeVisualization)
      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

      public LogsQueryOptions setIncludeStatistics(boolean includeStatistics)
      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

      public LogsQueryOptions setAllowPartialErrors(boolean allowPartialErrors)
      If set to true, 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 to true to not throw exception if a query returns partial errors.
      Returns:
      The updated options instance.
    • getAdditionalWorkspaces

      public List<String> 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.
    • setAdditionalWorkspaces

      public LogsQueryOptions setAdditionalWorkspaces(List<String> additionalWorkspaces)
      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.
    • setAdditionalWorkspaces

      public LogsQueryOptions setAdditionalWorkspaces(String... additionalWorkspaces)
      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.