• 沒有找到結果。

AWS CloudTrail

N/A
N/A
Protected

Academic year: 2022

Share "AWS CloudTrail"

Copied!
146
0
0

加載中.... (立即查看全文)

全文

(1)

AWS CloudTrail

API Reference

API Version 2013-11-01

(2)

AWS CloudTrail: API Reference

Copyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon.

(3)

Table of Contents

Welcome ... 1

Actions ... 2

AddTags ... 3

Request Syntax ... 3

Request Parameters ... 3

Response Elements ... 3

Errors ... 3

See Also ... 5

CancelQuery ... 6

Request Syntax ... 6

Request Parameters ... 6

Response Syntax ... 6

Response Elements ... 6

Errors ... 7

See Also ... 8

CreateEventDataStore ... 9

Request Syntax ... 9

Request Parameters ... 9

Response Syntax ... 10

Response Elements ... 11

Errors ... 12

See Also ... 14

CreateTrail ... 15

Request Syntax ... 15

Request Parameters ... 15

Response Syntax ... 17

Response Elements ... 18

Errors ... 19

See Also ... 22

DeleteEventDataStore ... 23

Request Syntax ... 23

Request Parameters ... 23

Response Elements ... 23

Errors ... 23

See Also ... 24

DeleteTrail ... 25

Request Syntax ... 25

Request Parameters ... 25

Response Elements ... 25

Errors ... 25

See Also ... 26

DescribeQuery ... 27

Request Syntax ... 27

Request Parameters ... 27

Response Syntax ... 27

Response Elements ... 28

Errors ... 28

See Also ... 29

DescribeTrails ... 30

Request Syntax ... 30

Request Parameters ... 30

Response Syntax ... 30

Response Elements ... 31

Errors ... 31

(4)

See Also ... 32

GetEventDataStore ... 33

Request Syntax ... 33

Request Parameters ... 33

Response Syntax ... 33

Response Elements ... 34

Errors ... 35

See Also ... 35

GetEventSelectors ... 37

Request Syntax ... 37

Request Parameters ... 37

Response Syntax ... 37

Response Elements ... 38

Errors ... 38

See Also ... 39

GetInsightSelectors ... 40

Request Syntax ... 40

Request Parameters ... 40

Response Syntax ... 40

Response Elements ... 41

Errors ... 41

See Also ... 42

GetQueryResults ... 43

Request Syntax ... 43

Request Parameters ... 43

Response Syntax ... 44

Response Elements ... 44

Errors ... 45

See Also ... 46

GetTrail ... 47

Request Syntax ... 47

Request Parameters ... 47

Response Syntax ... 47

Response Elements ... 47

Errors ... 48

See Also ... 48

GetTrailStatus ... 49

Request Syntax ... 49

Request Parameters ... 49

Response Syntax ... 49

Response Elements ... 50

Errors ... 51

See Also ... 52

ListEventDataStores ... 53

Request Syntax ... 53

Request Parameters ... 53

Response Syntax ... 53

Response Elements ... 54

Errors ... 54

See Also ... 55

ListPublicKeys ... 56

Request Syntax ... 56

Request Parameters ... 56

Response Syntax ... 56

Response Elements ... 57

Errors ... 57

See Also ... 57

(5)

ListQueries ... 59

Request Syntax ... 59

Request Parameters ... 59

Response Syntax ... 60

Response Elements ... 60

Errors ... 61

See Also ... 62

ListTags ... 63

Request Syntax ... 63

Request Parameters ... 63

Response Syntax ... 63

Response Elements ... 63

Errors ... 64

See Also ... 65

ListTrails ... 66

Request Syntax ... 66

Request Parameters ... 66

Response Syntax ... 66

Response Elements ... 66

Errors ... 67

See Also ... 67

LookupEvents ... 68

Request Syntax ... 68

Request Parameters ... 68

Response Syntax ... 69

Response Elements ... 70

Errors ... 70

See Also ... 71

PutEventSelectors ... 72

Request Syntax ... 72

Request Parameters ... 73

Response Syntax ... 74

Response Elements ... 74

Errors ... 75

See Also ... 76

PutInsightSelectors ... 77

Request Syntax ... 77

Request Parameters ... 77

Response Syntax ... 77

Response Elements ... 77

Errors ... 78

Examples ... 79

See Also ... 79

RemoveTags ... 81

Request Syntax ... 81

Request Parameters ... 81

Response Elements ... 81

Errors ... 81

See Also ... 83

RestoreEventDataStore ... 84

Request Syntax ... 84

Request Parameters ... 84

Response Syntax ... 84

Response Elements ... 85

Errors ... 86

See Also ... 87

StartLogging ... 88

(6)

Request Syntax ... 88

Request Parameters ... 88

Response Elements ... 88

Errors ... 88

See Also ... 89

StartQuery ... 90

Request Syntax ... 90

Request Parameters ... 90

Response Syntax ... 90

Response Elements ... 90

Errors ... 90

See Also ... 91

StopLogging ... 93

Request Syntax ... 93

Request Parameters ... 93

Response Elements ... 93

Errors ... 93

See Also ... 94

UpdateEventDataStore ... 95

Request Syntax ... 95

Request Parameters ... 95

Response Syntax ... 96

Response Elements ... 97

Errors ... 98

See Also ... 99

UpdateTrail ... 101

Request Syntax ... 101

Request Parameters ... 101

Response Syntax ... 103

Response Elements ... 104

Errors ... 105

See Also ... 108

Data Types ... 109

AdvancedEventSelector ... 110

Contents ... 110

See Also ... 110

AdvancedFieldSelector ... 111

Contents ... 111

See Also ... 114

DataResource ... 115

Contents ... 115

See Also ... 116

Event ... 117

Contents ... 117

See Also ... 118

EventDataStore ... 119

Contents ... 119

See Also ... 120

EventSelector ... 121

Contents ... 121

See Also ... 122

InsightSelector ... 123

Contents ... 123

See Also ... 123

LookupAttribute ... 124

Contents ... 124

See Also ... 124

(7)

PublicKey ... 125

Contents ... 125

See Also ... 125

Query ... 126

Contents ... 126

See Also ... 126

QueryStatistics ... 127

Contents ... 127

See Also ... 127

QueryStatisticsForDescribeQuery ... 128

Contents ... 128

See Also ... 128

Resource ... 129

Contents ... 129

See Also ... 129

ResourceTag ... 130

Contents ... 130

See Also ... 130

Tag ... 131

Contents ... 131

See Also ... 131

Trail ... 132

Contents ... 132

See Also ... 134

TrailInfo ... 135

Contents ... 135

See Also ... 135

Common Parameters ... 136

Common Errors ... 138

(8)

Welcome

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.

Note

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 programmatic access to AWS CloudTrail. For example, the SDKs handle cryptographically signing requests, managing errors, and retrying requests automatically. For more information about the AWS SDKs, including how to download and install them, see Tools to Build on AWS.

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

This document was last published on March 6, 2022.

(9)

Actions

The following actions are supported:

• AddTags (p. 3)

• CancelQuery (p. 6)

• CreateEventDataStore (p. 9)

• CreateTrail (p. 15)

• DeleteEventDataStore (p. 23)

• DeleteTrail (p. 25)

• DescribeQuery (p. 27)

• DescribeTrails (p. 30)

• GetEventDataStore (p. 33)

• GetEventSelectors (p. 37)

• GetInsightSelectors (p. 40)

• GetQueryResults (p. 43)

• GetTrail (p. 47)

• GetTrailStatus (p. 49)

• ListEventDataStores (p. 53)

• ListPublicKeys (p. 56)

• ListQueries (p. 59)

• ListTags (p. 63)

• ListTrails (p. 66)

• LookupEvents (p. 68)

• PutEventSelectors (p. 72)

• PutInsightSelectors (p. 77)

• RemoveTags (p. 81)

• RestoreEventDataStore (p. 84)

• StartLogging (p. 88)

• StartQuery (p. 90)

• StopLogging (p. 93)

• UpdateEventDataStore (p. 95)

• UpdateTrail (p. 101)

(10)

AddTags

AddTags

Adds one or more tags to a trail, 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 for a trail; 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 that applies to all AWS Regions only from the Region in which the trail was created (also known as its home region).

Request Syntax

{

"ResourceId": "string", "TagsList": [

{

"Key": "string", "Value": "string"

} ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 136).

The request accepts the following data in JSON format.

ResourceId (p. 3)

Specifies the ARN of the trail 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 Type: String

Required: Yes TagsList (p. 3)

Contains a list of tags, up to a limit of 50 Type: Array of Tag (p. 131) objects

Array Members: Maximum number of 200 items.

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 138).

(11)

Errors

CloudTrailARNInvalidException

This exception is thrown when an operation is called with a trail ARN that is not valid. The following is the format of a trail ARN.

arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail HTTP Status Code: 400

ConflictException

This exception is thrown when the specified resource is not ready for an operation. This can occur when you try to run an operation on a trail before CloudTrail has time to fully load the trail. If this exception occurs, wait a few minutes, and then try the operation again.

HTTP Status Code: 400

EventDataStoreNotFoundException

The specified event data store was not found.

HTTP Status Code: 400 InactiveEventDataStoreException

The event data store against which you ran your query is inactive.

HTTP Status Code: 400 InvalidTagParameterException

This exception is thrown when the specified tag key or values are not valid. It can also occur if there are duplicate tags or too many tags on the resource.

HTTP Status Code: 400 InvalidTrailNameException

This exception is thrown when the provided trail name is not valid. Trail names 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 and my-- namespace are not valid.

• Not be in IP address format (for example, 192.168.5.4) HTTP Status Code: 400

NotOrganizationMasterAccountException

This exception is thrown when the AWS account making the request to create or update an organization trail is not the management account for an organization in AWS Organizations. For more information, see Prepare For Creating a Trail For Your Organization.

HTTP Status Code: 400 OperationNotPermittedException

This exception is thrown when the requested operation is not permitted.

HTTP Status Code: 400 ResourceNotFoundException

This exception is thrown when the specified resource is not found.

(12)

See Also

HTTP Status Code: 400

ResourceTypeNotSupportedException

This exception is thrown when the specified resource type is not supported by CloudTrail.

HTTP Status Code: 400 TagsLimitExceededException

The number of tags per trail has exceeded the permitted amount. Currently, the limit is 50.

HTTP Status Code: 400 UnsupportedOperationException

This exception is thrown when the requested operation is not supported.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(13)

CancelQuery

CancelQuery

Cancels a query if the query is not in a terminated state, such as CANCELLED, FAILED 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.

Request Syntax

{

"EventDataStore": "string", "QueryId": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 136).

The request accepts the following data in JSON format.

EventDataStore (p. 6)

The ARN (or the ID suffix of the ARN) of an event data store on which the specified query is running.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 256.

Pattern: ^[a-zA-Z0-9._/\-:]+$

Required: Yes QueryId (p. 6)

The ID of the query that you want to cancel. The QueryId comes from the response of a StartQuery operation.

Type: String

Length Constraints: Fixed length of 36.

Pattern: ^[a-f0-9\-]+$

Required: Yes

Response Syntax

{

"QueryId": "string", "QueryStatus": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

(14)

Errors

The following data is returned in JSON format by the service.

QueryId (p. 6)

The ID of the canceled query.

Type: String

Length Constraints: Fixed length of 36.

Pattern: ^[a-f0-9\-]+$

QueryStatus (p. 6)

Shows the status of a query after a CancelQuery request. Typically, the values shown are either RUNNING or CANCELLED.

Type: String

Valid Values: QUEUED | RUNNING | FINISHED | FAILED | CANCELLED

Errors

For information about the errors that are common to all actions, see Common Errors (p. 138).

ConflictException

This exception is thrown when the specified resource is not ready for an operation. This can occur when you try to run an operation on a trail before CloudTrail has time to fully load the trail. If this exception occurs, wait a few minutes, and then try the operation again.

HTTP Status Code: 400

EventDataStoreARNInvalidException

The specified event data store ARN is not valid or does not map to an event data store in your account.

HTTP Status Code: 400

EventDataStoreNotFoundException

The specified event data store was not found.

HTTP Status Code: 400 InactiveEventDataStoreException

The event data store against which you ran your query is inactive.

HTTP Status Code: 400 InactiveQueryException

The specified query cannot be canceled because it is in the FINISHED, FAILED, or CANCELLED state.

HTTP Status Code: 400 InvalidParameterException

The request includes a parameter that is not valid.

HTTP Status Code: 400

(15)

See Also

OperationNotPermittedException

This exception is thrown when the requested operation is not permitted.

HTTP Status Code: 400 QueryIdNotFoundException

The query ID does not exist or does not map to a query.

HTTP Status Code: 400 UnsupportedOperationException

This exception is thrown when the requested operation is not supported.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(16)

CreateEventDataStore

CreateEventDataStore

Creates a new event data store.

Request Syntax

{ "AdvancedEventSelectors": [ {

"FieldSelectors": [ {

"EndsWith": [ "string" ], "Equals": [ "string" ], "Field": "string",

"NotEndsWith": [ "string" ], "NotEquals": [ "string" ], "NotStartsWith": [ "string" ], "StartsWith": [ "string" ] }

],

"Name": "string"

} ],

"MultiRegionEnabled": boolean, "Name": "string",

"OrganizationEnabled": boolean, "RetentionPeriod": number, "TagsList": [

{

"Key": "string", "Value": "string"

} ],

"TerminationProtectionEnabled": boolean }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 136).

The request accepts the following data in JSON format.

AdvancedEventSelectors (p. 9)

The advanced event selectors to use to select the events for the data store. For more information about how to use advanced event selectors, see Log events by using advanced event selectors in the CloudTrail User Guide.

Type: Array of AdvancedEventSelector (p. 110) objects Required: No

MultiRegionEnabled (p. 9)

Specifies whether the event data store includes events from all regions, or only from the region in which the event data store is created.

Type: Boolean

(17)

Response Syntax

Required: No Name (p. 9)

The name of the event data store.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 128.

Pattern: ^[a-zA-Z0-9._\-]+$

Required: Yes

OrganizationEnabled (p. 9)

Specifies whether an event data store collects events logged for an organization in AWS Organizations.

Type: Boolean Required: No RetentionPeriod (p. 9)

The retention period of the event data store, in days. You can set a retention period of up to 2555 days, the equivalent of seven years.

Type: Integer

Valid Range: Minimum value of 7. Maximum value of 2555.

Required: No TagsList (p. 9)

A list of tags.

Type: Array of Tag (p. 131) objects

Array Members: Maximum number of 200 items.

Required: No

TerminationProtectionEnabled (p. 9)

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.

Type: Boolean Required: No

Response Syntax

{ "AdvancedEventSelectors": [ {

"FieldSelectors": [ {

"EndsWith": [ "string" ], "Equals": [ "string" ],

(18)

Response Elements

"Field": "string",

"NotEndsWith": [ "string" ], "NotEquals": [ "string" ], "NotStartsWith": [ "string" ], "StartsWith": [ "string" ] }

],

"Name": "string"

} ],

"CreatedTimestamp": number, "EventDataStoreArn": "string", "MultiRegionEnabled": boolean, "Name": "string",

"OrganizationEnabled": boolean, "RetentionPeriod": number, "Status": "string",

"TagsList": [ {

"Key": "string", "Value": "string"

} ],

"TerminationProtectionEnabled": boolean, "UpdatedTimestamp": number

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

AdvancedEventSelectors (p. 10)

The advanced event selectors that were used to select the events for the data store.

Type: Array of AdvancedEventSelector (p. 110) objects CreatedTimestamp (p. 10)

The timestamp that shows when the event data store was created.

Type: Timestamp EventDataStoreArn (p. 10)

The ARN of the event data store.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 256.

Pattern: ^[a-zA-Z0-9._/\-:]+$

MultiRegionEnabled (p. 10)

Indicates whether the event data store collects events from all regions, or only from the region in which it was created.

Type: Boolean Name (p. 10)

The name of the event data store.

(19)

Errors

Type: String

Length Constraints: Minimum length of 3. Maximum length of 128.

Pattern: ^[a-zA-Z0-9._\-]+$

OrganizationEnabled (p. 10)

Indicates whether an event data store is collecting logged events for an organization in AWS Organizations.

Type: Boolean RetentionPeriod (p. 10)

The retention period of an event data store, in days.

Type: Integer

Valid Range: Minimum value of 7. Maximum value of 2555.

Status (p. 10)

The status of event data store creation.

Type: String

Valid Values: CREATED | ENABLED | PENDING_DELETION TagsList (p. 10)

A list of tags.

Type: Array of Tag (p. 131) objects

Array Members: Maximum number of 200 items.

TerminationProtectionEnabled (p. 10)

Indicates whether termination protection is enabled for the event data store.

Type: Boolean

UpdatedTimestamp (p. 10)

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 in CreatedTimestamp.

Type: Timestamp

Errors

For information about the errors that are common to all actions, see Common Errors (p. 138).

CloudTrailAccessNotEnabledException

This exception is thrown when trusted access has not been enabled between AWS CloudTrail and AWS Organizations. For more information, see Enabling Trusted Access with Other AWS Services and Prepare For Creating a Trail For Your Organization.

HTTP Status Code: 400

(20)

Errors

ConflictException

This exception is thrown when the specified resource is not ready for an operation. This can occur when you try to run an operation on a trail before CloudTrail has time to fully load the trail. If this exception occurs, wait a few minutes, and then try the operation again.

HTTP Status Code: 400

EventDataStoreAlreadyExistsException

An event data store with that name already exists.

HTTP Status Code: 400

EventDataStoreMaxLimitExceededException

Your account has used the maximum number of event data stores.

HTTP Status Code: 400

InsufficientDependencyServiceAccessPermissionException

This exception is thrown when the IAM user or role that is used to create the organization trail is lacking one or more required permissions for creating an organization trail in a required service. For more information, see Prepare For Creating a Trail For Your Organization.

HTTP Status Code: 400 InvalidParameterException

The request includes a parameter that is not valid.

HTTP Status Code: 400 InvalidTagParameterException

This exception is thrown when the specified tag key or values are not valid. It can also occur if there are duplicate tags or too many tags on the resource.

HTTP Status Code: 400

NotOrganizationMasterAccountException

This exception is thrown when the AWS account making the request to create or update an organization trail is not the management account for an organization in AWS Organizations. For more information, see Prepare For Creating a Trail For Your Organization.

HTTP Status Code: 400 OperationNotPermittedException

This exception is thrown when the requested operation is not permitted.

HTTP Status Code: 400

OrganizationNotInAllFeaturesModeException

This exception is thrown when AWS Organizations is not configured to support all features. All features must be enabled in Organizations to support creating an organization trail. For more information, see Prepare For Creating a Trail For Your Organization.

HTTP Status Code: 400 OrganizationsNotInUseException

This exception is thrown when the request is made from an AWS account that is not a member of an organization. To make this request, sign in using the credentials of an account that belongs to an organization.

(21)

See Also

HTTP Status Code: 400 UnsupportedOperationException

This exception is thrown when the requested operation is not supported.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(22)

CreateTrail

CreateTrail

Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket.

Request Syntax

{ "CloudWatchLogsLogGroupArn": "string", "CloudWatchLogsRoleArn": "string", "EnableLogFileValidation": boolean, "IncludeGlobalServiceEvents": boolean, "IsMultiRegionTrail": boolean,

"IsOrganizationTrail": boolean, "KmsKeyId": "string",

"Name": "string",

"S3BucketName": "string", "S3KeyPrefix": "string", "SnsTopicName": "string", "TagsList": [

{

"Key": "string", "Value": "string"

} ]}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 136).

The request accepts the following data in JSON format.

CloudWatchLogsLogGroupArn (p. 15)

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. Not required unless you specify CloudWatchLogsRoleArn.

Type: String Required: No

CloudWatchLogsRoleArn (p. 15)

Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.

Type: String Required: No

EnableLogFileValidation (p. 15)

Specifies whether log file integrity validation is enabled. The default is false.

NoteWhen 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

(23)

Request Parameters

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.

Type: Boolean Required: No

IncludeGlobalServiceEvents (p. 15)

Specifies whether the trail is publishing events from global services such as IAM to the log files.

Type: Boolean Required: No

IsMultiRegionTrail (p. 15)

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.

Type: Boolean Required: No

IsOrganizationTrail (p. 15)

Specifies whether the trail is created for all accounts in an organization in AWS Organizations, or only for the current AWS account. The default is false, and cannot be true unless the call is made on behalf of an AWS account that is the management account for an organization in AWS Organizations.

Type: Boolean Required: No KmsKeyId (p. 15)

Specifies the AWS 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 AWS KMS multi-Region keys. For more information about multi-Region keys, see Using multi-Region keys in the AWS 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 Type: String

Required: No Name (p. 15)

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

(24)

Response Syntax

• Have no adjacent periods, underscores or dashes. Names like my-_namespace and my-- namespace are not valid.

• Not be in IP address format (for example, 192.168.5.4) Type: String

Required: Yes S3BucketName (p. 15)

Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements.

Type: String Required: Yes S3KeyPrefix (p. 15)

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.

Type: String Required: No SnsTopicName (p. 15)

Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.

Type: String Required: No TagsList (p. 15)

A list of tags.

Type: Array of Tag (p. 131) objects

Array Members: Maximum number of 200 items.

Required: No

Response Syntax

{ "CloudWatchLogsLogGroupArn": "string", "CloudWatchLogsRoleArn": "string", "IncludeGlobalServiceEvents": boolean, "IsMultiRegionTrail": boolean,

"IsOrganizationTrail": boolean, "KmsKeyId": "string",

"LogFileValidationEnabled": boolean, "Name": "string",

"S3BucketName": "string", "S3KeyPrefix": "string", "SnsTopicARN": "string", "SnsTopicName": "string", "TrailARN": "string"

(25)

Response Elements

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

CloudWatchLogsLogGroupArn (p. 17)

Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail logs will be delivered.

Type: String

CloudWatchLogsRoleArn (p. 17)

Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.

Type: String

IncludeGlobalServiceEvents (p. 17)

Specifies whether the trail is publishing events from global services such as IAM to the log files.

Type: Boolean IsMultiRegionTrail (p. 17)

Specifies whether the trail exists in one region or in all regions.

Type: Boolean

IsOrganizationTrail (p. 17)

Specifies whether the trail is an organization trail.

Type: Boolean KmsKeyId (p. 17)

Specifies the AWS KMS key ID that encrypts the logs delivered by CloudTrail. The value is a fully specified ARN to a AWS KMS key in the following format.

arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 Type: String

LogFileValidationEnabled (p. 17)

Specifies whether log file integrity validation is enabled.

Type: Boolean Name (p. 17)

Specifies the name of the trail.

Type: String S3BucketName (p. 17)

Specifies the name of the Amazon S3 bucket designated for publishing log files.

Type: String

(26)

Errors

S3KeyPrefix (p. 17)

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.

Type: String SnsTopicARN (p. 17)

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 Type: String

SnsTopicName (p. 17)

This parameter has been deprecated.

This field is no longer in use. Use CreateTrail:SnsTopicARN (p. 19).

Type: String TrailARN (p. 17)

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 Type: String

Errors

For information about the errors that are common to all actions, see Common Errors (p. 138).

CloudTrailAccessNotEnabledException

This exception is thrown when trusted access has not been enabled between AWS CloudTrail and AWS Organizations. For more information, see Enabling Trusted Access with Other AWS Services and Prepare For Creating a Trail For Your Organization.

HTTP Status Code: 400

CloudTrailInvalidClientTokenIdException

This exception is thrown when a call results in the InvalidClientTokenId error code. This can occur when you are creating or updating a trail to send notifications to an Amazon SNS topic that is in a suspended AWS account.

HTTP Status Code: 400

CloudWatchLogsDeliveryUnavailableException

Cannot set a CloudWatch Logs delivery for this region.

HTTP Status Code: 400 ConflictException

This exception is thrown when the specified resource is not ready for an operation. This can occur when you try to run an operation on a trail before CloudTrail has time to fully load the trail. If this exception occurs, wait a few minutes, and then try the operation again.

(27)

Errors

HTTP Status Code: 400

InsufficientDependencyServiceAccessPermissionException

This exception is thrown when the IAM user or role that is used to create the organization trail is lacking one or more required permissions for creating an organization trail in a required service. For more information, see Prepare For Creating a Trail For Your Organization.

HTTP Status Code: 400

InsufficientEncryptionPolicyException

This exception is thrown when the policy on the S3 bucket or AWS KMS key is not sufficient.

HTTP Status Code: 400

InsufficientS3BucketPolicyException

This exception is thrown when the policy on the S3 bucket is not sufficient.

HTTP Status Code: 400

InsufficientSnsTopicPolicyException

This exception is thrown when the policy on the Amazon SNS topic is not sufficient.

HTTP Status Code: 400

InvalidCloudWatchLogsLogGroupArnException

This exception is thrown when the provided CloudWatch Logs log group is not valid.

HTTP Status Code: 400

InvalidCloudWatchLogsRoleArnException

This exception is thrown when the provided role is not valid.

HTTP Status Code: 400 InvalidKmsKeyIdException

This exception is thrown when the AWS KMS key ARN is not valid.

HTTP Status Code: 400

InvalidParameterCombinationException

This exception is thrown when the combination of parameters provided is not valid.

HTTP Status Code: 400 InvalidS3BucketNameException

This exception is thrown when the provided S3 bucket name is not valid.

HTTP Status Code: 400 InvalidS3PrefixException

This exception is thrown when the provided S3 prefix is not valid.

HTTP Status Code: 400 InvalidSnsTopicNameException

This exception is thrown when the provided SNS topic name is not valid.

(28)

Errors

HTTP Status Code: 400 InvalidTagParameterException

This exception is thrown when the specified tag key or values are not valid. It can also occur if there are duplicate tags or too many tags on the resource.

HTTP Status Code: 400 InvalidTrailNameException

This exception is thrown when the provided trail name is not valid. Trail names 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 and my-- namespace are not valid.

• Not be in IP address format (for example, 192.168.5.4) HTTP Status Code: 400

KmsException

This exception is thrown when there is an issue with the specified AWS KMS key and the trail can’t be updated.

HTTP Status Code: 400 KmsKeyDisabledException

This error has been deprecated.

This exception is no longer in use.

HTTP Status Code: 400 KmsKeyNotFoundException

This exception is thrown when the AWS KMS key does not exist, when the S3 bucket and the AWS KMS key are not in the same region, or when the AWS KMS key associated with the Amazon SNS topic either does not exist or is not in the same region.

HTTP Status Code: 400

MaximumNumberOfTrailsExceededException

This exception is thrown when the maximum number of trails is reached.

HTTP Status Code: 400

NotOrganizationMasterAccountException

This exception is thrown when the AWS account making the request to create or update an organization trail is not the management account for an organization in AWS Organizations. For more information, see Prepare For Creating a Trail For Your Organization.

HTTP Status Code: 400 OperationNotPermittedException

This exception is thrown when the requested operation is not permitted.

HTTP Status Code: 400

(29)

See Also

OrganizationNotInAllFeaturesModeException

This exception is thrown when AWS Organizations is not configured to support all features. All features must be enabled in Organizations to support creating an organization trail. For more information, see Prepare For Creating a Trail For Your Organization.

HTTP Status Code: 400 OrganizationsNotInUseException

This exception is thrown when the request is made from an AWS account that is not a member of an organization. To make this request, sign in using the credentials of an account that belongs to an organization.

HTTP Status Code: 400 S3BucketDoesNotExistException

This exception is thrown when the specified S3 bucket does not exist.

HTTP Status Code: 400 TrailAlreadyExistsException

This exception is thrown when the specified trail already exists.

HTTP Status Code: 400 TrailNotProvidedException

This exception is no longer in use.

HTTP Status Code: 400 UnsupportedOperationException

This exception is thrown when the requested operation is not supported.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(30)

DeleteEventDataStore

DeleteEventDataStore

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; this operation cannot work if TerminationProtectionEnabled is True.

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.

Request Syntax

{ "EventDataStore": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 136).

The request accepts the following data in JSON format.

EventDataStore (p. 23)

The ARN (or the ID suffix of the ARN) of the event data store to delete.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 256.

Pattern: ^[a-zA-Z0-9._/\-:]+$

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 138).

EventDataStoreARNInvalidException

The specified event data store ARN is not valid or does not map to an event data store in your account.

HTTP Status Code: 400

EventDataStoreNotFoundException

The specified event data store was not found.

(31)

See Also

HTTP Status Code: 400

EventDataStoreTerminationProtectedException

The event data store cannot be deleted because termination protection is enabled for it.

HTTP Status Code: 400

InsufficientDependencyServiceAccessPermissionException

This exception is thrown when the IAM user or role that is used to create the organization trail is lacking one or more required permissions for creating an organization trail in a required service. For more information, see Prepare For Creating a Trail For Your Organization.

HTTP Status Code: 400 InvalidParameterException

The request includes a parameter that is not valid.

HTTP Status Code: 400

NotOrganizationMasterAccountException

This exception is thrown when the AWS account making the request to create or update an organization trail is not the management account for an organization in AWS Organizations. For more information, see Prepare For Creating a Trail For Your Organization.

HTTP Status Code: 400 OperationNotPermittedException

This exception is thrown when the requested operation is not permitted.

HTTP Status Code: 400 UnsupportedOperationException

This exception is thrown when the requested operation is not supported.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(32)

DeleteTrail

DeleteTrail

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.

Request Syntax

{

"Name": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 136).

The request accepts the following data in JSON format.

Name (p. 25)

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

Type: String Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 138).

ConflictException

This exception is thrown when the specified resource is not ready for an operation. This can occur when you try to run an operation on a trail before CloudTrail has time to fully load the trail. If this exception occurs, wait a few minutes, and then try the operation again.

HTTP Status Code: 400

InsufficientDependencyServiceAccessPermissionException

This exception is thrown when the IAM user or role that is used to create the organization trail is lacking one or more required permissions for creating an organization trail in a required service. For more information, see Prepare For Creating a Trail For Your Organization.

HTTP Status Code: 400 InvalidHomeRegionException

This exception is thrown when an operation is called on a trail from a region other than the region in which the trail was created.

(33)

See Also

HTTP Status Code: 400 InvalidTrailNameException

This exception is thrown when the provided trail name is not valid. Trail names 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 and my-- namespace are not valid.

• Not be in IP address format (for example, 192.168.5.4) HTTP Status Code: 400

NotOrganizationMasterAccountException

This exception is thrown when the AWS account making the request to create or update an organization trail is not the management account for an organization in AWS Organizations. For more information, see Prepare For Creating a Trail For Your Organization.

HTTP Status Code: 400 OperationNotPermittedException

This exception is thrown when the requested operation is not permitted.

HTTP Status Code: 400 TrailNotFoundException

This exception is thrown when the trail with the given name is not found.

HTTP Status Code: 400 UnsupportedOperationException

This exception is thrown when the requested operation is not supported.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(34)

DescribeQuery

DescribeQuery

Returns metadata about a query, including query run time in milliseconds, number of events scanned and matched, and query status. You must specify an ARN for EventDataStore, and a value for QueryID.

Request Syntax

{ "EventDataStore": "string", "QueryId": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 136).

The request accepts the following data in JSON format.

EventDataStore (p. 27)

The ARN (or the ID suffix of the ARN) of an event data store on which the specified query was run.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 256.

Pattern: ^[a-zA-Z0-9._/\-:]+$

Required: Yes QueryId (p. 27)

The query ID.

Type: String

Length Constraints: Fixed length of 36.

Pattern: ^[a-f0-9\-]+$

Required: Yes

Response Syntax

{

"ErrorMessage": "string", "QueryId": "string", "QueryStatistics": { "CreationTime": number, "EventsMatched": number, "EventsScanned": number, "ExecutionTimeInMillis": number },

"QueryStatus": "string", "QueryString": "string"

(35)

Response Elements

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

ErrorMessage (p. 27)

The error message returned if a query failed.

Type: String

Length Constraints: Minimum length of 4. Maximum length of 1000.

Pattern: .*

QueryId (p. 27)

The ID of the query.

Type: String

Length Constraints: Fixed length of 36.

Pattern: ^[a-f0-9\-]+$

QueryStatistics (p. 27)

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.

Type: QueryStatisticsForDescribeQuery (p. 128) object QueryStatus (p. 27)

The status of a query. Values for QueryStatus include QUEUED, RUNNING, FINISHED, FAILED, or CANCELLED

Type: String

Valid Values: QUEUED | RUNNING | FINISHED | FAILED | CANCELLED QueryString (p. 27)

The SQL code of a query.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 10000.

Pattern: (?s).*

Errors

For information about the errors that are common to all actions, see Common Errors (p. 138).

EventDataStoreARNInvalidException

The specified event data store ARN is not valid or does not map to an event data store in your account.

(36)

See Also

HTTP Status Code: 400

EventDataStoreNotFoundException

The specified event data store was not found.

HTTP Status Code: 400 InactiveEventDataStoreException

The event data store against which you ran your query is inactive.

HTTP Status Code: 400 InvalidParameterException

The request includes a parameter that is not valid.

HTTP Status Code: 400 OperationNotPermittedException

This exception is thrown when the requested operation is not permitted.

HTTP Status Code: 400 QueryIdNotFoundException

The query ID does not exist or does not map to a query.

HTTP Status Code: 400 UnsupportedOperationException

This exception is thrown when the requested operation is not supported.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(37)

DescribeTrails

DescribeTrails

Retrieves settings for one or more trails associated with the current region for your account.

Request Syntax

{ "includeShadowTrails": boolean, "trailNameList": [ "string" ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 136).

The request accepts the following data in JSON format.

includeShadowTrails (p. 30)

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.

Type: Boolean Required: No trailNameList (p. 30)

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.

NoteIf 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. To return information about a trail in another region, you must specify its trail ARN.

Type: Array of strings Required: No

Response Syntax

{ "trailList": [

(38)

Response Elements

{

"CloudWatchLogsLogGroupArn": "string", "CloudWatchLogsRoleArn": "string", "HasCustomEventSelectors": boolean, "HasInsightSelectors": boolean, "HomeRegion": "string",

"IncludeGlobalServiceEvents": boolean, "IsMultiRegionTrail": boolean,

"IsOrganizationTrail": boolean, "KmsKeyId": "string",

"LogFileValidationEnabled": boolean, "Name": "string",

"S3BucketName": "string", "S3KeyPrefix": "string", "SnsTopicARN": "string", "SnsTopicName": "string", "TrailARN": "string"

} ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

trailList (p. 30)

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 and SNSTopicARN 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 AWS KMS customer managed keys.

Type: Array of Trail (p. 132) objects

Errors

For information about the errors that are common to all actions, see Common Errors (p. 138).

InvalidTrailNameException

This exception is thrown when the provided trail name is not valid. Trail names 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 and my-- namespace are not valid.

• Not be in IP address format (for example, 192.168.5.4) HTTP Status Code: 400

OperationNotPermittedException

This exception is thrown when the requested operation is not permitted.

HTTP Status Code: 400

(39)

See Also

UnsupportedOperationException

This exception is thrown when the requested operation is not supported.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(40)

GetEventDataStore

GetEventDataStore

Returns information about an event data store specified as either an ARN or the ID portion of the ARN.

Request Syntax

{

"EventDataStore": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 136).

The request accepts the following data in JSON format.

EventDataStore (p. 33)

The ARN (or ID suffix of the ARN) of the event data store about which you want information.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 256.

Pattern: ^[a-zA-Z0-9._/\-:]+$

Required: Yes

Response Syntax

{

"AdvancedEventSelectors": [ {

"FieldSelectors": [ {

"EndsWith": [ "string" ], "Equals": [ "string" ], "Field": "string",

"NotEndsWith": [ "string" ], "NotEquals": [ "string" ], "NotStartsWith": [ "string" ], "StartsWith": [ "string" ] }

],

"Name": "string"

} ],

"CreatedTimestamp": number, "EventDataStoreArn": "string", "MultiRegionEnabled": boolean, "Name": "string",

"OrganizationEnabled": boolean, "RetentionPeriod": number, "Status": "string",

"TerminationProtectionEnabled": boolean, "UpdatedTimestamp": number

(41)

Response Elements

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

AdvancedEventSelectors (p. 33)

The advanced event selectors used to select events for the data store.

Type: Array of AdvancedEventSelector (p. 110) objects CreatedTimestamp (p. 33)

The timestamp of the event data store's creation.

Type: Timestamp EventDataStoreArn (p. 33)

The event data store Amazon Resource Number (ARN).

Type: String

Length Constraints: Minimum length of 3. Maximum length of 256.

Pattern: ^[a-zA-Z0-9._/\-:]+$

MultiRegionEnabled (p. 33)

Indicates whether the event data store includes events from all regions, or only from the region in which it was created.

Type: Boolean Name (p. 33)

The name of the event data store.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 128.

Pattern: ^[a-zA-Z0-9._\-]+$

OrganizationEnabled (p. 33)

Indicates whether an event data store is collecting logged events for an organization in AWS Organizations.

Type: Boolean RetentionPeriod (p. 33)

The retention period of the event data store, in days.

Type: Integer

Valid Range: Minimum value of 7. Maximum value of 2555.

Status (p. 33)

The status of an event data store. Values can be ENABLED and PENDING_DELETION.

(42)

Errors

Type: String

Valid Values: CREATED | ENABLED | PENDING_DELETION TerminationProtectionEnabled (p. 33)

Indicates that termination protection is enabled.

Type: Boolean

UpdatedTimestamp (p. 33)

Shows the time that an event data store was updated, if applicable. UpdatedTimestamp is always either the same or newer than the time shown in CreatedTimestamp.

Type: Timestamp

Errors

For information about the errors that are common to all actions, see Common Errors (p. 138).

EventDataStoreARNInvalidException

The specified event data store ARN is not valid or does not map to an event data store in your account.

HTTP Status Code: 400

EventDataStoreNotFoundException

The specified event data store was not found.

HTTP Status Code: 400 InvalidParameterException

The request includes a parameter that is not valid.

HTTP Status Code: 400 OperationNotPermittedException

This exception is thrown when the requested operation is not permitted.

HTTP Status Code: 400 UnsupportedOperationException

This exception is thrown when the requested operation is not supported.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

(43)

See Also

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(44)

GetEventSelectors

GetEventSelectors

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, see Logging Data and Management Events for Trails in the AWS CloudTrail User Guide.

Request Syntax

{ "TrailName": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 136).

The request accepts the following data in JSON format.

TrailName (p. 37)

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 and my-- 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 Type: String

Required: Yes

Response Syntax

{ "AdvancedEventSelectors": [ {

"FieldSelectors": [ {

(45)

Response Elements

"EndsWith": [ "string" ], "Equals": [ "string" ], "Field": "string",

"NotEndsWith": [ "string" ], "NotEquals": [ "string" ], "NotStartsWith": [ "string" ], "StartsWith": [ "string" ] }

],

"Name": "string"

} ],

"EventSelectors": [ {

"DataResources": [ {

"Type": "string", "Values": [ "string" ] }

],

"ExcludeManagementEventSources": [ "string" ], "IncludeManagementEvents": boolean,

"ReadWriteType": "string"

} ],

"TrailARN": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

AdvancedEventSelectors (p. 37)

The advanced event selectors that are configured for the trail.

Type: Array of AdvancedEventSelector (p. 110) objects EventSelectors (p. 37)

The event selectors that are configured for the trail.

Type: Array of EventSelector (p. 121) objects TrailARN (p. 37)

The specified trail ARN that has the event selectors.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors (p. 138).

InvalidTrailNameException

This exception is thrown when the provided trail name is not valid. Trail names must meet the following requirements:

• Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)

(46)

See Also

• 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 and my-- namespace are not valid.

• Not be in IP address format (for example, 192.168.5.4) HTTP Status Code: 400

OperationNotPermittedException

This exception is thrown when the requested operation is not permitted.

HTTP Status Code: 400 TrailNotFoundException

This exception is thrown when the trail with the given name is not found.

HTTP Status Code: 400 UnsupportedOperationException

This exception is thrown when the requested operation is not supported.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(47)

GetInsightSelectors

GetInsightSelectors

Describes the settings for the Insights event selectors that you configured for your trail.

GetInsightSelectors shows if CloudTrail Insights event logging is enabled on the trail, and if it is, which insight types are enabled. If you run GetInsightSelectors on a trail that does not have Insights events enabled, the operation throws the exception InsightNotEnabledException

For more information, see Logging CloudTrail Insights Events for Trails in the AWS CloudTrail User Guide.

Request Syntax

{

"TrailName": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 136).

The request accepts the following data in JSON format.

TrailName (p. 40)

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 and my-- 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 Type: String

Required: Yes

Response Syntax

{ "InsightSelectors": [ {

"InsightType": "string"

} ],

"TrailARN": "string"

}

參考文獻

相關文件

In this way, we can take these bits and by using the IFFT, we can create an output signal which is actually a time-domain OFDM signal.. The IFFT is a mathematical concept and does

Given proxies, find the optimal placement of the proxies in the network, such that the overall access cost(including both read and update costs) is minimized.. For an

In order to facilitate the schools using integrated or mixed mode of curriculum organization to adopt the modules of Life and Society (S1-3) for improving their

Courtesy: Ned Wright’s Cosmology Page Burles, Nolette & Turner, 1999?. Total Mass Density

According to the United Nations Educational, Scientific and Cultural Organization (UNESCO), a language is considered endangered when “its speakers cease to use it, use it in fewer

The case where all the ρ s are equal to identity shows that this is not true in general (in this case the irreducible representations are lines, and we have an infinity of ways

• Use table to create a table for column-oriented or tabular data that is often stored as columns in a spreadsheet.. • Use detectImportOptions to create import options based on

– if an unmasked exception occurs, the current FPU instruction is interrupted and the FPU signals an exception. – But the main CPU does not check for pending FPU