Class AbstractAWSCloudTrail
- All Implemented Interfaces:
AWSCloudTrail
- Direct Known Subclasses:
AbstractAWSCloudTrailAsync
AWSCloudTrail
. Convenient method forms
pass through to the corresponding overload that takes a request object, which
throws an UnsupportedOperationException
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddTags
(AddTagsRequest request) Adds one or more tags to a trail, up to a limit of 10.createTrail
(CreateTrailRequest request) Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket.deleteTrail
(DeleteTrailRequest request) Deletes a trail.Simplified method form for invoking the DescribeTrails operation.describeTrails
(DescribeTrailsRequest request) Retrieves settings for the trail associated with the current region for your account.Returns additional metadata for a previously executed successful request, typically used for debugging issues where a service isn't acting as expected.getTrailStatus
(GetTrailStatusRequest request) Returns a JSON-formatted list of information about the specified trail.Simplified method form for invoking the ListPublicKeys operation.listPublicKeys
(ListPublicKeysRequest request) Returns all public keys whose private keys were used to sign the digest files within the specified time range.listTags
(ListTagsRequest request) Lists the tags for the trail in the current region.Simplified method form for invoking the LookupEvents operation.lookupEvents
(LookupEventsRequest request) Looks up API activity events captured by CloudTrail that create, update, or delete resources in your account.removeTags
(RemoveTagsRequest request) Removes the specified tags from a trail.void
setEndpoint
(String endpoint) Overrides the default endpoint for this client ("cloudtrail.us-east-1.amazonaws.com").void
An alternative toAWSCloudTrail.setEndpoint(String)
, sets the regional endpoint for this client's service calls.void
shutdown()
Shuts down this client object, releasing any resources that might be held open.startLogging
(StartLoggingRequest request) Starts the recording of AWS API calls and log file delivery for a trail.stopLogging
(StopLoggingRequest request) Suspends the recording of AWS API calls and log file delivery for the specified trail.updateTrail
(UpdateTrailRequest request) Updates the settings that specify delivery of log files.
-
Constructor Details
-
AbstractAWSCloudTrail
protected AbstractAWSCloudTrail()
-
-
Method Details
-
setEndpoint
Description copied from interface:AWSCloudTrail
Overrides the default endpoint for this client ("cloudtrail.us-east-1.amazonaws.com"). Callers can use this method to control which AWS region they want to work with.Callers can pass in just the endpoint (ex: "cloudtrail.us-east-1.amazonaws.com") or a full URL, including the protocol (ex: "cloudtrail.us-east-1.amazonaws.com"). If the protocol is not specified here, the default protocol from this client's
ClientConfiguration
will be used, which by default is HTTPS.For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available endpoints for all AWS services, see: http://developer.amazonwebservices.com/connect/entry.jspa?externalID= 3912
This method is not threadsafe. An endpoint should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.
- Specified by:
setEndpoint
in interfaceAWSCloudTrail
- Parameters:
endpoint
- The endpoint (ex: "cloudtrail.us-east-1.amazonaws.com") or a full URL, including the protocol (ex: "cloudtrail.us-east-1.amazonaws.com") of the region specific AWS endpoint this client will communicate with.
-
setRegion
Description copied from interface:AWSCloudTrail
An alternative toAWSCloudTrail.setEndpoint(String)
, sets the regional endpoint for this client's service calls. Callers can use this method to control which AWS region they want to work with.By default, all service endpoints in all regions use the https protocol. To use http instead, specify it in the
ClientConfiguration
supplied at construction.This method is not threadsafe. A region should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.
- Specified by:
setRegion
in interfaceAWSCloudTrail
- Parameters:
region
- The region this client will communicate with. SeeRegion.getRegion(com.amazonaws.regions.Regions)
for accessing a given region. Must not be null and must be a region where the service is available.- See Also:
-
addTags
Description copied from interface:AWSCloudTrail
Adds one or more tags to a trail, up to a limit of 10. Tags must be unique per trail. Overwrites an existing tag's value when a new value is specified for an existing tag key. If you specify a key without a value, the tag will be created with the specified key and a value of null. You can tag a trail that applies to all regions only from the region in which the trail was created (that is, from its home region).
- Specified by:
addTags
in interfaceAWSCloudTrail
- Parameters:
request
- Specifies the tags to add to a trail.- Returns:
- Result of the AddTags operation returned by the service.
-
createTrail
Description copied from interface:AWSCloudTrail
Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket. A maximum of five trails can exist in a region, irrespective of the region in which they were created.
- Specified by:
createTrail
in interfaceAWSCloudTrail
- Parameters:
request
- Specifies the settings for each trail.- Returns:
- Result of the CreateTrail operation returned by the service.
-
deleteTrail
Description copied from interface:AWSCloudTrail
Deletes a trail. This operation must be called from the region in which the trail was created.
DeleteTrail
cannot be called on the shadow trails (replicated trails in other regions) of a trail that is enabled in all regions.- Specified by:
deleteTrail
in interfaceAWSCloudTrail
- Parameters:
request
- The request that specifies the name of a trail to delete.- Returns:
- Result of the DeleteTrail operation returned by the service.
-
describeTrails
Description copied from interface:AWSCloudTrail
Retrieves settings for the trail associated with the current region for your account.
- Specified by:
describeTrails
in interfaceAWSCloudTrail
- Parameters:
request
- Returns information about the trail.- Returns:
- Result of the DescribeTrails operation returned by the service.
-
describeTrails
Description copied from interface:AWSCloudTrail
Simplified method form for invoking the DescribeTrails operation.- Specified by:
describeTrails
in interfaceAWSCloudTrail
- See Also:
-
getTrailStatus
Description copied from interface:AWSCloudTrail
Returns a JSON-formatted list of information about the specified trail. Fields include information on delivery errors, Amazon SNS and Amazon S3 errors, and start and stop logging times for each trail. This operation returns trail status from a single region. To return trail status from all regions, you must call the operation on each region.
- Specified by:
getTrailStatus
in interfaceAWSCloudTrail
- Parameters:
request
- The name of a trail about which you want the current status.- Returns:
- Result of the GetTrailStatus operation returned by the service.
-
listPublicKeys
Description copied from interface:AWSCloudTrail
Returns all public keys whose private keys were used to sign the digest files within the specified time range. The public key is needed to validate digest files that were signed with its corresponding private key.
CloudTrail uses different private/public key pairs per region. Each digest file is signed with a private key unique to its region. Therefore, when you validate a digest file from a particular region, you must look in the same region for its corresponding public key.
- Specified by:
listPublicKeys
in interfaceAWSCloudTrail
- Parameters:
request
- Requests the public keys for a specified time range.- Returns:
- Result of the ListPublicKeys operation returned by the service.
-
listPublicKeys
Description copied from interface:AWSCloudTrail
Simplified method form for invoking the ListPublicKeys operation.- Specified by:
listPublicKeys
in interfaceAWSCloudTrail
- See Also:
-
listTags
Description copied from interface:AWSCloudTrail
Lists the tags for the trail in the current region.
- Specified by:
listTags
in interfaceAWSCloudTrail
- Parameters:
request
- Specifies a list of trail tags to return.- Returns:
- Result of the ListTags operation returned by the service.
-
lookupEvents
Description copied from interface:AWSCloudTrail
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.
The rate of lookup requests is limited to one per second per account. If this limit is exceeded, a throttling error occurs.
Events that occurred during the selected time range will not be available for lookup if CloudTrail logging was not enabled when the events occurred.
- Specified by:
lookupEvents
in interfaceAWSCloudTrail
- Parameters:
request
- Contains a request for LookupEvents.- Returns:
- Result of the LookupEvents operation returned by the service.
-
lookupEvents
Description copied from interface:AWSCloudTrail
Simplified method form for invoking the LookupEvents operation.- Specified by:
lookupEvents
in interfaceAWSCloudTrail
- See Also:
-
removeTags
Description copied from interface:AWSCloudTrail
Removes the specified tags from a trail.
- Specified by:
removeTags
in interfaceAWSCloudTrail
- Parameters:
request
- Specifies the tags to remove from a trail.- Returns:
- Result of the RemoveTags operation returned by the service.
-
startLogging
Description copied from interface:AWSCloudTrail
Starts the recording of AWS API calls and log file delivery for a trail. For a trail that is enabled in all regions, this operation must be called from the region in which the trail was created. This operation cannot be called on the shadow trails (replicated trails in other regions) of a trail that is enabled in all regions.
- Specified by:
startLogging
in interfaceAWSCloudTrail
- Parameters:
request
- The request to CloudTrail to start logging AWS API calls for an account.- Returns:
- Result of the StartLogging operation returned by the service.
-
stopLogging
Description copied from interface:AWSCloudTrail
Suspends the recording of AWS API calls and log file delivery for the specified trail. Under most circumstances, there is no need to use this action. You can update a trail without stopping it first. This action is the only way to stop recording. For a trail enabled in all regions, this operation must be called from the region in which the trail was created, or an
InvalidHomeRegionException
will occur. This operation cannot be called on the shadow trails (replicated trails in other regions) of a trail enabled in all regions.- Specified by:
stopLogging
in interfaceAWSCloudTrail
- Parameters:
request
- Passes the request to CloudTrail to stop logging AWS API calls for the specified account.- Returns:
- Result of the StopLogging operation returned by the service.
-
updateTrail
Description copied from interface:AWSCloudTrail
Updates the settings that specify delivery of log files. Changes to a trail do not require stopping the CloudTrail service. Use this action to designate an existing bucket for log delivery. If the existing bucket has previously been a target for CloudTrail log files, an IAM policy exists for the bucket.
UpdateTrail
must be called from the region in which the trail was created; otherwise, anInvalidHomeRegionException
is thrown.- Specified by:
updateTrail
in interfaceAWSCloudTrail
- Parameters:
request
- Specifies settings to update for the trail.- Returns:
- Result of the UpdateTrail operation returned by the service.
-
shutdown
public void shutdown()Description copied from interface:AWSCloudTrail
Shuts down this client object, releasing any resources that might be held open. This is an optional method, and callers are not expected to call it, but can if they want to explicitly release any open resources. Once a client has been shutdown, it should not be used to make any more requests.- Specified by:
shutdown
in interfaceAWSCloudTrail
-
getCachedResponseMetadata
Description copied from interface:AWSCloudTrail
Returns additional metadata for a previously executed successful request, typically used for debugging issues where a service isn't acting as expected. This data isn't considered part of the result data returned by an operation, so it's available through this separate, diagnostic interface.Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing a request.
- Specified by:
getCachedResponseMetadata
in interfaceAWSCloudTrail
- Parameters:
request
- The originally executed request.- Returns:
- The response metadata for the specified request, or null if none is available.
-