cloudtrail.d.ts (47886B)
1 import {Request} from '../lib/request'; 2 import {Response} from '../lib/response'; 3 import {AWSError} from '../lib/error'; 4 import {Service} from '../lib/service'; 5 import {ServiceConfigurationOptions} from '../lib/service'; 6 import {ConfigBase as Config} from '../lib/config'; 7 interface Blob {} 8 declare class CloudTrail extends Service { 9 /** 10 * Constructs a service object. This object has one method for each API operation. 11 */ 12 constructor(options?: CloudTrail.Types.ClientConfiguration) 13 config: Config & CloudTrail.Types.ClientConfiguration; 14 /** 15 * Adds one or more tags to a trail, up to a limit of 50. Tags must be unique per trail. Overwrites an existing tag's value when a new value is specified for an existing tag key. 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 regions only from the region in which the trail was created (that is, from its home region). 16 */ 17 addTags(params: CloudTrail.Types.AddTagsRequest, callback?: (err: AWSError, data: CloudTrail.Types.AddTagsResponse) => void): Request<CloudTrail.Types.AddTagsResponse, AWSError>; 18 /** 19 * Adds one or more tags to a trail, up to a limit of 50. Tags must be unique per trail. Overwrites an existing tag's value when a new value is specified for an existing tag key. 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 regions only from the region in which the trail was created (that is, from its home region). 20 */ 21 addTags(callback?: (err: AWSError, data: CloudTrail.Types.AddTagsResponse) => void): Request<CloudTrail.Types.AddTagsResponse, AWSError>; 22 /** 23 * Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket. A maximum of five trails can exist in a region, irrespective of the region in which they were created. 24 */ 25 createTrail(params: CloudTrail.Types.CreateTrailRequest, callback?: (err: AWSError, data: CloudTrail.Types.CreateTrailResponse) => void): Request<CloudTrail.Types.CreateTrailResponse, AWSError>; 26 /** 27 * Creates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket. A maximum of five trails can exist in a region, irrespective of the region in which they were created. 28 */ 29 createTrail(callback?: (err: AWSError, data: CloudTrail.Types.CreateTrailResponse) => void): Request<CloudTrail.Types.CreateTrailResponse, AWSError>; 30 /** 31 * 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. 32 */ 33 deleteTrail(params: CloudTrail.Types.DeleteTrailRequest, callback?: (err: AWSError, data: CloudTrail.Types.DeleteTrailResponse) => void): Request<CloudTrail.Types.DeleteTrailResponse, AWSError>; 34 /** 35 * 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. 36 */ 37 deleteTrail(callback?: (err: AWSError, data: CloudTrail.Types.DeleteTrailResponse) => void): Request<CloudTrail.Types.DeleteTrailResponse, AWSError>; 38 /** 39 * Retrieves settings for the trail associated with the current region for your account. 40 */ 41 describeTrails(params: CloudTrail.Types.DescribeTrailsRequest, callback?: (err: AWSError, data: CloudTrail.Types.DescribeTrailsResponse) => void): Request<CloudTrail.Types.DescribeTrailsResponse, AWSError>; 42 /** 43 * Retrieves settings for the trail associated with the current region for your account. 44 */ 45 describeTrails(callback?: (err: AWSError, data: CloudTrail.Types.DescribeTrailsResponse) => void): Request<CloudTrail.Types.DescribeTrailsResponse, AWSError>; 46 /** 47 * Describes the settings for the event selectors that you configured for your trail. The information returned for your event selectors includes the following: The S3 objects that you are logging for data events. If your event selector includes management events. If your event selector includes read-only events, write-only events, or all. For more information, see Configuring Event Selectors for Trails in the AWS CloudTrail User Guide. 48 */ 49 getEventSelectors(params: CloudTrail.Types.GetEventSelectorsRequest, callback?: (err: AWSError, data: CloudTrail.Types.GetEventSelectorsResponse) => void): Request<CloudTrail.Types.GetEventSelectorsResponse, AWSError>; 50 /** 51 * Describes the settings for the event selectors that you configured for your trail. The information returned for your event selectors includes the following: The S3 objects that you are logging for data events. If your event selector includes management events. If your event selector includes read-only events, write-only events, or all. For more information, see Configuring Event Selectors for Trails in the AWS CloudTrail User Guide. 52 */ 53 getEventSelectors(callback?: (err: AWSError, data: CloudTrail.Types.GetEventSelectorsResponse) => void): Request<CloudTrail.Types.GetEventSelectorsResponse, AWSError>; 54 /** 55 * 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. 56 */ 57 getTrailStatus(params: CloudTrail.Types.GetTrailStatusRequest, callback?: (err: AWSError, data: CloudTrail.Types.GetTrailStatusResponse) => void): Request<CloudTrail.Types.GetTrailStatusResponse, AWSError>; 58 /** 59 * 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. 60 */ 61 getTrailStatus(callback?: (err: AWSError, data: CloudTrail.Types.GetTrailStatusResponse) => void): Request<CloudTrail.Types.GetTrailStatusResponse, AWSError>; 62 /** 63 * 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. CloudTrail uses different private/public key pairs per region. Each digest file is signed with a private key unique to its region. Therefore, when you validate a digest file from a particular region, you must look in the same region for its corresponding public key. 64 */ 65 listPublicKeys(params: CloudTrail.Types.ListPublicKeysRequest, callback?: (err: AWSError, data: CloudTrail.Types.ListPublicKeysResponse) => void): Request<CloudTrail.Types.ListPublicKeysResponse, AWSError>; 66 /** 67 * 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. CloudTrail uses different private/public key pairs per region. Each digest file is signed with a private key unique to its region. Therefore, when you validate a digest file from a particular region, you must look in the same region for its corresponding public key. 68 */ 69 listPublicKeys(callback?: (err: AWSError, data: CloudTrail.Types.ListPublicKeysResponse) => void): Request<CloudTrail.Types.ListPublicKeysResponse, AWSError>; 70 /** 71 * Lists the tags for the trail in the current region. 72 */ 73 listTags(params: CloudTrail.Types.ListTagsRequest, callback?: (err: AWSError, data: CloudTrail.Types.ListTagsResponse) => void): Request<CloudTrail.Types.ListTagsResponse, AWSError>; 74 /** 75 * Lists the tags for the trail in the current region. 76 */ 77 listTags(callback?: (err: AWSError, data: CloudTrail.Types.ListTagsResponse) => void): Request<CloudTrail.Types.ListTagsResponse, AWSError>; 78 /** 79 * Looks up API activity events captured by CloudTrail that create, update, or delete resources in your account. Events for a region can be looked up for the times in which you had CloudTrail turned on in that region during the last seven days. Lookup supports the following attributes: Event ID Event name Resource name Resource type User name All attributes are optional. The default number of results returned is 10, 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 one per second per account. If this limit is exceeded, a throttling error occurs. Events that occurred during the selected time range will not be available for lookup if CloudTrail logging was not enabled when the events occurred. 80 */ 81 lookupEvents(params: CloudTrail.Types.LookupEventsRequest, callback?: (err: AWSError, data: CloudTrail.Types.LookupEventsResponse) => void): Request<CloudTrail.Types.LookupEventsResponse, AWSError>; 82 /** 83 * Looks up API activity events captured by CloudTrail that create, update, or delete resources in your account. Events for a region can be looked up for the times in which you had CloudTrail turned on in that region during the last seven days. Lookup supports the following attributes: Event ID Event name Resource name Resource type User name All attributes are optional. The default number of results returned is 10, 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 one per second per account. If this limit is exceeded, a throttling error occurs. Events that occurred during the selected time range will not be available for lookup if CloudTrail logging was not enabled when the events occurred. 84 */ 85 lookupEvents(callback?: (err: AWSError, data: CloudTrail.Types.LookupEventsResponse) => void): Request<CloudTrail.Types.LookupEventsResponse, AWSError>; 86 /** 87 * Configures an event selector for your trail. Use event selectors to specify the type of events that you want your trail to log. When an event occurs in your account, CloudTrail evaluates the 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 and RunInstances 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 but it 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 is thrown. You can configure up to five event selectors for each trail. For more information, see Configuring Event Selectors for Trails in the AWS CloudTrail User Guide. 88 */ 89 putEventSelectors(params: CloudTrail.Types.PutEventSelectorsRequest, callback?: (err: AWSError, data: CloudTrail.Types.PutEventSelectorsResponse) => void): Request<CloudTrail.Types.PutEventSelectorsResponse, AWSError>; 90 /** 91 * Configures an event selector for your trail. Use event selectors to specify the type of events that you want your trail to log. When an event occurs in your account, CloudTrail evaluates the 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 and RunInstances 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 but it 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 is thrown. You can configure up to five event selectors for each trail. For more information, see Configuring Event Selectors for Trails in the AWS CloudTrail User Guide. 92 */ 93 putEventSelectors(callback?: (err: AWSError, data: CloudTrail.Types.PutEventSelectorsResponse) => void): Request<CloudTrail.Types.PutEventSelectorsResponse, AWSError>; 94 /** 95 * Removes the specified tags from a trail. 96 */ 97 removeTags(params: CloudTrail.Types.RemoveTagsRequest, callback?: (err: AWSError, data: CloudTrail.Types.RemoveTagsResponse) => void): Request<CloudTrail.Types.RemoveTagsResponse, AWSError>; 98 /** 99 * Removes the specified tags from a trail. 100 */ 101 removeTags(callback?: (err: AWSError, data: CloudTrail.Types.RemoveTagsResponse) => void): Request<CloudTrail.Types.RemoveTagsResponse, AWSError>; 102 /** 103 * Starts the recording of AWS 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. 104 */ 105 startLogging(params: CloudTrail.Types.StartLoggingRequest, callback?: (err: AWSError, data: CloudTrail.Types.StartLoggingResponse) => void): Request<CloudTrail.Types.StartLoggingResponse, AWSError>; 106 /** 107 * Starts the recording of AWS 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. 108 */ 109 startLogging(callback?: (err: AWSError, data: CloudTrail.Types.StartLoggingResponse) => void): Request<CloudTrail.Types.StartLoggingResponse, AWSError>; 110 /** 111 * Suspends the recording of AWS 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. 112 */ 113 stopLogging(params: CloudTrail.Types.StopLoggingRequest, callback?: (err: AWSError, data: CloudTrail.Types.StopLoggingResponse) => void): Request<CloudTrail.Types.StopLoggingResponse, AWSError>; 114 /** 115 * Suspends the recording of AWS 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. 116 */ 117 stopLogging(callback?: (err: AWSError, data: CloudTrail.Types.StopLoggingResponse) => void): Request<CloudTrail.Types.StopLoggingResponse, AWSError>; 118 /** 119 * Updates the settings that specify delivery of 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. 120 */ 121 updateTrail(params: CloudTrail.Types.UpdateTrailRequest, callback?: (err: AWSError, data: CloudTrail.Types.UpdateTrailResponse) => void): Request<CloudTrail.Types.UpdateTrailResponse, AWSError>; 122 /** 123 * Updates the settings that specify delivery of 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. 124 */ 125 updateTrail(callback?: (err: AWSError, data: CloudTrail.Types.UpdateTrailResponse) => void): Request<CloudTrail.Types.UpdateTrailResponse, AWSError>; 126 } 127 declare namespace CloudTrail.Types { 128 export interface AddTagsRequest { 129 /** 130 * 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-1:123456789012:trail/MyTrail 131 */ 132 ResourceId: String; 133 /** 134 * Contains a list of CloudTrail tags, up to a limit of 50 135 */ 136 TagsList?: TagsList; 137 } 138 export interface AddTagsResponse { 139 } 140 export type Boolean = boolean; 141 export type ByteBuffer = Buffer|Uint8Array|Blob|string; 142 export interface CreateTrailRequest { 143 /** 144 * 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 and my--namespace are invalid. Not be in IP address format (for example, 192.168.5.4) 145 */ 146 Name: String; 147 /** 148 * Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements. 149 */ 150 S3BucketName: String; 151 /** 152 * 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. 153 */ 154 S3KeyPrefix?: String; 155 /** 156 * Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters. 157 */ 158 SnsTopicName?: String; 159 /** 160 * Specifies whether the trail is publishing events from global services such as IAM to the log files. 161 */ 162 IncludeGlobalServiceEvents?: Boolean; 163 /** 164 * Specifies whether the trail is created in the current region or in all regions. The default is false. 165 */ 166 IsMultiRegionTrail?: Boolean; 167 /** 168 * Specifies whether log file integrity validation is enabled. The default is false. When you disable log file integrity validation, the chain of digest files is broken after one hour. CloudTrail will 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. 169 */ 170 EnableLogFileValidation?: Boolean; 171 /** 172 * 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. 173 */ 174 CloudWatchLogsLogGroupArn?: String; 175 /** 176 * Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group. 177 */ 178 CloudWatchLogsRoleArn?: String; 179 /** 180 * Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be a 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. Examples: alias/MyAliasName arn:aws:kms:us-east-1:123456789012:alias/MyAliasName arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 12345678-1234-1234-1234-123456789012 181 */ 182 KmsKeyId?: String; 183 } 184 export interface CreateTrailResponse { 185 /** 186 * Specifies the name of the trail. 187 */ 188 Name?: String; 189 /** 190 * Specifies the name of the Amazon S3 bucket designated for publishing log files. 191 */ 192 S3BucketName?: String; 193 /** 194 * 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. 195 */ 196 S3KeyPrefix?: String; 197 /** 198 * This field is deprecated. Use SnsTopicARN. 199 */ 200 SnsTopicName?: String; 201 /** 202 * 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-1:123456789012:MyTopic 203 */ 204 SnsTopicARN?: String; 205 /** 206 * Specifies whether the trail is publishing events from global services such as IAM to the log files. 207 */ 208 IncludeGlobalServiceEvents?: Boolean; 209 /** 210 * Specifies whether the trail exists in one region or in all regions. 211 */ 212 IsMultiRegionTrail?: Boolean; 213 /** 214 * Specifies the ARN of the trail that was created. The format of a trail ARN is: arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail 215 */ 216 TrailARN?: String; 217 /** 218 * Specifies whether log file integrity validation is enabled. 219 */ 220 LogFileValidationEnabled?: Boolean; 221 /** 222 * Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail logs will be delivered. 223 */ 224 CloudWatchLogsLogGroupArn?: String; 225 /** 226 * Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group. 227 */ 228 CloudWatchLogsRoleArn?: String; 229 /** 230 * 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 format: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 231 */ 232 KmsKeyId?: String; 233 } 234 export interface DataResource { 235 /** 236 * The resource type in which you want to log data events. You can specify only the following value: AWS::S3::Object. 237 */ 238 Type?: String; 239 /** 240 * A list of ARN-like strings for the specified S3 objects. 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. 241 */ 242 Values?: DataResourceValues; 243 } 244 export type DataResourceValues = String[]; 245 export type DataResources = DataResource[]; 246 export type _Date = Date; 247 export interface DeleteTrailRequest { 248 /** 249 * Specifies the name or the CloudTrail ARN of the trail to be deleted. The format of a trail ARN is: arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail 250 */ 251 Name: String; 252 } 253 export interface DeleteTrailResponse { 254 } 255 export interface DescribeTrailsRequest { 256 /** 257 * 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-1: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. 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. To return information about a trail in another region, you must specify its trail ARN. 258 */ 259 trailNameList?: TrailNameList; 260 /** 261 * 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. The default is true. 262 */ 263 includeShadowTrails?: Boolean; 264 } 265 export interface DescribeTrailsResponse { 266 /** 267 * The list of trail objects. 268 */ 269 trailList?: TrailList; 270 } 271 export interface Event { 272 /** 273 * The CloudTrail ID of the event returned. 274 */ 275 EventId?: String; 276 /** 277 * The name of the event returned. 278 */ 279 EventName?: String; 280 /** 281 * The date and time of the event returned. 282 */ 283 EventTime?: _Date; 284 /** 285 * The AWS service that the request was made to. 286 */ 287 EventSource?: String; 288 /** 289 * A user name or role name of the requester that called the API in the event returned. 290 */ 291 Username?: String; 292 /** 293 * A list of resources referenced by the event returned. 294 */ 295 Resources?: ResourceList; 296 /** 297 * A JSON string that contains a representation of the event returned. 298 */ 299 CloudTrailEvent?: String; 300 } 301 export interface EventSelector { 302 /** 303 * 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 and RunInstances is a write-only API operation. By default, the value is All. 304 */ 305 ReadWriteType?: ReadWriteType; 306 /** 307 * Specify if you want your event selector to include management events for your trail. For more information, see Management Events in the AWS CloudTrail User Guide. By default, the value is true. 308 */ 309 IncludeManagementEvents?: Boolean; 310 /** 311 * CloudTrail supports logging only data events for S3 objects. You can specify up to 50 S3 buckets and object prefixes for an event selector. For more information, see Data Events in the AWS CloudTrail User Guide. 312 */ 313 DataResources?: DataResources; 314 } 315 export type EventSelectors = EventSelector[]; 316 export type EventsList = Event[]; 317 export interface GetEventSelectorsRequest { 318 /** 319 * 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 invalid. 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-1:123456789012:trail/MyTrail 320 */ 321 TrailName?: String; 322 } 323 export interface GetEventSelectorsResponse { 324 /** 325 * The specified trail ARN that has the event selectors. 326 */ 327 TrailARN?: String; 328 /** 329 * The event selectors that are configured for the trail. 330 */ 331 EventSelectors?: EventSelectors; 332 } 333 export interface GetTrailStatusRequest { 334 /** 335 * 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 format of a trail ARN is: arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail 336 */ 337 Name: String; 338 } 339 export interface GetTrailStatusResponse { 340 /** 341 * Whether the CloudTrail is currently logging AWS API calls. 342 */ 343 IsLogging?: Boolean; 344 /** 345 * Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver log files to the designated bucket. For more information see the topic Error Responses in the Amazon S3 API Reference. This error occurs only when there is a problem with the destination S3 bucket and will not occur for timeouts. To resolve the issue, create a new bucket and call UpdateTrail to specify the new bucket, or fix the existing objects so that CloudTrail can again write to the bucket. 346 */ 347 LatestDeliveryError?: String; 348 /** 349 * 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. 350 */ 351 LatestNotificationError?: String; 352 /** 353 * Specifies the date and time that CloudTrail last delivered log files to an account's Amazon S3 bucket. 354 */ 355 LatestDeliveryTime?: _Date; 356 /** 357 * 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. 358 */ 359 LatestNotificationTime?: _Date; 360 /** 361 * Specifies the most recent date and time when CloudTrail started recording API calls for an AWS account. 362 */ 363 StartLoggingTime?: _Date; 364 /** 365 * Specifies the most recent date and time when CloudTrail stopped recording API calls for an AWS account. 366 */ 367 StopLoggingTime?: _Date; 368 /** 369 * Displays any CloudWatch Logs error that CloudTrail encountered when attempting to deliver logs to CloudWatch Logs. 370 */ 371 LatestCloudWatchLogsDeliveryError?: String; 372 /** 373 * Displays the most recent date and time when CloudTrail delivered logs to CloudWatch Logs. 374 */ 375 LatestCloudWatchLogsDeliveryTime?: _Date; 376 /** 377 * Specifies the date and time that CloudTrail last delivered a digest file to an account's Amazon S3 bucket. 378 */ 379 LatestDigestDeliveryTime?: _Date; 380 /** 381 * Displays any Amazon S3 error that CloudTrail encountered when attempting to deliver a digest file to the designated bucket. For more information see the topic Error Responses in the Amazon S3 API Reference. This error occurs only when there is a problem with the destination S3 bucket and will not occur for timeouts. To resolve the issue, create a new bucket and call UpdateTrail to specify the new bucket, or fix the existing objects so that CloudTrail can again write to the bucket. 382 */ 383 LatestDigestDeliveryError?: String; 384 /** 385 * This field is deprecated. 386 */ 387 LatestDeliveryAttemptTime?: String; 388 /** 389 * This field is deprecated. 390 */ 391 LatestNotificationAttemptTime?: String; 392 /** 393 * This field is deprecated. 394 */ 395 LatestNotificationAttemptSucceeded?: String; 396 /** 397 * This field is deprecated. 398 */ 399 LatestDeliveryAttemptSucceeded?: String; 400 /** 401 * This field is deprecated. 402 */ 403 TimeLoggingStarted?: String; 404 /** 405 * This field is deprecated. 406 */ 407 TimeLoggingStopped?: String; 408 } 409 export interface ListPublicKeysRequest { 410 /** 411 * 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. 412 */ 413 StartTime?: _Date; 414 /** 415 * 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. 416 */ 417 EndTime?: _Date; 418 /** 419 * Reserved for future use. 420 */ 421 NextToken?: String; 422 } 423 export interface ListPublicKeysResponse { 424 /** 425 * Contains an array of PublicKey objects. The returned public keys may have validity time ranges that overlap. 426 */ 427 PublicKeyList?: PublicKeyList; 428 /** 429 * Reserved for future use. 430 */ 431 NextToken?: String; 432 } 433 export interface ListTagsRequest { 434 /** 435 * Specifies a list of trail ARNs whose tags will be listed. The list has a limit of 20 ARNs. The format of a trail ARN is: arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail 436 */ 437 ResourceIdList: ResourceIdList; 438 /** 439 * Reserved for future use. 440 */ 441 NextToken?: String; 442 } 443 export interface ListTagsResponse { 444 ResourceTagList?: ResourceTagList; 445 /** 446 * Reserved for future use. 447 */ 448 NextToken?: String; 449 } 450 export interface LookupAttribute { 451 /** 452 * Specifies an attribute on which to filter the events returned. 453 */ 454 AttributeKey: LookupAttributeKey; 455 /** 456 * Specifies a value for the specified AttributeKey. 457 */ 458 AttributeValue: String; 459 } 460 export type LookupAttributeKey = "EventId"|"EventName"|"Username"|"ResourceType"|"ResourceName"|"EventSource"|string; 461 export type LookupAttributesList = LookupAttribute[]; 462 export interface LookupEventsRequest { 463 /** 464 * Contains a list of lookup attributes. Currently the list can contain only one item. 465 */ 466 LookupAttributes?: LookupAttributesList; 467 /** 468 * 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. 469 */ 470 StartTime?: _Date; 471 /** 472 * 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. 473 */ 474 EndTime?: _Date; 475 /** 476 * The number of events to return. Possible values are 1 through 50. The default is 10. 477 */ 478 MaxResults?: MaxResults; 479 /** 480 * 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 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. 481 */ 482 NextToken?: NextToken; 483 } 484 export interface LookupEventsResponse { 485 /** 486 * 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. 487 */ 488 Events?: EventsList; 489 /** 490 * 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. 491 */ 492 NextToken?: NextToken; 493 } 494 export type MaxResults = number; 495 export type NextToken = string; 496 export interface PublicKey { 497 /** 498 * The DER encoded public key value in PKCS#1 format. 499 */ 500 Value?: ByteBuffer; 501 /** 502 * The starting time of validity of the public key. 503 */ 504 ValidityStartTime?: _Date; 505 /** 506 * The ending time of validity of the public key. 507 */ 508 ValidityEndTime?: _Date; 509 /** 510 * The fingerprint of the public key. 511 */ 512 Fingerprint?: String; 513 } 514 export type PublicKeyList = PublicKey[]; 515 export interface PutEventSelectorsRequest { 516 /** 517 * 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 invalid. 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-1:123456789012:trail/MyTrail 518 */ 519 TrailName?: String; 520 /** 521 * Specifies the settings for your event selectors. You can configure up to five event selectors for a trail. 522 */ 523 EventSelectors?: EventSelectors; 524 } 525 export interface PutEventSelectorsResponse { 526 /** 527 * Specifies the ARN of the trail that was updated with event selectors. The format of a trail ARN is: arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail 528 */ 529 TrailARN?: String; 530 /** 531 * Specifies the event selectors configured for your trail. 532 */ 533 EventSelectors?: EventSelectors; 534 } 535 export type ReadWriteType = "ReadOnly"|"WriteOnly"|"All"|string; 536 export interface RemoveTagsRequest { 537 /** 538 * Specifies the ARN of the trail from which tags should be removed. The format of a trail ARN is: arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail 539 */ 540 ResourceId: String; 541 /** 542 * Specifies a list of tags to be removed. 543 */ 544 TagsList?: TagsList; 545 } 546 export interface RemoveTagsResponse { 547 } 548 export interface Resource { 549 /** 550 * 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 RDS, and AccessKey for IAM. For a list of resource types supported for event lookup, see Resource Types Supported for Event Lookup. 551 */ 552 ResourceType?: String; 553 /** 554 * 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. 555 */ 556 ResourceName?: String; 557 } 558 export type ResourceIdList = String[]; 559 export type ResourceList = Resource[]; 560 export interface ResourceTag { 561 /** 562 * Specifies the ARN of the resource. 563 */ 564 ResourceId?: String; 565 TagsList?: TagsList; 566 } 567 export type ResourceTagList = ResourceTag[]; 568 export interface StartLoggingRequest { 569 /** 570 * Specifies the name or the CloudTrail ARN of the trail for which CloudTrail logs AWS API calls. The format of a trail ARN is: arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail 571 */ 572 Name: String; 573 } 574 export interface StartLoggingResponse { 575 } 576 export interface StopLoggingRequest { 577 /** 578 * Specifies the name or the CloudTrail ARN of the trail for which CloudTrail will stop logging AWS API calls. The format of a trail ARN is: arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail 579 */ 580 Name: String; 581 } 582 export interface StopLoggingResponse { 583 } 584 export type String = string; 585 export interface Tag { 586 /** 587 * 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. 588 */ 589 Key: String; 590 /** 591 * The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters. 592 */ 593 Value?: String; 594 } 595 export type TagsList = Tag[]; 596 export interface Trail { 597 /** 598 * Name of the trail set by calling CreateTrail. The maximum length is 128 characters. 599 */ 600 Name?: String; 601 /** 602 * Name of the Amazon S3 bucket into which CloudTrail delivers your trail files. See Amazon S3 Bucket Naming Requirements. 603 */ 604 S3BucketName?: String; 605 /** 606 * 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. 607 */ 608 S3KeyPrefix?: String; 609 /** 610 * This field is deprecated. Use SnsTopicARN. 611 */ 612 SnsTopicName?: String; 613 /** 614 * 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-1:123456789012:MyTopic 615 */ 616 SnsTopicARN?: String; 617 /** 618 * Set to True to include AWS API calls from AWS global services such as IAM. Otherwise, False. 619 */ 620 IncludeGlobalServiceEvents?: Boolean; 621 /** 622 * Specifies whether the trail belongs only to one region or exists in all regions. 623 */ 624 IsMultiRegionTrail?: Boolean; 625 /** 626 * The region in which the trail was created. 627 */ 628 HomeRegion?: String; 629 /** 630 * Specifies the ARN of the trail. The format of a trail ARN is: arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail 631 */ 632 TrailARN?: String; 633 /** 634 * Specifies whether log file validation is enabled. 635 */ 636 LogFileValidationEnabled?: Boolean; 637 /** 638 * Specifies an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered. 639 */ 640 CloudWatchLogsLogGroupArn?: String; 641 /** 642 * Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group. 643 */ 644 CloudWatchLogsRoleArn?: String; 645 /** 646 * 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 format: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 647 */ 648 KmsKeyId?: String; 649 /** 650 * Specifies if the trail has custom event selectors. 651 */ 652 HasCustomEventSelectors?: Boolean; 653 } 654 export type TrailList = Trail[]; 655 export type TrailNameList = String[]; 656 export interface UpdateTrailRequest { 657 /** 658 * 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 and my--namespace are invalid. Not be in IP address format (for example, 192.168.5.4) If Name is a trail ARN, it must be in the format: arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail 659 */ 660 Name: String; 661 /** 662 * Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements. 663 */ 664 S3BucketName?: String; 665 /** 666 * 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. 667 */ 668 S3KeyPrefix?: String; 669 /** 670 * Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters. 671 */ 672 SnsTopicName?: String; 673 /** 674 * Specifies whether the trail is publishing events from global services such as IAM to the log files. 675 */ 676 IncludeGlobalServiceEvents?: Boolean; 677 /** 678 * 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. 679 */ 680 IsMultiRegionTrail?: Boolean; 681 /** 682 * Specifies whether log file validation is enabled. The default is false. When you disable log file integrity validation, the chain of digest files is broken after one hour. CloudTrail will 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. 683 */ 684 EnableLogFileValidation?: Boolean; 685 /** 686 * 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. 687 */ 688 CloudWatchLogsLogGroupArn?: String; 689 /** 690 * Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group. 691 */ 692 CloudWatchLogsRoleArn?: String; 693 /** 694 * Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be a 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. Examples: alias/MyAliasName arn:aws:kms:us-east-1:123456789012:alias/MyAliasName arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 12345678-1234-1234-1234-123456789012 695 */ 696 KmsKeyId?: String; 697 } 698 export interface UpdateTrailResponse { 699 /** 700 * Specifies the name of the trail. 701 */ 702 Name?: String; 703 /** 704 * Specifies the name of the Amazon S3 bucket designated for publishing log files. 705 */ 706 S3BucketName?: String; 707 /** 708 * 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. 709 */ 710 S3KeyPrefix?: String; 711 /** 712 * This field is deprecated. Use SnsTopicARN. 713 */ 714 SnsTopicName?: String; 715 /** 716 * 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-1:123456789012:MyTopic 717 */ 718 SnsTopicARN?: String; 719 /** 720 * Specifies whether the trail is publishing events from global services such as IAM to the log files. 721 */ 722 IncludeGlobalServiceEvents?: Boolean; 723 /** 724 * Specifies whether the trail exists in one region or in all regions. 725 */ 726 IsMultiRegionTrail?: Boolean; 727 /** 728 * Specifies the ARN of the trail that was updated. The format of a trail ARN is: arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail 729 */ 730 TrailARN?: String; 731 /** 732 * Specifies whether log file integrity validation is enabled. 733 */ 734 LogFileValidationEnabled?: Boolean; 735 /** 736 * Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail logs will be delivered. 737 */ 738 CloudWatchLogsLogGroupArn?: String; 739 /** 740 * Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group. 741 */ 742 CloudWatchLogsRoleArn?: String; 743 /** 744 * 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 format: arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 745 */ 746 KmsKeyId?: String; 747 } 748 /** 749 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version. 750 */ 751 export type apiVersion = "2013-11-01"|"latest"|string; 752 export interface ClientApiVersions { 753 /** 754 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version. 755 */ 756 apiVersion?: apiVersion; 757 } 758 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions; 759 } 760 export = CloudTrail;