AWS CloudTrail
App · 20 actions
Inspect CloudTrail event history, trails, event data stores, queries and imports.
Actions
| Action | What it does |
|---|---|
| Describe query | Get the details of a CloudTrail Lake query by its ID or alias, including its SQL statement, status, run time and how many events it scanned. |
| Describe trails | Get the settings of the trails you name, or of every trail in the region, including the S3 bucket, log file validation and whether each trail is multi-region. |
| Get channel | Get one CloudTrail Lake channel by its name or ARN, including its source, destinations and ingestion status. |
| Get event configuration | Get the event configuration of a trail or event data store, such as the maximum event size it accepts and any context keys it adds. |
| Get event data store | Get one CloudTrail Lake event data store by its name or ARN, including its retention period, status and advanced event selectors. |
| Get event selectors | Get the event selectors of a trail by its name or ARN, showing which management and data events it records. |
| Get import | Get one CloudTrail Lake import by its ID, including its source S3 location, destinations, status and how many events it has copied. |
| Get insight selectors | Get the Insights types, such as unusual API call rates, that a trail or event data store is set to detect. |
| Get query results | Get the rows returned by a finished CloudTrail Lake query, by its query ID, along with the query's status and statistics. |
| Get resource policy | Get the resource-based policy attached to a CloudTrail Lake channel or event data store, by its ARN. |
| Get trail | Get one trail's settings by its name or ARN, such as its S3 bucket, CloudWatch Logs group and whether it covers all regions. |
| Get trail status | Get whether a trail is logging, by its name or ARN, with the times of its last delivery to S3 and any recent delivery errors. |
| List channels | List the CloudTrail Lake channels that bring events in from outside AWS, with each channel's name and ARN. |
| List event data stores | List the CloudTrail Lake event data stores in your account, with each one's name, ARN and status. |
| List import failures | List the failures of a CloudTrail Lake import, by its import ID, with the S3 location and error message of each failed file. |
| List imports | List the imports of trail events into CloudTrail Lake, optionally filtered by destination event data store and import status. |
| List queries | List the CloudTrail Lake queries run against an event data store, optionally filtered by time range and query status. |
| List tags | Get the tags on the trails, event data stores or channels you name by ARN. |
| List trails | List the trails in your account and region, with each trail's name, ARN and home region. |
| Lookup events | Search the management and Insights events CloudTrail recorded in the last 90 days, optionally filtered by one attribute such as user name or event name and by a time range. |
Describe query
Get the details of a CloudTrail Lake query by its ID or alias, including its SQL statement, status, run time and how many events it scanned.
Inputs
- Event data store
event_data_storetext - Event data store.
- Query
query_idtext - Query id.
- Query alias
query_aliastext - Query alias.
- Refresh id
refresh_idtext - Refresh id.
- Event data store owner account id
event_data_store_owner_account_idtext - Event data store owner account id.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"DeliveryS3Uri": "example",
"DeliveryStatus": "SUCCESS",
"ErrorMessage": "example",
"EventDataStoreOwnerAccountId": "example",
"Prompt": "example",
"QueryId": "example",
"QueryStatistics": {
"BytesScanned": 1,
"CreationTime": "example",
"EventsMatched": 1,
"EventsScanned": 1,
"ExecutionTimeInMillis": 1
},
"QueryStatus": "QUEUED",
"QueryString": "example"
}
}Describe trails
Get the settings of the trails you name, or of every trail in the region, including the S3 bucket, log file validation and whether each trail is multi-region.
Inputs
- Trail name list
trail_name_listlist - Trail name list.
- Include shadow trails
include_shadow_trailstrue/false - Include shadow trails.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"trailList": []
}
}Get channel
Get one CloudTrail Lake channel by its name or ARN, including its source, destinations and ingestion status.
Inputs
- Channel
channeltextRequired - Channel.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"ChannelArn": "example",
"Destinations": [],
"IngestionStatus": {
"LatestIngestionAttemptEventID": "example",
"LatestIngestionAttemptTime": "example",
"LatestIngestionErrorCode": "example",
"LatestIngestionSuccessEventID": "example",
"LatestIngestionSuccessTime": "example"
},
"Name": "example",
"Source": "example",
"SourceConfig": {
"AdvancedEventSelectors": [],
"ApplyToAllRegions": false
}
}
}Get event configuration
Get the event configuration of a trail or event data store, such as the maximum event size it accepts and any context keys it adds.
Inputs
- Trail name
trail_nametext - Trail name.
- Event data store
event_data_storetext - Event data store.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"AggregationConfigurations": [],
"ContextKeySelectors": [],
"EventDataStoreArn": "example",
"MaxEventSize": "Standard",
"TrailARN": "example"
}
}Get event data store
Get one CloudTrail Lake event data store by its name or ARN, including its retention period, status and advanced event selectors.
Inputs
- Event data store
event_data_storetextRequired - Event data store.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"AdvancedEventSelectors": [],
"BillingMode": "EXTENDABLE_RETENTION_PRICING",
"CreatedTimestamp": "example",
"EventDataStoreArn": "example",
"FederationRoleArn": "example",
"FederationStatus": "ENABLING",
"KmsKeyId": "example",
"MultiRegionEnabled": false,
"Name": "example",
"OrganizationEnabled": false,
"PartitionKeys": [],
"RetentionPeriod": 1,
"Status": "CREATED",
"TerminationProtectionEnabled": false,
"UpdatedTimestamp": "example"
}
}Get event selectors
Get the event selectors of a trail by its name or ARN, showing which management and data events it records.
Inputs
- Trail name
trail_nametextRequired - Trail name.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"AdvancedEventSelectors": [],
"EventSelectors": [],
"TrailARN": "example"
}
}Get import
Get one CloudTrail Lake import by its ID, including its source S3 location, destinations, status and how many events it has copied.
Inputs
- Import
import_idtextRequired - Import id.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"CreatedTimestamp": "example",
"Destinations": [],
"EndEventTime": "example",
"ImportId": "example",
"ImportSource": {
"S3": {
"S3BucketAccessRoleArn": "example",
"S3BucketRegion": "example",
"S3LocationUri": "example"
}
},
"ImportStatistics": {
"EventsCompleted": 1,
"FailedEntries": 1,
"FilesCompleted": 1,
"PrefixesCompleted": 1,
"PrefixesFound": 1
},
"ImportStatus": "INITIALIZING",
"StartEventTime": "example",
"UpdatedTimestamp": "example"
}
}Get insight selectors
Get the Insights types, such as unusual API call rates, that a trail or event data store is set to detect.
Inputs
- Trail name
trail_nametext - Trail name.
- Event data store
event_data_storetext - Event data store.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"EventDataStoreArn": "example",
"InsightSelectors": [],
"InsightsDestination": "example",
"TrailARN": "example"
}
}Get query results
Get the rows returned by a finished CloudTrail Lake query, by its query ID, along with the query's status and statistics.
Inputs
- Event data store
event_data_storetext - Event data store.
- Query
query_idtextRequired - Query id.
- Next token
next_tokentext - Next token.
- Max query results
max_query_resultsnumber - Max query results.From 1 to 1000.
- Event data store owner account id
event_data_store_owner_account_idtext - Event data store owner account id.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"ErrorMessage": "example",
"NextToken": "example",
"QueryResultRows": [],
"QueryStatistics": {
"BytesScanned": 1,
"ResultsCount": 1,
"TotalResultsCount": 1
},
"QueryStatus": "QUEUED"
}
}Get resource policy
Get the resource-based policy attached to a CloudTrail Lake channel or event data store, by its ARN.
Inputs
- Resource arn
resource_arntextRequired - Resource arn.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"DelegatedAdminResourcePolicy": "example",
"ResourceArn": "example",
"ResourcePolicy": "example"
}
}Get trail
Get one trail's settings by its name or ARN, such as its S3 bucket, CloudWatch Logs group and whether it covers all regions.
Inputs
- Name
nametextRequired - Name.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"Trail": {
"CloudWatchLogsLogGroupArn": "example",
"CloudWatchLogsRoleArn": "example",
"HasCustomEventSelectors": false,
"HasInsightSelectors": false,
"HomeRegion": "example",
"IncludeGlobalServiceEvents": false,
"IsMultiRegionTrail": false,
"IsOrganizationTrail": false,
"KmsKeyId": "example",
"LogFileValidationEnabled": false,
"Name": "example",
"RecursiveLogging": false,
"S3BucketName": "example",
"S3KeyPrefix": "example",
"SnsTopicARN": "example",
"SnsTopicName": "example",
"TrailARN": "example"
}
}
}Get trail status
Get whether a trail is logging, by its name or ARN, with the times of its last delivery to S3 and any recent delivery errors.
Inputs
- Name
nametextRequired - Name.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"IsLogging": false,
"LatestCloudWatchLogsDeliveryError": "example",
"LatestCloudWatchLogsDeliveryTime": "example",
"LatestDeliveryAttemptSucceeded": "example",
"LatestDeliveryAttemptTime": "example",
"LatestDeliveryError": "example",
"LatestDeliveryTime": "example",
"LatestDigestDeliveryError": "example",
"LatestDigestDeliveryTime": "example",
"LatestNotificationAttemptSucceeded": "example",
"LatestNotificationAttemptTime": "example",
"LatestNotificationError": "example",
"LatestNotificationTime": "example",
"StartLoggingTime": "example",
"StopLoggingTime": "example",
"TimeLoggingStarted": "example",
"TimeLoggingStopped": "example"
}
}List channels
List the CloudTrail Lake channels that bring events in from outside AWS, with each channel's name and ARN.
Inputs
- Max results
max_resultsnumber - Max results.From 1 to 1000.
- Next token
next_tokentext - Next token.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"Channels": [],
"NextToken": "example"
}
}List event data stores
List the CloudTrail Lake event data stores in your account, with each one's name, ARN and status.
Inputs
- Next token
next_tokentext - Next token.
- Max results
max_resultsnumber - Max results.From 1 to 1000.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"EventDataStores": [],
"NextToken": "example"
}
}List import failures
List the failures of a CloudTrail Lake import, by its import ID, with the S3 location and error message of each failed file.
Inputs
- Import
import_idtextRequired - Import id.
- Max results
max_resultsnumber - Max results.From 1 to 1000.
- Next token
next_tokentext - Next token.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"Failures": [],
"NextToken": "example"
}
}List imports
List the imports of trail events into CloudTrail Lake, optionally filtered by destination event data store and import status.
Inputs
- Max results
max_resultsnumber - Max results.From 1 to 1000.
- Destination
destinationtext - Destination.
- Import status
import_statustext - Import status.One of:
INITIALIZING,IN_PROGRESS(In progress),FAILED,STOPPED,COMPLETED. - Next token
next_tokentext - Next token.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"Imports": [],
"NextToken": "example"
}
}List queries
List the CloudTrail Lake queries run against an event data store, optionally filtered by time range and query status. Returns each query's ID, status and start time.
Inputs
- Event data store
event_data_storetextRequired - Event data store.
- Next token
next_tokentext - Next token.
- Max results
max_resultsnumber - Max results.From 1 to 1000.
- Start time
start_timedate and time - Start time.
- End time
end_timedate and time - End time.
- Query status
query_statustext - Query status.One of:
QUEUED,RUNNING,FINISHED,FAILED,CANCELLED,TIMED_OUT(Timed out).
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"NextToken": "example",
"Queries": []
}
}List tags
Get the tags on the trails, event data stores or channels you name by ARN.
Inputs
- Resource id list
resource_id_listlistRequired - Resource id list.
- Next token
next_tokentext - Next token.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"NextToken": "example",
"ResourceTagList": []
}
}List trails
List the trails in your account and region, with each trail's name, ARN and home region.
Inputs
- Next token
next_tokentext - Next token.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"NextToken": "example",
"Trails": []
}
}Lookup events
Search the management and Insights events CloudTrail recorded in the last 90 days, optionally filtered by one attribute such as user name or event name and by a time range. Returns the matching events, newest first.
Inputs
- Lookup attributes
lookup_attributeslist - Lookup attributes.
- Start time
start_timedate and time - Start time.
- End time
end_timedate and time - End time.
- Event category
event_categorytext - Event category.One of:
insight. - Max results
max_resultsnumber - Max results.From 1 to 50.
- Next token
next_tokentext - Next token.
Outputs
dataobject- AWS Cloud Trail response data.
Example output
{
"data": {
"Events": [],
"NextToken": "example"
}
}