Class QueryTimeInterval

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

public final class QueryTimeInterval extends Object
Class to represent a time interval.
  • Field Details

    • ALL

      public static final QueryTimeInterval ALL
      Time interval of all time.
    • LAST_5_MINUTES

      public static final QueryTimeInterval LAST_5_MINUTES
      Time interval of the last 5 minutes.
    • LAST_30_MINUTES

      public static final QueryTimeInterval LAST_30_MINUTES
      Time interval of the last 30 minutes.
    • LAST_1_HOUR

      public static final QueryTimeInterval LAST_1_HOUR
      Time interval of the last hour.
    • LAST_4_HOURS

      public static final QueryTimeInterval LAST_4_HOURS
      Time interval of the last 4 hours.
    • LAST_12_HOURS

      public static final QueryTimeInterval LAST_12_HOURS
      Time interval of the last 12 hours.
    • LAST_DAY

      public static final QueryTimeInterval LAST_DAY
      Time interval of the last day.
    • LAST_2_DAYS

      public static final QueryTimeInterval LAST_2_DAYS
      Time interval of the last 2 days.
    • LAST_3_DAYS

      public static final QueryTimeInterval LAST_3_DAYS
      Time interval of the last 3 days.
    • LAST_7_DAYS

      public static final QueryTimeInterval LAST_7_DAYS
      Time interval of the last 7 days.
  • Constructor Details

    • QueryTimeInterval

      public QueryTimeInterval(Duration duration)
      Creates an instance of QueryTimeInterval using the provided duration. The duration is the interval that starts from the provided duration and ends at the current time.
      Parameters:
      duration - the duration for this query time span.
    • QueryTimeInterval

      public QueryTimeInterval(OffsetDateTime startTime, OffsetDateTime endTime)
      Creates an instance of QueryTimeInterval using the start and end OffsetDateTimes.
      Parameters:
      startTime - The start time of the interval.
      endTime - The end time of the interval.
    • QueryTimeInterval

      public QueryTimeInterval(OffsetDateTime startTime, Duration duration)
      Creates an instance of QueryTimeInterval using the start and end duration of the interval.
      Parameters:
      startTime - The start time of the interval.
      duration - The end duration of the interval.
  • Method Details