Record Class QueryOptions
java.lang.Object
java.lang.Record
codes.grow.packages.cloudwatchlogs.QueryOptions
- Record Components:
groups- log group names or ARNs (1–50; default[config.logGroup])start- start of the range (default one hour before end)end- end of the range (default now)limit- maximum rows (1–10 000)timeout-querygives up after this long (default 60 s); the query is stopped best-effortpollInterval- first poll interval ofquery(default 1 s), doubled up to 5 sretryOnQueryLimit- StartQuery attempts ofqueryonLimitExceededException(default 3)
public record QueryOptions(List<String> groups, Instant start, Instant end, Integer limit, Duration timeout, Duration pollInterval, Integer retryOnQueryLimit)
extends Record
Options of
startQuery and query (Logs Insights).
Build with builder(); unset values are null and take the documented default.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QueryOptions.Builderbuilder()Starts a builder.static QueryOptionsdefaults()Options with every default.end()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.groups()Returns the value of thegroupsrecord component.final inthashCode()Returns a hash code value for this object.limit()Returns the value of thelimitrecord component.Returns the value of thepollIntervalrecord component.Returns the value of theretryOnQueryLimitrecord component.start()Returns the value of thestartrecord component.timeout()Returns the value of thetimeoutrecord component.Returns a builder holding these values.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
QueryOptions
public QueryOptions(List<String> groups, Instant start, Instant end, Integer limit, Duration timeout, Duration pollInterval, Integer retryOnQueryLimit) Applies defaults.- Parameters:
groups- log group names or ARNs (1–50; default[config.logGroup])start- start of the range (default one hour before end)end- end of the range (default now)limit- maximum rows (1–10 000)timeout-querygives up after this long (default 60 s); the query is stopped best-effortpollInterval- first poll interval ofquery(default 1 s), doubled up to 5 sretryOnQueryLimit- StartQuery attempts ofqueryonLimitExceededException(default 3)
-
-
Method Details
-
defaults
Options with every default.- Returns:
- the options
-
builder
Starts a builder.- Returns:
- a new builder
-
toBuilder
Returns a builder holding these values.- Returns:
- a new builder
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
groups
Returns the value of thegroupsrecord component.- Returns:
- the value of the
groupsrecord component
-
start
Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-
limit
Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-
timeout
Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-
pollInterval
Returns the value of thepollIntervalrecord component.- Returns:
- the value of the
pollIntervalrecord component
-
retryOnQueryLimit
Returns the value of theretryOnQueryLimitrecord component.- Returns:
- the value of the
retryOnQueryLimitrecord component
-