public class LookupEventsRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
LookupEvents operation
.
Looks up API activity events captured by CloudTrail that create, update, or delete resources in your account. Events for a region can be looked up for the times in which you had CloudTrail turned on in that region during the last seven days. Lookup supports five different attributes: time range (defined by a start time and end time), user name, event name, resource type, and resource name. All attributes are optional. The maximum number of attributes that can be specified in any one lookup request are time range and one other attribute. The default number of results returned is 10, with a maximum of 50 possible. The response includes a token that you can use to get the next page of results.
IMPORTANT:The rate of lookup requests is limited to one per second per account. If this limit is exceeded, a throttling error occurs.
IMPORTANT:Events that occurred during the selected time range will not be available for lookup if CloudTrail logging was not enabled when the events occurred.
NOOP
Constructor and Description |
---|
LookupEventsRequest() |
Modifier and Type | Method and Description |
---|---|
LookupEventsRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(Object obj) |
Date |
getEndTime()
Specifies that only events that occur before or at the specified time
are returned.
|
List<LookupAttribute> |
getLookupAttributes()
Contains a list of lookup attributes.
|
Integer |
getMaxResults()
The number of events to return.
|
String |
getNextToken()
The token to use to get the next page of results after a previous API
call.
|
Date |
getStartTime()
Specifies that only events that occur after or at the specified time
are returned.
|
int |
hashCode() |
void |
setEndTime(Date endTime)
Specifies that only events that occur before or at the specified time
are returned.
|
void |
setLookupAttributes(Collection<LookupAttribute> lookupAttributes)
Contains a list of lookup attributes.
|
void |
setMaxResults(Integer maxResults)
The number of events to return.
|
void |
setNextToken(String nextToken)
The token to use to get the next page of results after a previous API
call.
|
void |
setStartTime(Date startTime)
Specifies that only events that occur after or at the specified time
are returned.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
LookupEventsRequest |
withEndTime(Date endTime)
Specifies that only events that occur before or at the specified time
are returned.
|
LookupEventsRequest |
withLookupAttributes(Collection<LookupAttribute> lookupAttributes)
Contains a list of lookup attributes.
|
LookupEventsRequest |
withLookupAttributes(LookupAttribute... lookupAttributes)
Contains a list of lookup attributes.
|
LookupEventsRequest |
withMaxResults(Integer maxResults)
The number of events to return.
|
LookupEventsRequest |
withNextToken(String nextToken)
The token to use to get the next page of results after a previous API
call.
|
LookupEventsRequest |
withStartTime(Date startTime)
Specifies that only events that occur after or at the specified time
are returned.
|
copyBaseTo, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public List<LookupAttribute> getLookupAttributes()
public void setLookupAttributes(Collection<LookupAttribute> lookupAttributes)
lookupAttributes
- Contains a list of lookup attributes. Currently the list can contain
only one item.public LookupEventsRequest withLookupAttributes(LookupAttribute... lookupAttributes)
NOTE: This method appends the values to the existing list (if
any). Use setLookupAttributes(java.util.Collection)
or withLookupAttributes(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.
lookupAttributes
- Contains a list of lookup attributes. Currently the list can contain
only one item.public LookupEventsRequest withLookupAttributes(Collection<LookupAttribute> lookupAttributes)
Returns a reference to this object so that method calls can be chained together.
lookupAttributes
- Contains a list of lookup attributes. Currently the list can contain
only one item.public Date getStartTime()
public void setStartTime(Date startTime)
startTime
- Specifies that only events that occur after or at the specified time
are returned. If the specified start time is after the specified end
time, an error is returned.public LookupEventsRequest withStartTime(Date startTime)
Returns a reference to this object so that method calls can be chained together.
startTime
- Specifies that only events that occur after or at the specified time
are returned. If the specified start time is after the specified end
time, an error is returned.public Date getEndTime()
public void setEndTime(Date endTime)
endTime
- Specifies that only events that occur before or at the specified time
are returned. If the specified end time is before the specified start
time, an error is returned.public LookupEventsRequest withEndTime(Date endTime)
Returns a reference to this object so that method calls can be chained together.
endTime
- Specifies that only events that occur before or at the specified time
are returned. If the specified end time is before the specified start
time, an error is returned.public Integer getMaxResults()
Constraints:
Range: 1 - 50
public void setMaxResults(Integer maxResults)
Constraints:
Range: 1 - 50
maxResults
- The number of events to return. Possible values are 1 through 50. The
default is 10.public LookupEventsRequest withMaxResults(Integer maxResults)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 1 - 50
maxResults
- The number of events to return. Possible values are 1 through 50. The
default is 10.public String getNextToken()
public void setNextToken(String nextToken)
nextToken
- The token to use to get the next page of results after a previous API
call. This token must be passed in with the same parameters that were
specified in the the original call. For example, if the original call
specified an AttributeKey of 'Username' with a value of 'root', the
call with NextToken should include those same parameters.public LookupEventsRequest withNextToken(String nextToken)
Returns a reference to this object so that method calls can be chained together.
nextToken
- The token to use to get the next page of results after a previous API
call. This token must be passed in with the same parameters that were
specified in the the original call. For example, if the original call
specified an AttributeKey of 'Username' with a value of 'root', the
call with NextToken should include those same parameters.public String toString()
toString
in class Object
Object.toString()
public LookupEventsRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()
Copyright © 2015. All rights reserved.