@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api AWS CloudTrail
@version 2013-11-01
@auth AWS SigV4
@endpoints 49
@hint download_for_search
@toc root(49)

@endpoint POST /
@required {ResourceId: str, TagsList: [Tag]}

@endpoint POST /
@required {QueryId: str}
@optional {EventDataStore: str}
@returns(200) {QueryId: str, QueryStatus: str}

@endpoint POST /
@required {Name: str, Source: str, Destinations: [Destination]}
@optional {Tags: [Tag]}
@returns(200) {ChannelArn: str?, Name: str?, Source: str?, Destinations: [Destination]?, Tags: [Tag]?}

@endpoint POST /
@required {Name: str}
@optional {AdvancedEventSelectors: [AdvancedEventSelector], MultiRegionEnabled: bool, OrganizationEnabled: bool, RetentionPeriod: int, TerminationProtectionEnabled: bool, TagsList: [Tag], KmsKeyId: str, StartIngestion: bool, BillingMode: str}
@returns(200) {EventDataStoreArn: str?, Name: str?, Status: str?, AdvancedEventSelectors: [AdvancedEventSelector]?, MultiRegionEnabled: bool?, OrganizationEnabled: bool?, RetentionPeriod: int?, TerminationProtectionEnabled: bool?, TagsList: [Tag]?, CreatedTimestamp: str(timestamp)?, UpdatedTimestamp: str(timestamp)?, KmsKeyId: str?, BillingMode: str?}

@endpoint POST /
@required {Name: str, S3BucketName: str}
@optional {S3KeyPrefix: str, SnsTopicName: str, IncludeGlobalServiceEvents: bool, IsMultiRegionTrail: bool, EnableLogFileValidation: bool, CloudWatchLogsLogGroupArn: str, CloudWatchLogsRoleArn: str, KmsKeyId: str, IsOrganizationTrail: bool, TagsList: [Tag]}
@returns(200) {Name: str?, S3BucketName: str?, S3KeyPrefix: str?, SnsTopicName: str?, SnsTopicARN: str?, IncludeGlobalServiceEvents: bool?, IsMultiRegionTrail: bool?, TrailARN: str?, LogFileValidationEnabled: bool?, CloudWatchLogsLogGroupArn: str?, CloudWatchLogsRoleArn: str?, KmsKeyId: str?, IsOrganizationTrail: bool?}

@endpoint POST /
@required {Channel: str}

@endpoint POST /
@required {EventDataStore: str}

@endpoint POST /
@required {ResourceArn: str}

@endpoint POST /
@required {Name: str}

@endpoint POST /
@required {DelegatedAdminAccountId: str}

@endpoint POST /
@optional {EventDataStore: str, QueryId: str, QueryAlias: str}
@returns(200) {QueryId: str?, QueryString: str?, QueryStatus: str?, QueryStatistics: QueryStatisticsForDescribeQuery?{EventsMatched: int(i64)?, EventsScanned: int(i64)?, BytesScanned: int(i64)?, ExecutionTimeInMillis: int?, CreationTime: str(timestamp)?}, ErrorMessage: str?, DeliveryS3Uri: str?, DeliveryStatus: str?}

@endpoint POST /
@optional {trailNameList: [str], includeShadowTrails: bool}
@returns(200) {trailList: [Trail]?}

@endpoint POST /
@required {EventDataStore: str}
@returns(200) {EventDataStoreArn: str?, FederationStatus: str?}

@endpoint POST /
@required {EventDataStore: str, FederationRoleArn: str}
@returns(200) {EventDataStoreArn: str?, FederationStatus: str?, FederationRoleArn: str?}

@endpoint POST /
@required {Channel: str}
@returns(200) {ChannelArn: str?, Name: str?, Source: str?, SourceConfig: SourceConfig?{ApplyToAllRegions: bool?, AdvancedEventSelectors: [AdvancedEventSelector]?}, Destinations: [Destination]?, IngestionStatus: IngestionStatus?{LatestIngestionSuccessTime: str(timestamp)?, LatestIngestionSuccessEventID: str?, LatestIngestionErrorCode: str?, LatestIngestionAttemptTime: str(timestamp)?, LatestIngestionAttemptEventID: str?}}

@endpoint POST /
@required {EventDataStore: str}
@returns(200) {EventDataStoreArn: str?, Name: str?, Status: str?, AdvancedEventSelectors: [AdvancedEventSelector]?, MultiRegionEnabled: bool?, OrganizationEnabled: bool?, RetentionPeriod: int?, TerminationProtectionEnabled: bool?, CreatedTimestamp: str(timestamp)?, UpdatedTimestamp: str(timestamp)?, KmsKeyId: str?, BillingMode: str?, FederationStatus: str?, FederationRoleArn: str?, PartitionKeys: [PartitionKey]?}

@endpoint POST /
@required {TrailName: str}
@returns(200) {TrailARN: str?, EventSelectors: [EventSelector]?, AdvancedEventSelectors: [AdvancedEventSelector]?}

@endpoint POST /
@required {ImportId: str}
@returns(200) {ImportId: str?, Destinations: [str]?, ImportSource: ImportSource?{S3: S3ImportSource{S3LocationUri: str, S3BucketRegion: str, S3BucketAccessRoleArn: str}}, StartEventTime: str(timestamp)?, EndEventTime: str(timestamp)?, ImportStatus: str?, CreatedTimestamp: str(timestamp)?, UpdatedTimestamp: str(timestamp)?, ImportStatistics: ImportStatistics?{PrefixesFound: int(i64)?, PrefixesCompleted: int(i64)?, FilesCompleted: int(i64)?, EventsCompleted: int(i64)?, FailedEntries: int(i64)?}}

@endpoint POST /
@optional {TrailName: str, EventDataStore: str}
@returns(200) {TrailARN: str?, InsightSelectors: [InsightSelector]?, EventDataStoreArn: str?, InsightsDestination: str?}

@endpoint POST /
@required {QueryId: str}
@optional {EventDataStore: str, NextToken: str, MaxQueryResults: int}
@returns(200) {QueryStatus: str?, QueryStatistics: QueryStatistics?{ResultsCount: int?, TotalResultsCount: int?, BytesScanned: int(i64)?}, QueryResultRows: [[map<str,str>]]?, NextToken: str?, ErrorMessage: str?}

@endpoint POST /
@required {ResourceArn: str}
@returns(200) {ResourceArn: str?, ResourcePolicy: str?}

@endpoint POST /
@required {Name: str}
@returns(200) {Trail: Trail?{Name: str?, S3BucketName: str?, S3KeyPrefix: str?, SnsTopicName: str?, SnsTopicARN: str?, IncludeGlobalServiceEvents: bool?, IsMultiRegionTrail: bool?, HomeRegion: str?, TrailARN: str?, LogFileValidationEnabled: bool?, CloudWatchLogsLogGroupArn: str?, CloudWatchLogsRoleArn: str?, KmsKeyId: str?, HasCustomEventSelectors: bool?, HasInsightSelectors: bool?, IsOrganizationTrail: bool?}}

@endpoint POST /
@required {Name: str}
@returns(200) {IsLogging: bool?, LatestDeliveryError: str?, LatestNotificationError: str?, LatestDeliveryTime: str(timestamp)?, LatestNotificationTime: str(timestamp)?, StartLoggingTime: str(timestamp)?, StopLoggingTime: str(timestamp)?, LatestCloudWatchLogsDeliveryError: str?, LatestCloudWatchLogsDeliveryTime: str(timestamp)?, LatestDigestDeliveryTime: str(timestamp)?, LatestDigestDeliveryError: str?, LatestDeliveryAttemptTime: str?, LatestNotificationAttemptTime: str?, LatestNotificationAttemptSucceeded: str?, LatestDeliveryAttemptSucceeded: str?, TimeLoggingStarted: str?, TimeLoggingStopped: str?}

@endpoint POST /
@optional {MaxResults: int, NextToken: str}
@returns(200) {Channels: [Channel]?, NextToken: str?}

@endpoint POST /
@optional {NextToken: str, MaxResults: int}
@returns(200) {EventDataStores: [EventDataStore]?, NextToken: str?}

@endpoint POST /
@required {ImportId: str}
@optional {MaxResults: int, NextToken: str}
@returns(200) {Failures: [ImportFailureListItem]?, NextToken: str?}

@endpoint POST /
@optional {MaxResults: int, Destination: str, ImportStatus: str, NextToken: str}
@returns(200) {Imports: [ImportsListItem]?, NextToken: str?}

@endpoint POST /
@required {EventSource: str, EventName: str, InsightType: str}
@optional {ErrorCode: str, StartTime: str(timestamp), EndTime: str(timestamp), Period: int, DataType: str, MaxResults: int, NextToken: str}
@returns(200) {EventSource: str?, EventName: str?, InsightType: str?, ErrorCode: str?, Timestamps: [str(timestamp)]?, Values: [num(f64)]?, NextToken: str?}

@endpoint POST /
@optional {StartTime: str(timestamp), EndTime: str(timestamp), NextToken: str}
@returns(200) {PublicKeyList: [PublicKey]?, NextToken: str?}

@endpoint POST /
@required {EventDataStore: str}
@optional {NextToken: str, MaxResults: int, StartTime: str(timestamp), EndTime: str(timestamp), QueryStatus: str}
@returns(200) {Queries: [Query]?, NextToken: str?}

@endpoint POST /
@required {ResourceIdList: [str]}
@optional {NextToken: str}
@returns(200) {ResourceTagList: [ResourceTag]?, NextToken: str?}

@endpoint POST /
@optional {NextToken: str}
@returns(200) {Trails: [TrailInfo]?, NextToken: str?}

@endpoint POST /
@optional {LookupAttributes: [LookupAttribute], StartTime: str(timestamp), EndTime: str(timestamp), EventCategory: str, MaxResults: int, NextToken: str}
@returns(200) {Events: [Event]?, NextToken: str?}

@endpoint POST /
@required {TrailName: str}
@optional {EventSelectors: [EventSelector], AdvancedEventSelectors: [AdvancedEventSelector]}
@returns(200) {TrailARN: str?, EventSelectors: [EventSelector]?, AdvancedEventSelectors: [AdvancedEventSelector]?}

@endpoint POST /
@required {InsightSelectors: [InsightSelector]}
@optional {TrailName: str, EventDataStore: str, InsightsDestination: str}
@returns(200) {TrailARN: str?, InsightSelectors: [InsightSelector]?, EventDataStoreArn: str?, InsightsDestination: str?}

@endpoint POST /
@required {ResourceArn: str, ResourcePolicy: str}
@returns(200) {ResourceArn: str?, ResourcePolicy: str?}

@endpoint POST /
@required {MemberAccountId: str}

@endpoint POST /
@required {ResourceId: str, TagsList: [Tag]}

@endpoint POST /
@required {EventDataStore: str}
@returns(200) {EventDataStoreArn: str?, Name: str?, Status: str?, AdvancedEventSelectors: [AdvancedEventSelector]?, MultiRegionEnabled: bool?, OrganizationEnabled: bool?, RetentionPeriod: int?, TerminationProtectionEnabled: bool?, CreatedTimestamp: str(timestamp)?, UpdatedTimestamp: str(timestamp)?, KmsKeyId: str?, BillingMode: str?}

@endpoint POST /
@required {EventDataStore: str}

@endpoint POST /
@optional {Destinations: [str], ImportSource: ImportSource, StartEventTime: str(timestamp), EndEventTime: str(timestamp), ImportId: str}
@returns(200) {ImportId: str?, Destinations: [str]?, ImportSource: ImportSource?{S3: S3ImportSource{S3LocationUri: str, S3BucketRegion: str, S3BucketAccessRoleArn: str}}, StartEventTime: str(timestamp)?, EndEventTime: str(timestamp)?, ImportStatus: str?, CreatedTimestamp: str(timestamp)?, UpdatedTimestamp: str(timestamp)?}

@endpoint POST /
@required {Name: str}

@endpoint POST /
@optional {QueryStatement: str, DeliveryS3Uri: str, QueryAlias: str, QueryParameters: [str]}
@returns(200) {QueryId: str?}

@endpoint POST /
@required {EventDataStore: str}

@endpoint POST /
@required {ImportId: str}
@returns(200) {ImportId: str?, ImportSource: ImportSource?{S3: S3ImportSource{S3LocationUri: str, S3BucketRegion: str, S3BucketAccessRoleArn: str}}, Destinations: [str]?, ImportStatus: str?, CreatedTimestamp: str(timestamp)?, UpdatedTimestamp: str(timestamp)?, StartEventTime: str(timestamp)?, EndEventTime: str(timestamp)?, ImportStatistics: ImportStatistics?{PrefixesFound: int(i64)?, PrefixesCompleted: int(i64)?, FilesCompleted: int(i64)?, EventsCompleted: int(i64)?, FailedEntries: int(i64)?}}

@endpoint POST /
@required {Name: str}

@endpoint POST /
@required {Channel: str}
@optional {Destinations: [Destination], Name: str}
@returns(200) {ChannelArn: str?, Name: str?, Source: str?, Destinations: [Destination]?}

@endpoint POST /
@required {EventDataStore: str}
@optional {Name: str, AdvancedEventSelectors: [AdvancedEventSelector], MultiRegionEnabled: bool, OrganizationEnabled: bool, RetentionPeriod: int, TerminationProtectionEnabled: bool, KmsKeyId: str, BillingMode: str}
@returns(200) {EventDataStoreArn: str?, Name: str?, Status: str?, AdvancedEventSelectors: [AdvancedEventSelector]?, MultiRegionEnabled: bool?, OrganizationEnabled: bool?, RetentionPeriod: int?, TerminationProtectionEnabled: bool?, CreatedTimestamp: str(timestamp)?, UpdatedTimestamp: str(timestamp)?, KmsKeyId: str?, BillingMode: str?, FederationStatus: str?, FederationRoleArn: str?}

@endpoint POST /
@required {Name: str}
@optional {S3BucketName: str, S3KeyPrefix: str, SnsTopicName: str, IncludeGlobalServiceEvents: bool, IsMultiRegionTrail: bool, EnableLogFileValidation: bool, CloudWatchLogsLogGroupArn: str, CloudWatchLogsRoleArn: str, KmsKeyId: str, IsOrganizationTrail: bool}
@returns(200) {Name: str?, S3BucketName: str?, S3KeyPrefix: str?, SnsTopicName: str?, SnsTopicARN: str?, IncludeGlobalServiceEvents: bool?, IsMultiRegionTrail: bool?, TrailARN: str?, LogFileValidationEnabled: bool?, CloudWatchLogsLogGroupArn: str?, CloudWatchLogsRoleArn: str?, KmsKeyId: str?, IsOrganizationTrail: bool?}

@end
