public class GetLogEventsRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
GetLogEvents operation.
Retrieves log events from the specified log stream. You can provide
an optional time range to filter the results on the event
timestamp .
By default, this operation returns as much log events as can fit in a
response size of 1MB, up to 10,000 log events. The response will
always include a nextForwardToken and a
nextBackwardToken in the response body. You can use any
of these tokens in subsequent GetLogEvents requests to
paginate through events in either forward or backward direction. You
can also limit the number of log events returned in the response by
specifying the limit parameter in the request.
NOOP| Constructor and Description |
|---|
GetLogEventsRequest()
Default constructor for a new GetLogEventsRequest object.
|
GetLogEventsRequest(String logGroupName,
String logStreamName)
Constructs a new GetLogEventsRequest object.
|
| Modifier and Type | Method and Description |
|---|---|
GetLogEventsRequest |
clone() |
boolean |
equals(Object obj) |
Long |
getEndTime()
A point in time expressed as the number of milliseconds since Jan 1,
1970 00:00:00 UTC.
|
Integer |
getLimit()
The maximum number of log events returned in the response.
|
String |
getLogGroupName()
The name of the log group to query.
|
String |
getLogStreamName()
The name of the log stream to query.
|
String |
getNextToken()
A string token used for pagination that points to the next page of
results.
|
Boolean |
getStartFromHead()
If set to true, the earliest log events would be returned first.
|
Long |
getStartTime()
A point in time expressed as the number of milliseconds since Jan 1,
1970 00:00:00 UTC.
|
int |
hashCode() |
Boolean |
isStartFromHead()
If set to true, the earliest log events would be returned first.
|
void |
setEndTime(Long endTime)
A point in time expressed as the number of milliseconds since Jan 1,
1970 00:00:00 UTC.
|
void |
setLimit(Integer limit)
The maximum number of log events returned in the response.
|
void |
setLogGroupName(String logGroupName)
The name of the log group to query.
|
void |
setLogStreamName(String logStreamName)
The name of the log stream to query.
|
void |
setNextToken(String nextToken)
A string token used for pagination that points to the next page of
results.
|
void |
setStartFromHead(Boolean startFromHead)
If set to true, the earliest log events would be returned first.
|
void |
setStartTime(Long startTime)
A point in time expressed as the number of milliseconds since Jan 1,
1970 00:00:00 UTC.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
GetLogEventsRequest |
withEndTime(Long endTime)
A point in time expressed as the number of milliseconds since Jan 1,
1970 00:00:00 UTC.
|
GetLogEventsRequest |
withLimit(Integer limit)
The maximum number of log events returned in the response.
|
GetLogEventsRequest |
withLogGroupName(String logGroupName)
The name of the log group to query.
|
GetLogEventsRequest |
withLogStreamName(String logStreamName)
The name of the log stream to query.
|
GetLogEventsRequest |
withNextToken(String nextToken)
A string token used for pagination that points to the next page of
results.
|
GetLogEventsRequest |
withStartFromHead(Boolean startFromHead)
If set to true, the earliest log events would be returned first.
|
GetLogEventsRequest |
withStartTime(Long startTime)
A point in time expressed as the number of milliseconds since Jan 1,
1970 00:00:00 UTC.
|
copyBaseTo, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic GetLogEventsRequest()
public GetLogEventsRequest(String logGroupName, String logStreamName)
logGroupName - The name of the log group to query.logStreamName - The name of the log stream to query.public 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 GetLogEventsRequest 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 String getLogStreamName()
Constraints:
Length: 1 - 512
Pattern: [^:*]*
public void setLogStreamName(String logStreamName)
Constraints:
Length: 1 - 512
Pattern: [^:*]*
logStreamName - The name of the log stream to query.public GetLogEventsRequest withLogStreamName(String logStreamName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 512
Pattern: [^:*]*
logStreamName - The name of the log stream to query.public Long getStartTime()
Constraints:
Range: 0 -
public void setStartTime(Long startTime)
Constraints:
Range: 0 -
startTime - A point in time expressed as the number of milliseconds since Jan 1,
1970 00:00:00 UTC.public GetLogEventsRequest withStartTime(Long startTime)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 0 -
startTime - A point in time expressed as the number of milliseconds since Jan 1,
1970 00:00:00 UTC.public Long getEndTime()
Constraints:
Range: 0 -
public void setEndTime(Long endTime)
Constraints:
Range: 0 -
endTime - A point in time expressed as the number of milliseconds since Jan 1,
1970 00:00:00 UTC.public GetLogEventsRequest withEndTime(Long endTime)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 0 -
endTime - A point in time expressed as the number of milliseconds since Jan 1,
1970 00:00:00 UTC.public String getNextToken()
nextForwardToken or nextBackwardToken fields in the response of the
previous GetLogEvents request.
Constraints:
Length: 1 -
nextForwardToken or nextBackwardToken fields in the response of the
previous GetLogEvents request.public void setNextToken(String nextToken)
nextForwardToken or nextBackwardToken fields in the response of the
previous GetLogEvents request.
Constraints:
Length: 1 -
nextToken - A string token used for pagination that points to the next page of
results. It must be a value obtained from the nextForwardToken or nextBackwardToken fields in the response of the
previous GetLogEvents request.public GetLogEventsRequest withNextToken(String nextToken)
nextForwardToken or nextBackwardToken fields in the response of the
previous GetLogEvents request.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 -
nextToken - A string token used for pagination that points to the next page of
results. It must be a value obtained from the nextForwardToken or nextBackwardToken fields in the response of the
previous GetLogEvents request.public Integer getLimit()
Constraints:
Range: 1 - 10000
public void setLimit(Integer limit)
Constraints:
Range: 1 - 10000
limit - The maximum number of log events returned in the response. If you
don't specify a value, the request would return as many log events as
can fit in a response size of 1MB, up to 10,000 log events.public GetLogEventsRequest 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 log events returned in the response. If you
don't specify a value, the request would return as many log events as
can fit in a response size of 1MB, up to 10,000 log events.public Boolean isStartFromHead()
public void setStartFromHead(Boolean startFromHead)
startFromHead - If set to true, the earliest log events would be returned first. The
default is false (the latest log events are returned first).public GetLogEventsRequest withStartFromHead(Boolean startFromHead)
Returns a reference to this object so that method calls can be chained together.
startFromHead - If set to true, the earliest log events would be returned first. The
default is false (the latest log events are returned first).public Boolean getStartFromHead()
public String toString()
toString in class ObjectObject.toString()public GetLogEventsRequest clone()
clone in class AmazonWebServiceRequestCopyright © 2015. All rights reserved.