Class: AWS.CloudTrail
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.CloudTrail
- Identifier:
- cloudtrail
- API Version:
- 2013-11-01
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
This is the CloudTrail API Reference. It provides descriptions of actions, data types, common parameters, and common errors for CloudTrail.
CloudTrail is a web service that records Amazon Web Services API calls for your Amazon Web Services account and delivers log files to an Amazon S3 bucket. The recorded information includes the identity of the user, the start time of the Amazon Web Services API call, the source IP address, the request parameters, and the response elements returned by the service.
See the CloudTrail User Guide for information about the data that is included with each Amazon Web Services API call listed in the log files.
Sending a Request Using CloudTrail
var cloudtrail = new AWS.CloudTrail();
cloudtrail.addTags(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the CloudTrail object uses this specific API, you can
construct the object by passing the apiVersion
option to the constructor:
var cloudtrail = new AWS.CloudTrail({apiVersion: '2013-11-01'});
You can also set the API version globally in AWS.config.apiVersions
using
the cloudtrail service identifier:
AWS.config.apiVersions = {
cloudtrail: '2013-11-01',
// other service API versions
};
var cloudtrail = new AWS.CloudTrail();
Version:
-
2013-11-01
Constructor Summary collapse
-
new AWS.CloudTrail(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
addTags(params = {}, callback) ⇒ AWS.Request
Adds one or more tags to a trail, event data store, or channel, up to a limit of 50.
-
cancelQuery(params = {}, callback) ⇒ AWS.Request
Cancels a query if the query is not in a terminated state, such as
CANCELLED
,FAILED
,TIMED_OUT
, orFINISHED
. -
createChannel(params = {}, callback) ⇒ AWS.Request
Creates a channel for CloudTrail to ingest events from a partner or external source.
-
createEventDataStore(params = {}, callback) ⇒ AWS.Request
Creates a new event data store.
.
-
createTrail(params = {}, callback) ⇒ AWS.Request
Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket.
-
deleteChannel(params = {}, callback) ⇒ AWS.Request
Deletes a channel.
.
-
deleteEventDataStore(params = {}, callback) ⇒ AWS.Request
Disables the event data store specified by
EventDataStore
, which accepts an event data store ARN. -
deleteResourcePolicy(params = {}, callback) ⇒ AWS.Request
Deletes the resource-based policy attached to the CloudTrail channel.
-
deleteTrail(params = {}, callback) ⇒ AWS.Request
Deletes a trail.
-
deregisterOrganizationDelegatedAdmin(params = {}, callback) ⇒ AWS.Request
Removes CloudTrail delegated administrator permissions from a member account in an organization.
.
-
describeQuery(params = {}, callback) ⇒ AWS.Request
Returns metadata about a query, including query run time in milliseconds, number of events scanned and matched, and query status.
-
describeTrails(params = {}, callback) ⇒ AWS.Request
Retrieves settings for one or more trails associated with the current Region for your account.
.
-
disableFederation(params = {}, callback) ⇒ AWS.Request
Disables Lake query federation on the specified event data store.
-
enableFederation(params = {}, callback) ⇒ AWS.Request
Enables Lake query federation on the specified event data store.
-
getChannel(params = {}, callback) ⇒ AWS.Request
Returns information about a specific channel.
-
getEventDataStore(params = {}, callback) ⇒ AWS.Request
Returns information about an event data store specified as either an ARN or the ID portion of the ARN.
.
-
getEventSelectors(params = {}, callback) ⇒ AWS.Request
Describes the settings for the event selectors that you configured for your trail.
-
getImport(params = {}, callback) ⇒ AWS.Request
Returns information about a specific import.
-
getInsightSelectors(params = {}, callback) ⇒ AWS.Request
Describes the settings for the Insights event selectors that you configured for your trail or event data store.
-
getQueryResults(params = {}, callback) ⇒ AWS.Request
Gets event data results of a query.
-
getResourcePolicy(params = {}, callback) ⇒ AWS.Request
Retrieves the JSON text of the resource-based policy document attached to the CloudTrail channel.
-
getTrail(params = {}, callback) ⇒ AWS.Request
Returns settings information for a specified trail.
.
-
getTrailStatus(params = {}, callback) ⇒ AWS.Request
Returns a JSON-formatted list of information about the specified trail.
-
listChannels(params = {}, callback) ⇒ AWS.Request
Lists the channels in the current account, and their source names.
-
listEventDataStores(params = {}, callback) ⇒ AWS.Request
Returns information about all event data stores in the account, in the current Region.
.
-
listImportFailures(params = {}, callback) ⇒ AWS.Request
Returns a list of failures for the specified import.
-
listImports(params = {}, callback) ⇒ AWS.Request
Returns information on all imports, or a select set of imports by
ImportStatus
orDestination
. -
listInsightsMetricData(params = {}, callback) ⇒ AWS.Request
Returns Insights metrics data for trails that have enabled Insights.
-
listPublicKeys(params = {}, callback) ⇒ AWS.Request
Returns all public keys whose private keys were used to sign the digest files within the specified time range.
-
listQueries(params = {}, callback) ⇒ AWS.Request
Returns a list of queries and query statuses for the past seven days.
-
listTags(params = {}, callback) ⇒ AWS.Request
Lists the tags for the specified trails, event data stores, or channels in the current Region.
.
-
listTrails(params = {}, callback) ⇒ AWS.Request
Lists trails that are in the current account.
.
-
lookupEvents(params = {}, callback) ⇒ AWS.Request
Looks up management events or CloudTrail Insights events that are captured by CloudTrail.
-
putEventSelectors(params = {}, callback) ⇒ AWS.Request
Configures an event selector or advanced event selectors for your trail.
-
putInsightSelectors(params = {}, callback) ⇒ AWS.Request
Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail or event data store.
-
putResourcePolicy(params = {}, callback) ⇒ AWS.Request
Attaches a resource-based permission policy to a CloudTrail channel that is used for an integration with an event source outside of Amazon Web Services.
-
registerOrganizationDelegatedAdmin(params = {}, callback) ⇒ AWS.Request
Registers an organization’s member account as the CloudTrail delegated administrator.
.
-
removeTags(params = {}, callback) ⇒ AWS.Request
Removes the specified tags from a trail, event data store, or channel.
.
-
restoreEventDataStore(params = {}, callback) ⇒ AWS.Request
Restores a deleted event data store specified by
EventDataStore
, which accepts an event data store ARN. -
startEventDataStoreIngestion(params = {}, callback) ⇒ AWS.Request
Starts the ingestion of live events on an event data store specified as either an ARN or the ID portion of the ARN.
-
startImport(params = {}, callback) ⇒ AWS.Request
Starts an import of logged trail events from a source S3 bucket to a destination event data store.
-
startLogging(params = {}, callback) ⇒ AWS.Request
Starts the recording of Amazon Web Services API calls and log file delivery for a trail.
-
startQuery(params = {}, callback) ⇒ AWS.Request
Starts a CloudTrail Lake query.
-
stopEventDataStoreIngestion(params = {}, callback) ⇒ AWS.Request
Stops the ingestion of live events on an event data store specified as either an ARN or the ID portion of the ARN.
-
stopImport(params = {}, callback) ⇒ AWS.Request
Stops a specified import.
-
stopLogging(params = {}, callback) ⇒ AWS.Request
Suspends the recording of Amazon Web Services API calls and log file delivery for the specified trail.
-
updateChannel(params = {}, callback) ⇒ AWS.Request
Updates a channel specified by a required channel ARN or UUID.
.
-
updateEventDataStore(params = {}, callback) ⇒ AWS.Request
Updates an event data store.
-
updateTrail(params = {}, callback) ⇒ AWS.Request
Updates trail settings that control what events you are logging, and how to handle log files.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
new AWS.CloudTrail(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Examples:
Constructing a CloudTrail object
var cloudtrail = new AWS.CloudTrail({apiVersion: '2013-11-01'});
Options Hash (options):
-
params
(map)
—
An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.
-
endpoint
(String|AWS.Endpoint)
—
The endpoint URI to send requests to. The default endpoint is built from the configured
region
. The endpoint should be a string like'https://{service}.{region}.amazonaws.com'
or an Endpoint object. -
accessKeyId
(String)
—
your AWS access key ID.
-
secretAccessKey
(String)
—
your AWS secret access key.
-
sessionToken
(AWS.Credentials)
—
the optional AWS session token to sign requests with.
-
credentials
(AWS.Credentials)
—
the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.
-
credentialProvider
(AWS.CredentialProviderChain)
—
the provider chain used to resolve credentials if no static
credentials
property is set. -
region
(String)
—
the region to send service requests to. See AWS.CloudTrail.region for more information.
-
maxRetries
(Integer)
—
the maximum amount of retries to attempt with a request. See AWS.CloudTrail.maxRetries for more information.
-
maxRedirects
(Integer)
—
the maximum amount of redirects to follow with a request. See AWS.CloudTrail.maxRedirects for more information.
-
sslEnabled
(Boolean)
—
whether to enable SSL for requests.
-
paramValidation
(Boolean|map)
—
whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:
- min [Boolean] — Validates that a value meets the min
constraint. This is enabled by default when paramValidation is set
to
true
. - max [Boolean] — Validates that a value meets the max constraint.
- pattern [Boolean] — Validates that a string value matches a regular expression.
- enum [Boolean] — Validates that a string value matches one of the allowable enum values.
- min [Boolean] — Validates that a value meets the min
constraint. This is enabled by default when paramValidation is set
to
-
computeChecksums
(Boolean)
—
whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)
-
convertResponseTypes
(Boolean)
—
whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to
true
. -
correctClockSkew
(Boolean)
—
whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to
false
. -
s3ForcePathStyle
(Boolean)
—
whether to force path style URLs for S3 objects.
-
s3BucketEndpoint
(Boolean)
—
whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an
endpoint
to be provided explicitly to the service constructor. -
s3DisableBodySigning
(Boolean)
—
whether S3 body signing should be disabled when using signature version
v4
. Body signing can only be disabled when using https. Defaults totrue
. -
s3UsEast1RegionalEndpoint
('legacy'|'regional')
—
when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to
legacy
-
s3UseArnRegion
(Boolean)
—
whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to
true
-
retryDelayOptions
(map)
—
A set of options to configure the retry delay on retryable errors. Currently supported options are:
- base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
- customBackoff [function] — A custom function that accepts a
retry count and error and returns the amount of time to delay in
milliseconds. If the result is a non-zero negative value, no further
retry attempts will be made. The
base
option will be ignored if this option is supplied. The function is only called for retryable errors.
-
httpOptions
(map)
—
A set of options to pass to the low-level HTTP request. Currently supported options are:
- proxy [String] — the URL to proxy requests through
- agent [http.Agent, https.Agent] — the Agent object to perform
HTTP requests with. Used for connection pooling. Defaults to the global
agent (
http.globalAgent
) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment. - connectTimeout [Integer] — Sets the socket to timeout after
failing to establish a connection with the server after
connectTimeout
milliseconds. This timeout has no effect once a socket connection has been established. - timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
- xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
- xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
-
apiVersion
(String, Date)
—
a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by
apiVersions
). Specify 'latest' to use the latest possible version. -
apiVersions
(map<String, String|Date>)
—
a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.
-
logger
(#write, #log)
—
an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests
-
systemClockOffset
(Number)
—
an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global
AWS.config
object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds. -
signatureVersion
(String)
—
the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.
-
signatureCache
(Boolean)
—
whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to
true
. -
dynamoDbCrc32
(Boolean)
—
whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default:
true
. -
useAccelerateEndpoint
(Boolean)
—
Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default:
false
. -
clientSideMonitoring
(Boolean)
—
whether to collect and publish this client's performance metrics of all its API requests.
-
endpointDiscoveryEnabled
(Boolean|undefined)
—
whether to call operations with endpoints given by service dynamically. Setting this
-
endpointCacheSize
(Number)
—
the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000
-
hostPrefixEnabled
(Boolean)
—
whether to marshal request parameters to the prefix of hostname. Defaults to
true
. -
stsRegionalEndpoints
('legacy'|'regional')
—
whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.
-
useFipsEndpoint
(Boolean)
—
Enables FIPS compatible endpoints. Defaults to
false
. -
useDualstackEndpoint
(Boolean)
—
Enables IPv6 dualstack endpoint. Defaults to
false
.
Property Details
Method Details
addTags(params = {}, callback) ⇒ AWS.Request
Adds one or more tags to a trail, event data store, or channel, up to a limit of 50. Overwrites an existing tag's value when a new value is specified for an existing tag key. Tag key names must be unique; you cannot have two keys with the same name but different values. 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 or event data store that applies to all Amazon Web Services Regions only from the Region in which the trail or event data store was created (also known as its home Region).
Service Reference:
Examples:
Calling the addTags operation
var params = {
ResourceId: 'STRING_VALUE', /* required */
TagsList: [ /* required */
{
Key: 'STRING_VALUE', /* required */
Value: 'STRING_VALUE'
},
/* more items */
]
};
cloudtrail.addTags(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ResourceId
— (String
)Specifies the ARN of the trail, event data store, or channel to which one or more tags will be added.
The format of a trail ARN is:
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
The format of an event data store ARN is:
arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
The format of a channel ARN is:
arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
TagsList
— (Array<map>
)Contains a list of tags, up to a limit of 50
Key
— required — (String
)The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.
Value
— (String
)The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
cancelQuery(params = {}, callback) ⇒ AWS.Request
Cancels a query if the query is not in a terminated state, such as CANCELLED
, FAILED
, TIMED_OUT
, or FINISHED
. You must specify an ARN value for EventDataStore
. The ID of the query that you want to cancel is also required. When you run CancelQuery
, the query status might show as CANCELLED
even if the operation is not yet finished.
Service Reference:
Examples:
Calling the cancelQuery operation
var params = {
QueryId: 'STRING_VALUE', /* required */
EventDataStore: 'STRING_VALUE'
};
cloudtrail.cancelQuery(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
EventDataStore
— (String
)The ARN (or the ID suffix of the ARN) of an event data store on which the specified query is running.
QueryId
— (String
)The ID of the query that you want to cancel. The
QueryId
comes from the response of aStartQuery
operation.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:QueryId
— (String
)The ID of the canceled query.
QueryStatus
— (String
)Shows the status of a query after a
Possible values include:CancelQuery
request. Typically, the values shown are eitherRUNNING
orCANCELLED
."QUEUED"
"RUNNING"
"FINISHED"
"FAILED"
"CANCELLED"
"TIMED_OUT"
-
(AWS.Response)
—
Returns:
createChannel(params = {}, callback) ⇒ AWS.Request
Creates a channel for CloudTrail to ingest events from a partner or external source. After you create a channel, a CloudTrail Lake event data store can log events from the partner or source that you specify.
Service Reference:
Examples:
Calling the createChannel operation
var params = {
Destinations: [ /* required */
{
Location: 'STRING_VALUE', /* required */
Type: EVENT_DATA_STORE | AWS_SERVICE /* required */
},
/* more items */
],
Name: 'STRING_VALUE', /* required */
Source: 'STRING_VALUE', /* required */
Tags: [
{
Key: 'STRING_VALUE', /* required */
Value: 'STRING_VALUE'
},
/* more items */
]
};
cloudtrail.createChannel(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)The name of the channel.
Source
— (String
)The name of the partner or external event source. You cannot change this name after you create the channel. A maximum of one channel is allowed per source.
A source can be either
Custom
for all valid non-Amazon Web Services events, or the name of a partner event source. For information about the source names for available partners, see Additional information about integration partners in the CloudTrail User Guide.Destinations
— (Array<map>
)One or more event data stores to which events arriving through a channel will be logged.
Type
— required — (String
)The type of destination for events arriving from a channel. For channels used for a CloudTrail Lake integration, the value is
Possible values include:EVENT_DATA_STORE
. For service-linked channels, the value isAWS_SERVICE
."EVENT_DATA_STORE"
"AWS_SERVICE"
Location
— required — (String
)For channels used for a CloudTrail Lake integration, the location is the ARN of an event data store that receives events from a channel. For service-linked channels, the location is the name of the Amazon Web Services service.
Tags
— (Array<map>
)A list of tags.
Key
— required — (String
)The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.
Value
— (String
)The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ChannelArn
— (String
)The Amazon Resource Name (ARN) of the new channel.
Name
— (String
)The name of the new channel.
Source
— (String
)The partner or external event source name.
Destinations
— (Array<map>
)The event data stores that log the events arriving through the channel.
Type
— required — (String
)The type of destination for events arriving from a channel. For channels used for a CloudTrail Lake integration, the value is
Possible values include:EVENT_DATA_STORE
. For service-linked channels, the value isAWS_SERVICE
."EVENT_DATA_STORE"
"AWS_SERVICE"
Location
— required — (String
)For channels used for a CloudTrail Lake integration, the location is the ARN of an event data store that receives events from a channel. For service-linked channels, the location is the name of the Amazon Web Services service.
Tags
— (Array<map>
)A list of tags.
Key
— required — (String
)The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.
Value
— (String
)The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
-
(AWS.Response)
—
Returns:
createEventDataStore(params = {}, callback) ⇒ AWS.Request
Creates a new event data store.
Service Reference:
Examples:
Calling the createEventDataStore operation
var params = {
Name: 'STRING_VALUE', /* required */
AdvancedEventSelectors: [
{
FieldSelectors: [ /* required */
{
Field: 'STRING_VALUE', /* required */
EndsWith: [
'STRING_VALUE',
/* more items */
],
Equals: [
'STRING_VALUE',
/* more items */
],
NotEndsWith: [
'STRING_VALUE',
/* more items */
],
NotEquals: [
'STRING_VALUE',
/* more items */
],
NotStartsWith: [
'STRING_VALUE',
/* more items */
],
StartsWith: [
'STRING_VALUE',
/* more items */
]
},
/* more items */
],
Name: 'STRING_VALUE'
},
/* more items */
],
BillingMode: EXTENDABLE_RETENTION_PRICING | FIXED_RETENTION_PRICING,
KmsKeyId: 'STRING_VALUE',
MultiRegionEnabled: true || false,
OrganizationEnabled: true || false,
RetentionPeriod: 'NUMBER_VALUE',
StartIngestion: true || false,
TagsList: [
{
Key: 'STRING_VALUE', /* required */
Value: 'STRING_VALUE'
},
/* more items */
],
TerminationProtectionEnabled: true || false
};
cloudtrail.createEventDataStore(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)The name of the event data store.
AdvancedEventSelectors
— (Array<map>
)The advanced event selectors to use to select the events for the data store. You can configure up to five advanced event selectors for each event data store.
For more information about how to use advanced event selectors to log CloudTrail events, see Log events by using advanced event selectors in the CloudTrail User Guide.
For more information about how to use advanced event selectors to include Config configuration items in your event data store, see Create an event data store for Config configuration items in the CloudTrail User Guide.
For more information about how to use advanced event selectors to include events outside of Amazon Web Services events in your event data store, see Create an integration to log events from outside Amazon Web Services in the CloudTrail User Guide.
Name
— (String
)An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets".
FieldSelectors
— required — (Array<map>
)Contains all selector statements in an advanced event selector.
Field
— required — (String
)A field in a CloudTrail event record on which to filter events to be logged. For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the field is used only for selecting events as filtering is not supported.
For CloudTrail management events, supported fields include
readOnly
,eventCategory
, andeventSource
.For CloudTrail data events, supported fields include
readOnly
,eventCategory
,eventName
,resources.type
, andresources.ARN
.For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the only supported field is
eventCategory
.-
readOnly
- Optional. Can be set toEquals
a value oftrue
orfalse
. If you do not add this field, CloudTrail logs bothread
andwrite
events. A value oftrue
logs onlyread
events. A value offalse
logs onlywrite
events. -
eventSource
- For filtering management events only. This can be set toNotEquals
kms.amazonaws.com
orNotEquals
rdsdata.amazonaws.com
. -
eventName
- Can use any operator. You can use it to filter in or filter out any data event logged to CloudTrail, such asPutBucket
orGetSnapshotBlock
. You can have multiple values for this field, separated by commas. -
eventCategory
- This is required and must be set toEquals
.-
For CloudTrail management events, the value must be
Management
. -
For CloudTrail data events, the value must be
Data
.
The following are used only for event data stores:
-
For CloudTrail Insights events, the value must be
Insight
. -
For Config configuration items, the value must be
ConfigurationItem
. -
For Audit Manager evidence, the value must be
Evidence
. -
For non-Amazon Web Services events, the value must be
ActivityAuditLog
.
-
-
resources.type
- This field is required for CloudTrail data events.resources.type
can only use theEquals
operator, and the value can be one of the following:-
AWS::DynamoDB::Table
-
AWS::Lambda::Function
-
AWS::S3::Object
-
AWS::AppConfig::Configuration
-
AWS::B2BI::Transformer
-
AWS::Bedrock::AgentAlias
-
AWS::Bedrock::KnowledgeBase
-
AWS::Cassandra::Table
-
AWS::CloudFront::KeyValueStore
-
AWS::CloudTrail::Channel
-
AWS::CodeWhisperer::Customization
-
AWS::CodeWhisperer::Profile
-
AWS::Cognito::IdentityPool
-
AWS::DynamoDB::Stream
-
AWS::EC2::Snapshot
-
AWS::EMRWAL::Workspace
-
AWS::FinSpace::Environment
-
AWS::Glue::Table
-
AWS::GreengrassV2::ComponentVersion
-
AWS::GreengrassV2::Deployment
-
AWS::GuardDuty::Detector
-
AWS::IoT::Certificate
-
AWS::IoT::Thing
-
AWS::IoTSiteWise::Asset
-
AWS::IoTSiteWise::TimeSeries
-
AWS::IoTTwinMaker::Entity
-
AWS::IoTTwinMaker::Workspace
-
AWS::KendraRanking::ExecutionPlan
-
AWS::KinesisVideo::Stream
-
AWS::ManagedBlockchain::Network
-
AWS::ManagedBlockchain::Node
-
AWS::MedicalImaging::Datastore
-
AWS::NeptuneGraph::Graph
-
AWS::PCAConnectorAD::Connector
-
AWS::QApps:QApp
-
AWS::QBusiness::Application
-
AWS::QBusiness::DataSource
-
AWS::QBusiness::Index
-
AWS::QBusiness::WebExperience
-
AWS::RDS::DBCluster
-
AWS::S3::AccessPoint
-
AWS::S3ObjectLambda::AccessPoint
-
AWS::S3Outposts::Object
-
AWS::SageMaker::Endpoint
-
AWS::SageMaker::ExperimentTrialComponent
-
AWS::SageMaker::FeatureGroup
-
AWS::ServiceDiscovery::Namespace
-
AWS::ServiceDiscovery::Service
-
AWS::SCN::Instance
-
AWS::SNS::PlatformEndpoint
-
AWS::SNS::Topic
-
AWS::SQS::Queue
-
AWS::SSM::ManagedNode
-
AWS::SSMMessages::ControlChannel
-
AWS::SWF::Domain
-
AWS::ThinClient::Device
-
AWS::ThinClient::Environment
-
AWS::Timestream::Database
-
AWS::Timestream::Table
-
AWS::VerifiedPermissions::PolicyStore
-
AWS::XRay::Trace
You can have only one
resources.type
field per selector. To log data events on more than one resource type, add another selector. -
-
resources.ARN
- You can use any operator withresources.ARN
, but if you useEquals
orNotEquals
, the value must exactly match the ARN of a valid resource of the type you've specified in the template as the value of resources.type.Note: You can't use theresources.ARN
field to filter resource types that do not have ARNs.The
resources.ARN
field can be set one of the following.If resources.type equals
AWS::S3::Object
, the ARN must be in one of the following formats. To log all data events for all objects in a specific S3 bucket, use theStartsWith
operator, and include only the bucket ARN as the matching value.The trailing slash is intentional; do not exclude it. Replace the text between less than and greater than symbols (<>) with resource-specific information.
-
arn:<partition>:s3:::<bucket_name>/
-
arn:<partition>:s3:::<bucket_name>/<object_path>/
When resources.type equals
AWS::DynamoDB::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>
When resources.type equals
AWS::Lambda::Function
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:lambda:<region>:<account_ID>:function:<function_name>
When resources.type equals
AWS::AppConfig::Configuration
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:appconfig:<region>:<account_ID>:application/<application_ID>/environment/<environment_ID>/configuration/<configuration_profile_ID>
When resources.type equals
AWS::B2BI::Transformer
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:b2bi:<region>:<account_ID>:transformer/<transformer_ID>
When resources.type equals
AWS::Bedrock::AgentAlias
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:agent-alias/<agent_ID>/<alias_ID>
When resources.type equals
AWS::Bedrock::KnowledgeBase
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:knowledge-base/<knowledge_base_ID>
When resources.type equals
AWS::Cassandra::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cassandra:<region>:<account_ID>:/keyspace/<keyspace_name>/table/<table_name>
When resources.type equals
AWS::CloudFront::KeyValueStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudfront:<region>:<account_ID>:key-value-store/<KVS_name>
When resources.type equals
AWS::CloudTrail::Channel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudtrail:<region>:<account_ID>:channel/<channel_UUID>
When resources.type equals
AWS::CodeWhisperer::Customization
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:customization/<customization_ID>
When resources.type equals
AWS::CodeWhisperer::Profile
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:profile/<profile_ID>
When resources.type equals
AWS::Cognito::IdentityPool
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cognito-identity:<region>:<account_ID>:identitypool/<identity_pool_ID>
When
resources.type
equalsAWS::DynamoDB::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>/stream/<date_time>
When
resources.type
equalsAWS::EC2::Snapshot
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ec2:<region>::snapshot/<snapshot_ID>
When
resources.type
equalsAWS::EMRWAL::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:emrwal:<region>:<account_ID>:workspace/<workspace_name>
When
resources.type
equalsAWS::FinSpace::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:finspace:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Glue::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:glue:<region>:<account_ID>:table/<database_name>/<table_name>
When
resources.type
equalsAWS::GreengrassV2::ComponentVersion
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:components/<component_name>
When
resources.type
equalsAWS::GreengrassV2::Deployment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:deployments/<deployment_ID
When
resources.type
equalsAWS::GuardDuty::Detector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:guardduty:<region>:<account_ID>:detector/<detector_ID>
When
resources.type
equalsAWS::IoT::Certificate
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:cert/<certificate_ID>
When
resources.type
equalsAWS::IoT::Thing
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:thing/<thing_ID>
When
resources.type
equalsAWS::IoTSiteWise::Asset
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:asset/<asset_ID>
When
resources.type
equalsAWS::IoTSiteWise::TimeSeries
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:timeseries/<timeseries_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Entity
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>/entity/<entity_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>
When
resources.type
equalsAWS::KendraRanking::ExecutionPlan
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kendra-ranking:<region>:<account_ID>:rescore-execution-plan/<rescore_execution_plan_ID>
When
resources.type
equalsAWS::KinesisVideo::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kinesisvideo:<region>:<account_ID>:stream/<stream_name>/<creation_time>
When
resources.type
equalsAWS::ManagedBlockchain::Network
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:::networks/<network_name>
When
resources.type
equalsAWS::ManagedBlockchain::Node
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:<region>:<account_ID>:nodes/<node_ID>
When
resources.type
equalsAWS::MedicalImaging::Datastore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:medical-imaging:<region>:<account_ID>:datastore/<data_store_ID>
When
resources.type
equalsAWS::NeptuneGraph::Graph
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:neptune-graph:<region>:<account_ID>:graph/<graph_ID>
When
resources.type
equalsAWS::PCAConnectorAD::Connector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:pca-connector-ad:<region>:<account_ID>:connector/<connector_ID>
When
resources.type
equalsAWS::QApps:QApp
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qapps:<region>:<account_ID>:application/<application_UUID>/qapp/<qapp_UUID>
When
resources.type
equalsAWS::QBusiness::Application
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>
When
resources.type
equalsAWS::QBusiness::DataSource
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>/data-source/<datasource_ID>
When
resources.type
equalsAWS::QBusiness::Index
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>
When
resources.type
equalsAWS::QBusiness::WebExperience
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/web-experience/<web_experience_ID>
When
resources.type
equalsAWS::RDS::DBCluster
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:rds:<region>:<account_ID>:cluster/<cluster_name>
When
resources.type
equalsAWS::S3::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats. To log events on all objects in an S3 access point, we recommend that you use only the access point ARN, don’t include the object path, and use theStartsWith
orNotStartsWith
operators.-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>
-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>/object/<object_path>
When
resources.type
equalsAWS::S3ObjectLambda::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-object-lambda:<region>:<account_ID>:accesspoint/<access_point_name>
When
resources.type
equalsAWS::S3Outposts::Object
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-outposts:<region>:<account_ID>:<object_path>
When
resources.type
equalsAWS::SageMaker::Endpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:endpoint/<endpoint_name>
When
resources.type
equalsAWS::SageMaker::ExperimentTrialComponent
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:experiment-trial-component/<experiment_trial_component_name>
When
resources.type
equalsAWS::SageMaker::FeatureGroup
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:feature-group/<feature_group_name>
When
resources.type
equalsAWS::SCN::Instance
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:scn:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Namespace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:namespace/<namespace_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Service
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:service/<service_ID>
When
resources.type
equalsAWS::SNS::PlatformEndpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:endpoint/<endpoint_type>/<endpoint_name>/<endpoint_ID>
When
resources.type
equalsAWS::SNS::Topic
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:<topic_name>
When
resources.type
equalsAWS::SQS::Queue
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sqs:<region>:<account_ID>:<queue_name>
When
resources.type
equalsAWS::SSM::ManagedNode
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats:-
arn:<partition>:ssm:<region>:<account_ID>:managed-instance/<instance_ID>
-
arn:<partition>:ec2:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::SSMMessages::ControlChannel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ssmmessages:<region>:<account_ID>:control-channel/<channel_ID>
When
resources.type
equalsAWS::SWF::Domain
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:swf:<region>:<account_ID>:domain/<domain_name>
When
resources.type
equalsAWS::ThinClient::Device
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:device/<device_ID>
When
resources.type
equalsAWS::ThinClient::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Timestream::Database
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>
When
resources.type
equalsAWS::Timestream::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>/table/<table_name>
When resources.type equals
AWS::VerifiedPermissions::PolicyStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:verifiedpermissions:<region>:<account_ID>:policy-store/<policy_store_UUID>
-
-
Equals
— (Array<String>
)An operator that includes events that match the exact value of the event record field specified as the value of
Field
. This is the only valid operator that you can use with thereadOnly
,eventCategory
, andresources.type
fields.StartsWith
— (Array<String>
)An operator that includes events that match the first few characters of the event record field specified as the value of
Field
.EndsWith
— (Array<String>
)An operator that includes events that match the last few characters of the event record field specified as the value of
Field
.NotEquals
— (Array<String>
)An operator that excludes events that match the exact value of the event record field specified as the value of
Field
.NotStartsWith
— (Array<String>
)An operator that excludes events that match the first few characters of the event record field specified as the value of
Field
.NotEndsWith
— (Array<String>
)An operator that excludes events that match the last few characters of the event record field specified as the value of
Field
.
MultiRegionEnabled
— (Boolean
)Specifies whether the event data store includes events from all Regions, or only from the Region in which the event data store is created.
OrganizationEnabled
— (Boolean
)Specifies whether an event data store collects events logged for an organization in Organizations.
RetentionPeriod
— (Integer
)The retention period of the event data store, in days. If
BillingMode
is set toEXTENDABLE_RETENTION_PRICING
, you can set a retention period of up to 3653 days, the equivalent of 10 years. IfBillingMode
is set toFIXED_RETENTION_PRICING
, you can set a retention period of up to 2557 days, the equivalent of seven years.CloudTrail Lake determines whether to retain an event by checking if the
eventTime
of the event is within the specified retention period. For example, if you set a retention period of 90 days, CloudTrail will remove events when theeventTime
is older than 90 days.Note: If you plan to copy trail events to this event data store, we recommend that you consider both the age of the events that you want to copy as well as how long you want to keep the copied events in your event data store. For example, if you copy trail events that are 5 years old and specify a retention period of 7 years, the event data store will retain those events for two years.TerminationProtectionEnabled
— (Boolean
)Specifies whether termination protection is enabled for the event data store. If termination protection is enabled, you cannot delete the event data store until termination protection is disabled.
TagsList
— (Array<map>
)A list of tags.
Key
— required — (String
)The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.
Value
— (String
)The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
KmsKeyId
— (String
)Specifies the KMS key ID to use to encrypt the events delivered by CloudTrail. The value can be an alias name prefixed by
alias/
, a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.Disabling or deleting the KMS key, or removing CloudTrail permissions on the key, prevents CloudTrail from logging events to the event data store, and prevents users from querying the data in the event data store that was encrypted with the key. After you associate an event data store with a KMS key, the KMS key cannot be removed or changed. Before you disable or delete a KMS key that you are using with an event data store, delete or back up your event data store.
CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, see Using multi-Region keys in the Key Management Service Developer Guide.
Examples:
-
alias/MyAliasName
-
arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
-
arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
-
12345678-1234-1234-1234-123456789012
-
StartIngestion
— (Boolean
)Specifies whether the event data store should start ingesting live events. The default is true.
BillingMode
— (String
)The billing mode for the event data store determines the cost for ingesting events and the default and maximum retention period for the event data store.
The following are the possible values:
-
EXTENDABLE_RETENTION_PRICING
- This billing mode is generally recommended if you want a flexible retention period of up to 3653 days (about 10 years). The default retention period for this billing mode is 366 days. -
FIXED_RETENTION_PRICING
- This billing mode is recommended if you expect to ingest more than 25 TB of event data per month and need a retention period of up to 2557 days (about 7 years). The default retention period for this billing mode is 2557 days.
The default value is
EXTENDABLE_RETENTION_PRICING
.For more information about CloudTrail pricing, see CloudTrail Pricing and Managing CloudTrail Lake costs.
Possible values include:"EXTENDABLE_RETENTION_PRICING"
"FIXED_RETENTION_PRICING"
-
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:EventDataStoreArn
— (String
)The ARN of the event data store.
Name
— (String
)The name of the event data store.
Status
— (String
)The status of event data store creation.
Possible values include:"CREATED"
"ENABLED"
"PENDING_DELETION"
"STARTING_INGESTION"
"STOPPING_INGESTION"
"STOPPED_INGESTION"
AdvancedEventSelectors
— (Array<map>
)The advanced event selectors that were used to select the events for the data store.
Name
— (String
)An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets".
FieldSelectors
— required — (Array<map>
)Contains all selector statements in an advanced event selector.
Field
— required — (String
)A field in a CloudTrail event record on which to filter events to be logged. For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the field is used only for selecting events as filtering is not supported.
For CloudTrail management events, supported fields include
readOnly
,eventCategory
, andeventSource
.For CloudTrail data events, supported fields include
readOnly
,eventCategory
,eventName
,resources.type
, andresources.ARN
.For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the only supported field is
eventCategory
.-
readOnly
- Optional. Can be set toEquals
a value oftrue
orfalse
. If you do not add this field, CloudTrail logs bothread
andwrite
events. A value oftrue
logs onlyread
events. A value offalse
logs onlywrite
events. -
eventSource
- For filtering management events only. This can be set toNotEquals
kms.amazonaws.com
orNotEquals
rdsdata.amazonaws.com
. -
eventName
- Can use any operator. You can use it to filter in or filter out any data event logged to CloudTrail, such asPutBucket
orGetSnapshotBlock
. You can have multiple values for this field, separated by commas. -
eventCategory
- This is required and must be set toEquals
.-
For CloudTrail management events, the value must be
Management
. -
For CloudTrail data events, the value must be
Data
.
The following are used only for event data stores:
-
For CloudTrail Insights events, the value must be
Insight
. -
For Config configuration items, the value must be
ConfigurationItem
. -
For Audit Manager evidence, the value must be
Evidence
. -
For non-Amazon Web Services events, the value must be
ActivityAuditLog
.
-
-
resources.type
- This field is required for CloudTrail data events.resources.type
can only use theEquals
operator, and the value can be one of the following:-
AWS::DynamoDB::Table
-
AWS::Lambda::Function
-
AWS::S3::Object
-
AWS::AppConfig::Configuration
-
AWS::B2BI::Transformer
-
AWS::Bedrock::AgentAlias
-
AWS::Bedrock::KnowledgeBase
-
AWS::Cassandra::Table
-
AWS::CloudFront::KeyValueStore
-
AWS::CloudTrail::Channel
-
AWS::CodeWhisperer::Customization
-
AWS::CodeWhisperer::Profile
-
AWS::Cognito::IdentityPool
-
AWS::DynamoDB::Stream
-
AWS::EC2::Snapshot
-
AWS::EMRWAL::Workspace
-
AWS::FinSpace::Environment
-
AWS::Glue::Table
-
AWS::GreengrassV2::ComponentVersion
-
AWS::GreengrassV2::Deployment
-
AWS::GuardDuty::Detector
-
AWS::IoT::Certificate
-
AWS::IoT::Thing
-
AWS::IoTSiteWise::Asset
-
AWS::IoTSiteWise::TimeSeries
-
AWS::IoTTwinMaker::Entity
-
AWS::IoTTwinMaker::Workspace
-
AWS::KendraRanking::ExecutionPlan
-
AWS::KinesisVideo::Stream
-
AWS::ManagedBlockchain::Network
-
AWS::ManagedBlockchain::Node
-
AWS::MedicalImaging::Datastore
-
AWS::NeptuneGraph::Graph
-
AWS::PCAConnectorAD::Connector
-
AWS::QApps:QApp
-
AWS::QBusiness::Application
-
AWS::QBusiness::DataSource
-
AWS::QBusiness::Index
-
AWS::QBusiness::WebExperience
-
AWS::RDS::DBCluster
-
AWS::S3::AccessPoint
-
AWS::S3ObjectLambda::AccessPoint
-
AWS::S3Outposts::Object
-
AWS::SageMaker::Endpoint
-
AWS::SageMaker::ExperimentTrialComponent
-
AWS::SageMaker::FeatureGroup
-
AWS::ServiceDiscovery::Namespace
-
AWS::ServiceDiscovery::Service
-
AWS::SCN::Instance
-
AWS::SNS::PlatformEndpoint
-
AWS::SNS::Topic
-
AWS::SQS::Queue
-
AWS::SSM::ManagedNode
-
AWS::SSMMessages::ControlChannel
-
AWS::SWF::Domain
-
AWS::ThinClient::Device
-
AWS::ThinClient::Environment
-
AWS::Timestream::Database
-
AWS::Timestream::Table
-
AWS::VerifiedPermissions::PolicyStore
-
AWS::XRay::Trace
You can have only one
resources.type
field per selector. To log data events on more than one resource type, add another selector. -
-
resources.ARN
- You can use any operator withresources.ARN
, but if you useEquals
orNotEquals
, the value must exactly match the ARN of a valid resource of the type you've specified in the template as the value of resources.type.Note: You can't use theresources.ARN
field to filter resource types that do not have ARNs.The
resources.ARN
field can be set one of the following.If resources.type equals
AWS::S3::Object
, the ARN must be in one of the following formats. To log all data events for all objects in a specific S3 bucket, use theStartsWith
operator, and include only the bucket ARN as the matching value.The trailing slash is intentional; do not exclude it. Replace the text between less than and greater than symbols (<>) with resource-specific information.
-
arn:<partition>:s3:::<bucket_name>/
-
arn:<partition>:s3:::<bucket_name>/<object_path>/
When resources.type equals
AWS::DynamoDB::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>
When resources.type equals
AWS::Lambda::Function
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:lambda:<region>:<account_ID>:function:<function_name>
When resources.type equals
AWS::AppConfig::Configuration
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:appconfig:<region>:<account_ID>:application/<application_ID>/environment/<environment_ID>/configuration/<configuration_profile_ID>
When resources.type equals
AWS::B2BI::Transformer
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:b2bi:<region>:<account_ID>:transformer/<transformer_ID>
When resources.type equals
AWS::Bedrock::AgentAlias
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:agent-alias/<agent_ID>/<alias_ID>
When resources.type equals
AWS::Bedrock::KnowledgeBase
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:knowledge-base/<knowledge_base_ID>
When resources.type equals
AWS::Cassandra::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cassandra:<region>:<account_ID>:/keyspace/<keyspace_name>/table/<table_name>
When resources.type equals
AWS::CloudFront::KeyValueStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudfront:<region>:<account_ID>:key-value-store/<KVS_name>
When resources.type equals
AWS::CloudTrail::Channel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudtrail:<region>:<account_ID>:channel/<channel_UUID>
When resources.type equals
AWS::CodeWhisperer::Customization
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:customization/<customization_ID>
When resources.type equals
AWS::CodeWhisperer::Profile
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:profile/<profile_ID>
When resources.type equals
AWS::Cognito::IdentityPool
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cognito-identity:<region>:<account_ID>:identitypool/<identity_pool_ID>
When
resources.type
equalsAWS::DynamoDB::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>/stream/<date_time>
When
resources.type
equalsAWS::EC2::Snapshot
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ec2:<region>::snapshot/<snapshot_ID>
When
resources.type
equalsAWS::EMRWAL::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:emrwal:<region>:<account_ID>:workspace/<workspace_name>
When
resources.type
equalsAWS::FinSpace::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:finspace:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Glue::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:glue:<region>:<account_ID>:table/<database_name>/<table_name>
When
resources.type
equalsAWS::GreengrassV2::ComponentVersion
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:components/<component_name>
When
resources.type
equalsAWS::GreengrassV2::Deployment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:deployments/<deployment_ID
When
resources.type
equalsAWS::GuardDuty::Detector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:guardduty:<region>:<account_ID>:detector/<detector_ID>
When
resources.type
equalsAWS::IoT::Certificate
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:cert/<certificate_ID>
When
resources.type
equalsAWS::IoT::Thing
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:thing/<thing_ID>
When
resources.type
equalsAWS::IoTSiteWise::Asset
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:asset/<asset_ID>
When
resources.type
equalsAWS::IoTSiteWise::TimeSeries
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:timeseries/<timeseries_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Entity
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>/entity/<entity_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>
When
resources.type
equalsAWS::KendraRanking::ExecutionPlan
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kendra-ranking:<region>:<account_ID>:rescore-execution-plan/<rescore_execution_plan_ID>
When
resources.type
equalsAWS::KinesisVideo::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kinesisvideo:<region>:<account_ID>:stream/<stream_name>/<creation_time>
When
resources.type
equalsAWS::ManagedBlockchain::Network
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:::networks/<network_name>
When
resources.type
equalsAWS::ManagedBlockchain::Node
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:<region>:<account_ID>:nodes/<node_ID>
When
resources.type
equalsAWS::MedicalImaging::Datastore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:medical-imaging:<region>:<account_ID>:datastore/<data_store_ID>
When
resources.type
equalsAWS::NeptuneGraph::Graph
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:neptune-graph:<region>:<account_ID>:graph/<graph_ID>
When
resources.type
equalsAWS::PCAConnectorAD::Connector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:pca-connector-ad:<region>:<account_ID>:connector/<connector_ID>
When
resources.type
equalsAWS::QApps:QApp
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qapps:<region>:<account_ID>:application/<application_UUID>/qapp/<qapp_UUID>
When
resources.type
equalsAWS::QBusiness::Application
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>
When
resources.type
equalsAWS::QBusiness::DataSource
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>/data-source/<datasource_ID>
When
resources.type
equalsAWS::QBusiness::Index
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>
When
resources.type
equalsAWS::QBusiness::WebExperience
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/web-experience/<web_experience_ID>
When
resources.type
equalsAWS::RDS::DBCluster
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:rds:<region>:<account_ID>:cluster/<cluster_name>
When
resources.type
equalsAWS::S3::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats. To log events on all objects in an S3 access point, we recommend that you use only the access point ARN, don’t include the object path, and use theStartsWith
orNotStartsWith
operators.-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>
-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>/object/<object_path>
When
resources.type
equalsAWS::S3ObjectLambda::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-object-lambda:<region>:<account_ID>:accesspoint/<access_point_name>
When
resources.type
equalsAWS::S3Outposts::Object
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-outposts:<region>:<account_ID>:<object_path>
When
resources.type
equalsAWS::SageMaker::Endpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:endpoint/<endpoint_name>
When
resources.type
equalsAWS::SageMaker::ExperimentTrialComponent
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:experiment-trial-component/<experiment_trial_component_name>
When
resources.type
equalsAWS::SageMaker::FeatureGroup
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:feature-group/<feature_group_name>
When
resources.type
equalsAWS::SCN::Instance
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:scn:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Namespace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:namespace/<namespace_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Service
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:service/<service_ID>
When
resources.type
equalsAWS::SNS::PlatformEndpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:endpoint/<endpoint_type>/<endpoint_name>/<endpoint_ID>
When
resources.type
equalsAWS::SNS::Topic
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:<topic_name>
When
resources.type
equalsAWS::SQS::Queue
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sqs:<region>:<account_ID>:<queue_name>
When
resources.type
equalsAWS::SSM::ManagedNode
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats:-
arn:<partition>:ssm:<region>:<account_ID>:managed-instance/<instance_ID>
-
arn:<partition>:ec2:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::SSMMessages::ControlChannel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ssmmessages:<region>:<account_ID>:control-channel/<channel_ID>
When
resources.type
equalsAWS::SWF::Domain
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:swf:<region>:<account_ID>:domain/<domain_name>
When
resources.type
equalsAWS::ThinClient::Device
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:device/<device_ID>
When
resources.type
equalsAWS::ThinClient::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Timestream::Database
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>
When
resources.type
equalsAWS::Timestream::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>/table/<table_name>
When resources.type equals
AWS::VerifiedPermissions::PolicyStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:verifiedpermissions:<region>:<account_ID>:policy-store/<policy_store_UUID>
-
-
Equals
— (Array<String>
)An operator that includes events that match the exact value of the event record field specified as the value of
Field
. This is the only valid operator that you can use with thereadOnly
,eventCategory
, andresources.type
fields.StartsWith
— (Array<String>
)An operator that includes events that match the first few characters of the event record field specified as the value of
Field
.EndsWith
— (Array<String>
)An operator that includes events that match the last few characters of the event record field specified as the value of
Field
.NotEquals
— (Array<String>
)An operator that excludes events that match the exact value of the event record field specified as the value of
Field
.NotStartsWith
— (Array<String>
)An operator that excludes events that match the first few characters of the event record field specified as the value of
Field
.NotEndsWith
— (Array<String>
)An operator that excludes events that match the last few characters of the event record field specified as the value of
Field
.
MultiRegionEnabled
— (Boolean
)Indicates whether the event data store collects events from all Regions, or only from the Region in which it was created.
OrganizationEnabled
— (Boolean
)Indicates whether an event data store is collecting logged events for an organization in Organizations.
RetentionPeriod
— (Integer
)The retention period of an event data store, in days.
TerminationProtectionEnabled
— (Boolean
)Indicates whether termination protection is enabled for the event data store.
TagsList
— (Array<map>
)A list of tags.
Key
— required — (String
)The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.
Value
— (String
)The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
CreatedTimestamp
— (Date
)The timestamp that shows when the event data store was created.
UpdatedTimestamp
— (Date
)The timestamp that shows when an event data store was updated, if applicable.
UpdatedTimestamp
is always either the same or newer than the time shown inCreatedTimestamp
.KmsKeyId
— (String
)Specifies the KMS key ID that encrypts the events delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.
arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
BillingMode
— (String
)The billing mode for the event data store.
Possible values include:"EXTENDABLE_RETENTION_PRICING"
"FIXED_RETENTION_PRICING"
-
(AWS.Response)
—
Returns:
createTrail(params = {}, callback) ⇒ AWS.Request
Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket.
Service Reference:
Examples:
Calling the createTrail operation
var params = {
Name: 'STRING_VALUE', /* required */
S3BucketName: 'STRING_VALUE', /* required */
CloudWatchLogsLogGroupArn: 'STRING_VALUE',
CloudWatchLogsRoleArn: 'STRING_VALUE',
EnableLogFileValidation: true || false,
IncludeGlobalServiceEvents: true || false,
IsMultiRegionTrail: true || false,
IsOrganizationTrail: true || false,
KmsKeyId: 'STRING_VALUE',
S3KeyPrefix: 'STRING_VALUE',
SnsTopicName: 'STRING_VALUE',
TagsList: [
{
Key: 'STRING_VALUE', /* required */
Value: 'STRING_VALUE'
},
/* more items */
]
};
cloudtrail.createTrail(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)Specifies the name of the trail. The name must meet the following requirements:
-
Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
-
Start with a letter or number, and end with a letter or number
-
Be between 3 and 128 characters
-
Have no adjacent periods, underscores or dashes. Names like
my-_namespace
andmy--namespace
are not valid. -
Not be in IP address format (for example, 192.168.5.4)
-
S3BucketName
— (String
)Specifies the name of the Amazon S3 bucket designated for publishing log files. For information about bucket naming rules, see Bucket naming rules in the Amazon Simple Storage Service User Guide.
S3KeyPrefix
— (String
)Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.
SnsTopicName
— (String
)Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.
IncludeGlobalServiceEvents
— (Boolean
)Specifies whether the trail is publishing events from global services such as IAM to the log files.
IsMultiRegionTrail
— (Boolean
)Specifies whether the trail is created in the current Region or in all Regions. The default is false, which creates a trail only in the Region where you are signed in. As a best practice, consider creating trails that log events in all Regions.
EnableLogFileValidation
— (Boolean
)Specifies whether log file integrity validation is enabled. The default is false.
Note: When you disable log file integrity validation, the chain of digest files is broken after one hour. CloudTrail does not create digest files for log files that were delivered during a period in which log file integrity validation was disabled. For example, if you enable log file integrity validation at noon on January 1, disable it at noon on January 2, and re-enable it at noon on January 10, digest files will not be created for the log files delivered from noon on January 2 to noon on January 10. The same applies whenever you stop CloudTrail logging or delete a trail.CloudWatchLogsLogGroupArn
— (String
)Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered. You must use a log group that exists in your account.
Not required unless you specify
CloudWatchLogsRoleArn
.CloudWatchLogsRoleArn
— (String
)Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group. You must use a role that exists in your account.
KmsKeyId
— (String
)Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by
alias/
, a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, see Using multi-Region keys in the Key Management Service Developer Guide.
Examples:
-
alias/MyAliasName
-
arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
-
arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
-
12345678-1234-1234-1234-123456789012
-
IsOrganizationTrail
— (Boolean
)Specifies whether the trail is created for all accounts in an organization in Organizations, or only for the current Amazon Web Services account. The default is false, and cannot be true unless the call is made on behalf of an Amazon Web Services account that is the management account or delegated administrator account for an organization in Organizations.
TagsList
— (Array<map>
)A list of tags.
Key
— required — (String
)The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.
Value
— (String
)The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Name
— (String
)Specifies the name of the trail.
S3BucketName
— (String
)Specifies the name of the Amazon S3 bucket designated for publishing log files.
S3KeyPrefix
— (String
)Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files.
SnsTopicName
— (String
)This field is no longer in use. Use
SnsTopicARN
.SnsTopicARN
— (String
)Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered. The format of a topic ARN is:
arn:aws:sns:us-east-2:123456789012:MyTopic
IncludeGlobalServiceEvents
— (Boolean
)Specifies whether the trail is publishing events from global services such as IAM to the log files.
IsMultiRegionTrail
— (Boolean
)Specifies whether the trail exists in one Region or in all Regions.
TrailARN
— (String
)Specifies the ARN of the trail that was created. The format of a trail ARN is:
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
LogFileValidationEnabled
— (Boolean
)Specifies whether log file integrity validation is enabled.
CloudWatchLogsLogGroupArn
— (String
)Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail logs will be delivered.
CloudWatchLogsRoleArn
— (String
)Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
KmsKeyId
— (String
)Specifies the KMS key ID that encrypts the events delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.
arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
IsOrganizationTrail
— (Boolean
)Specifies whether the trail is an organization trail.
-
(AWS.Response)
—
Returns:
deleteChannel(params = {}, callback) ⇒ AWS.Request
Deletes a channel.
Service Reference:
Examples:
Calling the deleteChannel operation
var params = {
Channel: 'STRING_VALUE' /* required */
};
cloudtrail.deleteChannel(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
Channel
— (String
)The ARN or the
UUID
value of the channel that you want to delete.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteEventDataStore(params = {}, callback) ⇒ AWS.Request
Disables the event data store specified by EventDataStore
, which accepts an event data store ARN. After you run DeleteEventDataStore
, the event data store enters a PENDING_DELETION
state, and is automatically deleted after a wait period of seven days. TerminationProtectionEnabled
must be set to False
on the event data store and the FederationStatus
must be DISABLED
. You cannot delete an event data store if TerminationProtectionEnabled
is True
or the FederationStatus
is ENABLED
.
After you run DeleteEventDataStore
on an event data store, you cannot run ListQueries
, DescribeQuery
, or GetQueryResults
on queries that are using an event data store in a PENDING_DELETION
state. An event data store in the PENDING_DELETION
state does not incur costs.
Service Reference:
Examples:
Calling the deleteEventDataStore operation
var params = {
EventDataStore: 'STRING_VALUE' /* required */
};
cloudtrail.deleteEventDataStore(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
EventDataStore
— (String
)The ARN (or the ID suffix of the ARN) of the event data store to delete.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteResourcePolicy(params = {}, callback) ⇒ AWS.Request
Deletes the resource-based policy attached to the CloudTrail channel.
Service Reference:
Examples:
Calling the deleteResourcePolicy operation
var params = {
ResourceArn: 'STRING_VALUE' /* required */
};
cloudtrail.deleteResourcePolicy(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ResourceArn
— (String
)The Amazon Resource Name (ARN) of the CloudTrail channel you're deleting the resource-based policy from. The following is the format of a resource ARN:
arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel
.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteTrail(params = {}, callback) ⇒ AWS.Request
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.
Service Reference:
Examples:
Calling the deleteTrail operation
var params = {
Name: 'STRING_VALUE' /* required */
};
cloudtrail.deleteTrail(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)Specifies the name or the CloudTrail ARN of the trail to be deleted. The following is the format of a trail ARN.
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deregisterOrganizationDelegatedAdmin(params = {}, callback) ⇒ AWS.Request
Removes CloudTrail delegated administrator permissions from a member account in an organization.
Service Reference:
Examples:
Calling the deregisterOrganizationDelegatedAdmin operation
var params = {
DelegatedAdminAccountId: 'STRING_VALUE' /* required */
};
cloudtrail.deregisterOrganizationDelegatedAdmin(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
DelegatedAdminAccountId
— (String
)A delegated administrator account ID. This is a member account in an organization that is currently designated as a delegated administrator.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
describeQuery(params = {}, callback) ⇒ AWS.Request
Returns metadata about a query, including query run time in milliseconds, number of events scanned and matched, and query status. If the query results were delivered to an S3 bucket, the response also provides the S3 URI and the delivery status.
You must specify either a QueryID
or a QueryAlias
. Specifying the QueryAlias
parameter returns information about the last query run for the alias.
Service Reference:
Examples:
Calling the describeQuery operation
var params = {
EventDataStore: 'STRING_VALUE',
QueryAlias: 'STRING_VALUE',
QueryId: 'STRING_VALUE'
};
cloudtrail.describeQuery(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
EventDataStore
— (String
)The ARN (or the ID suffix of the ARN) of an event data store on which the specified query was run.
QueryId
— (String
)The query ID.
QueryAlias
— (String
)The alias that identifies a query template.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:QueryId
— (String
)The ID of the query.
QueryString
— (String
)The SQL code of a query.
QueryStatus
— (String
)The status of a query. Values for
Possible values include:QueryStatus
includeQUEUED
,RUNNING
,FINISHED
,FAILED
,TIMED_OUT
, orCANCELLED
"QUEUED"
"RUNNING"
"FINISHED"
"FAILED"
"CANCELLED"
"TIMED_OUT"
QueryStatistics
— (map
)Metadata about a query, including the number of events that were matched, the total number of events scanned, the query run time in milliseconds, and the query's creation time.
EventsMatched
— (Integer
)The number of events that matched a query.
EventsScanned
— (Integer
)The number of events that the query scanned in the event data store.
BytesScanned
— (Integer
)The total bytes that the query scanned in the event data store. This value matches the number of bytes for which your account is billed for the query, unless the query is still running.
ExecutionTimeInMillis
— (Integer
)The query's run time, in milliseconds.
CreationTime
— (Date
)The creation time of the query.
ErrorMessage
— (String
)The error message returned if a query failed.
DeliveryS3Uri
— (String
)The URI for the S3 bucket where CloudTrail delivered query results, if applicable.
DeliveryStatus
— (String
)The delivery status.
Possible values include:"SUCCESS"
"FAILED"
"FAILED_SIGNING_FILE"
"PENDING"
"RESOURCE_NOT_FOUND"
"ACCESS_DENIED"
"ACCESS_DENIED_SIGNING_FILE"
"CANCELLED"
"UNKNOWN"
-
(AWS.Response)
—
Returns:
describeTrails(params = {}, callback) ⇒ AWS.Request
Retrieves settings for one or more trails associated with the current Region for your account.
Service Reference:
Examples:
Calling the describeTrails operation
var params = {
includeShadowTrails: true || false,
trailNameList: [
'STRING_VALUE',
/* more items */
]
};
cloudtrail.describeTrails(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
trailNameList
— (Array<String>
)Specifies a list of trail names, trail ARNs, or both, of the trails to describe. The format of a trail ARN is:
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
If an empty list is specified, information for the trail in the current Region is returned.
-
If an empty list is specified and
IncludeShadowTrails
is false, then information for all trails in the current Region is returned. -
If an empty list is specified and IncludeShadowTrails is null or true, then information for all trails in the current Region and any associated shadow trails in other Regions is returned.
Note: If one or more trail names are specified, information is returned only if the names match the names of trails belonging only to the current Region and current account. To return information about a trail in another Region, you must specify its trail ARN.-
includeShadowTrails
— (Boolean
)Specifies whether to include shadow trails in the response. A shadow trail is the replication in a Region of a trail that was created in a different Region, or in the case of an organization trail, the replication of an organization trail in member accounts. If you do not include shadow trails, organization trails in a member account and Region replication trails will not be returned. The default is true.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:trailList
— (Array<map>
)The list of trail objects. Trail objects with string values are only returned if values for the objects exist in a trail's configuration. For example,
SNSTopicName
andSNSTopicARN
are only returned in results if a trail is configured to send SNS notifications. Similarly,KMSKeyId
only appears in results if a trail's log files are encrypted with KMS customer managed keys.Name
— (String
)Name of the trail set by calling CreateTrail. The maximum length is 128 characters.
S3BucketName
— (String
)Name of the Amazon S3 bucket into which CloudTrail delivers your trail files. See Amazon S3 Bucket naming rules.
S3KeyPrefix
— (String
)Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.
SnsTopicName
— (String
)This field is no longer in use. Use
SnsTopicARN
.SnsTopicARN
— (String
)Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered. The following is the format of a topic ARN.
arn:aws:sns:us-east-2:123456789012:MyTopic
IncludeGlobalServiceEvents
— (Boolean
)Set to True to include Amazon Web Services API calls from Amazon Web Services global services such as IAM. Otherwise, False.
IsMultiRegionTrail
— (Boolean
)Specifies whether the trail exists only in one Region or exists in all Regions.
HomeRegion
— (String
)The Region in which the trail was created.
TrailARN
— (String
)Specifies the ARN of the trail. The following is the format of a trail ARN.
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
LogFileValidationEnabled
— (Boolean
)Specifies whether log file validation is enabled.
CloudWatchLogsLogGroupArn
— (String
)Specifies an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered.
CloudWatchLogsRoleArn
— (String
)Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
KmsKeyId
— (String
)Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.
arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
HasCustomEventSelectors
— (Boolean
)Specifies if the trail has custom event selectors.
HasInsightSelectors
— (Boolean
)Specifies whether a trail has insight types specified in an
InsightSelector
list.IsOrganizationTrail
— (Boolean
)Specifies whether the trail is an organization trail.
-
(AWS.Response)
—
Returns:
disableFederation(params = {}, callback) ⇒ AWS.Request
Disables Lake query federation on the specified event data store. When you disable federation, CloudTrail disables the integration with Glue, Lake Formation, and Amazon Athena. After disabling Lake query federation, you can no longer query your event data in Amazon Athena.
No CloudTrail Lake data is deleted when you disable federation and you can continue to run queries in CloudTrail Lake.
Service Reference:
Examples:
Calling the disableFederation operation
var params = {
EventDataStore: 'STRING_VALUE' /* required */
};
cloudtrail.disableFederation(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
EventDataStore
— (String
)The ARN (or ID suffix of the ARN) of the event data store for which you want to disable Lake query federation.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:EventDataStoreArn
— (String
)The ARN of the event data store for which you disabled Lake query federation.
FederationStatus
— (String
)The federation status.
Possible values include:"ENABLING"
"ENABLED"
"DISABLING"
"DISABLED"
-
(AWS.Response)
—
Returns:
enableFederation(params = {}, callback) ⇒ AWS.Request
Enables Lake query federation on the specified event data store. Federating an event data store lets you view the metadata associated with the event data store in the Glue Data Catalog and run SQL queries against your event data using Amazon Athena. The table metadata stored in the Glue Data Catalog lets the Athena query engine know how to find, read, and process the data that you want to query.
When you enable Lake query federation, CloudTrail creates a managed database named aws:cloudtrail
(if the database doesn't already exist) and a managed federated table in the Glue Data Catalog. The event data store ID is used for the table name. CloudTrail registers the role ARN and event data store in Lake Formation, the service responsible for allowing fine-grained access control of the federated resources in the Glue Data Catalog.
For more information about Lake query federation, see Federate an event data store.
Service Reference:
Examples:
Calling the enableFederation operation
var params = {
EventDataStore: 'STRING_VALUE', /* required */
FederationRoleArn: 'STRING_VALUE' /* required */
};
cloudtrail.enableFederation(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
EventDataStore
— (String
)The ARN (or ID suffix of the ARN) of the event data store for which you want to enable Lake query federation.
FederationRoleArn
— (String
)The ARN of the federation role to use for the event data store. Amazon Web Services services like Lake Formation use this federation role to access data for the federated event data store. The federation role must exist in your account and provide the required minimum permissions.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:EventDataStoreArn
— (String
)The ARN of the event data store for which you enabled Lake query federation.
FederationStatus
— (String
)The federation status.
Possible values include:"ENABLING"
"ENABLED"
"DISABLING"
"DISABLED"
FederationRoleArn
— (String
)The ARN of the federation role.
-
(AWS.Response)
—
Returns:
getChannel(params = {}, callback) ⇒ AWS.Request
Returns information about a specific channel.
Service Reference:
Examples:
Calling the getChannel operation
var params = {
Channel: 'STRING_VALUE' /* required */
};
cloudtrail.getChannel(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
Channel
— (String
)The ARN or
UUID
of a channel.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ChannelArn
— (String
)The ARN of an channel returned by a
GetChannel
request.Name
— (String
)The name of the CloudTrail channel. For service-linked channels, the name is
aws-service-channel/service-name/custom-suffix
whereservice-name
represents the name of the Amazon Web Services service that created the channel andcustom-suffix
represents the suffix generated by the Amazon Web Services service.Source
— (String
)The source for the CloudTrail channel.
SourceConfig
— (map
)Provides information about the advanced event selectors configured for the channel, and whether the channel applies to all Regions or a single Region.
ApplyToAllRegions
— (Boolean
)Specifies whether the channel applies to a single Region or to all Regions.
AdvancedEventSelectors
— (Array<map>
)The advanced event selectors that are configured for the channel.
Name
— (String
)An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets".
FieldSelectors
— required — (Array<map>
)Contains all selector statements in an advanced event selector.
Field
— required — (String
)A field in a CloudTrail event record on which to filter events to be logged. For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the field is used only for selecting events as filtering is not supported.
For CloudTrail management events, supported fields include
readOnly
,eventCategory
, andeventSource
.For CloudTrail data events, supported fields include
readOnly
,eventCategory
,eventName
,resources.type
, andresources.ARN
.For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the only supported field is
eventCategory
.-
readOnly
- Optional. Can be set toEquals
a value oftrue
orfalse
. If you do not add this field, CloudTrail logs bothread
andwrite
events. A value oftrue
logs onlyread
events. A value offalse
logs onlywrite
events. -
eventSource
- For filtering management events only. This can be set toNotEquals
kms.amazonaws.com
orNotEquals
rdsdata.amazonaws.com
. -
eventName
- Can use any operator. You can use it to filter in or filter out any data event logged to CloudTrail, such asPutBucket
orGetSnapshotBlock
. You can have multiple values for this field, separated by commas. -
eventCategory
- This is required and must be set toEquals
.-
For CloudTrail management events, the value must be
Management
. -
For CloudTrail data events, the value must be
Data
.
The following are used only for event data stores:
-
For CloudTrail Insights events, the value must be
Insight
. -
For Config configuration items, the value must be
ConfigurationItem
. -
For Audit Manager evidence, the value must be
Evidence
. -
For non-Amazon Web Services events, the value must be
ActivityAuditLog
.
-
-
resources.type
- This field is required for CloudTrail data events.resources.type
can only use theEquals
operator, and the value can be one of the following:-
AWS::DynamoDB::Table
-
AWS::Lambda::Function
-
AWS::S3::Object
-
AWS::AppConfig::Configuration
-
AWS::B2BI::Transformer
-
AWS::Bedrock::AgentAlias
-
AWS::Bedrock::KnowledgeBase
-
AWS::Cassandra::Table
-
AWS::CloudFront::KeyValueStore
-
AWS::CloudTrail::Channel
-
AWS::CodeWhisperer::Customization
-
AWS::CodeWhisperer::Profile
-
AWS::Cognito::IdentityPool
-
AWS::DynamoDB::Stream
-
AWS::EC2::Snapshot
-
AWS::EMRWAL::Workspace
-
AWS::FinSpace::Environment
-
AWS::Glue::Table
-
AWS::GreengrassV2::ComponentVersion
-
AWS::GreengrassV2::Deployment
-
AWS::GuardDuty::Detector
-
AWS::IoT::Certificate
-
AWS::IoT::Thing
-
AWS::IoTSiteWise::Asset
-
AWS::IoTSiteWise::TimeSeries
-
AWS::IoTTwinMaker::Entity
-
AWS::IoTTwinMaker::Workspace
-
AWS::KendraRanking::ExecutionPlan
-
AWS::KinesisVideo::Stream
-
AWS::ManagedBlockchain::Network
-
AWS::ManagedBlockchain::Node
-
AWS::MedicalImaging::Datastore
-
AWS::NeptuneGraph::Graph
-
AWS::PCAConnectorAD::Connector
-
AWS::QApps:QApp
-
AWS::QBusiness::Application
-
AWS::QBusiness::DataSource
-
AWS::QBusiness::Index
-
AWS::QBusiness::WebExperience
-
AWS::RDS::DBCluster
-
AWS::S3::AccessPoint
-
AWS::S3ObjectLambda::AccessPoint
-
AWS::S3Outposts::Object
-
AWS::SageMaker::Endpoint
-
AWS::SageMaker::ExperimentTrialComponent
-
AWS::SageMaker::FeatureGroup
-
AWS::ServiceDiscovery::Namespace
-
AWS::ServiceDiscovery::Service
-
AWS::SCN::Instance
-
AWS::SNS::PlatformEndpoint
-
AWS::SNS::Topic
-
AWS::SQS::Queue
-
AWS::SSM::ManagedNode
-
AWS::SSMMessages::ControlChannel
-
AWS::SWF::Domain
-
AWS::ThinClient::Device
-
AWS::ThinClient::Environment
-
AWS::Timestream::Database
-
AWS::Timestream::Table
-
AWS::VerifiedPermissions::PolicyStore
-
AWS::XRay::Trace
You can have only one
resources.type
field per selector. To log data events on more than one resource type, add another selector. -
-
resources.ARN
- You can use any operator withresources.ARN
, but if you useEquals
orNotEquals
, the value must exactly match the ARN of a valid resource of the type you've specified in the template as the value of resources.type.Note: You can't use theresources.ARN
field to filter resource types that do not have ARNs.The
resources.ARN
field can be set one of the following.If resources.type equals
AWS::S3::Object
, the ARN must be in one of the following formats. To log all data events for all objects in a specific S3 bucket, use theStartsWith
operator, and include only the bucket ARN as the matching value.The trailing slash is intentional; do not exclude it. Replace the text between less than and greater than symbols (<>) with resource-specific information.
-
arn:<partition>:s3:::<bucket_name>/
-
arn:<partition>:s3:::<bucket_name>/<object_path>/
When resources.type equals
AWS::DynamoDB::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>
When resources.type equals
AWS::Lambda::Function
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:lambda:<region>:<account_ID>:function:<function_name>
When resources.type equals
AWS::AppConfig::Configuration
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:appconfig:<region>:<account_ID>:application/<application_ID>/environment/<environment_ID>/configuration/<configuration_profile_ID>
When resources.type equals
AWS::B2BI::Transformer
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:b2bi:<region>:<account_ID>:transformer/<transformer_ID>
When resources.type equals
AWS::Bedrock::AgentAlias
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:agent-alias/<agent_ID>/<alias_ID>
When resources.type equals
AWS::Bedrock::KnowledgeBase
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:knowledge-base/<knowledge_base_ID>
When resources.type equals
AWS::Cassandra::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cassandra:<region>:<account_ID>:/keyspace/<keyspace_name>/table/<table_name>
When resources.type equals
AWS::CloudFront::KeyValueStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudfront:<region>:<account_ID>:key-value-store/<KVS_name>
When resources.type equals
AWS::CloudTrail::Channel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudtrail:<region>:<account_ID>:channel/<channel_UUID>
When resources.type equals
AWS::CodeWhisperer::Customization
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:customization/<customization_ID>
When resources.type equals
AWS::CodeWhisperer::Profile
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:profile/<profile_ID>
When resources.type equals
AWS::Cognito::IdentityPool
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cognito-identity:<region>:<account_ID>:identitypool/<identity_pool_ID>
When
resources.type
equalsAWS::DynamoDB::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>/stream/<date_time>
When
resources.type
equalsAWS::EC2::Snapshot
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ec2:<region>::snapshot/<snapshot_ID>
When
resources.type
equalsAWS::EMRWAL::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:emrwal:<region>:<account_ID>:workspace/<workspace_name>
When
resources.type
equalsAWS::FinSpace::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:finspace:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Glue::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:glue:<region>:<account_ID>:table/<database_name>/<table_name>
When
resources.type
equalsAWS::GreengrassV2::ComponentVersion
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:components/<component_name>
When
resources.type
equalsAWS::GreengrassV2::Deployment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:deployments/<deployment_ID
When
resources.type
equalsAWS::GuardDuty::Detector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:guardduty:<region>:<account_ID>:detector/<detector_ID>
When
resources.type
equalsAWS::IoT::Certificate
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:cert/<certificate_ID>
When
resources.type
equalsAWS::IoT::Thing
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:thing/<thing_ID>
When
resources.type
equalsAWS::IoTSiteWise::Asset
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:asset/<asset_ID>
When
resources.type
equalsAWS::IoTSiteWise::TimeSeries
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:timeseries/<timeseries_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Entity
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>/entity/<entity_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>
When
resources.type
equalsAWS::KendraRanking::ExecutionPlan
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kendra-ranking:<region>:<account_ID>:rescore-execution-plan/<rescore_execution_plan_ID>
When
resources.type
equalsAWS::KinesisVideo::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kinesisvideo:<region>:<account_ID>:stream/<stream_name>/<creation_time>
When
resources.type
equalsAWS::ManagedBlockchain::Network
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:::networks/<network_name>
When
resources.type
equalsAWS::ManagedBlockchain::Node
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:<region>:<account_ID>:nodes/<node_ID>
When
resources.type
equalsAWS::MedicalImaging::Datastore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:medical-imaging:<region>:<account_ID>:datastore/<data_store_ID>
When
resources.type
equalsAWS::NeptuneGraph::Graph
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:neptune-graph:<region>:<account_ID>:graph/<graph_ID>
When
resources.type
equalsAWS::PCAConnectorAD::Connector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:pca-connector-ad:<region>:<account_ID>:connector/<connector_ID>
When
resources.type
equalsAWS::QApps:QApp
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qapps:<region>:<account_ID>:application/<application_UUID>/qapp/<qapp_UUID>
When
resources.type
equalsAWS::QBusiness::Application
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>
When
resources.type
equalsAWS::QBusiness::DataSource
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>/data-source/<datasource_ID>
When
resources.type
equalsAWS::QBusiness::Index
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>
When
resources.type
equalsAWS::QBusiness::WebExperience
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/web-experience/<web_experience_ID>
When
resources.type
equalsAWS::RDS::DBCluster
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:rds:<region>:<account_ID>:cluster/<cluster_name>
When
resources.type
equalsAWS::S3::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats. To log events on all objects in an S3 access point, we recommend that you use only the access point ARN, don’t include the object path, and use theStartsWith
orNotStartsWith
operators.-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>
-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>/object/<object_path>
When
resources.type
equalsAWS::S3ObjectLambda::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-object-lambda:<region>:<account_ID>:accesspoint/<access_point_name>
When
resources.type
equalsAWS::S3Outposts::Object
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-outposts:<region>:<account_ID>:<object_path>
When
resources.type
equalsAWS::SageMaker::Endpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:endpoint/<endpoint_name>
When
resources.type
equalsAWS::SageMaker::ExperimentTrialComponent
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:experiment-trial-component/<experiment_trial_component_name>
When
resources.type
equalsAWS::SageMaker::FeatureGroup
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:feature-group/<feature_group_name>
When
resources.type
equalsAWS::SCN::Instance
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:scn:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Namespace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:namespace/<namespace_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Service
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:service/<service_ID>
When
resources.type
equalsAWS::SNS::PlatformEndpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:endpoint/<endpoint_type>/<endpoint_name>/<endpoint_ID>
When
resources.type
equalsAWS::SNS::Topic
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:<topic_name>
When
resources.type
equalsAWS::SQS::Queue
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sqs:<region>:<account_ID>:<queue_name>
When
resources.type
equalsAWS::SSM::ManagedNode
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats:-
arn:<partition>:ssm:<region>:<account_ID>:managed-instance/<instance_ID>
-
arn:<partition>:ec2:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::SSMMessages::ControlChannel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ssmmessages:<region>:<account_ID>:control-channel/<channel_ID>
When
resources.type
equalsAWS::SWF::Domain
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:swf:<region>:<account_ID>:domain/<domain_name>
When
resources.type
equalsAWS::ThinClient::Device
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:device/<device_ID>
When
resources.type
equalsAWS::ThinClient::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Timestream::Database
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>
When
resources.type
equalsAWS::Timestream::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>/table/<table_name>
When resources.type equals
AWS::VerifiedPermissions::PolicyStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:verifiedpermissions:<region>:<account_ID>:policy-store/<policy_store_UUID>
-
-
Equals
— (Array<String>
)An operator that includes events that match the exact value of the event record field specified as the value of
Field
. This is the only valid operator that you can use with thereadOnly
,eventCategory
, andresources.type
fields.StartsWith
— (Array<String>
)An operator that includes events that match the first few characters of the event record field specified as the value of
Field
.EndsWith
— (Array<String>
)An operator that includes events that match the last few characters of the event record field specified as the value of
Field
.NotEquals
— (Array<String>
)An operator that excludes events that match the exact value of the event record field specified as the value of
Field
.NotStartsWith
— (Array<String>
)An operator that excludes events that match the first few characters of the event record field specified as the value of
Field
.NotEndsWith
— (Array<String>
)An operator that excludes events that match the last few characters of the event record field specified as the value of
Field
.
Destinations
— (Array<map>
)The destinations for the channel. For channels created for integrations, the destinations are the event data stores that log events arriving through the channel. For service-linked channels, the destination is the Amazon Web Services service that created the service-linked channel to receive events.
Type
— required — (String
)The type of destination for events arriving from a channel. For channels used for a CloudTrail Lake integration, the value is
Possible values include:EVENT_DATA_STORE
. For service-linked channels, the value isAWS_SERVICE
."EVENT_DATA_STORE"
"AWS_SERVICE"
Location
— required — (String
)For channels used for a CloudTrail Lake integration, the location is the ARN of an event data store that receives events from a channel. For service-linked channels, the location is the name of the Amazon Web Services service.
IngestionStatus
— (map
)A table showing information about the most recent successful and failed attempts to ingest events.
LatestIngestionSuccessTime
— (Date
)The time stamp of the most recent successful ingestion of events for the channel.
LatestIngestionSuccessEventID
— (String
)The event ID of the most recent successful ingestion of events.
LatestIngestionErrorCode
— (String
)The error code for the most recent failure to ingest events.
LatestIngestionAttemptTime
— (Date
)The time stamp of the most recent attempt to ingest events on the channel.
LatestIngestionAttemptEventID
— (String
)The event ID of the most recent attempt to ingest events.
-
(AWS.Response)
—
Returns:
getEventDataStore(params = {}, callback) ⇒ AWS.Request
Returns information about an event data store specified as either an ARN or the ID portion of the ARN.
Service Reference:
Examples:
Calling the getEventDataStore operation
var params = {
EventDataStore: 'STRING_VALUE' /* required */
};
cloudtrail.getEventDataStore(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
EventDataStore
— (String
)The ARN (or ID suffix of the ARN) of the event data store about which you want information.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:EventDataStoreArn
— (String
)The event data store Amazon Resource Number (ARN).
Name
— (String
)The name of the event data store.
Status
— (String
)The status of an event data store.
Possible values include:"CREATED"
"ENABLED"
"PENDING_DELETION"
"STARTING_INGESTION"
"STOPPING_INGESTION"
"STOPPED_INGESTION"
AdvancedEventSelectors
— (Array<map>
)The advanced event selectors used to select events for the data store.
Name
— (String
)An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets".
FieldSelectors
— required — (Array<map>
)Contains all selector statements in an advanced event selector.
Field
— required — (String
)A field in a CloudTrail event record on which to filter events to be logged. For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the field is used only for selecting events as filtering is not supported.
For CloudTrail management events, supported fields include
readOnly
,eventCategory
, andeventSource
.For CloudTrail data events, supported fields include
readOnly
,eventCategory
,eventName
,resources.type
, andresources.ARN
.For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the only supported field is
eventCategory
.-
readOnly
- Optional. Can be set toEquals
a value oftrue
orfalse
. If you do not add this field, CloudTrail logs bothread
andwrite
events. A value oftrue
logs onlyread
events. A value offalse
logs onlywrite
events. -
eventSource
- For filtering management events only. This can be set toNotEquals
kms.amazonaws.com
orNotEquals
rdsdata.amazonaws.com
. -
eventName
- Can use any operator. You can use it to filter in or filter out any data event logged to CloudTrail, such asPutBucket
orGetSnapshotBlock
. You can have multiple values for this field, separated by commas. -
eventCategory
- This is required and must be set toEquals
.-
For CloudTrail management events, the value must be
Management
. -
For CloudTrail data events, the value must be
Data
.
The following are used only for event data stores:
-
For CloudTrail Insights events, the value must be
Insight
. -
For Config configuration items, the value must be
ConfigurationItem
. -
For Audit Manager evidence, the value must be
Evidence
. -
For non-Amazon Web Services events, the value must be
ActivityAuditLog
.
-
-
resources.type
- This field is required for CloudTrail data events.resources.type
can only use theEquals
operator, and the value can be one of the following:-
AWS::DynamoDB::Table
-
AWS::Lambda::Function
-
AWS::S3::Object
-
AWS::AppConfig::Configuration
-
AWS::B2BI::Transformer
-
AWS::Bedrock::AgentAlias
-
AWS::Bedrock::KnowledgeBase
-
AWS::Cassandra::Table
-
AWS::CloudFront::KeyValueStore
-
AWS::CloudTrail::Channel
-
AWS::CodeWhisperer::Customization
-
AWS::CodeWhisperer::Profile
-
AWS::Cognito::IdentityPool
-
AWS::DynamoDB::Stream
-
AWS::EC2::Snapshot
-
AWS::EMRWAL::Workspace
-
AWS::FinSpace::Environment
-
AWS::Glue::Table
-
AWS::GreengrassV2::ComponentVersion
-
AWS::GreengrassV2::Deployment
-
AWS::GuardDuty::Detector
-
AWS::IoT::Certificate
-
AWS::IoT::Thing
-
AWS::IoTSiteWise::Asset
-
AWS::IoTSiteWise::TimeSeries
-
AWS::IoTTwinMaker::Entity
-
AWS::IoTTwinMaker::Workspace
-
AWS::KendraRanking::ExecutionPlan
-
AWS::KinesisVideo::Stream
-
AWS::ManagedBlockchain::Network
-
AWS::ManagedBlockchain::Node
-
AWS::MedicalImaging::Datastore
-
AWS::NeptuneGraph::Graph
-
AWS::PCAConnectorAD::Connector
-
AWS::QApps:QApp
-
AWS::QBusiness::Application
-
AWS::QBusiness::DataSource
-
AWS::QBusiness::Index
-
AWS::QBusiness::WebExperience
-
AWS::RDS::DBCluster
-
AWS::S3::AccessPoint
-
AWS::S3ObjectLambda::AccessPoint
-
AWS::S3Outposts::Object
-
AWS::SageMaker::Endpoint
-
AWS::SageMaker::ExperimentTrialComponent
-
AWS::SageMaker::FeatureGroup
-
AWS::ServiceDiscovery::Namespace
-
AWS::ServiceDiscovery::Service
-
AWS::SCN::Instance
-
AWS::SNS::PlatformEndpoint
-
AWS::SNS::Topic
-
AWS::SQS::Queue
-
AWS::SSM::ManagedNode
-
AWS::SSMMessages::ControlChannel
-
AWS::SWF::Domain
-
AWS::ThinClient::Device
-
AWS::ThinClient::Environment
-
AWS::Timestream::Database
-
AWS::Timestream::Table
-
AWS::VerifiedPermissions::PolicyStore
-
AWS::XRay::Trace
You can have only one
resources.type
field per selector. To log data events on more than one resource type, add another selector. -
-
resources.ARN
- You can use any operator withresources.ARN
, but if you useEquals
orNotEquals
, the value must exactly match the ARN of a valid resource of the type you've specified in the template as the value of resources.type.Note: You can't use theresources.ARN
field to filter resource types that do not have ARNs.The
resources.ARN
field can be set one of the following.If resources.type equals
AWS::S3::Object
, the ARN must be in one of the following formats. To log all data events for all objects in a specific S3 bucket, use theStartsWith
operator, and include only the bucket ARN as the matching value.The trailing slash is intentional; do not exclude it. Replace the text between less than and greater than symbols (<>) with resource-specific information.
-
arn:<partition>:s3:::<bucket_name>/
-
arn:<partition>:s3:::<bucket_name>/<object_path>/
When resources.type equals
AWS::DynamoDB::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>
When resources.type equals
AWS::Lambda::Function
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:lambda:<region>:<account_ID>:function:<function_name>
When resources.type equals
AWS::AppConfig::Configuration
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:appconfig:<region>:<account_ID>:application/<application_ID>/environment/<environment_ID>/configuration/<configuration_profile_ID>
When resources.type equals
AWS::B2BI::Transformer
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:b2bi:<region>:<account_ID>:transformer/<transformer_ID>
When resources.type equals
AWS::Bedrock::AgentAlias
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:agent-alias/<agent_ID>/<alias_ID>
When resources.type equals
AWS::Bedrock::KnowledgeBase
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:knowledge-base/<knowledge_base_ID>
When resources.type equals
AWS::Cassandra::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cassandra:<region>:<account_ID>:/keyspace/<keyspace_name>/table/<table_name>
When resources.type equals
AWS::CloudFront::KeyValueStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudfront:<region>:<account_ID>:key-value-store/<KVS_name>
When resources.type equals
AWS::CloudTrail::Channel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudtrail:<region>:<account_ID>:channel/<channel_UUID>
When resources.type equals
AWS::CodeWhisperer::Customization
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:customization/<customization_ID>
When resources.type equals
AWS::CodeWhisperer::Profile
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:profile/<profile_ID>
When resources.type equals
AWS::Cognito::IdentityPool
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cognito-identity:<region>:<account_ID>:identitypool/<identity_pool_ID>
When
resources.type
equalsAWS::DynamoDB::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>/stream/<date_time>
When
resources.type
equalsAWS::EC2::Snapshot
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ec2:<region>::snapshot/<snapshot_ID>
When
resources.type
equalsAWS::EMRWAL::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:emrwal:<region>:<account_ID>:workspace/<workspace_name>
When
resources.type
equalsAWS::FinSpace::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:finspace:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Glue::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:glue:<region>:<account_ID>:table/<database_name>/<table_name>
When
resources.type
equalsAWS::GreengrassV2::ComponentVersion
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:components/<component_name>
When
resources.type
equalsAWS::GreengrassV2::Deployment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:deployments/<deployment_ID
When
resources.type
equalsAWS::GuardDuty::Detector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:guardduty:<region>:<account_ID>:detector/<detector_ID>
When
resources.type
equalsAWS::IoT::Certificate
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:cert/<certificate_ID>
When
resources.type
equalsAWS::IoT::Thing
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:thing/<thing_ID>
When
resources.type
equalsAWS::IoTSiteWise::Asset
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:asset/<asset_ID>
When
resources.type
equalsAWS::IoTSiteWise::TimeSeries
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:timeseries/<timeseries_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Entity
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>/entity/<entity_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>
When
resources.type
equalsAWS::KendraRanking::ExecutionPlan
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kendra-ranking:<region>:<account_ID>:rescore-execution-plan/<rescore_execution_plan_ID>
When
resources.type
equalsAWS::KinesisVideo::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kinesisvideo:<region>:<account_ID>:stream/<stream_name>/<creation_time>
When
resources.type
equalsAWS::ManagedBlockchain::Network
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:::networks/<network_name>
When
resources.type
equalsAWS::ManagedBlockchain::Node
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:<region>:<account_ID>:nodes/<node_ID>
When
resources.type
equalsAWS::MedicalImaging::Datastore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:medical-imaging:<region>:<account_ID>:datastore/<data_store_ID>
When
resources.type
equalsAWS::NeptuneGraph::Graph
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:neptune-graph:<region>:<account_ID>:graph/<graph_ID>
When
resources.type
equalsAWS::PCAConnectorAD::Connector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:pca-connector-ad:<region>:<account_ID>:connector/<connector_ID>
When
resources.type
equalsAWS::QApps:QApp
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qapps:<region>:<account_ID>:application/<application_UUID>/qapp/<qapp_UUID>
When
resources.type
equalsAWS::QBusiness::Application
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>
When
resources.type
equalsAWS::QBusiness::DataSource
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>/data-source/<datasource_ID>
When
resources.type
equalsAWS::QBusiness::Index
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>
When
resources.type
equalsAWS::QBusiness::WebExperience
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/web-experience/<web_experience_ID>
When
resources.type
equalsAWS::RDS::DBCluster
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:rds:<region>:<account_ID>:cluster/<cluster_name>
When
resources.type
equalsAWS::S3::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats. To log events on all objects in an S3 access point, we recommend that you use only the access point ARN, don’t include the object path, and use theStartsWith
orNotStartsWith
operators.-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>
-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>/object/<object_path>
When
resources.type
equalsAWS::S3ObjectLambda::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-object-lambda:<region>:<account_ID>:accesspoint/<access_point_name>
When
resources.type
equalsAWS::S3Outposts::Object
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-outposts:<region>:<account_ID>:<object_path>
When
resources.type
equalsAWS::SageMaker::Endpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:endpoint/<endpoint_name>
When
resources.type
equalsAWS::SageMaker::ExperimentTrialComponent
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:experiment-trial-component/<experiment_trial_component_name>
When
resources.type
equalsAWS::SageMaker::FeatureGroup
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:feature-group/<feature_group_name>
When
resources.type
equalsAWS::SCN::Instance
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:scn:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Namespace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:namespace/<namespace_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Service
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:service/<service_ID>
When
resources.type
equalsAWS::SNS::PlatformEndpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:endpoint/<endpoint_type>/<endpoint_name>/<endpoint_ID>
When
resources.type
equalsAWS::SNS::Topic
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:<topic_name>
When
resources.type
equalsAWS::SQS::Queue
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sqs:<region>:<account_ID>:<queue_name>
When
resources.type
equalsAWS::SSM::ManagedNode
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats:-
arn:<partition>:ssm:<region>:<account_ID>:managed-instance/<instance_ID>
-
arn:<partition>:ec2:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::SSMMessages::ControlChannel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ssmmessages:<region>:<account_ID>:control-channel/<channel_ID>
When
resources.type
equalsAWS::SWF::Domain
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:swf:<region>:<account_ID>:domain/<domain_name>
When
resources.type
equalsAWS::ThinClient::Device
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:device/<device_ID>
When
resources.type
equalsAWS::ThinClient::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Timestream::Database
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>
When
resources.type
equalsAWS::Timestream::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>/table/<table_name>
When resources.type equals
AWS::VerifiedPermissions::PolicyStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:verifiedpermissions:<region>:<account_ID>:policy-store/<policy_store_UUID>
-
-
Equals
— (Array<String>
)An operator that includes events that match the exact value of the event record field specified as the value of
Field
. This is the only valid operator that you can use with thereadOnly
,eventCategory
, andresources.type
fields.StartsWith
— (Array<String>
)An operator that includes events that match the first few characters of the event record field specified as the value of
Field
.EndsWith
— (Array<String>
)An operator that includes events that match the last few characters of the event record field specified as the value of
Field
.NotEquals
— (Array<String>
)An operator that excludes events that match the exact value of the event record field specified as the value of
Field
.NotStartsWith
— (Array<String>
)An operator that excludes events that match the first few characters of the event record field specified as the value of
Field
.NotEndsWith
— (Array<String>
)An operator that excludes events that match the last few characters of the event record field specified as the value of
Field
.
MultiRegionEnabled
— (Boolean
)Indicates whether the event data store includes events from all Regions, or only from the Region in which it was created.
OrganizationEnabled
— (Boolean
)Indicates whether an event data store is collecting logged events for an organization in Organizations.
RetentionPeriod
— (Integer
)The retention period of the event data store, in days.
TerminationProtectionEnabled
— (Boolean
)Indicates that termination protection is enabled.
CreatedTimestamp
— (Date
)The timestamp of the event data store's creation.
UpdatedTimestamp
— (Date
)Shows the time that an event data store was updated, if applicable.
UpdatedTimestamp
is always either the same or newer than the time shown inCreatedTimestamp
.KmsKeyId
— (String
)Specifies the KMS key ID that encrypts the events delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.
arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
BillingMode
— (String
)The billing mode for the event data store.
Possible values include:"EXTENDABLE_RETENTION_PRICING"
"FIXED_RETENTION_PRICING"
FederationStatus
— (String
)Indicates the Lake query federation status. The status is
Possible values include:ENABLED
if Lake query federation is enabled, orDISABLED
if Lake query federation is disabled. You cannot delete an event data store if theFederationStatus
isENABLED
."ENABLING"
"ENABLED"
"DISABLING"
"DISABLED"
FederationRoleArn
— (String
)If Lake query federation is enabled, provides the ARN of the federation role used to access the resources for the federated event data store.
PartitionKeys
— (Array<map>
)The partition keys for the event data store. To improve query performance and efficiency, CloudTrail Lake organizes event data into partitions based on values derived from partition keys.
Name
— required — (String
)The name of the partition key.
Type
— required — (String
)The data type of the partition key. For example,
bigint
orstring
.
-
(AWS.Response)
—
Returns:
getEventSelectors(params = {}, callback) ⇒ AWS.Request
Describes the settings for the event selectors that you configured for your trail. The information returned for your event selectors includes the following:
-
If your event selector includes read-only events, write-only events, or all events. This applies to both management events and data events.
-
If your event selector includes management events.
-
If your event selector includes data events, the resources on which you are logging data events.
For more information about logging management and data events, see the following topics in the CloudTrail User Guide:
Service Reference:
Examples:
Calling the getEventSelectors operation
var params = {
TrailName: 'STRING_VALUE' /* required */
};
cloudtrail.getEventSelectors(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
TrailName
— (String
)Specifies the name of the trail or trail ARN. If you specify a trail name, the string must meet the following requirements:
-
Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
-
Start with a letter or number, and end with a letter or number
-
Be between 3 and 128 characters
-
Have no adjacent periods, underscores or dashes. Names like
my-_namespace
andmy--namespace
are not valid. -
Not be in IP address format (for example, 192.168.5.4)
If you specify a trail ARN, it must be in the format:
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
-
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:TrailARN
— (String
)The specified trail ARN that has the event selectors.
EventSelectors
— (Array<map>
)The event selectors that are configured for the trail.
ReadWriteType
— (String
)Specify if you want your trail to log read-only events, write-only events, or all. For example, the EC2
GetConsoleOutput
is a read-only API operation andRunInstances
is a write-only API operation.By default, the value is
Possible values include:All
."ReadOnly"
"WriteOnly"
"All"
IncludeManagementEvents
— (Boolean
)Specify if you want your event selector to include management events for your trail.
For more information, see Management Events in the CloudTrail User Guide.
By default, the value is
true
.The first copy of management events is free. You are charged for additional copies of management events that you are logging on any subsequent trail in the same Region. For more information about CloudTrail pricing, see CloudTrail Pricing.
DataResources
— (Array<map>
)CloudTrail supports data event logging for Amazon S3 objects, Lambda functions, and Amazon DynamoDB tables with basic event selectors. You can specify up to 250 resources for an individual event selector, but the total number of data resources cannot exceed 250 across all event selectors in a trail. This limit does not apply if you configure resource logging for all data events.
For more information, see Data Events and Limits in CloudTrail in the CloudTrail User Guide.
Type
— (String
)The resource type in which you want to log data events. You can specify the following basic event selector resource types:
-
AWS::DynamoDB::Table
-
AWS::Lambda::Function
-
AWS::S3::Object
Additional resource types are available through advanced event selectors. For more information about these additional resource types, see AdvancedFieldSelector.
-
Values
— (Array<String>
)An array of Amazon Resource Name (ARN) strings or partial ARN strings for the specified resource type.
-
To log data events for all objects in all S3 buckets in your Amazon Web Services account, specify the prefix as
arn:aws:s3
.Note: This also enables logging of data event activity performed by any user or role in your Amazon Web Services account, even if that activity is performed on a bucket that belongs to another Amazon Web Services account. -
To log data events for all objects in an S3 bucket, specify the bucket and an empty object prefix such as
arn:aws:s3:::bucket-1/
. The trail logs data events for all objects in this S3 bucket. -
To log data events for specific objects, specify the S3 bucket and object prefix such as
arn:aws:s3:::bucket-1/example-images
. The trail logs data events for objects in this S3 bucket that match the prefix. -
To log data events for all Lambda functions in your Amazon Web Services account, specify the prefix as
arn:aws:lambda
.Note: This also enables logging ofInvoke
activity performed by any user or role in your Amazon Web Services account, even if that activity is performed on a function that belongs to another Amazon Web Services account. -
To log data events for a specific Lambda function, specify the function ARN.
Note: Lambda function ARNs are exact. For example, if you specify a function ARN arn:aws:lambda:us-west-2:111111111111:function:helloworld, data events will only be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld. They will not be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld2. -
To log data events for all DynamoDB tables in your Amazon Web Services account, specify the prefix as
arn:aws:dynamodb
.
-
ExcludeManagementEventSources
— (Array<String>
)An optional list of service event sources from which you do not want management events to be logged on your trail. In this release, the list can be empty (disables the filter), or it can filter out Key Management Service or Amazon RDS Data API events by containing
kms.amazonaws.com
orrdsdata.amazonaws.com
. By default,ExcludeManagementEventSources
is empty, and KMS and Amazon RDS Data API events are logged to your trail. You can exclude management event sources only in Regions that support the event source.
AdvancedEventSelectors
— (Array<map>
)The advanced event selectors that are configured for the trail.
Name
— (String
)An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets".
FieldSelectors
— required — (Array<map>
)Contains all selector statements in an advanced event selector.
Field
— required — (String
)A field in a CloudTrail event record on which to filter events to be logged. For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the field is used only for selecting events as filtering is not supported.
For CloudTrail management events, supported fields include
readOnly
,eventCategory
, andeventSource
.For CloudTrail data events, supported fields include
readOnly
,eventCategory
,eventName
,resources.type
, andresources.ARN
.For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the only supported field is
eventCategory
.-
readOnly
- Optional. Can be set toEquals
a value oftrue
orfalse
. If you do not add this field, CloudTrail logs bothread
andwrite
events. A value oftrue
logs onlyread
events. A value offalse
logs onlywrite
events. -
eventSource
- For filtering management events only. This can be set toNotEquals
kms.amazonaws.com
orNotEquals
rdsdata.amazonaws.com
. -
eventName
- Can use any operator. You can use it to filter in or filter out any data event logged to CloudTrail, such asPutBucket
orGetSnapshotBlock
. You can have multiple values for this field, separated by commas. -
eventCategory
- This is required and must be set toEquals
.-
For CloudTrail management events, the value must be
Management
. -
For CloudTrail data events, the value must be
Data
.
The following are used only for event data stores:
-
For CloudTrail Insights events, the value must be
Insight
. -
For Config configuration items, the value must be
ConfigurationItem
. -
For Audit Manager evidence, the value must be
Evidence
. -
For non-Amazon Web Services events, the value must be
ActivityAuditLog
.
-
-
resources.type
- This field is required for CloudTrail data events.resources.type
can only use theEquals
operator, and the value can be one of the following:-
AWS::DynamoDB::Table
-
AWS::Lambda::Function
-
AWS::S3::Object
-
AWS::AppConfig::Configuration
-
AWS::B2BI::Transformer
-
AWS::Bedrock::AgentAlias
-
AWS::Bedrock::KnowledgeBase
-
AWS::Cassandra::Table
-
AWS::CloudFront::KeyValueStore
-
AWS::CloudTrail::Channel
-
AWS::CodeWhisperer::Customization
-
AWS::CodeWhisperer::Profile
-
AWS::Cognito::IdentityPool
-
AWS::DynamoDB::Stream
-
AWS::EC2::Snapshot
-
AWS::EMRWAL::Workspace
-
AWS::FinSpace::Environment
-
AWS::Glue::Table
-
AWS::GreengrassV2::ComponentVersion
-
AWS::GreengrassV2::Deployment
-
AWS::GuardDuty::Detector
-
AWS::IoT::Certificate
-
AWS::IoT::Thing
-
AWS::IoTSiteWise::Asset
-
AWS::IoTSiteWise::TimeSeries
-
AWS::IoTTwinMaker::Entity
-
AWS::IoTTwinMaker::Workspace
-
AWS::KendraRanking::ExecutionPlan
-
AWS::KinesisVideo::Stream
-
AWS::ManagedBlockchain::Network
-
AWS::ManagedBlockchain::Node
-
AWS::MedicalImaging::Datastore
-
AWS::NeptuneGraph::Graph
-
AWS::PCAConnectorAD::Connector
-
AWS::QApps:QApp
-
AWS::QBusiness::Application
-
AWS::QBusiness::DataSource
-
AWS::QBusiness::Index
-
AWS::QBusiness::WebExperience
-
AWS::RDS::DBCluster
-
AWS::S3::AccessPoint
-
AWS::S3ObjectLambda::AccessPoint
-
AWS::S3Outposts::Object
-
AWS::SageMaker::Endpoint
-
AWS::SageMaker::ExperimentTrialComponent
-
AWS::SageMaker::FeatureGroup
-
AWS::ServiceDiscovery::Namespace
-
AWS::ServiceDiscovery::Service
-
AWS::SCN::Instance
-
AWS::SNS::PlatformEndpoint
-
AWS::SNS::Topic
-
AWS::SQS::Queue
-
AWS::SSM::ManagedNode
-
AWS::SSMMessages::ControlChannel
-
AWS::SWF::Domain
-
AWS::ThinClient::Device
-
AWS::ThinClient::Environment
-
AWS::Timestream::Database
-
AWS::Timestream::Table
-
AWS::VerifiedPermissions::PolicyStore
-
AWS::XRay::Trace
You can have only one
resources.type
field per selector. To log data events on more than one resource type, add another selector. -
-
resources.ARN
- You can use any operator withresources.ARN
, but if you useEquals
orNotEquals
, the value must exactly match the ARN of a valid resource of the type you've specified in the template as the value of resources.type.Note: You can't use theresources.ARN
field to filter resource types that do not have ARNs.The
resources.ARN
field can be set one of the following.If resources.type equals
AWS::S3::Object
, the ARN must be in one of the following formats. To log all data events for all objects in a specific S3 bucket, use theStartsWith
operator, and include only the bucket ARN as the matching value.The trailing slash is intentional; do not exclude it. Replace the text between less than and greater than symbols (<>) with resource-specific information.
-
arn:<partition>:s3:::<bucket_name>/
-
arn:<partition>:s3:::<bucket_name>/<object_path>/
When resources.type equals
AWS::DynamoDB::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>
When resources.type equals
AWS::Lambda::Function
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:lambda:<region>:<account_ID>:function:<function_name>
When resources.type equals
AWS::AppConfig::Configuration
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:appconfig:<region>:<account_ID>:application/<application_ID>/environment/<environment_ID>/configuration/<configuration_profile_ID>
When resources.type equals
AWS::B2BI::Transformer
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:b2bi:<region>:<account_ID>:transformer/<transformer_ID>
When resources.type equals
AWS::Bedrock::AgentAlias
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:agent-alias/<agent_ID>/<alias_ID>
When resources.type equals
AWS::Bedrock::KnowledgeBase
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:knowledge-base/<knowledge_base_ID>
When resources.type equals
AWS::Cassandra::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cassandra:<region>:<account_ID>:/keyspace/<keyspace_name>/table/<table_name>
When resources.type equals
AWS::CloudFront::KeyValueStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudfront:<region>:<account_ID>:key-value-store/<KVS_name>
When resources.type equals
AWS::CloudTrail::Channel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudtrail:<region>:<account_ID>:channel/<channel_UUID>
When resources.type equals
AWS::CodeWhisperer::Customization
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:customization/<customization_ID>
When resources.type equals
AWS::CodeWhisperer::Profile
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:profile/<profile_ID>
When resources.type equals
AWS::Cognito::IdentityPool
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cognito-identity:<region>:<account_ID>:identitypool/<identity_pool_ID>
When
resources.type
equalsAWS::DynamoDB::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>/stream/<date_time>
When
resources.type
equalsAWS::EC2::Snapshot
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ec2:<region>::snapshot/<snapshot_ID>
When
resources.type
equalsAWS::EMRWAL::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:emrwal:<region>:<account_ID>:workspace/<workspace_name>
When
resources.type
equalsAWS::FinSpace::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:finspace:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Glue::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:glue:<region>:<account_ID>:table/<database_name>/<table_name>
When
resources.type
equalsAWS::GreengrassV2::ComponentVersion
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:components/<component_name>
When
resources.type
equalsAWS::GreengrassV2::Deployment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:deployments/<deployment_ID
When
resources.type
equalsAWS::GuardDuty::Detector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:guardduty:<region>:<account_ID>:detector/<detector_ID>
When
resources.type
equalsAWS::IoT::Certificate
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:cert/<certificate_ID>
When
resources.type
equalsAWS::IoT::Thing
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:thing/<thing_ID>
When
resources.type
equalsAWS::IoTSiteWise::Asset
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:asset/<asset_ID>
When
resources.type
equalsAWS::IoTSiteWise::TimeSeries
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:timeseries/<timeseries_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Entity
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>/entity/<entity_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>
When
resources.type
equalsAWS::KendraRanking::ExecutionPlan
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kendra-ranking:<region>:<account_ID>:rescore-execution-plan/<rescore_execution_plan_ID>
When
resources.type
equalsAWS::KinesisVideo::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kinesisvideo:<region>:<account_ID>:stream/<stream_name>/<creation_time>
When
resources.type
equalsAWS::ManagedBlockchain::Network
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:::networks/<network_name>
When
resources.type
equalsAWS::ManagedBlockchain::Node
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:<region>:<account_ID>:nodes/<node_ID>
When
resources.type
equalsAWS::MedicalImaging::Datastore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:medical-imaging:<region>:<account_ID>:datastore/<data_store_ID>
When
resources.type
equalsAWS::NeptuneGraph::Graph
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:neptune-graph:<region>:<account_ID>:graph/<graph_ID>
When
resources.type
equalsAWS::PCAConnectorAD::Connector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:pca-connector-ad:<region>:<account_ID>:connector/<connector_ID>
When
resources.type
equalsAWS::QApps:QApp
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qapps:<region>:<account_ID>:application/<application_UUID>/qapp/<qapp_UUID>
When
resources.type
equalsAWS::QBusiness::Application
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>
When
resources.type
equalsAWS::QBusiness::DataSource
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>/data-source/<datasource_ID>
When
resources.type
equalsAWS::QBusiness::Index
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>
When
resources.type
equalsAWS::QBusiness::WebExperience
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/web-experience/<web_experience_ID>
When
resources.type
equalsAWS::RDS::DBCluster
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:rds:<region>:<account_ID>:cluster/<cluster_name>
When
resources.type
equalsAWS::S3::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats. To log events on all objects in an S3 access point, we recommend that you use only the access point ARN, don’t include the object path, and use theStartsWith
orNotStartsWith
operators.-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>
-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>/object/<object_path>
When
resources.type
equalsAWS::S3ObjectLambda::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-object-lambda:<region>:<account_ID>:accesspoint/<access_point_name>
When
resources.type
equalsAWS::S3Outposts::Object
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-outposts:<region>:<account_ID>:<object_path>
When
resources.type
equalsAWS::SageMaker::Endpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:endpoint/<endpoint_name>
When
resources.type
equalsAWS::SageMaker::ExperimentTrialComponent
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:experiment-trial-component/<experiment_trial_component_name>
When
resources.type
equalsAWS::SageMaker::FeatureGroup
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:feature-group/<feature_group_name>
When
resources.type
equalsAWS::SCN::Instance
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:scn:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Namespace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:namespace/<namespace_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Service
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:service/<service_ID>
When
resources.type
equalsAWS::SNS::PlatformEndpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:endpoint/<endpoint_type>/<endpoint_name>/<endpoint_ID>
When
resources.type
equalsAWS::SNS::Topic
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:<topic_name>
When
resources.type
equalsAWS::SQS::Queue
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sqs:<region>:<account_ID>:<queue_name>
When
resources.type
equalsAWS::SSM::ManagedNode
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats:-
arn:<partition>:ssm:<region>:<account_ID>:managed-instance/<instance_ID>
-
arn:<partition>:ec2:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::SSMMessages::ControlChannel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ssmmessages:<region>:<account_ID>:control-channel/<channel_ID>
When
resources.type
equalsAWS::SWF::Domain
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:swf:<region>:<account_ID>:domain/<domain_name>
When
resources.type
equalsAWS::ThinClient::Device
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:device/<device_ID>
When
resources.type
equalsAWS::ThinClient::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Timestream::Database
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>
When
resources.type
equalsAWS::Timestream::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>/table/<table_name>
When resources.type equals
AWS::VerifiedPermissions::PolicyStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:verifiedpermissions:<region>:<account_ID>:policy-store/<policy_store_UUID>
-
-
Equals
— (Array<String>
)An operator that includes events that match the exact value of the event record field specified as the value of
Field
. This is the only valid operator that you can use with thereadOnly
,eventCategory
, andresources.type
fields.StartsWith
— (Array<String>
)An operator that includes events that match the first few characters of the event record field specified as the value of
Field
.EndsWith
— (Array<String>
)An operator that includes events that match the last few characters of the event record field specified as the value of
Field
.NotEquals
— (Array<String>
)An operator that excludes events that match the exact value of the event record field specified as the value of
Field
.NotStartsWith
— (Array<String>
)An operator that excludes events that match the first few characters of the event record field specified as the value of
Field
.NotEndsWith
— (Array<String>
)An operator that excludes events that match the last few characters of the event record field specified as the value of
Field
.
-
(AWS.Response)
—
Returns:
getImport(params = {}, callback) ⇒ AWS.Request
Returns information about a specific import.
Service Reference:
Examples:
Calling the getImport operation
var params = {
ImportId: 'STRING_VALUE' /* required */
};
cloudtrail.getImport(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ImportId
— (String
)The ID for the import.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ImportId
— (String
)The ID of the import.
Destinations
— (Array<String>
)The ARN of the destination event data store.
ImportSource
— (map
)The source S3 bucket.
S3
— required — (map
)The source S3 bucket.
S3LocationUri
— required — (String
)The URI for the source S3 bucket.
S3BucketRegion
— required — (String
)The Region associated with the source S3 bucket.
S3BucketAccessRoleArn
— required — (String
)The IAM ARN role used to access the source S3 bucket.
StartEventTime
— (Date
)Used with
EndEventTime
to bound aStartImport
request, and limit imported trail events to only those events logged within a specified time period.EndEventTime
— (Date
)Used with
StartEventTime
to bound aStartImport
request, and limit imported trail events to only those events logged within a specified time period.ImportStatus
— (String
)The status of the import.
Possible values include:"INITIALIZING"
"IN_PROGRESS"
"FAILED"
"STOPPED"
"COMPLETED"
CreatedTimestamp
— (Date
)The timestamp of the import's creation.
UpdatedTimestamp
— (Date
)The timestamp of when the import was updated.
ImportStatistics
— (map
)Provides statistics for the import. CloudTrail does not update import statistics in real-time. Returned values for parameters such as
EventsCompleted
may be lower than the actual value, because CloudTrail updates statistics incrementally over the course of the import.PrefixesFound
— (Integer
)The number of S3 prefixes found for the import.
PrefixesCompleted
— (Integer
)The number of S3 prefixes that completed import.
FilesCompleted
— (Integer
)The number of log files that completed import.
EventsCompleted
— (Integer
)The number of trail events imported into the event data store.
FailedEntries
— (Integer
)The number of failed entries.
-
(AWS.Response)
—
Returns:
getInsightSelectors(params = {}, callback) ⇒ AWS.Request
Describes the settings for the Insights event selectors that you configured for your trail or event data store. GetInsightSelectors
shows if CloudTrail Insights event logging is enabled on the trail or event data store, and if it is, which Insights types are enabled. If you run GetInsightSelectors
on a trail or event data store that does not have Insights events enabled, the operation throws the exception InsightNotEnabledException
Specify either the EventDataStore
parameter to get Insights event selectors for an event data store, or the TrailName
parameter to the get Insights event selectors for a trail. You cannot specify these parameters together.
For more information, see Logging CloudTrail Insights events in the CloudTrail User Guide.
Service Reference:
Examples:
Calling the getInsightSelectors operation
var params = {
EventDataStore: 'STRING_VALUE',
TrailName: 'STRING_VALUE'
};
cloudtrail.getInsightSelectors(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
TrailName
— (String
)Specifies the name of the trail or trail ARN. If you specify a trail name, the string must meet the following requirements:
-
Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
-
Start with a letter or number, and end with a letter or number
-
Be between 3 and 128 characters
-
Have no adjacent periods, underscores or dashes. Names like
my-_namespace
andmy--namespace
are not valid. -
Not be in IP address format (for example, 192.168.5.4)
If you specify a trail ARN, it must be in the format:
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
You cannot use this parameter with the
EventDataStore
parameter.-
EventDataStore
— (String
)Specifies the ARN (or ID suffix of the ARN) of the event data store for which you want to get Insights selectors.
You cannot use this parameter with the
TrailName
parameter.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:TrailARN
— (String
)The Amazon Resource Name (ARN) of a trail for which you want to get Insights selectors.
InsightSelectors
— (Array<map>
)A JSON string that contains the Insight types you want to log on a trail or event data store.
ApiErrorRateInsight
andApiCallRateInsight
are supported as Insights types.InsightType
— (String
)The type of Insights events to log on a trail or event data store.
ApiCallRateInsight
andApiErrorRateInsight
are valid Insight types.The
ApiCallRateInsight
Insights type analyzes write-only management API calls that are aggregated per minute against a baseline API call volume.The
Possible values include:ApiErrorRateInsight
Insights type analyzes management API calls that result in error codes. The error is shown if the API call is unsuccessful."ApiCallRateInsight"
"ApiErrorRateInsight"
EventDataStoreArn
— (String
)The ARN of the source event data store that enabled Insights events.
InsightsDestination
— (String
)The ARN of the destination event data store that logs Insights events.
-
(AWS.Response)
—
Returns:
getQueryResults(params = {}, callback) ⇒ AWS.Request
Gets event data results of a query. You must specify the QueryID
value returned by the StartQuery
operation.
Service Reference:
Examples:
Calling the getQueryResults operation
var params = {
QueryId: 'STRING_VALUE', /* required */
EventDataStore: 'STRING_VALUE',
MaxQueryResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE'
};
cloudtrail.getQueryResults(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
EventDataStore
— (String
)The ARN (or ID suffix of the ARN) of the event data store against which the query was run.
QueryId
— (String
)The ID of the query for which you want to get results.
NextToken
— (String
)A token you can use to get the next page of query results.
MaxQueryResults
— (Integer
)The maximum number of query results to display on a single page.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:QueryStatus
— (String
)The status of the query. Values include
Possible values include:QUEUED
,RUNNING
,FINISHED
,FAILED
,TIMED_OUT
, orCANCELLED
."QUEUED"
"RUNNING"
"FINISHED"
"FAILED"
"CANCELLED"
"TIMED_OUT"
QueryStatistics
— (map
)Shows the count of query results.
ResultsCount
— (Integer
)The number of results returned.
TotalResultsCount
— (Integer
)The total number of results returned by a query.
BytesScanned
— (Integer
)The total bytes that the query scanned in the event data store. This value matches the number of bytes for which your account is billed for the query, unless the query is still running.
QueryResultRows
— (Array<Array<map<String>>>
)Contains the individual event results of the query.
NextToken
— (String
)A token you can use to get the next page of query results.
ErrorMessage
— (String
)The error message returned if a query failed.
-
(AWS.Response)
—
Returns:
getResourcePolicy(params = {}, callback) ⇒ AWS.Request
Retrieves the JSON text of the resource-based policy document attached to the CloudTrail channel.
Service Reference:
Examples:
Calling the getResourcePolicy operation
var params = {
ResourceArn: 'STRING_VALUE' /* required */
};
cloudtrail.getResourcePolicy(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ResourceArn
— (String
)The Amazon Resource Name (ARN) of the CloudTrail channel attached to the resource-based policy. The following is the format of a resource ARN:
arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel
.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ResourceArn
— (String
)The Amazon Resource Name (ARN) of the CloudTrail channel attached to resource-based policy.
ResourcePolicy
— (String
)A JSON-formatted string that contains the resource-based policy attached to the CloudTrail channel.
-
(AWS.Response)
—
Returns:
getTrail(params = {}, callback) ⇒ AWS.Request
Returns settings information for a specified trail.
Service Reference:
Examples:
Calling the getTrail operation
var params = {
Name: 'STRING_VALUE' /* required */
};
cloudtrail.getTrail(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)The name or the Amazon Resource Name (ARN) of the trail for which you want to retrieve settings information.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Trail
— (map
)The settings for a trail.
Name
— (String
)Name of the trail set by calling CreateTrail. The maximum length is 128 characters.
S3BucketName
— (String
)Name of the Amazon S3 bucket into which CloudTrail delivers your trail files. See Amazon S3 Bucket naming rules.
S3KeyPrefix
— (String
)Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.
SnsTopicName
— (String
)This field is no longer in use. Use
SnsTopicARN
.SnsTopicARN
— (String
)Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered. The following is the format of a topic ARN.
arn:aws:sns:us-east-2:123456789012:MyTopic
IncludeGlobalServiceEvents
— (Boolean
)Set to True to include Amazon Web Services API calls from Amazon Web Services global services such as IAM. Otherwise, False.
IsMultiRegionTrail
— (Boolean
)Specifies whether the trail exists only in one Region or exists in all Regions.
HomeRegion
— (String
)The Region in which the trail was created.
TrailARN
— (String
)Specifies the ARN of the trail. The following is the format of a trail ARN.
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
LogFileValidationEnabled
— (Boolean
)Specifies whether log file validation is enabled.
CloudWatchLogsLogGroupArn
— (String
)Specifies an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered.
CloudWatchLogsRoleArn
— (String
)Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
KmsKeyId
— (String
)Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.
arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
HasCustomEventSelectors
— (Boolean
)Specifies if the trail has custom event selectors.
HasInsightSelectors
— (Boolean
)Specifies whether a trail has insight types specified in an
InsightSelector
list.IsOrganizationTrail
— (Boolean
)Specifies whether the trail is an organization trail.
-
(AWS.Response)
—
Returns:
getTrailStatus(params = {}, callback) ⇒ AWS.Request
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.
Service Reference:
Examples:
Calling the getTrailStatus operation
var params = {
Name: 'STRING_VALUE' /* required */
};
cloudtrail.getTrailStatus(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)Specifies the name or the CloudTrail ARN of the trail for which you are requesting status. To get the status of a shadow trail (a replication of the trail in another Region), you must specify its ARN. The following is the format of a trail ARN.
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:IsLogging
— (Boolean
)Whether the CloudTrail trail is currently logging Amazon Web Services API calls.
LatestDeliveryError
— (String
)Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver log files to the designated bucket. For more information, see Error Responses in the Amazon S3 API Reference.
Note: This error occurs only when there is a problem with the destination S3 bucket, and does not occur for requests that time out. To resolve the issue, fix the bucket policy so that CloudTrail can write to the bucket; or create a new bucket and callUpdateTrail
to specify the new bucket.LatestNotificationError
— (String
)Displays any Amazon SNS error that CloudTrail encountered when attempting to send a notification. For more information about Amazon SNS errors, see the Amazon SNS Developer Guide.
LatestDeliveryTime
— (Date
)Specifies the date and time that CloudTrail last delivered log files to an account's Amazon S3 bucket.
LatestNotificationTime
— (Date
)Specifies the date and time of the most recent Amazon SNS notification that CloudTrail has written a new log file to an account's Amazon S3 bucket.
StartLoggingTime
— (Date
)Specifies the most recent date and time when CloudTrail started recording API calls for an Amazon Web Services account.
StopLoggingTime
— (Date
)Specifies the most recent date and time when CloudTrail stopped recording API calls for an Amazon Web Services account.
LatestCloudWatchLogsDeliveryError
— (String
)Displays any CloudWatch Logs error that CloudTrail encountered when attempting to deliver logs to CloudWatch Logs.
LatestCloudWatchLogsDeliveryTime
— (Date
)Displays the most recent date and time when CloudTrail delivered logs to CloudWatch Logs.
LatestDigestDeliveryTime
— (Date
)Specifies the date and time that CloudTrail last delivered a digest file to an account's Amazon S3 bucket.
LatestDigestDeliveryError
— (String
)Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver a digest file to the designated bucket. For more information, see Error Responses in the Amazon S3 API Reference.
Note: This error occurs only when there is a problem with the destination S3 bucket, and does not occur for requests that time out. To resolve the issue, fix the bucket policy so that CloudTrail can write to the bucket; or create a new bucket and callUpdateTrail
to specify the new bucket.LatestDeliveryAttemptTime
— (String
)This field is no longer in use.
LatestNotificationAttemptTime
— (String
)This field is no longer in use.
LatestNotificationAttemptSucceeded
— (String
)This field is no longer in use.
LatestDeliveryAttemptSucceeded
— (String
)This field is no longer in use.
TimeLoggingStarted
— (String
)This field is no longer in use.
TimeLoggingStopped
— (String
)This field is no longer in use.
-
(AWS.Response)
—
Returns:
listChannels(params = {}, callback) ⇒ AWS.Request
Lists the channels in the current account, and their source names.
Service Reference:
Examples:
Calling the listChannels operation
var params = {
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE'
};
cloudtrail.listChannels(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
MaxResults
— (Integer
)The maximum number of CloudTrail channels to display on a single page.
NextToken
— (String
)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 an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Channels
— (Array<map>
)The list of channels in the account.
ChannelArn
— (String
)The Amazon Resource Name (ARN) of a channel.
Name
— (String
)The name of the CloudTrail channel. For service-linked channels, the name is
aws-service-channel/service-name/custom-suffix
whereservice-name
represents the name of the Amazon Web Services service that created the channel andcustom-suffix
represents the suffix created by the Amazon Web Services service.
NextToken
— (String
)The token to use to get the next page of results after a previous API call.
-
(AWS.Response)
—
Returns:
listEventDataStores(params = {}, callback) ⇒ AWS.Request
Returns information about all event data stores in the account, in the current Region.
Service Reference:
Examples:
Calling the listEventDataStores operation
var params = {
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE'
};
cloudtrail.listEventDataStores(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
NextToken
— (String
)A token you can use to get the next page of event data store results.
MaxResults
— (Integer
)The maximum number of event data stores to display on a single page.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:EventDataStores
— (Array<map>
)Contains information about event data stores in the account, in the current Region.
EventDataStoreArn
— (String
)The ARN of the event data store.
Name
— (String
)The name of the event data store.
TerminationProtectionEnabled
— (Boolean
)Indicates whether the event data store is protected from termination.
Status
— (String
)The status of an event data store.
Possible values include:"CREATED"
"ENABLED"
"PENDING_DELETION"
"STARTING_INGESTION"
"STOPPING_INGESTION"
"STOPPED_INGESTION"
AdvancedEventSelectors
— (Array<map>
)The advanced event selectors that were used to select events for the data store.
Name
— (String
)An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets".
FieldSelectors
— required — (Array<map>
)Contains all selector statements in an advanced event selector.
Field
— required — (String
)A field in a CloudTrail event record on which to filter events to be logged. For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the field is used only for selecting events as filtering is not supported.
For CloudTrail management events, supported fields include
readOnly
,eventCategory
, andeventSource
.For CloudTrail data events, supported fields include
readOnly
,eventCategory
,eventName
,resources.type
, andresources.ARN
.For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the only supported field is
eventCategory
.-
readOnly
- Optional. Can be set toEquals
a value oftrue
orfalse
. If you do not add this field, CloudTrail logs bothread
andwrite
events. A value oftrue
logs onlyread
events. A value offalse
logs onlywrite
events. -
eventSource
- For filtering management events only. This can be set toNotEquals
kms.amazonaws.com
orNotEquals
rdsdata.amazonaws.com
. -
eventName
- Can use any operator. You can use it to filter in or filter out any data event logged to CloudTrail, such asPutBucket
orGetSnapshotBlock
. You can have multiple values for this field, separated by commas. -
eventCategory
- This is required and must be set toEquals
.-
For CloudTrail management events, the value must be
Management
. -
For CloudTrail data events, the value must be
Data
.
The following are used only for event data stores:
-
For CloudTrail Insights events, the value must be
Insight
. -
For Config configuration items, the value must be
ConfigurationItem
. -
For Audit Manager evidence, the value must be
Evidence
. -
For non-Amazon Web Services events, the value must be
ActivityAuditLog
.
-
-
resources.type
- This field is required for CloudTrail data events.resources.type
can only use theEquals
operator, and the value can be one of the following:-
AWS::DynamoDB::Table
-
AWS::Lambda::Function
-
AWS::S3::Object
-
AWS::AppConfig::Configuration
-
AWS::B2BI::Transformer
-
AWS::Bedrock::AgentAlias
-
AWS::Bedrock::KnowledgeBase
-
AWS::Cassandra::Table
-
AWS::CloudFront::KeyValueStore
-
AWS::CloudTrail::Channel
-
AWS::CodeWhisperer::Customization
-
AWS::CodeWhisperer::Profile
-
AWS::Cognito::IdentityPool
-
AWS::DynamoDB::Stream
-
AWS::EC2::Snapshot
-
AWS::EMRWAL::Workspace
-
AWS::FinSpace::Environment
-
AWS::Glue::Table
-
AWS::GreengrassV2::ComponentVersion
-
AWS::GreengrassV2::Deployment
-
AWS::GuardDuty::Detector
-
AWS::IoT::Certificate
-
AWS::IoT::Thing
-
AWS::IoTSiteWise::Asset
-
AWS::IoTSiteWise::TimeSeries
-
AWS::IoTTwinMaker::Entity
-
AWS::IoTTwinMaker::Workspace
-
AWS::KendraRanking::ExecutionPlan
-
AWS::KinesisVideo::Stream
-
AWS::ManagedBlockchain::Network
-
AWS::ManagedBlockchain::Node
-
AWS::MedicalImaging::Datastore
-
AWS::NeptuneGraph::Graph
-
AWS::PCAConnectorAD::Connector
-
AWS::QApps:QApp
-
AWS::QBusiness::Application
-
AWS::QBusiness::DataSource
-
AWS::QBusiness::Index
-
AWS::QBusiness::WebExperience
-
AWS::RDS::DBCluster
-
AWS::S3::AccessPoint
-
AWS::S3ObjectLambda::AccessPoint
-
AWS::S3Outposts::Object
-
AWS::SageMaker::Endpoint
-
AWS::SageMaker::ExperimentTrialComponent
-
AWS::SageMaker::FeatureGroup
-
AWS::ServiceDiscovery::Namespace
-
AWS::ServiceDiscovery::Service
-
AWS::SCN::Instance
-
AWS::SNS::PlatformEndpoint
-
AWS::SNS::Topic
-
AWS::SQS::Queue
-
AWS::SSM::ManagedNode
-
AWS::SSMMessages::ControlChannel
-
AWS::SWF::Domain
-
AWS::ThinClient::Device
-
AWS::ThinClient::Environment
-
AWS::Timestream::Database
-
AWS::Timestream::Table
-
AWS::VerifiedPermissions::PolicyStore
-
AWS::XRay::Trace
You can have only one
resources.type
field per selector. To log data events on more than one resource type, add another selector. -
-
resources.ARN
- You can use any operator withresources.ARN
, but if you useEquals
orNotEquals
, the value must exactly match the ARN of a valid resource of the type you've specified in the template as the value of resources.type.Note: You can't use theresources.ARN
field to filter resource types that do not have ARNs.The
resources.ARN
field can be set one of the following.If resources.type equals
AWS::S3::Object
, the ARN must be in one of the following formats. To log all data events for all objects in a specific S3 bucket, use theStartsWith
operator, and include only the bucket ARN as the matching value.The trailing slash is intentional; do not exclude it. Replace the text between less than and greater than symbols (<>) with resource-specific information.
-
arn:<partition>:s3:::<bucket_name>/
-
arn:<partition>:s3:::<bucket_name>/<object_path>/
When resources.type equals
AWS::DynamoDB::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>
When resources.type equals
AWS::Lambda::Function
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:lambda:<region>:<account_ID>:function:<function_name>
When resources.type equals
AWS::AppConfig::Configuration
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:appconfig:<region>:<account_ID>:application/<application_ID>/environment/<environment_ID>/configuration/<configuration_profile_ID>
When resources.type equals
AWS::B2BI::Transformer
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:b2bi:<region>:<account_ID>:transformer/<transformer_ID>
When resources.type equals
AWS::Bedrock::AgentAlias
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:agent-alias/<agent_ID>/<alias_ID>
When resources.type equals
AWS::Bedrock::KnowledgeBase
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:knowledge-base/<knowledge_base_ID>
When resources.type equals
AWS::Cassandra::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cassandra:<region>:<account_ID>:/keyspace/<keyspace_name>/table/<table_name>
When resources.type equals
AWS::CloudFront::KeyValueStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudfront:<region>:<account_ID>:key-value-store/<KVS_name>
When resources.type equals
AWS::CloudTrail::Channel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudtrail:<region>:<account_ID>:channel/<channel_UUID>
When resources.type equals
AWS::CodeWhisperer::Customization
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:customization/<customization_ID>
When resources.type equals
AWS::CodeWhisperer::Profile
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:profile/<profile_ID>
When resources.type equals
AWS::Cognito::IdentityPool
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cognito-identity:<region>:<account_ID>:identitypool/<identity_pool_ID>
When
resources.type
equalsAWS::DynamoDB::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>/stream/<date_time>
When
resources.type
equalsAWS::EC2::Snapshot
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ec2:<region>::snapshot/<snapshot_ID>
When
resources.type
equalsAWS::EMRWAL::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:emrwal:<region>:<account_ID>:workspace/<workspace_name>
When
resources.type
equalsAWS::FinSpace::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:finspace:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Glue::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:glue:<region>:<account_ID>:table/<database_name>/<table_name>
When
resources.type
equalsAWS::GreengrassV2::ComponentVersion
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:components/<component_name>
When
resources.type
equalsAWS::GreengrassV2::Deployment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:deployments/<deployment_ID
When
resources.type
equalsAWS::GuardDuty::Detector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:guardduty:<region>:<account_ID>:detector/<detector_ID>
When
resources.type
equalsAWS::IoT::Certificate
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:cert/<certificate_ID>
When
resources.type
equalsAWS::IoT::Thing
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:thing/<thing_ID>
When
resources.type
equalsAWS::IoTSiteWise::Asset
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:asset/<asset_ID>
When
resources.type
equalsAWS::IoTSiteWise::TimeSeries
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:timeseries/<timeseries_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Entity
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>/entity/<entity_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>
When
resources.type
equalsAWS::KendraRanking::ExecutionPlan
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kendra-ranking:<region>:<account_ID>:rescore-execution-plan/<rescore_execution_plan_ID>
When
resources.type
equalsAWS::KinesisVideo::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kinesisvideo:<region>:<account_ID>:stream/<stream_name>/<creation_time>
When
resources.type
equalsAWS::ManagedBlockchain::Network
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:::networks/<network_name>
When
resources.type
equalsAWS::ManagedBlockchain::Node
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:<region>:<account_ID>:nodes/<node_ID>
When
resources.type
equalsAWS::MedicalImaging::Datastore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:medical-imaging:<region>:<account_ID>:datastore/<data_store_ID>
When
resources.type
equalsAWS::NeptuneGraph::Graph
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:neptune-graph:<region>:<account_ID>:graph/<graph_ID>
When
resources.type
equalsAWS::PCAConnectorAD::Connector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:pca-connector-ad:<region>:<account_ID>:connector/<connector_ID>
When
resources.type
equalsAWS::QApps:QApp
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qapps:<region>:<account_ID>:application/<application_UUID>/qapp/<qapp_UUID>
When
resources.type
equalsAWS::QBusiness::Application
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>
When
resources.type
equalsAWS::QBusiness::DataSource
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>/data-source/<datasource_ID>
When
resources.type
equalsAWS::QBusiness::Index
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>
When
resources.type
equalsAWS::QBusiness::WebExperience
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/web-experience/<web_experience_ID>
When
resources.type
equalsAWS::RDS::DBCluster
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:rds:<region>:<account_ID>:cluster/<cluster_name>
When
resources.type
equalsAWS::S3::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats. To log events on all objects in an S3 access point, we recommend that you use only the access point ARN, don’t include the object path, and use theStartsWith
orNotStartsWith
operators.-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>
-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>/object/<object_path>
When
resources.type
equalsAWS::S3ObjectLambda::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-object-lambda:<region>:<account_ID>:accesspoint/<access_point_name>
When
resources.type
equalsAWS::S3Outposts::Object
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-outposts:<region>:<account_ID>:<object_path>
When
resources.type
equalsAWS::SageMaker::Endpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:endpoint/<endpoint_name>
When
resources.type
equalsAWS::SageMaker::ExperimentTrialComponent
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:experiment-trial-component/<experiment_trial_component_name>
When
resources.type
equalsAWS::SageMaker::FeatureGroup
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:feature-group/<feature_group_name>
When
resources.type
equalsAWS::SCN::Instance
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:scn:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Namespace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:namespace/<namespace_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Service
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:service/<service_ID>
When
resources.type
equalsAWS::SNS::PlatformEndpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:endpoint/<endpoint_type>/<endpoint_name>/<endpoint_ID>
When
resources.type
equalsAWS::SNS::Topic
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:<topic_name>
When
resources.type
equalsAWS::SQS::Queue
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sqs:<region>:<account_ID>:<queue_name>
When
resources.type
equalsAWS::SSM::ManagedNode
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats:-
arn:<partition>:ssm:<region>:<account_ID>:managed-instance/<instance_ID>
-
arn:<partition>:ec2:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::SSMMessages::ControlChannel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ssmmessages:<region>:<account_ID>:control-channel/<channel_ID>
When
resources.type
equalsAWS::SWF::Domain
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:swf:<region>:<account_ID>:domain/<domain_name>
When
resources.type
equalsAWS::ThinClient::Device
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:device/<device_ID>
When
resources.type
equalsAWS::ThinClient::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Timestream::Database
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>
When
resources.type
equalsAWS::Timestream::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>/table/<table_name>
When resources.type equals
AWS::VerifiedPermissions::PolicyStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:verifiedpermissions:<region>:<account_ID>:policy-store/<policy_store_UUID>
-
-
Equals
— (Array<String>
)An operator that includes events that match the exact value of the event record field specified as the value of
Field
. This is the only valid operator that you can use with thereadOnly
,eventCategory
, andresources.type
fields.StartsWith
— (Array<String>
)An operator that includes events that match the first few characters of the event record field specified as the value of
Field
.EndsWith
— (Array<String>
)An operator that includes events that match the last few characters of the event record field specified as the value of
Field
.NotEquals
— (Array<String>
)An operator that excludes events that match the exact value of the event record field specified as the value of
Field
.NotStartsWith
— (Array<String>
)An operator that excludes events that match the first few characters of the event record field specified as the value of
Field
.NotEndsWith
— (Array<String>
)An operator that excludes events that match the last few characters of the event record field specified as the value of
Field
.
MultiRegionEnabled
— (Boolean
)Indicates whether the event data store includes events from all Regions, or only from the Region in which it was created.
OrganizationEnabled
— (Boolean
)Indicates that an event data store is collecting logged events for an organization.
RetentionPeriod
— (Integer
)The retention period, in days.
CreatedTimestamp
— (Date
)The timestamp of the event data store's creation.
UpdatedTimestamp
— (Date
)The timestamp showing when an event data store was updated, if applicable.
UpdatedTimestamp
is always either the same or newer than the time shown inCreatedTimestamp
.
NextToken
— (String
)A token you can use to get the next page of results.
-
(AWS.Response)
—
Returns:
listImportFailures(params = {}, callback) ⇒ AWS.Request
Returns a list of failures for the specified import.
Service Reference:
Examples:
Calling the listImportFailures operation
var params = {
ImportId: 'STRING_VALUE', /* required */
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE'
};
cloudtrail.listImportFailures(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ImportId
— (String
)The ID of the import.
MaxResults
— (Integer
)The maximum number of failures to display on a single page.
NextToken
— (String
)A token you can use to get the next page of import failures.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Failures
— (Array<map>
)Contains information about the import failures.
Location
— (String
)The location of the failure in the S3 bucket.
Status
— (String
)The status of the import.
Possible values include:"FAILED"
"RETRY"
"SUCCEEDED"
ErrorType
— (String
)The type of import error.
ErrorMessage
— (String
)Provides the reason the import failed.
LastUpdatedTime
— (Date
)When the import was last updated.
NextToken
— (String
)A token you can use to get the next page of results.
-
(AWS.Response)
—
Returns:
listImports(params = {}, callback) ⇒ AWS.Request
Returns information on all imports, or a select set of imports by ImportStatus
or Destination
.
Service Reference:
Examples:
Calling the listImports operation
var params = {
Destination: 'STRING_VALUE',
ImportStatus: INITIALIZING | IN_PROGRESS | FAILED | STOPPED | COMPLETED,
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE'
};
cloudtrail.listImports(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
MaxResults
— (Integer
)The maximum number of imports to display on a single page.
Destination
— (String
)The ARN of the destination event data store.
ImportStatus
— (String
)The status of the import.
Possible values include:"INITIALIZING"
"IN_PROGRESS"
"FAILED"
"STOPPED"
"COMPLETED"
NextToken
— (String
)A token you can use to get the next page of import results.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Imports
— (Array<map>
)The list of returned imports.
ImportId
— (String
)The ID of the import.
ImportStatus
— (String
)The status of the import.
Possible values include:"INITIALIZING"
"IN_PROGRESS"
"FAILED"
"STOPPED"
"COMPLETED"
Destinations
— (Array<String>
)The ARN of the destination event data store.
CreatedTimestamp
— (Date
)The timestamp of the import's creation.
UpdatedTimestamp
— (Date
)The timestamp of the import's last update.
NextToken
— (String
)A token you can use to get the next page of import results.
-
(AWS.Response)
—
Returns:
listInsightsMetricData(params = {}, callback) ⇒ AWS.Request
Returns Insights metrics data for trails that have enabled Insights. The request must include the EventSource
, EventName
, and InsightType
parameters.
If the InsightType
is set to ApiErrorRateInsight
, the request must also include the ErrorCode
parameter.
The following are the available time periods for ListInsightsMetricData
. Each cutoff is inclusive.
-
Data points with a period of 60 seconds (1-minute) are available for 15 days.
-
Data points with a period of 300 seconds (5-minute) are available for 63 days.
-
Data points with a period of 3600 seconds (1 hour) are available for 90 days.
Access to the ListInsightsMetricData
API operation is linked to the cloudtrail:LookupEvents
action. To use this operation, you must have permissions to perform the cloudtrail:LookupEvents
action.
Service Reference:
Examples:
Calling the listInsightsMetricData operation
var params = {
EventName: 'STRING_VALUE', /* required */
EventSource: 'STRING_VALUE', /* required */
InsightType: ApiCallRateInsight | ApiErrorRateInsight, /* required */
DataType: FillWithZeros | NonZeroData,
EndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
ErrorCode: 'STRING_VALUE',
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE',
Period: 'NUMBER_VALUE',
StartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
cloudtrail.listInsightsMetricData(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
EventSource
— (String
)The Amazon Web Services service to which the request was made, such as
iam.amazonaws.com
ors3.amazonaws.com
.EventName
— (String
)The name of the event, typically the Amazon Web Services API on which unusual levels of activity were recorded.
InsightType
— (String
)The type of CloudTrail Insights event, which is either
Possible values include:ApiCallRateInsight
orApiErrorRateInsight
. TheApiCallRateInsight
Insights type analyzes write-only management API calls that are aggregated per minute against a baseline API call volume. TheApiErrorRateInsight
Insights type analyzes management API calls that result in error codes."ApiCallRateInsight"
"ApiErrorRateInsight"
ErrorCode
— (String
)Conditionally required if the
InsightType
parameter is set toApiErrorRateInsight
.If returning metrics for the
ApiErrorRateInsight
Insights type, this is the error to retrieve data for. For example,AccessDenied
.StartTime
— (Date
)Specifies, in UTC, the start time for time-series data. The value specified is inclusive; results include data points with the specified time stamp.
The default is 90 days before the time of request.
EndTime
— (Date
)Specifies, in UTC, the end time for time-series data. The value specified is exclusive; results include data points up to the specified time stamp.
The default is the time of request.
Period
— (Integer
)Granularity of data to retrieve, in seconds. Valid values are
60
,300
, and3600
. If you specify any other value, you will get an error. The default is 3600 seconds.DataType
— (String
)Type of datapoints to return. Valid values are
Possible values include:NonZeroData
andFillWithZeros
. The default isNonZeroData
."FillWithZeros"
"NonZeroData"
MaxResults
— (Integer
)The maximum number of datapoints to return. Valid values are integers from 1 to 21600. The default value is 21600.
NextToken
— (String
)Returned if all datapoints can't be returned in a single call. For example, due to reaching
MaxResults
.Add this parameter to the request to continue retrieving results starting from the last evaluated point.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:EventSource
— (String
)The Amazon Web Services service to which the request was made, such as
iam.amazonaws.com
ors3.amazonaws.com
.EventName
— (String
)The name of the event, typically the Amazon Web Services API on which unusual levels of activity were recorded.
InsightType
— (String
)The type of CloudTrail Insights event, which is either
Possible values include:ApiCallRateInsight
orApiErrorRateInsight
. TheApiCallRateInsight
Insights type analyzes write-only management API calls that are aggregated per minute against a baseline API call volume. TheApiErrorRateInsight
Insights type analyzes management API calls that result in error codes."ApiCallRateInsight"
"ApiErrorRateInsight"
ErrorCode
— (String
)Only returned if
InsightType
parameter was set toApiErrorRateInsight
.If returning metrics for the
ApiErrorRateInsight
Insights type, this is the error to retrieve data for. For example,AccessDenied
.Timestamps
— (Array<Date>
)List of timestamps at intervals corresponding to the specified time period.
Values
— (Array<Float>
)List of values representing the API call rate or error rate at each timestamp. The number of values is equal to the number of timestamps.
NextToken
— (String
)Only returned if the full results could not be returned in a single query. You can set the
NextToken
parameter in the next request to this value to continue retrieval.
-
(AWS.Response)
—
Returns:
listPublicKeys(params = {}, callback) ⇒ AWS.Request
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.
Service Reference:
Examples:
Calling the listPublicKeys operation
var params = {
EndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
NextToken: 'STRING_VALUE',
StartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
cloudtrail.listPublicKeys(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
StartTime
— (Date
)Optionally specifies, in UTC, the start of the time range to look up public keys for CloudTrail digest files. If not specified, the current time is used, and the current public key is returned.
EndTime
— (Date
)Optionally specifies, in UTC, the end of the time range to look up public keys for CloudTrail digest files. If not specified, the current time is used.
NextToken
— (String
)Reserved for future use.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:PublicKeyList
— (Array<map>
)Contains an array of PublicKey objects.
Note: The returned public keys may have validity time ranges that overlap.Value
— (Buffer, Typed Array, Blob, String
)The DER encoded public key value in PKCS#1 format.
ValidityStartTime
— (Date
)The starting time of validity of the public key.
ValidityEndTime
— (Date
)The ending time of validity of the public key.
Fingerprint
— (String
)The fingerprint of the public key.
NextToken
— (String
)Reserved for future use.
-
(AWS.Response)
—
Returns:
listQueries(params = {}, callback) ⇒ AWS.Request
Returns a list of queries and query statuses for the past seven days. You must specify an ARN value for EventDataStore
. Optionally, to shorten the list of results, you can specify a time range, formatted as timestamps, by adding StartTime
and EndTime
parameters, and a QueryStatus
value. Valid values for QueryStatus
include QUEUED
, RUNNING
, FINISHED
, FAILED
, TIMED_OUT
, or CANCELLED
.
Service Reference:
Examples:
Calling the listQueries operation
var params = {
EventDataStore: 'STRING_VALUE', /* required */
EndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE',
QueryStatus: QUEUED | RUNNING | FINISHED | FAILED | CANCELLED | TIMED_OUT,
StartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
cloudtrail.listQueries(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
EventDataStore
— (String
)The ARN (or the ID suffix of the ARN) of an event data store on which queries were run.
NextToken
— (String
)A token you can use to get the next page of results.
MaxResults
— (Integer
)The maximum number of queries to show on a page.
StartTime
— (Date
)Use with
EndTime
to bound aListQueries
request, and limit its results to only those queries run within a specified time period.EndTime
— (Date
)Use with
StartTime
to bound aListQueries
request, and limit its results to only those queries run within a specified time period.QueryStatus
— (String
)The status of queries that you want to return in results. Valid values for
Possible values include:QueryStatus
includeQUEUED
,RUNNING
,FINISHED
,FAILED
,TIMED_OUT
, orCANCELLED
."QUEUED"
"RUNNING"
"FINISHED"
"FAILED"
"CANCELLED"
"TIMED_OUT"
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Queries
— (Array<map>
)Lists matching query results, and shows query ID, status, and creation time of each query.
QueryId
— (String
)The ID of a query.
QueryStatus
— (String
)The status of the query. This can be
Possible values include:QUEUED
,RUNNING
,FINISHED
,FAILED
,TIMED_OUT
, orCANCELLED
."QUEUED"
"RUNNING"
"FINISHED"
"FAILED"
"CANCELLED"
"TIMED_OUT"
CreationTime
— (Date
)The creation time of a query.
NextToken
— (String
)A token you can use to get the next page of results.
-
(AWS.Response)
—
Returns:
listTags(params = {}, callback) ⇒ AWS.Request
Lists the tags for the specified trails, event data stores, or channels in the current Region.
Service Reference:
Examples:
Calling the listTags operation
var params = {
ResourceIdList: [ /* required */
'STRING_VALUE',
/* more items */
],
NextToken: 'STRING_VALUE'
};
cloudtrail.listTags(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ResourceIdList
— (Array<String>
)Specifies a list of trail, event data store, or channel ARNs whose tags will be listed. The list has a limit of 20 ARNs.
Example trail ARN format:
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
Example event data store ARN format:
arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
Example channel ARN format:
arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
NextToken
— (String
)Reserved for future use.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ResourceTagList
— (Array<map>
)A list of resource tags.
ResourceId
— (String
)Specifies the ARN of the resource.
TagsList
— (Array<map>
)A list of tags.
Key
— required — (String
)The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.
Value
— (String
)The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
NextToken
— (String
)Reserved for future use.
-
(AWS.Response)
—
Returns:
listTrails(params = {}, callback) ⇒ AWS.Request
Lists trails that are in the current account.
Service Reference:
Examples:
Calling the listTrails operation
var params = {
NextToken: 'STRING_VALUE'
};
cloudtrail.listTrails(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
NextToken
— (String
)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 an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Trails
— (Array<map>
)Returns the name, ARN, and home Region of trails in the current account.
TrailARN
— (String
)The ARN of a trail.
Name
— (String
)The name of a trail.
HomeRegion
— (String
)The Amazon Web Services Region in which a trail was created.
NextToken
— (String
)The token to use to get the next page of results after a previous API call. If the token does not appear, there are no more results to return. The token must be passed in with the same parameters as the previous 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.
-
(AWS.Response)
—
Returns:
lookupEvents(params = {}, callback) ⇒ AWS.Request
Looks up management events or CloudTrail Insights events that are captured by CloudTrail. You can look up events that occurred in a Region within the last 90 days.
LookupEvents
returns recent Insights events for trails that enable Insights. To view Insights events for an event data store, you can run queries on your Insights event data store, and you can also view the Lake dashboard for Insights. Lookup supports the following attributes for management events:
-
Amazon Web Services access key
-
Event ID
-
Event name
-
Event source
-
Read only
-
Resource name
-
Resource type
-
User name
Lookup supports the following attributes for Insights events:
-
Event ID
-
Event name
-
Event source
All attributes 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 lookup requests is limited to two per second, per account, per Region. If this limit is exceeded, a throttling error occurs.
Service Reference:
Examples:
Calling the lookupEvents operation
var params = {
EndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
EventCategory: insight,
LookupAttributes: [
{
AttributeKey: EventId | EventName | ReadOnly | Username | ResourceType | ResourceName | EventSource | AccessKeyId, /* required */
AttributeValue: 'STRING_VALUE' /* required */
},
/* more items */
],
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE',
StartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
cloudtrail.lookupEvents(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
LookupAttributes
— (Array<map>
)Contains a list of lookup attributes. Currently the list can contain only one item.
AttributeKey
— required — (String
)Specifies an attribute on which to filter the events returned.
Possible values include:"EventId"
"EventName"
"ReadOnly"
"Username"
"ResourceType"
"ResourceName"
"EventSource"
"AccessKeyId"
AttributeValue
— required — (String
)Specifies a value for the specified
AttributeKey
.The maximum length for the
AttributeValue
is 2000 characters. The following characters ('_
', ',
', '\n
') count as two characters towards the 2000 character limit.
StartTime
— (Date
)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
— (Date
)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.
EventCategory
— (String
)Specifies the event category. If you do not specify an event category, events of the category are not returned in the response. For example, if you do not specify
Possible values include:insight
as the value ofEventCategory
, no Insights events are returned."insight"
MaxResults
— (Integer
)The number of events to return. Possible values are 1 through 50. The default is 50.
NextToken
— (String
)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 an AttributeKey of 'Username' with a value of 'root', the call with NextToken should include those same parameters.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Events
— (Array<map>
)A list of events returned based on the lookup attributes specified and the CloudTrail event. The events list is sorted by time. The most recent event is listed first.
EventId
— (String
)The CloudTrail ID of the event returned.
EventName
— (String
)The name of the event returned.
ReadOnly
— (String
)Information about whether the event is a write event or a read event.
AccessKeyId
— (String
)The Amazon Web Services access key ID that was used to sign the request. If the request was made with temporary security credentials, this is the access key ID of the temporary credentials.
EventTime
— (Date
)The date and time of the event returned.
EventSource
— (String
)The Amazon Web Services service to which the request was made.
Username
— (String
)A user name or role name of the requester that called the API in the event returned.
Resources
— (Array<map>
)A list of resources referenced by the event returned.
ResourceType
— (String
)The type of a resource referenced by the event returned. When the resource type cannot be determined, null is returned. Some examples of resource types are: Instance for EC2, Trail for CloudTrail, DBInstance for Amazon RDS, and AccessKey for IAM. To learn more about how to look up and filter events by the resource types supported for a service, see Filtering CloudTrail Events.
ResourceName
— (String
)The name of the resource referenced by the event returned. These are user-created names whose values will depend on the environment. For example, the resource name might be "auto-scaling-test-group" for an Auto Scaling Group or "i-1234567" for an EC2 Instance.
CloudTrailEvent
— (String
)A JSON string that contains a representation of the event returned.
NextToken
— (String
)The token to use to get the next page of results after a previous API call. If the token does not appear, there are no more results to return. The token must be passed in with the same parameters as the previous 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.
-
(AWS.Response)
—
Returns:
putEventSelectors(params = {}, callback) ⇒ AWS.Request
Configures an event selector or advanced event selectors for your trail. Use event selectors or advanced event selectors to specify management and data event settings for your trail. If you want your trail to log Insights events, be sure the event selector enables logging of the Insights event types you want configured for your trail. For more information about logging Insights events, see Logging Insights events in the CloudTrail User Guide. By default, trails created without specific event selectors are configured to log all read and write management events, and no data events.
When an event occurs in your account, CloudTrail evaluates the event selectors or advanced event selectors in all trails. For each trail, if the event matches any event selector, the trail processes and logs the event. If the event doesn't match any event selector, the trail doesn't log the event.
Example
-
You create an event selector for a trail and specify that you want write-only events.
-
The EC2
GetConsoleOutput
andRunInstances
API operations occur in your account. -
CloudTrail evaluates whether the events match your event selectors.
-
The
RunInstances
is a write-only event and it matches your event selector. The trail logs the event. -
The
GetConsoleOutput
is a read-only event that doesn't match your event selector. The trail doesn't log the event.
The PutEventSelectors
operation must be called from the Region in which the trail was created; otherwise, an InvalidHomeRegionException
exception is thrown.
You can configure up to five event selectors for each trail. For more information, see Logging management events, Logging data events, and Quotas in CloudTrail in the CloudTrail User Guide.
You can add advanced event selectors, and conditions for your advanced event selectors, up to a maximum of 500 values for all conditions and selectors on a trail. You can use either AdvancedEventSelectors
or EventSelectors
, but not both. If you apply AdvancedEventSelectors
to a trail, any existing EventSelectors
are overwritten. For more information about advanced event selectors, see Logging data events in the CloudTrail User Guide.
Service Reference:
Examples:
Calling the putEventSelectors operation
var params = {
TrailName: 'STRING_VALUE', /* required */
AdvancedEventSelectors: [
{
FieldSelectors: [ /* required */
{
Field: 'STRING_VALUE', /* required */
EndsWith: [
'STRING_VALUE',
/* more items */
],
Equals: [
'STRING_VALUE',
/* more items */
],
NotEndsWith: [
'STRING_VALUE',
/* more items */
],
NotEquals: [
'STRING_VALUE',
/* more items */
],
NotStartsWith: [
'STRING_VALUE',
/* more items */
],
StartsWith: [
'STRING_VALUE',
/* more items */
]
},
/* more items */
],
Name: 'STRING_VALUE'
},
/* more items */
],
EventSelectors: [
{
DataResources: [
{
Type: 'STRING_VALUE',
Values: [
'STRING_VALUE',
/* more items */
]
},
/* more items */
],
ExcludeManagementEventSources: [
'STRING_VALUE',
/* more items */
],
IncludeManagementEvents: true || false,
ReadWriteType: ReadOnly | WriteOnly | All
},
/* more items */
]
};
cloudtrail.putEventSelectors(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
TrailName
— (String
)Specifies the name of the trail or trail ARN. If you specify a trail name, the string must meet the following requirements:
-
Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
-
Start with a letter or number, and end with a letter or number
-
Be between 3 and 128 characters
-
Have no adjacent periods, underscores or dashes. Names like
my-_namespace
andmy--namespace
are not valid. -
Not be in IP address format (for example, 192.168.5.4)
If you specify a trail ARN, it must be in the following format.
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
-
EventSelectors
— (Array<map>
)Specifies the settings for your event selectors. You can configure up to five event selectors for a trail. You can use either
EventSelectors
orAdvancedEventSelectors
in aPutEventSelectors
request, but not both. If you applyEventSelectors
to a trail, any existingAdvancedEventSelectors
are overwritten.ReadWriteType
— (String
)Specify if you want your trail to log read-only events, write-only events, or all. For example, the EC2
GetConsoleOutput
is a read-only API operation andRunInstances
is a write-only API operation.By default, the value is
Possible values include:All
."ReadOnly"
"WriteOnly"
"All"
IncludeManagementEvents
— (Boolean
)Specify if you want your event selector to include management events for your trail.
For more information, see Management Events in the CloudTrail User Guide.
By default, the value is
true
.The first copy of management events is free. You are charged for additional copies of management events that you are logging on any subsequent trail in the same Region. For more information about CloudTrail pricing, see CloudTrail Pricing.
DataResources
— (Array<map>
)CloudTrail supports data event logging for Amazon S3 objects, Lambda functions, and Amazon DynamoDB tables with basic event selectors. You can specify up to 250 resources for an individual event selector, but the total number of data resources cannot exceed 250 across all event selectors in a trail. This limit does not apply if you configure resource logging for all data events.
For more information, see Data Events and Limits in CloudTrail in the CloudTrail User Guide.
Type
— (String
)The resource type in which you want to log data events. You can specify the following basic event selector resource types:
-
AWS::DynamoDB::Table
-
AWS::Lambda::Function
-
AWS::S3::Object
Additional resource types are available through advanced event selectors. For more information about these additional resource types, see AdvancedFieldSelector.
-
Values
— (Array<String>
)An array of Amazon Resource Name (ARN) strings or partial ARN strings for the specified resource type.
-
To log data events for all objects in all S3 buckets in your Amazon Web Services account, specify the prefix as
arn:aws:s3
.Note: This also enables logging of data event activity performed by any user or role in your Amazon Web Services account, even if that activity is performed on a bucket that belongs to another Amazon Web Services account. -
To log data events for all objects in an S3 bucket, specify the bucket and an empty object prefix such as
arn:aws:s3:::bucket-1/
. The trail logs data events for all objects in this S3 bucket. -
To log data events for specific objects, specify the S3 bucket and object prefix such as
arn:aws:s3:::bucket-1/example-images
. The trail logs data events for objects in this S3 bucket that match the prefix. -
To log data events for all Lambda functions in your Amazon Web Services account, specify the prefix as
arn:aws:lambda
.Note: This also enables logging ofInvoke
activity performed by any user or role in your Amazon Web Services account, even if that activity is performed on a function that belongs to another Amazon Web Services account. -
To log data events for a specific Lambda function, specify the function ARN.
Note: Lambda function ARNs are exact. For example, if you specify a function ARN arn:aws:lambda:us-west-2:111111111111:function:helloworld, data events will only be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld. They will not be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld2. -
To log data events for all DynamoDB tables in your Amazon Web Services account, specify the prefix as
arn:aws:dynamodb
.
-
ExcludeManagementEventSources
— (Array<String>
)An optional list of service event sources from which you do not want management events to be logged on your trail. In this release, the list can be empty (disables the filter), or it can filter out Key Management Service or Amazon RDS Data API events by containing
kms.amazonaws.com
orrdsdata.amazonaws.com
. By default,ExcludeManagementEventSources
is empty, and KMS and Amazon RDS Data API events are logged to your trail. You can exclude management event sources only in Regions that support the event source.
AdvancedEventSelectors
— (Array<map>
)Specifies the settings for advanced event selectors. You can add advanced event selectors, and conditions for your advanced event selectors, up to a maximum of 500 values for all conditions and selectors on a trail. You can use either
AdvancedEventSelectors
orEventSelectors
, but not both. If you applyAdvancedEventSelectors
to a trail, any existingEventSelectors
are overwritten. For more information about advanced event selectors, see Logging data events in the CloudTrail User Guide.Name
— (String
)An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets".
FieldSelectors
— required — (Array<map>
)Contains all selector statements in an advanced event selector.
Field
— required — (String
)A field in a CloudTrail event record on which to filter events to be logged. For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the field is used only for selecting events as filtering is not supported.
For CloudTrail management events, supported fields include
readOnly
,eventCategory
, andeventSource
.For CloudTrail data events, supported fields include
readOnly
,eventCategory
,eventName
,resources.type
, andresources.ARN
.For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the only supported field is
eventCategory
.-
readOnly
- Optional. Can be set toEquals
a value oftrue
orfalse
. If you do not add this field, CloudTrail logs bothread
andwrite
events. A value oftrue
logs onlyread
events. A value offalse
logs onlywrite
events. -
eventSource
- For filtering management events only. This can be set toNotEquals
kms.amazonaws.com
orNotEquals
rdsdata.amazonaws.com
. -
eventName
- Can use any operator. You can use it to filter in or filter out any data event logged to CloudTrail, such asPutBucket
orGetSnapshotBlock
. You can have multiple values for this field, separated by commas. -
eventCategory
- This is required and must be set toEquals
.-
For CloudTrail management events, the value must be
Management
. -
For CloudTrail data events, the value must be
Data
.
The following are used only for event data stores:
-
For CloudTrail Insights events, the value must be
Insight
. -
For Config configuration items, the value must be
ConfigurationItem
. -
For Audit Manager evidence, the value must be
Evidence
. -
For non-Amazon Web Services events, the value must be
ActivityAuditLog
.
-
-
resources.type
- This field is required for CloudTrail data events.resources.type
can only use theEquals
operator, and the value can be one of the following:-
AWS::DynamoDB::Table
-
AWS::Lambda::Function
-
AWS::S3::Object
-
AWS::AppConfig::Configuration
-
AWS::B2BI::Transformer
-
AWS::Bedrock::AgentAlias
-
AWS::Bedrock::KnowledgeBase
-
AWS::Cassandra::Table
-
AWS::CloudFront::KeyValueStore
-
AWS::CloudTrail::Channel
-
AWS::CodeWhisperer::Customization
-
AWS::CodeWhisperer::Profile
-
AWS::Cognito::IdentityPool
-
AWS::DynamoDB::Stream
-
AWS::EC2::Snapshot
-
AWS::EMRWAL::Workspace
-
AWS::FinSpace::Environment
-
AWS::Glue::Table
-
AWS::GreengrassV2::ComponentVersion
-
AWS::GreengrassV2::Deployment
-
AWS::GuardDuty::Detector
-
AWS::IoT::Certificate
-
AWS::IoT::Thing
-
AWS::IoTSiteWise::Asset
-
AWS::IoTSiteWise::TimeSeries
-
AWS::IoTTwinMaker::Entity
-
AWS::IoTTwinMaker::Workspace
-
AWS::KendraRanking::ExecutionPlan
-
AWS::KinesisVideo::Stream
-
AWS::ManagedBlockchain::Network
-
AWS::ManagedBlockchain::Node
-
AWS::MedicalImaging::Datastore
-
AWS::NeptuneGraph::Graph
-
AWS::PCAConnectorAD::Connector
-
AWS::QApps:QApp
-
AWS::QBusiness::Application
-
AWS::QBusiness::DataSource
-
AWS::QBusiness::Index
-
AWS::QBusiness::WebExperience
-
AWS::RDS::DBCluster
-
AWS::S3::AccessPoint
-
AWS::S3ObjectLambda::AccessPoint
-
AWS::S3Outposts::Object
-
AWS::SageMaker::Endpoint
-
AWS::SageMaker::ExperimentTrialComponent
-
AWS::SageMaker::FeatureGroup
-
AWS::ServiceDiscovery::Namespace
-
AWS::ServiceDiscovery::Service
-
AWS::SCN::Instance
-
AWS::SNS::PlatformEndpoint
-
AWS::SNS::Topic
-
AWS::SQS::Queue
-
AWS::SSM::ManagedNode
-
AWS::SSMMessages::ControlChannel
-
AWS::SWF::Domain
-
AWS::ThinClient::Device
-
AWS::ThinClient::Environment
-
AWS::Timestream::Database
-
AWS::Timestream::Table
-
AWS::VerifiedPermissions::PolicyStore
-
AWS::XRay::Trace
You can have only one
resources.type
field per selector. To log data events on more than one resource type, add another selector. -
-
resources.ARN
- You can use any operator withresources.ARN
, but if you useEquals
orNotEquals
, the value must exactly match the ARN of a valid resource of the type you've specified in the template as the value of resources.type.Note: You can't use theresources.ARN
field to filter resource types that do not have ARNs.The
resources.ARN
field can be set one of the following.If resources.type equals
AWS::S3::Object
, the ARN must be in one of the following formats. To log all data events for all objects in a specific S3 bucket, use theStartsWith
operator, and include only the bucket ARN as the matching value.The trailing slash is intentional; do not exclude it. Replace the text between less than and greater than symbols (<>) with resource-specific information.
-
arn:<partition>:s3:::<bucket_name>/
-
arn:<partition>:s3:::<bucket_name>/<object_path>/
When resources.type equals
AWS::DynamoDB::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>
When resources.type equals
AWS::Lambda::Function
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:lambda:<region>:<account_ID>:function:<function_name>
When resources.type equals
AWS::AppConfig::Configuration
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:appconfig:<region>:<account_ID>:application/<application_ID>/environment/<environment_ID>/configuration/<configuration_profile_ID>
When resources.type equals
AWS::B2BI::Transformer
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:b2bi:<region>:<account_ID>:transformer/<transformer_ID>
When resources.type equals
AWS::Bedrock::AgentAlias
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:agent-alias/<agent_ID>/<alias_ID>
When resources.type equals
AWS::Bedrock::KnowledgeBase
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:knowledge-base/<knowledge_base_ID>
When resources.type equals
AWS::Cassandra::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cassandra:<region>:<account_ID>:/keyspace/<keyspace_name>/table/<table_name>
When resources.type equals
AWS::CloudFront::KeyValueStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudfront:<region>:<account_ID>:key-value-store/<KVS_name>
When resources.type equals
AWS::CloudTrail::Channel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudtrail:<region>:<account_ID>:channel/<channel_UUID>
When resources.type equals
AWS::CodeWhisperer::Customization
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:customization/<customization_ID>
When resources.type equals
AWS::CodeWhisperer::Profile
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:profile/<profile_ID>
When resources.type equals
AWS::Cognito::IdentityPool
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cognito-identity:<region>:<account_ID>:identitypool/<identity_pool_ID>
When
resources.type
equalsAWS::DynamoDB::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>/stream/<date_time>
When
resources.type
equalsAWS::EC2::Snapshot
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ec2:<region>::snapshot/<snapshot_ID>
When
resources.type
equalsAWS::EMRWAL::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:emrwal:<region>:<account_ID>:workspace/<workspace_name>
When
resources.type
equalsAWS::FinSpace::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:finspace:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Glue::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:glue:<region>:<account_ID>:table/<database_name>/<table_name>
When
resources.type
equalsAWS::GreengrassV2::ComponentVersion
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:components/<component_name>
When
resources.type
equalsAWS::GreengrassV2::Deployment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:deployments/<deployment_ID
When
resources.type
equalsAWS::GuardDuty::Detector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:guardduty:<region>:<account_ID>:detector/<detector_ID>
When
resources.type
equalsAWS::IoT::Certificate
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:cert/<certificate_ID>
When
resources.type
equalsAWS::IoT::Thing
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:thing/<thing_ID>
When
resources.type
equalsAWS::IoTSiteWise::Asset
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:asset/<asset_ID>
When
resources.type
equalsAWS::IoTSiteWise::TimeSeries
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:timeseries/<timeseries_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Entity
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>/entity/<entity_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>
When
resources.type
equalsAWS::KendraRanking::ExecutionPlan
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kendra-ranking:<region>:<account_ID>:rescore-execution-plan/<rescore_execution_plan_ID>
When
resources.type
equalsAWS::KinesisVideo::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kinesisvideo:<region>:<account_ID>:stream/<stream_name>/<creation_time>
When
resources.type
equalsAWS::ManagedBlockchain::Network
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:::networks/<network_name>
When
resources.type
equalsAWS::ManagedBlockchain::Node
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:<region>:<account_ID>:nodes/<node_ID>
When
resources.type
equalsAWS::MedicalImaging::Datastore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:medical-imaging:<region>:<account_ID>:datastore/<data_store_ID>
When
resources.type
equalsAWS::NeptuneGraph::Graph
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:neptune-graph:<region>:<account_ID>:graph/<graph_ID>
When
resources.type
equalsAWS::PCAConnectorAD::Connector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:pca-connector-ad:<region>:<account_ID>:connector/<connector_ID>
When
resources.type
equalsAWS::QApps:QApp
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qapps:<region>:<account_ID>:application/<application_UUID>/qapp/<qapp_UUID>
When
resources.type
equalsAWS::QBusiness::Application
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>
When
resources.type
equalsAWS::QBusiness::DataSource
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>/data-source/<datasource_ID>
When
resources.type
equalsAWS::QBusiness::Index
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>
When
resources.type
equalsAWS::QBusiness::WebExperience
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/web-experience/<web_experience_ID>
When
resources.type
equalsAWS::RDS::DBCluster
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:rds:<region>:<account_ID>:cluster/<cluster_name>
When
resources.type
equalsAWS::S3::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats. To log events on all objects in an S3 access point, we recommend that you use only the access point ARN, don’t include the object path, and use theStartsWith
orNotStartsWith
operators.-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>
-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>/object/<object_path>
When
resources.type
equalsAWS::S3ObjectLambda::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-object-lambda:<region>:<account_ID>:accesspoint/<access_point_name>
When
resources.type
equalsAWS::S3Outposts::Object
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-outposts:<region>:<account_ID>:<object_path>
When
resources.type
equalsAWS::SageMaker::Endpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:endpoint/<endpoint_name>
When
resources.type
equalsAWS::SageMaker::ExperimentTrialComponent
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:experiment-trial-component/<experiment_trial_component_name>
When
resources.type
equalsAWS::SageMaker::FeatureGroup
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:feature-group/<feature_group_name>
When
resources.type
equalsAWS::SCN::Instance
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:scn:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Namespace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:namespace/<namespace_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Service
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:service/<service_ID>
When
resources.type
equalsAWS::SNS::PlatformEndpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:endpoint/<endpoint_type>/<endpoint_name>/<endpoint_ID>
When
resources.type
equalsAWS::SNS::Topic
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:<topic_name>
When
resources.type
equalsAWS::SQS::Queue
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sqs:<region>:<account_ID>:<queue_name>
When
resources.type
equalsAWS::SSM::ManagedNode
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats:-
arn:<partition>:ssm:<region>:<account_ID>:managed-instance/<instance_ID>
-
arn:<partition>:ec2:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::SSMMessages::ControlChannel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ssmmessages:<region>:<account_ID>:control-channel/<channel_ID>
When
resources.type
equalsAWS::SWF::Domain
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:swf:<region>:<account_ID>:domain/<domain_name>
When
resources.type
equalsAWS::ThinClient::Device
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:device/<device_ID>
When
resources.type
equalsAWS::ThinClient::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Timestream::Database
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>
When
resources.type
equalsAWS::Timestream::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>/table/<table_name>
When resources.type equals
AWS::VerifiedPermissions::PolicyStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:verifiedpermissions:<region>:<account_ID>:policy-store/<policy_store_UUID>
-
-
Equals
— (Array<String>
)An operator that includes events that match the exact value of the event record field specified as the value of
Field
. This is the only valid operator that you can use with thereadOnly
,eventCategory
, andresources.type
fields.StartsWith
— (Array<String>
)An operator that includes events that match the first few characters of the event record field specified as the value of
Field
.EndsWith
— (Array<String>
)An operator that includes events that match the last few characters of the event record field specified as the value of
Field
.NotEquals
— (Array<String>
)An operator that excludes events that match the exact value of the event record field specified as the value of
Field
.NotStartsWith
— (Array<String>
)An operator that excludes events that match the first few characters of the event record field specified as the value of
Field
.NotEndsWith
— (Array<String>
)An operator that excludes events that match the last few characters of the event record field specified as the value of
Field
.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:TrailARN
— (String
)Specifies the ARN of the trail that was updated with event selectors. The following is the format of a trail ARN.
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
EventSelectors
— (Array<map>
)Specifies the event selectors configured for your trail.
ReadWriteType
— (String
)Specify if you want your trail to log read-only events, write-only events, or all. For example, the EC2
GetConsoleOutput
is a read-only API operation andRunInstances
is a write-only API operation.By default, the value is
Possible values include:All
."ReadOnly"
"WriteOnly"
"All"
IncludeManagementEvents
— (Boolean
)Specify if you want your event selector to include management events for your trail.
For more information, see Management Events in the CloudTrail User Guide.
By default, the value is
true
.The first copy of management events is free. You are charged for additional copies of management events that you are logging on any subsequent trail in the same Region. For more information about CloudTrail pricing, see CloudTrail Pricing.
DataResources
— (Array<map>
)CloudTrail supports data event logging for Amazon S3 objects, Lambda functions, and Amazon DynamoDB tables with basic event selectors. You can specify up to 250 resources for an individual event selector, but the total number of data resources cannot exceed 250 across all event selectors in a trail. This limit does not apply if you configure resource logging for all data events.
For more information, see Data Events and Limits in CloudTrail in the CloudTrail User Guide.
Type
— (String
)The resource type in which you want to log data events. You can specify the following basic event selector resource types:
-
AWS::DynamoDB::Table
-
AWS::Lambda::Function
-
AWS::S3::Object
Additional resource types are available through advanced event selectors. For more information about these additional resource types, see AdvancedFieldSelector.
-
Values
— (Array<String>
)An array of Amazon Resource Name (ARN) strings or partial ARN strings for the specified resource type.
-
To log data events for all objects in all S3 buckets in your Amazon Web Services account, specify the prefix as
arn:aws:s3
.Note: This also enables logging of data event activity performed by any user or role in your Amazon Web Services account, even if that activity is performed on a bucket that belongs to another Amazon Web Services account. -
To log data events for all objects in an S3 bucket, specify the bucket and an empty object prefix such as
arn:aws:s3:::bucket-1/
. The trail logs data events for all objects in this S3 bucket. -
To log data events for specific objects, specify the S3 bucket and object prefix such as
arn:aws:s3:::bucket-1/example-images
. The trail logs data events for objects in this S3 bucket that match the prefix. -
To log data events for all Lambda functions in your Amazon Web Services account, specify the prefix as
arn:aws:lambda
.Note: This also enables logging ofInvoke
activity performed by any user or role in your Amazon Web Services account, even if that activity is performed on a function that belongs to another Amazon Web Services account. -
To log data events for a specific Lambda function, specify the function ARN.
Note: Lambda function ARNs are exact. For example, if you specify a function ARN arn:aws:lambda:us-west-2:111111111111:function:helloworld, data events will only be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld. They will not be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld2. -
To log data events for all DynamoDB tables in your Amazon Web Services account, specify the prefix as
arn:aws:dynamodb
.
-
ExcludeManagementEventSources
— (Array<String>
)An optional list of service event sources from which you do not want management events to be logged on your trail. In this release, the list can be empty (disables the filter), or it can filter out Key Management Service or Amazon RDS Data API events by containing
kms.amazonaws.com
orrdsdata.amazonaws.com
. By default,ExcludeManagementEventSources
is empty, and KMS and Amazon RDS Data API events are logged to your trail. You can exclude management event sources only in Regions that support the event source.
AdvancedEventSelectors
— (Array<map>
)Specifies the advanced event selectors configured for your trail.
Name
— (String
)An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets".
FieldSelectors
— required — (Array<map>
)Contains all selector statements in an advanced event selector.
Field
— required — (String
)A field in a CloudTrail event record on which to filter events to be logged. For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the field is used only for selecting events as filtering is not supported.
For CloudTrail management events, supported fields include
readOnly
,eventCategory
, andeventSource
.For CloudTrail data events, supported fields include
readOnly
,eventCategory
,eventName
,resources.type
, andresources.ARN
.For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the only supported field is
eventCategory
.-
readOnly
- Optional. Can be set toEquals
a value oftrue
orfalse
. If you do not add this field, CloudTrail logs bothread
andwrite
events. A value oftrue
logs onlyread
events. A value offalse
logs onlywrite
events. -
eventSource
- For filtering management events only. This can be set toNotEquals
kms.amazonaws.com
orNotEquals
rdsdata.amazonaws.com
. -
eventName
- Can use any operator. You can use it to filter in or filter out any data event logged to CloudTrail, such asPutBucket
orGetSnapshotBlock
. You can have multiple values for this field, separated by commas. -
eventCategory
- This is required and must be set toEquals
.-
For CloudTrail management events, the value must be
Management
. -
For CloudTrail data events, the value must be
Data
.
The following are used only for event data stores:
-
For CloudTrail Insights events, the value must be
Insight
. -
For Config configuration items, the value must be
ConfigurationItem
. -
For Audit Manager evidence, the value must be
Evidence
. -
For non-Amazon Web Services events, the value must be
ActivityAuditLog
.
-
-
resources.type
- This field is required for CloudTrail data events.resources.type
can only use theEquals
operator, and the value can be one of the following:-
AWS::DynamoDB::Table
-
AWS::Lambda::Function
-
AWS::S3::Object
-
AWS::AppConfig::Configuration
-
AWS::B2BI::Transformer
-
AWS::Bedrock::AgentAlias
-
AWS::Bedrock::KnowledgeBase
-
AWS::Cassandra::Table
-
AWS::CloudFront::KeyValueStore
-
AWS::CloudTrail::Channel
-
AWS::CodeWhisperer::Customization
-
AWS::CodeWhisperer::Profile
-
AWS::Cognito::IdentityPool
-
AWS::DynamoDB::Stream
-
AWS::EC2::Snapshot
-
AWS::EMRWAL::Workspace
-
AWS::FinSpace::Environment
-
AWS::Glue::Table
-
AWS::GreengrassV2::ComponentVersion
-
AWS::GreengrassV2::Deployment
-
AWS::GuardDuty::Detector
-
AWS::IoT::Certificate
-
AWS::IoT::Thing
-
AWS::IoTSiteWise::Asset
-
AWS::IoTSiteWise::TimeSeries
-
AWS::IoTTwinMaker::Entity
-
AWS::IoTTwinMaker::Workspace
-
AWS::KendraRanking::ExecutionPlan
-
AWS::KinesisVideo::Stream
-
AWS::ManagedBlockchain::Network
-
AWS::ManagedBlockchain::Node
-
AWS::MedicalImaging::Datastore
-
AWS::NeptuneGraph::Graph
-
AWS::PCAConnectorAD::Connector
-
AWS::QApps:QApp
-
AWS::QBusiness::Application
-
AWS::QBusiness::DataSource
-
AWS::QBusiness::Index
-
AWS::QBusiness::WebExperience
-
AWS::RDS::DBCluster
-
AWS::S3::AccessPoint
-
AWS::S3ObjectLambda::AccessPoint
-
AWS::S3Outposts::Object
-
AWS::SageMaker::Endpoint
-
AWS::SageMaker::ExperimentTrialComponent
-
AWS::SageMaker::FeatureGroup
-
AWS::ServiceDiscovery::Namespace
-
AWS::ServiceDiscovery::Service
-
AWS::SCN::Instance
-
AWS::SNS::PlatformEndpoint
-
AWS::SNS::Topic
-
AWS::SQS::Queue
-
AWS::SSM::ManagedNode
-
AWS::SSMMessages::ControlChannel
-
AWS::SWF::Domain
-
AWS::ThinClient::Device
-
AWS::ThinClient::Environment
-
AWS::Timestream::Database
-
AWS::Timestream::Table
-
AWS::VerifiedPermissions::PolicyStore
-
AWS::XRay::Trace
You can have only one
resources.type
field per selector. To log data events on more than one resource type, add another selector. -
-
resources.ARN
- You can use any operator withresources.ARN
, but if you useEquals
orNotEquals
, the value must exactly match the ARN of a valid resource of the type you've specified in the template as the value of resources.type.Note: You can't use theresources.ARN
field to filter resource types that do not have ARNs.The
resources.ARN
field can be set one of the following.If resources.type equals
AWS::S3::Object
, the ARN must be in one of the following formats. To log all data events for all objects in a specific S3 bucket, use theStartsWith
operator, and include only the bucket ARN as the matching value.The trailing slash is intentional; do not exclude it. Replace the text between less than and greater than symbols (<>) with resource-specific information.
-
arn:<partition>:s3:::<bucket_name>/
-
arn:<partition>:s3:::<bucket_name>/<object_path>/
When resources.type equals
AWS::DynamoDB::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>
When resources.type equals
AWS::Lambda::Function
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:lambda:<region>:<account_ID>:function:<function_name>
When resources.type equals
AWS::AppConfig::Configuration
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:appconfig:<region>:<account_ID>:application/<application_ID>/environment/<environment_ID>/configuration/<configuration_profile_ID>
When resources.type equals
AWS::B2BI::Transformer
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:b2bi:<region>:<account_ID>:transformer/<transformer_ID>
When resources.type equals
AWS::Bedrock::AgentAlias
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:agent-alias/<agent_ID>/<alias_ID>
When resources.type equals
AWS::Bedrock::KnowledgeBase
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:knowledge-base/<knowledge_base_ID>
When resources.type equals
AWS::Cassandra::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cassandra:<region>:<account_ID>:/keyspace/<keyspace_name>/table/<table_name>
When resources.type equals
AWS::CloudFront::KeyValueStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudfront:<region>:<account_ID>:key-value-store/<KVS_name>
When resources.type equals
AWS::CloudTrail::Channel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudtrail:<region>:<account_ID>:channel/<channel_UUID>
When resources.type equals
AWS::CodeWhisperer::Customization
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:customization/<customization_ID>
When resources.type equals
AWS::CodeWhisperer::Profile
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:profile/<profile_ID>
When resources.type equals
AWS::Cognito::IdentityPool
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cognito-identity:<region>:<account_ID>:identitypool/<identity_pool_ID>
When
resources.type
equalsAWS::DynamoDB::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>/stream/<date_time>
When
resources.type
equalsAWS::EC2::Snapshot
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ec2:<region>::snapshot/<snapshot_ID>
When
resources.type
equalsAWS::EMRWAL::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:emrwal:<region>:<account_ID>:workspace/<workspace_name>
When
resources.type
equalsAWS::FinSpace::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:finspace:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Glue::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:glue:<region>:<account_ID>:table/<database_name>/<table_name>
When
resources.type
equalsAWS::GreengrassV2::ComponentVersion
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:components/<component_name>
When
resources.type
equalsAWS::GreengrassV2::Deployment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:deployments/<deployment_ID
When
resources.type
equalsAWS::GuardDuty::Detector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:guardduty:<region>:<account_ID>:detector/<detector_ID>
When
resources.type
equalsAWS::IoT::Certificate
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:cert/<certificate_ID>
When
resources.type
equalsAWS::IoT::Thing
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:thing/<thing_ID>
When
resources.type
equalsAWS::IoTSiteWise::Asset
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:asset/<asset_ID>
When
resources.type
equalsAWS::IoTSiteWise::TimeSeries
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:timeseries/<timeseries_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Entity
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>/entity/<entity_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>
When
resources.type
equalsAWS::KendraRanking::ExecutionPlan
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kendra-ranking:<region>:<account_ID>:rescore-execution-plan/<rescore_execution_plan_ID>
When
resources.type
equalsAWS::KinesisVideo::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kinesisvideo:<region>:<account_ID>:stream/<stream_name>/<creation_time>
When
resources.type
equalsAWS::ManagedBlockchain::Network
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:::networks/<network_name>
When
resources.type
equalsAWS::ManagedBlockchain::Node
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:<region>:<account_ID>:nodes/<node_ID>
When
resources.type
equalsAWS::MedicalImaging::Datastore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:medical-imaging:<region>:<account_ID>:datastore/<data_store_ID>
When
resources.type
equalsAWS::NeptuneGraph::Graph
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:neptune-graph:<region>:<account_ID>:graph/<graph_ID>
When
resources.type
equalsAWS::PCAConnectorAD::Connector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:pca-connector-ad:<region>:<account_ID>:connector/<connector_ID>
When
resources.type
equalsAWS::QApps:QApp
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qapps:<region>:<account_ID>:application/<application_UUID>/qapp/<qapp_UUID>
When
resources.type
equalsAWS::QBusiness::Application
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>
When
resources.type
equalsAWS::QBusiness::DataSource
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>/data-source/<datasource_ID>
When
resources.type
equalsAWS::QBusiness::Index
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>
When
resources.type
equalsAWS::QBusiness::WebExperience
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/web-experience/<web_experience_ID>
When
resources.type
equalsAWS::RDS::DBCluster
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:rds:<region>:<account_ID>:cluster/<cluster_name>
When
resources.type
equalsAWS::S3::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats. To log events on all objects in an S3 access point, we recommend that you use only the access point ARN, don’t include the object path, and use theStartsWith
orNotStartsWith
operators.-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>
-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>/object/<object_path>
When
resources.type
equalsAWS::S3ObjectLambda::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-object-lambda:<region>:<account_ID>:accesspoint/<access_point_name>
When
resources.type
equalsAWS::S3Outposts::Object
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-outposts:<region>:<account_ID>:<object_path>
When
resources.type
equalsAWS::SageMaker::Endpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:endpoint/<endpoint_name>
When
resources.type
equalsAWS::SageMaker::ExperimentTrialComponent
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:experiment-trial-component/<experiment_trial_component_name>
When
resources.type
equalsAWS::SageMaker::FeatureGroup
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:feature-group/<feature_group_name>
When
resources.type
equalsAWS::SCN::Instance
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:scn:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Namespace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:namespace/<namespace_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Service
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:service/<service_ID>
When
resources.type
equalsAWS::SNS::PlatformEndpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:endpoint/<endpoint_type>/<endpoint_name>/<endpoint_ID>
When
resources.type
equalsAWS::SNS::Topic
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:<topic_name>
When
resources.type
equalsAWS::SQS::Queue
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sqs:<region>:<account_ID>:<queue_name>
When
resources.type
equalsAWS::SSM::ManagedNode
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats:-
arn:<partition>:ssm:<region>:<account_ID>:managed-instance/<instance_ID>
-
arn:<partition>:ec2:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::SSMMessages::ControlChannel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ssmmessages:<region>:<account_ID>:control-channel/<channel_ID>
When
resources.type
equalsAWS::SWF::Domain
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:swf:<region>:<account_ID>:domain/<domain_name>
When
resources.type
equalsAWS::ThinClient::Device
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:device/<device_ID>
When
resources.type
equalsAWS::ThinClient::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Timestream::Database
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>
When
resources.type
equalsAWS::Timestream::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>/table/<table_name>
When resources.type equals
AWS::VerifiedPermissions::PolicyStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:verifiedpermissions:<region>:<account_ID>:policy-store/<policy_store_UUID>
-
-
Equals
— (Array<String>
)An operator that includes events that match the exact value of the event record field specified as the value of
Field
. This is the only valid operator that you can use with thereadOnly
,eventCategory
, andresources.type
fields.StartsWith
— (Array<String>
)An operator that includes events that match the first few characters of the event record field specified as the value of
Field
.EndsWith
— (Array<String>
)An operator that includes events that match the last few characters of the event record field specified as the value of
Field
.NotEquals
— (Array<String>
)An operator that excludes events that match the exact value of the event record field specified as the value of
Field
.NotStartsWith
— (Array<String>
)An operator that excludes events that match the first few characters of the event record field specified as the value of
Field
.NotEndsWith
— (Array<String>
)An operator that excludes events that match the last few characters of the event record field specified as the value of
Field
.
-
(AWS.Response)
—
Returns:
putInsightSelectors(params = {}, callback) ⇒ AWS.Request
Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail or event data store. You also use PutInsightSelectors
to turn off Insights event logging, by passing an empty list of Insights types. The valid Insights event types are ApiErrorRateInsight
and ApiCallRateInsight
.
To enable Insights on an event data store, you must specify the ARNs (or ID suffix of the ARNs) for the source event data store (EventDataStore
) and the destination event data store (InsightsDestination
). The source event data store logs management events and enables Insights. The destination event data store logs Insights events based upon the management event activity of the source event data store. The source and destination event data stores must belong to the same Amazon Web Services account.
To log Insights events for a trail, you must specify the name (TrailName
) of the CloudTrail trail for which you want to change or add Insights selectors.
To log CloudTrail Insights events on API call volume, the trail or event data store must log write
management events. To log CloudTrail Insights events on API error rate, the trail or event data store must log read
or write
management events. You can call GetEventSelectors
on a trail to check whether the trail logs management events. You can call GetEventDataStore
on an event data store to check whether the event data store logs management events.
For more information, see Logging CloudTrail Insights events in the CloudTrail User Guide.
Service Reference:
Examples:
Calling the putInsightSelectors operation
var params = {
InsightSelectors: [ /* required */
{
InsightType: ApiCallRateInsight | ApiErrorRateInsight
},
/* more items */
],
EventDataStore: 'STRING_VALUE',
InsightsDestination: 'STRING_VALUE',
TrailName: 'STRING_VALUE'
};
cloudtrail.putInsightSelectors(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
TrailName
— (String
)The name of the CloudTrail trail for which you want to change or add Insights selectors.
You cannot use this parameter with the
EventDataStore
andInsightsDestination
parameters.InsightSelectors
— (Array<map>
)A JSON string that contains the Insights types you want to log on a trail or event data store.
ApiCallRateInsight
andApiErrorRateInsight
are valid Insight types.The
ApiCallRateInsight
Insights type analyzes write-only management API calls that are aggregated per minute against a baseline API call volume.The
ApiErrorRateInsight
Insights type analyzes management API calls that result in error codes. The error is shown if the API call is unsuccessful.InsightType
— (String
)The type of Insights events to log on a trail or event data store.
ApiCallRateInsight
andApiErrorRateInsight
are valid Insight types.The
ApiCallRateInsight
Insights type analyzes write-only management API calls that are aggregated per minute against a baseline API call volume.The
Possible values include:ApiErrorRateInsight
Insights type analyzes management API calls that result in error codes. The error is shown if the API call is unsuccessful."ApiCallRateInsight"
"ApiErrorRateInsight"
EventDataStore
— (String
)The ARN (or ID suffix of the ARN) of the source event data store for which you want to change or add Insights selectors. To enable Insights on an event data store, you must provide both the
EventDataStore
andInsightsDestination
parameters.You cannot use this parameter with the
TrailName
parameter.InsightsDestination
— (String
)The ARN (or ID suffix of the ARN) of the destination event data store that logs Insights events. To enable Insights on an event data store, you must provide both the
EventDataStore
andInsightsDestination
parameters.You cannot use this parameter with the
TrailName
parameter.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:TrailARN
— (String
)The Amazon Resource Name (ARN) of a trail for which you want to change or add Insights selectors.
InsightSelectors
— (Array<map>
)A JSON string that contains the Insights event types that you want to log on a trail or event data store. The valid Insights types are
ApiErrorRateInsight
andApiCallRateInsight
.InsightType
— (String
)The type of Insights events to log on a trail or event data store.
ApiCallRateInsight
andApiErrorRateInsight
are valid Insight types.The
ApiCallRateInsight
Insights type analyzes write-only management API calls that are aggregated per minute against a baseline API call volume.The
Possible values include:ApiErrorRateInsight
Insights type analyzes management API calls that result in error codes. The error is shown if the API call is unsuccessful."ApiCallRateInsight"
"ApiErrorRateInsight"
EventDataStoreArn
— (String
)The Amazon Resource Name (ARN) of the source event data store for which you want to change or add Insights selectors.
InsightsDestination
— (String
)The ARN of the destination event data store that logs Insights events.
-
(AWS.Response)
—
Returns:
putResourcePolicy(params = {}, callback) ⇒ AWS.Request
Attaches a resource-based permission policy to a CloudTrail channel that is used for an integration with an event source outside of Amazon Web Services. For more information about resource-based policies, see CloudTrail resource-based policy examples in the CloudTrail User Guide.
Service Reference:
Examples:
Calling the putResourcePolicy operation
var params = {
ResourceArn: 'STRING_VALUE', /* required */
ResourcePolicy: 'STRING_VALUE' /* required */
};
cloudtrail.putResourcePolicy(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ResourceArn
— (String
)The Amazon Resource Name (ARN) of the CloudTrail channel attached to the resource-based policy. The following is the format of a resource ARN:
arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel
.ResourcePolicy
— (String
)A JSON-formatted string for an Amazon Web Services resource-based policy.
The following are requirements for the resource policy:
-
Contains only one action: cloudtrail-data:PutAuditEvents
-
Contains at least one statement. The policy can have a maximum of 20 statements.
-
Each statement contains at least one principal. A statement can have a maximum of 50 principals.
-
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ResourceArn
— (String
)The Amazon Resource Name (ARN) of the CloudTrail channel attached to the resource-based policy.
ResourcePolicy
— (String
)The JSON-formatted string of the Amazon Web Services resource-based policy attached to the CloudTrail channel.
-
(AWS.Response)
—
Returns:
registerOrganizationDelegatedAdmin(params = {}, callback) ⇒ AWS.Request
Registers an organization’s member account as the CloudTrail delegated administrator.
Service Reference:
Examples:
Calling the registerOrganizationDelegatedAdmin operation
var params = {
MemberAccountId: 'STRING_VALUE' /* required */
};
cloudtrail.registerOrganizationDelegatedAdmin(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
MemberAccountId
— (String
)An organization member account ID that you want to designate as a delegated administrator.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
removeTags(params = {}, callback) ⇒ AWS.Request
Removes the specified tags from a trail, event data store, or channel.
Service Reference:
Examples:
Calling the removeTags operation
var params = {
ResourceId: 'STRING_VALUE', /* required */
TagsList: [ /* required */
{
Key: 'STRING_VALUE', /* required */
Value: 'STRING_VALUE'
},
/* more items */
]
};
cloudtrail.removeTags(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ResourceId
— (String
)Specifies the ARN of the trail, event data store, or channel from which tags should be removed.
Example trail ARN format:
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
Example event data store ARN format:
arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
Example channel ARN format:
arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
TagsList
— (Array<map>
)Specifies a list of tags to be removed.
Key
— required — (String
)The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.
Value
— (String
)The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
restoreEventDataStore(params = {}, callback) ⇒ AWS.Request
Restores a deleted event data store specified by EventDataStore
, which accepts an event data store ARN. You can only restore a deleted event data store within the seven-day wait period after deletion. Restoring an event data store can take several minutes, depending on the size of the event data store.
Service Reference:
Examples:
Calling the restoreEventDataStore operation
var params = {
EventDataStore: 'STRING_VALUE' /* required */
};
cloudtrail.restoreEventDataStore(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
EventDataStore
— (String
)The ARN (or the ID suffix of the ARN) of the event data store that you want to restore.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:EventDataStoreArn
— (String
)The event data store ARN.
Name
— (String
)The name of the event data store.
Status
— (String
)The status of the event data store.
Possible values include:"CREATED"
"ENABLED"
"PENDING_DELETION"
"STARTING_INGESTION"
"STOPPING_INGESTION"
"STOPPED_INGESTION"
AdvancedEventSelectors
— (Array<map>
)The advanced event selectors that were used to select events.
Name
— (String
)An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets".
FieldSelectors
— required — (Array<map>
)Contains all selector statements in an advanced event selector.
Field
— required — (String
)A field in a CloudTrail event record on which to filter events to be logged. For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the field is used only for selecting events as filtering is not supported.
For CloudTrail management events, supported fields include
readOnly
,eventCategory
, andeventSource
.For CloudTrail data events, supported fields include
readOnly
,eventCategory
,eventName
,resources.type
, andresources.ARN
.For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the only supported field is
eventCategory
.-
readOnly
- Optional. Can be set toEquals
a value oftrue
orfalse
. If you do not add this field, CloudTrail logs bothread
andwrite
events. A value oftrue
logs onlyread
events. A value offalse
logs onlywrite
events. -
eventSource
- For filtering management events only. This can be set toNotEquals
kms.amazonaws.com
orNotEquals
rdsdata.amazonaws.com
. -
eventName
- Can use any operator. You can use it to filter in or filter out any data event logged to CloudTrail, such asPutBucket
orGetSnapshotBlock
. You can have multiple values for this field, separated by commas. -
eventCategory
- This is required and must be set toEquals
.-
For CloudTrail management events, the value must be
Management
. -
For CloudTrail data events, the value must be
Data
.
The following are used only for event data stores:
-
For CloudTrail Insights events, the value must be
Insight
. -
For Config configuration items, the value must be
ConfigurationItem
. -
For Audit Manager evidence, the value must be
Evidence
. -
For non-Amazon Web Services events, the value must be
ActivityAuditLog
.
-
-
resources.type
- This field is required for CloudTrail data events.resources.type
can only use theEquals
operator, and the value can be one of the following:-
AWS::DynamoDB::Table
-
AWS::Lambda::Function
-
AWS::S3::Object
-
AWS::AppConfig::Configuration
-
AWS::B2BI::Transformer
-
AWS::Bedrock::AgentAlias
-
AWS::Bedrock::KnowledgeBase
-
AWS::Cassandra::Table
-
AWS::CloudFront::KeyValueStore
-
AWS::CloudTrail::Channel
-
AWS::CodeWhisperer::Customization
-
AWS::CodeWhisperer::Profile
-
AWS::Cognito::IdentityPool
-
AWS::DynamoDB::Stream
-
AWS::EC2::Snapshot
-
AWS::EMRWAL::Workspace
-
AWS::FinSpace::Environment
-
AWS::Glue::Table
-
AWS::GreengrassV2::ComponentVersion
-
AWS::GreengrassV2::Deployment
-
AWS::GuardDuty::Detector
-
AWS::IoT::Certificate
-
AWS::IoT::Thing
-
AWS::IoTSiteWise::Asset
-
AWS::IoTSiteWise::TimeSeries
-
AWS::IoTTwinMaker::Entity
-
AWS::IoTTwinMaker::Workspace
-
AWS::KendraRanking::ExecutionPlan
-
AWS::KinesisVideo::Stream
-
AWS::ManagedBlockchain::Network
-
AWS::ManagedBlockchain::Node
-
AWS::MedicalImaging::Datastore
-
AWS::NeptuneGraph::Graph
-
AWS::PCAConnectorAD::Connector
-
AWS::QApps:QApp
-
AWS::QBusiness::Application
-
AWS::QBusiness::DataSource
-
AWS::QBusiness::Index
-
AWS::QBusiness::WebExperience
-
AWS::RDS::DBCluster
-
AWS::S3::AccessPoint
-
AWS::S3ObjectLambda::AccessPoint
-
AWS::S3Outposts::Object
-
AWS::SageMaker::Endpoint
-
AWS::SageMaker::ExperimentTrialComponent
-
AWS::SageMaker::FeatureGroup
-
AWS::ServiceDiscovery::Namespace
-
AWS::ServiceDiscovery::Service
-
AWS::SCN::Instance
-
AWS::SNS::PlatformEndpoint
-
AWS::SNS::Topic
-
AWS::SQS::Queue
-
AWS::SSM::ManagedNode
-
AWS::SSMMessages::ControlChannel
-
AWS::SWF::Domain
-
AWS::ThinClient::Device
-
AWS::ThinClient::Environment
-
AWS::Timestream::Database
-
AWS::Timestream::Table
-
AWS::VerifiedPermissions::PolicyStore
-
AWS::XRay::Trace
You can have only one
resources.type
field per selector. To log data events on more than one resource type, add another selector. -
-
resources.ARN
- You can use any operator withresources.ARN
, but if you useEquals
orNotEquals
, the value must exactly match the ARN of a valid resource of the type you've specified in the template as the value of resources.type.Note: You can't use theresources.ARN
field to filter resource types that do not have ARNs.The
resources.ARN
field can be set one of the following.If resources.type equals
AWS::S3::Object
, the ARN must be in one of the following formats. To log all data events for all objects in a specific S3 bucket, use theStartsWith
operator, and include only the bucket ARN as the matching value.The trailing slash is intentional; do not exclude it. Replace the text between less than and greater than symbols (<>) with resource-specific information.
-
arn:<partition>:s3:::<bucket_name>/
-
arn:<partition>:s3:::<bucket_name>/<object_path>/
When resources.type equals
AWS::DynamoDB::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>
When resources.type equals
AWS::Lambda::Function
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:lambda:<region>:<account_ID>:function:<function_name>
When resources.type equals
AWS::AppConfig::Configuration
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:appconfig:<region>:<account_ID>:application/<application_ID>/environment/<environment_ID>/configuration/<configuration_profile_ID>
When resources.type equals
AWS::B2BI::Transformer
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:b2bi:<region>:<account_ID>:transformer/<transformer_ID>
When resources.type equals
AWS::Bedrock::AgentAlias
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:agent-alias/<agent_ID>/<alias_ID>
When resources.type equals
AWS::Bedrock::KnowledgeBase
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:knowledge-base/<knowledge_base_ID>
When resources.type equals
AWS::Cassandra::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cassandra:<region>:<account_ID>:/keyspace/<keyspace_name>/table/<table_name>
When resources.type equals
AWS::CloudFront::KeyValueStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudfront:<region>:<account_ID>:key-value-store/<KVS_name>
When resources.type equals
AWS::CloudTrail::Channel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudtrail:<region>:<account_ID>:channel/<channel_UUID>
When resources.type equals
AWS::CodeWhisperer::Customization
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:customization/<customization_ID>
When resources.type equals
AWS::CodeWhisperer::Profile
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:profile/<profile_ID>
When resources.type equals
AWS::Cognito::IdentityPool
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cognito-identity:<region>:<account_ID>:identitypool/<identity_pool_ID>
When
resources.type
equalsAWS::DynamoDB::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>/stream/<date_time>
When
resources.type
equalsAWS::EC2::Snapshot
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ec2:<region>::snapshot/<snapshot_ID>
When
resources.type
equalsAWS::EMRWAL::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:emrwal:<region>:<account_ID>:workspace/<workspace_name>
When
resources.type
equalsAWS::FinSpace::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:finspace:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Glue::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:glue:<region>:<account_ID>:table/<database_name>/<table_name>
When
resources.type
equalsAWS::GreengrassV2::ComponentVersion
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:components/<component_name>
When
resources.type
equalsAWS::GreengrassV2::Deployment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:deployments/<deployment_ID
When
resources.type
equalsAWS::GuardDuty::Detector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:guardduty:<region>:<account_ID>:detector/<detector_ID>
When
resources.type
equalsAWS::IoT::Certificate
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:cert/<certificate_ID>
When
resources.type
equalsAWS::IoT::Thing
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:thing/<thing_ID>
When
resources.type
equalsAWS::IoTSiteWise::Asset
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:asset/<asset_ID>
When
resources.type
equalsAWS::IoTSiteWise::TimeSeries
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:timeseries/<timeseries_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Entity
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>/entity/<entity_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>
When
resources.type
equalsAWS::KendraRanking::ExecutionPlan
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kendra-ranking:<region>:<account_ID>:rescore-execution-plan/<rescore_execution_plan_ID>
When
resources.type
equalsAWS::KinesisVideo::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kinesisvideo:<region>:<account_ID>:stream/<stream_name>/<creation_time>
When
resources.type
equalsAWS::ManagedBlockchain::Network
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:::networks/<network_name>
When
resources.type
equalsAWS::ManagedBlockchain::Node
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:<region>:<account_ID>:nodes/<node_ID>
When
resources.type
equalsAWS::MedicalImaging::Datastore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:medical-imaging:<region>:<account_ID>:datastore/<data_store_ID>
When
resources.type
equalsAWS::NeptuneGraph::Graph
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:neptune-graph:<region>:<account_ID>:graph/<graph_ID>
When
resources.type
equalsAWS::PCAConnectorAD::Connector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:pca-connector-ad:<region>:<account_ID>:connector/<connector_ID>
When
resources.type
equalsAWS::QApps:QApp
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qapps:<region>:<account_ID>:application/<application_UUID>/qapp/<qapp_UUID>
When
resources.type
equalsAWS::QBusiness::Application
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>
When
resources.type
equalsAWS::QBusiness::DataSource
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>/data-source/<datasource_ID>
When
resources.type
equalsAWS::QBusiness::Index
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>
When
resources.type
equalsAWS::QBusiness::WebExperience
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/web-experience/<web_experience_ID>
When
resources.type
equalsAWS::RDS::DBCluster
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:rds:<region>:<account_ID>:cluster/<cluster_name>
When
resources.type
equalsAWS::S3::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats. To log events on all objects in an S3 access point, we recommend that you use only the access point ARN, don’t include the object path, and use theStartsWith
orNotStartsWith
operators.-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>
-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>/object/<object_path>
When
resources.type
equalsAWS::S3ObjectLambda::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-object-lambda:<region>:<account_ID>:accesspoint/<access_point_name>
When
resources.type
equalsAWS::S3Outposts::Object
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-outposts:<region>:<account_ID>:<object_path>
When
resources.type
equalsAWS::SageMaker::Endpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:endpoint/<endpoint_name>
When
resources.type
equalsAWS::SageMaker::ExperimentTrialComponent
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:experiment-trial-component/<experiment_trial_component_name>
When
resources.type
equalsAWS::SageMaker::FeatureGroup
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:feature-group/<feature_group_name>
When
resources.type
equalsAWS::SCN::Instance
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:scn:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Namespace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:namespace/<namespace_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Service
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:service/<service_ID>
When
resources.type
equalsAWS::SNS::PlatformEndpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:endpoint/<endpoint_type>/<endpoint_name>/<endpoint_ID>
When
resources.type
equalsAWS::SNS::Topic
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:<topic_name>
When
resources.type
equalsAWS::SQS::Queue
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sqs:<region>:<account_ID>:<queue_name>
When
resources.type
equalsAWS::SSM::ManagedNode
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats:-
arn:<partition>:ssm:<region>:<account_ID>:managed-instance/<instance_ID>
-
arn:<partition>:ec2:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::SSMMessages::ControlChannel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ssmmessages:<region>:<account_ID>:control-channel/<channel_ID>
When
resources.type
equalsAWS::SWF::Domain
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:swf:<region>:<account_ID>:domain/<domain_name>
When
resources.type
equalsAWS::ThinClient::Device
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:device/<device_ID>
When
resources.type
equalsAWS::ThinClient::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Timestream::Database
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>
When
resources.type
equalsAWS::Timestream::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>/table/<table_name>
When resources.type equals
AWS::VerifiedPermissions::PolicyStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:verifiedpermissions:<region>:<account_ID>:policy-store/<policy_store_UUID>
-
-
Equals
— (Array<String>
)An operator that includes events that match the exact value of the event record field specified as the value of
Field
. This is the only valid operator that you can use with thereadOnly
,eventCategory
, andresources.type
fields.StartsWith
— (Array<String>
)An operator that includes events that match the first few characters of the event record field specified as the value of
Field
.EndsWith
— (Array<String>
)An operator that includes events that match the last few characters of the event record field specified as the value of
Field
.NotEquals
— (Array<String>
)An operator that excludes events that match the exact value of the event record field specified as the value of
Field
.NotStartsWith
— (Array<String>
)An operator that excludes events that match the first few characters of the event record field specified as the value of
Field
.NotEndsWith
— (Array<String>
)An operator that excludes events that match the last few characters of the event record field specified as the value of
Field
.
MultiRegionEnabled
— (Boolean
)Indicates whether the event data store is collecting events from all Regions, or only from the Region in which the event data store was created.
OrganizationEnabled
— (Boolean
)Indicates whether an event data store is collecting logged events for an organization in Organizations.
RetentionPeriod
— (Integer
)The retention period, in days.
TerminationProtectionEnabled
— (Boolean
)Indicates that termination protection is enabled and the event data store cannot be automatically deleted.
CreatedTimestamp
— (Date
)The timestamp of an event data store's creation.
UpdatedTimestamp
— (Date
)The timestamp that shows when an event data store was updated, if applicable.
UpdatedTimestamp
is always either the same or newer than the time shown inCreatedTimestamp
.KmsKeyId
— (String
)Specifies the KMS key ID that encrypts the events delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.
arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
BillingMode
— (String
)The billing mode for the event data store.
Possible values include:"EXTENDABLE_RETENTION_PRICING"
"FIXED_RETENTION_PRICING"
-
(AWS.Response)
—
Returns:
startEventDataStoreIngestion(params = {}, callback) ⇒ AWS.Request
Starts the ingestion of live events on an event data store specified as either an ARN or the ID portion of the ARN. To start ingestion, the event data store Status
must be STOPPED_INGESTION
and the eventCategory
must be Management
, Data
, or ConfigurationItem
.
Service Reference:
Examples:
Calling the startEventDataStoreIngestion operation
var params = {
EventDataStore: 'STRING_VALUE' /* required */
};
cloudtrail.startEventDataStoreIngestion(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
EventDataStore
— (String
)The ARN (or ID suffix of the ARN) of the event data store for which you want to start ingestion.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
startImport(params = {}, callback) ⇒ AWS.Request
Starts an import of logged trail events from a source S3 bucket to a destination event data store. By default, CloudTrail only imports events contained in the S3 bucket's CloudTrail
prefix and the prefixes inside the CloudTrail
prefix, and does not check prefixes for other Amazon Web Services services. If you want to import CloudTrail events contained in another prefix, you must include the prefix in the S3LocationUri
. For more considerations about importing trail events, see Considerations for copying trail events in the CloudTrail User Guide.
When you start a new import, the Destinations
and ImportSource
parameters are required. Before starting a new import, disable any access control lists (ACLs) attached to the source S3 bucket. For more information about disabling ACLs, see Controlling ownership of objects and disabling ACLs for your bucket.
When you retry an import, the ImportID
parameter is required.
Service Reference:
Examples:
Calling the startImport operation
var params = {
Destinations: [
'STRING_VALUE',
/* more items */
],
EndEventTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
ImportId: 'STRING_VALUE',
ImportSource: {
S3: { /* required */
S3BucketAccessRoleArn: 'STRING_VALUE', /* required */
S3BucketRegion: 'STRING_VALUE', /* required */
S3LocationUri: 'STRING_VALUE' /* required */
}
},
StartEventTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
cloudtrail.startImport(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
Destinations
— (Array<String>
)The ARN of the destination event data store. Use this parameter for a new import.
ImportSource
— (map
)The source S3 bucket for the import. Use this parameter for a new import.
S3
— required — (map
)The source S3 bucket.
S3LocationUri
— required — (String
)The URI for the source S3 bucket.
S3BucketRegion
— required — (String
)The Region associated with the source S3 bucket.
S3BucketAccessRoleArn
— required — (String
)The IAM ARN role used to access the source S3 bucket.
StartEventTime
— (Date
)Use with
EndEventTime
to bound aStartImport
request, and limit imported trail events to only those events logged within a specified time period. When you specify a time range, CloudTrail checks the prefix and log file names to verify the names contain a date between the specifiedStartEventTime
andEndEventTime
before attempting to import events.EndEventTime
— (Date
)Use with
StartEventTime
to bound aStartImport
request, and limit imported trail events to only those events logged within a specified time period. When you specify a time range, CloudTrail checks the prefix and log file names to verify the names contain a date between the specifiedStartEventTime
andEndEventTime
before attempting to import events.ImportId
— (String
)The ID of the import. Use this parameter when you are retrying an import.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ImportId
— (String
)The ID of the import.
Destinations
— (Array<String>
)The ARN of the destination event data store.
ImportSource
— (map
)The source S3 bucket for the import.
S3
— required — (map
)The source S3 bucket.
S3LocationUri
— required — (String
)The URI for the source S3 bucket.
S3BucketRegion
— required — (String
)The Region associated with the source S3 bucket.
S3BucketAccessRoleArn
— required — (String
)The IAM ARN role used to access the source S3 bucket.
StartEventTime
— (Date
)Used with
EndEventTime
to bound aStartImport
request, and limit imported trail events to only those events logged within a specified time period.EndEventTime
— (Date
)Used with
StartEventTime
to bound aStartImport
request, and limit imported trail events to only those events logged within a specified time period.ImportStatus
— (String
)Shows the status of the import after a
Possible values include:StartImport
request. An import finishes with a status ofCOMPLETED
if there were no failures, orFAILED
if there were failures."INITIALIZING"
"IN_PROGRESS"
"FAILED"
"STOPPED"
"COMPLETED"
CreatedTimestamp
— (Date
)The timestamp for the import's creation.
UpdatedTimestamp
— (Date
)The timestamp of the import's last update, if applicable.
-
(AWS.Response)
—
Returns:
startLogging(params = {}, callback) ⇒ AWS.Request
Starts the recording of Amazon Web Services 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.
Service Reference:
Examples:
Calling the startLogging operation
var params = {
Name: 'STRING_VALUE' /* required */
};
cloudtrail.startLogging(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)Specifies the name or the CloudTrail ARN of the trail for which CloudTrail logs Amazon Web Services API calls. The following is the format of a trail ARN.
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
startQuery(params = {}, callback) ⇒ AWS.Request
Starts a CloudTrail Lake query. Use the QueryStatement
parameter to provide your SQL query, enclosed in single quotation marks. Use the optional DeliveryS3Uri
parameter to deliver the query results to an S3 bucket.
StartQuery
requires you specify either the QueryStatement
parameter, or a QueryAlias
and any QueryParameters
. In the current release, the QueryAlias
and QueryParameters
parameters are used only for the queries that populate the CloudTrail Lake dashboards.
Service Reference:
Examples:
Calling the startQuery operation
var params = {
DeliveryS3Uri: 'STRING_VALUE',
QueryAlias: 'STRING_VALUE',
QueryParameters: [
'STRING_VALUE',
/* more items */
],
QueryStatement: 'STRING_VALUE'
};
cloudtrail.startQuery(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
QueryStatement
— (String
)The SQL code of your query.
DeliveryS3Uri
— (String
)The URI for the S3 bucket where CloudTrail delivers the query results.
QueryAlias
— (String
)The alias that identifies a query template.
QueryParameters
— (Array<String>
)The query parameters for the specified
QueryAlias
.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:QueryId
— (String
)The ID of the started query.
-
(AWS.Response)
—
Returns:
stopEventDataStoreIngestion(params = {}, callback) ⇒ AWS.Request
Stops the ingestion of live events on an event data store specified as either an ARN or the ID portion of the ARN. To stop ingestion, the event data store Status
must be ENABLED
and the eventCategory
must be Management
, Data
, or ConfigurationItem
.
Service Reference:
Examples:
Calling the stopEventDataStoreIngestion operation
var params = {
EventDataStore: 'STRING_VALUE' /* required */
};
cloudtrail.stopEventDataStoreIngestion(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
EventDataStore
— (String
)The ARN (or ID suffix of the ARN) of the event data store for which you want to stop ingestion.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
stopImport(params = {}, callback) ⇒ AWS.Request
Stops a specified import.
Service Reference:
Examples:
Calling the stopImport operation
var params = {
ImportId: 'STRING_VALUE' /* required */
};
cloudtrail.stopImport(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ImportId
— (String
)The ID of the import.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ImportId
— (String
)The ID for the import.
ImportSource
— (map
)The source S3 bucket for the import.
S3
— required — (map
)The source S3 bucket.
S3LocationUri
— required — (String
)The URI for the source S3 bucket.
S3BucketRegion
— required — (String
)The Region associated with the source S3 bucket.
S3BucketAccessRoleArn
— required — (String
)The IAM ARN role used to access the source S3 bucket.
Destinations
— (Array<String>
)The ARN of the destination event data store.
ImportStatus
— (String
)The status of the import.
Possible values include:"INITIALIZING"
"IN_PROGRESS"
"FAILED"
"STOPPED"
"COMPLETED"
CreatedTimestamp
— (Date
)The timestamp of the import's creation.
UpdatedTimestamp
— (Date
)The timestamp of the import's last update.
StartEventTime
— (Date
)Used with
EndEventTime
to bound aStartImport
request, and limit imported trail events to only those events logged within a specified time period.EndEventTime
— (Date
)Used with
StartEventTime
to bound aStartImport
request, and limit imported trail events to only those events logged within a specified time period.ImportStatistics
— (map
)Returns information on the stopped import.
PrefixesFound
— (Integer
)The number of S3 prefixes found for the import.
PrefixesCompleted
— (Integer
)The number of S3 prefixes that completed import.
FilesCompleted
— (Integer
)The number of log files that completed import.
EventsCompleted
— (Integer
)The number of trail events imported into the event data store.
FailedEntries
— (Integer
)The number of failed entries.
-
(AWS.Response)
—
Returns:
stopLogging(params = {}, callback) ⇒ AWS.Request
Suspends the recording of Amazon Web Services 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.
Service Reference:
Examples:
Calling the stopLogging operation
var params = {
Name: 'STRING_VALUE' /* required */
};
cloudtrail.stopLogging(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)Specifies the name or the CloudTrail ARN of the trail for which CloudTrail will stop logging Amazon Web Services API calls. The following is the format of a trail ARN.
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
updateChannel(params = {}, callback) ⇒ AWS.Request
Updates a channel specified by a required channel ARN or UUID.
Service Reference:
Examples:
Calling the updateChannel operation
var params = {
Channel: 'STRING_VALUE', /* required */
Destinations: [
{
Location: 'STRING_VALUE', /* required */
Type: EVENT_DATA_STORE | AWS_SERVICE /* required */
},
/* more items */
],
Name: 'STRING_VALUE'
};
cloudtrail.updateChannel(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
Channel
— (String
)The ARN or ID (the ARN suffix) of the channel that you want to update.
Destinations
— (Array<map>
)The ARNs of event data stores that you want to log events arriving through the channel.
Type
— required — (String
)The type of destination for events arriving from a channel. For channels used for a CloudTrail Lake integration, the value is
Possible values include:EVENT_DATA_STORE
. For service-linked channels, the value isAWS_SERVICE
."EVENT_DATA_STORE"
"AWS_SERVICE"
Location
— required — (String
)For channels used for a CloudTrail Lake integration, the location is the ARN of an event data store that receives events from a channel. For service-linked channels, the location is the name of the Amazon Web Services service.
Name
— (String
)Changes the name of the channel.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ChannelArn
— (String
)The ARN of the channel that was updated.
Name
— (String
)The name of the channel that was updated.
Source
— (String
)The event source of the channel that was updated.
Destinations
— (Array<map>
)The event data stores that log events arriving through the channel.
Type
— required — (String
)The type of destination for events arriving from a channel. For channels used for a CloudTrail Lake integration, the value is
Possible values include:EVENT_DATA_STORE
. For service-linked channels, the value isAWS_SERVICE
."EVENT_DATA_STORE"
"AWS_SERVICE"
Location
— required — (String
)For channels used for a CloudTrail Lake integration, the location is the ARN of an event data store that receives events from a channel. For service-linked channels, the location is the name of the Amazon Web Services service.
-
(AWS.Response)
—
Returns:
updateEventDataStore(params = {}, callback) ⇒ AWS.Request
Updates an event data store. The required EventDataStore
value is an ARN or the ID portion of the ARN. Other parameters are optional, but at least one optional parameter must be specified, or CloudTrail throws an error. RetentionPeriod
is in days, and valid values are integers between 7 and 3653 if the BillingMode
is set to EXTENDABLE_RETENTION_PRICING
, or between 7 and 2557 if BillingMode
is set to FIXED_RETENTION_PRICING
. By default, TerminationProtection
is enabled.
For event data stores for CloudTrail events, AdvancedEventSelectors
includes or excludes management or data events in your event data store. For more information about AdvancedEventSelectors
, see AdvancedEventSelectors.
For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or non-Amazon Web Services events, AdvancedEventSelectors
includes events of that type in your event data store.
Service Reference:
Examples:
Calling the updateEventDataStore operation
var params = {
EventDataStore: 'STRING_VALUE', /* required */
AdvancedEventSelectors: [
{
FieldSelectors: [ /* required */
{
Field: 'STRING_VALUE', /* required */
EndsWith: [
'STRING_VALUE',
/* more items */
],
Equals: [
'STRING_VALUE',
/* more items */
],
NotEndsWith: [
'STRING_VALUE',
/* more items */
],
NotEquals: [
'STRING_VALUE',
/* more items */
],
NotStartsWith: [
'STRING_VALUE',
/* more items */
],
StartsWith: [
'STRING_VALUE',
/* more items */
]
},
/* more items */
],
Name: 'STRING_VALUE'
},
/* more items */
],
BillingMode: EXTENDABLE_RETENTION_PRICING | FIXED_RETENTION_PRICING,
KmsKeyId: 'STRING_VALUE',
MultiRegionEnabled: true || false,
Name: 'STRING_VALUE',
OrganizationEnabled: true || false,
RetentionPeriod: 'NUMBER_VALUE',
TerminationProtectionEnabled: true || false
};
cloudtrail.updateEventDataStore(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
EventDataStore
— (String
)The ARN (or the ID suffix of the ARN) of the event data store that you want to update.
Name
— (String
)The event data store name.
AdvancedEventSelectors
— (Array<map>
)The advanced event selectors used to select events for the event data store. You can configure up to five advanced event selectors for each event data store.
Name
— (String
)An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets".
FieldSelectors
— required — (Array<map>
)Contains all selector statements in an advanced event selector.
Field
— required — (String
)A field in a CloudTrail event record on which to filter events to be logged. For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the field is used only for selecting events as filtering is not supported.
For CloudTrail management events, supported fields include
readOnly
,eventCategory
, andeventSource
.For CloudTrail data events, supported fields include
readOnly
,eventCategory
,eventName
,resources.type
, andresources.ARN
.For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the only supported field is
eventCategory
.-
readOnly
- Optional. Can be set toEquals
a value oftrue
orfalse
. If you do not add this field, CloudTrail logs bothread
andwrite
events. A value oftrue
logs onlyread
events. A value offalse
logs onlywrite
events. -
eventSource
- For filtering management events only. This can be set toNotEquals
kms.amazonaws.com
orNotEquals
rdsdata.amazonaws.com
. -
eventName
- Can use any operator. You can use it to filter in or filter out any data event logged to CloudTrail, such asPutBucket
orGetSnapshotBlock
. You can have multiple values for this field, separated by commas. -
eventCategory
- This is required and must be set toEquals
.-
For CloudTrail management events, the value must be
Management
. -
For CloudTrail data events, the value must be
Data
.
The following are used only for event data stores:
-
For CloudTrail Insights events, the value must be
Insight
. -
For Config configuration items, the value must be
ConfigurationItem
. -
For Audit Manager evidence, the value must be
Evidence
. -
For non-Amazon Web Services events, the value must be
ActivityAuditLog
.
-
-
resources.type
- This field is required for CloudTrail data events.resources.type
can only use theEquals
operator, and the value can be one of the following:-
AWS::DynamoDB::Table
-
AWS::Lambda::Function
-
AWS::S3::Object
-
AWS::AppConfig::Configuration
-
AWS::B2BI::Transformer
-
AWS::Bedrock::AgentAlias
-
AWS::Bedrock::KnowledgeBase
-
AWS::Cassandra::Table
-
AWS::CloudFront::KeyValueStore
-
AWS::CloudTrail::Channel
-
AWS::CodeWhisperer::Customization
-
AWS::CodeWhisperer::Profile
-
AWS::Cognito::IdentityPool
-
AWS::DynamoDB::Stream
-
AWS::EC2::Snapshot
-
AWS::EMRWAL::Workspace
-
AWS::FinSpace::Environment
-
AWS::Glue::Table
-
AWS::GreengrassV2::ComponentVersion
-
AWS::GreengrassV2::Deployment
-
AWS::GuardDuty::Detector
-
AWS::IoT::Certificate
-
AWS::IoT::Thing
-
AWS::IoTSiteWise::Asset
-
AWS::IoTSiteWise::TimeSeries
-
AWS::IoTTwinMaker::Entity
-
AWS::IoTTwinMaker::Workspace
-
AWS::KendraRanking::ExecutionPlan
-
AWS::KinesisVideo::Stream
-
AWS::ManagedBlockchain::Network
-
AWS::ManagedBlockchain::Node
-
AWS::MedicalImaging::Datastore
-
AWS::NeptuneGraph::Graph
-
AWS::PCAConnectorAD::Connector
-
AWS::QApps:QApp
-
AWS::QBusiness::Application
-
AWS::QBusiness::DataSource
-
AWS::QBusiness::Index
-
AWS::QBusiness::WebExperience
-
AWS::RDS::DBCluster
-
AWS::S3::AccessPoint
-
AWS::S3ObjectLambda::AccessPoint
-
AWS::S3Outposts::Object
-
AWS::SageMaker::Endpoint
-
AWS::SageMaker::ExperimentTrialComponent
-
AWS::SageMaker::FeatureGroup
-
AWS::ServiceDiscovery::Namespace
-
AWS::ServiceDiscovery::Service
-
AWS::SCN::Instance
-
AWS::SNS::PlatformEndpoint
-
AWS::SNS::Topic
-
AWS::SQS::Queue
-
AWS::SSM::ManagedNode
-
AWS::SSMMessages::ControlChannel
-
AWS::SWF::Domain
-
AWS::ThinClient::Device
-
AWS::ThinClient::Environment
-
AWS::Timestream::Database
-
AWS::Timestream::Table
-
AWS::VerifiedPermissions::PolicyStore
-
AWS::XRay::Trace
You can have only one
resources.type
field per selector. To log data events on more than one resource type, add another selector. -
-
resources.ARN
- You can use any operator withresources.ARN
, but if you useEquals
orNotEquals
, the value must exactly match the ARN of a valid resource of the type you've specified in the template as the value of resources.type.Note: You can't use theresources.ARN
field to filter resource types that do not have ARNs.The
resources.ARN
field can be set one of the following.If resources.type equals
AWS::S3::Object
, the ARN must be in one of the following formats. To log all data events for all objects in a specific S3 bucket, use theStartsWith
operator, and include only the bucket ARN as the matching value.The trailing slash is intentional; do not exclude it. Replace the text between less than and greater than symbols (<>) with resource-specific information.
-
arn:<partition>:s3:::<bucket_name>/
-
arn:<partition>:s3:::<bucket_name>/<object_path>/
When resources.type equals
AWS::DynamoDB::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>
When resources.type equals
AWS::Lambda::Function
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:lambda:<region>:<account_ID>:function:<function_name>
When resources.type equals
AWS::AppConfig::Configuration
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:appconfig:<region>:<account_ID>:application/<application_ID>/environment/<environment_ID>/configuration/<configuration_profile_ID>
When resources.type equals
AWS::B2BI::Transformer
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:b2bi:<region>:<account_ID>:transformer/<transformer_ID>
When resources.type equals
AWS::Bedrock::AgentAlias
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:agent-alias/<agent_ID>/<alias_ID>
When resources.type equals
AWS::Bedrock::KnowledgeBase
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:knowledge-base/<knowledge_base_ID>
When resources.type equals
AWS::Cassandra::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cassandra:<region>:<account_ID>:/keyspace/<keyspace_name>/table/<table_name>
When resources.type equals
AWS::CloudFront::KeyValueStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudfront:<region>:<account_ID>:key-value-store/<KVS_name>
When resources.type equals
AWS::CloudTrail::Channel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudtrail:<region>:<account_ID>:channel/<channel_UUID>
When resources.type equals
AWS::CodeWhisperer::Customization
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:customization/<customization_ID>
When resources.type equals
AWS::CodeWhisperer::Profile
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:profile/<profile_ID>
When resources.type equals
AWS::Cognito::IdentityPool
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cognito-identity:<region>:<account_ID>:identitypool/<identity_pool_ID>
When
resources.type
equalsAWS::DynamoDB::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>/stream/<date_time>
When
resources.type
equalsAWS::EC2::Snapshot
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ec2:<region>::snapshot/<snapshot_ID>
When
resources.type
equalsAWS::EMRWAL::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:emrwal:<region>:<account_ID>:workspace/<workspace_name>
When
resources.type
equalsAWS::FinSpace::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:finspace:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Glue::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:glue:<region>:<account_ID>:table/<database_name>/<table_name>
When
resources.type
equalsAWS::GreengrassV2::ComponentVersion
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:components/<component_name>
When
resources.type
equalsAWS::GreengrassV2::Deployment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:deployments/<deployment_ID
When
resources.type
equalsAWS::GuardDuty::Detector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:guardduty:<region>:<account_ID>:detector/<detector_ID>
When
resources.type
equalsAWS::IoT::Certificate
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:cert/<certificate_ID>
When
resources.type
equalsAWS::IoT::Thing
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:thing/<thing_ID>
When
resources.type
equalsAWS::IoTSiteWise::Asset
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:asset/<asset_ID>
When
resources.type
equalsAWS::IoTSiteWise::TimeSeries
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:timeseries/<timeseries_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Entity
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>/entity/<entity_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>
When
resources.type
equalsAWS::KendraRanking::ExecutionPlan
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kendra-ranking:<region>:<account_ID>:rescore-execution-plan/<rescore_execution_plan_ID>
When
resources.type
equalsAWS::KinesisVideo::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kinesisvideo:<region>:<account_ID>:stream/<stream_name>/<creation_time>
When
resources.type
equalsAWS::ManagedBlockchain::Network
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:::networks/<network_name>
When
resources.type
equalsAWS::ManagedBlockchain::Node
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:<region>:<account_ID>:nodes/<node_ID>
When
resources.type
equalsAWS::MedicalImaging::Datastore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:medical-imaging:<region>:<account_ID>:datastore/<data_store_ID>
When
resources.type
equalsAWS::NeptuneGraph::Graph
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:neptune-graph:<region>:<account_ID>:graph/<graph_ID>
When
resources.type
equalsAWS::PCAConnectorAD::Connector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:pca-connector-ad:<region>:<account_ID>:connector/<connector_ID>
When
resources.type
equalsAWS::QApps:QApp
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qapps:<region>:<account_ID>:application/<application_UUID>/qapp/<qapp_UUID>
When
resources.type
equalsAWS::QBusiness::Application
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>
When
resources.type
equalsAWS::QBusiness::DataSource
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>/data-source/<datasource_ID>
When
resources.type
equalsAWS::QBusiness::Index
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>
When
resources.type
equalsAWS::QBusiness::WebExperience
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/web-experience/<web_experience_ID>
When
resources.type
equalsAWS::RDS::DBCluster
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:rds:<region>:<account_ID>:cluster/<cluster_name>
When
resources.type
equalsAWS::S3::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats. To log events on all objects in an S3 access point, we recommend that you use only the access point ARN, don’t include the object path, and use theStartsWith
orNotStartsWith
operators.-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>
-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>/object/<object_path>
When
resources.type
equalsAWS::S3ObjectLambda::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-object-lambda:<region>:<account_ID>:accesspoint/<access_point_name>
When
resources.type
equalsAWS::S3Outposts::Object
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-outposts:<region>:<account_ID>:<object_path>
When
resources.type
equalsAWS::SageMaker::Endpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:endpoint/<endpoint_name>
When
resources.type
equalsAWS::SageMaker::ExperimentTrialComponent
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:experiment-trial-component/<experiment_trial_component_name>
When
resources.type
equalsAWS::SageMaker::FeatureGroup
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:feature-group/<feature_group_name>
When
resources.type
equalsAWS::SCN::Instance
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:scn:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Namespace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:namespace/<namespace_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Service
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:service/<service_ID>
When
resources.type
equalsAWS::SNS::PlatformEndpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:endpoint/<endpoint_type>/<endpoint_name>/<endpoint_ID>
When
resources.type
equalsAWS::SNS::Topic
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:<topic_name>
When
resources.type
equalsAWS::SQS::Queue
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sqs:<region>:<account_ID>:<queue_name>
When
resources.type
equalsAWS::SSM::ManagedNode
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats:-
arn:<partition>:ssm:<region>:<account_ID>:managed-instance/<instance_ID>
-
arn:<partition>:ec2:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::SSMMessages::ControlChannel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ssmmessages:<region>:<account_ID>:control-channel/<channel_ID>
When
resources.type
equalsAWS::SWF::Domain
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:swf:<region>:<account_ID>:domain/<domain_name>
When
resources.type
equalsAWS::ThinClient::Device
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:device/<device_ID>
When
resources.type
equalsAWS::ThinClient::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Timestream::Database
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>
When
resources.type
equalsAWS::Timestream::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>/table/<table_name>
When resources.type equals
AWS::VerifiedPermissions::PolicyStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:verifiedpermissions:<region>:<account_ID>:policy-store/<policy_store_UUID>
-
-
Equals
— (Array<String>
)An operator that includes events that match the exact value of the event record field specified as the value of
Field
. This is the only valid operator that you can use with thereadOnly
,eventCategory
, andresources.type
fields.StartsWith
— (Array<String>
)An operator that includes events that match the first few characters of the event record field specified as the value of
Field
.EndsWith
— (Array<String>
)An operator that includes events that match the last few characters of the event record field specified as the value of
Field
.NotEquals
— (Array<String>
)An operator that excludes events that match the exact value of the event record field specified as the value of
Field
.NotStartsWith
— (Array<String>
)An operator that excludes events that match the first few characters of the event record field specified as the value of
Field
.NotEndsWith
— (Array<String>
)An operator that excludes events that match the last few characters of the event record field specified as the value of
Field
.
MultiRegionEnabled
— (Boolean
)Specifies whether an event data store collects events from all Regions, or only from the Region in which it was created.
OrganizationEnabled
— (Boolean
)Specifies whether an event data store collects events logged for an organization in Organizations.
Note: Only the management account for the organization can convert an organization event data store to a non-organization event data store, or convert a non-organization event data store to an organization event data store.RetentionPeriod
— (Integer
)The retention period of the event data store, in days. If
BillingMode
is set toEXTENDABLE_RETENTION_PRICING
, you can set a retention period of up to 3653 days, the equivalent of 10 years. IfBillingMode
is set toFIXED_RETENTION_PRICING
, you can set a retention period of up to 2557 days, the equivalent of seven years.CloudTrail Lake determines whether to retain an event by checking if the
eventTime
of the event is within the specified retention period. For example, if you set a retention period of 90 days, CloudTrail will remove events when theeventTime
is older than 90 days.Note: If you decrease the retention period of an event data store, CloudTrail will remove any events with aneventTime
older than the new retention period. For example, if the previous retention period was 365 days and you decrease it to 100 days, CloudTrail will remove events with aneventTime
older than 100 days.TerminationProtectionEnabled
— (Boolean
)Indicates that termination protection is enabled and the event data store cannot be automatically deleted.
KmsKeyId
— (String
)Specifies the KMS key ID to use to encrypt the events delivered by CloudTrail. The value can be an alias name prefixed by
alias/
, a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.Disabling or deleting the KMS key, or removing CloudTrail permissions on the key, prevents CloudTrail from logging events to the event data store, and prevents users from querying the data in the event data store that was encrypted with the key. After you associate an event data store with a KMS key, the KMS key cannot be removed or changed. Before you disable or delete a KMS key that you are using with an event data store, delete or back up your event data store.
CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, see Using multi-Region keys in the Key Management Service Developer Guide.
Examples:
-
alias/MyAliasName
-
arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
-
arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
-
12345678-1234-1234-1234-123456789012
-
BillingMode
— (String
)Note: You can't change the billing mode fromEXTENDABLE_RETENTION_PRICING
toFIXED_RETENTION_PRICING
. IfBillingMode
is set toEXTENDABLE_RETENTION_PRICING
and you want to useFIXED_RETENTION_PRICING
instead, you'll need to stop ingestion on the event data store and create a new event data store that usesFIXED_RETENTION_PRICING
.The billing mode for the event data store determines the cost for ingesting events and the default and maximum retention period for the event data store.
The following are the possible values:
-
EXTENDABLE_RETENTION_PRICING
- This billing mode is generally recommended if you want a flexible retention period of up to 3653 days (about 10 years). The default retention period for this billing mode is 366 days. -
FIXED_RETENTION_PRICING
- This billing mode is recommended if you expect to ingest more than 25 TB of event data per month and need a retention period of up to 2557 days (about 7 years). The default retention period for this billing mode is 2557 days.
For more information about CloudTrail pricing, see CloudTrail Pricing and Managing CloudTrail Lake costs.
Possible values include:"EXTENDABLE_RETENTION_PRICING"
"FIXED_RETENTION_PRICING"
-
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:EventDataStoreArn
— (String
)The ARN of the event data store.
Name
— (String
)The name of the event data store.
Status
— (String
)The status of an event data store.
Possible values include:"CREATED"
"ENABLED"
"PENDING_DELETION"
"STARTING_INGESTION"
"STOPPING_INGESTION"
"STOPPED_INGESTION"
AdvancedEventSelectors
— (Array<map>
)The advanced event selectors that are applied to the event data store.
Name
— (String
)An optional, descriptive name for an advanced event selector, such as "Log data events for only two S3 buckets".
FieldSelectors
— required — (Array<map>
)Contains all selector statements in an advanced event selector.
Field
— required — (String
)A field in a CloudTrail event record on which to filter events to be logged. For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the field is used only for selecting events as filtering is not supported.
For CloudTrail management events, supported fields include
readOnly
,eventCategory
, andeventSource
.For CloudTrail data events, supported fields include
readOnly
,eventCategory
,eventName
,resources.type
, andresources.ARN
.For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or events outside of Amazon Web Services, the only supported field is
eventCategory
.-
readOnly
- Optional. Can be set toEquals
a value oftrue
orfalse
. If you do not add this field, CloudTrail logs bothread
andwrite
events. A value oftrue
logs onlyread
events. A value offalse
logs onlywrite
events. -
eventSource
- For filtering management events only. This can be set toNotEquals
kms.amazonaws.com
orNotEquals
rdsdata.amazonaws.com
. -
eventName
- Can use any operator. You can use it to filter in or filter out any data event logged to CloudTrail, such asPutBucket
orGetSnapshotBlock
. You can have multiple values for this field, separated by commas. -
eventCategory
- This is required and must be set toEquals
.-
For CloudTrail management events, the value must be
Management
. -
For CloudTrail data events, the value must be
Data
.
The following are used only for event data stores:
-
For CloudTrail Insights events, the value must be
Insight
. -
For Config configuration items, the value must be
ConfigurationItem
. -
For Audit Manager evidence, the value must be
Evidence
. -
For non-Amazon Web Services events, the value must be
ActivityAuditLog
.
-
-
resources.type
- This field is required for CloudTrail data events.resources.type
can only use theEquals
operator, and the value can be one of the following:-
AWS::DynamoDB::Table
-
AWS::Lambda::Function
-
AWS::S3::Object
-
AWS::AppConfig::Configuration
-
AWS::B2BI::Transformer
-
AWS::Bedrock::AgentAlias
-
AWS::Bedrock::KnowledgeBase
-
AWS::Cassandra::Table
-
AWS::CloudFront::KeyValueStore
-
AWS::CloudTrail::Channel
-
AWS::CodeWhisperer::Customization
-
AWS::CodeWhisperer::Profile
-
AWS::Cognito::IdentityPool
-
AWS::DynamoDB::Stream
-
AWS::EC2::Snapshot
-
AWS::EMRWAL::Workspace
-
AWS::FinSpace::Environment
-
AWS::Glue::Table
-
AWS::GreengrassV2::ComponentVersion
-
AWS::GreengrassV2::Deployment
-
AWS::GuardDuty::Detector
-
AWS::IoT::Certificate
-
AWS::IoT::Thing
-
AWS::IoTSiteWise::Asset
-
AWS::IoTSiteWise::TimeSeries
-
AWS::IoTTwinMaker::Entity
-
AWS::IoTTwinMaker::Workspace
-
AWS::KendraRanking::ExecutionPlan
-
AWS::KinesisVideo::Stream
-
AWS::ManagedBlockchain::Network
-
AWS::ManagedBlockchain::Node
-
AWS::MedicalImaging::Datastore
-
AWS::NeptuneGraph::Graph
-
AWS::PCAConnectorAD::Connector
-
AWS::QApps:QApp
-
AWS::QBusiness::Application
-
AWS::QBusiness::DataSource
-
AWS::QBusiness::Index
-
AWS::QBusiness::WebExperience
-
AWS::RDS::DBCluster
-
AWS::S3::AccessPoint
-
AWS::S3ObjectLambda::AccessPoint
-
AWS::S3Outposts::Object
-
AWS::SageMaker::Endpoint
-
AWS::SageMaker::ExperimentTrialComponent
-
AWS::SageMaker::FeatureGroup
-
AWS::ServiceDiscovery::Namespace
-
AWS::ServiceDiscovery::Service
-
AWS::SCN::Instance
-
AWS::SNS::PlatformEndpoint
-
AWS::SNS::Topic
-
AWS::SQS::Queue
-
AWS::SSM::ManagedNode
-
AWS::SSMMessages::ControlChannel
-
AWS::SWF::Domain
-
AWS::ThinClient::Device
-
AWS::ThinClient::Environment
-
AWS::Timestream::Database
-
AWS::Timestream::Table
-
AWS::VerifiedPermissions::PolicyStore
-
AWS::XRay::Trace
You can have only one
resources.type
field per selector. To log data events on more than one resource type, add another selector. -
-
resources.ARN
- You can use any operator withresources.ARN
, but if you useEquals
orNotEquals
, the value must exactly match the ARN of a valid resource of the type you've specified in the template as the value of resources.type.Note: You can't use theresources.ARN
field to filter resource types that do not have ARNs.The
resources.ARN
field can be set one of the following.If resources.type equals
AWS::S3::Object
, the ARN must be in one of the following formats. To log all data events for all objects in a specific S3 bucket, use theStartsWith
operator, and include only the bucket ARN as the matching value.The trailing slash is intentional; do not exclude it. Replace the text between less than and greater than symbols (<>) with resource-specific information.
-
arn:<partition>:s3:::<bucket_name>/
-
arn:<partition>:s3:::<bucket_name>/<object_path>/
When resources.type equals
AWS::DynamoDB::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>
When resources.type equals
AWS::Lambda::Function
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:lambda:<region>:<account_ID>:function:<function_name>
When resources.type equals
AWS::AppConfig::Configuration
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:appconfig:<region>:<account_ID>:application/<application_ID>/environment/<environment_ID>/configuration/<configuration_profile_ID>
When resources.type equals
AWS::B2BI::Transformer
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:b2bi:<region>:<account_ID>:transformer/<transformer_ID>
When resources.type equals
AWS::Bedrock::AgentAlias
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:agent-alias/<agent_ID>/<alias_ID>
When resources.type equals
AWS::Bedrock::KnowledgeBase
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:bedrock:<region>:<account_ID>:knowledge-base/<knowledge_base_ID>
When resources.type equals
AWS::Cassandra::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cassandra:<region>:<account_ID>:/keyspace/<keyspace_name>/table/<table_name>
When resources.type equals
AWS::CloudFront::KeyValueStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudfront:<region>:<account_ID>:key-value-store/<KVS_name>
When resources.type equals
AWS::CloudTrail::Channel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cloudtrail:<region>:<account_ID>:channel/<channel_UUID>
When resources.type equals
AWS::CodeWhisperer::Customization
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:customization/<customization_ID>
When resources.type equals
AWS::CodeWhisperer::Profile
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:codewhisperer:<region>:<account_ID>:profile/<profile_ID>
When resources.type equals
AWS::Cognito::IdentityPool
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:cognito-identity:<region>:<account_ID>:identitypool/<identity_pool_ID>
When
resources.type
equalsAWS::DynamoDB::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>/stream/<date_time>
When
resources.type
equalsAWS::EC2::Snapshot
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ec2:<region>::snapshot/<snapshot_ID>
When
resources.type
equalsAWS::EMRWAL::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:emrwal:<region>:<account_ID>:workspace/<workspace_name>
When
resources.type
equalsAWS::FinSpace::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:finspace:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Glue::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:glue:<region>:<account_ID>:table/<database_name>/<table_name>
When
resources.type
equalsAWS::GreengrassV2::ComponentVersion
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:components/<component_name>
When
resources.type
equalsAWS::GreengrassV2::Deployment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:greengrass:<region>:<account_ID>:deployments/<deployment_ID
When
resources.type
equalsAWS::GuardDuty::Detector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:guardduty:<region>:<account_ID>:detector/<detector_ID>
When
resources.type
equalsAWS::IoT::Certificate
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:cert/<certificate_ID>
When
resources.type
equalsAWS::IoT::Thing
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iot:<region>:<account_ID>:thing/<thing_ID>
When
resources.type
equalsAWS::IoTSiteWise::Asset
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:asset/<asset_ID>
When
resources.type
equalsAWS::IoTSiteWise::TimeSeries
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iotsitewise:<region>:<account_ID>:timeseries/<timeseries_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Entity
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>/entity/<entity_ID>
When
resources.type
equalsAWS::IoTTwinMaker::Workspace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:iottwinmaker:<region>:<account_ID>:workspace/<workspace_ID>
When
resources.type
equalsAWS::KendraRanking::ExecutionPlan
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kendra-ranking:<region>:<account_ID>:rescore-execution-plan/<rescore_execution_plan_ID>
When
resources.type
equalsAWS::KinesisVideo::Stream
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:kinesisvideo:<region>:<account_ID>:stream/<stream_name>/<creation_time>
When
resources.type
equalsAWS::ManagedBlockchain::Network
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:::networks/<network_name>
When
resources.type
equalsAWS::ManagedBlockchain::Node
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:managedblockchain:<region>:<account_ID>:nodes/<node_ID>
When
resources.type
equalsAWS::MedicalImaging::Datastore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:medical-imaging:<region>:<account_ID>:datastore/<data_store_ID>
When
resources.type
equalsAWS::NeptuneGraph::Graph
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:neptune-graph:<region>:<account_ID>:graph/<graph_ID>
When
resources.type
equalsAWS::PCAConnectorAD::Connector
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:pca-connector-ad:<region>:<account_ID>:connector/<connector_ID>
When
resources.type
equalsAWS::QApps:QApp
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qapps:<region>:<account_ID>:application/<application_UUID>/qapp/<qapp_UUID>
When
resources.type
equalsAWS::QBusiness::Application
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>
When
resources.type
equalsAWS::QBusiness::DataSource
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>/data-source/<datasource_ID>
When
resources.type
equalsAWS::QBusiness::Index
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/index/<index_ID>
When
resources.type
equalsAWS::QBusiness::WebExperience
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:qbusiness:<region>:<account_ID>:application/<application_ID>/web-experience/<web_experience_ID>
When
resources.type
equalsAWS::RDS::DBCluster
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:rds:<region>:<account_ID>:cluster/<cluster_name>
When
resources.type
equalsAWS::S3::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats. To log events on all objects in an S3 access point, we recommend that you use only the access point ARN, don’t include the object path, and use theStartsWith
orNotStartsWith
operators.-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>
-
arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>/object/<object_path>
When
resources.type
equalsAWS::S3ObjectLambda::AccessPoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-object-lambda:<region>:<account_ID>:accesspoint/<access_point_name>
When
resources.type
equalsAWS::S3Outposts::Object
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:s3-outposts:<region>:<account_ID>:<object_path>
When
resources.type
equalsAWS::SageMaker::Endpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:endpoint/<endpoint_name>
When
resources.type
equalsAWS::SageMaker::ExperimentTrialComponent
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:experiment-trial-component/<experiment_trial_component_name>
When
resources.type
equalsAWS::SageMaker::FeatureGroup
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sagemaker:<region>:<account_ID>:feature-group/<feature_group_name>
When
resources.type
equalsAWS::SCN::Instance
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:scn:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Namespace
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:namespace/<namespace_ID>
When
resources.type
equalsAWS::ServiceDiscovery::Service
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:servicediscovery:<region>:<account_ID>:service/<service_ID>
When
resources.type
equalsAWS::SNS::PlatformEndpoint
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:endpoint/<endpoint_type>/<endpoint_name>/<endpoint_ID>
When
resources.type
equalsAWS::SNS::Topic
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sns:<region>:<account_ID>:<topic_name>
When
resources.type
equalsAWS::SQS::Queue
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:sqs:<region>:<account_ID>:<queue_name>
When
resources.type
equalsAWS::SSM::ManagedNode
, and the operator is set toEquals
orNotEquals
, the ARN must be in one of the following formats:-
arn:<partition>:ssm:<region>:<account_ID>:managed-instance/<instance_ID>
-
arn:<partition>:ec2:<region>:<account_ID>:instance/<instance_ID>
When
resources.type
equalsAWS::SSMMessages::ControlChannel
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:ssmmessages:<region>:<account_ID>:control-channel/<channel_ID>
When
resources.type
equalsAWS::SWF::Domain
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:swf:<region>:<account_ID>:domain/<domain_name>
When
resources.type
equalsAWS::ThinClient::Device
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:device/<device_ID>
When
resources.type
equalsAWS::ThinClient::Environment
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:thinclient:<region>:<account_ID>:environment/<environment_ID>
When
resources.type
equalsAWS::Timestream::Database
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>
When
resources.type
equalsAWS::Timestream::Table
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:timestream:<region>:<account_ID>:database/<database_name>/table/<table_name>
When resources.type equals
AWS::VerifiedPermissions::PolicyStore
, and the operator is set toEquals
orNotEquals
, the ARN must be in the following format:-
arn:<partition>:verifiedpermissions:<region>:<account_ID>:policy-store/<policy_store_UUID>
-
-
Equals
— (Array<String>
)An operator that includes events that match the exact value of the event record field specified as the value of
Field
. This is the only valid operator that you can use with thereadOnly
,eventCategory
, andresources.type
fields.StartsWith
— (Array<String>
)An operator that includes events that match the first few characters of the event record field specified as the value of
Field
.EndsWith
— (Array<String>
)An operator that includes events that match the last few characters of the event record field specified as the value of
Field
.NotEquals
— (Array<String>
)An operator that excludes events that match the exact value of the event record field specified as the value of
Field
.NotStartsWith
— (Array<String>
)An operator that excludes events that match the first few characters of the event record field specified as the value of
Field
.NotEndsWith
— (Array<String>
)An operator that excludes events that match the last few characters of the event record field specified as the value of
Field
.
MultiRegionEnabled
— (Boolean
)Indicates whether the event data store includes events from all Regions, or only from the Region in which it was created.
OrganizationEnabled
— (Boolean
)Indicates whether an event data store is collecting logged events for an organization in Organizations.
RetentionPeriod
— (Integer
)The retention period, in days.
TerminationProtectionEnabled
— (Boolean
)Indicates whether termination protection is enabled for the event data store.
CreatedTimestamp
— (Date
)The timestamp that shows when an event data store was first created.
UpdatedTimestamp
— (Date
)The timestamp that shows when the event data store was last updated.
UpdatedTimestamp
is always either the same or newer than the time shown inCreatedTimestamp
.KmsKeyId
— (String
)Specifies the KMS key ID that encrypts the events delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.
arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
BillingMode
— (String
)The billing mode for the event data store.
Possible values include:"EXTENDABLE_RETENTION_PRICING"
"FIXED_RETENTION_PRICING"
FederationStatus
— (String
)Indicates the Lake query federation status. The status is
Possible values include:ENABLED
if Lake query federation is enabled, orDISABLED
if Lake query federation is disabled. You cannot delete an event data store if theFederationStatus
isENABLED
."ENABLING"
"ENABLED"
"DISABLING"
"DISABLED"
FederationRoleArn
— (String
)If Lake query federation is enabled, provides the ARN of the federation role used to access the resources for the federated event data store.
-
(AWS.Response)
—
Returns:
updateTrail(params = {}, callback) ⇒ AWS.Request
Updates trail settings that control what events you are logging, and how to handle 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, an InvalidHomeRegionException
is thrown.
Service Reference:
Examples:
Calling the updateTrail operation
var params = {
Name: 'STRING_VALUE', /* required */
CloudWatchLogsLogGroupArn: 'STRING_VALUE',
CloudWatchLogsRoleArn: 'STRING_VALUE',
EnableLogFileValidation: true || false,
IncludeGlobalServiceEvents: true || false,
IsMultiRegionTrail: true || false,
IsOrganizationTrail: true || false,
KmsKeyId: 'STRING_VALUE',
S3BucketName: 'STRING_VALUE',
S3KeyPrefix: 'STRING_VALUE',
SnsTopicName: 'STRING_VALUE'
};
cloudtrail.updateTrail(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)Specifies the name of the trail or trail ARN. If
Name
is a trail name, the string must meet the following requirements:-
Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
-
Start with a letter or number, and end with a letter or number
-
Be between 3 and 128 characters
-
Have no adjacent periods, underscores or dashes. Names like
my-_namespace
andmy--namespace
are not valid. -
Not be in IP address format (for example, 192.168.5.4)
If
Name
is a trail ARN, it must be in the following format.arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
-
S3BucketName
— (String
)Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket naming rules.
S3KeyPrefix
— (String
)Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.
SnsTopicName
— (String
)Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.
IncludeGlobalServiceEvents
— (Boolean
)Specifies whether the trail is publishing events from global services such as IAM to the log files.
IsMultiRegionTrail
— (Boolean
)Specifies whether the trail applies only to the current Region or to all Regions. The default is false. If the trail exists only in the current Region and this value is set to true, shadow trails (replications of the trail) will be created in the other Regions. If the trail exists in all Regions and this value is set to false, the trail will remain in the Region where it was created, and its shadow trails in other Regions will be deleted. As a best practice, consider using trails that log events in all Regions.
EnableLogFileValidation
— (Boolean
)Specifies whether log file validation is enabled. The default is false.
Note: When you disable log file integrity validation, the chain of digest files is broken after one hour. CloudTrail does not create digest files for log files that were delivered during a period in which log file integrity validation was disabled. For example, if you enable log file integrity validation at noon on January 1, disable it at noon on January 2, and re-enable it at noon on January 10, digest files will not be created for the log files delivered from noon on January 2 to noon on January 10. The same applies whenever you stop CloudTrail logging or delete a trail.CloudWatchLogsLogGroupArn
— (String
)Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs are delivered. You must use a log group that exists in your account.
Not required unless you specify
CloudWatchLogsRoleArn
.CloudWatchLogsRoleArn
— (String
)Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group. You must use a role that exists in your account.
KmsKeyId
— (String
)Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by "alias/", a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.
CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, see Using multi-Region keys in the Key Management Service Developer Guide.
Examples:
-
alias/MyAliasName
-
arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
-
arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
-
12345678-1234-1234-1234-123456789012
-
IsOrganizationTrail
— (Boolean
)Specifies whether the trail is applied to all accounts in an organization in Organizations, or only for the current Amazon Web Services account. The default is false, and cannot be true unless the call is made on behalf of an Amazon Web Services account that is the management account for an organization in Organizations. If the trail is not an organization trail and this is set to
true
, the trail will be created in all Amazon Web Services accounts that belong to the organization. If the trail is an organization trail and this is set tofalse
, the trail will remain in the current Amazon Web Services account but be deleted from all member accounts in the organization.Note: Only the management account for the organization can convert an organization trail to a non-organization trail, or convert a non-organization trail to an organization trail.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Name
— (String
)Specifies the name of the trail.
S3BucketName
— (String
)Specifies the name of the Amazon S3 bucket designated for publishing log files.
S3KeyPrefix
— (String
)Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your IAM Log Files.
SnsTopicName
— (String
)This field is no longer in use. Use
SnsTopicARN
.SnsTopicARN
— (String
)Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered. The following is the format of a topic ARN.
arn:aws:sns:us-east-2:123456789012:MyTopic
IncludeGlobalServiceEvents
— (Boolean
)Specifies whether the trail is publishing events from global services such as IAM to the log files.
IsMultiRegionTrail
— (Boolean
)Specifies whether the trail exists in one Region or in all Regions.
TrailARN
— (String
)Specifies the ARN of the trail that was updated. The following is the format of a trail ARN.
arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
LogFileValidationEnabled
— (Boolean
)Specifies whether log file integrity validation is enabled.
CloudWatchLogsLogGroupArn
— (String
)Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail logs are delivered.
CloudWatchLogsRoleArn
— (String
)Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
KmsKeyId
— (String
)Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.
arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
IsOrganizationTrail
— (Boolean
)Specifies whether the trail is an organization trail.
-
(AWS.Response)
—
Returns: