api.go 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package cloudtrail provides a client for AWS CloudTrail.
  3. package cloudtrail
  4. import (
  5. "fmt"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. )
  10. const opAddTags = "AddTags"
  11. // AddTagsRequest generates a "aws/request.Request" representing the
  12. // client's request for the AddTags operation. The "output" return
  13. // value can be used to capture response data after the request's "Send" method
  14. // is called.
  15. //
  16. // Creating a request object using this method should be used when you want to inject
  17. // custom logic into the request's lifecycle using a custom handler, or if you want to
  18. // access properties on the request object before or after sending the request. If
  19. // you just want the service response, call the AddTags method directly
  20. // instead.
  21. //
  22. // Note: You must call the "Send" method on the returned request object in order
  23. // to execute the request.
  24. //
  25. // // Example sending a request using the AddTagsRequest method.
  26. // req, resp := client.AddTagsRequest(params)
  27. //
  28. // err := req.Send()
  29. // if err == nil { // resp is now filled
  30. // fmt.Println(resp)
  31. // }
  32. //
  33. func (c *CloudTrail) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) {
  34. op := &request.Operation{
  35. Name: opAddTags,
  36. HTTPMethod: "POST",
  37. HTTPPath: "/",
  38. }
  39. if input == nil {
  40. input = &AddTagsInput{}
  41. }
  42. req = c.newRequest(op, input, output)
  43. output = &AddTagsOutput{}
  44. req.Data = output
  45. return
  46. }
  47. // Adds one or more tags to a trail, up to a limit of 10. Tags must be unique
  48. // per trail. Overwrites an existing tag's value when a new value is specified
  49. // for an existing tag key. If you specify a key without a value, the tag will
  50. // be created with the specified key and a value of null. You can tag a trail
  51. // that applies to all regions only from the region in which the trail was created
  52. // (that is, from its home region).
  53. func (c *CloudTrail) AddTags(input *AddTagsInput) (*AddTagsOutput, error) {
  54. req, out := c.AddTagsRequest(input)
  55. err := req.Send()
  56. return out, err
  57. }
  58. const opCreateTrail = "CreateTrail"
  59. // CreateTrailRequest generates a "aws/request.Request" representing the
  60. // client's request for the CreateTrail operation. The "output" return
  61. // value can be used to capture response data after the request's "Send" method
  62. // is called.
  63. //
  64. // Creating a request object using this method should be used when you want to inject
  65. // custom logic into the request's lifecycle using a custom handler, or if you want to
  66. // access properties on the request object before or after sending the request. If
  67. // you just want the service response, call the CreateTrail method directly
  68. // instead.
  69. //
  70. // Note: You must call the "Send" method on the returned request object in order
  71. // to execute the request.
  72. //
  73. // // Example sending a request using the CreateTrailRequest method.
  74. // req, resp := client.CreateTrailRequest(params)
  75. //
  76. // err := req.Send()
  77. // if err == nil { // resp is now filled
  78. // fmt.Println(resp)
  79. // }
  80. //
  81. func (c *CloudTrail) CreateTrailRequest(input *CreateTrailInput) (req *request.Request, output *CreateTrailOutput) {
  82. op := &request.Operation{
  83. Name: opCreateTrail,
  84. HTTPMethod: "POST",
  85. HTTPPath: "/",
  86. }
  87. if input == nil {
  88. input = &CreateTrailInput{}
  89. }
  90. req = c.newRequest(op, input, output)
  91. output = &CreateTrailOutput{}
  92. req.Data = output
  93. return
  94. }
  95. // Creates a trail that specifies the settings for delivery of log data to an
  96. // Amazon S3 bucket. A maximum of five trails can exist in a region, irrespective
  97. // of the region in which they were created.
  98. func (c *CloudTrail) CreateTrail(input *CreateTrailInput) (*CreateTrailOutput, error) {
  99. req, out := c.CreateTrailRequest(input)
  100. err := req.Send()
  101. return out, err
  102. }
  103. const opDeleteTrail = "DeleteTrail"
  104. // DeleteTrailRequest generates a "aws/request.Request" representing the
  105. // client's request for the DeleteTrail operation. The "output" return
  106. // value can be used to capture response data after the request's "Send" method
  107. // is called.
  108. //
  109. // Creating a request object using this method should be used when you want to inject
  110. // custom logic into the request's lifecycle using a custom handler, or if you want to
  111. // access properties on the request object before or after sending the request. If
  112. // you just want the service response, call the DeleteTrail method directly
  113. // instead.
  114. //
  115. // Note: You must call the "Send" method on the returned request object in order
  116. // to execute the request.
  117. //
  118. // // Example sending a request using the DeleteTrailRequest method.
  119. // req, resp := client.DeleteTrailRequest(params)
  120. //
  121. // err := req.Send()
  122. // if err == nil { // resp is now filled
  123. // fmt.Println(resp)
  124. // }
  125. //
  126. func (c *CloudTrail) DeleteTrailRequest(input *DeleteTrailInput) (req *request.Request, output *DeleteTrailOutput) {
  127. op := &request.Operation{
  128. Name: opDeleteTrail,
  129. HTTPMethod: "POST",
  130. HTTPPath: "/",
  131. }
  132. if input == nil {
  133. input = &DeleteTrailInput{}
  134. }
  135. req = c.newRequest(op, input, output)
  136. output = &DeleteTrailOutput{}
  137. req.Data = output
  138. return
  139. }
  140. // Deletes a trail. This operation must be called from the region in which the
  141. // trail was created. DeleteTrail cannot be called on the shadow trails (replicated
  142. // trails in other regions) of a trail that is enabled in all regions.
  143. func (c *CloudTrail) DeleteTrail(input *DeleteTrailInput) (*DeleteTrailOutput, error) {
  144. req, out := c.DeleteTrailRequest(input)
  145. err := req.Send()
  146. return out, err
  147. }
  148. const opDescribeTrails = "DescribeTrails"
  149. // DescribeTrailsRequest generates a "aws/request.Request" representing the
  150. // client's request for the DescribeTrails operation. The "output" return
  151. // value can be used to capture response data after the request's "Send" method
  152. // is called.
  153. //
  154. // Creating a request object using this method should be used when you want to inject
  155. // custom logic into the request's lifecycle using a custom handler, or if you want to
  156. // access properties on the request object before or after sending the request. If
  157. // you just want the service response, call the DescribeTrails method directly
  158. // instead.
  159. //
  160. // Note: You must call the "Send" method on the returned request object in order
  161. // to execute the request.
  162. //
  163. // // Example sending a request using the DescribeTrailsRequest method.
  164. // req, resp := client.DescribeTrailsRequest(params)
  165. //
  166. // err := req.Send()
  167. // if err == nil { // resp is now filled
  168. // fmt.Println(resp)
  169. // }
  170. //
  171. func (c *CloudTrail) DescribeTrailsRequest(input *DescribeTrailsInput) (req *request.Request, output *DescribeTrailsOutput) {
  172. op := &request.Operation{
  173. Name: opDescribeTrails,
  174. HTTPMethod: "POST",
  175. HTTPPath: "/",
  176. }
  177. if input == nil {
  178. input = &DescribeTrailsInput{}
  179. }
  180. req = c.newRequest(op, input, output)
  181. output = &DescribeTrailsOutput{}
  182. req.Data = output
  183. return
  184. }
  185. // Retrieves settings for the trail associated with the current region for your
  186. // account.
  187. func (c *CloudTrail) DescribeTrails(input *DescribeTrailsInput) (*DescribeTrailsOutput, error) {
  188. req, out := c.DescribeTrailsRequest(input)
  189. err := req.Send()
  190. return out, err
  191. }
  192. const opGetTrailStatus = "GetTrailStatus"
  193. // GetTrailStatusRequest generates a "aws/request.Request" representing the
  194. // client's request for the GetTrailStatus operation. The "output" return
  195. // value can be used to capture response data after the request's "Send" method
  196. // is called.
  197. //
  198. // Creating a request object using this method should be used when you want to inject
  199. // custom logic into the request's lifecycle using a custom handler, or if you want to
  200. // access properties on the request object before or after sending the request. If
  201. // you just want the service response, call the GetTrailStatus method directly
  202. // instead.
  203. //
  204. // Note: You must call the "Send" method on the returned request object in order
  205. // to execute the request.
  206. //
  207. // // Example sending a request using the GetTrailStatusRequest method.
  208. // req, resp := client.GetTrailStatusRequest(params)
  209. //
  210. // err := req.Send()
  211. // if err == nil { // resp is now filled
  212. // fmt.Println(resp)
  213. // }
  214. //
  215. func (c *CloudTrail) GetTrailStatusRequest(input *GetTrailStatusInput) (req *request.Request, output *GetTrailStatusOutput) {
  216. op := &request.Operation{
  217. Name: opGetTrailStatus,
  218. HTTPMethod: "POST",
  219. HTTPPath: "/",
  220. }
  221. if input == nil {
  222. input = &GetTrailStatusInput{}
  223. }
  224. req = c.newRequest(op, input, output)
  225. output = &GetTrailStatusOutput{}
  226. req.Data = output
  227. return
  228. }
  229. // Returns a JSON-formatted list of information about the specified trail. Fields
  230. // include information on delivery errors, Amazon SNS and Amazon S3 errors,
  231. // and start and stop logging times for each trail. This operation returns trail
  232. // status from a single region. To return trail status from all regions, you
  233. // must call the operation on each region.
  234. func (c *CloudTrail) GetTrailStatus(input *GetTrailStatusInput) (*GetTrailStatusOutput, error) {
  235. req, out := c.GetTrailStatusRequest(input)
  236. err := req.Send()
  237. return out, err
  238. }
  239. const opListPublicKeys = "ListPublicKeys"
  240. // ListPublicKeysRequest generates a "aws/request.Request" representing the
  241. // client's request for the ListPublicKeys operation. The "output" return
  242. // value can be used to capture response data after the request's "Send" method
  243. // is called.
  244. //
  245. // Creating a request object using this method should be used when you want to inject
  246. // custom logic into the request's lifecycle using a custom handler, or if you want to
  247. // access properties on the request object before or after sending the request. If
  248. // you just want the service response, call the ListPublicKeys method directly
  249. // instead.
  250. //
  251. // Note: You must call the "Send" method on the returned request object in order
  252. // to execute the request.
  253. //
  254. // // Example sending a request using the ListPublicKeysRequest method.
  255. // req, resp := client.ListPublicKeysRequest(params)
  256. //
  257. // err := req.Send()
  258. // if err == nil { // resp is now filled
  259. // fmt.Println(resp)
  260. // }
  261. //
  262. func (c *CloudTrail) ListPublicKeysRequest(input *ListPublicKeysInput) (req *request.Request, output *ListPublicKeysOutput) {
  263. op := &request.Operation{
  264. Name: opListPublicKeys,
  265. HTTPMethod: "POST",
  266. HTTPPath: "/",
  267. }
  268. if input == nil {
  269. input = &ListPublicKeysInput{}
  270. }
  271. req = c.newRequest(op, input, output)
  272. output = &ListPublicKeysOutput{}
  273. req.Data = output
  274. return
  275. }
  276. // Returns all public keys whose private keys were used to sign the digest files
  277. // within the specified time range. The public key is needed to validate digest
  278. // files that were signed with its corresponding private key.
  279. //
  280. // CloudTrail uses different private/public key pairs per region. Each digest
  281. // file is signed with a private key unique to its region. Therefore, when you
  282. // validate a digest file from a particular region, you must look in the same
  283. // region for its corresponding public key.
  284. func (c *CloudTrail) ListPublicKeys(input *ListPublicKeysInput) (*ListPublicKeysOutput, error) {
  285. req, out := c.ListPublicKeysRequest(input)
  286. err := req.Send()
  287. return out, err
  288. }
  289. const opListTags = "ListTags"
  290. // ListTagsRequest generates a "aws/request.Request" representing the
  291. // client's request for the ListTags operation. The "output" return
  292. // value can be used to capture response data after the request's "Send" method
  293. // is called.
  294. //
  295. // Creating a request object using this method should be used when you want to inject
  296. // custom logic into the request's lifecycle using a custom handler, or if you want to
  297. // access properties on the request object before or after sending the request. If
  298. // you just want the service response, call the ListTags method directly
  299. // instead.
  300. //
  301. // Note: You must call the "Send" method on the returned request object in order
  302. // to execute the request.
  303. //
  304. // // Example sending a request using the ListTagsRequest method.
  305. // req, resp := client.ListTagsRequest(params)
  306. //
  307. // err := req.Send()
  308. // if err == nil { // resp is now filled
  309. // fmt.Println(resp)
  310. // }
  311. //
  312. func (c *CloudTrail) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) {
  313. op := &request.Operation{
  314. Name: opListTags,
  315. HTTPMethod: "POST",
  316. HTTPPath: "/",
  317. }
  318. if input == nil {
  319. input = &ListTagsInput{}
  320. }
  321. req = c.newRequest(op, input, output)
  322. output = &ListTagsOutput{}
  323. req.Data = output
  324. return
  325. }
  326. // Lists the tags for the trail in the current region.
  327. func (c *CloudTrail) ListTags(input *ListTagsInput) (*ListTagsOutput, error) {
  328. req, out := c.ListTagsRequest(input)
  329. err := req.Send()
  330. return out, err
  331. }
  332. const opLookupEvents = "LookupEvents"
  333. // LookupEventsRequest generates a "aws/request.Request" representing the
  334. // client's request for the LookupEvents operation. The "output" return
  335. // value can be used to capture response data after the request's "Send" method
  336. // is called.
  337. //
  338. // Creating a request object using this method should be used when you want to inject
  339. // custom logic into the request's lifecycle using a custom handler, or if you want to
  340. // access properties on the request object before or after sending the request. If
  341. // you just want the service response, call the LookupEvents method directly
  342. // instead.
  343. //
  344. // Note: You must call the "Send" method on the returned request object in order
  345. // to execute the request.
  346. //
  347. // // Example sending a request using the LookupEventsRequest method.
  348. // req, resp := client.LookupEventsRequest(params)
  349. //
  350. // err := req.Send()
  351. // if err == nil { // resp is now filled
  352. // fmt.Println(resp)
  353. // }
  354. //
  355. func (c *CloudTrail) LookupEventsRequest(input *LookupEventsInput) (req *request.Request, output *LookupEventsOutput) {
  356. op := &request.Operation{
  357. Name: opLookupEvents,
  358. HTTPMethod: "POST",
  359. HTTPPath: "/",
  360. }
  361. if input == nil {
  362. input = &LookupEventsInput{}
  363. }
  364. req = c.newRequest(op, input, output)
  365. output = &LookupEventsOutput{}
  366. req.Data = output
  367. return
  368. }
  369. // Looks up API activity events captured by CloudTrail that create, update,
  370. // or delete resources in your account. Events for a region can be looked up
  371. // for the times in which you had CloudTrail turned on in that region during
  372. // the last seven days. Lookup supports five different attributes: time range
  373. // (defined by a start time and end time), user name, event name, resource type,
  374. // and resource name. All attributes are optional. The maximum number of attributes
  375. // that can be specified in any one lookup request are time range and one other
  376. // attribute. The default number of results returned is 10, with a maximum of
  377. // 50 possible. The response includes a token that you can use to get the next
  378. // page of results.
  379. //
  380. // The rate of lookup requests is limited to one per second per account. If
  381. // this limit is exceeded, a throttling error occurs.
  382. //
  383. // Events that occurred during the selected time range will not be available
  384. // for lookup if CloudTrail logging was not enabled when the events occurred.
  385. func (c *CloudTrail) LookupEvents(input *LookupEventsInput) (*LookupEventsOutput, error) {
  386. req, out := c.LookupEventsRequest(input)
  387. err := req.Send()
  388. return out, err
  389. }
  390. const opRemoveTags = "RemoveTags"
  391. // RemoveTagsRequest generates a "aws/request.Request" representing the
  392. // client's request for the RemoveTags operation. The "output" return
  393. // value can be used to capture response data after the request's "Send" method
  394. // is called.
  395. //
  396. // Creating a request object using this method should be used when you want to inject
  397. // custom logic into the request's lifecycle using a custom handler, or if you want to
  398. // access properties on the request object before or after sending the request. If
  399. // you just want the service response, call the RemoveTags method directly
  400. // instead.
  401. //
  402. // Note: You must call the "Send" method on the returned request object in order
  403. // to execute the request.
  404. //
  405. // // Example sending a request using the RemoveTagsRequest method.
  406. // req, resp := client.RemoveTagsRequest(params)
  407. //
  408. // err := req.Send()
  409. // if err == nil { // resp is now filled
  410. // fmt.Println(resp)
  411. // }
  412. //
  413. func (c *CloudTrail) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) {
  414. op := &request.Operation{
  415. Name: opRemoveTags,
  416. HTTPMethod: "POST",
  417. HTTPPath: "/",
  418. }
  419. if input == nil {
  420. input = &RemoveTagsInput{}
  421. }
  422. req = c.newRequest(op, input, output)
  423. output = &RemoveTagsOutput{}
  424. req.Data = output
  425. return
  426. }
  427. // Removes the specified tags from a trail.
  428. func (c *CloudTrail) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) {
  429. req, out := c.RemoveTagsRequest(input)
  430. err := req.Send()
  431. return out, err
  432. }
  433. const opStartLogging = "StartLogging"
  434. // StartLoggingRequest generates a "aws/request.Request" representing the
  435. // client's request for the StartLogging operation. The "output" return
  436. // value can be used to capture response data after the request's "Send" method
  437. // is called.
  438. //
  439. // Creating a request object using this method should be used when you want to inject
  440. // custom logic into the request's lifecycle using a custom handler, or if you want to
  441. // access properties on the request object before or after sending the request. If
  442. // you just want the service response, call the StartLogging method directly
  443. // instead.
  444. //
  445. // Note: You must call the "Send" method on the returned request object in order
  446. // to execute the request.
  447. //
  448. // // Example sending a request using the StartLoggingRequest method.
  449. // req, resp := client.StartLoggingRequest(params)
  450. //
  451. // err := req.Send()
  452. // if err == nil { // resp is now filled
  453. // fmt.Println(resp)
  454. // }
  455. //
  456. func (c *CloudTrail) StartLoggingRequest(input *StartLoggingInput) (req *request.Request, output *StartLoggingOutput) {
  457. op := &request.Operation{
  458. Name: opStartLogging,
  459. HTTPMethod: "POST",
  460. HTTPPath: "/",
  461. }
  462. if input == nil {
  463. input = &StartLoggingInput{}
  464. }
  465. req = c.newRequest(op, input, output)
  466. output = &StartLoggingOutput{}
  467. req.Data = output
  468. return
  469. }
  470. // Starts the recording of AWS API calls and log file delivery for a trail.
  471. // For a trail that is enabled in all regions, this operation must be called
  472. // from the region in which the trail was created. This operation cannot be
  473. // called on the shadow trails (replicated trails in other regions) of a trail
  474. // that is enabled in all regions.
  475. func (c *CloudTrail) StartLogging(input *StartLoggingInput) (*StartLoggingOutput, error) {
  476. req, out := c.StartLoggingRequest(input)
  477. err := req.Send()
  478. return out, err
  479. }
  480. const opStopLogging = "StopLogging"
  481. // StopLoggingRequest generates a "aws/request.Request" representing the
  482. // client's request for the StopLogging operation. The "output" return
  483. // value can be used to capture response data after the request's "Send" method
  484. // is called.
  485. //
  486. // Creating a request object using this method should be used when you want to inject
  487. // custom logic into the request's lifecycle using a custom handler, or if you want to
  488. // access properties on the request object before or after sending the request. If
  489. // you just want the service response, call the StopLogging method directly
  490. // instead.
  491. //
  492. // Note: You must call the "Send" method on the returned request object in order
  493. // to execute the request.
  494. //
  495. // // Example sending a request using the StopLoggingRequest method.
  496. // req, resp := client.StopLoggingRequest(params)
  497. //
  498. // err := req.Send()
  499. // if err == nil { // resp is now filled
  500. // fmt.Println(resp)
  501. // }
  502. //
  503. func (c *CloudTrail) StopLoggingRequest(input *StopLoggingInput) (req *request.Request, output *StopLoggingOutput) {
  504. op := &request.Operation{
  505. Name: opStopLogging,
  506. HTTPMethod: "POST",
  507. HTTPPath: "/",
  508. }
  509. if input == nil {
  510. input = &StopLoggingInput{}
  511. }
  512. req = c.newRequest(op, input, output)
  513. output = &StopLoggingOutput{}
  514. req.Data = output
  515. return
  516. }
  517. // Suspends the recording of AWS API calls and log file delivery for the specified
  518. // trail. Under most circumstances, there is no need to use this action. You
  519. // can update a trail without stopping it first. This action is the only way
  520. // to stop recording. For a trail enabled in all regions, this operation must
  521. // be called from the region in which the trail was created, or an InvalidHomeRegionException
  522. // will occur. This operation cannot be called on the shadow trails (replicated
  523. // trails in other regions) of a trail enabled in all regions.
  524. func (c *CloudTrail) StopLogging(input *StopLoggingInput) (*StopLoggingOutput, error) {
  525. req, out := c.StopLoggingRequest(input)
  526. err := req.Send()
  527. return out, err
  528. }
  529. const opUpdateTrail = "UpdateTrail"
  530. // UpdateTrailRequest generates a "aws/request.Request" representing the
  531. // client's request for the UpdateTrail operation. The "output" return
  532. // value can be used to capture response data after the request's "Send" method
  533. // is called.
  534. //
  535. // Creating a request object using this method should be used when you want to inject
  536. // custom logic into the request's lifecycle using a custom handler, or if you want to
  537. // access properties on the request object before or after sending the request. If
  538. // you just want the service response, call the UpdateTrail method directly
  539. // instead.
  540. //
  541. // Note: You must call the "Send" method on the returned request object in order
  542. // to execute the request.
  543. //
  544. // // Example sending a request using the UpdateTrailRequest method.
  545. // req, resp := client.UpdateTrailRequest(params)
  546. //
  547. // err := req.Send()
  548. // if err == nil { // resp is now filled
  549. // fmt.Println(resp)
  550. // }
  551. //
  552. func (c *CloudTrail) UpdateTrailRequest(input *UpdateTrailInput) (req *request.Request, output *UpdateTrailOutput) {
  553. op := &request.Operation{
  554. Name: opUpdateTrail,
  555. HTTPMethod: "POST",
  556. HTTPPath: "/",
  557. }
  558. if input == nil {
  559. input = &UpdateTrailInput{}
  560. }
  561. req = c.newRequest(op, input, output)
  562. output = &UpdateTrailOutput{}
  563. req.Data = output
  564. return
  565. }
  566. // Updates the settings that specify delivery of log files. Changes to a trail
  567. // do not require stopping the CloudTrail service. Use this action to designate
  568. // an existing bucket for log delivery. If the existing bucket has previously
  569. // been a target for CloudTrail log files, an IAM policy exists for the bucket.
  570. // UpdateTrail must be called from the region in which the trail was created;
  571. // otherwise, an InvalidHomeRegionException is thrown.
  572. func (c *CloudTrail) UpdateTrail(input *UpdateTrailInput) (*UpdateTrailOutput, error) {
  573. req, out := c.UpdateTrailRequest(input)
  574. err := req.Send()
  575. return out, err
  576. }
  577. // Specifies the tags to add to a trail.
  578. type AddTagsInput struct {
  579. _ struct{} `type:"structure"`
  580. // Specifies the ARN of the trail to which one or more tags will be added. The
  581. // format of a trail ARN is:
  582. //
  583. // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
  584. ResourceId *string `type:"string" required:"true"`
  585. // Contains a list of CloudTrail tags, up to a limit of 10.
  586. TagsList []*Tag `type:"list"`
  587. }
  588. // String returns the string representation
  589. func (s AddTagsInput) String() string {
  590. return awsutil.Prettify(s)
  591. }
  592. // GoString returns the string representation
  593. func (s AddTagsInput) GoString() string {
  594. return s.String()
  595. }
  596. // Validate inspects the fields of the type to determine if they are valid.
  597. func (s *AddTagsInput) Validate() error {
  598. invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"}
  599. if s.ResourceId == nil {
  600. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  601. }
  602. if s.TagsList != nil {
  603. for i, v := range s.TagsList {
  604. if v == nil {
  605. continue
  606. }
  607. if err := v.Validate(); err != nil {
  608. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
  609. }
  610. }
  611. }
  612. if invalidParams.Len() > 0 {
  613. return invalidParams
  614. }
  615. return nil
  616. }
  617. // Returns the objects or data listed below if successful. Otherwise, returns
  618. // an error.
  619. type AddTagsOutput struct {
  620. _ struct{} `type:"structure"`
  621. }
  622. // String returns the string representation
  623. func (s AddTagsOutput) String() string {
  624. return awsutil.Prettify(s)
  625. }
  626. // GoString returns the string representation
  627. func (s AddTagsOutput) GoString() string {
  628. return s.String()
  629. }
  630. // Specifies the settings for each trail.
  631. type CreateTrailInput struct {
  632. _ struct{} `type:"structure"`
  633. // Specifies a log group name using an Amazon Resource Name (ARN), a unique
  634. // identifier that represents the log group to which CloudTrail logs will be
  635. // delivered. Not required unless you specify CloudWatchLogsRoleArn.
  636. CloudWatchLogsLogGroupArn *string `type:"string"`
  637. // Specifies the role for the CloudWatch Logs endpoint to assume to write to
  638. // a user's log group.
  639. CloudWatchLogsRoleArn *string `type:"string"`
  640. // Specifies whether log file integrity validation is enabled. The default is
  641. // false.
  642. //
  643. // When you disable log file integrity validation, the chain of digest files
  644. // is broken after one hour. CloudTrail will not create digest files for log
  645. // files that were delivered during a period in which log file integrity validation
  646. // was disabled. For example, if you enable log file integrity validation at
  647. // noon on January 1, disable it at noon on January 2, and re-enable it at noon
  648. // on January 10, digest files will not be created for the log files delivered
  649. // from noon on January 2 to noon on January 10. The same applies whenever you
  650. // stop CloudTrail logging or delete a trail.
  651. EnableLogFileValidation *bool `type:"boolean"`
  652. // Specifies whether the trail is publishing events from global services such
  653. // as IAM to the log files.
  654. IncludeGlobalServiceEvents *bool `type:"boolean"`
  655. // Specifies whether the trail is created in the current region or in all regions.
  656. // The default is false.
  657. IsMultiRegionTrail *bool `type:"boolean"`
  658. // Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail.
  659. // The value can be a an alias name prefixed by "alias/", a fully specified
  660. // ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.
  661. //
  662. // Examples:
  663. //
  664. // alias/MyAliasName
  665. //
  666. // arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
  667. //
  668. // arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
  669. //
  670. // 12345678-1234-1234-1234-123456789012
  671. KmsKeyId *string `type:"string"`
  672. // Specifies the name of the trail. The name must meet the following requirements:
  673. //
  674. // Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  675. // (_), or dashes (-)
  676. //
  677. // Start with a letter or number, and end with a letter or number
  678. //
  679. // Be between 3 and 128 characters
  680. //
  681. // Have no adjacent periods, underscores or dashes. Names like my-_namespace
  682. // and my--namespace are invalid.
  683. //
  684. // Not be in IP address format (for example, 192.168.5.4)
  685. Name *string `type:"string" required:"true"`
  686. // Specifies the name of the Amazon S3 bucket designated for publishing log
  687. // files. See Amazon S3 Bucket Naming Requirements (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
  688. S3BucketName *string `type:"string" required:"true"`
  689. // Specifies the Amazon S3 key prefix that comes after the name of the bucket
  690. // you have designated for log file delivery. For more information, see Finding
  691. // Your CloudTrail Log Files (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
  692. // The maximum length is 200 characters.
  693. S3KeyPrefix *string `type:"string"`
  694. // Specifies the name of the Amazon SNS topic defined for notification of log
  695. // file delivery. The maximum length is 256 characters.
  696. SnsTopicName *string `type:"string"`
  697. }
  698. // String returns the string representation
  699. func (s CreateTrailInput) String() string {
  700. return awsutil.Prettify(s)
  701. }
  702. // GoString returns the string representation
  703. func (s CreateTrailInput) GoString() string {
  704. return s.String()
  705. }
  706. // Validate inspects the fields of the type to determine if they are valid.
  707. func (s *CreateTrailInput) Validate() error {
  708. invalidParams := request.ErrInvalidParams{Context: "CreateTrailInput"}
  709. if s.Name == nil {
  710. invalidParams.Add(request.NewErrParamRequired("Name"))
  711. }
  712. if s.S3BucketName == nil {
  713. invalidParams.Add(request.NewErrParamRequired("S3BucketName"))
  714. }
  715. if invalidParams.Len() > 0 {
  716. return invalidParams
  717. }
  718. return nil
  719. }
  720. // Returns the objects or data listed below if successful. Otherwise, returns
  721. // an error.
  722. type CreateTrailOutput struct {
  723. _ struct{} `type:"structure"`
  724. // Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail
  725. // logs will be delivered.
  726. CloudWatchLogsLogGroupArn *string `type:"string"`
  727. // Specifies the role for the CloudWatch Logs endpoint to assume to write to
  728. // a user's log group.
  729. CloudWatchLogsRoleArn *string `type:"string"`
  730. // Specifies whether the trail is publishing events from global services such
  731. // as IAM to the log files.
  732. IncludeGlobalServiceEvents *bool `type:"boolean"`
  733. // Specifies whether the trail exists in one region or in all regions.
  734. IsMultiRegionTrail *bool `type:"boolean"`
  735. // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
  736. // The value is a fully specified ARN to a KMS key in the format:
  737. //
  738. // arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
  739. KmsKeyId *string `type:"string"`
  740. // Specifies whether log file integrity validation is enabled.
  741. LogFileValidationEnabled *bool `type:"boolean"`
  742. // Specifies the name of the trail.
  743. Name *string `type:"string"`
  744. // Specifies the name of the Amazon S3 bucket designated for publishing log
  745. // files.
  746. S3BucketName *string `type:"string"`
  747. // Specifies the Amazon S3 key prefix that comes after the name of the bucket
  748. // you have designated for log file delivery. For more information, see Finding
  749. // Your CloudTrail Log Files (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
  750. S3KeyPrefix *string `type:"string"`
  751. // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
  752. // when log files are delivered. The format of a topic ARN is:
  753. //
  754. // arn:aws:sns:us-east-1:123456789012:MyTopic
  755. SnsTopicARN *string `type:"string"`
  756. // This field is deprecated. Use SnsTopicARN.
  757. SnsTopicName *string `deprecated:"true" type:"string"`
  758. // Specifies the ARN of the trail that was created. The format of a trail ARN
  759. // is:
  760. //
  761. // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
  762. TrailARN *string `type:"string"`
  763. }
  764. // String returns the string representation
  765. func (s CreateTrailOutput) String() string {
  766. return awsutil.Prettify(s)
  767. }
  768. // GoString returns the string representation
  769. func (s CreateTrailOutput) GoString() string {
  770. return s.String()
  771. }
  772. // The request that specifies the name of a trail to delete.
  773. type DeleteTrailInput struct {
  774. _ struct{} `type:"structure"`
  775. // Specifies the name or the CloudTrail ARN of the trail to be deleted. The
  776. // format of a trail ARN is:
  777. //
  778. // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
  779. Name *string `type:"string" required:"true"`
  780. }
  781. // String returns the string representation
  782. func (s DeleteTrailInput) String() string {
  783. return awsutil.Prettify(s)
  784. }
  785. // GoString returns the string representation
  786. func (s DeleteTrailInput) GoString() string {
  787. return s.String()
  788. }
  789. // Validate inspects the fields of the type to determine if they are valid.
  790. func (s *DeleteTrailInput) Validate() error {
  791. invalidParams := request.ErrInvalidParams{Context: "DeleteTrailInput"}
  792. if s.Name == nil {
  793. invalidParams.Add(request.NewErrParamRequired("Name"))
  794. }
  795. if invalidParams.Len() > 0 {
  796. return invalidParams
  797. }
  798. return nil
  799. }
  800. // Returns the objects or data listed below if successful. Otherwise, returns
  801. // an error.
  802. type DeleteTrailOutput struct {
  803. _ struct{} `type:"structure"`
  804. }
  805. // String returns the string representation
  806. func (s DeleteTrailOutput) String() string {
  807. return awsutil.Prettify(s)
  808. }
  809. // GoString returns the string representation
  810. func (s DeleteTrailOutput) GoString() string {
  811. return s.String()
  812. }
  813. // Returns information about the trail.
  814. type DescribeTrailsInput struct {
  815. _ struct{} `type:"structure"`
  816. // Specifies whether to include shadow trails in the response. A shadow trail
  817. // is the replication in a region of a trail that was created in a different
  818. // region. The default is true.
  819. IncludeShadowTrails *bool `locationName:"includeShadowTrails" type:"boolean"`
  820. // Specifies a list of trail names, trail ARNs, or both, of the trails to describe.
  821. // The format of a trail ARN is:
  822. //
  823. // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
  824. //
  825. // If an empty list is specified, information for the trail in the current
  826. // region is returned.
  827. //
  828. // If an empty list is specified and IncludeShadowTrails is false, then information
  829. // for all trails in the current region is returned.
  830. //
  831. // If an empty list is specified and IncludeShadowTrails is null or true,
  832. // then information for all trails in the current region and any associated
  833. // shadow trails in other regions is returned.
  834. //
  835. // If one or more trail names are specified, information is returned only
  836. // if the names match the names of trails belonging only to the current region.
  837. // To return information about a trail in another region, you must specify its
  838. // trail ARN.
  839. TrailNameList []*string `locationName:"trailNameList" type:"list"`
  840. }
  841. // String returns the string representation
  842. func (s DescribeTrailsInput) String() string {
  843. return awsutil.Prettify(s)
  844. }
  845. // GoString returns the string representation
  846. func (s DescribeTrailsInput) GoString() string {
  847. return s.String()
  848. }
  849. // Returns the objects or data listed below if successful. Otherwise, returns
  850. // an error.
  851. type DescribeTrailsOutput struct {
  852. _ struct{} `type:"structure"`
  853. // The list of trail objects.
  854. TrailList []*Trail `locationName:"trailList" type:"list"`
  855. }
  856. // String returns the string representation
  857. func (s DescribeTrailsOutput) String() string {
  858. return awsutil.Prettify(s)
  859. }
  860. // GoString returns the string representation
  861. func (s DescribeTrailsOutput) GoString() string {
  862. return s.String()
  863. }
  864. // Contains information about an event that was returned by a lookup request.
  865. // The result includes a representation of a CloudTrail event.
  866. type Event struct {
  867. _ struct{} `type:"structure"`
  868. // A JSON string that contains a representation of the event returned.
  869. CloudTrailEvent *string `type:"string"`
  870. // The CloudTrail ID of the event returned.
  871. EventId *string `type:"string"`
  872. // The name of the event returned.
  873. EventName *string `type:"string"`
  874. // The date and time of the event returned.
  875. EventTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  876. // A list of resources referenced by the event returned.
  877. Resources []*Resource `type:"list"`
  878. // A user name or role name of the requester that called the API in the event
  879. // returned.
  880. Username *string `type:"string"`
  881. }
  882. // String returns the string representation
  883. func (s Event) String() string {
  884. return awsutil.Prettify(s)
  885. }
  886. // GoString returns the string representation
  887. func (s Event) GoString() string {
  888. return s.String()
  889. }
  890. // The name of a trail about which you want the current status.
  891. type GetTrailStatusInput struct {
  892. _ struct{} `type:"structure"`
  893. // Specifies the name or the CloudTrail ARN of the trail for which you are requesting
  894. // status. To get the status of a shadow trail (a replication of the trail in
  895. // another region), you must specify its ARN. The format of a trail ARN is:
  896. //
  897. // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
  898. Name *string `type:"string" required:"true"`
  899. }
  900. // String returns the string representation
  901. func (s GetTrailStatusInput) String() string {
  902. return awsutil.Prettify(s)
  903. }
  904. // GoString returns the string representation
  905. func (s GetTrailStatusInput) GoString() string {
  906. return s.String()
  907. }
  908. // Validate inspects the fields of the type to determine if they are valid.
  909. func (s *GetTrailStatusInput) Validate() error {
  910. invalidParams := request.ErrInvalidParams{Context: "GetTrailStatusInput"}
  911. if s.Name == nil {
  912. invalidParams.Add(request.NewErrParamRequired("Name"))
  913. }
  914. if invalidParams.Len() > 0 {
  915. return invalidParams
  916. }
  917. return nil
  918. }
  919. // Returns the objects or data listed below if successful. Otherwise, returns
  920. // an error.
  921. type GetTrailStatusOutput struct {
  922. _ struct{} `type:"structure"`
  923. // Whether the CloudTrail is currently logging AWS API calls.
  924. IsLogging *bool `type:"boolean"`
  925. // Displays any CloudWatch Logs error that CloudTrail encountered when attempting
  926. // to deliver logs to CloudWatch Logs.
  927. LatestCloudWatchLogsDeliveryError *string `type:"string"`
  928. // Displays the most recent date and time when CloudTrail delivered logs to
  929. // CloudWatch Logs.
  930. LatestCloudWatchLogsDeliveryTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  931. // This field is deprecated.
  932. LatestDeliveryAttemptSucceeded *string `type:"string"`
  933. // This field is deprecated.
  934. LatestDeliveryAttemptTime *string `type:"string"`
  935. // Displays any Amazon S3 error that CloudTrail encountered when attempting
  936. // to deliver log files to the designated bucket. For more information see the
  937. // topic Error Responses (http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
  938. // in the Amazon S3 API Reference.
  939. //
  940. // This error occurs only when there is a problem with the destination S3
  941. // bucket and will not occur for timeouts. To resolve the issue, create a new
  942. // bucket and call UpdateTrail to specify the new bucket, or fix the existing
  943. // objects so that CloudTrail can again write to the bucket.
  944. LatestDeliveryError *string `type:"string"`
  945. // Specifies the date and time that CloudTrail last delivered log files to an
  946. // account's Amazon S3 bucket.
  947. LatestDeliveryTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  948. // Displays any Amazon S3 error that CloudTrail encountered when attempting
  949. // to deliver a digest file to the designated bucket. For more information see
  950. // the topic Error Responses (http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
  951. // in the Amazon S3 API Reference.
  952. //
  953. // This error occurs only when there is a problem with the destination S3
  954. // bucket and will not occur for timeouts. To resolve the issue, create a new
  955. // bucket and call UpdateTrail to specify the new bucket, or fix the existing
  956. // objects so that CloudTrail can again write to the bucket.
  957. LatestDigestDeliveryError *string `type:"string"`
  958. // Specifies the date and time that CloudTrail last delivered a digest file
  959. // to an account's Amazon S3 bucket.
  960. LatestDigestDeliveryTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  961. // This field is deprecated.
  962. LatestNotificationAttemptSucceeded *string `type:"string"`
  963. // This field is deprecated.
  964. LatestNotificationAttemptTime *string `type:"string"`
  965. // Displays any Amazon SNS error that CloudTrail encountered when attempting
  966. // to send a notification. For more information about Amazon SNS errors, see
  967. // the Amazon SNS Developer Guide (http://docs.aws.amazon.com/sns/latest/dg/welcome.html).
  968. LatestNotificationError *string `type:"string"`
  969. // Specifies the date and time of the most recent Amazon SNS notification that
  970. // CloudTrail has written a new log file to an account's Amazon S3 bucket.
  971. LatestNotificationTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  972. // Specifies the most recent date and time when CloudTrail started recording
  973. // API calls for an AWS account.
  974. StartLoggingTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  975. // Specifies the most recent date and time when CloudTrail stopped recording
  976. // API calls for an AWS account.
  977. StopLoggingTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  978. // This field is deprecated.
  979. TimeLoggingStarted *string `type:"string"`
  980. // This field is deprecated.
  981. TimeLoggingStopped *string `type:"string"`
  982. }
  983. // String returns the string representation
  984. func (s GetTrailStatusOutput) String() string {
  985. return awsutil.Prettify(s)
  986. }
  987. // GoString returns the string representation
  988. func (s GetTrailStatusOutput) GoString() string {
  989. return s.String()
  990. }
  991. // Requests the public keys for a specified time range.
  992. type ListPublicKeysInput struct {
  993. _ struct{} `type:"structure"`
  994. // Optionally specifies, in UTC, the end of the time range to look up public
  995. // keys for CloudTrail digest files. If not specified, the current time is used.
  996. EndTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  997. // Reserved for future use.
  998. NextToken *string `type:"string"`
  999. // Optionally specifies, in UTC, the start of the time range to look up public
  1000. // keys for CloudTrail digest files. If not specified, the current time is used,
  1001. // and the current public key is returned.
  1002. StartTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  1003. }
  1004. // String returns the string representation
  1005. func (s ListPublicKeysInput) String() string {
  1006. return awsutil.Prettify(s)
  1007. }
  1008. // GoString returns the string representation
  1009. func (s ListPublicKeysInput) GoString() string {
  1010. return s.String()
  1011. }
  1012. // Returns the objects or data listed below if successful. Otherwise, returns
  1013. // an error.
  1014. type ListPublicKeysOutput struct {
  1015. _ struct{} `type:"structure"`
  1016. // Reserved for future use.
  1017. NextToken *string `type:"string"`
  1018. // Contains an array of PublicKey objects.
  1019. //
  1020. // The returned public keys may have validity time ranges that overlap.
  1021. PublicKeyList []*PublicKey `type:"list"`
  1022. }
  1023. // String returns the string representation
  1024. func (s ListPublicKeysOutput) String() string {
  1025. return awsutil.Prettify(s)
  1026. }
  1027. // GoString returns the string representation
  1028. func (s ListPublicKeysOutput) GoString() string {
  1029. return s.String()
  1030. }
  1031. // Specifies a list of trail tags to return.
  1032. type ListTagsInput struct {
  1033. _ struct{} `type:"structure"`
  1034. // Reserved for future use.
  1035. NextToken *string `type:"string"`
  1036. // Specifies a list of trail ARNs whose tags will be listed. The list has a
  1037. // limit of 20 ARNs. The format of a trail ARN is:
  1038. //
  1039. // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
  1040. ResourceIdList []*string `type:"list" required:"true"`
  1041. }
  1042. // String returns the string representation
  1043. func (s ListTagsInput) String() string {
  1044. return awsutil.Prettify(s)
  1045. }
  1046. // GoString returns the string representation
  1047. func (s ListTagsInput) GoString() string {
  1048. return s.String()
  1049. }
  1050. // Validate inspects the fields of the type to determine if they are valid.
  1051. func (s *ListTagsInput) Validate() error {
  1052. invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"}
  1053. if s.ResourceIdList == nil {
  1054. invalidParams.Add(request.NewErrParamRequired("ResourceIdList"))
  1055. }
  1056. if invalidParams.Len() > 0 {
  1057. return invalidParams
  1058. }
  1059. return nil
  1060. }
  1061. // Returns the objects or data listed below if successful. Otherwise, returns
  1062. // an error.
  1063. type ListTagsOutput struct {
  1064. _ struct{} `type:"structure"`
  1065. // Reserved for future use.
  1066. NextToken *string `type:"string"`
  1067. // A list of resource tags.
  1068. ResourceTagList []*ResourceTag `type:"list"`
  1069. }
  1070. // String returns the string representation
  1071. func (s ListTagsOutput) String() string {
  1072. return awsutil.Prettify(s)
  1073. }
  1074. // GoString returns the string representation
  1075. func (s ListTagsOutput) GoString() string {
  1076. return s.String()
  1077. }
  1078. // Specifies an attribute and value that filter the events returned.
  1079. type LookupAttribute struct {
  1080. _ struct{} `type:"structure"`
  1081. // Specifies an attribute on which to filter the events returned.
  1082. AttributeKey *string `type:"string" required:"true" enum:"LookupAttributeKey"`
  1083. // Specifies a value for the specified AttributeKey.
  1084. AttributeValue *string `type:"string" required:"true"`
  1085. }
  1086. // String returns the string representation
  1087. func (s LookupAttribute) String() string {
  1088. return awsutil.Prettify(s)
  1089. }
  1090. // GoString returns the string representation
  1091. func (s LookupAttribute) GoString() string {
  1092. return s.String()
  1093. }
  1094. // Validate inspects the fields of the type to determine if they are valid.
  1095. func (s *LookupAttribute) Validate() error {
  1096. invalidParams := request.ErrInvalidParams{Context: "LookupAttribute"}
  1097. if s.AttributeKey == nil {
  1098. invalidParams.Add(request.NewErrParamRequired("AttributeKey"))
  1099. }
  1100. if s.AttributeValue == nil {
  1101. invalidParams.Add(request.NewErrParamRequired("AttributeValue"))
  1102. }
  1103. if invalidParams.Len() > 0 {
  1104. return invalidParams
  1105. }
  1106. return nil
  1107. }
  1108. // Contains a request for LookupEvents.
  1109. type LookupEventsInput struct {
  1110. _ struct{} `type:"structure"`
  1111. // Specifies that only events that occur before or at the specified time are
  1112. // returned. If the specified end time is before the specified start time, an
  1113. // error is returned.
  1114. EndTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  1115. // Contains a list of lookup attributes. Currently the list can contain only
  1116. // one item.
  1117. LookupAttributes []*LookupAttribute `type:"list"`
  1118. // The number of events to return. Possible values are 1 through 50. The default
  1119. // is 10.
  1120. MaxResults *int64 `min:"1" type:"integer"`
  1121. // The token to use to get the next page of results after a previous API call.
  1122. // This token must be passed in with the same parameters that were specified
  1123. // in the the original call. For example, if the original call specified an
  1124. // AttributeKey of 'Username' with a value of 'root', the call with NextToken
  1125. // should include those same parameters.
  1126. NextToken *string `type:"string"`
  1127. // Specifies that only events that occur after or at the specified time are
  1128. // returned. If the specified start time is after the specified end time, an
  1129. // error is returned.
  1130. StartTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  1131. }
  1132. // String returns the string representation
  1133. func (s LookupEventsInput) String() string {
  1134. return awsutil.Prettify(s)
  1135. }
  1136. // GoString returns the string representation
  1137. func (s LookupEventsInput) GoString() string {
  1138. return s.String()
  1139. }
  1140. // Validate inspects the fields of the type to determine if they are valid.
  1141. func (s *LookupEventsInput) Validate() error {
  1142. invalidParams := request.ErrInvalidParams{Context: "LookupEventsInput"}
  1143. if s.MaxResults != nil && *s.MaxResults < 1 {
  1144. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1145. }
  1146. if s.LookupAttributes != nil {
  1147. for i, v := range s.LookupAttributes {
  1148. if v == nil {
  1149. continue
  1150. }
  1151. if err := v.Validate(); err != nil {
  1152. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LookupAttributes", i), err.(request.ErrInvalidParams))
  1153. }
  1154. }
  1155. }
  1156. if invalidParams.Len() > 0 {
  1157. return invalidParams
  1158. }
  1159. return nil
  1160. }
  1161. // Contains a response to a LookupEvents action.
  1162. type LookupEventsOutput struct {
  1163. _ struct{} `type:"structure"`
  1164. // A list of events returned based on the lookup attributes specified and the
  1165. // CloudTrail event. The events list is sorted by time. The most recent event
  1166. // is listed first.
  1167. Events []*Event `type:"list"`
  1168. // The token to use to get the next page of results after a previous API call.
  1169. // If the token does not appear, there are no more results to return. The token
  1170. // must be passed in with the same parameters as the previous call. For example,
  1171. // if the original call specified an AttributeKey of 'Username' with a value
  1172. // of 'root', the call with NextToken should include those same parameters.
  1173. NextToken *string `type:"string"`
  1174. }
  1175. // String returns the string representation
  1176. func (s LookupEventsOutput) String() string {
  1177. return awsutil.Prettify(s)
  1178. }
  1179. // GoString returns the string representation
  1180. func (s LookupEventsOutput) GoString() string {
  1181. return s.String()
  1182. }
  1183. // Contains information about a returned public key.
  1184. type PublicKey struct {
  1185. _ struct{} `type:"structure"`
  1186. // The fingerprint of the public key.
  1187. Fingerprint *string `type:"string"`
  1188. // The ending time of validity of the public key.
  1189. ValidityEndTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  1190. // The starting time of validity of the public key.
  1191. ValidityStartTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  1192. // The DER encoded public key value in PKCS#1 format.
  1193. //
  1194. // Value is automatically base64 encoded/decoded by the SDK.
  1195. Value []byte `type:"blob"`
  1196. }
  1197. // String returns the string representation
  1198. func (s PublicKey) String() string {
  1199. return awsutil.Prettify(s)
  1200. }
  1201. // GoString returns the string representation
  1202. func (s PublicKey) GoString() string {
  1203. return s.String()
  1204. }
  1205. // Specifies the tags to remove from a trail.
  1206. type RemoveTagsInput struct {
  1207. _ struct{} `type:"structure"`
  1208. // Specifies the ARN of the trail from which tags should be removed. The format
  1209. // of a trail ARN is:
  1210. //
  1211. // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
  1212. ResourceId *string `type:"string" required:"true"`
  1213. // Specifies a list of tags to be removed.
  1214. TagsList []*Tag `type:"list"`
  1215. }
  1216. // String returns the string representation
  1217. func (s RemoveTagsInput) String() string {
  1218. return awsutil.Prettify(s)
  1219. }
  1220. // GoString returns the string representation
  1221. func (s RemoveTagsInput) GoString() string {
  1222. return s.String()
  1223. }
  1224. // Validate inspects the fields of the type to determine if they are valid.
  1225. func (s *RemoveTagsInput) Validate() error {
  1226. invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"}
  1227. if s.ResourceId == nil {
  1228. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  1229. }
  1230. if s.TagsList != nil {
  1231. for i, v := range s.TagsList {
  1232. if v == nil {
  1233. continue
  1234. }
  1235. if err := v.Validate(); err != nil {
  1236. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
  1237. }
  1238. }
  1239. }
  1240. if invalidParams.Len() > 0 {
  1241. return invalidParams
  1242. }
  1243. return nil
  1244. }
  1245. // Returns the objects or data listed below if successful. Otherwise, returns
  1246. // an error.
  1247. type RemoveTagsOutput struct {
  1248. _ struct{} `type:"structure"`
  1249. }
  1250. // String returns the string representation
  1251. func (s RemoveTagsOutput) String() string {
  1252. return awsutil.Prettify(s)
  1253. }
  1254. // GoString returns the string representation
  1255. func (s RemoveTagsOutput) GoString() string {
  1256. return s.String()
  1257. }
  1258. // Specifies the type and name of a resource referenced by an event.
  1259. type Resource struct {
  1260. _ struct{} `type:"structure"`
  1261. // The name of the resource referenced by the event returned. These are user-created
  1262. // names whose values will depend on the environment. For example, the resource
  1263. // name might be "auto-scaling-test-group" for an Auto Scaling Group or "i-1234567"
  1264. // for an EC2 Instance.
  1265. ResourceName *string `type:"string"`
  1266. // The type of a resource referenced by the event returned. When the resource
  1267. // type cannot be determined, null is returned. Some examples of resource types
  1268. // are: Instance for EC2, Trail for CloudTrail, DBInstance for RDS, and AccessKey
  1269. // for IAM. For a list of resource types supported for event lookup, see Resource
  1270. // Types Supported for Event Lookup (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/lookup_supported_resourcetypes.html).
  1271. ResourceType *string `type:"string"`
  1272. }
  1273. // String returns the string representation
  1274. func (s Resource) String() string {
  1275. return awsutil.Prettify(s)
  1276. }
  1277. // GoString returns the string representation
  1278. func (s Resource) GoString() string {
  1279. return s.String()
  1280. }
  1281. // A resource tag.
  1282. type ResourceTag struct {
  1283. _ struct{} `type:"structure"`
  1284. // Specifies the ARN of the resource.
  1285. ResourceId *string `type:"string"`
  1286. // A list of tags.
  1287. TagsList []*Tag `type:"list"`
  1288. }
  1289. // String returns the string representation
  1290. func (s ResourceTag) String() string {
  1291. return awsutil.Prettify(s)
  1292. }
  1293. // GoString returns the string representation
  1294. func (s ResourceTag) GoString() string {
  1295. return s.String()
  1296. }
  1297. // The request to CloudTrail to start logging AWS API calls for an account.
  1298. type StartLoggingInput struct {
  1299. _ struct{} `type:"structure"`
  1300. // Specifies the name or the CloudTrail ARN of the trail for which CloudTrail
  1301. // logs AWS API calls. The format of a trail ARN is:
  1302. //
  1303. // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
  1304. Name *string `type:"string" required:"true"`
  1305. }
  1306. // String returns the string representation
  1307. func (s StartLoggingInput) String() string {
  1308. return awsutil.Prettify(s)
  1309. }
  1310. // GoString returns the string representation
  1311. func (s StartLoggingInput) GoString() string {
  1312. return s.String()
  1313. }
  1314. // Validate inspects the fields of the type to determine if they are valid.
  1315. func (s *StartLoggingInput) Validate() error {
  1316. invalidParams := request.ErrInvalidParams{Context: "StartLoggingInput"}
  1317. if s.Name == nil {
  1318. invalidParams.Add(request.NewErrParamRequired("Name"))
  1319. }
  1320. if invalidParams.Len() > 0 {
  1321. return invalidParams
  1322. }
  1323. return nil
  1324. }
  1325. // Returns the objects or data listed below if successful. Otherwise, returns
  1326. // an error.
  1327. type StartLoggingOutput struct {
  1328. _ struct{} `type:"structure"`
  1329. }
  1330. // String returns the string representation
  1331. func (s StartLoggingOutput) String() string {
  1332. return awsutil.Prettify(s)
  1333. }
  1334. // GoString returns the string representation
  1335. func (s StartLoggingOutput) GoString() string {
  1336. return s.String()
  1337. }
  1338. // Passes the request to CloudTrail to stop logging AWS API calls for the specified
  1339. // account.
  1340. type StopLoggingInput struct {
  1341. _ struct{} `type:"structure"`
  1342. // Specifies the name or the CloudTrail ARN of the trail for which CloudTrail
  1343. // will stop logging AWS API calls. The format of a trail ARN is:
  1344. //
  1345. // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
  1346. Name *string `type:"string" required:"true"`
  1347. }
  1348. // String returns the string representation
  1349. func (s StopLoggingInput) String() string {
  1350. return awsutil.Prettify(s)
  1351. }
  1352. // GoString returns the string representation
  1353. func (s StopLoggingInput) GoString() string {
  1354. return s.String()
  1355. }
  1356. // Validate inspects the fields of the type to determine if they are valid.
  1357. func (s *StopLoggingInput) Validate() error {
  1358. invalidParams := request.ErrInvalidParams{Context: "StopLoggingInput"}
  1359. if s.Name == nil {
  1360. invalidParams.Add(request.NewErrParamRequired("Name"))
  1361. }
  1362. if invalidParams.Len() > 0 {
  1363. return invalidParams
  1364. }
  1365. return nil
  1366. }
  1367. // Returns the objects or data listed below if successful. Otherwise, returns
  1368. // an error.
  1369. type StopLoggingOutput struct {
  1370. _ struct{} `type:"structure"`
  1371. }
  1372. // String returns the string representation
  1373. func (s StopLoggingOutput) String() string {
  1374. return awsutil.Prettify(s)
  1375. }
  1376. // GoString returns the string representation
  1377. func (s StopLoggingOutput) GoString() string {
  1378. return s.String()
  1379. }
  1380. // A custom key-value pair associated with a resource such as a CloudTrail trail.
  1381. type Tag struct {
  1382. _ struct{} `type:"structure"`
  1383. // The key in a key-value pair. The key must be must be no longer than 128 Unicode
  1384. // characters. The key must be unique for the resource to which it applies.
  1385. Key *string `type:"string" required:"true"`
  1386. // The value in a key-value pair of a tag. The value must be no longer than
  1387. // 256 Unicode characters.
  1388. Value *string `type:"string"`
  1389. }
  1390. // String returns the string representation
  1391. func (s Tag) String() string {
  1392. return awsutil.Prettify(s)
  1393. }
  1394. // GoString returns the string representation
  1395. func (s Tag) GoString() string {
  1396. return s.String()
  1397. }
  1398. // Validate inspects the fields of the type to determine if they are valid.
  1399. func (s *Tag) Validate() error {
  1400. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  1401. if s.Key == nil {
  1402. invalidParams.Add(request.NewErrParamRequired("Key"))
  1403. }
  1404. if invalidParams.Len() > 0 {
  1405. return invalidParams
  1406. }
  1407. return nil
  1408. }
  1409. // The settings for a trail.
  1410. type Trail struct {
  1411. _ struct{} `type:"structure"`
  1412. // Specifies an Amazon Resource Name (ARN), a unique identifier that represents
  1413. // the log group to which CloudTrail logs will be delivered.
  1414. CloudWatchLogsLogGroupArn *string `type:"string"`
  1415. // Specifies the role for the CloudWatch Logs endpoint to assume to write to
  1416. // a user's log group.
  1417. CloudWatchLogsRoleArn *string `type:"string"`
  1418. // The region in which the trail was created.
  1419. HomeRegion *string `type:"string"`
  1420. // Set to True to include AWS API calls from AWS global services such as IAM.
  1421. // Otherwise, False.
  1422. IncludeGlobalServiceEvents *bool `type:"boolean"`
  1423. // Specifies whether the trail belongs only to one region or exists in all regions.
  1424. IsMultiRegionTrail *bool `type:"boolean"`
  1425. // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
  1426. // The value is a fully specified ARN to a KMS key in the format:
  1427. //
  1428. // arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
  1429. KmsKeyId *string `type:"string"`
  1430. // Specifies whether log file validation is enabled.
  1431. LogFileValidationEnabled *bool `type:"boolean"`
  1432. // Name of the trail set by calling CreateTrail. The maximum length is 128 characters.
  1433. Name *string `type:"string"`
  1434. // Name of the Amazon S3 bucket into which CloudTrail delivers your trail files.
  1435. // See Amazon S3 Bucket Naming Requirements (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
  1436. S3BucketName *string `type:"string"`
  1437. // Specifies the Amazon S3 key prefix that comes after the name of the bucket
  1438. // you have designated for log file delivery. For more information, see Finding
  1439. // Your CloudTrail Log Files (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).The
  1440. // maximum length is 200 characters.
  1441. S3KeyPrefix *string `type:"string"`
  1442. // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
  1443. // when log files are delivered. The format of a topic ARN is:
  1444. //
  1445. // arn:aws:sns:us-east-1:123456789012:MyTopic
  1446. SnsTopicARN *string `type:"string"`
  1447. // This field is deprecated. Use SnsTopicARN.
  1448. SnsTopicName *string `deprecated:"true" type:"string"`
  1449. // Specifies the ARN of the trail. The format of a trail ARN is:
  1450. //
  1451. // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
  1452. TrailARN *string `type:"string"`
  1453. }
  1454. // String returns the string representation
  1455. func (s Trail) String() string {
  1456. return awsutil.Prettify(s)
  1457. }
  1458. // GoString returns the string representation
  1459. func (s Trail) GoString() string {
  1460. return s.String()
  1461. }
  1462. // Specifies settings to update for the trail.
  1463. type UpdateTrailInput struct {
  1464. _ struct{} `type:"structure"`
  1465. // Specifies a log group name using an Amazon Resource Name (ARN), a unique
  1466. // identifier that represents the log group to which CloudTrail logs will be
  1467. // delivered. Not required unless you specify CloudWatchLogsRoleArn.
  1468. CloudWatchLogsLogGroupArn *string `type:"string"`
  1469. // Specifies the role for the CloudWatch Logs endpoint to assume to write to
  1470. // a user's log group.
  1471. CloudWatchLogsRoleArn *string `type:"string"`
  1472. // Specifies whether log file validation is enabled. The default is false.
  1473. //
  1474. // When you disable log file integrity validation, the chain of digest files
  1475. // is broken after one hour. CloudTrail will not create digest files for log
  1476. // files that were delivered during a period in which log file integrity validation
  1477. // was disabled. For example, if you enable log file integrity validation at
  1478. // noon on January 1, disable it at noon on January 2, and re-enable it at noon
  1479. // on January 10, digest files will not be created for the log files delivered
  1480. // from noon on January 2 to noon on January 10. The same applies whenever you
  1481. // stop CloudTrail logging or delete a trail.
  1482. EnableLogFileValidation *bool `type:"boolean"`
  1483. // Specifies whether the trail is publishing events from global services such
  1484. // as IAM to the log files.
  1485. IncludeGlobalServiceEvents *bool `type:"boolean"`
  1486. // Specifies whether the trail applies only to the current region or to all
  1487. // regions. The default is false. If the trail exists only in the current region
  1488. // and this value is set to true, shadow trails (replications of the trail)
  1489. // will be created in the other regions. If the trail exists in all regions
  1490. // and this value is set to false, the trail will remain in the region where
  1491. // it was created, and its shadow trails in other regions will be deleted.
  1492. IsMultiRegionTrail *bool `type:"boolean"`
  1493. // Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail.
  1494. // The value can be a an alias name prefixed by "alias/", a fully specified
  1495. // ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.
  1496. //
  1497. // Examples:
  1498. //
  1499. // alias/MyAliasName
  1500. //
  1501. // arn:aws:kms:us-east-1:123456789012:alias/MyAliasName
  1502. //
  1503. // arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
  1504. //
  1505. // 12345678-1234-1234-1234-123456789012
  1506. KmsKeyId *string `type:"string"`
  1507. // Specifies the name of the trail or trail ARN. If Name is a trail name, the
  1508. // string must meet the following requirements:
  1509. //
  1510. // Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
  1511. // (_), or dashes (-)
  1512. //
  1513. // Start with a letter or number, and end with a letter or number
  1514. //
  1515. // Be between 3 and 128 characters
  1516. //
  1517. // Have no adjacent periods, underscores or dashes. Names like my-_namespace
  1518. // and my--namespace are invalid.
  1519. //
  1520. // Not be in IP address format (for example, 192.168.5.4)
  1521. //
  1522. // If Name is a trail ARN, it must be in the format:
  1523. //
  1524. // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
  1525. Name *string `type:"string" required:"true"`
  1526. // Specifies the name of the Amazon S3 bucket designated for publishing log
  1527. // files. See Amazon S3 Bucket Naming Requirements (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
  1528. S3BucketName *string `type:"string"`
  1529. // Specifies the Amazon S3 key prefix that comes after the name of the bucket
  1530. // you have designated for log file delivery. For more information, see Finding
  1531. // Your CloudTrail Log Files (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
  1532. // The maximum length is 200 characters.
  1533. S3KeyPrefix *string `type:"string"`
  1534. // Specifies the name of the Amazon SNS topic defined for notification of log
  1535. // file delivery. The maximum length is 256 characters.
  1536. SnsTopicName *string `type:"string"`
  1537. }
  1538. // String returns the string representation
  1539. func (s UpdateTrailInput) String() string {
  1540. return awsutil.Prettify(s)
  1541. }
  1542. // GoString returns the string representation
  1543. func (s UpdateTrailInput) GoString() string {
  1544. return s.String()
  1545. }
  1546. // Validate inspects the fields of the type to determine if they are valid.
  1547. func (s *UpdateTrailInput) Validate() error {
  1548. invalidParams := request.ErrInvalidParams{Context: "UpdateTrailInput"}
  1549. if s.Name == nil {
  1550. invalidParams.Add(request.NewErrParamRequired("Name"))
  1551. }
  1552. if invalidParams.Len() > 0 {
  1553. return invalidParams
  1554. }
  1555. return nil
  1556. }
  1557. // Returns the objects or data listed below if successful. Otherwise, returns
  1558. // an error.
  1559. type UpdateTrailOutput struct {
  1560. _ struct{} `type:"structure"`
  1561. // Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail
  1562. // logs will be delivered.
  1563. CloudWatchLogsLogGroupArn *string `type:"string"`
  1564. // Specifies the role for the CloudWatch Logs endpoint to assume to write to
  1565. // a user's log group.
  1566. CloudWatchLogsRoleArn *string `type:"string"`
  1567. // Specifies whether the trail is publishing events from global services such
  1568. // as IAM to the log files.
  1569. IncludeGlobalServiceEvents *bool `type:"boolean"`
  1570. // Specifies whether the trail exists in one region or in all regions.
  1571. IsMultiRegionTrail *bool `type:"boolean"`
  1572. // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
  1573. // The value is a fully specified ARN to a KMS key in the format:
  1574. //
  1575. // arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
  1576. KmsKeyId *string `type:"string"`
  1577. // Specifies whether log file integrity validation is enabled.
  1578. LogFileValidationEnabled *bool `type:"boolean"`
  1579. // Specifies the name of the trail.
  1580. Name *string `type:"string"`
  1581. // Specifies the name of the Amazon S3 bucket designated for publishing log
  1582. // files.
  1583. S3BucketName *string `type:"string"`
  1584. // Specifies the Amazon S3 key prefix that comes after the name of the bucket
  1585. // you have designated for log file delivery. For more information, see Finding
  1586. // Your CloudTrail Log Files (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
  1587. S3KeyPrefix *string `type:"string"`
  1588. // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
  1589. // when log files are delivered. The format of a topic ARN is:
  1590. //
  1591. // arn:aws:sns:us-east-1:123456789012:MyTopic
  1592. SnsTopicARN *string `type:"string"`
  1593. // This field is deprecated. Use SnsTopicARN.
  1594. SnsTopicName *string `deprecated:"true" type:"string"`
  1595. // Specifies the ARN of the trail that was updated. The format of a trail ARN
  1596. // is:
  1597. //
  1598. // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail
  1599. TrailARN *string `type:"string"`
  1600. }
  1601. // String returns the string representation
  1602. func (s UpdateTrailOutput) String() string {
  1603. return awsutil.Prettify(s)
  1604. }
  1605. // GoString returns the string representation
  1606. func (s UpdateTrailOutput) GoString() string {
  1607. return s.String()
  1608. }
  1609. const (
  1610. // @enum LookupAttributeKey
  1611. LookupAttributeKeyEventId = "EventId"
  1612. // @enum LookupAttributeKey
  1613. LookupAttributeKeyEventName = "EventName"
  1614. // @enum LookupAttributeKey
  1615. LookupAttributeKeyUsername = "Username"
  1616. // @enum LookupAttributeKey
  1617. LookupAttributeKeyResourceType = "ResourceType"
  1618. // @enum LookupAttributeKey
  1619. LookupAttributeKeyResourceName = "ResourceName"
  1620. )