cloudtraildata.d.ts 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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-base';
  7. interface Blob {}
  8. declare class CloudTrailData extends Service {
  9. /**
  10. * Constructs a service object. This object has one method for each API operation.
  11. */
  12. constructor(options?: CloudTrailData.Types.ClientConfiguration)
  13. config: Config & CloudTrailData.Types.ClientConfiguration;
  14. /**
  15. * Ingests your application events into CloudTrail Lake. A required parameter, auditEvents, accepts the JSON records (also called payload) of events that you want CloudTrail to ingest. You can add up to 100 of these events (or up to 1 MB) per PutAuditEvents request.
  16. */
  17. putAuditEvents(params: CloudTrailData.Types.PutAuditEventsRequest, callback?: (err: AWSError, data: CloudTrailData.Types.PutAuditEventsResponse) => void): Request<CloudTrailData.Types.PutAuditEventsResponse, AWSError>;
  18. /**
  19. * Ingests your application events into CloudTrail Lake. A required parameter, auditEvents, accepts the JSON records (also called payload) of events that you want CloudTrail to ingest. You can add up to 100 of these events (or up to 1 MB) per PutAuditEvents request.
  20. */
  21. putAuditEvents(callback?: (err: AWSError, data: CloudTrailData.Types.PutAuditEventsResponse) => void): Request<CloudTrailData.Types.PutAuditEventsResponse, AWSError>;
  22. }
  23. declare namespace CloudTrailData {
  24. export interface AuditEvent {
  25. /**
  26. * The content of an audit event that comes from the event, such as userIdentity, userAgent, and eventSource.
  27. */
  28. eventData: String;
  29. /**
  30. * A checksum is a base64-SHA256 algorithm that helps you verify that CloudTrail receives the event that matches with the checksum. Calculate the checksum by running a command like the following: printf %s $eventdata | openssl dgst -binary -sha256 | base64
  31. */
  32. eventDataChecksum?: String;
  33. /**
  34. * The original event ID from the source event.
  35. */
  36. id: Uuid;
  37. }
  38. export type AuditEventResultEntries = AuditEventResultEntry[];
  39. export interface AuditEventResultEntry {
  40. /**
  41. * The event ID assigned by CloudTrail.
  42. */
  43. eventID: Uuid;
  44. /**
  45. * The original event ID from the source event.
  46. */
  47. id: Uuid;
  48. }
  49. export type AuditEvents = AuditEvent[];
  50. export type ChannelArn = string;
  51. export type ErrorCode = string;
  52. export type ErrorMessage = string;
  53. export type ExternalId = string;
  54. export interface PutAuditEventsRequest {
  55. /**
  56. * The JSON payload of events that you want to ingest. You can also point to the JSON event payload in a file.
  57. */
  58. auditEvents: AuditEvents;
  59. /**
  60. * The ARN or ID (the ARN suffix) of a channel.
  61. */
  62. channelArn: ChannelArn;
  63. /**
  64. * A unique identifier that is conditionally required when the channel's resource policy includes an external ID. This value can be any string, such as a passphrase or account number.
  65. */
  66. externalId?: ExternalId;
  67. }
  68. export interface PutAuditEventsResponse {
  69. /**
  70. * Lists events in the provided event payload that could not be ingested into CloudTrail, and includes the error code and error message returned for events that could not be ingested.
  71. */
  72. failed: ResultErrorEntries;
  73. /**
  74. * Lists events in the provided event payload that were successfully ingested into CloudTrail.
  75. */
  76. successful: AuditEventResultEntries;
  77. }
  78. export type ResultErrorEntries = ResultErrorEntry[];
  79. export interface ResultErrorEntry {
  80. /**
  81. * The error code for events that could not be ingested by CloudTrail. Possible error codes include: FieldTooLong, FieldNotFound, InvalidChecksum, InvalidData, InvalidRecipient, InvalidEventSource, AccountNotSubscribed, Throttling, and InternalFailure.
  82. */
  83. errorCode: ErrorCode;
  84. /**
  85. * The message that describes the error for events that could not be ingested by CloudTrail.
  86. */
  87. errorMessage: ErrorMessage;
  88. /**
  89. * The original event ID from the source event that could not be ingested by CloudTrail.
  90. */
  91. id: Uuid;
  92. }
  93. export type String = string;
  94. export type Uuid = string;
  95. /**
  96. * 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.
  97. */
  98. export type apiVersion = "2021-08-11"|"latest"|string;
  99. export interface ClientApiVersions {
  100. /**
  101. * 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.
  102. */
  103. apiVersion?: apiVersion;
  104. }
  105. export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
  106. /**
  107. * Contains interfaces for use with the CloudTrailData client.
  108. */
  109. export import Types = CloudTrailData;
  110. }
  111. export = CloudTrailData;