Skip to content

Latest commit

 

History

History

amazonaws_cloudtrail

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

@datafire/amazonaws_cloudtrail

Client library for AWS CloudTrail

Installation and Usage

npm install --save @datafire/amazonaws_cloudtrail
let amazonaws_cloudtrail = require('@datafire/amazonaws_cloudtrail').create({
  accessKeyId: "",
  secretAccessKey: "",
  region: ""
});

.then(data => {
  console.log(data);
});

Description

AWS CloudTrail

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 AWS API calls for your AWS account and delivers log files to an Amazon S3 bucket. The recorded information includes the identity of the user, the start time of the AWS API call, the source IP address, the request parameters, and the response elements returned by the service.

As an alternative to the API, you can use one of the AWS SDKs, which consist of libraries and sample code for various programming languages and platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide a convenient way to create programmatic access to AWSCloudTrail. For example, the SDKs take care of cryptographically signing requests, managing errors, and retrying requests automatically. For information about the AWS SDKs, including how to download and install them, see the Tools for Amazon Web Services page.

See the AWS CloudTrail User Guide for information about the data that is included with each AWS API call listed in the log files.

Actions

AddTags

amazonaws_cloudtrail.AddTags({
  "ResourceId": null
}, context)

Input

  • input object
    • ResourceId required
    • TagsList

Output

CreateTrail

amazonaws_cloudtrail.CreateTrail({
  "Name": null,
  "S3BucketName": null
}, context)

Input

  • input object
    • CloudWatchLogsLogGroupArn
    • CloudWatchLogsRoleArn
    • EnableLogFileValidation
    • IncludeGlobalServiceEvents
    • IsMultiRegionTrail
    • IsOrganizationTrail
    • KmsKeyId
    • Name required
    • S3BucketName required
    • S3KeyPrefix
    • SnsTopicName
    • TagsList TagsList

Output

DeleteTrail

amazonaws_cloudtrail.DeleteTrail({
  "Name": null
}, context)

Input

  • input object
    • Name required

Output

DescribeTrails

amazonaws_cloudtrail.DescribeTrails({}, context)

Input

  • input object
    • includeShadowTrails
    • trailNameList

Output

GetEventSelectors

amazonaws_cloudtrail.GetEventSelectors({
  "TrailName": null
}, context)

Input

  • input object
    • TrailName required

Output

GetInsightSelectors

amazonaws_cloudtrail.GetInsightSelectors({
  "TrailName": null
}, context)

Input

  • input object
    • TrailName required

Output

GetTrail

amazonaws_cloudtrail.GetTrail({
  "Name": null
}, context)

Input

  • input object
    • Name required

Output

GetTrailStatus

amazonaws_cloudtrail.GetTrailStatus({
  "Name": null
}, context)

Input

  • input object
    • Name required

Output

ListPublicKeys

amazonaws_cloudtrail.ListPublicKeys({}, context)

Input

  • input object
    • NextToken string
    • EndTime
    • NextToken
    • StartTime

Output

ListTags

amazonaws_cloudtrail.ListTags({
  "ResourceIdList": null
}, context)

Input

  • input object
    • NextToken string
    • NextToken
    • ResourceIdList required

Output

ListTrails

amazonaws_cloudtrail.ListTrails({}, context)

Input

  • input object
    • NextToken string
    • NextToken

Output

LookupEvents

amazonaws_cloudtrail.LookupEvents({}, context)

Input

  • input object
    • MaxResults string
    • NextToken string
    • EndTime
    • EventCategory
    • LookupAttributes
    • MaxResults
    • NextToken
    • StartTime

Output

PutEventSelectors

amazonaws_cloudtrail.PutEventSelectors({
  "TrailName": null
}, context)

Input

Output

PutInsightSelectors

amazonaws_cloudtrail.PutInsightSelectors({
  "TrailName": null,
  "InsightSelectors": null
}, context)

Input

  • input object

Output

RemoveTags

amazonaws_cloudtrail.RemoveTags({
  "ResourceId": null
}, context)

Input

  • input object
    • ResourceId required
    • TagsList

Output

StartLogging

amazonaws_cloudtrail.StartLogging({
  "Name": null
}, context)

Input

  • input object
    • Name required

Output

StopLogging

amazonaws_cloudtrail.StopLogging({
  "Name": null
}, context)

Input

  • input object
    • Name required

Output

UpdateTrail

amazonaws_cloudtrail.UpdateTrail({
  "Name": null
}, context)

Input

  • input object
    • CloudWatchLogsLogGroupArn
    • CloudWatchLogsRoleArn
    • EnableLogFileValidation
    • IncludeGlobalServiceEvents
    • IsMultiRegionTrail
    • IsOrganizationTrail
    • KmsKeyId
    • Name required
    • S3BucketName
    • S3KeyPrefix
    • SnsTopicName

Output

Definitions

AddTagsRequest

  • AddTagsRequest object: Specifies the tags to add to a trail.
    • ResourceId required
    • TagsList

AddTagsResponse

  • AddTagsResponse object: Returns the objects or data listed below if successful. Otherwise, returns an error.

AdvancedEventSelector

  • AdvancedEventSelector object:

    Advanced event selectors let you create fine-grained selectors for the following AWS CloudTrail event record fields. They help you control costs by logging only those events that are important to you. For more information about advanced event selectors, see Logging data events for trails in the AWS CloudTrail User Guide.

    • readOnly

    • eventSource

    • eventName

    • eventCategory

    • resources.type

    • resources.ARN

    You cannot apply both event selectors and advanced event selectors to a trail.

AdvancedEventSelectors

AdvancedFieldSelector

AdvancedFieldSelectors

Boolean

  • Boolean boolean

ByteBuffer

  • ByteBuffer string

CloudTrailARNInvalidException

CloudTrailAccessNotEnabledException

CloudTrailInvalidClientTokenIdException

CloudWatchLogsDeliveryUnavailableException

CreateTrailRequest

  • CreateTrailRequest object: Specifies the settings for each trail.
    • CloudWatchLogsLogGroupArn
    • CloudWatchLogsRoleArn
    • EnableLogFileValidation
    • IncludeGlobalServiceEvents
    • IsMultiRegionTrail
    • IsOrganizationTrail
    • KmsKeyId
    • Name required
    • S3BucketName required
    • S3KeyPrefix
    • SnsTopicName
    • TagsList TagsList

CreateTrailResponse

  • CreateTrailResponse object: Returns the objects or data listed below if successful. Otherwise, returns an error.
    • CloudWatchLogsLogGroupArn
    • CloudWatchLogsRoleArn
    • IncludeGlobalServiceEvents
    • IsMultiRegionTrail
    • IsOrganizationTrail
    • KmsKeyId
    • LogFileValidationEnabled
    • Name
    • S3BucketName
    • S3KeyPrefix
    • SnsTopicARN
    • SnsTopicName
    • TrailARN

DataResource

  • DataResource object:

    The Amazon S3 buckets or AWS Lambda functions that you specify in your event selectors for your trail to log data events. Data events provide information about the resource operations performed on or within a resource itself. These are also known as data plane operations. You can specify up to 250 data resources for a trail.

    The total number of allowed data resources is 250. This number can be distributed between 1 and 5 event selectors, but the total cannot exceed 250 across all selectors.

    If you are using advanced event selectors, the maximum total number of values for all conditions, across all advanced event selectors for the trail, is 500.

    The following example demonstrates how logging works when you configure logging of all data events for an S3 bucket named bucket-1. In this example, the CloudTrail user specified an empty prefix, and the option to log both Read and Write data events.

    1. A user uploads an image file to bucket-1.

    2. The PutObject API operation is an Amazon S3 object-level API. It is recorded as a data event in CloudTrail. Because the CloudTrail user specified an S3 bucket with an empty prefix, events that occur on any object in that bucket are logged. The trail processes and logs the event.

    3. A user uploads an object to an Amazon S3 bucket named arn:aws:s3:::bucket-2.

    4. The PutObject API operation occurred for an object in an S3 bucket that the CloudTrail user didn't specify for the trail. The trail doesn’t log the event.

    The following example demonstrates how logging works when you configure logging of AWS Lambda data events for a Lambda function named MyLambdaFunction, but not for all AWS Lambda functions.

    1. A user runs a script that includes a call to the MyLambdaFunction function and the MyOtherLambdaFunction function.

    2. The Invoke API operation on MyLambdaFunction is an AWS Lambda API. It is recorded as a data event in CloudTrail. Because the CloudTrail user specified logging data events for MyLambdaFunction, any invocations of that function are logged. The trail processes and logs the event.

    3. The Invoke API operation on MyOtherLambdaFunction is an AWS Lambda API. Because the CloudTrail user did not specify logging data events for all Lambda functions, the Invoke operation for MyOtherLambdaFunction does not match the function specified for the trail. The trail doesn’t log the event.

DataResourceValues

  • DataResourceValues array

DataResources

Date

  • Date string

DeleteTrailRequest

  • DeleteTrailRequest object: The request that specifies the name of a trail to delete.
    • Name required

DeleteTrailResponse

  • DeleteTrailResponse object: Returns the objects or data listed below if successful. Otherwise, returns an error.

DescribeTrailsRequest

  • DescribeTrailsRequest object: Returns information about the trail.
    • includeShadowTrails
    • trailNameList

DescribeTrailsResponse

  • DescribeTrailsResponse object: Returns the objects or data listed below if successful. Otherwise, returns an error.

Event

  • Event object: Contains information about an event that was returned by a lookup request. The result includes a representation of a CloudTrail event.
    • AccessKeyId
    • CloudTrailEvent
    • EventId
    • EventName
    • EventSource
    • EventTime
    • ReadOnly
    • Resources
    • Username

EventCategory

  • EventCategory string (values: insight)

EventSelector

  • EventSelector object:

    Use event selectors to further specify the management and data event settings for your trail. By default, trails created without specific event selectors will be configured to log all read and write management events, and no data events. When an event occurs in your account, CloudTrail evaluates the event selector for 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.

    You can configure up to five event selectors for a trail.

    You cannot apply both event selectors and advanced event selectors to a trail.

    • DataResources
    • ExcludeManagementEventSources
    • IncludeManagementEvents
    • ReadWriteType

EventSelectors

EventsList

  • EventsList array

ExcludeManagementEventSources

  • ExcludeManagementEventSources array

GetEventSelectorsRequest

  • GetEventSelectorsRequest object
    • TrailName required

GetEventSelectorsResponse

GetInsightSelectorsRequest

  • GetInsightSelectorsRequest object
    • TrailName required

GetInsightSelectorsResponse

  • GetInsightSelectorsResponse object

GetTrailRequest

  • GetTrailRequest object
    • Name required

GetTrailResponse

  • GetTrailResponse object

GetTrailStatusRequest

  • GetTrailStatusRequest object: The name of a trail about which you want the current status.
    • Name required

GetTrailStatusResponse

  • GetTrailStatusResponse object: Returns the objects or data listed below if successful. Otherwise, returns an error.
    • IsLogging
    • LatestCloudWatchLogsDeliveryError
    • LatestCloudWatchLogsDeliveryTime
    • LatestDeliveryAttemptSucceeded
    • LatestDeliveryAttemptTime
    • LatestDeliveryError
    • LatestDeliveryTime
    • LatestDigestDeliveryError
    • LatestDigestDeliveryTime
    • LatestNotificationAttemptSucceeded
    • LatestNotificationAttemptTime
    • LatestNotificationError
    • LatestNotificationTime
    • StartLoggingTime
    • StopLoggingTime
    • TimeLoggingStarted
    • TimeLoggingStopped

InsightNotEnabledException

InsightSelector

  • InsightSelector object: A JSON string that contains a list of insight types that are logged on a trail.
    • InsightType

InsightSelectors

InsightType

  • InsightType string (values: ApiCallRateInsight)

InsufficientDependencyServiceAccessPermissionException

InsufficientEncryptionPolicyException

InsufficientS3BucketPolicyException

InsufficientSnsTopicPolicyException

InvalidCloudWatchLogsLogGroupArnException

InvalidCloudWatchLogsRoleArnException

InvalidEventCategoryException

InvalidEventSelectorsException

InvalidHomeRegionException

InvalidInsightSelectorsException

InvalidKmsKeyIdException

InvalidLookupAttributesException

InvalidMaxResultsException

InvalidNextTokenException

InvalidParameterCombinationException

InvalidS3BucketNameException

InvalidS3PrefixException

InvalidSnsTopicNameException

InvalidTagParameterException

InvalidTimeRangeException

InvalidTokenException

InvalidTrailNameException

KmsException

KmsKeyDisabledException

KmsKeyNotFoundException

ListPublicKeysRequest

  • ListPublicKeysRequest object: Requests the public keys for a specified time range.
    • EndTime
    • NextToken
    • StartTime

ListPublicKeysResponse

  • ListPublicKeysResponse object: Returns the objects or data listed below if successful. Otherwise, returns an error.

ListTagsRequest

  • ListTagsRequest object: Specifies a list of trail tags to return.
    • NextToken
    • ResourceIdList required

ListTagsResponse

  • ListTagsResponse object: Returns the objects or data listed below if successful. Otherwise, returns an error.

ListTrailsRequest

  • ListTrailsRequest object
    • NextToken

ListTrailsResponse

  • ListTrailsResponse object

LookupAttribute

  • LookupAttribute object: Specifies an attribute and value that filter the events returned.
    • AttributeKey required
    • AttributeValue required

LookupAttributeKey

  • LookupAttributeKey string (values: EventId, EventName, ReadOnly, Username, ResourceType, ResourceName, EventSource, AccessKeyId)

LookupAttributesList

LookupEventsRequest

  • LookupEventsRequest object: Contains a request for LookupEvents.
    • EndTime
    • EventCategory
    • LookupAttributes
    • MaxResults
    • NextToken
    • StartTime

LookupEventsResponse

  • LookupEventsResponse object: Contains a response to a LookupEvents action.
    • Events
    • NextToken

MaxResults

  • MaxResults integer

MaximumNumberOfTrailsExceededException

NextToken

  • NextToken string

NotOrganizationMasterAccountException

OperationNotPermittedException

Operator

OperatorValue

  • OperatorValue string

OrganizationNotInAllFeaturesModeException

OrganizationsNotInUseException

PublicKey

  • PublicKey object: Contains information about a returned public key.
    • Fingerprint
    • ValidityEndTime
    • ValidityStartTime
    • Value

PublicKeyList

PutEventSelectorsRequest

PutEventSelectorsResponse

PutInsightSelectorsRequest

  • PutInsightSelectorsRequest object

PutInsightSelectorsResponse

  • PutInsightSelectorsResponse object

ReadWriteType

  • ReadWriteType string (values: ReadOnly, WriteOnly, All)

RemoveTagsRequest

  • RemoveTagsRequest object: Specifies the tags to remove from a trail.
    • ResourceId required
    • TagsList

RemoveTagsResponse

  • RemoveTagsResponse object: Returns the objects or data listed below if successful. Otherwise, returns an error.

Resource

  • Resource object: Specifies the type and name of a resource referenced by an event.
    • ResourceName
    • ResourceType

ResourceIdList

  • ResourceIdList array

ResourceList

  • ResourceList array: A list of resources referenced by the event returned.

ResourceNotFoundException

ResourceTag

  • ResourceTag object: A resource tag.
    • ResourceId
    • TagsList

ResourceTagList

ResourceTypeNotSupportedException

S3BucketDoesNotExistException

SelectorField

  • SelectorField string

SelectorName

  • SelectorName string

StartLoggingRequest

  • StartLoggingRequest object: The request to CloudTrail to start logging AWS API calls for an account.
    • Name required

StartLoggingResponse

  • StartLoggingResponse object: Returns the objects or data listed below if successful. Otherwise, returns an error.

StopLoggingRequest

  • StopLoggingRequest object: Passes the request to CloudTrail to stop logging AWS API calls for the specified account.
    • Name required

StopLoggingResponse

  • StopLoggingResponse object: Returns the objects or data listed below if successful. Otherwise, returns an error.

String

  • String string

Tag

  • Tag object: A custom key-value pair associated with a resource such as a CloudTrail trail.
    • Key required
    • Value

TagsLimitExceededException

TagsList

  • TagsList array: A list of tags.

Trail

  • Trail object: The settings for a trail.
    • CloudWatchLogsLogGroupArn
    • CloudWatchLogsRoleArn
    • HasCustomEventSelectors
    • HasInsightSelectors
    • HomeRegion
    • IncludeGlobalServiceEvents
    • IsMultiRegionTrail
    • IsOrganizationTrail
    • KmsKeyId
    • LogFileValidationEnabled
    • Name
    • S3BucketName
    • S3KeyPrefix
    • SnsTopicARN
    • SnsTopicName
    • TrailARN

TrailAlreadyExistsException

TrailInfo

  • TrailInfo object: Information about a CloudTrail trail, including the trail's name, home region, and Amazon Resource Name (ARN).
    • HomeRegion
    • Name
    • TrailARN

TrailList

  • TrailList array

TrailNameList

  • TrailNameList array

TrailNotFoundException

TrailNotProvidedException

Trails

UnsupportedOperationException

UpdateTrailRequest

  • UpdateTrailRequest object: Specifies settings to update for the trail.
    • CloudWatchLogsLogGroupArn
    • CloudWatchLogsRoleArn
    • EnableLogFileValidation
    • IncludeGlobalServiceEvents
    • IsMultiRegionTrail
    • IsOrganizationTrail
    • KmsKeyId
    • Name required
    • S3BucketName
    • S3KeyPrefix
    • SnsTopicName

UpdateTrailResponse

  • UpdateTrailResponse object: Returns the objects or data listed below if successful. Otherwise, returns an error.
    • CloudWatchLogsLogGroupArn
    • CloudWatchLogsRoleArn
    • IncludeGlobalServiceEvents
    • IsMultiRegionTrail
    • IsOrganizationTrail
    • KmsKeyId
    • LogFileValidationEnabled
    • Name
    • S3BucketName
    • S3KeyPrefix
    • SnsTopicARN
    • SnsTopicName
    • TrailARN