Skip to content

List Insights Data

cloudtrail_list_insights_data R Documentation

Returns Insights events generated on a trail that logs data events

Description

Returns Insights events generated on a trail that logs data events. You can list Insights events that occurred in a Region within the last 90 days.

ListInsightsData supports the following Dimensions for Insights events:

  • Event ID

  • Event name

  • Event source

All dimensions are optional. The default number of results returned is 50, 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 ListInsightsData requests is limited to two per second, per account, per Region. If this limit is exceeded, a throttling error occurs.

Usage

cloudtrail_list_insights_data(InsightSource, DataType, Dimensions,
  StartTime, EndTime, MaxResults, NextToken)

Arguments

InsightSource

[required] The Amazon Resource Name(ARN) of the trail for which you want to retrieve Insights events.

DataType

[required] Specifies the category of events returned. To fetch Insights events, specify InsightsEvents as the value of DataType

Dimensions

Contains a map of dimensions. Currently the map can contain only one item.

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.

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.

MaxResults

The number of events to return. Possible values are 1 through 50. The default is 50.

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 original call. For example, if the original call specified a EventName as a dimension with PutObject as a value, the call with NextToken should include those same parameters.

Value

A list with the following syntax:

list(
  Events = list(
    list(
      EventId = "string",
      EventName = "string",
      ReadOnly = "string",
      AccessKeyId = "string",
      EventTime = as.POSIXct(
        "2015-01-01"
      ),
      EventSource = "string",
      Username = "string",
      Resources = list(
        list(
          ResourceType = "string",
          ResourceName = "string"
        )
      ),
      CloudTrailEvent = "string"
    )
  ),
  NextToken = "string"
)

Request syntax

svc$list_insights_data(
  InsightSource = "string",
  DataType = "InsightsEvents",
  Dimensions = list(
    "string"
  ),
  StartTime = as.POSIXct(
    "2015-01-01"
  ),
  EndTime = as.POSIXct(
    "2015-01-01"
  ),
  MaxResults = 123,
  NextToken = "string"
)