| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378 |
- // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
- package cloudtrail
- import (
- "fmt"
- "time"
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
- )
- const opAddTags = "AddTags"
- // AddTagsRequest generates a "aws/request.Request" representing the
- // client's request for the AddTags operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See AddTags for more information on using the AddTags
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the AddTagsRequest method.
- // req, resp := client.AddTagsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags
- func (c *CloudTrail) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) {
- op := &request.Operation{
- Name: opAddTags,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &AddTagsInput{}
- }
- output = &AddTagsOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // AddTags API operation for AWS CloudTrail.
- //
- // Adds one or more tags to a trail, up to a limit of 50. Tags must be unique
- // per trail. Overwrites an existing tag's value when a new value is specified
- // for an existing tag key. If you specify a key without a value, the tag will
- // be created with the specified key and a value of null. You can tag a trail
- // that applies to all regions only from the region in which the trail was created
- // (that is, from its home region).
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CloudTrail's
- // API operation AddTags for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // This exception is thrown when the specified resource is not found.
- //
- // * ErrCodeARNInvalidException "CloudTrailARNInvalidException"
- // This exception is thrown when an operation is called with an invalid trail
- // ARN. The format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // * ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException"
- // This exception is thrown when the specified resource type is not supported
- // by CloudTrail.
- //
- // * ErrCodeTagsLimitExceededException "TagsLimitExceededException"
- // The number of tags per trail has exceeded the permitted amount. Currently,
- // the limit is 50.
- //
- // * ErrCodeInvalidTrailNameException "InvalidTrailNameException"
- // This exception is thrown when the provided trail name is not valid. Trail
- // names must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // * ErrCodeInvalidTagParameterException "InvalidTagParameterException"
- // This exception is thrown when the key or value specified for the tag does
- // not match the regular expression ^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$.
- //
- // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
- // This exception is thrown when the requested operation is not supported.
- //
- // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
- // This exception is thrown when the requested operation is not permitted.
- //
- // * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException"
- // This exception is thrown when the AWS account making the request to create
- // or update an organization trail is not the master account for an organization
- // in AWS Organizations. For more information, see Prepare For Creating a Trail
- // For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags
- func (c *CloudTrail) AddTags(input *AddTagsInput) (*AddTagsOutput, error) {
- req, out := c.AddTagsRequest(input)
- return out, req.Send()
- }
- // AddTagsWithContext is the same as AddTags with the addition of
- // the ability to pass a context and additional request options.
- //
- // See AddTags for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudTrail) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) {
- req, out := c.AddTagsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opCreateTrail = "CreateTrail"
- // CreateTrailRequest generates a "aws/request.Request" representing the
- // client's request for the CreateTrail operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See CreateTrail for more information on using the CreateTrail
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the CreateTrailRequest method.
- // req, resp := client.CreateTrailRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail
- func (c *CloudTrail) CreateTrailRequest(input *CreateTrailInput) (req *request.Request, output *CreateTrailOutput) {
- op := &request.Operation{
- Name: opCreateTrail,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &CreateTrailInput{}
- }
- output = &CreateTrailOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // CreateTrail API operation for AWS CloudTrail.
- //
- // Creates a trail that specifies the settings for delivery of log data to an
- // Amazon S3 bucket. A maximum of five trails can exist in a region, irrespective
- // of the region in which they were created.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CloudTrail's
- // API operation CreateTrail for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeMaximumNumberOfTrailsExceededException "MaximumNumberOfTrailsExceededException"
- // This exception is thrown when the maximum number of trails is reached.
- //
- // * ErrCodeTrailAlreadyExistsException "TrailAlreadyExistsException"
- // This exception is thrown when the specified trail already exists.
- //
- // * ErrCodeS3BucketDoesNotExistException "S3BucketDoesNotExistException"
- // This exception is thrown when the specified S3 bucket does not exist.
- //
- // * ErrCodeInsufficientS3BucketPolicyException "InsufficientS3BucketPolicyException"
- // This exception is thrown when the policy on the S3 bucket is not sufficient.
- //
- // * ErrCodeInsufficientSnsTopicPolicyException "InsufficientSnsTopicPolicyException"
- // This exception is thrown when the policy on the SNS topic is not sufficient.
- //
- // * ErrCodeInsufficientEncryptionPolicyException "InsufficientEncryptionPolicyException"
- // This exception is thrown when the policy on the S3 bucket or KMS key is not
- // sufficient.
- //
- // * ErrCodeInvalidS3BucketNameException "InvalidS3BucketNameException"
- // This exception is thrown when the provided S3 bucket name is not valid.
- //
- // * ErrCodeInvalidS3PrefixException "InvalidS3PrefixException"
- // This exception is thrown when the provided S3 prefix is not valid.
- //
- // * ErrCodeInvalidSnsTopicNameException "InvalidSnsTopicNameException"
- // This exception is thrown when the provided SNS topic name is not valid.
- //
- // * ErrCodeInvalidKmsKeyIdException "InvalidKmsKeyIdException"
- // This exception is thrown when the KMS key ARN is invalid.
- //
- // * ErrCodeInvalidTrailNameException "InvalidTrailNameException"
- // This exception is thrown when the provided trail name is not valid. Trail
- // names must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // * ErrCodeTrailNotProvidedException "TrailNotProvidedException"
- // This exception is deprecated.
- //
- // * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException"
- // This exception is thrown when the combination of parameters provided is not
- // valid.
- //
- // * ErrCodeKmsKeyNotFoundException "KmsKeyNotFoundException"
- // This exception is thrown when the KMS key does not exist, or when the S3
- // bucket and the KMS key are not in the same region.
- //
- // * ErrCodeKmsKeyDisabledException "KmsKeyDisabledException"
- // This exception is deprecated.
- //
- // * ErrCodeKmsException "KmsException"
- // This exception is thrown when there is an issue with the specified KMS key
- // and the trail can’t be updated.
- //
- // * ErrCodeInvalidCloudWatchLogsLogGroupArnException "InvalidCloudWatchLogsLogGroupArnException"
- // This exception is thrown when the provided CloudWatch log group is not valid.
- //
- // * ErrCodeInvalidCloudWatchLogsRoleArnException "InvalidCloudWatchLogsRoleArnException"
- // This exception is thrown when the provided role is not valid.
- //
- // * ErrCodeCloudWatchLogsDeliveryUnavailableException "CloudWatchLogsDeliveryUnavailableException"
- // Cannot set a CloudWatch Logs delivery for this region.
- //
- // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
- // This exception is thrown when the requested operation is not supported.
- //
- // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
- // This exception is thrown when the requested operation is not permitted.
- //
- // * ErrCodeAccessNotEnabledException "CloudTrailAccessNotEnabledException"
- // This exception is thrown when trusted access has not been enabled between
- // AWS CloudTrail and AWS Organizations. For more information, see Enabling
- // Trusted Access with Other AWS Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
- // and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException"
- // This exception is thrown when the IAM user or role that is used to create
- // the organization trail is lacking one or more required permissions for creating
- // an organization trail in a required service. For more information, see Prepare
- // For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException"
- // This exception is thrown when the AWS account making the request to create
- // or update an organization trail is not the master account for an organization
- // in AWS Organizations. For more information, see Prepare For Creating a Trail
- // For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // * ErrCodeOrganizationsNotInUseException "OrganizationsNotInUseException"
- // This exception is thrown when the request is made from an AWS account that
- // is not a member of an organization. To make this request, sign in using the
- // credentials of an account that belongs to an organization.
- //
- // * ErrCodeOrganizationNotInAllFeaturesModeException "OrganizationNotInAllFeaturesModeException"
- // This exception is thrown when AWS Organizations is not configured to support
- // all features. All features must be enabled in AWS Organization to support
- // creating an organization trail. For more information, see Prepare For Creating
- // a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail
- func (c *CloudTrail) CreateTrail(input *CreateTrailInput) (*CreateTrailOutput, error) {
- req, out := c.CreateTrailRequest(input)
- return out, req.Send()
- }
- // CreateTrailWithContext is the same as CreateTrail with the addition of
- // the ability to pass a context and additional request options.
- //
- // See CreateTrail for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudTrail) CreateTrailWithContext(ctx aws.Context, input *CreateTrailInput, opts ...request.Option) (*CreateTrailOutput, error) {
- req, out := c.CreateTrailRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDeleteTrail = "DeleteTrail"
- // DeleteTrailRequest generates a "aws/request.Request" representing the
- // client's request for the DeleteTrail operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DeleteTrail for more information on using the DeleteTrail
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DeleteTrailRequest method.
- // req, resp := client.DeleteTrailRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail
- func (c *CloudTrail) DeleteTrailRequest(input *DeleteTrailInput) (req *request.Request, output *DeleteTrailOutput) {
- op := &request.Operation{
- Name: opDeleteTrail,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DeleteTrailInput{}
- }
- output = &DeleteTrailOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // DeleteTrail API operation for AWS CloudTrail.
- //
- // Deletes a trail. This operation must be called from the region in which the
- // trail was created. DeleteTrail cannot be called on the shadow trails (replicated
- // trails in other regions) of a trail that is enabled in all regions.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CloudTrail's
- // API operation DeleteTrail for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeTrailNotFoundException "TrailNotFoundException"
- // This exception is thrown when the trail with the given name is not found.
- //
- // * ErrCodeInvalidTrailNameException "InvalidTrailNameException"
- // This exception is thrown when the provided trail name is not valid. Trail
- // names must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // * ErrCodeInvalidHomeRegionException "InvalidHomeRegionException"
- // This exception is thrown when an operation is called on a trail from a region
- // other than the region in which the trail was created.
- //
- // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
- // This exception is thrown when the requested operation is not supported.
- //
- // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
- // This exception is thrown when the requested operation is not permitted.
- //
- // * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException"
- // This exception is thrown when the AWS account making the request to create
- // or update an organization trail is not the master account for an organization
- // in AWS Organizations. For more information, see Prepare For Creating a Trail
- // For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException"
- // This exception is thrown when the IAM user or role that is used to create
- // the organization trail is lacking one or more required permissions for creating
- // an organization trail in a required service. For more information, see Prepare
- // For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail
- func (c *CloudTrail) DeleteTrail(input *DeleteTrailInput) (*DeleteTrailOutput, error) {
- req, out := c.DeleteTrailRequest(input)
- return out, req.Send()
- }
- // DeleteTrailWithContext is the same as DeleteTrail with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DeleteTrail for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudTrail) DeleteTrailWithContext(ctx aws.Context, input *DeleteTrailInput, opts ...request.Option) (*DeleteTrailOutput, error) {
- req, out := c.DeleteTrailRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opDescribeTrails = "DescribeTrails"
- // DescribeTrailsRequest generates a "aws/request.Request" representing the
- // client's request for the DescribeTrails operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See DescribeTrails for more information on using the DescribeTrails
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the DescribeTrailsRequest method.
- // req, resp := client.DescribeTrailsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails
- func (c *CloudTrail) DescribeTrailsRequest(input *DescribeTrailsInput) (req *request.Request, output *DescribeTrailsOutput) {
- op := &request.Operation{
- Name: opDescribeTrails,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &DescribeTrailsInput{}
- }
- output = &DescribeTrailsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // DescribeTrails API operation for AWS CloudTrail.
- //
- // Retrieves settings for the trail associated with the current region for your
- // account.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CloudTrail's
- // API operation DescribeTrails for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
- // This exception is thrown when the requested operation is not supported.
- //
- // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
- // This exception is thrown when the requested operation is not permitted.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails
- func (c *CloudTrail) DescribeTrails(input *DescribeTrailsInput) (*DescribeTrailsOutput, error) {
- req, out := c.DescribeTrailsRequest(input)
- return out, req.Send()
- }
- // DescribeTrailsWithContext is the same as DescribeTrails with the addition of
- // the ability to pass a context and additional request options.
- //
- // See DescribeTrails for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudTrail) DescribeTrailsWithContext(ctx aws.Context, input *DescribeTrailsInput, opts ...request.Option) (*DescribeTrailsOutput, error) {
- req, out := c.DescribeTrailsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opGetEventSelectors = "GetEventSelectors"
- // GetEventSelectorsRequest generates a "aws/request.Request" representing the
- // client's request for the GetEventSelectors operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetEventSelectors for more information on using the GetEventSelectors
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetEventSelectorsRequest method.
- // req, resp := client.GetEventSelectorsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors
- func (c *CloudTrail) GetEventSelectorsRequest(input *GetEventSelectorsInput) (req *request.Request, output *GetEventSelectorsOutput) {
- op := &request.Operation{
- Name: opGetEventSelectors,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetEventSelectorsInput{}
- }
- output = &GetEventSelectorsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetEventSelectors API operation for AWS CloudTrail.
- //
- // Describes the settings for the event selectors that you configured for your
- // trail. The information returned for your event selectors includes the following:
- //
- // * If your event selector includes read-only events, write-only events,
- // or all events. This applies to both management events and data events.
- //
- // * If your event selector includes management events.
- //
- // * If your event selector includes data events, the Amazon S3 objects or
- // AWS Lambda functions that you are logging for data events.
- //
- // For more information, see Logging Data and Management Events for Trails
- // (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html)
- // in the AWS CloudTrail User Guide.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CloudTrail's
- // API operation GetEventSelectors for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeTrailNotFoundException "TrailNotFoundException"
- // This exception is thrown when the trail with the given name is not found.
- //
- // * ErrCodeInvalidTrailNameException "InvalidTrailNameException"
- // This exception is thrown when the provided trail name is not valid. Trail
- // names must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
- // This exception is thrown when the requested operation is not supported.
- //
- // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
- // This exception is thrown when the requested operation is not permitted.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors
- func (c *CloudTrail) GetEventSelectors(input *GetEventSelectorsInput) (*GetEventSelectorsOutput, error) {
- req, out := c.GetEventSelectorsRequest(input)
- return out, req.Send()
- }
- // GetEventSelectorsWithContext is the same as GetEventSelectors with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetEventSelectors for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudTrail) GetEventSelectorsWithContext(ctx aws.Context, input *GetEventSelectorsInput, opts ...request.Option) (*GetEventSelectorsOutput, error) {
- req, out := c.GetEventSelectorsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opGetTrailStatus = "GetTrailStatus"
- // GetTrailStatusRequest generates a "aws/request.Request" representing the
- // client's request for the GetTrailStatus operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See GetTrailStatus for more information on using the GetTrailStatus
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the GetTrailStatusRequest method.
- // req, resp := client.GetTrailStatusRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus
- func (c *CloudTrail) GetTrailStatusRequest(input *GetTrailStatusInput) (req *request.Request, output *GetTrailStatusOutput) {
- op := &request.Operation{
- Name: opGetTrailStatus,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &GetTrailStatusInput{}
- }
- output = &GetTrailStatusOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // GetTrailStatus API operation for AWS CloudTrail.
- //
- // Returns a JSON-formatted list of information about the specified trail. Fields
- // include information on delivery errors, Amazon SNS and Amazon S3 errors,
- // and start and stop logging times for each trail. This operation returns trail
- // status from a single region. To return trail status from all regions, you
- // must call the operation on each region.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CloudTrail's
- // API operation GetTrailStatus for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeTrailNotFoundException "TrailNotFoundException"
- // This exception is thrown when the trail with the given name is not found.
- //
- // * ErrCodeInvalidTrailNameException "InvalidTrailNameException"
- // This exception is thrown when the provided trail name is not valid. Trail
- // names must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus
- func (c *CloudTrail) GetTrailStatus(input *GetTrailStatusInput) (*GetTrailStatusOutput, error) {
- req, out := c.GetTrailStatusRequest(input)
- return out, req.Send()
- }
- // GetTrailStatusWithContext is the same as GetTrailStatus with the addition of
- // the ability to pass a context and additional request options.
- //
- // See GetTrailStatus for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudTrail) GetTrailStatusWithContext(ctx aws.Context, input *GetTrailStatusInput, opts ...request.Option) (*GetTrailStatusOutput, error) {
- req, out := c.GetTrailStatusRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opListPublicKeys = "ListPublicKeys"
- // ListPublicKeysRequest generates a "aws/request.Request" representing the
- // client's request for the ListPublicKeys operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListPublicKeys for more information on using the ListPublicKeys
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListPublicKeysRequest method.
- // req, resp := client.ListPublicKeysRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys
- func (c *CloudTrail) ListPublicKeysRequest(input *ListPublicKeysInput) (req *request.Request, output *ListPublicKeysOutput) {
- op := &request.Operation{
- Name: opListPublicKeys,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &ListPublicKeysInput{}
- }
- output = &ListPublicKeysOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListPublicKeys API operation for AWS CloudTrail.
- //
- // Returns all public keys whose private keys were used to sign the digest files
- // within the specified time range. The public key is needed to validate digest
- // files that were signed with its corresponding private key.
- //
- // CloudTrail uses different private/public key pairs per region. Each digest
- // file is signed with a private key unique to its region. Therefore, when you
- // validate a digest file from a particular region, you must look in the same
- // region for its corresponding public key.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CloudTrail's
- // API operation ListPublicKeys for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidTimeRangeException "InvalidTimeRangeException"
- // Occurs if the timestamp values are invalid. Either the start time occurs
- // after the end time or the time range is outside the range of possible values.
- //
- // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
- // This exception is thrown when the requested operation is not supported.
- //
- // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
- // This exception is thrown when the requested operation is not permitted.
- //
- // * ErrCodeInvalidTokenException "InvalidTokenException"
- // Reserved for future use.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys
- func (c *CloudTrail) ListPublicKeys(input *ListPublicKeysInput) (*ListPublicKeysOutput, error) {
- req, out := c.ListPublicKeysRequest(input)
- return out, req.Send()
- }
- // ListPublicKeysWithContext is the same as ListPublicKeys with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListPublicKeys for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudTrail) ListPublicKeysWithContext(ctx aws.Context, input *ListPublicKeysInput, opts ...request.Option) (*ListPublicKeysOutput, error) {
- req, out := c.ListPublicKeysRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opListTags = "ListTags"
- // ListTagsRequest generates a "aws/request.Request" representing the
- // client's request for the ListTags operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See ListTags for more information on using the ListTags
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the ListTagsRequest method.
- // req, resp := client.ListTagsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags
- func (c *CloudTrail) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) {
- op := &request.Operation{
- Name: opListTags,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &ListTagsInput{}
- }
- output = &ListTagsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // ListTags API operation for AWS CloudTrail.
- //
- // Lists the tags for the trail in the current region.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CloudTrail's
- // API operation ListTags for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // This exception is thrown when the specified resource is not found.
- //
- // * ErrCodeARNInvalidException "CloudTrailARNInvalidException"
- // This exception is thrown when an operation is called with an invalid trail
- // ARN. The format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // * ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException"
- // This exception is thrown when the specified resource type is not supported
- // by CloudTrail.
- //
- // * ErrCodeInvalidTrailNameException "InvalidTrailNameException"
- // This exception is thrown when the provided trail name is not valid. Trail
- // names must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
- // This exception is thrown when the requested operation is not supported.
- //
- // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
- // This exception is thrown when the requested operation is not permitted.
- //
- // * ErrCodeInvalidTokenException "InvalidTokenException"
- // Reserved for future use.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags
- func (c *CloudTrail) ListTags(input *ListTagsInput) (*ListTagsOutput, error) {
- req, out := c.ListTagsRequest(input)
- return out, req.Send()
- }
- // ListTagsWithContext is the same as ListTags with the addition of
- // the ability to pass a context and additional request options.
- //
- // See ListTags for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudTrail) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) {
- req, out := c.ListTagsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opLookupEvents = "LookupEvents"
- // LookupEventsRequest generates a "aws/request.Request" representing the
- // client's request for the LookupEvents operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See LookupEvents for more information on using the LookupEvents
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the LookupEventsRequest method.
- // req, resp := client.LookupEventsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents
- func (c *CloudTrail) LookupEventsRequest(input *LookupEventsInput) (req *request.Request, output *LookupEventsOutput) {
- op := &request.Operation{
- Name: opLookupEvents,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
- if input == nil {
- input = &LookupEventsInput{}
- }
- output = &LookupEventsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // LookupEvents API operation for AWS CloudTrail.
- //
- // Looks up management events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events)
- // captured by CloudTrail. Events for a region can be looked up in that region
- // during the last 90 days. Lookup supports the following attributes:
- //
- // * AWS access key
- //
- // * Event ID
- //
- // * Event name
- //
- // * Event source
- //
- // * Read only
- //
- // * Resource name
- //
- // * Resource type
- //
- // * User name
- //
- // All attributes are optional. The default number of results returned is 50,
- // with a maximum of 50 possible. The response includes a token that you can
- // use to get the next page of results.
- //
- // The rate of lookup requests is limited to one per second per account. If
- // this limit is exceeded, a throttling error occurs.
- //
- // Events that occurred during the selected time range will not be available
- // for lookup if CloudTrail logging was not enabled when the events occurred.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CloudTrail's
- // API operation LookupEvents for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeInvalidLookupAttributesException "InvalidLookupAttributesException"
- // Occurs when an invalid lookup attribute is specified.
- //
- // * ErrCodeInvalidTimeRangeException "InvalidTimeRangeException"
- // Occurs if the timestamp values are invalid. Either the start time occurs
- // after the end time or the time range is outside the range of possible values.
- //
- // * ErrCodeInvalidMaxResultsException "InvalidMaxResultsException"
- // This exception is thrown if the limit specified is invalid.
- //
- // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
- // Invalid token or token that was previously used in a request with different
- // parameters. This exception is thrown if the token is invalid.
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents
- func (c *CloudTrail) LookupEvents(input *LookupEventsInput) (*LookupEventsOutput, error) {
- req, out := c.LookupEventsRequest(input)
- return out, req.Send()
- }
- // LookupEventsWithContext is the same as LookupEvents with the addition of
- // the ability to pass a context and additional request options.
- //
- // See LookupEvents for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudTrail) LookupEventsWithContext(ctx aws.Context, input *LookupEventsInput, opts ...request.Option) (*LookupEventsOutput, error) {
- req, out := c.LookupEventsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // LookupEventsPages iterates over the pages of a LookupEvents operation,
- // calling the "fn" function with the response data for each page. To stop
- // iterating, return false from the fn function.
- //
- // See LookupEvents method for more information on how to use this operation.
- //
- // Note: This operation can generate multiple requests to a service.
- //
- // // Example iterating over at most 3 pages of a LookupEvents operation.
- // pageNum := 0
- // err := client.LookupEventsPages(params,
- // func(page *LookupEventsOutput, lastPage bool) bool {
- // pageNum++
- // fmt.Println(page)
- // return pageNum <= 3
- // })
- //
- func (c *CloudTrail) LookupEventsPages(input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool) error {
- return c.LookupEventsPagesWithContext(aws.BackgroundContext(), input, fn)
- }
- // LookupEventsPagesWithContext same as LookupEventsPages except
- // it takes a Context and allows setting request options on the pages.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudTrail) LookupEventsPagesWithContext(ctx aws.Context, input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *LookupEventsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.LookupEventsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- cont := true
- for p.Next() && cont {
- cont = fn(p.Page().(*LookupEventsOutput), !p.HasNextPage())
- }
- return p.Err()
- }
- const opPutEventSelectors = "PutEventSelectors"
- // PutEventSelectorsRequest generates a "aws/request.Request" representing the
- // client's request for the PutEventSelectors operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See PutEventSelectors for more information on using the PutEventSelectors
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the PutEventSelectorsRequest method.
- // req, resp := client.PutEventSelectorsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors
- func (c *CloudTrail) PutEventSelectorsRequest(input *PutEventSelectorsInput) (req *request.Request, output *PutEventSelectorsOutput) {
- op := &request.Operation{
- Name: opPutEventSelectors,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &PutEventSelectorsInput{}
- }
- output = &PutEventSelectorsOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // PutEventSelectors API operation for AWS CloudTrail.
- //
- // Configures an event selector for your trail. Use event selectors to further
- // specify the management and data event settings for your trail. By default,
- // trails created without specific event selectors will be configured to log
- // all read and write management events, and no data events.
- //
- // When an event occurs in your account, CloudTrail evaluates the event selectors
- // in all trails. For each trail, if the event matches any event selector, the
- // trail processes and logs the event. If the event doesn't match any event
- // selector, the trail doesn't log the event.
- //
- // Example
- //
- // You create an event selector for a trail and specify that you want write-only
- // events.
- //
- // The EC2 GetConsoleOutput and RunInstances API operations occur in your account.
- //
- // CloudTrail evaluates whether the events match your event selectors.
- //
- // The RunInstances is a write-only event and it matches your event selector.
- // The trail logs the event.
- //
- // The GetConsoleOutput is a read-only event but it doesn't match your event
- // selector. The trail doesn't log the event.
- //
- // The PutEventSelectors operation must be called from the region in which the
- // trail was created; otherwise, an InvalidHomeRegionException is thrown.
- //
- // You can configure up to five event selectors for each trail. For more information,
- // see Logging Data and Management Events for Trails (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html)
- // and Limits in AWS CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html)
- // in the AWS CloudTrail User Guide.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CloudTrail's
- // API operation PutEventSelectors for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeTrailNotFoundException "TrailNotFoundException"
- // This exception is thrown when the trail with the given name is not found.
- //
- // * ErrCodeInvalidTrailNameException "InvalidTrailNameException"
- // This exception is thrown when the provided trail name is not valid. Trail
- // names must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // * ErrCodeInvalidHomeRegionException "InvalidHomeRegionException"
- // This exception is thrown when an operation is called on a trail from a region
- // other than the region in which the trail was created.
- //
- // * ErrCodeInvalidEventSelectorsException "InvalidEventSelectorsException"
- // This exception is thrown when the PutEventSelectors operation is called with
- // a number of event selectors or data resources that is not valid. The combination
- // of event selectors and data resources is not valid. A trail can have up to
- // 5 event selectors. A trail is limited to 250 data resources. These data resources
- // can be distributed across event selectors, but the overall total cannot exceed
- // 250.
- //
- // You can:
- //
- // * Specify a valid number of event selectors (1 to 5) for a trail.
- //
- // * Specify a valid number of data resources (1 to 250) for an event selector.
- // The limit of number of resources on an individual event selector is configurable
- // up to 250. However, this upper limit is allowed only if the total number
- // of data resources does not exceed 250 across all event selectors for a
- // trail.
- //
- // * Specify a valid value for a parameter. For example, specifying the ReadWriteType
- // parameter with a value of read-only is invalid.
- //
- // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
- // This exception is thrown when the requested operation is not supported.
- //
- // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
- // This exception is thrown when the requested operation is not permitted.
- //
- // * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException"
- // This exception is thrown when the AWS account making the request to create
- // or update an organization trail is not the master account for an organization
- // in AWS Organizations. For more information, see Prepare For Creating a Trail
- // For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException"
- // This exception is thrown when the IAM user or role that is used to create
- // the organization trail is lacking one or more required permissions for creating
- // an organization trail in a required service. For more information, see Prepare
- // For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors
- func (c *CloudTrail) PutEventSelectors(input *PutEventSelectorsInput) (*PutEventSelectorsOutput, error) {
- req, out := c.PutEventSelectorsRequest(input)
- return out, req.Send()
- }
- // PutEventSelectorsWithContext is the same as PutEventSelectors with the addition of
- // the ability to pass a context and additional request options.
- //
- // See PutEventSelectors for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudTrail) PutEventSelectorsWithContext(ctx aws.Context, input *PutEventSelectorsInput, opts ...request.Option) (*PutEventSelectorsOutput, error) {
- req, out := c.PutEventSelectorsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opRemoveTags = "RemoveTags"
- // RemoveTagsRequest generates a "aws/request.Request" representing the
- // client's request for the RemoveTags operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See RemoveTags for more information on using the RemoveTags
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the RemoveTagsRequest method.
- // req, resp := client.RemoveTagsRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags
- func (c *CloudTrail) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) {
- op := &request.Operation{
- Name: opRemoveTags,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &RemoveTagsInput{}
- }
- output = &RemoveTagsOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // RemoveTags API operation for AWS CloudTrail.
- //
- // Removes the specified tags from a trail.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CloudTrail's
- // API operation RemoveTags for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
- // This exception is thrown when the specified resource is not found.
- //
- // * ErrCodeARNInvalidException "CloudTrailARNInvalidException"
- // This exception is thrown when an operation is called with an invalid trail
- // ARN. The format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // * ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException"
- // This exception is thrown when the specified resource type is not supported
- // by CloudTrail.
- //
- // * ErrCodeInvalidTrailNameException "InvalidTrailNameException"
- // This exception is thrown when the provided trail name is not valid. Trail
- // names must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // * ErrCodeInvalidTagParameterException "InvalidTagParameterException"
- // This exception is thrown when the key or value specified for the tag does
- // not match the regular expression ^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$.
- //
- // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
- // This exception is thrown when the requested operation is not supported.
- //
- // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
- // This exception is thrown when the requested operation is not permitted.
- //
- // * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException"
- // This exception is thrown when the AWS account making the request to create
- // or update an organization trail is not the master account for an organization
- // in AWS Organizations. For more information, see Prepare For Creating a Trail
- // For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags
- func (c *CloudTrail) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) {
- req, out := c.RemoveTagsRequest(input)
- return out, req.Send()
- }
- // RemoveTagsWithContext is the same as RemoveTags with the addition of
- // the ability to pass a context and additional request options.
- //
- // See RemoveTags for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudTrail) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error) {
- req, out := c.RemoveTagsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStartLogging = "StartLogging"
- // StartLoggingRequest generates a "aws/request.Request" representing the
- // client's request for the StartLogging operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StartLogging for more information on using the StartLogging
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StartLoggingRequest method.
- // req, resp := client.StartLoggingRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging
- func (c *CloudTrail) StartLoggingRequest(input *StartLoggingInput) (req *request.Request, output *StartLoggingOutput) {
- op := &request.Operation{
- Name: opStartLogging,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &StartLoggingInput{}
- }
- output = &StartLoggingOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // StartLogging API operation for AWS CloudTrail.
- //
- // Starts the recording of AWS API calls and log file delivery for a trail.
- // For a trail that is enabled in all regions, this operation must be called
- // from the region in which the trail was created. This operation cannot be
- // called on the shadow trails (replicated trails in other regions) of a trail
- // that is enabled in all regions.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CloudTrail's
- // API operation StartLogging for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeTrailNotFoundException "TrailNotFoundException"
- // This exception is thrown when the trail with the given name is not found.
- //
- // * ErrCodeInvalidTrailNameException "InvalidTrailNameException"
- // This exception is thrown when the provided trail name is not valid. Trail
- // names must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // * ErrCodeInvalidHomeRegionException "InvalidHomeRegionException"
- // This exception is thrown when an operation is called on a trail from a region
- // other than the region in which the trail was created.
- //
- // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
- // This exception is thrown when the requested operation is not supported.
- //
- // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
- // This exception is thrown when the requested operation is not permitted.
- //
- // * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException"
- // This exception is thrown when the AWS account making the request to create
- // or update an organization trail is not the master account for an organization
- // in AWS Organizations. For more information, see Prepare For Creating a Trail
- // For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException"
- // This exception is thrown when the IAM user or role that is used to create
- // the organization trail is lacking one or more required permissions for creating
- // an organization trail in a required service. For more information, see Prepare
- // For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging
- func (c *CloudTrail) StartLogging(input *StartLoggingInput) (*StartLoggingOutput, error) {
- req, out := c.StartLoggingRequest(input)
- return out, req.Send()
- }
- // StartLoggingWithContext is the same as StartLogging with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StartLogging for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudTrail) StartLoggingWithContext(ctx aws.Context, input *StartLoggingInput, opts ...request.Option) (*StartLoggingOutput, error) {
- req, out := c.StartLoggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opStopLogging = "StopLogging"
- // StopLoggingRequest generates a "aws/request.Request" representing the
- // client's request for the StopLogging operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See StopLogging for more information on using the StopLogging
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the StopLoggingRequest method.
- // req, resp := client.StopLoggingRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging
- func (c *CloudTrail) StopLoggingRequest(input *StopLoggingInput) (req *request.Request, output *StopLoggingOutput) {
- op := &request.Operation{
- Name: opStopLogging,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &StopLoggingInput{}
- }
- output = &StopLoggingOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
- }
- // StopLogging API operation for AWS CloudTrail.
- //
- // Suspends the recording of AWS API calls and log file delivery for the specified
- // trail. Under most circumstances, there is no need to use this action. You
- // can update a trail without stopping it first. This action is the only way
- // to stop recording. For a trail enabled in all regions, this operation must
- // be called from the region in which the trail was created, or an InvalidHomeRegionException
- // will occur. This operation cannot be called on the shadow trails (replicated
- // trails in other regions) of a trail enabled in all regions.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CloudTrail's
- // API operation StopLogging for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeTrailNotFoundException "TrailNotFoundException"
- // This exception is thrown when the trail with the given name is not found.
- //
- // * ErrCodeInvalidTrailNameException "InvalidTrailNameException"
- // This exception is thrown when the provided trail name is not valid. Trail
- // names must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // * ErrCodeInvalidHomeRegionException "InvalidHomeRegionException"
- // This exception is thrown when an operation is called on a trail from a region
- // other than the region in which the trail was created.
- //
- // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
- // This exception is thrown when the requested operation is not supported.
- //
- // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
- // This exception is thrown when the requested operation is not permitted.
- //
- // * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException"
- // This exception is thrown when the AWS account making the request to create
- // or update an organization trail is not the master account for an organization
- // in AWS Organizations. For more information, see Prepare For Creating a Trail
- // For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException"
- // This exception is thrown when the IAM user or role that is used to create
- // the organization trail is lacking one or more required permissions for creating
- // an organization trail in a required service. For more information, see Prepare
- // For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging
- func (c *CloudTrail) StopLogging(input *StopLoggingInput) (*StopLoggingOutput, error) {
- req, out := c.StopLoggingRequest(input)
- return out, req.Send()
- }
- // StopLoggingWithContext is the same as StopLogging with the addition of
- // the ability to pass a context and additional request options.
- //
- // See StopLogging for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudTrail) StopLoggingWithContext(ctx aws.Context, input *StopLoggingInput, opts ...request.Option) (*StopLoggingOutput, error) {
- req, out := c.StopLoggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- const opUpdateTrail = "UpdateTrail"
- // UpdateTrailRequest generates a "aws/request.Request" representing the
- // client's request for the UpdateTrail operation. The "output" return
- // value will be populated with the request's response once the request completes
- // successfully.
- //
- // Use "Send" method on the returned Request to send the API call to the service.
- // the "output" return value is not valid until after Send returns without error.
- //
- // See UpdateTrail for more information on using the UpdateTrail
- // API call, and error handling.
- //
- // This method is useful when you want to inject custom logic or configuration
- // into the SDK's request lifecycle. Such as custom headers, or retry logic.
- //
- //
- // // Example sending a request using the UpdateTrailRequest method.
- // req, resp := client.UpdateTrailRequest(params)
- //
- // err := req.Send()
- // if err == nil { // resp is now filled
- // fmt.Println(resp)
- // }
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail
- func (c *CloudTrail) UpdateTrailRequest(input *UpdateTrailInput) (req *request.Request, output *UpdateTrailOutput) {
- op := &request.Operation{
- Name: opUpdateTrail,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
- if input == nil {
- input = &UpdateTrailInput{}
- }
- output = &UpdateTrailOutput{}
- req = c.newRequest(op, input, output)
- return
- }
- // UpdateTrail API operation for AWS CloudTrail.
- //
- // Updates the settings that specify delivery of log files. Changes to a trail
- // do not require stopping the CloudTrail service. Use this action to designate
- // an existing bucket for log delivery. If the existing bucket has previously
- // been a target for CloudTrail log files, an IAM policy exists for the bucket.
- // UpdateTrail must be called from the region in which the trail was created;
- // otherwise, an InvalidHomeRegionException is thrown.
- //
- // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
- // with awserr.Error's Code and Message methods to get detailed information about
- // the error.
- //
- // See the AWS API reference guide for AWS CloudTrail's
- // API operation UpdateTrail for usage and error information.
- //
- // Returned Error Codes:
- // * ErrCodeS3BucketDoesNotExistException "S3BucketDoesNotExistException"
- // This exception is thrown when the specified S3 bucket does not exist.
- //
- // * ErrCodeInsufficientS3BucketPolicyException "InsufficientS3BucketPolicyException"
- // This exception is thrown when the policy on the S3 bucket is not sufficient.
- //
- // * ErrCodeInsufficientSnsTopicPolicyException "InsufficientSnsTopicPolicyException"
- // This exception is thrown when the policy on the SNS topic is not sufficient.
- //
- // * ErrCodeInsufficientEncryptionPolicyException "InsufficientEncryptionPolicyException"
- // This exception is thrown when the policy on the S3 bucket or KMS key is not
- // sufficient.
- //
- // * ErrCodeTrailNotFoundException "TrailNotFoundException"
- // This exception is thrown when the trail with the given name is not found.
- //
- // * ErrCodeInvalidS3BucketNameException "InvalidS3BucketNameException"
- // This exception is thrown when the provided S3 bucket name is not valid.
- //
- // * ErrCodeInvalidS3PrefixException "InvalidS3PrefixException"
- // This exception is thrown when the provided S3 prefix is not valid.
- //
- // * ErrCodeInvalidSnsTopicNameException "InvalidSnsTopicNameException"
- // This exception is thrown when the provided SNS topic name is not valid.
- //
- // * ErrCodeInvalidKmsKeyIdException "InvalidKmsKeyIdException"
- // This exception is thrown when the KMS key ARN is invalid.
- //
- // * ErrCodeInvalidTrailNameException "InvalidTrailNameException"
- // This exception is thrown when the provided trail name is not valid. Trail
- // names must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // * ErrCodeTrailNotProvidedException "TrailNotProvidedException"
- // This exception is deprecated.
- //
- // * ErrCodeInvalidParameterCombinationException "InvalidParameterCombinationException"
- // This exception is thrown when the combination of parameters provided is not
- // valid.
- //
- // * ErrCodeInvalidHomeRegionException "InvalidHomeRegionException"
- // This exception is thrown when an operation is called on a trail from a region
- // other than the region in which the trail was created.
- //
- // * ErrCodeKmsKeyNotFoundException "KmsKeyNotFoundException"
- // This exception is thrown when the KMS key does not exist, or when the S3
- // bucket and the KMS key are not in the same region.
- //
- // * ErrCodeKmsKeyDisabledException "KmsKeyDisabledException"
- // This exception is deprecated.
- //
- // * ErrCodeKmsException "KmsException"
- // This exception is thrown when there is an issue with the specified KMS key
- // and the trail can’t be updated.
- //
- // * ErrCodeInvalidCloudWatchLogsLogGroupArnException "InvalidCloudWatchLogsLogGroupArnException"
- // This exception is thrown when the provided CloudWatch log group is not valid.
- //
- // * ErrCodeInvalidCloudWatchLogsRoleArnException "InvalidCloudWatchLogsRoleArnException"
- // This exception is thrown when the provided role is not valid.
- //
- // * ErrCodeCloudWatchLogsDeliveryUnavailableException "CloudWatchLogsDeliveryUnavailableException"
- // Cannot set a CloudWatch Logs delivery for this region.
- //
- // * ErrCodeUnsupportedOperationException "UnsupportedOperationException"
- // This exception is thrown when the requested operation is not supported.
- //
- // * ErrCodeOperationNotPermittedException "OperationNotPermittedException"
- // This exception is thrown when the requested operation is not permitted.
- //
- // * ErrCodeAccessNotEnabledException "CloudTrailAccessNotEnabledException"
- // This exception is thrown when trusted access has not been enabled between
- // AWS CloudTrail and AWS Organizations. For more information, see Enabling
- // Trusted Access with Other AWS Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
- // and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException"
- // This exception is thrown when the IAM user or role that is used to create
- // the organization trail is lacking one or more required permissions for creating
- // an organization trail in a required service. For more information, see Prepare
- // For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // * ErrCodeOrganizationsNotInUseException "OrganizationsNotInUseException"
- // This exception is thrown when the request is made from an AWS account that
- // is not a member of an organization. To make this request, sign in using the
- // credentials of an account that belongs to an organization.
- //
- // * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException"
- // This exception is thrown when the AWS account making the request to create
- // or update an organization trail is not the master account for an organization
- // in AWS Organizations. For more information, see Prepare For Creating a Trail
- // For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // * ErrCodeOrganizationNotInAllFeaturesModeException "OrganizationNotInAllFeaturesModeException"
- // This exception is thrown when AWS Organizations is not configured to support
- // all features. All features must be enabled in AWS Organization to support
- // creating an organization trail. For more information, see Prepare For Creating
- // a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- //
- // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail
- func (c *CloudTrail) UpdateTrail(input *UpdateTrailInput) (*UpdateTrailOutput, error) {
- req, out := c.UpdateTrailRequest(input)
- return out, req.Send()
- }
- // UpdateTrailWithContext is the same as UpdateTrail with the addition of
- // the ability to pass a context and additional request options.
- //
- // See UpdateTrail for details on how to use this API operation.
- //
- // The context must be non-nil and will be used for request cancellation. If
- // the context is nil a panic will occur. In the future the SDK may create
- // sub-contexts for http.Requests. See https://golang.org/pkg/context/
- // for more information on using Contexts.
- func (c *CloudTrail) UpdateTrailWithContext(ctx aws.Context, input *UpdateTrailInput, opts ...request.Option) (*UpdateTrailOutput, error) {
- req, out := c.UpdateTrailRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
- }
- // Specifies the tags to add to a trail.
- type AddTagsInput struct {
- _ struct{} `type:"structure"`
- // Specifies the ARN of the trail to which one or more tags will be added. The
- // format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // ResourceId is a required field
- ResourceId *string `type:"string" required:"true"`
- // Contains a list of CloudTrail tags, up to a limit of 50
- TagsList []*Tag `type:"list"`
- }
- // String returns the string representation
- func (s AddTagsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s AddTagsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *AddTagsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"}
- if s.ResourceId == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceId"))
- }
- if s.TagsList != nil {
- for i, v := range s.TagsList {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetResourceId sets the ResourceId field's value.
- func (s *AddTagsInput) SetResourceId(v string) *AddTagsInput {
- s.ResourceId = &v
- return s
- }
- // SetTagsList sets the TagsList field's value.
- func (s *AddTagsInput) SetTagsList(v []*Tag) *AddTagsInput {
- s.TagsList = v
- return s
- }
- // Returns the objects or data listed below if successful. Otherwise, returns
- // an error.
- type AddTagsOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s AddTagsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s AddTagsOutput) GoString() string {
- return s.String()
- }
- // Specifies the settings for each trail.
- type CreateTrailInput struct {
- _ struct{} `type:"structure"`
- // Specifies a log group name using an Amazon Resource Name (ARN), a unique
- // identifier that represents the log group to which CloudTrail logs will be
- // delivered. Not required unless you specify CloudWatchLogsRoleArn.
- CloudWatchLogsLogGroupArn *string `type:"string"`
- // Specifies the role for the CloudWatch Logs endpoint to assume to write to
- // a user's log group.
- CloudWatchLogsRoleArn *string `type:"string"`
- // Specifies whether log file integrity validation is enabled. The default is
- // false.
- //
- // When you disable log file integrity validation, the chain of digest files
- // is broken after one hour. CloudTrail will not create digest files for log
- // files that were delivered during a period in which log file integrity validation
- // was disabled. For example, if you enable log file integrity validation at
- // noon on January 1, disable it at noon on January 2, and re-enable it at noon
- // on January 10, digest files will not be created for the log files delivered
- // from noon on January 2 to noon on January 10. The same applies whenever you
- // stop CloudTrail logging or delete a trail.
- EnableLogFileValidation *bool `type:"boolean"`
- // Specifies whether the trail is publishing events from global services such
- // as IAM to the log files.
- IncludeGlobalServiceEvents *bool `type:"boolean"`
- // Specifies whether the trail is created in the current region or in all regions.
- // The default is false.
- IsMultiRegionTrail *bool `type:"boolean"`
- // Specifies whether the trail is created for all accounts in an organization
- // in AWS Organizations, or only for the current AWS account. The default is
- // false, and cannot be true unless the call is made on behalf of an AWS account
- // that is the master account for an organization in AWS Organizations.
- IsOrganizationTrail *bool `type:"boolean"`
- // Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail.
- // The value can be an alias name prefixed by "alias/", a fully specified ARN
- // to an alias, a fully specified ARN to a key, or a globally unique identifier.
- //
- // Examples:
- //
- // * alias/MyAliasName
- //
- // * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
- //
- // * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
- //
- // * 12345678-1234-1234-1234-123456789012
- KmsKeyId *string `type:"string"`
- // Specifies the name of the trail. The name must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // Name is a required field
- Name *string `type:"string" required:"true"`
- // Specifies the name of the Amazon S3 bucket designated for publishing log
- // files. See Amazon S3 Bucket Naming Requirements (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
- //
- // S3BucketName is a required field
- S3BucketName *string `type:"string" required:"true"`
- // Specifies the Amazon S3 key prefix that comes after the name of the bucket
- // you have designated for log file delivery. For more information, see Finding
- // Your CloudTrail Log Files (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
- // The maximum length is 200 characters.
- S3KeyPrefix *string `type:"string"`
- // Specifies the name of the Amazon SNS topic defined for notification of log
- // file delivery. The maximum length is 256 characters.
- SnsTopicName *string `type:"string"`
- }
- // String returns the string representation
- func (s CreateTrailInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateTrailInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *CreateTrailInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateTrailInput"}
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.S3BucketName == nil {
- invalidParams.Add(request.NewErrParamRequired("S3BucketName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
- func (s *CreateTrailInput) SetCloudWatchLogsLogGroupArn(v string) *CreateTrailInput {
- s.CloudWatchLogsLogGroupArn = &v
- return s
- }
- // SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
- func (s *CreateTrailInput) SetCloudWatchLogsRoleArn(v string) *CreateTrailInput {
- s.CloudWatchLogsRoleArn = &v
- return s
- }
- // SetEnableLogFileValidation sets the EnableLogFileValidation field's value.
- func (s *CreateTrailInput) SetEnableLogFileValidation(v bool) *CreateTrailInput {
- s.EnableLogFileValidation = &v
- return s
- }
- // SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
- func (s *CreateTrailInput) SetIncludeGlobalServiceEvents(v bool) *CreateTrailInput {
- s.IncludeGlobalServiceEvents = &v
- return s
- }
- // SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
- func (s *CreateTrailInput) SetIsMultiRegionTrail(v bool) *CreateTrailInput {
- s.IsMultiRegionTrail = &v
- return s
- }
- // SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
- func (s *CreateTrailInput) SetIsOrganizationTrail(v bool) *CreateTrailInput {
- s.IsOrganizationTrail = &v
- return s
- }
- // SetKmsKeyId sets the KmsKeyId field's value.
- func (s *CreateTrailInput) SetKmsKeyId(v string) *CreateTrailInput {
- s.KmsKeyId = &v
- return s
- }
- // SetName sets the Name field's value.
- func (s *CreateTrailInput) SetName(v string) *CreateTrailInput {
- s.Name = &v
- return s
- }
- // SetS3BucketName sets the S3BucketName field's value.
- func (s *CreateTrailInput) SetS3BucketName(v string) *CreateTrailInput {
- s.S3BucketName = &v
- return s
- }
- // SetS3KeyPrefix sets the S3KeyPrefix field's value.
- func (s *CreateTrailInput) SetS3KeyPrefix(v string) *CreateTrailInput {
- s.S3KeyPrefix = &v
- return s
- }
- // SetSnsTopicName sets the SnsTopicName field's value.
- func (s *CreateTrailInput) SetSnsTopicName(v string) *CreateTrailInput {
- s.SnsTopicName = &v
- return s
- }
- // Returns the objects or data listed below if successful. Otherwise, returns
- // an error.
- type CreateTrailOutput struct {
- _ struct{} `type:"structure"`
- // Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail
- // logs will be delivered.
- CloudWatchLogsLogGroupArn *string `type:"string"`
- // Specifies the role for the CloudWatch Logs endpoint to assume to write to
- // a user's log group.
- CloudWatchLogsRoleArn *string `type:"string"`
- // Specifies whether the trail is publishing events from global services such
- // as IAM to the log files.
- IncludeGlobalServiceEvents *bool `type:"boolean"`
- // Specifies whether the trail exists in one region or in all regions.
- IsMultiRegionTrail *bool `type:"boolean"`
- // Specifies whether the trail is an organization trail.
- IsOrganizationTrail *bool `type:"boolean"`
- // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
- // The value is a fully specified ARN to a KMS key in the format:
- //
- // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
- KmsKeyId *string `type:"string"`
- // Specifies whether log file integrity validation is enabled.
- LogFileValidationEnabled *bool `type:"boolean"`
- // Specifies the name of the trail.
- Name *string `type:"string"`
- // Specifies the name of the Amazon S3 bucket designated for publishing log
- // files.
- S3BucketName *string `type:"string"`
- // Specifies the Amazon S3 key prefix that comes after the name of the bucket
- // you have designated for log file delivery. For more information, see Finding
- // Your CloudTrail Log Files (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
- S3KeyPrefix *string `type:"string"`
- // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
- // when log files are delivered. The format of a topic ARN is:
- //
- // arn:aws:sns:us-east-2:123456789012:MyTopic
- SnsTopicARN *string `type:"string"`
- // This field is deprecated. Use SnsTopicARN.
- //
- // Deprecated: SnsTopicName has been deprecated
- SnsTopicName *string `deprecated:"true" type:"string"`
- // Specifies the ARN of the trail that was created. The format of a trail ARN
- // is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- TrailARN *string `type:"string"`
- }
- // String returns the string representation
- func (s CreateTrailOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s CreateTrailOutput) GoString() string {
- return s.String()
- }
- // SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
- func (s *CreateTrailOutput) SetCloudWatchLogsLogGroupArn(v string) *CreateTrailOutput {
- s.CloudWatchLogsLogGroupArn = &v
- return s
- }
- // SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
- func (s *CreateTrailOutput) SetCloudWatchLogsRoleArn(v string) *CreateTrailOutput {
- s.CloudWatchLogsRoleArn = &v
- return s
- }
- // SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
- func (s *CreateTrailOutput) SetIncludeGlobalServiceEvents(v bool) *CreateTrailOutput {
- s.IncludeGlobalServiceEvents = &v
- return s
- }
- // SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
- func (s *CreateTrailOutput) SetIsMultiRegionTrail(v bool) *CreateTrailOutput {
- s.IsMultiRegionTrail = &v
- return s
- }
- // SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
- func (s *CreateTrailOutput) SetIsOrganizationTrail(v bool) *CreateTrailOutput {
- s.IsOrganizationTrail = &v
- return s
- }
- // SetKmsKeyId sets the KmsKeyId field's value.
- func (s *CreateTrailOutput) SetKmsKeyId(v string) *CreateTrailOutput {
- s.KmsKeyId = &v
- return s
- }
- // SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.
- func (s *CreateTrailOutput) SetLogFileValidationEnabled(v bool) *CreateTrailOutput {
- s.LogFileValidationEnabled = &v
- return s
- }
- // SetName sets the Name field's value.
- func (s *CreateTrailOutput) SetName(v string) *CreateTrailOutput {
- s.Name = &v
- return s
- }
- // SetS3BucketName sets the S3BucketName field's value.
- func (s *CreateTrailOutput) SetS3BucketName(v string) *CreateTrailOutput {
- s.S3BucketName = &v
- return s
- }
- // SetS3KeyPrefix sets the S3KeyPrefix field's value.
- func (s *CreateTrailOutput) SetS3KeyPrefix(v string) *CreateTrailOutput {
- s.S3KeyPrefix = &v
- return s
- }
- // SetSnsTopicARN sets the SnsTopicARN field's value.
- func (s *CreateTrailOutput) SetSnsTopicARN(v string) *CreateTrailOutput {
- s.SnsTopicARN = &v
- return s
- }
- // SetSnsTopicName sets the SnsTopicName field's value.
- func (s *CreateTrailOutput) SetSnsTopicName(v string) *CreateTrailOutput {
- s.SnsTopicName = &v
- return s
- }
- // SetTrailARN sets the TrailARN field's value.
- func (s *CreateTrailOutput) SetTrailARN(v string) *CreateTrailOutput {
- s.TrailARN = &v
- return s
- }
- // The Amazon S3 buckets or AWS Lambda functions that you specify in your event
- // selectors for your trail to log data events. Data events provide insight
- // into the resource operations performed on or within a resource itself. These
- // are also known as data plane operations. You can specify up to 250 data resources
- // for a trail.
- //
- // The total number of allowed data resources is 250. This number can be distributed
- // between 1 and 5 event selectors, but the total cannot exceed 250 across all
- // selectors.
- //
- // The following example demonstrates how logging works when you configure logging
- // of all data events for an S3 bucket named bucket-1. In this example, the
- // CloudTrail user spcified an empty prefix, and the option to log both Read
- // and Write data events.
- //
- // A user uploads an image file to bucket-1.
- //
- // The PutObject API operation is an Amazon S3 object-level API. It is recorded
- // as a data event in CloudTrail. Because the CloudTrail user specified an S3
- // bucket with an empty prefix, events that occur on any object in that bucket
- // are logged. The trail processes and logs the event.
- //
- // A user uploads an object to an Amazon S3 bucket named arn:aws:s3:::bucket-2.
- //
- // The PutObject API operation occurred for an object in an S3 bucket that the
- // CloudTrail user didn't specify for the trail. The trail doesn’t log the event.
- //
- // The following example demonstrates how logging works when you configure logging
- // of AWS Lambda data events for a Lambda function named MyLambdaFunction, but
- // not for all AWS Lambda functions.
- //
- // A user runs a script that includes a call to the MyLambdaFunction function
- // and the MyOtherLambdaFunction function.
- //
- // The Invoke API operation on MyLambdaFunction is an AWS Lambda API. It is
- // recorded as a data event in CloudTrail. Because the CloudTrail user specified
- // logging data events for MyLambdaFunction, any invocations of that function
- // are logged. The trail processes and logs the event.
- //
- // The Invoke API operation on MyOtherLambdaFunction is an AWS Lambda API. Because
- // the CloudTrail user did not specify logging data events for all Lambda functions,
- // the Invoke operation for MyOtherLambdaFunction does not match the function
- // specified for the trail. The trail doesn’t log the event.
- type DataResource struct {
- _ struct{} `type:"structure"`
- // The resource type in which you want to log data events. You can specify AWS::S3::Object
- // or AWS::Lambda::Function resources.
- Type *string `type:"string"`
- // An array of Amazon Resource Name (ARN) strings or partial ARN strings for
- // the specified objects.
- //
- // * To log data events for all objects in all S3 buckets in your AWS account,
- // specify the prefix as arn:aws:s3:::.
- //
- // This will also enable logging of data event activity performed by any user
- // or role in your AWS account, even if that activity is performed on a bucket
- // that belongs to another AWS account.
- //
- // * To log data events for all objects in all S3 buckets that include my-bucket
- // in their names, specify the prefix as aws:s3:::my-bucket. The trail logs
- // data events for all objects in all buckets whose name contains a match
- // for my-bucket.
- //
- // * To log data events for all objects in an S3 bucket, specify the bucket
- // and an empty object prefix such as arn:aws:s3:::bucket-1/. The trail logs
- // data events for all objects in this S3 bucket.
- //
- // * To log data events for specific objects, specify the S3 bucket and object
- // prefix such as arn:aws:s3:::bucket-1/example-images. The trail logs data
- // events for objects in this S3 bucket that match the prefix.
- //
- // * To log data events for all functions in your AWS account, specify the
- // prefix as arn:aws:lambda.
- //
- // This will also enable logging of Invoke activity performed by any user or
- // role in your AWS account, even if that activity is performed on a function
- // that belongs to another AWS account.
- //
- // * To log data eents for a specific Lambda function, specify the function
- // ARN.
- //
- // Lambda function ARNs are exact. Unlike S3, you cannot use matching. For example,
- // if you specify a function ARN arn:aws:lambda:us-west-2:111111111111:function:helloworld,
- // data events will only be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld.
- // They will not be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld2.
- Values []*string `type:"list"`
- }
- // String returns the string representation
- func (s DataResource) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DataResource) GoString() string {
- return s.String()
- }
- // SetType sets the Type field's value.
- func (s *DataResource) SetType(v string) *DataResource {
- s.Type = &v
- return s
- }
- // SetValues sets the Values field's value.
- func (s *DataResource) SetValues(v []*string) *DataResource {
- s.Values = v
- return s
- }
- // The request that specifies the name of a trail to delete.
- type DeleteTrailInput struct {
- _ struct{} `type:"structure"`
- // Specifies the name or the CloudTrail ARN of the trail to be deleted. The
- // format of a trail ARN is: arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // Name is a required field
- Name *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s DeleteTrailInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteTrailInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *DeleteTrailInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteTrailInput"}
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetName sets the Name field's value.
- func (s *DeleteTrailInput) SetName(v string) *DeleteTrailInput {
- s.Name = &v
- return s
- }
- // Returns the objects or data listed below if successful. Otherwise, returns
- // an error.
- type DeleteTrailOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s DeleteTrailOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DeleteTrailOutput) GoString() string {
- return s.String()
- }
- // Returns information about the trail.
- type DescribeTrailsInput struct {
- _ struct{} `type:"structure"`
- // Specifies whether to include shadow trails in the response. A shadow trail
- // is the replication in a region of a trail that was created in a different
- // region, or in the case of an organization trail, the replication of an organization
- // trail in member accounts. If you do not include shadow trails, organization
- // trails in a member account and region replication trails will not be returned.
- // The default is true.
- IncludeShadowTrails *bool `locationName:"includeShadowTrails" type:"boolean"`
- // Specifies a list of trail names, trail ARNs, or both, of the trails to describe.
- // The format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // If an empty list is specified, information for the trail in the current region
- // is returned.
- //
- // * If an empty list is specified and IncludeShadowTrails is false, then
- // information for all trails in the current region is returned.
- //
- // * If an empty list is specified and IncludeShadowTrails is null or true,
- // then information for all trails in the current region and any associated
- // shadow trails in other regions is returned.
- //
- // If one or more trail names are specified, information is returned only if
- // the names match the names of trails belonging only to the current region.
- // To return information about a trail in another region, you must specify its
- // trail ARN.
- TrailNameList []*string `locationName:"trailNameList" type:"list"`
- }
- // String returns the string representation
- func (s DescribeTrailsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeTrailsInput) GoString() string {
- return s.String()
- }
- // SetIncludeShadowTrails sets the IncludeShadowTrails field's value.
- func (s *DescribeTrailsInput) SetIncludeShadowTrails(v bool) *DescribeTrailsInput {
- s.IncludeShadowTrails = &v
- return s
- }
- // SetTrailNameList sets the TrailNameList field's value.
- func (s *DescribeTrailsInput) SetTrailNameList(v []*string) *DescribeTrailsInput {
- s.TrailNameList = v
- return s
- }
- // Returns the objects or data listed below if successful. Otherwise, returns
- // an error.
- type DescribeTrailsOutput struct {
- _ struct{} `type:"structure"`
- // The list of trail objects.
- TrailList []*Trail `locationName:"trailList" type:"list"`
- }
- // String returns the string representation
- func (s DescribeTrailsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s DescribeTrailsOutput) GoString() string {
- return s.String()
- }
- // SetTrailList sets the TrailList field's value.
- func (s *DescribeTrailsOutput) SetTrailList(v []*Trail) *DescribeTrailsOutput {
- s.TrailList = v
- return s
- }
- // Contains information about an event that was returned by a lookup request.
- // The result includes a representation of a CloudTrail event.
- type Event struct {
- _ struct{} `type:"structure"`
- // The AWS access key ID that was used to sign the request. If the request was
- // made with temporary security credentials, this is the access key ID of the
- // temporary credentials.
- AccessKeyId *string `type:"string"`
- // A JSON string that contains a representation of the event returned.
- CloudTrailEvent *string `type:"string"`
- // The CloudTrail ID of the event returned.
- EventId *string `type:"string"`
- // The name of the event returned.
- EventName *string `type:"string"`
- // The AWS service that the request was made to.
- EventSource *string `type:"string"`
- // The date and time of the event returned.
- EventTime *time.Time `type:"timestamp"`
- // Information about whether the event is a write event or a read event.
- ReadOnly *string `type:"string"`
- // A list of resources referenced by the event returned.
- Resources []*Resource `type:"list"`
- // A user name or role name of the requester that called the API in the event
- // returned.
- Username *string `type:"string"`
- }
- // String returns the string representation
- func (s Event) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Event) GoString() string {
- return s.String()
- }
- // SetAccessKeyId sets the AccessKeyId field's value.
- func (s *Event) SetAccessKeyId(v string) *Event {
- s.AccessKeyId = &v
- return s
- }
- // SetCloudTrailEvent sets the CloudTrailEvent field's value.
- func (s *Event) SetCloudTrailEvent(v string) *Event {
- s.CloudTrailEvent = &v
- return s
- }
- // SetEventId sets the EventId field's value.
- func (s *Event) SetEventId(v string) *Event {
- s.EventId = &v
- return s
- }
- // SetEventName sets the EventName field's value.
- func (s *Event) SetEventName(v string) *Event {
- s.EventName = &v
- return s
- }
- // SetEventSource sets the EventSource field's value.
- func (s *Event) SetEventSource(v string) *Event {
- s.EventSource = &v
- return s
- }
- // SetEventTime sets the EventTime field's value.
- func (s *Event) SetEventTime(v time.Time) *Event {
- s.EventTime = &v
- return s
- }
- // SetReadOnly sets the ReadOnly field's value.
- func (s *Event) SetReadOnly(v string) *Event {
- s.ReadOnly = &v
- return s
- }
- // SetResources sets the Resources field's value.
- func (s *Event) SetResources(v []*Resource) *Event {
- s.Resources = v
- return s
- }
- // SetUsername sets the Username field's value.
- func (s *Event) SetUsername(v string) *Event {
- s.Username = &v
- return s
- }
- // Use event selectors to further specify the management and data event settings
- // for your trail. By default, trails created without specific event selectors
- // will be configured to log all read and write management events, and no data
- // events. When an event occurs in your account, CloudTrail evaluates the event
- // selector for all trails. For each trail, if the event matches any event selector,
- // the trail processes and logs the event. If the event doesn't match any event
- // selector, the trail doesn't log the event.
- //
- // You can configure up to five event selectors for a trail.
- type EventSelector struct {
- _ struct{} `type:"structure"`
- // CloudTrail supports data event logging for Amazon S3 objects and AWS Lambda
- // functions. You can specify up to 250 resources for an individual event selector,
- // but the total number of data resources cannot exceed 250 across all event
- // selectors in a trail. This limit does not apply if you configure resource
- // logging for all data events.
- //
- // For more information, see Data Events (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-data-events)
- // and Limits in AWS CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html)
- // in the AWS CloudTrail User Guide.
- DataResources []*DataResource `type:"list"`
- // Specify if you want your event selector to include management events for
- // your trail.
- //
- // For more information, see Management Events (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-management-events)
- // in the AWS CloudTrail User Guide.
- //
- // By default, the value is true.
- IncludeManagementEvents *bool `type:"boolean"`
- // Specify if you want your trail to log read-only events, write-only events,
- // or all. For example, the EC2 GetConsoleOutput is a read-only API operation
- // and RunInstances is a write-only API operation.
- //
- // By default, the value is All.
- ReadWriteType *string `type:"string" enum:"ReadWriteType"`
- }
- // String returns the string representation
- func (s EventSelector) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s EventSelector) GoString() string {
- return s.String()
- }
- // SetDataResources sets the DataResources field's value.
- func (s *EventSelector) SetDataResources(v []*DataResource) *EventSelector {
- s.DataResources = v
- return s
- }
- // SetIncludeManagementEvents sets the IncludeManagementEvents field's value.
- func (s *EventSelector) SetIncludeManagementEvents(v bool) *EventSelector {
- s.IncludeManagementEvents = &v
- return s
- }
- // SetReadWriteType sets the ReadWriteType field's value.
- func (s *EventSelector) SetReadWriteType(v string) *EventSelector {
- s.ReadWriteType = &v
- return s
- }
- type GetEventSelectorsInput struct {
- _ struct{} `type:"structure"`
- // Specifies the name of the trail or trail ARN. If you specify a trail name,
- // the string must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are not valid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // If you specify a trail ARN, it must be in the format:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // TrailName is a required field
- TrailName *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetEventSelectorsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetEventSelectorsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetEventSelectorsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetEventSelectorsInput"}
- if s.TrailName == nil {
- invalidParams.Add(request.NewErrParamRequired("TrailName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetTrailName sets the TrailName field's value.
- func (s *GetEventSelectorsInput) SetTrailName(v string) *GetEventSelectorsInput {
- s.TrailName = &v
- return s
- }
- type GetEventSelectorsOutput struct {
- _ struct{} `type:"structure"`
- // The event selectors that are configured for the trail.
- EventSelectors []*EventSelector `type:"list"`
- // The specified trail ARN that has the event selectors.
- TrailARN *string `type:"string"`
- }
- // String returns the string representation
- func (s GetEventSelectorsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetEventSelectorsOutput) GoString() string {
- return s.String()
- }
- // SetEventSelectors sets the EventSelectors field's value.
- func (s *GetEventSelectorsOutput) SetEventSelectors(v []*EventSelector) *GetEventSelectorsOutput {
- s.EventSelectors = v
- return s
- }
- // SetTrailARN sets the TrailARN field's value.
- func (s *GetEventSelectorsOutput) SetTrailARN(v string) *GetEventSelectorsOutput {
- s.TrailARN = &v
- return s
- }
- // The name of a trail about which you want the current status.
- type GetTrailStatusInput struct {
- _ struct{} `type:"structure"`
- // Specifies the name or the CloudTrail ARN of the trail for which you are requesting
- // status. To get the status of a shadow trail (a replication of the trail in
- // another region), you must specify its ARN. The format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // Name is a required field
- Name *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s GetTrailStatusInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetTrailStatusInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *GetTrailStatusInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetTrailStatusInput"}
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetName sets the Name field's value.
- func (s *GetTrailStatusInput) SetName(v string) *GetTrailStatusInput {
- s.Name = &v
- return s
- }
- // Returns the objects or data listed below if successful. Otherwise, returns
- // an error.
- type GetTrailStatusOutput struct {
- _ struct{} `type:"structure"`
- // Whether the CloudTrail is currently logging AWS API calls.
- IsLogging *bool `type:"boolean"`
- // Displays any CloudWatch Logs error that CloudTrail encountered when attempting
- // to deliver logs to CloudWatch Logs.
- LatestCloudWatchLogsDeliveryError *string `type:"string"`
- // Displays the most recent date and time when CloudTrail delivered logs to
- // CloudWatch Logs.
- LatestCloudWatchLogsDeliveryTime *time.Time `type:"timestamp"`
- // This field is deprecated.
- LatestDeliveryAttemptSucceeded *string `type:"string"`
- // This field is deprecated.
- LatestDeliveryAttemptTime *string `type:"string"`
- // Displays any Amazon S3 error that CloudTrail encountered when attempting
- // to deliver log files to the designated bucket. For more information see the
- // topic Error Responses (http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
- // in the Amazon S3 API Reference.
- //
- // This error occurs only when there is a problem with the destination S3 bucket
- // and will not occur for timeouts. To resolve the issue, create a new bucket
- // and call UpdateTrail to specify the new bucket, or fix the existing objects
- // so that CloudTrail can again write to the bucket.
- LatestDeliveryError *string `type:"string"`
- // Specifies the date and time that CloudTrail last delivered log files to an
- // account's Amazon S3 bucket.
- LatestDeliveryTime *time.Time `type:"timestamp"`
- // Displays any Amazon S3 error that CloudTrail encountered when attempting
- // to deliver a digest file to the designated bucket. For more information see
- // the topic Error Responses (http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
- // in the Amazon S3 API Reference.
- //
- // This error occurs only when there is a problem with the destination S3 bucket
- // and will not occur for timeouts. To resolve the issue, create a new bucket
- // and call UpdateTrail to specify the new bucket, or fix the existing objects
- // so that CloudTrail can again write to the bucket.
- LatestDigestDeliveryError *string `type:"string"`
- // Specifies the date and time that CloudTrail last delivered a digest file
- // to an account's Amazon S3 bucket.
- LatestDigestDeliveryTime *time.Time `type:"timestamp"`
- // This field is deprecated.
- LatestNotificationAttemptSucceeded *string `type:"string"`
- // This field is deprecated.
- LatestNotificationAttemptTime *string `type:"string"`
- // Displays any Amazon SNS error that CloudTrail encountered when attempting
- // to send a notification. For more information about Amazon SNS errors, see
- // the Amazon SNS Developer Guide (http://docs.aws.amazon.com/sns/latest/dg/welcome.html).
- LatestNotificationError *string `type:"string"`
- // Specifies the date and time of the most recent Amazon SNS notification that
- // CloudTrail has written a new log file to an account's Amazon S3 bucket.
- LatestNotificationTime *time.Time `type:"timestamp"`
- // Specifies the most recent date and time when CloudTrail started recording
- // API calls for an AWS account.
- StartLoggingTime *time.Time `type:"timestamp"`
- // Specifies the most recent date and time when CloudTrail stopped recording
- // API calls for an AWS account.
- StopLoggingTime *time.Time `type:"timestamp"`
- // This field is deprecated.
- TimeLoggingStarted *string `type:"string"`
- // This field is deprecated.
- TimeLoggingStopped *string `type:"string"`
- }
- // String returns the string representation
- func (s GetTrailStatusOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s GetTrailStatusOutput) GoString() string {
- return s.String()
- }
- // SetIsLogging sets the IsLogging field's value.
- func (s *GetTrailStatusOutput) SetIsLogging(v bool) *GetTrailStatusOutput {
- s.IsLogging = &v
- return s
- }
- // SetLatestCloudWatchLogsDeliveryError sets the LatestCloudWatchLogsDeliveryError field's value.
- func (s *GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryError(v string) *GetTrailStatusOutput {
- s.LatestCloudWatchLogsDeliveryError = &v
- return s
- }
- // SetLatestCloudWatchLogsDeliveryTime sets the LatestCloudWatchLogsDeliveryTime field's value.
- func (s *GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryTime(v time.Time) *GetTrailStatusOutput {
- s.LatestCloudWatchLogsDeliveryTime = &v
- return s
- }
- // SetLatestDeliveryAttemptSucceeded sets the LatestDeliveryAttemptSucceeded field's value.
- func (s *GetTrailStatusOutput) SetLatestDeliveryAttemptSucceeded(v string) *GetTrailStatusOutput {
- s.LatestDeliveryAttemptSucceeded = &v
- return s
- }
- // SetLatestDeliveryAttemptTime sets the LatestDeliveryAttemptTime field's value.
- func (s *GetTrailStatusOutput) SetLatestDeliveryAttemptTime(v string) *GetTrailStatusOutput {
- s.LatestDeliveryAttemptTime = &v
- return s
- }
- // SetLatestDeliveryError sets the LatestDeliveryError field's value.
- func (s *GetTrailStatusOutput) SetLatestDeliveryError(v string) *GetTrailStatusOutput {
- s.LatestDeliveryError = &v
- return s
- }
- // SetLatestDeliveryTime sets the LatestDeliveryTime field's value.
- func (s *GetTrailStatusOutput) SetLatestDeliveryTime(v time.Time) *GetTrailStatusOutput {
- s.LatestDeliveryTime = &v
- return s
- }
- // SetLatestDigestDeliveryError sets the LatestDigestDeliveryError field's value.
- func (s *GetTrailStatusOutput) SetLatestDigestDeliveryError(v string) *GetTrailStatusOutput {
- s.LatestDigestDeliveryError = &v
- return s
- }
- // SetLatestDigestDeliveryTime sets the LatestDigestDeliveryTime field's value.
- func (s *GetTrailStatusOutput) SetLatestDigestDeliveryTime(v time.Time) *GetTrailStatusOutput {
- s.LatestDigestDeliveryTime = &v
- return s
- }
- // SetLatestNotificationAttemptSucceeded sets the LatestNotificationAttemptSucceeded field's value.
- func (s *GetTrailStatusOutput) SetLatestNotificationAttemptSucceeded(v string) *GetTrailStatusOutput {
- s.LatestNotificationAttemptSucceeded = &v
- return s
- }
- // SetLatestNotificationAttemptTime sets the LatestNotificationAttemptTime field's value.
- func (s *GetTrailStatusOutput) SetLatestNotificationAttemptTime(v string) *GetTrailStatusOutput {
- s.LatestNotificationAttemptTime = &v
- return s
- }
- // SetLatestNotificationError sets the LatestNotificationError field's value.
- func (s *GetTrailStatusOutput) SetLatestNotificationError(v string) *GetTrailStatusOutput {
- s.LatestNotificationError = &v
- return s
- }
- // SetLatestNotificationTime sets the LatestNotificationTime field's value.
- func (s *GetTrailStatusOutput) SetLatestNotificationTime(v time.Time) *GetTrailStatusOutput {
- s.LatestNotificationTime = &v
- return s
- }
- // SetStartLoggingTime sets the StartLoggingTime field's value.
- func (s *GetTrailStatusOutput) SetStartLoggingTime(v time.Time) *GetTrailStatusOutput {
- s.StartLoggingTime = &v
- return s
- }
- // SetStopLoggingTime sets the StopLoggingTime field's value.
- func (s *GetTrailStatusOutput) SetStopLoggingTime(v time.Time) *GetTrailStatusOutput {
- s.StopLoggingTime = &v
- return s
- }
- // SetTimeLoggingStarted sets the TimeLoggingStarted field's value.
- func (s *GetTrailStatusOutput) SetTimeLoggingStarted(v string) *GetTrailStatusOutput {
- s.TimeLoggingStarted = &v
- return s
- }
- // SetTimeLoggingStopped sets the TimeLoggingStopped field's value.
- func (s *GetTrailStatusOutput) SetTimeLoggingStopped(v string) *GetTrailStatusOutput {
- s.TimeLoggingStopped = &v
- return s
- }
- // Requests the public keys for a specified time range.
- type ListPublicKeysInput struct {
- _ struct{} `type:"structure"`
- // Optionally specifies, in UTC, the end of the time range to look up public
- // keys for CloudTrail digest files. If not specified, the current time is used.
- EndTime *time.Time `type:"timestamp"`
- // Reserved for future use.
- NextToken *string `type:"string"`
- // Optionally specifies, in UTC, the start of the time range to look up public
- // keys for CloudTrail digest files. If not specified, the current time is used,
- // and the current public key is returned.
- StartTime *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s ListPublicKeysInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListPublicKeysInput) GoString() string {
- return s.String()
- }
- // SetEndTime sets the EndTime field's value.
- func (s *ListPublicKeysInput) SetEndTime(v time.Time) *ListPublicKeysInput {
- s.EndTime = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListPublicKeysInput) SetNextToken(v string) *ListPublicKeysInput {
- s.NextToken = &v
- return s
- }
- // SetStartTime sets the StartTime field's value.
- func (s *ListPublicKeysInput) SetStartTime(v time.Time) *ListPublicKeysInput {
- s.StartTime = &v
- return s
- }
- // Returns the objects or data listed below if successful. Otherwise, returns
- // an error.
- type ListPublicKeysOutput struct {
- _ struct{} `type:"structure"`
- // Reserved for future use.
- NextToken *string `type:"string"`
- // Contains an array of PublicKey objects.
- //
- // The returned public keys may have validity time ranges that overlap.
- PublicKeyList []*PublicKey `type:"list"`
- }
- // String returns the string representation
- func (s ListPublicKeysOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListPublicKeysOutput) GoString() string {
- return s.String()
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListPublicKeysOutput) SetNextToken(v string) *ListPublicKeysOutput {
- s.NextToken = &v
- return s
- }
- // SetPublicKeyList sets the PublicKeyList field's value.
- func (s *ListPublicKeysOutput) SetPublicKeyList(v []*PublicKey) *ListPublicKeysOutput {
- s.PublicKeyList = v
- return s
- }
- // Specifies a list of trail tags to return.
- type ListTagsInput struct {
- _ struct{} `type:"structure"`
- // Reserved for future use.
- NextToken *string `type:"string"`
- // Specifies a list of trail ARNs whose tags will be listed. The list has a
- // limit of 20 ARNs. The format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // ResourceIdList is a required field
- ResourceIdList []*string `type:"list" required:"true"`
- }
- // String returns the string representation
- func (s ListTagsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListTagsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *ListTagsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"}
- if s.ResourceIdList == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceIdList"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput {
- s.NextToken = &v
- return s
- }
- // SetResourceIdList sets the ResourceIdList field's value.
- func (s *ListTagsInput) SetResourceIdList(v []*string) *ListTagsInput {
- s.ResourceIdList = v
- return s
- }
- // Returns the objects or data listed below if successful. Otherwise, returns
- // an error.
- type ListTagsOutput struct {
- _ struct{} `type:"structure"`
- // Reserved for future use.
- NextToken *string `type:"string"`
- // A list of resource tags.
- ResourceTagList []*ResourceTag `type:"list"`
- }
- // String returns the string representation
- func (s ListTagsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ListTagsOutput) GoString() string {
- return s.String()
- }
- // SetNextToken sets the NextToken field's value.
- func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput {
- s.NextToken = &v
- return s
- }
- // SetResourceTagList sets the ResourceTagList field's value.
- func (s *ListTagsOutput) SetResourceTagList(v []*ResourceTag) *ListTagsOutput {
- s.ResourceTagList = v
- return s
- }
- // Specifies an attribute and value that filter the events returned.
- type LookupAttribute struct {
- _ struct{} `type:"structure"`
- // Specifies an attribute on which to filter the events returned.
- //
- // AttributeKey is a required field
- AttributeKey *string `type:"string" required:"true" enum:"LookupAttributeKey"`
- // Specifies a value for the specified AttributeKey.
- //
- // AttributeValue is a required field
- AttributeValue *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s LookupAttribute) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s LookupAttribute) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *LookupAttribute) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LookupAttribute"}
- if s.AttributeKey == nil {
- invalidParams.Add(request.NewErrParamRequired("AttributeKey"))
- }
- if s.AttributeValue == nil {
- invalidParams.Add(request.NewErrParamRequired("AttributeValue"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetAttributeKey sets the AttributeKey field's value.
- func (s *LookupAttribute) SetAttributeKey(v string) *LookupAttribute {
- s.AttributeKey = &v
- return s
- }
- // SetAttributeValue sets the AttributeValue field's value.
- func (s *LookupAttribute) SetAttributeValue(v string) *LookupAttribute {
- s.AttributeValue = &v
- return s
- }
- // Contains a request for LookupEvents.
- type LookupEventsInput struct {
- _ struct{} `type:"structure"`
- // Specifies that only events that occur before or at the specified time are
- // returned. If the specified end time is before the specified start time, an
- // error is returned.
- EndTime *time.Time `type:"timestamp"`
- // Contains a list of lookup attributes. Currently the list can contain only
- // one item.
- LookupAttributes []*LookupAttribute `type:"list"`
- // The number of events to return. Possible values are 1 through 50. The default
- // is 50.
- MaxResults *int64 `min:"1" type:"integer"`
- // The token to use to get the next page of results after a previous API call.
- // This token must be passed in with the same parameters that were specified
- // in the the original call. For example, if the original call specified an
- // AttributeKey of 'Username' with a value of 'root', the call with NextToken
- // should include those same parameters.
- NextToken *string `type:"string"`
- // Specifies that only events that occur after or at the specified time are
- // returned. If the specified start time is after the specified end time, an
- // error is returned.
- StartTime *time.Time `type:"timestamp"`
- }
- // String returns the string representation
- func (s LookupEventsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s LookupEventsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *LookupEventsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LookupEventsInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.LookupAttributes != nil {
- for i, v := range s.LookupAttributes {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LookupAttributes", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetEndTime sets the EndTime field's value.
- func (s *LookupEventsInput) SetEndTime(v time.Time) *LookupEventsInput {
- s.EndTime = &v
- return s
- }
- // SetLookupAttributes sets the LookupAttributes field's value.
- func (s *LookupEventsInput) SetLookupAttributes(v []*LookupAttribute) *LookupEventsInput {
- s.LookupAttributes = v
- return s
- }
- // SetMaxResults sets the MaxResults field's value.
- func (s *LookupEventsInput) SetMaxResults(v int64) *LookupEventsInput {
- s.MaxResults = &v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *LookupEventsInput) SetNextToken(v string) *LookupEventsInput {
- s.NextToken = &v
- return s
- }
- // SetStartTime sets the StartTime field's value.
- func (s *LookupEventsInput) SetStartTime(v time.Time) *LookupEventsInput {
- s.StartTime = &v
- return s
- }
- // Contains a response to a LookupEvents action.
- type LookupEventsOutput struct {
- _ struct{} `type:"structure"`
- // A list of events returned based on the lookup attributes specified and the
- // CloudTrail event. The events list is sorted by time. The most recent event
- // is listed first.
- Events []*Event `type:"list"`
- // The token to use to get the next page of results after a previous API call.
- // If the token does not appear, there are no more results to return. The token
- // must be passed in with the same parameters as the previous call. For example,
- // if the original call specified an AttributeKey of 'Username' with a value
- // of 'root', the call with NextToken should include those same parameters.
- NextToken *string `type:"string"`
- }
- // String returns the string representation
- func (s LookupEventsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s LookupEventsOutput) GoString() string {
- return s.String()
- }
- // SetEvents sets the Events field's value.
- func (s *LookupEventsOutput) SetEvents(v []*Event) *LookupEventsOutput {
- s.Events = v
- return s
- }
- // SetNextToken sets the NextToken field's value.
- func (s *LookupEventsOutput) SetNextToken(v string) *LookupEventsOutput {
- s.NextToken = &v
- return s
- }
- // Contains information about a returned public key.
- type PublicKey struct {
- _ struct{} `type:"structure"`
- // The fingerprint of the public key.
- Fingerprint *string `type:"string"`
- // The ending time of validity of the public key.
- ValidityEndTime *time.Time `type:"timestamp"`
- // The starting time of validity of the public key.
- ValidityStartTime *time.Time `type:"timestamp"`
- // The DER encoded public key value in PKCS#1 format.
- //
- // Value is automatically base64 encoded/decoded by the SDK.
- Value []byte `type:"blob"`
- }
- // String returns the string representation
- func (s PublicKey) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PublicKey) GoString() string {
- return s.String()
- }
- // SetFingerprint sets the Fingerprint field's value.
- func (s *PublicKey) SetFingerprint(v string) *PublicKey {
- s.Fingerprint = &v
- return s
- }
- // SetValidityEndTime sets the ValidityEndTime field's value.
- func (s *PublicKey) SetValidityEndTime(v time.Time) *PublicKey {
- s.ValidityEndTime = &v
- return s
- }
- // SetValidityStartTime sets the ValidityStartTime field's value.
- func (s *PublicKey) SetValidityStartTime(v time.Time) *PublicKey {
- s.ValidityStartTime = &v
- return s
- }
- // SetValue sets the Value field's value.
- func (s *PublicKey) SetValue(v []byte) *PublicKey {
- s.Value = v
- return s
- }
- type PutEventSelectorsInput struct {
- _ struct{} `type:"structure"`
- // Specifies the settings for your event selectors. You can configure up to
- // five event selectors for a trail.
- //
- // EventSelectors is a required field
- EventSelectors []*EventSelector `type:"list" required:"true"`
- // Specifies the name of the trail or trail ARN. If you specify a trail name,
- // the string must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // If you specify a trail ARN, it must be in the format:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // TrailName is a required field
- TrailName *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s PutEventSelectorsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutEventSelectorsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *PutEventSelectorsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutEventSelectorsInput"}
- if s.EventSelectors == nil {
- invalidParams.Add(request.NewErrParamRequired("EventSelectors"))
- }
- if s.TrailName == nil {
- invalidParams.Add(request.NewErrParamRequired("TrailName"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetEventSelectors sets the EventSelectors field's value.
- func (s *PutEventSelectorsInput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsInput {
- s.EventSelectors = v
- return s
- }
- // SetTrailName sets the TrailName field's value.
- func (s *PutEventSelectorsInput) SetTrailName(v string) *PutEventSelectorsInput {
- s.TrailName = &v
- return s
- }
- type PutEventSelectorsOutput struct {
- _ struct{} `type:"structure"`
- // Specifies the event selectors configured for your trail.
- EventSelectors []*EventSelector `type:"list"`
- // Specifies the ARN of the trail that was updated with event selectors. The
- // format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- TrailARN *string `type:"string"`
- }
- // String returns the string representation
- func (s PutEventSelectorsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s PutEventSelectorsOutput) GoString() string {
- return s.String()
- }
- // SetEventSelectors sets the EventSelectors field's value.
- func (s *PutEventSelectorsOutput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsOutput {
- s.EventSelectors = v
- return s
- }
- // SetTrailARN sets the TrailARN field's value.
- func (s *PutEventSelectorsOutput) SetTrailARN(v string) *PutEventSelectorsOutput {
- s.TrailARN = &v
- return s
- }
- // Specifies the tags to remove from a trail.
- type RemoveTagsInput struct {
- _ struct{} `type:"structure"`
- // Specifies the ARN of the trail from which tags should be removed. The format
- // of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // ResourceId is a required field
- ResourceId *string `type:"string" required:"true"`
- // Specifies a list of tags to be removed.
- TagsList []*Tag `type:"list"`
- }
- // String returns the string representation
- func (s RemoveTagsInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RemoveTagsInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *RemoveTagsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"}
- if s.ResourceId == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceId"))
- }
- if s.TagsList != nil {
- for i, v := range s.TagsList {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetResourceId sets the ResourceId field's value.
- func (s *RemoveTagsInput) SetResourceId(v string) *RemoveTagsInput {
- s.ResourceId = &v
- return s
- }
- // SetTagsList sets the TagsList field's value.
- func (s *RemoveTagsInput) SetTagsList(v []*Tag) *RemoveTagsInput {
- s.TagsList = v
- return s
- }
- // Returns the objects or data listed below if successful. Otherwise, returns
- // an error.
- type RemoveTagsOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s RemoveTagsOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s RemoveTagsOutput) GoString() string {
- return s.String()
- }
- // Specifies the type and name of a resource referenced by an event.
- type Resource struct {
- _ struct{} `type:"structure"`
- // The name of the resource referenced by the event returned. These are user-created
- // names whose values will depend on the environment. For example, the resource
- // name might be "auto-scaling-test-group" for an Auto Scaling Group or "i-1234567"
- // for an EC2 Instance.
- ResourceName *string `type:"string"`
- // The type of a resource referenced by the event returned. When the resource
- // type cannot be determined, null is returned. Some examples of resource types
- // are: Instance for EC2, Trail for CloudTrail, DBInstance for RDS, and AccessKey
- // for IAM. For a list of resource types supported for event lookup, see Resource
- // Types Supported for Event Lookup (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/lookup_supported_resourcetypes.html).
- ResourceType *string `type:"string"`
- }
- // String returns the string representation
- func (s Resource) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Resource) GoString() string {
- return s.String()
- }
- // SetResourceName sets the ResourceName field's value.
- func (s *Resource) SetResourceName(v string) *Resource {
- s.ResourceName = &v
- return s
- }
- // SetResourceType sets the ResourceType field's value.
- func (s *Resource) SetResourceType(v string) *Resource {
- s.ResourceType = &v
- return s
- }
- // A resource tag.
- type ResourceTag struct {
- _ struct{} `type:"structure"`
- // Specifies the ARN of the resource.
- ResourceId *string `type:"string"`
- // A list of tags.
- TagsList []*Tag `type:"list"`
- }
- // String returns the string representation
- func (s ResourceTag) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s ResourceTag) GoString() string {
- return s.String()
- }
- // SetResourceId sets the ResourceId field's value.
- func (s *ResourceTag) SetResourceId(v string) *ResourceTag {
- s.ResourceId = &v
- return s
- }
- // SetTagsList sets the TagsList field's value.
- func (s *ResourceTag) SetTagsList(v []*Tag) *ResourceTag {
- s.TagsList = v
- return s
- }
- // The request to CloudTrail to start logging AWS API calls for an account.
- type StartLoggingInput struct {
- _ struct{} `type:"structure"`
- // Specifies the name or the CloudTrail ARN of the trail for which CloudTrail
- // logs AWS API calls. The format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // Name is a required field
- Name *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s StartLoggingInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartLoggingInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StartLoggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StartLoggingInput"}
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetName sets the Name field's value.
- func (s *StartLoggingInput) SetName(v string) *StartLoggingInput {
- s.Name = &v
- return s
- }
- // Returns the objects or data listed below if successful. Otherwise, returns
- // an error.
- type StartLoggingOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s StartLoggingOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StartLoggingOutput) GoString() string {
- return s.String()
- }
- // Passes the request to CloudTrail to stop logging AWS API calls for the specified
- // account.
- type StopLoggingInput struct {
- _ struct{} `type:"structure"`
- // Specifies the name or the CloudTrail ARN of the trail for which CloudTrail
- // will stop logging AWS API calls. The format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // Name is a required field
- Name *string `type:"string" required:"true"`
- }
- // String returns the string representation
- func (s StopLoggingInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopLoggingInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *StopLoggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StopLoggingInput"}
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetName sets the Name field's value.
- func (s *StopLoggingInput) SetName(v string) *StopLoggingInput {
- s.Name = &v
- return s
- }
- // Returns the objects or data listed below if successful. Otherwise, returns
- // an error.
- type StopLoggingOutput struct {
- _ struct{} `type:"structure"`
- }
- // String returns the string representation
- func (s StopLoggingOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s StopLoggingOutput) GoString() string {
- return s.String()
- }
- // A custom key-value pair associated with a resource such as a CloudTrail trail.
- type Tag struct {
- _ struct{} `type:"structure"`
- // The key in a key-value pair. The key must be must be no longer than 128 Unicode
- // characters. The key must be unique for the resource to which it applies.
- //
- // Key is a required field
- Key *string `type:"string" required:"true"`
- // The value in a key-value pair of a tag. The value must be no longer than
- // 256 Unicode characters.
- Value *string `type:"string"`
- }
- // String returns the string representation
- func (s Tag) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Tag) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *Tag) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Tag"}
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetKey sets the Key field's value.
- func (s *Tag) SetKey(v string) *Tag {
- s.Key = &v
- return s
- }
- // SetValue sets the Value field's value.
- func (s *Tag) SetValue(v string) *Tag {
- s.Value = &v
- return s
- }
- // The settings for a trail.
- type Trail struct {
- _ struct{} `type:"structure"`
- // Specifies an Amazon Resource Name (ARN), a unique identifier that represents
- // the log group to which CloudTrail logs will be delivered.
- CloudWatchLogsLogGroupArn *string `type:"string"`
- // Specifies the role for the CloudWatch Logs endpoint to assume to write to
- // a user's log group.
- CloudWatchLogsRoleArn *string `type:"string"`
- // Specifies if the trail has custom event selectors.
- HasCustomEventSelectors *bool `type:"boolean"`
- // The region in which the trail was created.
- HomeRegion *string `type:"string"`
- // Set to True to include AWS API calls from AWS global services such as IAM.
- // Otherwise, False.
- IncludeGlobalServiceEvents *bool `type:"boolean"`
- // Specifies whether the trail belongs only to one region or exists in all regions.
- IsMultiRegionTrail *bool `type:"boolean"`
- // Specifies whether the trail is an organization trail.
- IsOrganizationTrail *bool `type:"boolean"`
- // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
- // The value is a fully specified ARN to a KMS key in the format:
- //
- // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
- KmsKeyId *string `type:"string"`
- // Specifies whether log file validation is enabled.
- LogFileValidationEnabled *bool `type:"boolean"`
- // Name of the trail set by calling CreateTrail. The maximum length is 128 characters.
- Name *string `type:"string"`
- // Name of the Amazon S3 bucket into which CloudTrail delivers your trail files.
- // See Amazon S3 Bucket Naming Requirements (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
- S3BucketName *string `type:"string"`
- // Specifies the Amazon S3 key prefix that comes after the name of the bucket
- // you have designated for log file delivery. For more information, see Finding
- // Your CloudTrail Log Files (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).The
- // maximum length is 200 characters.
- S3KeyPrefix *string `type:"string"`
- // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
- // when log files are delivered. The format of a topic ARN is:
- //
- // arn:aws:sns:us-east-2:123456789012:MyTopic
- SnsTopicARN *string `type:"string"`
- // This field is deprecated. Use SnsTopicARN.
- //
- // Deprecated: SnsTopicName has been deprecated
- SnsTopicName *string `deprecated:"true" type:"string"`
- // Specifies the ARN of the trail. The format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- TrailARN *string `type:"string"`
- }
- // String returns the string representation
- func (s Trail) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s Trail) GoString() string {
- return s.String()
- }
- // SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
- func (s *Trail) SetCloudWatchLogsLogGroupArn(v string) *Trail {
- s.CloudWatchLogsLogGroupArn = &v
- return s
- }
- // SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
- func (s *Trail) SetCloudWatchLogsRoleArn(v string) *Trail {
- s.CloudWatchLogsRoleArn = &v
- return s
- }
- // SetHasCustomEventSelectors sets the HasCustomEventSelectors field's value.
- func (s *Trail) SetHasCustomEventSelectors(v bool) *Trail {
- s.HasCustomEventSelectors = &v
- return s
- }
- // SetHomeRegion sets the HomeRegion field's value.
- func (s *Trail) SetHomeRegion(v string) *Trail {
- s.HomeRegion = &v
- return s
- }
- // SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
- func (s *Trail) SetIncludeGlobalServiceEvents(v bool) *Trail {
- s.IncludeGlobalServiceEvents = &v
- return s
- }
- // SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
- func (s *Trail) SetIsMultiRegionTrail(v bool) *Trail {
- s.IsMultiRegionTrail = &v
- return s
- }
- // SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
- func (s *Trail) SetIsOrganizationTrail(v bool) *Trail {
- s.IsOrganizationTrail = &v
- return s
- }
- // SetKmsKeyId sets the KmsKeyId field's value.
- func (s *Trail) SetKmsKeyId(v string) *Trail {
- s.KmsKeyId = &v
- return s
- }
- // SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.
- func (s *Trail) SetLogFileValidationEnabled(v bool) *Trail {
- s.LogFileValidationEnabled = &v
- return s
- }
- // SetName sets the Name field's value.
- func (s *Trail) SetName(v string) *Trail {
- s.Name = &v
- return s
- }
- // SetS3BucketName sets the S3BucketName field's value.
- func (s *Trail) SetS3BucketName(v string) *Trail {
- s.S3BucketName = &v
- return s
- }
- // SetS3KeyPrefix sets the S3KeyPrefix field's value.
- func (s *Trail) SetS3KeyPrefix(v string) *Trail {
- s.S3KeyPrefix = &v
- return s
- }
- // SetSnsTopicARN sets the SnsTopicARN field's value.
- func (s *Trail) SetSnsTopicARN(v string) *Trail {
- s.SnsTopicARN = &v
- return s
- }
- // SetSnsTopicName sets the SnsTopicName field's value.
- func (s *Trail) SetSnsTopicName(v string) *Trail {
- s.SnsTopicName = &v
- return s
- }
- // SetTrailARN sets the TrailARN field's value.
- func (s *Trail) SetTrailARN(v string) *Trail {
- s.TrailARN = &v
- return s
- }
- // Specifies settings to update for the trail.
- type UpdateTrailInput struct {
- _ struct{} `type:"structure"`
- // Specifies a log group name using an Amazon Resource Name (ARN), a unique
- // identifier that represents the log group to which CloudTrail logs will be
- // delivered. Not required unless you specify CloudWatchLogsRoleArn.
- CloudWatchLogsLogGroupArn *string `type:"string"`
- // Specifies the role for the CloudWatch Logs endpoint to assume to write to
- // a user's log group.
- CloudWatchLogsRoleArn *string `type:"string"`
- // Specifies whether log file validation is enabled. The default is false.
- //
- // When you disable log file integrity validation, the chain of digest files
- // is broken after one hour. CloudTrail will not create digest files for log
- // files that were delivered during a period in which log file integrity validation
- // was disabled. For example, if you enable log file integrity validation at
- // noon on January 1, disable it at noon on January 2, and re-enable it at noon
- // on January 10, digest files will not be created for the log files delivered
- // from noon on January 2 to noon on January 10. The same applies whenever you
- // stop CloudTrail logging or delete a trail.
- EnableLogFileValidation *bool `type:"boolean"`
- // Specifies whether the trail is publishing events from global services such
- // as IAM to the log files.
- IncludeGlobalServiceEvents *bool `type:"boolean"`
- // Specifies whether the trail applies only to the current region or to all
- // regions. The default is false. If the trail exists only in the current region
- // and this value is set to true, shadow trails (replications of the trail)
- // will be created in the other regions. If the trail exists in all regions
- // and this value is set to false, the trail will remain in the region where
- // it was created, and its shadow trails in other regions will be deleted.
- IsMultiRegionTrail *bool `type:"boolean"`
- // Specifies whether the trail is applied to all accounts in an organization
- // in AWS Organizations, or only for the current AWS account. The default is
- // false, and cannot be true unless the call is made on behalf of an AWS account
- // that is the master account for an organization in AWS Organizations. If the
- // trail is not an organization trail and this is set to true, the trail will
- // be created in all AWS accounts that belong to the organization. If the trail
- // is an organization trail and this is set to false, the trail will remain
- // in the current AWS account but be deleted from all member accounts in the
- // organization.
- IsOrganizationTrail *bool `type:"boolean"`
- // Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail.
- // The value can be an alias name prefixed by "alias/", a fully specified ARN
- // to an alias, a fully specified ARN to a key, or a globally unique identifier.
- //
- // Examples:
- //
- // * alias/MyAliasName
- //
- // * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
- //
- // * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
- //
- // * 12345678-1234-1234-1234-123456789012
- KmsKeyId *string `type:"string"`
- // Specifies the name of the trail or trail ARN. If Name is a trail name, the
- // string must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // If Name is a trail ARN, it must be in the format:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // Name is a required field
- Name *string `type:"string" required:"true"`
- // Specifies the name of the Amazon S3 bucket designated for publishing log
- // files. See Amazon S3 Bucket Naming Requirements (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
- S3BucketName *string `type:"string"`
- // Specifies the Amazon S3 key prefix that comes after the name of the bucket
- // you have designated for log file delivery. For more information, see Finding
- // Your CloudTrail Log Files (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
- // The maximum length is 200 characters.
- S3KeyPrefix *string `type:"string"`
- // Specifies the name of the Amazon SNS topic defined for notification of log
- // file delivery. The maximum length is 256 characters.
- SnsTopicName *string `type:"string"`
- }
- // String returns the string representation
- func (s UpdateTrailInput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateTrailInput) GoString() string {
- return s.String()
- }
- // Validate inspects the fields of the type to determine if they are valid.
- func (s *UpdateTrailInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateTrailInput"}
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
- }
- // SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
- func (s *UpdateTrailInput) SetCloudWatchLogsLogGroupArn(v string) *UpdateTrailInput {
- s.CloudWatchLogsLogGroupArn = &v
- return s
- }
- // SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
- func (s *UpdateTrailInput) SetCloudWatchLogsRoleArn(v string) *UpdateTrailInput {
- s.CloudWatchLogsRoleArn = &v
- return s
- }
- // SetEnableLogFileValidation sets the EnableLogFileValidation field's value.
- func (s *UpdateTrailInput) SetEnableLogFileValidation(v bool) *UpdateTrailInput {
- s.EnableLogFileValidation = &v
- return s
- }
- // SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
- func (s *UpdateTrailInput) SetIncludeGlobalServiceEvents(v bool) *UpdateTrailInput {
- s.IncludeGlobalServiceEvents = &v
- return s
- }
- // SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
- func (s *UpdateTrailInput) SetIsMultiRegionTrail(v bool) *UpdateTrailInput {
- s.IsMultiRegionTrail = &v
- return s
- }
- // SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
- func (s *UpdateTrailInput) SetIsOrganizationTrail(v bool) *UpdateTrailInput {
- s.IsOrganizationTrail = &v
- return s
- }
- // SetKmsKeyId sets the KmsKeyId field's value.
- func (s *UpdateTrailInput) SetKmsKeyId(v string) *UpdateTrailInput {
- s.KmsKeyId = &v
- return s
- }
- // SetName sets the Name field's value.
- func (s *UpdateTrailInput) SetName(v string) *UpdateTrailInput {
- s.Name = &v
- return s
- }
- // SetS3BucketName sets the S3BucketName field's value.
- func (s *UpdateTrailInput) SetS3BucketName(v string) *UpdateTrailInput {
- s.S3BucketName = &v
- return s
- }
- // SetS3KeyPrefix sets the S3KeyPrefix field's value.
- func (s *UpdateTrailInput) SetS3KeyPrefix(v string) *UpdateTrailInput {
- s.S3KeyPrefix = &v
- return s
- }
- // SetSnsTopicName sets the SnsTopicName field's value.
- func (s *UpdateTrailInput) SetSnsTopicName(v string) *UpdateTrailInput {
- s.SnsTopicName = &v
- return s
- }
- // Returns the objects or data listed below if successful. Otherwise, returns
- // an error.
- type UpdateTrailOutput struct {
- _ struct{} `type:"structure"`
- // Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail
- // logs will be delivered.
- CloudWatchLogsLogGroupArn *string `type:"string"`
- // Specifies the role for the CloudWatch Logs endpoint to assume to write to
- // a user's log group.
- CloudWatchLogsRoleArn *string `type:"string"`
- // Specifies whether the trail is publishing events from global services such
- // as IAM to the log files.
- IncludeGlobalServiceEvents *bool `type:"boolean"`
- // Specifies whether the trail exists in one region or in all regions.
- IsMultiRegionTrail *bool `type:"boolean"`
- // Specifies whether the trail is an organization trail.
- IsOrganizationTrail *bool `type:"boolean"`
- // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
- // The value is a fully specified ARN to a KMS key in the format:
- //
- // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
- KmsKeyId *string `type:"string"`
- // Specifies whether log file integrity validation is enabled.
- LogFileValidationEnabled *bool `type:"boolean"`
- // Specifies the name of the trail.
- Name *string `type:"string"`
- // Specifies the name of the Amazon S3 bucket designated for publishing log
- // files.
- S3BucketName *string `type:"string"`
- // Specifies the Amazon S3 key prefix that comes after the name of the bucket
- // you have designated for log file delivery. For more information, see Finding
- // Your CloudTrail Log Files (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
- S3KeyPrefix *string `type:"string"`
- // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
- // when log files are delivered. The format of a topic ARN is:
- //
- // arn:aws:sns:us-east-2:123456789012:MyTopic
- SnsTopicARN *string `type:"string"`
- // This field is deprecated. Use SnsTopicARN.
- //
- // Deprecated: SnsTopicName has been deprecated
- SnsTopicName *string `deprecated:"true" type:"string"`
- // Specifies the ARN of the trail that was updated. The format of a trail ARN
- // is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- TrailARN *string `type:"string"`
- }
- // String returns the string representation
- func (s UpdateTrailOutput) String() string {
- return awsutil.Prettify(s)
- }
- // GoString returns the string representation
- func (s UpdateTrailOutput) GoString() string {
- return s.String()
- }
- // SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
- func (s *UpdateTrailOutput) SetCloudWatchLogsLogGroupArn(v string) *UpdateTrailOutput {
- s.CloudWatchLogsLogGroupArn = &v
- return s
- }
- // SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
- func (s *UpdateTrailOutput) SetCloudWatchLogsRoleArn(v string) *UpdateTrailOutput {
- s.CloudWatchLogsRoleArn = &v
- return s
- }
- // SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
- func (s *UpdateTrailOutput) SetIncludeGlobalServiceEvents(v bool) *UpdateTrailOutput {
- s.IncludeGlobalServiceEvents = &v
- return s
- }
- // SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
- func (s *UpdateTrailOutput) SetIsMultiRegionTrail(v bool) *UpdateTrailOutput {
- s.IsMultiRegionTrail = &v
- return s
- }
- // SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
- func (s *UpdateTrailOutput) SetIsOrganizationTrail(v bool) *UpdateTrailOutput {
- s.IsOrganizationTrail = &v
- return s
- }
- // SetKmsKeyId sets the KmsKeyId field's value.
- func (s *UpdateTrailOutput) SetKmsKeyId(v string) *UpdateTrailOutput {
- s.KmsKeyId = &v
- return s
- }
- // SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.
- func (s *UpdateTrailOutput) SetLogFileValidationEnabled(v bool) *UpdateTrailOutput {
- s.LogFileValidationEnabled = &v
- return s
- }
- // SetName sets the Name field's value.
- func (s *UpdateTrailOutput) SetName(v string) *UpdateTrailOutput {
- s.Name = &v
- return s
- }
- // SetS3BucketName sets the S3BucketName field's value.
- func (s *UpdateTrailOutput) SetS3BucketName(v string) *UpdateTrailOutput {
- s.S3BucketName = &v
- return s
- }
- // SetS3KeyPrefix sets the S3KeyPrefix field's value.
- func (s *UpdateTrailOutput) SetS3KeyPrefix(v string) *UpdateTrailOutput {
- s.S3KeyPrefix = &v
- return s
- }
- // SetSnsTopicARN sets the SnsTopicARN field's value.
- func (s *UpdateTrailOutput) SetSnsTopicARN(v string) *UpdateTrailOutput {
- s.SnsTopicARN = &v
- return s
- }
- // SetSnsTopicName sets the SnsTopicName field's value.
- func (s *UpdateTrailOutput) SetSnsTopicName(v string) *UpdateTrailOutput {
- s.SnsTopicName = &v
- return s
- }
- // SetTrailARN sets the TrailARN field's value.
- func (s *UpdateTrailOutput) SetTrailARN(v string) *UpdateTrailOutput {
- s.TrailARN = &v
- return s
- }
- const (
- // LookupAttributeKeyEventId is a LookupAttributeKey enum value
- LookupAttributeKeyEventId = "EventId"
- // LookupAttributeKeyEventName is a LookupAttributeKey enum value
- LookupAttributeKeyEventName = "EventName"
- // LookupAttributeKeyReadOnly is a LookupAttributeKey enum value
- LookupAttributeKeyReadOnly = "ReadOnly"
- // LookupAttributeKeyUsername is a LookupAttributeKey enum value
- LookupAttributeKeyUsername = "Username"
- // LookupAttributeKeyResourceType is a LookupAttributeKey enum value
- LookupAttributeKeyResourceType = "ResourceType"
- // LookupAttributeKeyResourceName is a LookupAttributeKey enum value
- LookupAttributeKeyResourceName = "ResourceName"
- // LookupAttributeKeyEventSource is a LookupAttributeKey enum value
- LookupAttributeKeyEventSource = "EventSource"
- // LookupAttributeKeyAccessKeyId is a LookupAttributeKey enum value
- LookupAttributeKeyAccessKeyId = "AccessKeyId"
- )
- const (
- // ReadWriteTypeReadOnly is a ReadWriteType enum value
- ReadWriteTypeReadOnly = "ReadOnly"
- // ReadWriteTypeWriteOnly is a ReadWriteType enum value
- ReadWriteTypeWriteOnly = "WriteOnly"
- // ReadWriteTypeAll is a ReadWriteType enum value
- ReadWriteTypeAll = "All"
- )
|