public class GetLogEventsRequest extends AmazonWebServiceRequest implements Serializable
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 |
---|---|
boolean |
equals(Object obj) |
Long |
getEndTime()
A point in time expressed as the number milliseconds since Jan 1, 1970
00:00:00 UTC.
|
Integer |
getLimit()
The maximum number of log events returned in the response.
|
String |
getLogGroupName()
Returns the value of the LogGroupName property for this object.
|
String |
getLogStreamName()
Returns the value of the LogStreamName property for this object.
|
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 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 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)
Sets the value of the LogGroupName property for this object.
|
void |
setLogStreamName(String logStreamName)
Sets the value of the LogStreamName property for this object.
|
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 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 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)
Sets the value of the LogGroupName property for this object.
|
GetLogEventsRequest |
withLogStreamName(String logStreamName)
Sets the value of the LogStreamName property for this object.
|
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 milliseconds since Jan 1, 1970
00:00:00 UTC.
|
copyPrivateRequestParameters, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public GetLogEventsRequest()
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 new value for the LogGroupName property for this object.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 new value for the LogGroupName property for this object.public String getLogStreamName()
Constraints:
Length: 1 - 512
Pattern: [^:*]*
public void setLogStreamName(String logStreamName)
Constraints:
Length: 1 - 512
Pattern: [^:*]*
logStreamName
- The new value for the LogStreamName property for this object.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 new value for the LogStreamName property for this object.public Long getStartTime()
Constraints:
Range: 0 -
public void setStartTime(Long startTime)
Constraints:
Range: 0 -
startTime
- A point in time expressed as the number 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 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 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 milliseconds since Jan 1, 1970
00:00:00 UTC.public String getNextToken()
nextForwardToken
or nextBackwardToken
fields in the response of the
previous GetLogEvents
request.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.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.
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 much 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 much 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 Object
Object.toString()
Copyright © 2014. All rights reserved.