public class FilterLogEventsRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
FilterLogEvents operation.
Retrieves log events, optionally filtered by a filter pattern from
the specified log group. You can provide an optional time range to
filter the results on the event timestamp . You can limit
the streams searched to an explicit list of
logStreamNames .
By default, this operation returns as much matching log events as can
fit in a response size of 1MB, up to 10,000 log events, or all the
events found within a time-bounded scan window. If the response
includes a nextToken , then there is more data to search,
and the search can be resumed with a new request providing the
nextToken. The response will contain a list of
searchedLogStreams that contains information about which
streams were searched in the request and whether they have been
searched completely or require further pagination. The
limit parameter in the request. can be used to specify
the maximum number of events to return in a page.
NOOP| Constructor and Description |
|---|
FilterLogEventsRequest() |
| Modifier and Type | Method and Description |
|---|---|
FilterLogEventsRequest |
clone() |
boolean |
equals(Object obj) |
Long |
getEndTime()
A unix timestamp indicating the end time of the range for the request.
|
String |
getFilterPattern()
A valid CloudWatch Logs filter pattern to use for filtering the
response.
|
Boolean |
getInterleaved()
If provided, the API will make a best effort to provide responses that
contain events from multiple log streams within the log group
interleaved in a single response.
|
Integer |
getLimit()
The maximum number of events to return in a page of results.
|
String |
getLogGroupName()
The name of the log group to query.
|
List<String> |
getLogStreamNames()
Optional list of log stream names within the specified log group to
search.
|
String |
getNextToken()
A pagination token obtained from a
FilterLogEvents response to continue paginating
the FilterLogEvents results. |
Long |
getStartTime()
A unix timestamp indicating the start time of the range for the
request.
|
int |
hashCode() |
Boolean |
isInterleaved()
If provided, the API will make a best effort to provide responses that
contain events from multiple log streams within the log group
interleaved in a single response.
|
void |
setEndTime(Long endTime)
A unix timestamp indicating the end time of the range for the request.
|
void |
setFilterPattern(String filterPattern)
A valid CloudWatch Logs filter pattern to use for filtering the
response.
|
void |
setInterleaved(Boolean interleaved)
If provided, the API will make a best effort to provide responses that
contain events from multiple log streams within the log group
interleaved in a single response.
|
void |
setLimit(Integer limit)
The maximum number of events to return in a page of results.
|
void |
setLogGroupName(String logGroupName)
The name of the log group to query.
|
void |
setLogStreamNames(Collection<String> logStreamNames)
Optional list of log stream names within the specified log group to
search.
|
void |
setNextToken(String nextToken)
A pagination token obtained from a
FilterLogEvents response to continue paginating
the FilterLogEvents results. |
void |
setStartTime(Long startTime)
A unix timestamp indicating the start time of the range for the
request.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
FilterLogEventsRequest |
withEndTime(Long endTime)
A unix timestamp indicating the end time of the range for the request.
|
FilterLogEventsRequest |
withFilterPattern(String filterPattern)
A valid CloudWatch Logs filter pattern to use for filtering the
response.
|
FilterLogEventsRequest |
withInterleaved(Boolean interleaved)
If provided, the API will make a best effort to provide responses that
contain events from multiple log streams within the log group
interleaved in a single response.
|
FilterLogEventsRequest |
withLimit(Integer limit)
The maximum number of events to return in a page of results.
|
FilterLogEventsRequest |
withLogGroupName(String logGroupName)
The name of the log group to query.
|
FilterLogEventsRequest |
withLogStreamNames(Collection<String> logStreamNames)
Optional list of log stream names within the specified log group to
search.
|
FilterLogEventsRequest |
withLogStreamNames(String... logStreamNames)
Optional list of log stream names within the specified log group to
search.
|
FilterLogEventsRequest |
withNextToken(String nextToken)
A pagination token obtained from a
FilterLogEvents response to continue paginating
the FilterLogEvents results. |
FilterLogEventsRequest |
withStartTime(Long startTime)
A unix timestamp indicating the start time of the range for the
request.
|
copyBaseTo, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic String getLogGroupName()
Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+
public void setLogGroupName(String logGroupName)
Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+
logGroupName - The name of the log group to query.public FilterLogEventsRequest withLogGroupName(String logGroupName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 512
Pattern: [\.\-_/#A-Za-z0-9]+
logGroupName - The name of the log group to query.public List<String> getLogStreamNames()
Constraints:
Length: 1 - 100
public void setLogStreamNames(Collection<String> logStreamNames)
Constraints:
Length: 1 - 100
logStreamNames - Optional list of log stream names within the specified log group to
search. Defaults to all the log streams in the log group.public FilterLogEventsRequest withLogStreamNames(String... logStreamNames)
NOTE: This method appends the values to the existing list (if
any). Use setLogStreamNames(java.util.Collection) or withLogStreamNames(java.util.Collection) if you want to override the
existing values.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 100
logStreamNames - Optional list of log stream names within the specified log group to
search. Defaults to all the log streams in the log group.public FilterLogEventsRequest withLogStreamNames(Collection<String> logStreamNames)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 100
logStreamNames - Optional list of log stream names within the specified log group to
search. Defaults to all the log streams in the log group.public Long getStartTime()
Constraints:
Range: 0 -
public void setStartTime(Long startTime)
Constraints:
Range: 0 -
startTime - A unix timestamp indicating the start time of the range for the
request. If provided, events with a timestamp prior to this time will
not be returned.public FilterLogEventsRequest withStartTime(Long startTime)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 0 -
startTime - A unix timestamp indicating the start time of the range for the
request. If provided, events with a timestamp prior to this time will
not be returned.public Long getEndTime()
Constraints:
Range: 0 -
public void setEndTime(Long endTime)
Constraints:
Range: 0 -
endTime - A unix timestamp indicating the end time of the range for the request.
If provided, events with a timestamp later than this time will not be
returned.public FilterLogEventsRequest withEndTime(Long endTime)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 0 -
endTime - A unix timestamp indicating the end time of the range for the request.
If provided, events with a timestamp later than this time will not be
returned.public String getFilterPattern()
Constraints:
Length: 0 - 512
public void setFilterPattern(String filterPattern)
Constraints:
Length: 0 - 512
filterPattern - A valid CloudWatch Logs filter pattern to use for filtering the
response. If not provided, all the events are matched.public FilterLogEventsRequest withFilterPattern(String filterPattern)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 512
filterPattern - A valid CloudWatch Logs filter pattern to use for filtering the
response. If not provided, all the events are matched.public String getNextToken()
FilterLogEvents response to continue paginating
the FilterLogEvents results.
Constraints:
Length: 1 -
FilterLogEvents response to continue paginating
the FilterLogEvents results.public void setNextToken(String nextToken)
FilterLogEvents response to continue paginating
the FilterLogEvents results.
Constraints:
Length: 1 -
nextToken - A pagination token obtained from a FilterLogEvents response to continue paginating
the FilterLogEvents results.public FilterLogEventsRequest withNextToken(String nextToken)
FilterLogEvents response to continue paginating
the FilterLogEvents results.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 -
nextToken - A pagination token obtained from a FilterLogEvents response to continue paginating
the FilterLogEvents results.public Integer getLimit()
Constraints:
Range: 1 - 10000
public void setLimit(Integer limit)
Constraints:
Range: 1 - 10000
limit - The maximum number of events to return in a page of results. Default
is 10,000 events.public FilterLogEventsRequest withLimit(Integer limit)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 1 - 10000
limit - The maximum number of events to return in a page of results. Default
is 10,000 events.public Boolean isInterleaved()
public void setInterleaved(Boolean interleaved)
interleaved - If provided, the API will make a best effort to provide responses that
contain events from multiple log streams within the log group
interleaved in a single response. If not provided, all the matched log
events in the first log stream will be searched first, then those in
the next log stream, etc.public FilterLogEventsRequest withInterleaved(Boolean interleaved)
Returns a reference to this object so that method calls can be chained together.
interleaved - If provided, the API will make a best effort to provide responses that
contain events from multiple log streams within the log group
interleaved in a single response. If not provided, all the matched log
events in the first log stream will be searched first, then those in
the next log stream, etc.public Boolean getInterleaved()
public String toString()
toString in class ObjectObject.toString()public FilterLogEventsRequest clone()
clone in class AmazonWebServiceRequestCopyright © 2015. All rights reserved.