api.go 208 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package inspector provides a client for Amazon Inspector.
  3. package inspector
  4. import (
  5. "fmt"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  11. )
  12. const opAddAttributesToFindings = "AddAttributesToFindings"
  13. // AddAttributesToFindingsRequest generates a "aws/request.Request" representing the
  14. // client's request for the AddAttributesToFindings operation. The "output" return
  15. // value can be used to capture response data after the request's "Send" method
  16. // is called.
  17. //
  18. // See AddAttributesToFindings for usage and error information.
  19. //
  20. // Creating a request object using this method should be used when you want to inject
  21. // custom logic into the request's lifecycle using a custom handler, or if you want to
  22. // access properties on the request object before or after sending the request. If
  23. // you just want the service response, call the AddAttributesToFindings method directly
  24. // instead.
  25. //
  26. // Note: You must call the "Send" method on the returned request object in order
  27. // to execute the request.
  28. //
  29. // // Example sending a request using the AddAttributesToFindingsRequest method.
  30. // req, resp := client.AddAttributesToFindingsRequest(params)
  31. //
  32. // err := req.Send()
  33. // if err == nil { // resp is now filled
  34. // fmt.Println(resp)
  35. // }
  36. //
  37. func (c *Inspector) AddAttributesToFindingsRequest(input *AddAttributesToFindingsInput) (req *request.Request, output *AddAttributesToFindingsOutput) {
  38. op := &request.Operation{
  39. Name: opAddAttributesToFindings,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &AddAttributesToFindingsInput{}
  45. }
  46. req = c.newRequest(op, input, output)
  47. output = &AddAttributesToFindingsOutput{}
  48. req.Data = output
  49. return
  50. }
  51. // AddAttributesToFindings API operation for Amazon Inspector.
  52. //
  53. // Assigns attributes (key and value pairs) to the findings that are specified
  54. // by the ARNs of the findings.
  55. //
  56. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  57. // with awserr.Error's Code and Message methods to get detailed information about
  58. // the error.
  59. //
  60. // See the AWS API reference guide for Amazon Inspector's
  61. // API operation AddAttributesToFindings for usage and error information.
  62. //
  63. // Returned Error Codes:
  64. // * InternalException
  65. // Internal server error.
  66. //
  67. // * InvalidInputException
  68. // The request was rejected because an invalid or out-of-range value was supplied
  69. // for an input parameter.
  70. //
  71. // * AccessDeniedException
  72. // You do not have required permissions to access the requested resource.
  73. //
  74. // * NoSuchEntityException
  75. // The request was rejected because it referenced an entity that does not exist.
  76. // The error code describes the entity.
  77. //
  78. func (c *Inspector) AddAttributesToFindings(input *AddAttributesToFindingsInput) (*AddAttributesToFindingsOutput, error) {
  79. req, out := c.AddAttributesToFindingsRequest(input)
  80. err := req.Send()
  81. return out, err
  82. }
  83. const opCreateAssessmentTarget = "CreateAssessmentTarget"
  84. // CreateAssessmentTargetRequest generates a "aws/request.Request" representing the
  85. // client's request for the CreateAssessmentTarget operation. The "output" return
  86. // value can be used to capture response data after the request's "Send" method
  87. // is called.
  88. //
  89. // See CreateAssessmentTarget for usage and error information.
  90. //
  91. // Creating a request object using this method should be used when you want to inject
  92. // custom logic into the request's lifecycle using a custom handler, or if you want to
  93. // access properties on the request object before or after sending the request. If
  94. // you just want the service response, call the CreateAssessmentTarget method directly
  95. // instead.
  96. //
  97. // Note: You must call the "Send" method on the returned request object in order
  98. // to execute the request.
  99. //
  100. // // Example sending a request using the CreateAssessmentTargetRequest method.
  101. // req, resp := client.CreateAssessmentTargetRequest(params)
  102. //
  103. // err := req.Send()
  104. // if err == nil { // resp is now filled
  105. // fmt.Println(resp)
  106. // }
  107. //
  108. func (c *Inspector) CreateAssessmentTargetRequest(input *CreateAssessmentTargetInput) (req *request.Request, output *CreateAssessmentTargetOutput) {
  109. op := &request.Operation{
  110. Name: opCreateAssessmentTarget,
  111. HTTPMethod: "POST",
  112. HTTPPath: "/",
  113. }
  114. if input == nil {
  115. input = &CreateAssessmentTargetInput{}
  116. }
  117. req = c.newRequest(op, input, output)
  118. output = &CreateAssessmentTargetOutput{}
  119. req.Data = output
  120. return
  121. }
  122. // CreateAssessmentTarget API operation for Amazon Inspector.
  123. //
  124. // Creates a new assessment target using the ARN of the resource group that
  125. // is generated by CreateResourceGroup. You can create up to 50 assessment targets
  126. // per AWS account. You can run up to 500 concurrent agents per AWS account.
  127. // For more information, see Amazon Inspector Assessment Targets (http://docs.aws.amazon.com/inspector/latest/userguide/inspector_applications.html).
  128. //
  129. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  130. // with awserr.Error's Code and Message methods to get detailed information about
  131. // the error.
  132. //
  133. // See the AWS API reference guide for Amazon Inspector's
  134. // API operation CreateAssessmentTarget for usage and error information.
  135. //
  136. // Returned Error Codes:
  137. // * InternalException
  138. // Internal server error.
  139. //
  140. // * InvalidInputException
  141. // The request was rejected because an invalid or out-of-range value was supplied
  142. // for an input parameter.
  143. //
  144. // * LimitExceededException
  145. // The request was rejected because it attempted to create resources beyond
  146. // the current AWS account limits. The error code describes the limit exceeded.
  147. //
  148. // * AccessDeniedException
  149. // You do not have required permissions to access the requested resource.
  150. //
  151. // * NoSuchEntityException
  152. // The request was rejected because it referenced an entity that does not exist.
  153. // The error code describes the entity.
  154. //
  155. func (c *Inspector) CreateAssessmentTarget(input *CreateAssessmentTargetInput) (*CreateAssessmentTargetOutput, error) {
  156. req, out := c.CreateAssessmentTargetRequest(input)
  157. err := req.Send()
  158. return out, err
  159. }
  160. const opCreateAssessmentTemplate = "CreateAssessmentTemplate"
  161. // CreateAssessmentTemplateRequest generates a "aws/request.Request" representing the
  162. // client's request for the CreateAssessmentTemplate operation. The "output" return
  163. // value can be used to capture response data after the request's "Send" method
  164. // is called.
  165. //
  166. // See CreateAssessmentTemplate for usage and error information.
  167. //
  168. // Creating a request object using this method should be used when you want to inject
  169. // custom logic into the request's lifecycle using a custom handler, or if you want to
  170. // access properties on the request object before or after sending the request. If
  171. // you just want the service response, call the CreateAssessmentTemplate method directly
  172. // instead.
  173. //
  174. // Note: You must call the "Send" method on the returned request object in order
  175. // to execute the request.
  176. //
  177. // // Example sending a request using the CreateAssessmentTemplateRequest method.
  178. // req, resp := client.CreateAssessmentTemplateRequest(params)
  179. //
  180. // err := req.Send()
  181. // if err == nil { // resp is now filled
  182. // fmt.Println(resp)
  183. // }
  184. //
  185. func (c *Inspector) CreateAssessmentTemplateRequest(input *CreateAssessmentTemplateInput) (req *request.Request, output *CreateAssessmentTemplateOutput) {
  186. op := &request.Operation{
  187. Name: opCreateAssessmentTemplate,
  188. HTTPMethod: "POST",
  189. HTTPPath: "/",
  190. }
  191. if input == nil {
  192. input = &CreateAssessmentTemplateInput{}
  193. }
  194. req = c.newRequest(op, input, output)
  195. output = &CreateAssessmentTemplateOutput{}
  196. req.Data = output
  197. return
  198. }
  199. // CreateAssessmentTemplate API operation for Amazon Inspector.
  200. //
  201. // Creates an assessment template for the assessment target that is specified
  202. // by the ARN of the assessment target.
  203. //
  204. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  205. // with awserr.Error's Code and Message methods to get detailed information about
  206. // the error.
  207. //
  208. // See the AWS API reference guide for Amazon Inspector's
  209. // API operation CreateAssessmentTemplate for usage and error information.
  210. //
  211. // Returned Error Codes:
  212. // * InternalException
  213. // Internal server error.
  214. //
  215. // * InvalidInputException
  216. // The request was rejected because an invalid or out-of-range value was supplied
  217. // for an input parameter.
  218. //
  219. // * LimitExceededException
  220. // The request was rejected because it attempted to create resources beyond
  221. // the current AWS account limits. The error code describes the limit exceeded.
  222. //
  223. // * AccessDeniedException
  224. // You do not have required permissions to access the requested resource.
  225. //
  226. // * NoSuchEntityException
  227. // The request was rejected because it referenced an entity that does not exist.
  228. // The error code describes the entity.
  229. //
  230. func (c *Inspector) CreateAssessmentTemplate(input *CreateAssessmentTemplateInput) (*CreateAssessmentTemplateOutput, error) {
  231. req, out := c.CreateAssessmentTemplateRequest(input)
  232. err := req.Send()
  233. return out, err
  234. }
  235. const opCreateResourceGroup = "CreateResourceGroup"
  236. // CreateResourceGroupRequest generates a "aws/request.Request" representing the
  237. // client's request for the CreateResourceGroup operation. The "output" return
  238. // value can be used to capture response data after the request's "Send" method
  239. // is called.
  240. //
  241. // See CreateResourceGroup for usage and error information.
  242. //
  243. // Creating a request object using this method should be used when you want to inject
  244. // custom logic into the request's lifecycle using a custom handler, or if you want to
  245. // access properties on the request object before or after sending the request. If
  246. // you just want the service response, call the CreateResourceGroup method directly
  247. // instead.
  248. //
  249. // Note: You must call the "Send" method on the returned request object in order
  250. // to execute the request.
  251. //
  252. // // Example sending a request using the CreateResourceGroupRequest method.
  253. // req, resp := client.CreateResourceGroupRequest(params)
  254. //
  255. // err := req.Send()
  256. // if err == nil { // resp is now filled
  257. // fmt.Println(resp)
  258. // }
  259. //
  260. func (c *Inspector) CreateResourceGroupRequest(input *CreateResourceGroupInput) (req *request.Request, output *CreateResourceGroupOutput) {
  261. op := &request.Operation{
  262. Name: opCreateResourceGroup,
  263. HTTPMethod: "POST",
  264. HTTPPath: "/",
  265. }
  266. if input == nil {
  267. input = &CreateResourceGroupInput{}
  268. }
  269. req = c.newRequest(op, input, output)
  270. output = &CreateResourceGroupOutput{}
  271. req.Data = output
  272. return
  273. }
  274. // CreateResourceGroup API operation for Amazon Inspector.
  275. //
  276. // Creates a resource group using the specified set of tags (key and value pairs)
  277. // that are used to select the EC2 instances to be included in an Amazon Inspector
  278. // assessment target. The created resource group is then used to create an Amazon
  279. // Inspector assessment target. For more information, see CreateAssessmentTarget.
  280. //
  281. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  282. // with awserr.Error's Code and Message methods to get detailed information about
  283. // the error.
  284. //
  285. // See the AWS API reference guide for Amazon Inspector's
  286. // API operation CreateResourceGroup for usage and error information.
  287. //
  288. // Returned Error Codes:
  289. // * InternalException
  290. // Internal server error.
  291. //
  292. // * InvalidInputException
  293. // The request was rejected because an invalid or out-of-range value was supplied
  294. // for an input parameter.
  295. //
  296. // * LimitExceededException
  297. // The request was rejected because it attempted to create resources beyond
  298. // the current AWS account limits. The error code describes the limit exceeded.
  299. //
  300. // * AccessDeniedException
  301. // You do not have required permissions to access the requested resource.
  302. //
  303. func (c *Inspector) CreateResourceGroup(input *CreateResourceGroupInput) (*CreateResourceGroupOutput, error) {
  304. req, out := c.CreateResourceGroupRequest(input)
  305. err := req.Send()
  306. return out, err
  307. }
  308. const opDeleteAssessmentRun = "DeleteAssessmentRun"
  309. // DeleteAssessmentRunRequest generates a "aws/request.Request" representing the
  310. // client's request for the DeleteAssessmentRun operation. The "output" return
  311. // value can be used to capture response data after the request's "Send" method
  312. // is called.
  313. //
  314. // See DeleteAssessmentRun for usage and error information.
  315. //
  316. // Creating a request object using this method should be used when you want to inject
  317. // custom logic into the request's lifecycle using a custom handler, or if you want to
  318. // access properties on the request object before or after sending the request. If
  319. // you just want the service response, call the DeleteAssessmentRun method directly
  320. // instead.
  321. //
  322. // Note: You must call the "Send" method on the returned request object in order
  323. // to execute the request.
  324. //
  325. // // Example sending a request using the DeleteAssessmentRunRequest method.
  326. // req, resp := client.DeleteAssessmentRunRequest(params)
  327. //
  328. // err := req.Send()
  329. // if err == nil { // resp is now filled
  330. // fmt.Println(resp)
  331. // }
  332. //
  333. func (c *Inspector) DeleteAssessmentRunRequest(input *DeleteAssessmentRunInput) (req *request.Request, output *DeleteAssessmentRunOutput) {
  334. op := &request.Operation{
  335. Name: opDeleteAssessmentRun,
  336. HTTPMethod: "POST",
  337. HTTPPath: "/",
  338. }
  339. if input == nil {
  340. input = &DeleteAssessmentRunInput{}
  341. }
  342. req = c.newRequest(op, input, output)
  343. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  344. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  345. output = &DeleteAssessmentRunOutput{}
  346. req.Data = output
  347. return
  348. }
  349. // DeleteAssessmentRun API operation for Amazon Inspector.
  350. //
  351. // Deletes the assessment run that is specified by the ARN of the assessment
  352. // run.
  353. //
  354. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  355. // with awserr.Error's Code and Message methods to get detailed information about
  356. // the error.
  357. //
  358. // See the AWS API reference guide for Amazon Inspector's
  359. // API operation DeleteAssessmentRun for usage and error information.
  360. //
  361. // Returned Error Codes:
  362. // * InternalException
  363. // Internal server error.
  364. //
  365. // * InvalidInputException
  366. // The request was rejected because an invalid or out-of-range value was supplied
  367. // for an input parameter.
  368. //
  369. // * AssessmentRunInProgressException
  370. // You cannot perform a specified action if an assessment run is currently in
  371. // progress.
  372. //
  373. // * AccessDeniedException
  374. // You do not have required permissions to access the requested resource.
  375. //
  376. // * NoSuchEntityException
  377. // The request was rejected because it referenced an entity that does not exist.
  378. // The error code describes the entity.
  379. //
  380. func (c *Inspector) DeleteAssessmentRun(input *DeleteAssessmentRunInput) (*DeleteAssessmentRunOutput, error) {
  381. req, out := c.DeleteAssessmentRunRequest(input)
  382. err := req.Send()
  383. return out, err
  384. }
  385. const opDeleteAssessmentTarget = "DeleteAssessmentTarget"
  386. // DeleteAssessmentTargetRequest generates a "aws/request.Request" representing the
  387. // client's request for the DeleteAssessmentTarget operation. The "output" return
  388. // value can be used to capture response data after the request's "Send" method
  389. // is called.
  390. //
  391. // See DeleteAssessmentTarget for usage and error information.
  392. //
  393. // Creating a request object using this method should be used when you want to inject
  394. // custom logic into the request's lifecycle using a custom handler, or if you want to
  395. // access properties on the request object before or after sending the request. If
  396. // you just want the service response, call the DeleteAssessmentTarget method directly
  397. // instead.
  398. //
  399. // Note: You must call the "Send" method on the returned request object in order
  400. // to execute the request.
  401. //
  402. // // Example sending a request using the DeleteAssessmentTargetRequest method.
  403. // req, resp := client.DeleteAssessmentTargetRequest(params)
  404. //
  405. // err := req.Send()
  406. // if err == nil { // resp is now filled
  407. // fmt.Println(resp)
  408. // }
  409. //
  410. func (c *Inspector) DeleteAssessmentTargetRequest(input *DeleteAssessmentTargetInput) (req *request.Request, output *DeleteAssessmentTargetOutput) {
  411. op := &request.Operation{
  412. Name: opDeleteAssessmentTarget,
  413. HTTPMethod: "POST",
  414. HTTPPath: "/",
  415. }
  416. if input == nil {
  417. input = &DeleteAssessmentTargetInput{}
  418. }
  419. req = c.newRequest(op, input, output)
  420. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  421. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  422. output = &DeleteAssessmentTargetOutput{}
  423. req.Data = output
  424. return
  425. }
  426. // DeleteAssessmentTarget API operation for Amazon Inspector.
  427. //
  428. // Deletes the assessment target that is specified by the ARN of the assessment
  429. // target.
  430. //
  431. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  432. // with awserr.Error's Code and Message methods to get detailed information about
  433. // the error.
  434. //
  435. // See the AWS API reference guide for Amazon Inspector's
  436. // API operation DeleteAssessmentTarget for usage and error information.
  437. //
  438. // Returned Error Codes:
  439. // * InternalException
  440. // Internal server error.
  441. //
  442. // * InvalidInputException
  443. // The request was rejected because an invalid or out-of-range value was supplied
  444. // for an input parameter.
  445. //
  446. // * AssessmentRunInProgressException
  447. // You cannot perform a specified action if an assessment run is currently in
  448. // progress.
  449. //
  450. // * AccessDeniedException
  451. // You do not have required permissions to access the requested resource.
  452. //
  453. // * NoSuchEntityException
  454. // The request was rejected because it referenced an entity that does not exist.
  455. // The error code describes the entity.
  456. //
  457. func (c *Inspector) DeleteAssessmentTarget(input *DeleteAssessmentTargetInput) (*DeleteAssessmentTargetOutput, error) {
  458. req, out := c.DeleteAssessmentTargetRequest(input)
  459. err := req.Send()
  460. return out, err
  461. }
  462. const opDeleteAssessmentTemplate = "DeleteAssessmentTemplate"
  463. // DeleteAssessmentTemplateRequest generates a "aws/request.Request" representing the
  464. // client's request for the DeleteAssessmentTemplate operation. The "output" return
  465. // value can be used to capture response data after the request's "Send" method
  466. // is called.
  467. //
  468. // See DeleteAssessmentTemplate for usage and error information.
  469. //
  470. // Creating a request object using this method should be used when you want to inject
  471. // custom logic into the request's lifecycle using a custom handler, or if you want to
  472. // access properties on the request object before or after sending the request. If
  473. // you just want the service response, call the DeleteAssessmentTemplate method directly
  474. // instead.
  475. //
  476. // Note: You must call the "Send" method on the returned request object in order
  477. // to execute the request.
  478. //
  479. // // Example sending a request using the DeleteAssessmentTemplateRequest method.
  480. // req, resp := client.DeleteAssessmentTemplateRequest(params)
  481. //
  482. // err := req.Send()
  483. // if err == nil { // resp is now filled
  484. // fmt.Println(resp)
  485. // }
  486. //
  487. func (c *Inspector) DeleteAssessmentTemplateRequest(input *DeleteAssessmentTemplateInput) (req *request.Request, output *DeleteAssessmentTemplateOutput) {
  488. op := &request.Operation{
  489. Name: opDeleteAssessmentTemplate,
  490. HTTPMethod: "POST",
  491. HTTPPath: "/",
  492. }
  493. if input == nil {
  494. input = &DeleteAssessmentTemplateInput{}
  495. }
  496. req = c.newRequest(op, input, output)
  497. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  498. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  499. output = &DeleteAssessmentTemplateOutput{}
  500. req.Data = output
  501. return
  502. }
  503. // DeleteAssessmentTemplate API operation for Amazon Inspector.
  504. //
  505. // Deletes the assessment template that is specified by the ARN of the assessment
  506. // template.
  507. //
  508. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  509. // with awserr.Error's Code and Message methods to get detailed information about
  510. // the error.
  511. //
  512. // See the AWS API reference guide for Amazon Inspector's
  513. // API operation DeleteAssessmentTemplate for usage and error information.
  514. //
  515. // Returned Error Codes:
  516. // * InternalException
  517. // Internal server error.
  518. //
  519. // * InvalidInputException
  520. // The request was rejected because an invalid or out-of-range value was supplied
  521. // for an input parameter.
  522. //
  523. // * AssessmentRunInProgressException
  524. // You cannot perform a specified action if an assessment run is currently in
  525. // progress.
  526. //
  527. // * AccessDeniedException
  528. // You do not have required permissions to access the requested resource.
  529. //
  530. // * NoSuchEntityException
  531. // The request was rejected because it referenced an entity that does not exist.
  532. // The error code describes the entity.
  533. //
  534. func (c *Inspector) DeleteAssessmentTemplate(input *DeleteAssessmentTemplateInput) (*DeleteAssessmentTemplateOutput, error) {
  535. req, out := c.DeleteAssessmentTemplateRequest(input)
  536. err := req.Send()
  537. return out, err
  538. }
  539. const opDescribeAssessmentRuns = "DescribeAssessmentRuns"
  540. // DescribeAssessmentRunsRequest generates a "aws/request.Request" representing the
  541. // client's request for the DescribeAssessmentRuns operation. The "output" return
  542. // value can be used to capture response data after the request's "Send" method
  543. // is called.
  544. //
  545. // See DescribeAssessmentRuns for usage and error information.
  546. //
  547. // Creating a request object using this method should be used when you want to inject
  548. // custom logic into the request's lifecycle using a custom handler, or if you want to
  549. // access properties on the request object before or after sending the request. If
  550. // you just want the service response, call the DescribeAssessmentRuns method directly
  551. // instead.
  552. //
  553. // Note: You must call the "Send" method on the returned request object in order
  554. // to execute the request.
  555. //
  556. // // Example sending a request using the DescribeAssessmentRunsRequest method.
  557. // req, resp := client.DescribeAssessmentRunsRequest(params)
  558. //
  559. // err := req.Send()
  560. // if err == nil { // resp is now filled
  561. // fmt.Println(resp)
  562. // }
  563. //
  564. func (c *Inspector) DescribeAssessmentRunsRequest(input *DescribeAssessmentRunsInput) (req *request.Request, output *DescribeAssessmentRunsOutput) {
  565. op := &request.Operation{
  566. Name: opDescribeAssessmentRuns,
  567. HTTPMethod: "POST",
  568. HTTPPath: "/",
  569. }
  570. if input == nil {
  571. input = &DescribeAssessmentRunsInput{}
  572. }
  573. req = c.newRequest(op, input, output)
  574. output = &DescribeAssessmentRunsOutput{}
  575. req.Data = output
  576. return
  577. }
  578. // DescribeAssessmentRuns API operation for Amazon Inspector.
  579. //
  580. // Describes the assessment runs that are specified by the ARNs of the assessment
  581. // runs.
  582. //
  583. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  584. // with awserr.Error's Code and Message methods to get detailed information about
  585. // the error.
  586. //
  587. // See the AWS API reference guide for Amazon Inspector's
  588. // API operation DescribeAssessmentRuns for usage and error information.
  589. //
  590. // Returned Error Codes:
  591. // * InternalException
  592. // Internal server error.
  593. //
  594. // * InvalidInputException
  595. // The request was rejected because an invalid or out-of-range value was supplied
  596. // for an input parameter.
  597. //
  598. func (c *Inspector) DescribeAssessmentRuns(input *DescribeAssessmentRunsInput) (*DescribeAssessmentRunsOutput, error) {
  599. req, out := c.DescribeAssessmentRunsRequest(input)
  600. err := req.Send()
  601. return out, err
  602. }
  603. const opDescribeAssessmentTargets = "DescribeAssessmentTargets"
  604. // DescribeAssessmentTargetsRequest generates a "aws/request.Request" representing the
  605. // client's request for the DescribeAssessmentTargets operation. The "output" return
  606. // value can be used to capture response data after the request's "Send" method
  607. // is called.
  608. //
  609. // See DescribeAssessmentTargets for usage and error information.
  610. //
  611. // Creating a request object using this method should be used when you want to inject
  612. // custom logic into the request's lifecycle using a custom handler, or if you want to
  613. // access properties on the request object before or after sending the request. If
  614. // you just want the service response, call the DescribeAssessmentTargets method directly
  615. // instead.
  616. //
  617. // Note: You must call the "Send" method on the returned request object in order
  618. // to execute the request.
  619. //
  620. // // Example sending a request using the DescribeAssessmentTargetsRequest method.
  621. // req, resp := client.DescribeAssessmentTargetsRequest(params)
  622. //
  623. // err := req.Send()
  624. // if err == nil { // resp is now filled
  625. // fmt.Println(resp)
  626. // }
  627. //
  628. func (c *Inspector) DescribeAssessmentTargetsRequest(input *DescribeAssessmentTargetsInput) (req *request.Request, output *DescribeAssessmentTargetsOutput) {
  629. op := &request.Operation{
  630. Name: opDescribeAssessmentTargets,
  631. HTTPMethod: "POST",
  632. HTTPPath: "/",
  633. }
  634. if input == nil {
  635. input = &DescribeAssessmentTargetsInput{}
  636. }
  637. req = c.newRequest(op, input, output)
  638. output = &DescribeAssessmentTargetsOutput{}
  639. req.Data = output
  640. return
  641. }
  642. // DescribeAssessmentTargets API operation for Amazon Inspector.
  643. //
  644. // Describes the assessment targets that are specified by the ARNs of the assessment
  645. // targets.
  646. //
  647. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  648. // with awserr.Error's Code and Message methods to get detailed information about
  649. // the error.
  650. //
  651. // See the AWS API reference guide for Amazon Inspector's
  652. // API operation DescribeAssessmentTargets for usage and error information.
  653. //
  654. // Returned Error Codes:
  655. // * InternalException
  656. // Internal server error.
  657. //
  658. // * InvalidInputException
  659. // The request was rejected because an invalid or out-of-range value was supplied
  660. // for an input parameter.
  661. //
  662. func (c *Inspector) DescribeAssessmentTargets(input *DescribeAssessmentTargetsInput) (*DescribeAssessmentTargetsOutput, error) {
  663. req, out := c.DescribeAssessmentTargetsRequest(input)
  664. err := req.Send()
  665. return out, err
  666. }
  667. const opDescribeAssessmentTemplates = "DescribeAssessmentTemplates"
  668. // DescribeAssessmentTemplatesRequest generates a "aws/request.Request" representing the
  669. // client's request for the DescribeAssessmentTemplates operation. The "output" return
  670. // value can be used to capture response data after the request's "Send" method
  671. // is called.
  672. //
  673. // See DescribeAssessmentTemplates for usage and error information.
  674. //
  675. // Creating a request object using this method should be used when you want to inject
  676. // custom logic into the request's lifecycle using a custom handler, or if you want to
  677. // access properties on the request object before or after sending the request. If
  678. // you just want the service response, call the DescribeAssessmentTemplates method directly
  679. // instead.
  680. //
  681. // Note: You must call the "Send" method on the returned request object in order
  682. // to execute the request.
  683. //
  684. // // Example sending a request using the DescribeAssessmentTemplatesRequest method.
  685. // req, resp := client.DescribeAssessmentTemplatesRequest(params)
  686. //
  687. // err := req.Send()
  688. // if err == nil { // resp is now filled
  689. // fmt.Println(resp)
  690. // }
  691. //
  692. func (c *Inspector) DescribeAssessmentTemplatesRequest(input *DescribeAssessmentTemplatesInput) (req *request.Request, output *DescribeAssessmentTemplatesOutput) {
  693. op := &request.Operation{
  694. Name: opDescribeAssessmentTemplates,
  695. HTTPMethod: "POST",
  696. HTTPPath: "/",
  697. }
  698. if input == nil {
  699. input = &DescribeAssessmentTemplatesInput{}
  700. }
  701. req = c.newRequest(op, input, output)
  702. output = &DescribeAssessmentTemplatesOutput{}
  703. req.Data = output
  704. return
  705. }
  706. // DescribeAssessmentTemplates API operation for Amazon Inspector.
  707. //
  708. // Describes the assessment templates that are specified by the ARNs of the
  709. // assessment templates.
  710. //
  711. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  712. // with awserr.Error's Code and Message methods to get detailed information about
  713. // the error.
  714. //
  715. // See the AWS API reference guide for Amazon Inspector's
  716. // API operation DescribeAssessmentTemplates for usage and error information.
  717. //
  718. // Returned Error Codes:
  719. // * InternalException
  720. // Internal server error.
  721. //
  722. // * InvalidInputException
  723. // The request was rejected because an invalid or out-of-range value was supplied
  724. // for an input parameter.
  725. //
  726. func (c *Inspector) DescribeAssessmentTemplates(input *DescribeAssessmentTemplatesInput) (*DescribeAssessmentTemplatesOutput, error) {
  727. req, out := c.DescribeAssessmentTemplatesRequest(input)
  728. err := req.Send()
  729. return out, err
  730. }
  731. const opDescribeCrossAccountAccessRole = "DescribeCrossAccountAccessRole"
  732. // DescribeCrossAccountAccessRoleRequest generates a "aws/request.Request" representing the
  733. // client's request for the DescribeCrossAccountAccessRole operation. The "output" return
  734. // value can be used to capture response data after the request's "Send" method
  735. // is called.
  736. //
  737. // See DescribeCrossAccountAccessRole for usage and error information.
  738. //
  739. // Creating a request object using this method should be used when you want to inject
  740. // custom logic into the request's lifecycle using a custom handler, or if you want to
  741. // access properties on the request object before or after sending the request. If
  742. // you just want the service response, call the DescribeCrossAccountAccessRole method directly
  743. // instead.
  744. //
  745. // Note: You must call the "Send" method on the returned request object in order
  746. // to execute the request.
  747. //
  748. // // Example sending a request using the DescribeCrossAccountAccessRoleRequest method.
  749. // req, resp := client.DescribeCrossAccountAccessRoleRequest(params)
  750. //
  751. // err := req.Send()
  752. // if err == nil { // resp is now filled
  753. // fmt.Println(resp)
  754. // }
  755. //
  756. func (c *Inspector) DescribeCrossAccountAccessRoleRequest(input *DescribeCrossAccountAccessRoleInput) (req *request.Request, output *DescribeCrossAccountAccessRoleOutput) {
  757. op := &request.Operation{
  758. Name: opDescribeCrossAccountAccessRole,
  759. HTTPMethod: "POST",
  760. HTTPPath: "/",
  761. }
  762. if input == nil {
  763. input = &DescribeCrossAccountAccessRoleInput{}
  764. }
  765. req = c.newRequest(op, input, output)
  766. output = &DescribeCrossAccountAccessRoleOutput{}
  767. req.Data = output
  768. return
  769. }
  770. // DescribeCrossAccountAccessRole API operation for Amazon Inspector.
  771. //
  772. // Describes the IAM role that enables Amazon Inspector to access your AWS account.
  773. //
  774. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  775. // with awserr.Error's Code and Message methods to get detailed information about
  776. // the error.
  777. //
  778. // See the AWS API reference guide for Amazon Inspector's
  779. // API operation DescribeCrossAccountAccessRole for usage and error information.
  780. //
  781. // Returned Error Codes:
  782. // * InternalException
  783. // Internal server error.
  784. //
  785. func (c *Inspector) DescribeCrossAccountAccessRole(input *DescribeCrossAccountAccessRoleInput) (*DescribeCrossAccountAccessRoleOutput, error) {
  786. req, out := c.DescribeCrossAccountAccessRoleRequest(input)
  787. err := req.Send()
  788. return out, err
  789. }
  790. const opDescribeFindings = "DescribeFindings"
  791. // DescribeFindingsRequest generates a "aws/request.Request" representing the
  792. // client's request for the DescribeFindings operation. The "output" return
  793. // value can be used to capture response data after the request's "Send" method
  794. // is called.
  795. //
  796. // See DescribeFindings for usage and error information.
  797. //
  798. // Creating a request object using this method should be used when you want to inject
  799. // custom logic into the request's lifecycle using a custom handler, or if you want to
  800. // access properties on the request object before or after sending the request. If
  801. // you just want the service response, call the DescribeFindings method directly
  802. // instead.
  803. //
  804. // Note: You must call the "Send" method on the returned request object in order
  805. // to execute the request.
  806. //
  807. // // Example sending a request using the DescribeFindingsRequest method.
  808. // req, resp := client.DescribeFindingsRequest(params)
  809. //
  810. // err := req.Send()
  811. // if err == nil { // resp is now filled
  812. // fmt.Println(resp)
  813. // }
  814. //
  815. func (c *Inspector) DescribeFindingsRequest(input *DescribeFindingsInput) (req *request.Request, output *DescribeFindingsOutput) {
  816. op := &request.Operation{
  817. Name: opDescribeFindings,
  818. HTTPMethod: "POST",
  819. HTTPPath: "/",
  820. }
  821. if input == nil {
  822. input = &DescribeFindingsInput{}
  823. }
  824. req = c.newRequest(op, input, output)
  825. output = &DescribeFindingsOutput{}
  826. req.Data = output
  827. return
  828. }
  829. // DescribeFindings API operation for Amazon Inspector.
  830. //
  831. // Describes the findings that are specified by the ARNs of the findings.
  832. //
  833. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  834. // with awserr.Error's Code and Message methods to get detailed information about
  835. // the error.
  836. //
  837. // See the AWS API reference guide for Amazon Inspector's
  838. // API operation DescribeFindings for usage and error information.
  839. //
  840. // Returned Error Codes:
  841. // * InternalException
  842. // Internal server error.
  843. //
  844. // * InvalidInputException
  845. // The request was rejected because an invalid or out-of-range value was supplied
  846. // for an input parameter.
  847. //
  848. func (c *Inspector) DescribeFindings(input *DescribeFindingsInput) (*DescribeFindingsOutput, error) {
  849. req, out := c.DescribeFindingsRequest(input)
  850. err := req.Send()
  851. return out, err
  852. }
  853. const opDescribeResourceGroups = "DescribeResourceGroups"
  854. // DescribeResourceGroupsRequest generates a "aws/request.Request" representing the
  855. // client's request for the DescribeResourceGroups operation. The "output" return
  856. // value can be used to capture response data after the request's "Send" method
  857. // is called.
  858. //
  859. // See DescribeResourceGroups for usage and error information.
  860. //
  861. // Creating a request object using this method should be used when you want to inject
  862. // custom logic into the request's lifecycle using a custom handler, or if you want to
  863. // access properties on the request object before or after sending the request. If
  864. // you just want the service response, call the DescribeResourceGroups method directly
  865. // instead.
  866. //
  867. // Note: You must call the "Send" method on the returned request object in order
  868. // to execute the request.
  869. //
  870. // // Example sending a request using the DescribeResourceGroupsRequest method.
  871. // req, resp := client.DescribeResourceGroupsRequest(params)
  872. //
  873. // err := req.Send()
  874. // if err == nil { // resp is now filled
  875. // fmt.Println(resp)
  876. // }
  877. //
  878. func (c *Inspector) DescribeResourceGroupsRequest(input *DescribeResourceGroupsInput) (req *request.Request, output *DescribeResourceGroupsOutput) {
  879. op := &request.Operation{
  880. Name: opDescribeResourceGroups,
  881. HTTPMethod: "POST",
  882. HTTPPath: "/",
  883. }
  884. if input == nil {
  885. input = &DescribeResourceGroupsInput{}
  886. }
  887. req = c.newRequest(op, input, output)
  888. output = &DescribeResourceGroupsOutput{}
  889. req.Data = output
  890. return
  891. }
  892. // DescribeResourceGroups API operation for Amazon Inspector.
  893. //
  894. // Describes the resource groups that are specified by the ARNs of the resource
  895. // groups.
  896. //
  897. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  898. // with awserr.Error's Code and Message methods to get detailed information about
  899. // the error.
  900. //
  901. // See the AWS API reference guide for Amazon Inspector's
  902. // API operation DescribeResourceGroups for usage and error information.
  903. //
  904. // Returned Error Codes:
  905. // * InternalException
  906. // Internal server error.
  907. //
  908. // * InvalidInputException
  909. // The request was rejected because an invalid or out-of-range value was supplied
  910. // for an input parameter.
  911. //
  912. func (c *Inspector) DescribeResourceGroups(input *DescribeResourceGroupsInput) (*DescribeResourceGroupsOutput, error) {
  913. req, out := c.DescribeResourceGroupsRequest(input)
  914. err := req.Send()
  915. return out, err
  916. }
  917. const opDescribeRulesPackages = "DescribeRulesPackages"
  918. // DescribeRulesPackagesRequest generates a "aws/request.Request" representing the
  919. // client's request for the DescribeRulesPackages operation. The "output" return
  920. // value can be used to capture response data after the request's "Send" method
  921. // is called.
  922. //
  923. // See DescribeRulesPackages for usage and error information.
  924. //
  925. // Creating a request object using this method should be used when you want to inject
  926. // custom logic into the request's lifecycle using a custom handler, or if you want to
  927. // access properties on the request object before or after sending the request. If
  928. // you just want the service response, call the DescribeRulesPackages method directly
  929. // instead.
  930. //
  931. // Note: You must call the "Send" method on the returned request object in order
  932. // to execute the request.
  933. //
  934. // // Example sending a request using the DescribeRulesPackagesRequest method.
  935. // req, resp := client.DescribeRulesPackagesRequest(params)
  936. //
  937. // err := req.Send()
  938. // if err == nil { // resp is now filled
  939. // fmt.Println(resp)
  940. // }
  941. //
  942. func (c *Inspector) DescribeRulesPackagesRequest(input *DescribeRulesPackagesInput) (req *request.Request, output *DescribeRulesPackagesOutput) {
  943. op := &request.Operation{
  944. Name: opDescribeRulesPackages,
  945. HTTPMethod: "POST",
  946. HTTPPath: "/",
  947. }
  948. if input == nil {
  949. input = &DescribeRulesPackagesInput{}
  950. }
  951. req = c.newRequest(op, input, output)
  952. output = &DescribeRulesPackagesOutput{}
  953. req.Data = output
  954. return
  955. }
  956. // DescribeRulesPackages API operation for Amazon Inspector.
  957. //
  958. // Describes the rules packages that are specified by the ARNs of the rules
  959. // packages.
  960. //
  961. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  962. // with awserr.Error's Code and Message methods to get detailed information about
  963. // the error.
  964. //
  965. // See the AWS API reference guide for Amazon Inspector's
  966. // API operation DescribeRulesPackages for usage and error information.
  967. //
  968. // Returned Error Codes:
  969. // * InternalException
  970. // Internal server error.
  971. //
  972. // * InvalidInputException
  973. // The request was rejected because an invalid or out-of-range value was supplied
  974. // for an input parameter.
  975. //
  976. func (c *Inspector) DescribeRulesPackages(input *DescribeRulesPackagesInput) (*DescribeRulesPackagesOutput, error) {
  977. req, out := c.DescribeRulesPackagesRequest(input)
  978. err := req.Send()
  979. return out, err
  980. }
  981. const opGetTelemetryMetadata = "GetTelemetryMetadata"
  982. // GetTelemetryMetadataRequest generates a "aws/request.Request" representing the
  983. // client's request for the GetTelemetryMetadata operation. The "output" return
  984. // value can be used to capture response data after the request's "Send" method
  985. // is called.
  986. //
  987. // See GetTelemetryMetadata for usage and error information.
  988. //
  989. // Creating a request object using this method should be used when you want to inject
  990. // custom logic into the request's lifecycle using a custom handler, or if you want to
  991. // access properties on the request object before or after sending the request. If
  992. // you just want the service response, call the GetTelemetryMetadata method directly
  993. // instead.
  994. //
  995. // Note: You must call the "Send" method on the returned request object in order
  996. // to execute the request.
  997. //
  998. // // Example sending a request using the GetTelemetryMetadataRequest method.
  999. // req, resp := client.GetTelemetryMetadataRequest(params)
  1000. //
  1001. // err := req.Send()
  1002. // if err == nil { // resp is now filled
  1003. // fmt.Println(resp)
  1004. // }
  1005. //
  1006. func (c *Inspector) GetTelemetryMetadataRequest(input *GetTelemetryMetadataInput) (req *request.Request, output *GetTelemetryMetadataOutput) {
  1007. op := &request.Operation{
  1008. Name: opGetTelemetryMetadata,
  1009. HTTPMethod: "POST",
  1010. HTTPPath: "/",
  1011. }
  1012. if input == nil {
  1013. input = &GetTelemetryMetadataInput{}
  1014. }
  1015. req = c.newRequest(op, input, output)
  1016. output = &GetTelemetryMetadataOutput{}
  1017. req.Data = output
  1018. return
  1019. }
  1020. // GetTelemetryMetadata API operation for Amazon Inspector.
  1021. //
  1022. // Information about the data that is collected for the specified assessment
  1023. // run.
  1024. //
  1025. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1026. // with awserr.Error's Code and Message methods to get detailed information about
  1027. // the error.
  1028. //
  1029. // See the AWS API reference guide for Amazon Inspector's
  1030. // API operation GetTelemetryMetadata for usage and error information.
  1031. //
  1032. // Returned Error Codes:
  1033. // * InternalException
  1034. // Internal server error.
  1035. //
  1036. // * InvalidInputException
  1037. // The request was rejected because an invalid or out-of-range value was supplied
  1038. // for an input parameter.
  1039. //
  1040. // * AccessDeniedException
  1041. // You do not have required permissions to access the requested resource.
  1042. //
  1043. // * NoSuchEntityException
  1044. // The request was rejected because it referenced an entity that does not exist.
  1045. // The error code describes the entity.
  1046. //
  1047. func (c *Inspector) GetTelemetryMetadata(input *GetTelemetryMetadataInput) (*GetTelemetryMetadataOutput, error) {
  1048. req, out := c.GetTelemetryMetadataRequest(input)
  1049. err := req.Send()
  1050. return out, err
  1051. }
  1052. const opListAssessmentRunAgents = "ListAssessmentRunAgents"
  1053. // ListAssessmentRunAgentsRequest generates a "aws/request.Request" representing the
  1054. // client's request for the ListAssessmentRunAgents operation. The "output" return
  1055. // value can be used to capture response data after the request's "Send" method
  1056. // is called.
  1057. //
  1058. // See ListAssessmentRunAgents for usage and error information.
  1059. //
  1060. // Creating a request object using this method should be used when you want to inject
  1061. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1062. // access properties on the request object before or after sending the request. If
  1063. // you just want the service response, call the ListAssessmentRunAgents method directly
  1064. // instead.
  1065. //
  1066. // Note: You must call the "Send" method on the returned request object in order
  1067. // to execute the request.
  1068. //
  1069. // // Example sending a request using the ListAssessmentRunAgentsRequest method.
  1070. // req, resp := client.ListAssessmentRunAgentsRequest(params)
  1071. //
  1072. // err := req.Send()
  1073. // if err == nil { // resp is now filled
  1074. // fmt.Println(resp)
  1075. // }
  1076. //
  1077. func (c *Inspector) ListAssessmentRunAgentsRequest(input *ListAssessmentRunAgentsInput) (req *request.Request, output *ListAssessmentRunAgentsOutput) {
  1078. op := &request.Operation{
  1079. Name: opListAssessmentRunAgents,
  1080. HTTPMethod: "POST",
  1081. HTTPPath: "/",
  1082. }
  1083. if input == nil {
  1084. input = &ListAssessmentRunAgentsInput{}
  1085. }
  1086. req = c.newRequest(op, input, output)
  1087. output = &ListAssessmentRunAgentsOutput{}
  1088. req.Data = output
  1089. return
  1090. }
  1091. // ListAssessmentRunAgents API operation for Amazon Inspector.
  1092. //
  1093. // Lists the agents of the assessment runs that are specified by the ARNs of
  1094. // the assessment runs.
  1095. //
  1096. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1097. // with awserr.Error's Code and Message methods to get detailed information about
  1098. // the error.
  1099. //
  1100. // See the AWS API reference guide for Amazon Inspector's
  1101. // API operation ListAssessmentRunAgents for usage and error information.
  1102. //
  1103. // Returned Error Codes:
  1104. // * InternalException
  1105. // Internal server error.
  1106. //
  1107. // * InvalidInputException
  1108. // The request was rejected because an invalid or out-of-range value was supplied
  1109. // for an input parameter.
  1110. //
  1111. // * AccessDeniedException
  1112. // You do not have required permissions to access the requested resource.
  1113. //
  1114. // * NoSuchEntityException
  1115. // The request was rejected because it referenced an entity that does not exist.
  1116. // The error code describes the entity.
  1117. //
  1118. func (c *Inspector) ListAssessmentRunAgents(input *ListAssessmentRunAgentsInput) (*ListAssessmentRunAgentsOutput, error) {
  1119. req, out := c.ListAssessmentRunAgentsRequest(input)
  1120. err := req.Send()
  1121. return out, err
  1122. }
  1123. const opListAssessmentRuns = "ListAssessmentRuns"
  1124. // ListAssessmentRunsRequest generates a "aws/request.Request" representing the
  1125. // client's request for the ListAssessmentRuns operation. The "output" return
  1126. // value can be used to capture response data after the request's "Send" method
  1127. // is called.
  1128. //
  1129. // See ListAssessmentRuns for usage and error information.
  1130. //
  1131. // Creating a request object using this method should be used when you want to inject
  1132. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1133. // access properties on the request object before or after sending the request. If
  1134. // you just want the service response, call the ListAssessmentRuns method directly
  1135. // instead.
  1136. //
  1137. // Note: You must call the "Send" method on the returned request object in order
  1138. // to execute the request.
  1139. //
  1140. // // Example sending a request using the ListAssessmentRunsRequest method.
  1141. // req, resp := client.ListAssessmentRunsRequest(params)
  1142. //
  1143. // err := req.Send()
  1144. // if err == nil { // resp is now filled
  1145. // fmt.Println(resp)
  1146. // }
  1147. //
  1148. func (c *Inspector) ListAssessmentRunsRequest(input *ListAssessmentRunsInput) (req *request.Request, output *ListAssessmentRunsOutput) {
  1149. op := &request.Operation{
  1150. Name: opListAssessmentRuns,
  1151. HTTPMethod: "POST",
  1152. HTTPPath: "/",
  1153. }
  1154. if input == nil {
  1155. input = &ListAssessmentRunsInput{}
  1156. }
  1157. req = c.newRequest(op, input, output)
  1158. output = &ListAssessmentRunsOutput{}
  1159. req.Data = output
  1160. return
  1161. }
  1162. // ListAssessmentRuns API operation for Amazon Inspector.
  1163. //
  1164. // Lists the assessment runs that correspond to the assessment templates that
  1165. // are specified by the ARNs of the assessment templates.
  1166. //
  1167. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1168. // with awserr.Error's Code and Message methods to get detailed information about
  1169. // the error.
  1170. //
  1171. // See the AWS API reference guide for Amazon Inspector's
  1172. // API operation ListAssessmentRuns for usage and error information.
  1173. //
  1174. // Returned Error Codes:
  1175. // * InternalException
  1176. // Internal server error.
  1177. //
  1178. // * InvalidInputException
  1179. // The request was rejected because an invalid or out-of-range value was supplied
  1180. // for an input parameter.
  1181. //
  1182. // * AccessDeniedException
  1183. // You do not have required permissions to access the requested resource.
  1184. //
  1185. // * NoSuchEntityException
  1186. // The request was rejected because it referenced an entity that does not exist.
  1187. // The error code describes the entity.
  1188. //
  1189. func (c *Inspector) ListAssessmentRuns(input *ListAssessmentRunsInput) (*ListAssessmentRunsOutput, error) {
  1190. req, out := c.ListAssessmentRunsRequest(input)
  1191. err := req.Send()
  1192. return out, err
  1193. }
  1194. const opListAssessmentTargets = "ListAssessmentTargets"
  1195. // ListAssessmentTargetsRequest generates a "aws/request.Request" representing the
  1196. // client's request for the ListAssessmentTargets operation. The "output" return
  1197. // value can be used to capture response data after the request's "Send" method
  1198. // is called.
  1199. //
  1200. // See ListAssessmentTargets for usage and error information.
  1201. //
  1202. // Creating a request object using this method should be used when you want to inject
  1203. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1204. // access properties on the request object before or after sending the request. If
  1205. // you just want the service response, call the ListAssessmentTargets method directly
  1206. // instead.
  1207. //
  1208. // Note: You must call the "Send" method on the returned request object in order
  1209. // to execute the request.
  1210. //
  1211. // // Example sending a request using the ListAssessmentTargetsRequest method.
  1212. // req, resp := client.ListAssessmentTargetsRequest(params)
  1213. //
  1214. // err := req.Send()
  1215. // if err == nil { // resp is now filled
  1216. // fmt.Println(resp)
  1217. // }
  1218. //
  1219. func (c *Inspector) ListAssessmentTargetsRequest(input *ListAssessmentTargetsInput) (req *request.Request, output *ListAssessmentTargetsOutput) {
  1220. op := &request.Operation{
  1221. Name: opListAssessmentTargets,
  1222. HTTPMethod: "POST",
  1223. HTTPPath: "/",
  1224. }
  1225. if input == nil {
  1226. input = &ListAssessmentTargetsInput{}
  1227. }
  1228. req = c.newRequest(op, input, output)
  1229. output = &ListAssessmentTargetsOutput{}
  1230. req.Data = output
  1231. return
  1232. }
  1233. // ListAssessmentTargets API operation for Amazon Inspector.
  1234. //
  1235. // Lists the ARNs of the assessment targets within this AWS account. For more
  1236. // information about assessment targets, see Amazon Inspector Assessment Targets
  1237. // (http://docs.aws.amazon.com/inspector/latest/userguide/inspector_applications.html).
  1238. //
  1239. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1240. // with awserr.Error's Code and Message methods to get detailed information about
  1241. // the error.
  1242. //
  1243. // See the AWS API reference guide for Amazon Inspector's
  1244. // API operation ListAssessmentTargets for usage and error information.
  1245. //
  1246. // Returned Error Codes:
  1247. // * InternalException
  1248. // Internal server error.
  1249. //
  1250. // * InvalidInputException
  1251. // The request was rejected because an invalid or out-of-range value was supplied
  1252. // for an input parameter.
  1253. //
  1254. // * AccessDeniedException
  1255. // You do not have required permissions to access the requested resource.
  1256. //
  1257. func (c *Inspector) ListAssessmentTargets(input *ListAssessmentTargetsInput) (*ListAssessmentTargetsOutput, error) {
  1258. req, out := c.ListAssessmentTargetsRequest(input)
  1259. err := req.Send()
  1260. return out, err
  1261. }
  1262. const opListAssessmentTemplates = "ListAssessmentTemplates"
  1263. // ListAssessmentTemplatesRequest generates a "aws/request.Request" representing the
  1264. // client's request for the ListAssessmentTemplates operation. The "output" return
  1265. // value can be used to capture response data after the request's "Send" method
  1266. // is called.
  1267. //
  1268. // See ListAssessmentTemplates for usage and error information.
  1269. //
  1270. // Creating a request object using this method should be used when you want to inject
  1271. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1272. // access properties on the request object before or after sending the request. If
  1273. // you just want the service response, call the ListAssessmentTemplates method directly
  1274. // instead.
  1275. //
  1276. // Note: You must call the "Send" method on the returned request object in order
  1277. // to execute the request.
  1278. //
  1279. // // Example sending a request using the ListAssessmentTemplatesRequest method.
  1280. // req, resp := client.ListAssessmentTemplatesRequest(params)
  1281. //
  1282. // err := req.Send()
  1283. // if err == nil { // resp is now filled
  1284. // fmt.Println(resp)
  1285. // }
  1286. //
  1287. func (c *Inspector) ListAssessmentTemplatesRequest(input *ListAssessmentTemplatesInput) (req *request.Request, output *ListAssessmentTemplatesOutput) {
  1288. op := &request.Operation{
  1289. Name: opListAssessmentTemplates,
  1290. HTTPMethod: "POST",
  1291. HTTPPath: "/",
  1292. }
  1293. if input == nil {
  1294. input = &ListAssessmentTemplatesInput{}
  1295. }
  1296. req = c.newRequest(op, input, output)
  1297. output = &ListAssessmentTemplatesOutput{}
  1298. req.Data = output
  1299. return
  1300. }
  1301. // ListAssessmentTemplates API operation for Amazon Inspector.
  1302. //
  1303. // Lists the assessment templates that correspond to the assessment targets
  1304. // that are specified by the ARNs of the assessment targets.
  1305. //
  1306. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1307. // with awserr.Error's Code and Message methods to get detailed information about
  1308. // the error.
  1309. //
  1310. // See the AWS API reference guide for Amazon Inspector's
  1311. // API operation ListAssessmentTemplates for usage and error information.
  1312. //
  1313. // Returned Error Codes:
  1314. // * InternalException
  1315. // Internal server error.
  1316. //
  1317. // * InvalidInputException
  1318. // The request was rejected because an invalid or out-of-range value was supplied
  1319. // for an input parameter.
  1320. //
  1321. // * AccessDeniedException
  1322. // You do not have required permissions to access the requested resource.
  1323. //
  1324. // * NoSuchEntityException
  1325. // The request was rejected because it referenced an entity that does not exist.
  1326. // The error code describes the entity.
  1327. //
  1328. func (c *Inspector) ListAssessmentTemplates(input *ListAssessmentTemplatesInput) (*ListAssessmentTemplatesOutput, error) {
  1329. req, out := c.ListAssessmentTemplatesRequest(input)
  1330. err := req.Send()
  1331. return out, err
  1332. }
  1333. const opListEventSubscriptions = "ListEventSubscriptions"
  1334. // ListEventSubscriptionsRequest generates a "aws/request.Request" representing the
  1335. // client's request for the ListEventSubscriptions operation. The "output" return
  1336. // value can be used to capture response data after the request's "Send" method
  1337. // is called.
  1338. //
  1339. // See ListEventSubscriptions for usage and error information.
  1340. //
  1341. // Creating a request object using this method should be used when you want to inject
  1342. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1343. // access properties on the request object before or after sending the request. If
  1344. // you just want the service response, call the ListEventSubscriptions method directly
  1345. // instead.
  1346. //
  1347. // Note: You must call the "Send" method on the returned request object in order
  1348. // to execute the request.
  1349. //
  1350. // // Example sending a request using the ListEventSubscriptionsRequest method.
  1351. // req, resp := client.ListEventSubscriptionsRequest(params)
  1352. //
  1353. // err := req.Send()
  1354. // if err == nil { // resp is now filled
  1355. // fmt.Println(resp)
  1356. // }
  1357. //
  1358. func (c *Inspector) ListEventSubscriptionsRequest(input *ListEventSubscriptionsInput) (req *request.Request, output *ListEventSubscriptionsOutput) {
  1359. op := &request.Operation{
  1360. Name: opListEventSubscriptions,
  1361. HTTPMethod: "POST",
  1362. HTTPPath: "/",
  1363. }
  1364. if input == nil {
  1365. input = &ListEventSubscriptionsInput{}
  1366. }
  1367. req = c.newRequest(op, input, output)
  1368. output = &ListEventSubscriptionsOutput{}
  1369. req.Data = output
  1370. return
  1371. }
  1372. // ListEventSubscriptions API operation for Amazon Inspector.
  1373. //
  1374. // Lists all the event subscriptions for the assessment template that is specified
  1375. // by the ARN of the assessment template. For more information, see SubscribeToEvent
  1376. // and UnsubscribeFromEvent.
  1377. //
  1378. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1379. // with awserr.Error's Code and Message methods to get detailed information about
  1380. // the error.
  1381. //
  1382. // See the AWS API reference guide for Amazon Inspector's
  1383. // API operation ListEventSubscriptions for usage and error information.
  1384. //
  1385. // Returned Error Codes:
  1386. // * InternalException
  1387. // Internal server error.
  1388. //
  1389. // * InvalidInputException
  1390. // The request was rejected because an invalid or out-of-range value was supplied
  1391. // for an input parameter.
  1392. //
  1393. // * AccessDeniedException
  1394. // You do not have required permissions to access the requested resource.
  1395. //
  1396. // * NoSuchEntityException
  1397. // The request was rejected because it referenced an entity that does not exist.
  1398. // The error code describes the entity.
  1399. //
  1400. func (c *Inspector) ListEventSubscriptions(input *ListEventSubscriptionsInput) (*ListEventSubscriptionsOutput, error) {
  1401. req, out := c.ListEventSubscriptionsRequest(input)
  1402. err := req.Send()
  1403. return out, err
  1404. }
  1405. const opListFindings = "ListFindings"
  1406. // ListFindingsRequest generates a "aws/request.Request" representing the
  1407. // client's request for the ListFindings operation. The "output" return
  1408. // value can be used to capture response data after the request's "Send" method
  1409. // is called.
  1410. //
  1411. // See ListFindings for usage and error information.
  1412. //
  1413. // Creating a request object using this method should be used when you want to inject
  1414. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1415. // access properties on the request object before or after sending the request. If
  1416. // you just want the service response, call the ListFindings method directly
  1417. // instead.
  1418. //
  1419. // Note: You must call the "Send" method on the returned request object in order
  1420. // to execute the request.
  1421. //
  1422. // // Example sending a request using the ListFindingsRequest method.
  1423. // req, resp := client.ListFindingsRequest(params)
  1424. //
  1425. // err := req.Send()
  1426. // if err == nil { // resp is now filled
  1427. // fmt.Println(resp)
  1428. // }
  1429. //
  1430. func (c *Inspector) ListFindingsRequest(input *ListFindingsInput) (req *request.Request, output *ListFindingsOutput) {
  1431. op := &request.Operation{
  1432. Name: opListFindings,
  1433. HTTPMethod: "POST",
  1434. HTTPPath: "/",
  1435. }
  1436. if input == nil {
  1437. input = &ListFindingsInput{}
  1438. }
  1439. req = c.newRequest(op, input, output)
  1440. output = &ListFindingsOutput{}
  1441. req.Data = output
  1442. return
  1443. }
  1444. // ListFindings API operation for Amazon Inspector.
  1445. //
  1446. // Lists findings that are generated by the assessment runs that are specified
  1447. // by the ARNs of the assessment runs.
  1448. //
  1449. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1450. // with awserr.Error's Code and Message methods to get detailed information about
  1451. // the error.
  1452. //
  1453. // See the AWS API reference guide for Amazon Inspector's
  1454. // API operation ListFindings for usage and error information.
  1455. //
  1456. // Returned Error Codes:
  1457. // * InternalException
  1458. // Internal server error.
  1459. //
  1460. // * InvalidInputException
  1461. // The request was rejected because an invalid or out-of-range value was supplied
  1462. // for an input parameter.
  1463. //
  1464. // * AccessDeniedException
  1465. // You do not have required permissions to access the requested resource.
  1466. //
  1467. // * NoSuchEntityException
  1468. // The request was rejected because it referenced an entity that does not exist.
  1469. // The error code describes the entity.
  1470. //
  1471. func (c *Inspector) ListFindings(input *ListFindingsInput) (*ListFindingsOutput, error) {
  1472. req, out := c.ListFindingsRequest(input)
  1473. err := req.Send()
  1474. return out, err
  1475. }
  1476. const opListRulesPackages = "ListRulesPackages"
  1477. // ListRulesPackagesRequest generates a "aws/request.Request" representing the
  1478. // client's request for the ListRulesPackages operation. The "output" return
  1479. // value can be used to capture response data after the request's "Send" method
  1480. // is called.
  1481. //
  1482. // See ListRulesPackages for usage and error information.
  1483. //
  1484. // Creating a request object using this method should be used when you want to inject
  1485. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1486. // access properties on the request object before or after sending the request. If
  1487. // you just want the service response, call the ListRulesPackages method directly
  1488. // instead.
  1489. //
  1490. // Note: You must call the "Send" method on the returned request object in order
  1491. // to execute the request.
  1492. //
  1493. // // Example sending a request using the ListRulesPackagesRequest method.
  1494. // req, resp := client.ListRulesPackagesRequest(params)
  1495. //
  1496. // err := req.Send()
  1497. // if err == nil { // resp is now filled
  1498. // fmt.Println(resp)
  1499. // }
  1500. //
  1501. func (c *Inspector) ListRulesPackagesRequest(input *ListRulesPackagesInput) (req *request.Request, output *ListRulesPackagesOutput) {
  1502. op := &request.Operation{
  1503. Name: opListRulesPackages,
  1504. HTTPMethod: "POST",
  1505. HTTPPath: "/",
  1506. }
  1507. if input == nil {
  1508. input = &ListRulesPackagesInput{}
  1509. }
  1510. req = c.newRequest(op, input, output)
  1511. output = &ListRulesPackagesOutput{}
  1512. req.Data = output
  1513. return
  1514. }
  1515. // ListRulesPackages API operation for Amazon Inspector.
  1516. //
  1517. // Lists all available Amazon Inspector rules packages.
  1518. //
  1519. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1520. // with awserr.Error's Code and Message methods to get detailed information about
  1521. // the error.
  1522. //
  1523. // See the AWS API reference guide for Amazon Inspector's
  1524. // API operation ListRulesPackages for usage and error information.
  1525. //
  1526. // Returned Error Codes:
  1527. // * InternalException
  1528. // Internal server error.
  1529. //
  1530. // * InvalidInputException
  1531. // The request was rejected because an invalid or out-of-range value was supplied
  1532. // for an input parameter.
  1533. //
  1534. // * AccessDeniedException
  1535. // You do not have required permissions to access the requested resource.
  1536. //
  1537. func (c *Inspector) ListRulesPackages(input *ListRulesPackagesInput) (*ListRulesPackagesOutput, error) {
  1538. req, out := c.ListRulesPackagesRequest(input)
  1539. err := req.Send()
  1540. return out, err
  1541. }
  1542. const opListTagsForResource = "ListTagsForResource"
  1543. // ListTagsForResourceRequest generates a "aws/request.Request" representing the
  1544. // client's request for the ListTagsForResource operation. The "output" return
  1545. // value can be used to capture response data after the request's "Send" method
  1546. // is called.
  1547. //
  1548. // See ListTagsForResource for usage and error information.
  1549. //
  1550. // Creating a request object using this method should be used when you want to inject
  1551. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1552. // access properties on the request object before or after sending the request. If
  1553. // you just want the service response, call the ListTagsForResource method directly
  1554. // instead.
  1555. //
  1556. // Note: You must call the "Send" method on the returned request object in order
  1557. // to execute the request.
  1558. //
  1559. // // Example sending a request using the ListTagsForResourceRequest method.
  1560. // req, resp := client.ListTagsForResourceRequest(params)
  1561. //
  1562. // err := req.Send()
  1563. // if err == nil { // resp is now filled
  1564. // fmt.Println(resp)
  1565. // }
  1566. //
  1567. func (c *Inspector) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
  1568. op := &request.Operation{
  1569. Name: opListTagsForResource,
  1570. HTTPMethod: "POST",
  1571. HTTPPath: "/",
  1572. }
  1573. if input == nil {
  1574. input = &ListTagsForResourceInput{}
  1575. }
  1576. req = c.newRequest(op, input, output)
  1577. output = &ListTagsForResourceOutput{}
  1578. req.Data = output
  1579. return
  1580. }
  1581. // ListTagsForResource API operation for Amazon Inspector.
  1582. //
  1583. // Lists all tags associated with an assessment template.
  1584. //
  1585. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1586. // with awserr.Error's Code and Message methods to get detailed information about
  1587. // the error.
  1588. //
  1589. // See the AWS API reference guide for Amazon Inspector's
  1590. // API operation ListTagsForResource for usage and error information.
  1591. //
  1592. // Returned Error Codes:
  1593. // * InternalException
  1594. // Internal server error.
  1595. //
  1596. // * InvalidInputException
  1597. // The request was rejected because an invalid or out-of-range value was supplied
  1598. // for an input parameter.
  1599. //
  1600. // * AccessDeniedException
  1601. // You do not have required permissions to access the requested resource.
  1602. //
  1603. // * NoSuchEntityException
  1604. // The request was rejected because it referenced an entity that does not exist.
  1605. // The error code describes the entity.
  1606. //
  1607. func (c *Inspector) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
  1608. req, out := c.ListTagsForResourceRequest(input)
  1609. err := req.Send()
  1610. return out, err
  1611. }
  1612. const opPreviewAgents = "PreviewAgents"
  1613. // PreviewAgentsRequest generates a "aws/request.Request" representing the
  1614. // client's request for the PreviewAgents operation. The "output" return
  1615. // value can be used to capture response data after the request's "Send" method
  1616. // is called.
  1617. //
  1618. // See PreviewAgents for usage and error information.
  1619. //
  1620. // Creating a request object using this method should be used when you want to inject
  1621. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1622. // access properties on the request object before or after sending the request. If
  1623. // you just want the service response, call the PreviewAgents method directly
  1624. // instead.
  1625. //
  1626. // Note: You must call the "Send" method on the returned request object in order
  1627. // to execute the request.
  1628. //
  1629. // // Example sending a request using the PreviewAgentsRequest method.
  1630. // req, resp := client.PreviewAgentsRequest(params)
  1631. //
  1632. // err := req.Send()
  1633. // if err == nil { // resp is now filled
  1634. // fmt.Println(resp)
  1635. // }
  1636. //
  1637. func (c *Inspector) PreviewAgentsRequest(input *PreviewAgentsInput) (req *request.Request, output *PreviewAgentsOutput) {
  1638. op := &request.Operation{
  1639. Name: opPreviewAgents,
  1640. HTTPMethod: "POST",
  1641. HTTPPath: "/",
  1642. }
  1643. if input == nil {
  1644. input = &PreviewAgentsInput{}
  1645. }
  1646. req = c.newRequest(op, input, output)
  1647. output = &PreviewAgentsOutput{}
  1648. req.Data = output
  1649. return
  1650. }
  1651. // PreviewAgents API operation for Amazon Inspector.
  1652. //
  1653. // Previews the agents installed on the EC2 instances that are part of the specified
  1654. // assessment target.
  1655. //
  1656. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1657. // with awserr.Error's Code and Message methods to get detailed information about
  1658. // the error.
  1659. //
  1660. // See the AWS API reference guide for Amazon Inspector's
  1661. // API operation PreviewAgents for usage and error information.
  1662. //
  1663. // Returned Error Codes:
  1664. // * InternalException
  1665. // Internal server error.
  1666. //
  1667. // * InvalidInputException
  1668. // The request was rejected because an invalid or out-of-range value was supplied
  1669. // for an input parameter.
  1670. //
  1671. // * AccessDeniedException
  1672. // You do not have required permissions to access the requested resource.
  1673. //
  1674. // * NoSuchEntityException
  1675. // The request was rejected because it referenced an entity that does not exist.
  1676. // The error code describes the entity.
  1677. //
  1678. // * InvalidCrossAccountRoleException
  1679. // Amazon Inspector cannot assume the cross-account role that it needs to list
  1680. // your EC2 instances during the assessment run.
  1681. //
  1682. func (c *Inspector) PreviewAgents(input *PreviewAgentsInput) (*PreviewAgentsOutput, error) {
  1683. req, out := c.PreviewAgentsRequest(input)
  1684. err := req.Send()
  1685. return out, err
  1686. }
  1687. const opRegisterCrossAccountAccessRole = "RegisterCrossAccountAccessRole"
  1688. // RegisterCrossAccountAccessRoleRequest generates a "aws/request.Request" representing the
  1689. // client's request for the RegisterCrossAccountAccessRole operation. The "output" return
  1690. // value can be used to capture response data after the request's "Send" method
  1691. // is called.
  1692. //
  1693. // See RegisterCrossAccountAccessRole for usage and error information.
  1694. //
  1695. // Creating a request object using this method should be used when you want to inject
  1696. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1697. // access properties on the request object before or after sending the request. If
  1698. // you just want the service response, call the RegisterCrossAccountAccessRole method directly
  1699. // instead.
  1700. //
  1701. // Note: You must call the "Send" method on the returned request object in order
  1702. // to execute the request.
  1703. //
  1704. // // Example sending a request using the RegisterCrossAccountAccessRoleRequest method.
  1705. // req, resp := client.RegisterCrossAccountAccessRoleRequest(params)
  1706. //
  1707. // err := req.Send()
  1708. // if err == nil { // resp is now filled
  1709. // fmt.Println(resp)
  1710. // }
  1711. //
  1712. func (c *Inspector) RegisterCrossAccountAccessRoleRequest(input *RegisterCrossAccountAccessRoleInput) (req *request.Request, output *RegisterCrossAccountAccessRoleOutput) {
  1713. op := &request.Operation{
  1714. Name: opRegisterCrossAccountAccessRole,
  1715. HTTPMethod: "POST",
  1716. HTTPPath: "/",
  1717. }
  1718. if input == nil {
  1719. input = &RegisterCrossAccountAccessRoleInput{}
  1720. }
  1721. req = c.newRequest(op, input, output)
  1722. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1723. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1724. output = &RegisterCrossAccountAccessRoleOutput{}
  1725. req.Data = output
  1726. return
  1727. }
  1728. // RegisterCrossAccountAccessRole API operation for Amazon Inspector.
  1729. //
  1730. // Registers the IAM role that Amazon Inspector uses to list your EC2 instances
  1731. // at the start of the assessment run or when you call the PreviewAgents action.
  1732. //
  1733. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1734. // with awserr.Error's Code and Message methods to get detailed information about
  1735. // the error.
  1736. //
  1737. // See the AWS API reference guide for Amazon Inspector's
  1738. // API operation RegisterCrossAccountAccessRole for usage and error information.
  1739. //
  1740. // Returned Error Codes:
  1741. // * InternalException
  1742. // Internal server error.
  1743. //
  1744. // * InvalidInputException
  1745. // The request was rejected because an invalid or out-of-range value was supplied
  1746. // for an input parameter.
  1747. //
  1748. // * AccessDeniedException
  1749. // You do not have required permissions to access the requested resource.
  1750. //
  1751. // * InvalidCrossAccountRoleException
  1752. // Amazon Inspector cannot assume the cross-account role that it needs to list
  1753. // your EC2 instances during the assessment run.
  1754. //
  1755. func (c *Inspector) RegisterCrossAccountAccessRole(input *RegisterCrossAccountAccessRoleInput) (*RegisterCrossAccountAccessRoleOutput, error) {
  1756. req, out := c.RegisterCrossAccountAccessRoleRequest(input)
  1757. err := req.Send()
  1758. return out, err
  1759. }
  1760. const opRemoveAttributesFromFindings = "RemoveAttributesFromFindings"
  1761. // RemoveAttributesFromFindingsRequest generates a "aws/request.Request" representing the
  1762. // client's request for the RemoveAttributesFromFindings operation. The "output" return
  1763. // value can be used to capture response data after the request's "Send" method
  1764. // is called.
  1765. //
  1766. // See RemoveAttributesFromFindings for usage and error information.
  1767. //
  1768. // Creating a request object using this method should be used when you want to inject
  1769. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1770. // access properties on the request object before or after sending the request. If
  1771. // you just want the service response, call the RemoveAttributesFromFindings method directly
  1772. // instead.
  1773. //
  1774. // Note: You must call the "Send" method on the returned request object in order
  1775. // to execute the request.
  1776. //
  1777. // // Example sending a request using the RemoveAttributesFromFindingsRequest method.
  1778. // req, resp := client.RemoveAttributesFromFindingsRequest(params)
  1779. //
  1780. // err := req.Send()
  1781. // if err == nil { // resp is now filled
  1782. // fmt.Println(resp)
  1783. // }
  1784. //
  1785. func (c *Inspector) RemoveAttributesFromFindingsRequest(input *RemoveAttributesFromFindingsInput) (req *request.Request, output *RemoveAttributesFromFindingsOutput) {
  1786. op := &request.Operation{
  1787. Name: opRemoveAttributesFromFindings,
  1788. HTTPMethod: "POST",
  1789. HTTPPath: "/",
  1790. }
  1791. if input == nil {
  1792. input = &RemoveAttributesFromFindingsInput{}
  1793. }
  1794. req = c.newRequest(op, input, output)
  1795. output = &RemoveAttributesFromFindingsOutput{}
  1796. req.Data = output
  1797. return
  1798. }
  1799. // RemoveAttributesFromFindings API operation for Amazon Inspector.
  1800. //
  1801. // Removes entire attributes (key and value pairs) from the findings that are
  1802. // specified by the ARNs of the findings where an attribute with the specified
  1803. // key exists.
  1804. //
  1805. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1806. // with awserr.Error's Code and Message methods to get detailed information about
  1807. // the error.
  1808. //
  1809. // See the AWS API reference guide for Amazon Inspector's
  1810. // API operation RemoveAttributesFromFindings for usage and error information.
  1811. //
  1812. // Returned Error Codes:
  1813. // * InternalException
  1814. // Internal server error.
  1815. //
  1816. // * InvalidInputException
  1817. // The request was rejected because an invalid or out-of-range value was supplied
  1818. // for an input parameter.
  1819. //
  1820. // * AccessDeniedException
  1821. // You do not have required permissions to access the requested resource.
  1822. //
  1823. // * NoSuchEntityException
  1824. // The request was rejected because it referenced an entity that does not exist.
  1825. // The error code describes the entity.
  1826. //
  1827. func (c *Inspector) RemoveAttributesFromFindings(input *RemoveAttributesFromFindingsInput) (*RemoveAttributesFromFindingsOutput, error) {
  1828. req, out := c.RemoveAttributesFromFindingsRequest(input)
  1829. err := req.Send()
  1830. return out, err
  1831. }
  1832. const opSetTagsForResource = "SetTagsForResource"
  1833. // SetTagsForResourceRequest generates a "aws/request.Request" representing the
  1834. // client's request for the SetTagsForResource operation. The "output" return
  1835. // value can be used to capture response data after the request's "Send" method
  1836. // is called.
  1837. //
  1838. // See SetTagsForResource for usage and error information.
  1839. //
  1840. // Creating a request object using this method should be used when you want to inject
  1841. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1842. // access properties on the request object before or after sending the request. If
  1843. // you just want the service response, call the SetTagsForResource method directly
  1844. // instead.
  1845. //
  1846. // Note: You must call the "Send" method on the returned request object in order
  1847. // to execute the request.
  1848. //
  1849. // // Example sending a request using the SetTagsForResourceRequest method.
  1850. // req, resp := client.SetTagsForResourceRequest(params)
  1851. //
  1852. // err := req.Send()
  1853. // if err == nil { // resp is now filled
  1854. // fmt.Println(resp)
  1855. // }
  1856. //
  1857. func (c *Inspector) SetTagsForResourceRequest(input *SetTagsForResourceInput) (req *request.Request, output *SetTagsForResourceOutput) {
  1858. op := &request.Operation{
  1859. Name: opSetTagsForResource,
  1860. HTTPMethod: "POST",
  1861. HTTPPath: "/",
  1862. }
  1863. if input == nil {
  1864. input = &SetTagsForResourceInput{}
  1865. }
  1866. req = c.newRequest(op, input, output)
  1867. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  1868. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1869. output = &SetTagsForResourceOutput{}
  1870. req.Data = output
  1871. return
  1872. }
  1873. // SetTagsForResource API operation for Amazon Inspector.
  1874. //
  1875. // Sets tags (key and value pairs) to the assessment template that is specified
  1876. // by the ARN of the assessment template.
  1877. //
  1878. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1879. // with awserr.Error's Code and Message methods to get detailed information about
  1880. // the error.
  1881. //
  1882. // See the AWS API reference guide for Amazon Inspector's
  1883. // API operation SetTagsForResource for usage and error information.
  1884. //
  1885. // Returned Error Codes:
  1886. // * InternalException
  1887. // Internal server error.
  1888. //
  1889. // * InvalidInputException
  1890. // The request was rejected because an invalid or out-of-range value was supplied
  1891. // for an input parameter.
  1892. //
  1893. // * AccessDeniedException
  1894. // You do not have required permissions to access the requested resource.
  1895. //
  1896. // * NoSuchEntityException
  1897. // The request was rejected because it referenced an entity that does not exist.
  1898. // The error code describes the entity.
  1899. //
  1900. func (c *Inspector) SetTagsForResource(input *SetTagsForResourceInput) (*SetTagsForResourceOutput, error) {
  1901. req, out := c.SetTagsForResourceRequest(input)
  1902. err := req.Send()
  1903. return out, err
  1904. }
  1905. const opStartAssessmentRun = "StartAssessmentRun"
  1906. // StartAssessmentRunRequest generates a "aws/request.Request" representing the
  1907. // client's request for the StartAssessmentRun operation. The "output" return
  1908. // value can be used to capture response data after the request's "Send" method
  1909. // is called.
  1910. //
  1911. // See StartAssessmentRun for usage and error information.
  1912. //
  1913. // Creating a request object using this method should be used when you want to inject
  1914. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1915. // access properties on the request object before or after sending the request. If
  1916. // you just want the service response, call the StartAssessmentRun method directly
  1917. // instead.
  1918. //
  1919. // Note: You must call the "Send" method on the returned request object in order
  1920. // to execute the request.
  1921. //
  1922. // // Example sending a request using the StartAssessmentRunRequest method.
  1923. // req, resp := client.StartAssessmentRunRequest(params)
  1924. //
  1925. // err := req.Send()
  1926. // if err == nil { // resp is now filled
  1927. // fmt.Println(resp)
  1928. // }
  1929. //
  1930. func (c *Inspector) StartAssessmentRunRequest(input *StartAssessmentRunInput) (req *request.Request, output *StartAssessmentRunOutput) {
  1931. op := &request.Operation{
  1932. Name: opStartAssessmentRun,
  1933. HTTPMethod: "POST",
  1934. HTTPPath: "/",
  1935. }
  1936. if input == nil {
  1937. input = &StartAssessmentRunInput{}
  1938. }
  1939. req = c.newRequest(op, input, output)
  1940. output = &StartAssessmentRunOutput{}
  1941. req.Data = output
  1942. return
  1943. }
  1944. // StartAssessmentRun API operation for Amazon Inspector.
  1945. //
  1946. // Starts the assessment run specified by the ARN of the assessment template.
  1947. // For this API to function properly, you must not exceed the limit of running
  1948. // up to 500 concurrent agents per AWS account.
  1949. //
  1950. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1951. // with awserr.Error's Code and Message methods to get detailed information about
  1952. // the error.
  1953. //
  1954. // See the AWS API reference guide for Amazon Inspector's
  1955. // API operation StartAssessmentRun for usage and error information.
  1956. //
  1957. // Returned Error Codes:
  1958. // * InternalException
  1959. // Internal server error.
  1960. //
  1961. // * InvalidInputException
  1962. // The request was rejected because an invalid or out-of-range value was supplied
  1963. // for an input parameter.
  1964. //
  1965. // * LimitExceededException
  1966. // The request was rejected because it attempted to create resources beyond
  1967. // the current AWS account limits. The error code describes the limit exceeded.
  1968. //
  1969. // * AccessDeniedException
  1970. // You do not have required permissions to access the requested resource.
  1971. //
  1972. // * NoSuchEntityException
  1973. // The request was rejected because it referenced an entity that does not exist.
  1974. // The error code describes the entity.
  1975. //
  1976. // * InvalidCrossAccountRoleException
  1977. // Amazon Inspector cannot assume the cross-account role that it needs to list
  1978. // your EC2 instances during the assessment run.
  1979. //
  1980. // * AgentsAlreadyRunningAssessmentException
  1981. // You started an assessment run, but one of the instances is already participating
  1982. // in another assessment run.
  1983. //
  1984. func (c *Inspector) StartAssessmentRun(input *StartAssessmentRunInput) (*StartAssessmentRunOutput, error) {
  1985. req, out := c.StartAssessmentRunRequest(input)
  1986. err := req.Send()
  1987. return out, err
  1988. }
  1989. const opStopAssessmentRun = "StopAssessmentRun"
  1990. // StopAssessmentRunRequest generates a "aws/request.Request" representing the
  1991. // client's request for the StopAssessmentRun operation. The "output" return
  1992. // value can be used to capture response data after the request's "Send" method
  1993. // is called.
  1994. //
  1995. // See StopAssessmentRun for usage and error information.
  1996. //
  1997. // Creating a request object using this method should be used when you want to inject
  1998. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1999. // access properties on the request object before or after sending the request. If
  2000. // you just want the service response, call the StopAssessmentRun method directly
  2001. // instead.
  2002. //
  2003. // Note: You must call the "Send" method on the returned request object in order
  2004. // to execute the request.
  2005. //
  2006. // // Example sending a request using the StopAssessmentRunRequest method.
  2007. // req, resp := client.StopAssessmentRunRequest(params)
  2008. //
  2009. // err := req.Send()
  2010. // if err == nil { // resp is now filled
  2011. // fmt.Println(resp)
  2012. // }
  2013. //
  2014. func (c *Inspector) StopAssessmentRunRequest(input *StopAssessmentRunInput) (req *request.Request, output *StopAssessmentRunOutput) {
  2015. op := &request.Operation{
  2016. Name: opStopAssessmentRun,
  2017. HTTPMethod: "POST",
  2018. HTTPPath: "/",
  2019. }
  2020. if input == nil {
  2021. input = &StopAssessmentRunInput{}
  2022. }
  2023. req = c.newRequest(op, input, output)
  2024. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  2025. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2026. output = &StopAssessmentRunOutput{}
  2027. req.Data = output
  2028. return
  2029. }
  2030. // StopAssessmentRun API operation for Amazon Inspector.
  2031. //
  2032. // Stops the assessment run that is specified by the ARN of the assessment run.
  2033. //
  2034. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2035. // with awserr.Error's Code and Message methods to get detailed information about
  2036. // the error.
  2037. //
  2038. // See the AWS API reference guide for Amazon Inspector's
  2039. // API operation StopAssessmentRun for usage and error information.
  2040. //
  2041. // Returned Error Codes:
  2042. // * InternalException
  2043. // Internal server error.
  2044. //
  2045. // * InvalidInputException
  2046. // The request was rejected because an invalid or out-of-range value was supplied
  2047. // for an input parameter.
  2048. //
  2049. // * AccessDeniedException
  2050. // You do not have required permissions to access the requested resource.
  2051. //
  2052. // * NoSuchEntityException
  2053. // The request was rejected because it referenced an entity that does not exist.
  2054. // The error code describes the entity.
  2055. //
  2056. func (c *Inspector) StopAssessmentRun(input *StopAssessmentRunInput) (*StopAssessmentRunOutput, error) {
  2057. req, out := c.StopAssessmentRunRequest(input)
  2058. err := req.Send()
  2059. return out, err
  2060. }
  2061. const opSubscribeToEvent = "SubscribeToEvent"
  2062. // SubscribeToEventRequest generates a "aws/request.Request" representing the
  2063. // client's request for the SubscribeToEvent operation. The "output" return
  2064. // value can be used to capture response data after the request's "Send" method
  2065. // is called.
  2066. //
  2067. // See SubscribeToEvent for usage and error information.
  2068. //
  2069. // Creating a request object using this method should be used when you want to inject
  2070. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2071. // access properties on the request object before or after sending the request. If
  2072. // you just want the service response, call the SubscribeToEvent method directly
  2073. // instead.
  2074. //
  2075. // Note: You must call the "Send" method on the returned request object in order
  2076. // to execute the request.
  2077. //
  2078. // // Example sending a request using the SubscribeToEventRequest method.
  2079. // req, resp := client.SubscribeToEventRequest(params)
  2080. //
  2081. // err := req.Send()
  2082. // if err == nil { // resp is now filled
  2083. // fmt.Println(resp)
  2084. // }
  2085. //
  2086. func (c *Inspector) SubscribeToEventRequest(input *SubscribeToEventInput) (req *request.Request, output *SubscribeToEventOutput) {
  2087. op := &request.Operation{
  2088. Name: opSubscribeToEvent,
  2089. HTTPMethod: "POST",
  2090. HTTPPath: "/",
  2091. }
  2092. if input == nil {
  2093. input = &SubscribeToEventInput{}
  2094. }
  2095. req = c.newRequest(op, input, output)
  2096. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  2097. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2098. output = &SubscribeToEventOutput{}
  2099. req.Data = output
  2100. return
  2101. }
  2102. // SubscribeToEvent API operation for Amazon Inspector.
  2103. //
  2104. // Enables the process of sending Amazon Simple Notification Service (SNS) notifications
  2105. // about a specified event to a specified SNS topic.
  2106. //
  2107. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2108. // with awserr.Error's Code and Message methods to get detailed information about
  2109. // the error.
  2110. //
  2111. // See the AWS API reference guide for Amazon Inspector's
  2112. // API operation SubscribeToEvent for usage and error information.
  2113. //
  2114. // Returned Error Codes:
  2115. // * InternalException
  2116. // Internal server error.
  2117. //
  2118. // * InvalidInputException
  2119. // The request was rejected because an invalid or out-of-range value was supplied
  2120. // for an input parameter.
  2121. //
  2122. // * LimitExceededException
  2123. // The request was rejected because it attempted to create resources beyond
  2124. // the current AWS account limits. The error code describes the limit exceeded.
  2125. //
  2126. // * AccessDeniedException
  2127. // You do not have required permissions to access the requested resource.
  2128. //
  2129. // * NoSuchEntityException
  2130. // The request was rejected because it referenced an entity that does not exist.
  2131. // The error code describes the entity.
  2132. //
  2133. func (c *Inspector) SubscribeToEvent(input *SubscribeToEventInput) (*SubscribeToEventOutput, error) {
  2134. req, out := c.SubscribeToEventRequest(input)
  2135. err := req.Send()
  2136. return out, err
  2137. }
  2138. const opUnsubscribeFromEvent = "UnsubscribeFromEvent"
  2139. // UnsubscribeFromEventRequest generates a "aws/request.Request" representing the
  2140. // client's request for the UnsubscribeFromEvent operation. The "output" return
  2141. // value can be used to capture response data after the request's "Send" method
  2142. // is called.
  2143. //
  2144. // See UnsubscribeFromEvent for usage and error information.
  2145. //
  2146. // Creating a request object using this method should be used when you want to inject
  2147. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2148. // access properties on the request object before or after sending the request. If
  2149. // you just want the service response, call the UnsubscribeFromEvent method directly
  2150. // instead.
  2151. //
  2152. // Note: You must call the "Send" method on the returned request object in order
  2153. // to execute the request.
  2154. //
  2155. // // Example sending a request using the UnsubscribeFromEventRequest method.
  2156. // req, resp := client.UnsubscribeFromEventRequest(params)
  2157. //
  2158. // err := req.Send()
  2159. // if err == nil { // resp is now filled
  2160. // fmt.Println(resp)
  2161. // }
  2162. //
  2163. func (c *Inspector) UnsubscribeFromEventRequest(input *UnsubscribeFromEventInput) (req *request.Request, output *UnsubscribeFromEventOutput) {
  2164. op := &request.Operation{
  2165. Name: opUnsubscribeFromEvent,
  2166. HTTPMethod: "POST",
  2167. HTTPPath: "/",
  2168. }
  2169. if input == nil {
  2170. input = &UnsubscribeFromEventInput{}
  2171. }
  2172. req = c.newRequest(op, input, output)
  2173. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  2174. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2175. output = &UnsubscribeFromEventOutput{}
  2176. req.Data = output
  2177. return
  2178. }
  2179. // UnsubscribeFromEvent API operation for Amazon Inspector.
  2180. //
  2181. // Disables the process of sending Amazon Simple Notification Service (SNS)
  2182. // notifications about a specified event to a specified SNS topic.
  2183. //
  2184. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2185. // with awserr.Error's Code and Message methods to get detailed information about
  2186. // the error.
  2187. //
  2188. // See the AWS API reference guide for Amazon Inspector's
  2189. // API operation UnsubscribeFromEvent for usage and error information.
  2190. //
  2191. // Returned Error Codes:
  2192. // * InternalException
  2193. // Internal server error.
  2194. //
  2195. // * InvalidInputException
  2196. // The request was rejected because an invalid or out-of-range value was supplied
  2197. // for an input parameter.
  2198. //
  2199. // * AccessDeniedException
  2200. // You do not have required permissions to access the requested resource.
  2201. //
  2202. // * NoSuchEntityException
  2203. // The request was rejected because it referenced an entity that does not exist.
  2204. // The error code describes the entity.
  2205. //
  2206. func (c *Inspector) UnsubscribeFromEvent(input *UnsubscribeFromEventInput) (*UnsubscribeFromEventOutput, error) {
  2207. req, out := c.UnsubscribeFromEventRequest(input)
  2208. err := req.Send()
  2209. return out, err
  2210. }
  2211. const opUpdateAssessmentTarget = "UpdateAssessmentTarget"
  2212. // UpdateAssessmentTargetRequest generates a "aws/request.Request" representing the
  2213. // client's request for the UpdateAssessmentTarget operation. The "output" return
  2214. // value can be used to capture response data after the request's "Send" method
  2215. // is called.
  2216. //
  2217. // See UpdateAssessmentTarget for usage and error information.
  2218. //
  2219. // Creating a request object using this method should be used when you want to inject
  2220. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2221. // access properties on the request object before or after sending the request. If
  2222. // you just want the service response, call the UpdateAssessmentTarget method directly
  2223. // instead.
  2224. //
  2225. // Note: You must call the "Send" method on the returned request object in order
  2226. // to execute the request.
  2227. //
  2228. // // Example sending a request using the UpdateAssessmentTargetRequest method.
  2229. // req, resp := client.UpdateAssessmentTargetRequest(params)
  2230. //
  2231. // err := req.Send()
  2232. // if err == nil { // resp is now filled
  2233. // fmt.Println(resp)
  2234. // }
  2235. //
  2236. func (c *Inspector) UpdateAssessmentTargetRequest(input *UpdateAssessmentTargetInput) (req *request.Request, output *UpdateAssessmentTargetOutput) {
  2237. op := &request.Operation{
  2238. Name: opUpdateAssessmentTarget,
  2239. HTTPMethod: "POST",
  2240. HTTPPath: "/",
  2241. }
  2242. if input == nil {
  2243. input = &UpdateAssessmentTargetInput{}
  2244. }
  2245. req = c.newRequest(op, input, output)
  2246. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  2247. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2248. output = &UpdateAssessmentTargetOutput{}
  2249. req.Data = output
  2250. return
  2251. }
  2252. // UpdateAssessmentTarget API operation for Amazon Inspector.
  2253. //
  2254. // Updates the assessment target that is specified by the ARN of the assessment
  2255. // target.
  2256. //
  2257. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2258. // with awserr.Error's Code and Message methods to get detailed information about
  2259. // the error.
  2260. //
  2261. // See the AWS API reference guide for Amazon Inspector's
  2262. // API operation UpdateAssessmentTarget for usage and error information.
  2263. //
  2264. // Returned Error Codes:
  2265. // * InternalException
  2266. // Internal server error.
  2267. //
  2268. // * InvalidInputException
  2269. // The request was rejected because an invalid or out-of-range value was supplied
  2270. // for an input parameter.
  2271. //
  2272. // * AccessDeniedException
  2273. // You do not have required permissions to access the requested resource.
  2274. //
  2275. // * NoSuchEntityException
  2276. // The request was rejected because it referenced an entity that does not exist.
  2277. // The error code describes the entity.
  2278. //
  2279. func (c *Inspector) UpdateAssessmentTarget(input *UpdateAssessmentTargetInput) (*UpdateAssessmentTargetOutput, error) {
  2280. req, out := c.UpdateAssessmentTargetRequest(input)
  2281. err := req.Send()
  2282. return out, err
  2283. }
  2284. type AddAttributesToFindingsInput struct {
  2285. _ struct{} `type:"structure"`
  2286. // The array of attributes that you want to assign to specified findings.
  2287. //
  2288. // Attributes is a required field
  2289. Attributes []*Attribute `locationName:"attributes" type:"list" required:"true"`
  2290. // The ARNs that specify the findings that you want to assign attributes to.
  2291. //
  2292. // FindingArns is a required field
  2293. FindingArns []*string `locationName:"findingArns" min:"1" type:"list" required:"true"`
  2294. }
  2295. // String returns the string representation
  2296. func (s AddAttributesToFindingsInput) String() string {
  2297. return awsutil.Prettify(s)
  2298. }
  2299. // GoString returns the string representation
  2300. func (s AddAttributesToFindingsInput) GoString() string {
  2301. return s.String()
  2302. }
  2303. // Validate inspects the fields of the type to determine if they are valid.
  2304. func (s *AddAttributesToFindingsInput) Validate() error {
  2305. invalidParams := request.ErrInvalidParams{Context: "AddAttributesToFindingsInput"}
  2306. if s.Attributes == nil {
  2307. invalidParams.Add(request.NewErrParamRequired("Attributes"))
  2308. }
  2309. if s.FindingArns == nil {
  2310. invalidParams.Add(request.NewErrParamRequired("FindingArns"))
  2311. }
  2312. if s.FindingArns != nil && len(s.FindingArns) < 1 {
  2313. invalidParams.Add(request.NewErrParamMinLen("FindingArns", 1))
  2314. }
  2315. if s.Attributes != nil {
  2316. for i, v := range s.Attributes {
  2317. if v == nil {
  2318. continue
  2319. }
  2320. if err := v.Validate(); err != nil {
  2321. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams))
  2322. }
  2323. }
  2324. }
  2325. if invalidParams.Len() > 0 {
  2326. return invalidParams
  2327. }
  2328. return nil
  2329. }
  2330. type AddAttributesToFindingsOutput struct {
  2331. _ struct{} `type:"structure"`
  2332. // Attribute details that cannot be described. An error code is provided for
  2333. // each failed item.
  2334. //
  2335. // FailedItems is a required field
  2336. FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"`
  2337. }
  2338. // String returns the string representation
  2339. func (s AddAttributesToFindingsOutput) String() string {
  2340. return awsutil.Prettify(s)
  2341. }
  2342. // GoString returns the string representation
  2343. func (s AddAttributesToFindingsOutput) GoString() string {
  2344. return s.String()
  2345. }
  2346. // Used in the exception error that is thrown if you start an assessment run
  2347. // for an assessment target that includes an EC2 instance that is already participating
  2348. // in another started assessment run.
  2349. type AgentAlreadyRunningAssessment struct {
  2350. _ struct{} `type:"structure"`
  2351. // ID of the agent that is running on an EC2 instance that is already participating
  2352. // in another started assessment run.
  2353. //
  2354. // AgentId is a required field
  2355. AgentId *string `locationName:"agentId" min:"1" type:"string" required:"true"`
  2356. // The ARN of the assessment run that has already been started.
  2357. //
  2358. // AssessmentRunArn is a required field
  2359. AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"`
  2360. }
  2361. // String returns the string representation
  2362. func (s AgentAlreadyRunningAssessment) String() string {
  2363. return awsutil.Prettify(s)
  2364. }
  2365. // GoString returns the string representation
  2366. func (s AgentAlreadyRunningAssessment) GoString() string {
  2367. return s.String()
  2368. }
  2369. // Contains information about an Amazon Inspector agent. This data type is used
  2370. // as a request parameter in the ListAssessmentRunAgents action.
  2371. type AgentFilter struct {
  2372. _ struct{} `type:"structure"`
  2373. // The detailed health state of the agent. Values can be set to IDLE, RUNNING,
  2374. // SHUTDOWN, UNHEALTHY, THROTTLED, and UNKNOWN.
  2375. //
  2376. // AgentHealthCodes is a required field
  2377. AgentHealthCodes []*string `locationName:"agentHealthCodes" type:"list" required:"true"`
  2378. // The current health state of the agent. Values can be set to HEALTHY or UNHEALTHY.
  2379. //
  2380. // AgentHealths is a required field
  2381. AgentHealths []*string `locationName:"agentHealths" type:"list" required:"true"`
  2382. }
  2383. // String returns the string representation
  2384. func (s AgentFilter) String() string {
  2385. return awsutil.Prettify(s)
  2386. }
  2387. // GoString returns the string representation
  2388. func (s AgentFilter) GoString() string {
  2389. return s.String()
  2390. }
  2391. // Validate inspects the fields of the type to determine if they are valid.
  2392. func (s *AgentFilter) Validate() error {
  2393. invalidParams := request.ErrInvalidParams{Context: "AgentFilter"}
  2394. if s.AgentHealthCodes == nil {
  2395. invalidParams.Add(request.NewErrParamRequired("AgentHealthCodes"))
  2396. }
  2397. if s.AgentHealths == nil {
  2398. invalidParams.Add(request.NewErrParamRequired("AgentHealths"))
  2399. }
  2400. if invalidParams.Len() > 0 {
  2401. return invalidParams
  2402. }
  2403. return nil
  2404. }
  2405. // Used as a response element in the PreviewAgents action.
  2406. type AgentPreview struct {
  2407. _ struct{} `type:"structure"`
  2408. // The ID of the EC2 instance where the agent is installed.
  2409. //
  2410. // AgentId is a required field
  2411. AgentId *string `locationName:"agentId" min:"1" type:"string" required:"true"`
  2412. // The Auto Scaling group for the EC2 instance where the agent is installed.
  2413. AutoScalingGroup *string `locationName:"autoScalingGroup" min:"1" type:"string"`
  2414. }
  2415. // String returns the string representation
  2416. func (s AgentPreview) String() string {
  2417. return awsutil.Prettify(s)
  2418. }
  2419. // GoString returns the string representation
  2420. func (s AgentPreview) GoString() string {
  2421. return s.String()
  2422. }
  2423. // A snapshot of an Amazon Inspector assessment run that contains the findings
  2424. // of the assessment run .
  2425. //
  2426. // Used as the response element in the DescribeAssessmentRuns action.
  2427. type AssessmentRun struct {
  2428. _ struct{} `type:"structure"`
  2429. // The ARN of the assessment run.
  2430. //
  2431. // Arn is a required field
  2432. Arn *string `locationName:"arn" min:"1" type:"string" required:"true"`
  2433. // The ARN of the assessment template that is associated with the assessment
  2434. // run.
  2435. //
  2436. // AssessmentTemplateArn is a required field
  2437. AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"`
  2438. // The assessment run completion time that corresponds to the rules packages
  2439. // evaluation completion time or failure.
  2440. CompletedAt *time.Time `locationName:"completedAt" type:"timestamp" timestampFormat:"unix"`
  2441. // The time when StartAssessmentRun was called.
  2442. //
  2443. // CreatedAt is a required field
  2444. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"`
  2445. // A Boolean value (true or false) that specifies whether the process of collecting
  2446. // data from the agents is completed.
  2447. //
  2448. // DataCollected is a required field
  2449. DataCollected *bool `locationName:"dataCollected" type:"boolean" required:"true"`
  2450. // The duration of the assessment run.
  2451. //
  2452. // DurationInSeconds is a required field
  2453. DurationInSeconds *int64 `locationName:"durationInSeconds" min:"180" type:"integer" required:"true"`
  2454. // The auto-generated name for the assessment run.
  2455. //
  2456. // Name is a required field
  2457. Name *string `locationName:"name" min:"1" type:"string" required:"true"`
  2458. // A list of notifications for the event subscriptions. A notification about
  2459. // a particular generated finding is added to this list only once.
  2460. //
  2461. // Notifications is a required field
  2462. Notifications []*AssessmentRunNotification `locationName:"notifications" type:"list" required:"true"`
  2463. // The rules packages selected for the assessment run.
  2464. //
  2465. // RulesPackageArns is a required field
  2466. RulesPackageArns []*string `locationName:"rulesPackageArns" min:"1" type:"list" required:"true"`
  2467. // The time when StartAssessmentRun was called.
  2468. StartedAt *time.Time `locationName:"startedAt" type:"timestamp" timestampFormat:"unix"`
  2469. // The state of the assessment run.
  2470. //
  2471. // State is a required field
  2472. State *string `locationName:"state" type:"string" required:"true" enum:"AssessmentRunState"`
  2473. // The last time when the assessment run's state changed.
  2474. //
  2475. // StateChangedAt is a required field
  2476. StateChangedAt *time.Time `locationName:"stateChangedAt" type:"timestamp" timestampFormat:"unix" required:"true"`
  2477. // A list of the assessment run state changes.
  2478. //
  2479. // StateChanges is a required field
  2480. StateChanges []*AssessmentRunStateChange `locationName:"stateChanges" type:"list" required:"true"`
  2481. // The user-defined attributes that are assigned to every generated finding.
  2482. //
  2483. // UserAttributesForFindings is a required field
  2484. UserAttributesForFindings []*Attribute `locationName:"userAttributesForFindings" type:"list" required:"true"`
  2485. }
  2486. // String returns the string representation
  2487. func (s AssessmentRun) String() string {
  2488. return awsutil.Prettify(s)
  2489. }
  2490. // GoString returns the string representation
  2491. func (s AssessmentRun) GoString() string {
  2492. return s.String()
  2493. }
  2494. // Contains information about an Amazon Inspector agent. This data type is used
  2495. // as a response element in the ListAssessmentRunAgents action.
  2496. type AssessmentRunAgent struct {
  2497. _ struct{} `type:"structure"`
  2498. // The current health state of the agent.
  2499. //
  2500. // AgentHealth is a required field
  2501. AgentHealth *string `locationName:"agentHealth" type:"string" required:"true" enum:"AgentHealth"`
  2502. // The detailed health state of the agent.
  2503. //
  2504. // AgentHealthCode is a required field
  2505. AgentHealthCode *string `locationName:"agentHealthCode" type:"string" required:"true" enum:"AgentHealthCode"`
  2506. // The description for the agent health code.
  2507. AgentHealthDetails *string `locationName:"agentHealthDetails" type:"string"`
  2508. // The AWS account of the EC2 instance where the agent is installed.
  2509. //
  2510. // AgentId is a required field
  2511. AgentId *string `locationName:"agentId" min:"1" type:"string" required:"true"`
  2512. // The ARN of the assessment run that is associated with the agent.
  2513. //
  2514. // AssessmentRunArn is a required field
  2515. AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"`
  2516. // The Auto Scaling group of the EC2 instance that is specified by the agent
  2517. // ID.
  2518. AutoScalingGroup *string `locationName:"autoScalingGroup" min:"1" type:"string"`
  2519. // The Amazon Inspector application data metrics that are collected by the agent.
  2520. //
  2521. // TelemetryMetadata is a required field
  2522. TelemetryMetadata []*TelemetryMetadata `locationName:"telemetryMetadata" type:"list" required:"true"`
  2523. }
  2524. // String returns the string representation
  2525. func (s AssessmentRunAgent) String() string {
  2526. return awsutil.Prettify(s)
  2527. }
  2528. // GoString returns the string representation
  2529. func (s AssessmentRunAgent) GoString() string {
  2530. return s.String()
  2531. }
  2532. // Used as the request parameter in the ListAssessmentRuns action.
  2533. type AssessmentRunFilter struct {
  2534. _ struct{} `type:"structure"`
  2535. // For a record to match a filter, the value that is specified for this data
  2536. // type property must inclusively match any value between the specified minimum
  2537. // and maximum values of the completedAt property of the AssessmentRun data
  2538. // type.
  2539. CompletionTimeRange *TimestampRange `locationName:"completionTimeRange" type:"structure"`
  2540. // For a record to match a filter, the value that is specified for this data
  2541. // type property must inclusively match any value between the specified minimum
  2542. // and maximum values of the durationInSeconds property of the AssessmentRun
  2543. // data type.
  2544. DurationRange *DurationRange `locationName:"durationRange" type:"structure"`
  2545. // For a record to match a filter, an explicit value or a string containing
  2546. // a wildcard that is specified for this data type property must match the value
  2547. // of the assessmentRunName property of the AssessmentRun data type.
  2548. NamePattern *string `locationName:"namePattern" min:"1" type:"string"`
  2549. // For a record to match a filter, the value that is specified for this data
  2550. // type property must be contained in the list of values of the rulesPackages
  2551. // property of the AssessmentRun data type.
  2552. RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list"`
  2553. // For a record to match a filter, the value that is specified for this data
  2554. // type property must inclusively match any value between the specified minimum
  2555. // and maximum values of the startTime property of the AssessmentRun data type.
  2556. StartTimeRange *TimestampRange `locationName:"startTimeRange" type:"structure"`
  2557. // For a record to match a filter, the value that is specified for this data
  2558. // type property must match the stateChangedAt property of the AssessmentRun
  2559. // data type.
  2560. StateChangeTimeRange *TimestampRange `locationName:"stateChangeTimeRange" type:"structure"`
  2561. // For a record to match a filter, one of the values specified for this data
  2562. // type property must be the exact match of the value of the assessmentRunState
  2563. // property of the AssessmentRun data type.
  2564. States []*string `locationName:"states" type:"list"`
  2565. }
  2566. // String returns the string representation
  2567. func (s AssessmentRunFilter) String() string {
  2568. return awsutil.Prettify(s)
  2569. }
  2570. // GoString returns the string representation
  2571. func (s AssessmentRunFilter) GoString() string {
  2572. return s.String()
  2573. }
  2574. // Validate inspects the fields of the type to determine if they are valid.
  2575. func (s *AssessmentRunFilter) Validate() error {
  2576. invalidParams := request.ErrInvalidParams{Context: "AssessmentRunFilter"}
  2577. if s.NamePattern != nil && len(*s.NamePattern) < 1 {
  2578. invalidParams.Add(request.NewErrParamMinLen("NamePattern", 1))
  2579. }
  2580. if s.DurationRange != nil {
  2581. if err := s.DurationRange.Validate(); err != nil {
  2582. invalidParams.AddNested("DurationRange", err.(request.ErrInvalidParams))
  2583. }
  2584. }
  2585. if invalidParams.Len() > 0 {
  2586. return invalidParams
  2587. }
  2588. return nil
  2589. }
  2590. // Used as one of the elements of the AssessmentRun data type.
  2591. type AssessmentRunNotification struct {
  2592. _ struct{} `type:"structure"`
  2593. // The date of the notification.
  2594. //
  2595. // Date is a required field
  2596. Date *time.Time `locationName:"date" type:"timestamp" timestampFormat:"unix" required:"true"`
  2597. // The Boolean value that specifies whether the notification represents an error.
  2598. //
  2599. // Error is a required field
  2600. Error *bool `locationName:"error" type:"boolean" required:"true"`
  2601. // The event for which a notification is sent.
  2602. //
  2603. // Event is a required field
  2604. Event *string `locationName:"event" type:"string" required:"true" enum:"Event"`
  2605. Message *string `locationName:"message" type:"string"`
  2606. // The status code of the SNS notification.
  2607. SnsPublishStatusCode *string `locationName:"snsPublishStatusCode" type:"string" enum:"AssessmentRunNotificationSnsStatusCode"`
  2608. // The SNS topic to which the SNS notification is sent.
  2609. SnsTopicArn *string `locationName:"snsTopicArn" min:"1" type:"string"`
  2610. }
  2611. // String returns the string representation
  2612. func (s AssessmentRunNotification) String() string {
  2613. return awsutil.Prettify(s)
  2614. }
  2615. // GoString returns the string representation
  2616. func (s AssessmentRunNotification) GoString() string {
  2617. return s.String()
  2618. }
  2619. // Used as one of the elements of the AssessmentRun data type.
  2620. type AssessmentRunStateChange struct {
  2621. _ struct{} `type:"structure"`
  2622. // The assessment run state.
  2623. //
  2624. // State is a required field
  2625. State *string `locationName:"state" type:"string" required:"true" enum:"AssessmentRunState"`
  2626. // The last time the assessment run state changed.
  2627. //
  2628. // StateChangedAt is a required field
  2629. StateChangedAt *time.Time `locationName:"stateChangedAt" type:"timestamp" timestampFormat:"unix" required:"true"`
  2630. }
  2631. // String returns the string representation
  2632. func (s AssessmentRunStateChange) String() string {
  2633. return awsutil.Prettify(s)
  2634. }
  2635. // GoString returns the string representation
  2636. func (s AssessmentRunStateChange) GoString() string {
  2637. return s.String()
  2638. }
  2639. // Contains information about an Amazon Inspector application. This data type
  2640. // is used as the response element in the DescribeAssessmentTargets action.
  2641. type AssessmentTarget struct {
  2642. _ struct{} `type:"structure"`
  2643. // The ARN that specifies the Amazon Inspector assessment target.
  2644. //
  2645. // Arn is a required field
  2646. Arn *string `locationName:"arn" min:"1" type:"string" required:"true"`
  2647. // The time at which the assessment target is created.
  2648. //
  2649. // CreatedAt is a required field
  2650. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"`
  2651. // The name of the Amazon Inspector assessment target.
  2652. //
  2653. // Name is a required field
  2654. Name *string `locationName:"name" min:"1" type:"string" required:"true"`
  2655. // The ARN that specifies the resource group that is associated with the assessment
  2656. // target.
  2657. //
  2658. // ResourceGroupArn is a required field
  2659. ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string" required:"true"`
  2660. // The time at which UpdateAssessmentTarget is called.
  2661. //
  2662. // UpdatedAt is a required field
  2663. UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"unix" required:"true"`
  2664. }
  2665. // String returns the string representation
  2666. func (s AssessmentTarget) String() string {
  2667. return awsutil.Prettify(s)
  2668. }
  2669. // GoString returns the string representation
  2670. func (s AssessmentTarget) GoString() string {
  2671. return s.String()
  2672. }
  2673. // Used as the request parameter in the ListAssessmentTargets action.
  2674. type AssessmentTargetFilter struct {
  2675. _ struct{} `type:"structure"`
  2676. // For a record to match a filter, an explicit value or a string that contains
  2677. // a wildcard that is specified for this data type property must match the value
  2678. // of the assessmentTargetName property of the AssessmentTarget data type.
  2679. AssessmentTargetNamePattern *string `locationName:"assessmentTargetNamePattern" min:"1" type:"string"`
  2680. }
  2681. // String returns the string representation
  2682. func (s AssessmentTargetFilter) String() string {
  2683. return awsutil.Prettify(s)
  2684. }
  2685. // GoString returns the string representation
  2686. func (s AssessmentTargetFilter) GoString() string {
  2687. return s.String()
  2688. }
  2689. // Validate inspects the fields of the type to determine if they are valid.
  2690. func (s *AssessmentTargetFilter) Validate() error {
  2691. invalidParams := request.ErrInvalidParams{Context: "AssessmentTargetFilter"}
  2692. if s.AssessmentTargetNamePattern != nil && len(*s.AssessmentTargetNamePattern) < 1 {
  2693. invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetNamePattern", 1))
  2694. }
  2695. if invalidParams.Len() > 0 {
  2696. return invalidParams
  2697. }
  2698. return nil
  2699. }
  2700. // Contains information about an Amazon Inspector assessment template. This
  2701. // data type is used as the response element in the DescribeAssessmentTemplates
  2702. // action.
  2703. type AssessmentTemplate struct {
  2704. _ struct{} `type:"structure"`
  2705. // The ARN of the assessment template.
  2706. //
  2707. // Arn is a required field
  2708. Arn *string `locationName:"arn" min:"1" type:"string" required:"true"`
  2709. // The ARN of the assessment target that corresponds to this assessment template.
  2710. //
  2711. // AssessmentTargetArn is a required field
  2712. AssessmentTargetArn *string `locationName:"assessmentTargetArn" min:"1" type:"string" required:"true"`
  2713. // The time at which the assessment template is created.
  2714. //
  2715. // CreatedAt is a required field
  2716. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"`
  2717. // The duration in seconds specified for this assessment tempate. The default
  2718. // value is 3600 seconds (one hour). The maximum value is 86400 seconds (one
  2719. // day).
  2720. //
  2721. // DurationInSeconds is a required field
  2722. DurationInSeconds *int64 `locationName:"durationInSeconds" min:"180" type:"integer" required:"true"`
  2723. // The name of the assessment template.
  2724. //
  2725. // Name is a required field
  2726. Name *string `locationName:"name" min:"1" type:"string" required:"true"`
  2727. // The rules packages that are specified for this assessment template.
  2728. //
  2729. // RulesPackageArns is a required field
  2730. RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list" required:"true"`
  2731. // The user-defined attributes that are assigned to every generated finding
  2732. // from the assessment run that uses this assessment template.
  2733. //
  2734. // UserAttributesForFindings is a required field
  2735. UserAttributesForFindings []*Attribute `locationName:"userAttributesForFindings" type:"list" required:"true"`
  2736. }
  2737. // String returns the string representation
  2738. func (s AssessmentTemplate) String() string {
  2739. return awsutil.Prettify(s)
  2740. }
  2741. // GoString returns the string representation
  2742. func (s AssessmentTemplate) GoString() string {
  2743. return s.String()
  2744. }
  2745. // Used as the request parameter in the ListAssessmentTemplates action.
  2746. type AssessmentTemplateFilter struct {
  2747. _ struct{} `type:"structure"`
  2748. // For a record to match a filter, the value specified for this data type property
  2749. // must inclusively match any value between the specified minimum and maximum
  2750. // values of the durationInSeconds property of the AssessmentTemplate data type.
  2751. DurationRange *DurationRange `locationName:"durationRange" type:"structure"`
  2752. // For a record to match a filter, an explicit value or a string that contains
  2753. // a wildcard that is specified for this data type property must match the value
  2754. // of the assessmentTemplateName property of the AssessmentTemplate data type.
  2755. NamePattern *string `locationName:"namePattern" min:"1" type:"string"`
  2756. // For a record to match a filter, the values that are specified for this data
  2757. // type property must be contained in the list of values of the rulesPackageArns
  2758. // property of the AssessmentTemplate data type.
  2759. RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list"`
  2760. }
  2761. // String returns the string representation
  2762. func (s AssessmentTemplateFilter) String() string {
  2763. return awsutil.Prettify(s)
  2764. }
  2765. // GoString returns the string representation
  2766. func (s AssessmentTemplateFilter) GoString() string {
  2767. return s.String()
  2768. }
  2769. // Validate inspects the fields of the type to determine if they are valid.
  2770. func (s *AssessmentTemplateFilter) Validate() error {
  2771. invalidParams := request.ErrInvalidParams{Context: "AssessmentTemplateFilter"}
  2772. if s.NamePattern != nil && len(*s.NamePattern) < 1 {
  2773. invalidParams.Add(request.NewErrParamMinLen("NamePattern", 1))
  2774. }
  2775. if s.DurationRange != nil {
  2776. if err := s.DurationRange.Validate(); err != nil {
  2777. invalidParams.AddNested("DurationRange", err.(request.ErrInvalidParams))
  2778. }
  2779. }
  2780. if invalidParams.Len() > 0 {
  2781. return invalidParams
  2782. }
  2783. return nil
  2784. }
  2785. // A collection of attributes of the host from which the finding is generated.
  2786. type AssetAttributes struct {
  2787. _ struct{} `type:"structure"`
  2788. // The ID of the agent that is installed on the EC2 instance where the finding
  2789. // is generated.
  2790. AgentId *string `locationName:"agentId" min:"1" type:"string"`
  2791. // The ID of the Amazon Machine Image (AMI) that is installed on the EC2 instance
  2792. // where the finding is generated.
  2793. AmiId *string `locationName:"amiId" type:"string"`
  2794. // The Auto Scaling group of the EC2 instance where the finding is generated.
  2795. AutoScalingGroup *string `locationName:"autoScalingGroup" min:"1" type:"string"`
  2796. // The hostname of the EC2 instance where the finding is generated.
  2797. Hostname *string `locationName:"hostname" type:"string"`
  2798. // The list of IP v4 addresses of the EC2 instance where the finding is generated.
  2799. Ipv4Addresses []*string `locationName:"ipv4Addresses" type:"list"`
  2800. // The schema version of this data type.
  2801. //
  2802. // SchemaVersion is a required field
  2803. SchemaVersion *int64 `locationName:"schemaVersion" type:"integer" required:"true"`
  2804. }
  2805. // String returns the string representation
  2806. func (s AssetAttributes) String() string {
  2807. return awsutil.Prettify(s)
  2808. }
  2809. // GoString returns the string representation
  2810. func (s AssetAttributes) GoString() string {
  2811. return s.String()
  2812. }
  2813. // This data type is used as a request parameter in the AddAttributesToFindings
  2814. // and CreateAssessmentTemplate actions.
  2815. type Attribute struct {
  2816. _ struct{} `type:"structure"`
  2817. // The attribute key.
  2818. //
  2819. // Key is a required field
  2820. Key *string `locationName:"key" min:"1" type:"string" required:"true"`
  2821. // The value assigned to the attribute key.
  2822. Value *string `locationName:"value" min:"1" type:"string"`
  2823. }
  2824. // String returns the string representation
  2825. func (s Attribute) String() string {
  2826. return awsutil.Prettify(s)
  2827. }
  2828. // GoString returns the string representation
  2829. func (s Attribute) GoString() string {
  2830. return s.String()
  2831. }
  2832. // Validate inspects the fields of the type to determine if they are valid.
  2833. func (s *Attribute) Validate() error {
  2834. invalidParams := request.ErrInvalidParams{Context: "Attribute"}
  2835. if s.Key == nil {
  2836. invalidParams.Add(request.NewErrParamRequired("Key"))
  2837. }
  2838. if s.Key != nil && len(*s.Key) < 1 {
  2839. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  2840. }
  2841. if s.Value != nil && len(*s.Value) < 1 {
  2842. invalidParams.Add(request.NewErrParamMinLen("Value", 1))
  2843. }
  2844. if invalidParams.Len() > 0 {
  2845. return invalidParams
  2846. }
  2847. return nil
  2848. }
  2849. type CreateAssessmentTargetInput struct {
  2850. _ struct{} `type:"structure"`
  2851. // The user-defined name that identifies the assessment target that you want
  2852. // to create. The name must be unique within the AWS account.
  2853. //
  2854. // AssessmentTargetName is a required field
  2855. AssessmentTargetName *string `locationName:"assessmentTargetName" min:"1" type:"string" required:"true"`
  2856. // The ARN that specifies the resource group that is used to create the assessment
  2857. // target.
  2858. //
  2859. // ResourceGroupArn is a required field
  2860. ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string" required:"true"`
  2861. }
  2862. // String returns the string representation
  2863. func (s CreateAssessmentTargetInput) String() string {
  2864. return awsutil.Prettify(s)
  2865. }
  2866. // GoString returns the string representation
  2867. func (s CreateAssessmentTargetInput) GoString() string {
  2868. return s.String()
  2869. }
  2870. // Validate inspects the fields of the type to determine if they are valid.
  2871. func (s *CreateAssessmentTargetInput) Validate() error {
  2872. invalidParams := request.ErrInvalidParams{Context: "CreateAssessmentTargetInput"}
  2873. if s.AssessmentTargetName == nil {
  2874. invalidParams.Add(request.NewErrParamRequired("AssessmentTargetName"))
  2875. }
  2876. if s.AssessmentTargetName != nil && len(*s.AssessmentTargetName) < 1 {
  2877. invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetName", 1))
  2878. }
  2879. if s.ResourceGroupArn == nil {
  2880. invalidParams.Add(request.NewErrParamRequired("ResourceGroupArn"))
  2881. }
  2882. if s.ResourceGroupArn != nil && len(*s.ResourceGroupArn) < 1 {
  2883. invalidParams.Add(request.NewErrParamMinLen("ResourceGroupArn", 1))
  2884. }
  2885. if invalidParams.Len() > 0 {
  2886. return invalidParams
  2887. }
  2888. return nil
  2889. }
  2890. type CreateAssessmentTargetOutput struct {
  2891. _ struct{} `type:"structure"`
  2892. // The ARN that specifies the assessment target that is created.
  2893. //
  2894. // AssessmentTargetArn is a required field
  2895. AssessmentTargetArn *string `locationName:"assessmentTargetArn" min:"1" type:"string" required:"true"`
  2896. }
  2897. // String returns the string representation
  2898. func (s CreateAssessmentTargetOutput) String() string {
  2899. return awsutil.Prettify(s)
  2900. }
  2901. // GoString returns the string representation
  2902. func (s CreateAssessmentTargetOutput) GoString() string {
  2903. return s.String()
  2904. }
  2905. type CreateAssessmentTemplateInput struct {
  2906. _ struct{} `type:"structure"`
  2907. // The ARN that specifies the assessment target for which you want to create
  2908. // the assessment template.
  2909. //
  2910. // AssessmentTargetArn is a required field
  2911. AssessmentTargetArn *string `locationName:"assessmentTargetArn" min:"1" type:"string" required:"true"`
  2912. // The user-defined name that identifies the assessment template that you want
  2913. // to create. You can create several assessment templates for an assessment
  2914. // target. The names of the assessment templates that correspond to a particular
  2915. // assessment target must be unique.
  2916. //
  2917. // AssessmentTemplateName is a required field
  2918. AssessmentTemplateName *string `locationName:"assessmentTemplateName" min:"1" type:"string" required:"true"`
  2919. // The duration of the assessment run in seconds. The default value is 3600
  2920. // seconds (one hour).
  2921. //
  2922. // DurationInSeconds is a required field
  2923. DurationInSeconds *int64 `locationName:"durationInSeconds" min:"180" type:"integer" required:"true"`
  2924. // The ARNs that specify the rules packages that you want to attach to the assessment
  2925. // template.
  2926. //
  2927. // RulesPackageArns is a required field
  2928. RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list" required:"true"`
  2929. // The user-defined attributes that are assigned to every finding that is generated
  2930. // by the assessment run that uses this assessment template.
  2931. UserAttributesForFindings []*Attribute `locationName:"userAttributesForFindings" type:"list"`
  2932. }
  2933. // String returns the string representation
  2934. func (s CreateAssessmentTemplateInput) String() string {
  2935. return awsutil.Prettify(s)
  2936. }
  2937. // GoString returns the string representation
  2938. func (s CreateAssessmentTemplateInput) GoString() string {
  2939. return s.String()
  2940. }
  2941. // Validate inspects the fields of the type to determine if they are valid.
  2942. func (s *CreateAssessmentTemplateInput) Validate() error {
  2943. invalidParams := request.ErrInvalidParams{Context: "CreateAssessmentTemplateInput"}
  2944. if s.AssessmentTargetArn == nil {
  2945. invalidParams.Add(request.NewErrParamRequired("AssessmentTargetArn"))
  2946. }
  2947. if s.AssessmentTargetArn != nil && len(*s.AssessmentTargetArn) < 1 {
  2948. invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetArn", 1))
  2949. }
  2950. if s.AssessmentTemplateName == nil {
  2951. invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateName"))
  2952. }
  2953. if s.AssessmentTemplateName != nil && len(*s.AssessmentTemplateName) < 1 {
  2954. invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateName", 1))
  2955. }
  2956. if s.DurationInSeconds == nil {
  2957. invalidParams.Add(request.NewErrParamRequired("DurationInSeconds"))
  2958. }
  2959. if s.DurationInSeconds != nil && *s.DurationInSeconds < 180 {
  2960. invalidParams.Add(request.NewErrParamMinValue("DurationInSeconds", 180))
  2961. }
  2962. if s.RulesPackageArns == nil {
  2963. invalidParams.Add(request.NewErrParamRequired("RulesPackageArns"))
  2964. }
  2965. if s.UserAttributesForFindings != nil {
  2966. for i, v := range s.UserAttributesForFindings {
  2967. if v == nil {
  2968. continue
  2969. }
  2970. if err := v.Validate(); err != nil {
  2971. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "UserAttributesForFindings", i), err.(request.ErrInvalidParams))
  2972. }
  2973. }
  2974. }
  2975. if invalidParams.Len() > 0 {
  2976. return invalidParams
  2977. }
  2978. return nil
  2979. }
  2980. type CreateAssessmentTemplateOutput struct {
  2981. _ struct{} `type:"structure"`
  2982. // The ARN that specifies the assessment template that is created.
  2983. //
  2984. // AssessmentTemplateArn is a required field
  2985. AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"`
  2986. }
  2987. // String returns the string representation
  2988. func (s CreateAssessmentTemplateOutput) String() string {
  2989. return awsutil.Prettify(s)
  2990. }
  2991. // GoString returns the string representation
  2992. func (s CreateAssessmentTemplateOutput) GoString() string {
  2993. return s.String()
  2994. }
  2995. type CreateResourceGroupInput struct {
  2996. _ struct{} `type:"structure"`
  2997. // A collection of keys and an array of possible values, '[{"key":"key1","values":["Value1","Value2"]},{"key":"Key2","values":["Value3"]}]'.
  2998. //
  2999. // For example,'[{"key":"Name","values":["TestEC2Instance"]}]'.
  3000. //
  3001. // ResourceGroupTags is a required field
  3002. ResourceGroupTags []*ResourceGroupTag `locationName:"resourceGroupTags" min:"1" type:"list" required:"true"`
  3003. }
  3004. // String returns the string representation
  3005. func (s CreateResourceGroupInput) String() string {
  3006. return awsutil.Prettify(s)
  3007. }
  3008. // GoString returns the string representation
  3009. func (s CreateResourceGroupInput) GoString() string {
  3010. return s.String()
  3011. }
  3012. // Validate inspects the fields of the type to determine if they are valid.
  3013. func (s *CreateResourceGroupInput) Validate() error {
  3014. invalidParams := request.ErrInvalidParams{Context: "CreateResourceGroupInput"}
  3015. if s.ResourceGroupTags == nil {
  3016. invalidParams.Add(request.NewErrParamRequired("ResourceGroupTags"))
  3017. }
  3018. if s.ResourceGroupTags != nil && len(s.ResourceGroupTags) < 1 {
  3019. invalidParams.Add(request.NewErrParamMinLen("ResourceGroupTags", 1))
  3020. }
  3021. if s.ResourceGroupTags != nil {
  3022. for i, v := range s.ResourceGroupTags {
  3023. if v == nil {
  3024. continue
  3025. }
  3026. if err := v.Validate(); err != nil {
  3027. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceGroupTags", i), err.(request.ErrInvalidParams))
  3028. }
  3029. }
  3030. }
  3031. if invalidParams.Len() > 0 {
  3032. return invalidParams
  3033. }
  3034. return nil
  3035. }
  3036. type CreateResourceGroupOutput struct {
  3037. _ struct{} `type:"structure"`
  3038. // The ARN that specifies the resource group that is created.
  3039. //
  3040. // ResourceGroupArn is a required field
  3041. ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string" required:"true"`
  3042. }
  3043. // String returns the string representation
  3044. func (s CreateResourceGroupOutput) String() string {
  3045. return awsutil.Prettify(s)
  3046. }
  3047. // GoString returns the string representation
  3048. func (s CreateResourceGroupOutput) GoString() string {
  3049. return s.String()
  3050. }
  3051. type DeleteAssessmentRunInput struct {
  3052. _ struct{} `type:"structure"`
  3053. // The ARN that specifies the assessment run that you want to delete.
  3054. //
  3055. // AssessmentRunArn is a required field
  3056. AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"`
  3057. }
  3058. // String returns the string representation
  3059. func (s DeleteAssessmentRunInput) String() string {
  3060. return awsutil.Prettify(s)
  3061. }
  3062. // GoString returns the string representation
  3063. func (s DeleteAssessmentRunInput) GoString() string {
  3064. return s.String()
  3065. }
  3066. // Validate inspects the fields of the type to determine if they are valid.
  3067. func (s *DeleteAssessmentRunInput) Validate() error {
  3068. invalidParams := request.ErrInvalidParams{Context: "DeleteAssessmentRunInput"}
  3069. if s.AssessmentRunArn == nil {
  3070. invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn"))
  3071. }
  3072. if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 {
  3073. invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1))
  3074. }
  3075. if invalidParams.Len() > 0 {
  3076. return invalidParams
  3077. }
  3078. return nil
  3079. }
  3080. type DeleteAssessmentRunOutput struct {
  3081. _ struct{} `type:"structure"`
  3082. }
  3083. // String returns the string representation
  3084. func (s DeleteAssessmentRunOutput) String() string {
  3085. return awsutil.Prettify(s)
  3086. }
  3087. // GoString returns the string representation
  3088. func (s DeleteAssessmentRunOutput) GoString() string {
  3089. return s.String()
  3090. }
  3091. type DeleteAssessmentTargetInput struct {
  3092. _ struct{} `type:"structure"`
  3093. // The ARN that specifies the assessment target that you want to delete.
  3094. //
  3095. // AssessmentTargetArn is a required field
  3096. AssessmentTargetArn *string `locationName:"assessmentTargetArn" min:"1" type:"string" required:"true"`
  3097. }
  3098. // String returns the string representation
  3099. func (s DeleteAssessmentTargetInput) String() string {
  3100. return awsutil.Prettify(s)
  3101. }
  3102. // GoString returns the string representation
  3103. func (s DeleteAssessmentTargetInput) GoString() string {
  3104. return s.String()
  3105. }
  3106. // Validate inspects the fields of the type to determine if they are valid.
  3107. func (s *DeleteAssessmentTargetInput) Validate() error {
  3108. invalidParams := request.ErrInvalidParams{Context: "DeleteAssessmentTargetInput"}
  3109. if s.AssessmentTargetArn == nil {
  3110. invalidParams.Add(request.NewErrParamRequired("AssessmentTargetArn"))
  3111. }
  3112. if s.AssessmentTargetArn != nil && len(*s.AssessmentTargetArn) < 1 {
  3113. invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetArn", 1))
  3114. }
  3115. if invalidParams.Len() > 0 {
  3116. return invalidParams
  3117. }
  3118. return nil
  3119. }
  3120. type DeleteAssessmentTargetOutput struct {
  3121. _ struct{} `type:"structure"`
  3122. }
  3123. // String returns the string representation
  3124. func (s DeleteAssessmentTargetOutput) String() string {
  3125. return awsutil.Prettify(s)
  3126. }
  3127. // GoString returns the string representation
  3128. func (s DeleteAssessmentTargetOutput) GoString() string {
  3129. return s.String()
  3130. }
  3131. type DeleteAssessmentTemplateInput struct {
  3132. _ struct{} `type:"structure"`
  3133. // The ARN that specifies the assessment template that you want to delete.
  3134. //
  3135. // AssessmentTemplateArn is a required field
  3136. AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"`
  3137. }
  3138. // String returns the string representation
  3139. func (s DeleteAssessmentTemplateInput) String() string {
  3140. return awsutil.Prettify(s)
  3141. }
  3142. // GoString returns the string representation
  3143. func (s DeleteAssessmentTemplateInput) GoString() string {
  3144. return s.String()
  3145. }
  3146. // Validate inspects the fields of the type to determine if they are valid.
  3147. func (s *DeleteAssessmentTemplateInput) Validate() error {
  3148. invalidParams := request.ErrInvalidParams{Context: "DeleteAssessmentTemplateInput"}
  3149. if s.AssessmentTemplateArn == nil {
  3150. invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateArn"))
  3151. }
  3152. if s.AssessmentTemplateArn != nil && len(*s.AssessmentTemplateArn) < 1 {
  3153. invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateArn", 1))
  3154. }
  3155. if invalidParams.Len() > 0 {
  3156. return invalidParams
  3157. }
  3158. return nil
  3159. }
  3160. type DeleteAssessmentTemplateOutput struct {
  3161. _ struct{} `type:"structure"`
  3162. }
  3163. // String returns the string representation
  3164. func (s DeleteAssessmentTemplateOutput) String() string {
  3165. return awsutil.Prettify(s)
  3166. }
  3167. // GoString returns the string representation
  3168. func (s DeleteAssessmentTemplateOutput) GoString() string {
  3169. return s.String()
  3170. }
  3171. type DescribeAssessmentRunsInput struct {
  3172. _ struct{} `type:"structure"`
  3173. // The ARN that specifies the assessment run that you want to describe.
  3174. //
  3175. // AssessmentRunArns is a required field
  3176. AssessmentRunArns []*string `locationName:"assessmentRunArns" min:"1" type:"list" required:"true"`
  3177. }
  3178. // String returns the string representation
  3179. func (s DescribeAssessmentRunsInput) String() string {
  3180. return awsutil.Prettify(s)
  3181. }
  3182. // GoString returns the string representation
  3183. func (s DescribeAssessmentRunsInput) GoString() string {
  3184. return s.String()
  3185. }
  3186. // Validate inspects the fields of the type to determine if they are valid.
  3187. func (s *DescribeAssessmentRunsInput) Validate() error {
  3188. invalidParams := request.ErrInvalidParams{Context: "DescribeAssessmentRunsInput"}
  3189. if s.AssessmentRunArns == nil {
  3190. invalidParams.Add(request.NewErrParamRequired("AssessmentRunArns"))
  3191. }
  3192. if s.AssessmentRunArns != nil && len(s.AssessmentRunArns) < 1 {
  3193. invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArns", 1))
  3194. }
  3195. if invalidParams.Len() > 0 {
  3196. return invalidParams
  3197. }
  3198. return nil
  3199. }
  3200. type DescribeAssessmentRunsOutput struct {
  3201. _ struct{} `type:"structure"`
  3202. // Information about the assessment run.
  3203. //
  3204. // AssessmentRuns is a required field
  3205. AssessmentRuns []*AssessmentRun `locationName:"assessmentRuns" type:"list" required:"true"`
  3206. // Assessment run details that cannot be described. An error code is provided
  3207. // for each failed item.
  3208. //
  3209. // FailedItems is a required field
  3210. FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"`
  3211. }
  3212. // String returns the string representation
  3213. func (s DescribeAssessmentRunsOutput) String() string {
  3214. return awsutil.Prettify(s)
  3215. }
  3216. // GoString returns the string representation
  3217. func (s DescribeAssessmentRunsOutput) GoString() string {
  3218. return s.String()
  3219. }
  3220. type DescribeAssessmentTargetsInput struct {
  3221. _ struct{} `type:"structure"`
  3222. // The ARNs that specifies the assessment targets that you want to describe.
  3223. //
  3224. // AssessmentTargetArns is a required field
  3225. AssessmentTargetArns []*string `locationName:"assessmentTargetArns" min:"1" type:"list" required:"true"`
  3226. }
  3227. // String returns the string representation
  3228. func (s DescribeAssessmentTargetsInput) String() string {
  3229. return awsutil.Prettify(s)
  3230. }
  3231. // GoString returns the string representation
  3232. func (s DescribeAssessmentTargetsInput) GoString() string {
  3233. return s.String()
  3234. }
  3235. // Validate inspects the fields of the type to determine if they are valid.
  3236. func (s *DescribeAssessmentTargetsInput) Validate() error {
  3237. invalidParams := request.ErrInvalidParams{Context: "DescribeAssessmentTargetsInput"}
  3238. if s.AssessmentTargetArns == nil {
  3239. invalidParams.Add(request.NewErrParamRequired("AssessmentTargetArns"))
  3240. }
  3241. if s.AssessmentTargetArns != nil && len(s.AssessmentTargetArns) < 1 {
  3242. invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetArns", 1))
  3243. }
  3244. if invalidParams.Len() > 0 {
  3245. return invalidParams
  3246. }
  3247. return nil
  3248. }
  3249. type DescribeAssessmentTargetsOutput struct {
  3250. _ struct{} `type:"structure"`
  3251. // Information about the assessment targets.
  3252. //
  3253. // AssessmentTargets is a required field
  3254. AssessmentTargets []*AssessmentTarget `locationName:"assessmentTargets" type:"list" required:"true"`
  3255. // Assessment target details that cannot be described. An error code is provided
  3256. // for each failed item.
  3257. //
  3258. // FailedItems is a required field
  3259. FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"`
  3260. }
  3261. // String returns the string representation
  3262. func (s DescribeAssessmentTargetsOutput) String() string {
  3263. return awsutil.Prettify(s)
  3264. }
  3265. // GoString returns the string representation
  3266. func (s DescribeAssessmentTargetsOutput) GoString() string {
  3267. return s.String()
  3268. }
  3269. type DescribeAssessmentTemplatesInput struct {
  3270. _ struct{} `type:"structure"`
  3271. // The ARN that specifiesthe assessment templates that you want to describe.
  3272. //
  3273. // AssessmentTemplateArns is a required field
  3274. AssessmentTemplateArns []*string `locationName:"assessmentTemplateArns" min:"1" type:"list" required:"true"`
  3275. }
  3276. // String returns the string representation
  3277. func (s DescribeAssessmentTemplatesInput) String() string {
  3278. return awsutil.Prettify(s)
  3279. }
  3280. // GoString returns the string representation
  3281. func (s DescribeAssessmentTemplatesInput) GoString() string {
  3282. return s.String()
  3283. }
  3284. // Validate inspects the fields of the type to determine if they are valid.
  3285. func (s *DescribeAssessmentTemplatesInput) Validate() error {
  3286. invalidParams := request.ErrInvalidParams{Context: "DescribeAssessmentTemplatesInput"}
  3287. if s.AssessmentTemplateArns == nil {
  3288. invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateArns"))
  3289. }
  3290. if s.AssessmentTemplateArns != nil && len(s.AssessmentTemplateArns) < 1 {
  3291. invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateArns", 1))
  3292. }
  3293. if invalidParams.Len() > 0 {
  3294. return invalidParams
  3295. }
  3296. return nil
  3297. }
  3298. type DescribeAssessmentTemplatesOutput struct {
  3299. _ struct{} `type:"structure"`
  3300. // Information about the assessment templates.
  3301. //
  3302. // AssessmentTemplates is a required field
  3303. AssessmentTemplates []*AssessmentTemplate `locationName:"assessmentTemplates" type:"list" required:"true"`
  3304. // Assessment template details that cannot be described. An error code is provided
  3305. // for each failed item.
  3306. //
  3307. // FailedItems is a required field
  3308. FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"`
  3309. }
  3310. // String returns the string representation
  3311. func (s DescribeAssessmentTemplatesOutput) String() string {
  3312. return awsutil.Prettify(s)
  3313. }
  3314. // GoString returns the string representation
  3315. func (s DescribeAssessmentTemplatesOutput) GoString() string {
  3316. return s.String()
  3317. }
  3318. type DescribeCrossAccountAccessRoleInput struct {
  3319. _ struct{} `type:"structure"`
  3320. }
  3321. // String returns the string representation
  3322. func (s DescribeCrossAccountAccessRoleInput) String() string {
  3323. return awsutil.Prettify(s)
  3324. }
  3325. // GoString returns the string representation
  3326. func (s DescribeCrossAccountAccessRoleInput) GoString() string {
  3327. return s.String()
  3328. }
  3329. type DescribeCrossAccountAccessRoleOutput struct {
  3330. _ struct{} `type:"structure"`
  3331. // The date when the cross-account access role was registered.
  3332. //
  3333. // RegisteredAt is a required field
  3334. RegisteredAt *time.Time `locationName:"registeredAt" type:"timestamp" timestampFormat:"unix" required:"true"`
  3335. // The ARN that specifies the IAM role that Amazon Inspector uses to access
  3336. // your AWS account.
  3337. //
  3338. // RoleArn is a required field
  3339. RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"`
  3340. // A Boolean value that specifies whether the IAM role has the necessary policies
  3341. // attached to enable Amazon Inspector to access your AWS account.
  3342. //
  3343. // Valid is a required field
  3344. Valid *bool `locationName:"valid" type:"boolean" required:"true"`
  3345. }
  3346. // String returns the string representation
  3347. func (s DescribeCrossAccountAccessRoleOutput) String() string {
  3348. return awsutil.Prettify(s)
  3349. }
  3350. // GoString returns the string representation
  3351. func (s DescribeCrossAccountAccessRoleOutput) GoString() string {
  3352. return s.String()
  3353. }
  3354. type DescribeFindingsInput struct {
  3355. _ struct{} `type:"structure"`
  3356. // The ARN that specifies the finding that you want to describe.
  3357. //
  3358. // FindingArns is a required field
  3359. FindingArns []*string `locationName:"findingArns" min:"1" type:"list" required:"true"`
  3360. // The locale into which you want to translate a finding description, recommendation,
  3361. // and the short description that identifies the finding.
  3362. Locale *string `locationName:"locale" type:"string" enum:"Locale"`
  3363. }
  3364. // String returns the string representation
  3365. func (s DescribeFindingsInput) String() string {
  3366. return awsutil.Prettify(s)
  3367. }
  3368. // GoString returns the string representation
  3369. func (s DescribeFindingsInput) GoString() string {
  3370. return s.String()
  3371. }
  3372. // Validate inspects the fields of the type to determine if they are valid.
  3373. func (s *DescribeFindingsInput) Validate() error {
  3374. invalidParams := request.ErrInvalidParams{Context: "DescribeFindingsInput"}
  3375. if s.FindingArns == nil {
  3376. invalidParams.Add(request.NewErrParamRequired("FindingArns"))
  3377. }
  3378. if s.FindingArns != nil && len(s.FindingArns) < 1 {
  3379. invalidParams.Add(request.NewErrParamMinLen("FindingArns", 1))
  3380. }
  3381. if invalidParams.Len() > 0 {
  3382. return invalidParams
  3383. }
  3384. return nil
  3385. }
  3386. type DescribeFindingsOutput struct {
  3387. _ struct{} `type:"structure"`
  3388. // Finding details that cannot be described. An error code is provided for each
  3389. // failed item.
  3390. //
  3391. // FailedItems is a required field
  3392. FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"`
  3393. // Information about the finding.
  3394. //
  3395. // Findings is a required field
  3396. Findings []*Finding `locationName:"findings" type:"list" required:"true"`
  3397. }
  3398. // String returns the string representation
  3399. func (s DescribeFindingsOutput) String() string {
  3400. return awsutil.Prettify(s)
  3401. }
  3402. // GoString returns the string representation
  3403. func (s DescribeFindingsOutput) GoString() string {
  3404. return s.String()
  3405. }
  3406. type DescribeResourceGroupsInput struct {
  3407. _ struct{} `type:"structure"`
  3408. // The ARN that specifies the resource group that you want to describe.
  3409. //
  3410. // ResourceGroupArns is a required field
  3411. ResourceGroupArns []*string `locationName:"resourceGroupArns" min:"1" type:"list" required:"true"`
  3412. }
  3413. // String returns the string representation
  3414. func (s DescribeResourceGroupsInput) String() string {
  3415. return awsutil.Prettify(s)
  3416. }
  3417. // GoString returns the string representation
  3418. func (s DescribeResourceGroupsInput) GoString() string {
  3419. return s.String()
  3420. }
  3421. // Validate inspects the fields of the type to determine if they are valid.
  3422. func (s *DescribeResourceGroupsInput) Validate() error {
  3423. invalidParams := request.ErrInvalidParams{Context: "DescribeResourceGroupsInput"}
  3424. if s.ResourceGroupArns == nil {
  3425. invalidParams.Add(request.NewErrParamRequired("ResourceGroupArns"))
  3426. }
  3427. if s.ResourceGroupArns != nil && len(s.ResourceGroupArns) < 1 {
  3428. invalidParams.Add(request.NewErrParamMinLen("ResourceGroupArns", 1))
  3429. }
  3430. if invalidParams.Len() > 0 {
  3431. return invalidParams
  3432. }
  3433. return nil
  3434. }
  3435. type DescribeResourceGroupsOutput struct {
  3436. _ struct{} `type:"structure"`
  3437. // Resource group details that cannot be described. An error code is provided
  3438. // for each failed item.
  3439. //
  3440. // FailedItems is a required field
  3441. FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"`
  3442. // Information about a resource group.
  3443. //
  3444. // ResourceGroups is a required field
  3445. ResourceGroups []*ResourceGroup `locationName:"resourceGroups" type:"list" required:"true"`
  3446. }
  3447. // String returns the string representation
  3448. func (s DescribeResourceGroupsOutput) String() string {
  3449. return awsutil.Prettify(s)
  3450. }
  3451. // GoString returns the string representation
  3452. func (s DescribeResourceGroupsOutput) GoString() string {
  3453. return s.String()
  3454. }
  3455. type DescribeRulesPackagesInput struct {
  3456. _ struct{} `type:"structure"`
  3457. // The locale that you want to translate a rules package description into.
  3458. Locale *string `locationName:"locale" type:"string" enum:"Locale"`
  3459. // The ARN that specifies the rules package that you want to describe.
  3460. //
  3461. // RulesPackageArns is a required field
  3462. RulesPackageArns []*string `locationName:"rulesPackageArns" min:"1" type:"list" required:"true"`
  3463. }
  3464. // String returns the string representation
  3465. func (s DescribeRulesPackagesInput) String() string {
  3466. return awsutil.Prettify(s)
  3467. }
  3468. // GoString returns the string representation
  3469. func (s DescribeRulesPackagesInput) GoString() string {
  3470. return s.String()
  3471. }
  3472. // Validate inspects the fields of the type to determine if they are valid.
  3473. func (s *DescribeRulesPackagesInput) Validate() error {
  3474. invalidParams := request.ErrInvalidParams{Context: "DescribeRulesPackagesInput"}
  3475. if s.RulesPackageArns == nil {
  3476. invalidParams.Add(request.NewErrParamRequired("RulesPackageArns"))
  3477. }
  3478. if s.RulesPackageArns != nil && len(s.RulesPackageArns) < 1 {
  3479. invalidParams.Add(request.NewErrParamMinLen("RulesPackageArns", 1))
  3480. }
  3481. if invalidParams.Len() > 0 {
  3482. return invalidParams
  3483. }
  3484. return nil
  3485. }
  3486. type DescribeRulesPackagesOutput struct {
  3487. _ struct{} `type:"structure"`
  3488. // Rules package details that cannot be described. An error code is provided
  3489. // for each failed item.
  3490. //
  3491. // FailedItems is a required field
  3492. FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"`
  3493. // Information about the rules package.
  3494. //
  3495. // RulesPackages is a required field
  3496. RulesPackages []*RulesPackage `locationName:"rulesPackages" type:"list" required:"true"`
  3497. }
  3498. // String returns the string representation
  3499. func (s DescribeRulesPackagesOutput) String() string {
  3500. return awsutil.Prettify(s)
  3501. }
  3502. // GoString returns the string representation
  3503. func (s DescribeRulesPackagesOutput) GoString() string {
  3504. return s.String()
  3505. }
  3506. // This data type is used in the AssessmentTemplateFilter data type.
  3507. type DurationRange struct {
  3508. _ struct{} `type:"structure"`
  3509. // The maximum value of the duration range. Must be less than or equal to 604800
  3510. // seconds (1 week).
  3511. MaxSeconds *int64 `locationName:"maxSeconds" min:"180" type:"integer"`
  3512. // The minimum value of the duration range. Must be greater than zero.
  3513. MinSeconds *int64 `locationName:"minSeconds" min:"180" type:"integer"`
  3514. }
  3515. // String returns the string representation
  3516. func (s DurationRange) String() string {
  3517. return awsutil.Prettify(s)
  3518. }
  3519. // GoString returns the string representation
  3520. func (s DurationRange) GoString() string {
  3521. return s.String()
  3522. }
  3523. // Validate inspects the fields of the type to determine if they are valid.
  3524. func (s *DurationRange) Validate() error {
  3525. invalidParams := request.ErrInvalidParams{Context: "DurationRange"}
  3526. if s.MaxSeconds != nil && *s.MaxSeconds < 180 {
  3527. invalidParams.Add(request.NewErrParamMinValue("MaxSeconds", 180))
  3528. }
  3529. if s.MinSeconds != nil && *s.MinSeconds < 180 {
  3530. invalidParams.Add(request.NewErrParamMinValue("MinSeconds", 180))
  3531. }
  3532. if invalidParams.Len() > 0 {
  3533. return invalidParams
  3534. }
  3535. return nil
  3536. }
  3537. // This data type is used in the Subscription data type.
  3538. type EventSubscription struct {
  3539. _ struct{} `type:"structure"`
  3540. // The event for which Amazon Simple Notification Service (SNS) notifications
  3541. // are sent.
  3542. //
  3543. // Event is a required field
  3544. Event *string `locationName:"event" type:"string" required:"true" enum:"Event"`
  3545. // The time at which SubscribeToEvent is called.
  3546. //
  3547. // SubscribedAt is a required field
  3548. SubscribedAt *time.Time `locationName:"subscribedAt" type:"timestamp" timestampFormat:"unix" required:"true"`
  3549. }
  3550. // String returns the string representation
  3551. func (s EventSubscription) String() string {
  3552. return awsutil.Prettify(s)
  3553. }
  3554. // GoString returns the string representation
  3555. func (s EventSubscription) GoString() string {
  3556. return s.String()
  3557. }
  3558. // Includes details about the failed items.
  3559. type FailedItemDetails struct {
  3560. _ struct{} `type:"structure"`
  3561. // The status code of a failed item.
  3562. //
  3563. // FailureCode is a required field
  3564. FailureCode *string `locationName:"failureCode" type:"string" required:"true" enum:"FailedItemErrorCode"`
  3565. // Indicates whether you can immediately retry a request for this item for a
  3566. // specified resource.
  3567. //
  3568. // Retryable is a required field
  3569. Retryable *bool `locationName:"retryable" type:"boolean" required:"true"`
  3570. }
  3571. // String returns the string representation
  3572. func (s FailedItemDetails) String() string {
  3573. return awsutil.Prettify(s)
  3574. }
  3575. // GoString returns the string representation
  3576. func (s FailedItemDetails) GoString() string {
  3577. return s.String()
  3578. }
  3579. // Contains information about an Amazon Inspector finding. This data type is
  3580. // used as the response element in the DescribeFindings action.
  3581. type Finding struct {
  3582. _ struct{} `type:"structure"`
  3583. // The ARN that specifies the finding.
  3584. //
  3585. // Arn is a required field
  3586. Arn *string `locationName:"arn" min:"1" type:"string" required:"true"`
  3587. // A collection of attributes of the host from which the finding is generated.
  3588. AssetAttributes *AssetAttributes `locationName:"assetAttributes" type:"structure"`
  3589. // The type of the host from which the finding is generated.
  3590. AssetType *string `locationName:"assetType" type:"string" enum:"AssetType"`
  3591. // The system-defined attributes for the finding.
  3592. //
  3593. // Attributes is a required field
  3594. Attributes []*Attribute `locationName:"attributes" type:"list" required:"true"`
  3595. // This data element is currently not used.
  3596. Confidence *int64 `locationName:"confidence" type:"integer"`
  3597. // The time when the finding was generated.
  3598. //
  3599. // CreatedAt is a required field
  3600. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"`
  3601. // The description of the finding.
  3602. Description *string `locationName:"description" type:"string"`
  3603. // The ID of the finding.
  3604. Id *string `locationName:"id" type:"string"`
  3605. // This data element is currently not used.
  3606. IndicatorOfCompromise *bool `locationName:"indicatorOfCompromise" type:"boolean"`
  3607. // The numeric value of the finding severity.
  3608. NumericSeverity *float64 `locationName:"numericSeverity" type:"double"`
  3609. // The recommendation for the finding.
  3610. Recommendation *string `locationName:"recommendation" type:"string"`
  3611. // The schema version of this data type.
  3612. SchemaVersion *int64 `locationName:"schemaVersion" type:"integer"`
  3613. // The data element is set to "Inspector".
  3614. Service *string `locationName:"service" type:"string"`
  3615. // This data type is used in the Finding data type.
  3616. ServiceAttributes *ServiceAttributes `locationName:"serviceAttributes" type:"structure"`
  3617. // The finding severity. Values can be set to High, Medium, Low, and Informational.
  3618. Severity *string `locationName:"severity" type:"string" enum:"Severity"`
  3619. // The name of the finding.
  3620. Title *string `locationName:"title" type:"string"`
  3621. // The time when AddAttributesToFindings is called.
  3622. //
  3623. // UpdatedAt is a required field
  3624. UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp" timestampFormat:"unix" required:"true"`
  3625. // The user-defined attributes that are assigned to the finding.
  3626. //
  3627. // UserAttributes is a required field
  3628. UserAttributes []*Attribute `locationName:"userAttributes" type:"list" required:"true"`
  3629. }
  3630. // String returns the string representation
  3631. func (s Finding) String() string {
  3632. return awsutil.Prettify(s)
  3633. }
  3634. // GoString returns the string representation
  3635. func (s Finding) GoString() string {
  3636. return s.String()
  3637. }
  3638. // This data type is used as a request parameter in the ListFindings action.
  3639. type FindingFilter struct {
  3640. _ struct{} `type:"structure"`
  3641. // For a record to match a filter, one of the values that is specified for this
  3642. // data type property must be the exact match of the value of the agentId property
  3643. // of the Finding data type.
  3644. AgentIds []*string `locationName:"agentIds" type:"list"`
  3645. // For a record to match a filter, the list of values that are specified for
  3646. // this data type property must be contained in the list of values of the attributes
  3647. // property of the Finding data type.
  3648. Attributes []*Attribute `locationName:"attributes" type:"list"`
  3649. // For a record to match a filter, one of the values that is specified for this
  3650. // data type property must be the exact match of the value of the autoScalingGroup
  3651. // property of the Finding data type.
  3652. AutoScalingGroups []*string `locationName:"autoScalingGroups" type:"list"`
  3653. // The time range during which the finding is generated.
  3654. CreationTimeRange *TimestampRange `locationName:"creationTimeRange" type:"structure"`
  3655. // For a record to match a filter, one of the values that is specified for this
  3656. // data type property must be the exact match of the value of the ruleName property
  3657. // of the Finding data type.
  3658. RuleNames []*string `locationName:"ruleNames" type:"list"`
  3659. // For a record to match a filter, one of the values that is specified for this
  3660. // data type property must be the exact match of the value of the rulesPackageArn
  3661. // property of the Finding data type.
  3662. RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list"`
  3663. // For a record to match a filter, one of the values that is specified for this
  3664. // data type property must be the exact match of the value of the severity property
  3665. // of the Finding data type.
  3666. Severities []*string `locationName:"severities" type:"list"`
  3667. // For a record to match a filter, the value that is specified for this data
  3668. // type property must be contained in the list of values of the userAttributes
  3669. // property of the Finding data type.
  3670. UserAttributes []*Attribute `locationName:"userAttributes" type:"list"`
  3671. }
  3672. // String returns the string representation
  3673. func (s FindingFilter) String() string {
  3674. return awsutil.Prettify(s)
  3675. }
  3676. // GoString returns the string representation
  3677. func (s FindingFilter) GoString() string {
  3678. return s.String()
  3679. }
  3680. // Validate inspects the fields of the type to determine if they are valid.
  3681. func (s *FindingFilter) Validate() error {
  3682. invalidParams := request.ErrInvalidParams{Context: "FindingFilter"}
  3683. if s.Attributes != nil {
  3684. for i, v := range s.Attributes {
  3685. if v == nil {
  3686. continue
  3687. }
  3688. if err := v.Validate(); err != nil {
  3689. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams))
  3690. }
  3691. }
  3692. }
  3693. if s.UserAttributes != nil {
  3694. for i, v := range s.UserAttributes {
  3695. if v == nil {
  3696. continue
  3697. }
  3698. if err := v.Validate(); err != nil {
  3699. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "UserAttributes", i), err.(request.ErrInvalidParams))
  3700. }
  3701. }
  3702. }
  3703. if invalidParams.Len() > 0 {
  3704. return invalidParams
  3705. }
  3706. return nil
  3707. }
  3708. type GetTelemetryMetadataInput struct {
  3709. _ struct{} `type:"structure"`
  3710. // The ARN that specifies the assessment run that has the telemetry data that
  3711. // you want to obtain.
  3712. //
  3713. // AssessmentRunArn is a required field
  3714. AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"`
  3715. }
  3716. // String returns the string representation
  3717. func (s GetTelemetryMetadataInput) String() string {
  3718. return awsutil.Prettify(s)
  3719. }
  3720. // GoString returns the string representation
  3721. func (s GetTelemetryMetadataInput) GoString() string {
  3722. return s.String()
  3723. }
  3724. // Validate inspects the fields of the type to determine if they are valid.
  3725. func (s *GetTelemetryMetadataInput) Validate() error {
  3726. invalidParams := request.ErrInvalidParams{Context: "GetTelemetryMetadataInput"}
  3727. if s.AssessmentRunArn == nil {
  3728. invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn"))
  3729. }
  3730. if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 {
  3731. invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1))
  3732. }
  3733. if invalidParams.Len() > 0 {
  3734. return invalidParams
  3735. }
  3736. return nil
  3737. }
  3738. type GetTelemetryMetadataOutput struct {
  3739. _ struct{} `type:"structure"`
  3740. // Telemetry details.
  3741. //
  3742. // TelemetryMetadata is a required field
  3743. TelemetryMetadata []*TelemetryMetadata `locationName:"telemetryMetadata" type:"list" required:"true"`
  3744. }
  3745. // String returns the string representation
  3746. func (s GetTelemetryMetadataOutput) String() string {
  3747. return awsutil.Prettify(s)
  3748. }
  3749. // GoString returns the string representation
  3750. func (s GetTelemetryMetadataOutput) GoString() string {
  3751. return s.String()
  3752. }
  3753. type ListAssessmentRunAgentsInput struct {
  3754. _ struct{} `type:"structure"`
  3755. // The ARN that specifies the assessment run whose agents you want to list.
  3756. //
  3757. // AssessmentRunArn is a required field
  3758. AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"`
  3759. // You can use this parameter to specify a subset of data to be included in
  3760. // the action's response.
  3761. //
  3762. // For a record to match a filter, all specified filter attributes must match.
  3763. // When multiple values are specified for a filter attribute, any of the values
  3764. // can match.
  3765. Filter *AgentFilter `locationName:"filter" type:"structure"`
  3766. // You can use this parameter to indicate the maximum number of items that you
  3767. // want in the response. The default value is 10. The maximum value is 500.
  3768. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  3769. // You can use this parameter when paginating results. Set the value of this
  3770. // parameter to null on your first call to the ListAssessmentRunAgents action.
  3771. // Subsequent calls to the action fill nextToken in the request with the value
  3772. // of NextToken from the previous response to continue listing data.
  3773. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  3774. }
  3775. // String returns the string representation
  3776. func (s ListAssessmentRunAgentsInput) String() string {
  3777. return awsutil.Prettify(s)
  3778. }
  3779. // GoString returns the string representation
  3780. func (s ListAssessmentRunAgentsInput) GoString() string {
  3781. return s.String()
  3782. }
  3783. // Validate inspects the fields of the type to determine if they are valid.
  3784. func (s *ListAssessmentRunAgentsInput) Validate() error {
  3785. invalidParams := request.ErrInvalidParams{Context: "ListAssessmentRunAgentsInput"}
  3786. if s.AssessmentRunArn == nil {
  3787. invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn"))
  3788. }
  3789. if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 {
  3790. invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1))
  3791. }
  3792. if s.NextToken != nil && len(*s.NextToken) < 1 {
  3793. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  3794. }
  3795. if s.Filter != nil {
  3796. if err := s.Filter.Validate(); err != nil {
  3797. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  3798. }
  3799. }
  3800. if invalidParams.Len() > 0 {
  3801. return invalidParams
  3802. }
  3803. return nil
  3804. }
  3805. type ListAssessmentRunAgentsOutput struct {
  3806. _ struct{} `type:"structure"`
  3807. // A list of ARNs that specifies the agents returned by the action.
  3808. //
  3809. // AssessmentRunAgents is a required field
  3810. AssessmentRunAgents []*AssessmentRunAgent `locationName:"assessmentRunAgents" type:"list" required:"true"`
  3811. // When a response is generated, if there is more data to be listed, this parameter
  3812. // is present in the response and contains the value to use for the nextToken
  3813. // parameter in a subsequent pagination request. If there is no more data to
  3814. // be listed, this parameter is set to null.
  3815. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  3816. }
  3817. // String returns the string representation
  3818. func (s ListAssessmentRunAgentsOutput) String() string {
  3819. return awsutil.Prettify(s)
  3820. }
  3821. // GoString returns the string representation
  3822. func (s ListAssessmentRunAgentsOutput) GoString() string {
  3823. return s.String()
  3824. }
  3825. type ListAssessmentRunsInput struct {
  3826. _ struct{} `type:"structure"`
  3827. // The ARNs that specify the assessment templates whose assessment runs you
  3828. // want to list.
  3829. AssessmentTemplateArns []*string `locationName:"assessmentTemplateArns" type:"list"`
  3830. // You can use this parameter to specify a subset of data to be included in
  3831. // the action's response.
  3832. //
  3833. // For a record to match a filter, all specified filter attributes must match.
  3834. // When multiple values are specified for a filter attribute, any of the values
  3835. // can match.
  3836. Filter *AssessmentRunFilter `locationName:"filter" type:"structure"`
  3837. // You can use this parameter to indicate the maximum number of items that you
  3838. // want in the response. The default value is 10. The maximum value is 500.
  3839. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  3840. // You can use this parameter when paginating results. Set the value of this
  3841. // parameter to null on your first call to the ListAssessmentRuns action. Subsequent
  3842. // calls to the action fill nextToken in the request with the value of NextToken
  3843. // from the previous response to continue listing data.
  3844. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  3845. }
  3846. // String returns the string representation
  3847. func (s ListAssessmentRunsInput) String() string {
  3848. return awsutil.Prettify(s)
  3849. }
  3850. // GoString returns the string representation
  3851. func (s ListAssessmentRunsInput) GoString() string {
  3852. return s.String()
  3853. }
  3854. // Validate inspects the fields of the type to determine if they are valid.
  3855. func (s *ListAssessmentRunsInput) Validate() error {
  3856. invalidParams := request.ErrInvalidParams{Context: "ListAssessmentRunsInput"}
  3857. if s.NextToken != nil && len(*s.NextToken) < 1 {
  3858. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  3859. }
  3860. if s.Filter != nil {
  3861. if err := s.Filter.Validate(); err != nil {
  3862. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  3863. }
  3864. }
  3865. if invalidParams.Len() > 0 {
  3866. return invalidParams
  3867. }
  3868. return nil
  3869. }
  3870. type ListAssessmentRunsOutput struct {
  3871. _ struct{} `type:"structure"`
  3872. // A list of ARNs that specifies the assessment runs that are returned by the
  3873. // action.
  3874. //
  3875. // AssessmentRunArns is a required field
  3876. AssessmentRunArns []*string `locationName:"assessmentRunArns" type:"list" required:"true"`
  3877. // When a response is generated, if there is more data to be listed, this parameter
  3878. // is present in the response and contains the value to use for the nextToken
  3879. // parameter in a subsequent pagination request. If there is no more data to
  3880. // be listed, this parameter is set to null.
  3881. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  3882. }
  3883. // String returns the string representation
  3884. func (s ListAssessmentRunsOutput) String() string {
  3885. return awsutil.Prettify(s)
  3886. }
  3887. // GoString returns the string representation
  3888. func (s ListAssessmentRunsOutput) GoString() string {
  3889. return s.String()
  3890. }
  3891. type ListAssessmentTargetsInput struct {
  3892. _ struct{} `type:"structure"`
  3893. // You can use this parameter to specify a subset of data to be included in
  3894. // the action's response.
  3895. //
  3896. // For a record to match a filter, all specified filter attributes must match.
  3897. // When multiple values are specified for a filter attribute, any of the values
  3898. // can match.
  3899. Filter *AssessmentTargetFilter `locationName:"filter" type:"structure"`
  3900. // You can use this parameter to indicate the maximum number of items you want
  3901. // in the response. The default value is 10. The maximum value is 500.
  3902. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  3903. // You can use this parameter when paginating results. Set the value of this
  3904. // parameter to null on your first call to the ListAssessmentTargets action.
  3905. // Subsequent calls to the action fill nextToken in the request with the value
  3906. // of NextToken from the previous response to continue listing data.
  3907. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  3908. }
  3909. // String returns the string representation
  3910. func (s ListAssessmentTargetsInput) String() string {
  3911. return awsutil.Prettify(s)
  3912. }
  3913. // GoString returns the string representation
  3914. func (s ListAssessmentTargetsInput) GoString() string {
  3915. return s.String()
  3916. }
  3917. // Validate inspects the fields of the type to determine if they are valid.
  3918. func (s *ListAssessmentTargetsInput) Validate() error {
  3919. invalidParams := request.ErrInvalidParams{Context: "ListAssessmentTargetsInput"}
  3920. if s.NextToken != nil && len(*s.NextToken) < 1 {
  3921. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  3922. }
  3923. if s.Filter != nil {
  3924. if err := s.Filter.Validate(); err != nil {
  3925. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  3926. }
  3927. }
  3928. if invalidParams.Len() > 0 {
  3929. return invalidParams
  3930. }
  3931. return nil
  3932. }
  3933. type ListAssessmentTargetsOutput struct {
  3934. _ struct{} `type:"structure"`
  3935. // A list of ARNs that specifies the assessment targets that are returned by
  3936. // the action.
  3937. //
  3938. // AssessmentTargetArns is a required field
  3939. AssessmentTargetArns []*string `locationName:"assessmentTargetArns" type:"list" required:"true"`
  3940. // When a response is generated, if there is more data to be listed, this parameter
  3941. // is present in the response and contains the value to use for the nextToken
  3942. // parameter in a subsequent pagination request. If there is no more data to
  3943. // be listed, this parameter is set to null.
  3944. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  3945. }
  3946. // String returns the string representation
  3947. func (s ListAssessmentTargetsOutput) String() string {
  3948. return awsutil.Prettify(s)
  3949. }
  3950. // GoString returns the string representation
  3951. func (s ListAssessmentTargetsOutput) GoString() string {
  3952. return s.String()
  3953. }
  3954. type ListAssessmentTemplatesInput struct {
  3955. _ struct{} `type:"structure"`
  3956. // A list of ARNs that specifies the assessment targets whose assessment templates
  3957. // you want to list.
  3958. AssessmentTargetArns []*string `locationName:"assessmentTargetArns" type:"list"`
  3959. // You can use this parameter to specify a subset of data to be included in
  3960. // the action's response.
  3961. //
  3962. // For a record to match a filter, all specified filter attributes must match.
  3963. // When multiple values are specified for a filter attribute, any of the values
  3964. // can match.
  3965. Filter *AssessmentTemplateFilter `locationName:"filter" type:"structure"`
  3966. // You can use this parameter to indicate the maximum number of items you want
  3967. // in the response. The default value is 10. The maximum value is 500.
  3968. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  3969. // You can use this parameter when paginating results. Set the value of this
  3970. // parameter to null on your first call to the ListAssessmentTemplates action.
  3971. // Subsequent calls to the action fill nextToken in the request with the value
  3972. // of NextToken from the previous response to continue listing data.
  3973. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  3974. }
  3975. // String returns the string representation
  3976. func (s ListAssessmentTemplatesInput) String() string {
  3977. return awsutil.Prettify(s)
  3978. }
  3979. // GoString returns the string representation
  3980. func (s ListAssessmentTemplatesInput) GoString() string {
  3981. return s.String()
  3982. }
  3983. // Validate inspects the fields of the type to determine if they are valid.
  3984. func (s *ListAssessmentTemplatesInput) Validate() error {
  3985. invalidParams := request.ErrInvalidParams{Context: "ListAssessmentTemplatesInput"}
  3986. if s.NextToken != nil && len(*s.NextToken) < 1 {
  3987. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  3988. }
  3989. if s.Filter != nil {
  3990. if err := s.Filter.Validate(); err != nil {
  3991. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  3992. }
  3993. }
  3994. if invalidParams.Len() > 0 {
  3995. return invalidParams
  3996. }
  3997. return nil
  3998. }
  3999. type ListAssessmentTemplatesOutput struct {
  4000. _ struct{} `type:"structure"`
  4001. // A list of ARNs that specifies the assessment templates returned by the action.
  4002. //
  4003. // AssessmentTemplateArns is a required field
  4004. AssessmentTemplateArns []*string `locationName:"assessmentTemplateArns" type:"list" required:"true"`
  4005. // When a response is generated, if there is more data to be listed, this parameter
  4006. // is present in the response and contains the value to use for the nextToken
  4007. // parameter in a subsequent pagination request. If there is no more data to
  4008. // be listed, this parameter is set to null.
  4009. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4010. }
  4011. // String returns the string representation
  4012. func (s ListAssessmentTemplatesOutput) String() string {
  4013. return awsutil.Prettify(s)
  4014. }
  4015. // GoString returns the string representation
  4016. func (s ListAssessmentTemplatesOutput) GoString() string {
  4017. return s.String()
  4018. }
  4019. type ListEventSubscriptionsInput struct {
  4020. _ struct{} `type:"structure"`
  4021. // You can use this parameter to indicate the maximum number of items you want
  4022. // in the response. The default value is 10. The maximum value is 500.
  4023. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  4024. // You can use this parameter when paginating results. Set the value of this
  4025. // parameter to null on your first call to the ListEventSubscriptions action.
  4026. // Subsequent calls to the action fill nextToken in the request with the value
  4027. // of NextToken from the previous response to continue listing data.
  4028. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4029. // The ARN of the assessment template for which you want to list the existing
  4030. // event subscriptions.
  4031. ResourceArn *string `locationName:"resourceArn" min:"1" type:"string"`
  4032. }
  4033. // String returns the string representation
  4034. func (s ListEventSubscriptionsInput) String() string {
  4035. return awsutil.Prettify(s)
  4036. }
  4037. // GoString returns the string representation
  4038. func (s ListEventSubscriptionsInput) GoString() string {
  4039. return s.String()
  4040. }
  4041. // Validate inspects the fields of the type to determine if they are valid.
  4042. func (s *ListEventSubscriptionsInput) Validate() error {
  4043. invalidParams := request.ErrInvalidParams{Context: "ListEventSubscriptionsInput"}
  4044. if s.NextToken != nil && len(*s.NextToken) < 1 {
  4045. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  4046. }
  4047. if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  4048. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  4049. }
  4050. if invalidParams.Len() > 0 {
  4051. return invalidParams
  4052. }
  4053. return nil
  4054. }
  4055. type ListEventSubscriptionsOutput struct {
  4056. _ struct{} `type:"structure"`
  4057. // When a response is generated, if there is more data to be listed, this parameter
  4058. // is present in the response and contains the value to use for the nextToken
  4059. // parameter in a subsequent pagination request. If there is no more data to
  4060. // be listed, this parameter is set to null.
  4061. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4062. // Details of the returned event subscriptions.
  4063. //
  4064. // Subscriptions is a required field
  4065. Subscriptions []*Subscription `locationName:"subscriptions" type:"list" required:"true"`
  4066. }
  4067. // String returns the string representation
  4068. func (s ListEventSubscriptionsOutput) String() string {
  4069. return awsutil.Prettify(s)
  4070. }
  4071. // GoString returns the string representation
  4072. func (s ListEventSubscriptionsOutput) GoString() string {
  4073. return s.String()
  4074. }
  4075. type ListFindingsInput struct {
  4076. _ struct{} `type:"structure"`
  4077. // The ARNs of the assessment runs that generate the findings that you want
  4078. // to list.
  4079. AssessmentRunArns []*string `locationName:"assessmentRunArns" type:"list"`
  4080. // You can use this parameter to specify a subset of data to be included in
  4081. // the action's response.
  4082. //
  4083. // For a record to match a filter, all specified filter attributes must match.
  4084. // When multiple values are specified for a filter attribute, any of the values
  4085. // can match.
  4086. Filter *FindingFilter `locationName:"filter" type:"structure"`
  4087. // You can use this parameter to indicate the maximum number of items you want
  4088. // in the response. The default value is 10. The maximum value is 500.
  4089. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  4090. // You can use this parameter when paginating results. Set the value of this
  4091. // parameter to null on your first call to the ListFindings action. Subsequent
  4092. // calls to the action fill nextToken in the request with the value of NextToken
  4093. // from the previous response to continue listing data.
  4094. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4095. }
  4096. // String returns the string representation
  4097. func (s ListFindingsInput) String() string {
  4098. return awsutil.Prettify(s)
  4099. }
  4100. // GoString returns the string representation
  4101. func (s ListFindingsInput) GoString() string {
  4102. return s.String()
  4103. }
  4104. // Validate inspects the fields of the type to determine if they are valid.
  4105. func (s *ListFindingsInput) Validate() error {
  4106. invalidParams := request.ErrInvalidParams{Context: "ListFindingsInput"}
  4107. if s.NextToken != nil && len(*s.NextToken) < 1 {
  4108. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  4109. }
  4110. if s.Filter != nil {
  4111. if err := s.Filter.Validate(); err != nil {
  4112. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  4113. }
  4114. }
  4115. if invalidParams.Len() > 0 {
  4116. return invalidParams
  4117. }
  4118. return nil
  4119. }
  4120. type ListFindingsOutput struct {
  4121. _ struct{} `type:"structure"`
  4122. // A list of ARNs that specifies the findings returned by the action.
  4123. //
  4124. // FindingArns is a required field
  4125. FindingArns []*string `locationName:"findingArns" type:"list" required:"true"`
  4126. // When a response is generated, if there is more data to be listed, this parameter
  4127. // is present in the response and contains the value to use for the nextToken
  4128. // parameter in a subsequent pagination request. If there is no more data to
  4129. // be listed, this parameter is set to null.
  4130. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4131. }
  4132. // String returns the string representation
  4133. func (s ListFindingsOutput) String() string {
  4134. return awsutil.Prettify(s)
  4135. }
  4136. // GoString returns the string representation
  4137. func (s ListFindingsOutput) GoString() string {
  4138. return s.String()
  4139. }
  4140. type ListRulesPackagesInput struct {
  4141. _ struct{} `type:"structure"`
  4142. // You can use this parameter to indicate the maximum number of items you want
  4143. // in the response. The default value is 10. The maximum value is 500.
  4144. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  4145. // You can use this parameter when paginating results. Set the value of this
  4146. // parameter to null on your first call to the ListRulesPackages action. Subsequent
  4147. // calls to the action fill nextToken in the request with the value of NextToken
  4148. // from the previous response to continue listing data.
  4149. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4150. }
  4151. // String returns the string representation
  4152. func (s ListRulesPackagesInput) String() string {
  4153. return awsutil.Prettify(s)
  4154. }
  4155. // GoString returns the string representation
  4156. func (s ListRulesPackagesInput) GoString() string {
  4157. return s.String()
  4158. }
  4159. // Validate inspects the fields of the type to determine if they are valid.
  4160. func (s *ListRulesPackagesInput) Validate() error {
  4161. invalidParams := request.ErrInvalidParams{Context: "ListRulesPackagesInput"}
  4162. if s.NextToken != nil && len(*s.NextToken) < 1 {
  4163. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  4164. }
  4165. if invalidParams.Len() > 0 {
  4166. return invalidParams
  4167. }
  4168. return nil
  4169. }
  4170. type ListRulesPackagesOutput struct {
  4171. _ struct{} `type:"structure"`
  4172. // When a response is generated, if there is more data to be listed, this parameter
  4173. // is present in the response and contains the value to use for the nextToken
  4174. // parameter in a subsequent pagination request. If there is no more data to
  4175. // be listed, this parameter is set to null.
  4176. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4177. // The list of ARNs that specifies the rules packages returned by the action.
  4178. //
  4179. // RulesPackageArns is a required field
  4180. RulesPackageArns []*string `locationName:"rulesPackageArns" type:"list" required:"true"`
  4181. }
  4182. // String returns the string representation
  4183. func (s ListRulesPackagesOutput) String() string {
  4184. return awsutil.Prettify(s)
  4185. }
  4186. // GoString returns the string representation
  4187. func (s ListRulesPackagesOutput) GoString() string {
  4188. return s.String()
  4189. }
  4190. type ListTagsForResourceInput struct {
  4191. _ struct{} `type:"structure"`
  4192. // The ARN that specifies the assessment template whose tags you want to list.
  4193. //
  4194. // ResourceArn is a required field
  4195. ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"`
  4196. }
  4197. // String returns the string representation
  4198. func (s ListTagsForResourceInput) String() string {
  4199. return awsutil.Prettify(s)
  4200. }
  4201. // GoString returns the string representation
  4202. func (s ListTagsForResourceInput) GoString() string {
  4203. return s.String()
  4204. }
  4205. // Validate inspects the fields of the type to determine if they are valid.
  4206. func (s *ListTagsForResourceInput) Validate() error {
  4207. invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
  4208. if s.ResourceArn == nil {
  4209. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  4210. }
  4211. if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  4212. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  4213. }
  4214. if invalidParams.Len() > 0 {
  4215. return invalidParams
  4216. }
  4217. return nil
  4218. }
  4219. type ListTagsForResourceOutput struct {
  4220. _ struct{} `type:"structure"`
  4221. // A collection of key and value pairs.
  4222. //
  4223. // Tags is a required field
  4224. Tags []*Tag `locationName:"tags" type:"list" required:"true"`
  4225. }
  4226. // String returns the string representation
  4227. func (s ListTagsForResourceOutput) String() string {
  4228. return awsutil.Prettify(s)
  4229. }
  4230. // GoString returns the string representation
  4231. func (s ListTagsForResourceOutput) GoString() string {
  4232. return s.String()
  4233. }
  4234. type PreviewAgentsInput struct {
  4235. _ struct{} `type:"structure"`
  4236. // You can use this parameter to indicate the maximum number of items you want
  4237. // in the response. The default value is 10. The maximum value is 500.
  4238. MaxResults *int64 `locationName:"maxResults" type:"integer"`
  4239. // You can use this parameter when paginating results. Set the value of this
  4240. // parameter to null on your first call to the PreviewAgents action. Subsequent
  4241. // calls to the action fill nextToken in the request with the value of NextToken
  4242. // from the previous response to continue listing data.
  4243. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4244. // The ARN of the assessment target whose agents you want to preview.
  4245. //
  4246. // PreviewAgentsArn is a required field
  4247. PreviewAgentsArn *string `locationName:"previewAgentsArn" min:"1" type:"string" required:"true"`
  4248. }
  4249. // String returns the string representation
  4250. func (s PreviewAgentsInput) String() string {
  4251. return awsutil.Prettify(s)
  4252. }
  4253. // GoString returns the string representation
  4254. func (s PreviewAgentsInput) GoString() string {
  4255. return s.String()
  4256. }
  4257. // Validate inspects the fields of the type to determine if they are valid.
  4258. func (s *PreviewAgentsInput) Validate() error {
  4259. invalidParams := request.ErrInvalidParams{Context: "PreviewAgentsInput"}
  4260. if s.NextToken != nil && len(*s.NextToken) < 1 {
  4261. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  4262. }
  4263. if s.PreviewAgentsArn == nil {
  4264. invalidParams.Add(request.NewErrParamRequired("PreviewAgentsArn"))
  4265. }
  4266. if s.PreviewAgentsArn != nil && len(*s.PreviewAgentsArn) < 1 {
  4267. invalidParams.Add(request.NewErrParamMinLen("PreviewAgentsArn", 1))
  4268. }
  4269. if invalidParams.Len() > 0 {
  4270. return invalidParams
  4271. }
  4272. return nil
  4273. }
  4274. type PreviewAgentsOutput struct {
  4275. _ struct{} `type:"structure"`
  4276. // The resulting list of agents.
  4277. //
  4278. // AgentPreviews is a required field
  4279. AgentPreviews []*AgentPreview `locationName:"agentPreviews" type:"list" required:"true"`
  4280. // When a response is generated, if there is more data to be listed, this parameter
  4281. // is present in the response and contains the value to use for the nextToken
  4282. // parameter in a subsequent pagination request. If there is no more data to
  4283. // be listed, this parameter is set to null.
  4284. NextToken *string `locationName:"nextToken" min:"1" type:"string"`
  4285. }
  4286. // String returns the string representation
  4287. func (s PreviewAgentsOutput) String() string {
  4288. return awsutil.Prettify(s)
  4289. }
  4290. // GoString returns the string representation
  4291. func (s PreviewAgentsOutput) GoString() string {
  4292. return s.String()
  4293. }
  4294. type RegisterCrossAccountAccessRoleInput struct {
  4295. _ struct{} `type:"structure"`
  4296. // The ARN of the IAM role that Amazon Inspector uses to list your EC2 instances
  4297. // during the assessment run or when you call the PreviewAgents action.
  4298. //
  4299. // RoleArn is a required field
  4300. RoleArn *string `locationName:"roleArn" min:"1" type:"string" required:"true"`
  4301. }
  4302. // String returns the string representation
  4303. func (s RegisterCrossAccountAccessRoleInput) String() string {
  4304. return awsutil.Prettify(s)
  4305. }
  4306. // GoString returns the string representation
  4307. func (s RegisterCrossAccountAccessRoleInput) GoString() string {
  4308. return s.String()
  4309. }
  4310. // Validate inspects the fields of the type to determine if they are valid.
  4311. func (s *RegisterCrossAccountAccessRoleInput) Validate() error {
  4312. invalidParams := request.ErrInvalidParams{Context: "RegisterCrossAccountAccessRoleInput"}
  4313. if s.RoleArn == nil {
  4314. invalidParams.Add(request.NewErrParamRequired("RoleArn"))
  4315. }
  4316. if s.RoleArn != nil && len(*s.RoleArn) < 1 {
  4317. invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1))
  4318. }
  4319. if invalidParams.Len() > 0 {
  4320. return invalidParams
  4321. }
  4322. return nil
  4323. }
  4324. type RegisterCrossAccountAccessRoleOutput struct {
  4325. _ struct{} `type:"structure"`
  4326. }
  4327. // String returns the string representation
  4328. func (s RegisterCrossAccountAccessRoleOutput) String() string {
  4329. return awsutil.Prettify(s)
  4330. }
  4331. // GoString returns the string representation
  4332. func (s RegisterCrossAccountAccessRoleOutput) GoString() string {
  4333. return s.String()
  4334. }
  4335. type RemoveAttributesFromFindingsInput struct {
  4336. _ struct{} `type:"structure"`
  4337. // The array of attribute keys that you want to remove from specified findings.
  4338. //
  4339. // AttributeKeys is a required field
  4340. AttributeKeys []*string `locationName:"attributeKeys" type:"list" required:"true"`
  4341. // The ARNs that specify the findings that you want to remove attributes from.
  4342. //
  4343. // FindingArns is a required field
  4344. FindingArns []*string `locationName:"findingArns" min:"1" type:"list" required:"true"`
  4345. }
  4346. // String returns the string representation
  4347. func (s RemoveAttributesFromFindingsInput) String() string {
  4348. return awsutil.Prettify(s)
  4349. }
  4350. // GoString returns the string representation
  4351. func (s RemoveAttributesFromFindingsInput) GoString() string {
  4352. return s.String()
  4353. }
  4354. // Validate inspects the fields of the type to determine if they are valid.
  4355. func (s *RemoveAttributesFromFindingsInput) Validate() error {
  4356. invalidParams := request.ErrInvalidParams{Context: "RemoveAttributesFromFindingsInput"}
  4357. if s.AttributeKeys == nil {
  4358. invalidParams.Add(request.NewErrParamRequired("AttributeKeys"))
  4359. }
  4360. if s.FindingArns == nil {
  4361. invalidParams.Add(request.NewErrParamRequired("FindingArns"))
  4362. }
  4363. if s.FindingArns != nil && len(s.FindingArns) < 1 {
  4364. invalidParams.Add(request.NewErrParamMinLen("FindingArns", 1))
  4365. }
  4366. if invalidParams.Len() > 0 {
  4367. return invalidParams
  4368. }
  4369. return nil
  4370. }
  4371. type RemoveAttributesFromFindingsOutput struct {
  4372. _ struct{} `type:"structure"`
  4373. // Attributes details that cannot be described. An error code is provided for
  4374. // each failed item.
  4375. //
  4376. // FailedItems is a required field
  4377. FailedItems map[string]*FailedItemDetails `locationName:"failedItems" type:"map" required:"true"`
  4378. }
  4379. // String returns the string representation
  4380. func (s RemoveAttributesFromFindingsOutput) String() string {
  4381. return awsutil.Prettify(s)
  4382. }
  4383. // GoString returns the string representation
  4384. func (s RemoveAttributesFromFindingsOutput) GoString() string {
  4385. return s.String()
  4386. }
  4387. // Contains information about a resource group. The resource group defines a
  4388. // set of tags that, when queried, identify the AWS resources that make up the
  4389. // assessment target. This data type is used as the response element in the
  4390. // DescribeResourceGroups action.
  4391. type ResourceGroup struct {
  4392. _ struct{} `type:"structure"`
  4393. // The ARN of the resource group.
  4394. //
  4395. // Arn is a required field
  4396. Arn *string `locationName:"arn" min:"1" type:"string" required:"true"`
  4397. // The time at which resource group is created.
  4398. //
  4399. // CreatedAt is a required field
  4400. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix" required:"true"`
  4401. // The tags (key and value pairs) of the resource group. This data type property
  4402. // is used in the CreateResourceGroup action.
  4403. //
  4404. // Tags is a required field
  4405. Tags []*ResourceGroupTag `locationName:"tags" min:"1" type:"list" required:"true"`
  4406. }
  4407. // String returns the string representation
  4408. func (s ResourceGroup) String() string {
  4409. return awsutil.Prettify(s)
  4410. }
  4411. // GoString returns the string representation
  4412. func (s ResourceGroup) GoString() string {
  4413. return s.String()
  4414. }
  4415. // This data type is used as one of the elements of the ResourceGroup data type.
  4416. type ResourceGroupTag struct {
  4417. _ struct{} `type:"structure"`
  4418. // A tag key.
  4419. //
  4420. // Key is a required field
  4421. Key *string `locationName:"key" min:"1" type:"string" required:"true"`
  4422. // The value assigned to a tag key.
  4423. Value *string `locationName:"value" min:"1" type:"string"`
  4424. }
  4425. // String returns the string representation
  4426. func (s ResourceGroupTag) String() string {
  4427. return awsutil.Prettify(s)
  4428. }
  4429. // GoString returns the string representation
  4430. func (s ResourceGroupTag) GoString() string {
  4431. return s.String()
  4432. }
  4433. // Validate inspects the fields of the type to determine if they are valid.
  4434. func (s *ResourceGroupTag) Validate() error {
  4435. invalidParams := request.ErrInvalidParams{Context: "ResourceGroupTag"}
  4436. if s.Key == nil {
  4437. invalidParams.Add(request.NewErrParamRequired("Key"))
  4438. }
  4439. if s.Key != nil && len(*s.Key) < 1 {
  4440. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  4441. }
  4442. if s.Value != nil && len(*s.Value) < 1 {
  4443. invalidParams.Add(request.NewErrParamMinLen("Value", 1))
  4444. }
  4445. if invalidParams.Len() > 0 {
  4446. return invalidParams
  4447. }
  4448. return nil
  4449. }
  4450. // Contains information about an Amazon Inspector rules package. This data type
  4451. // is used as the response element in the DescribeRulesPackages action.
  4452. type RulesPackage struct {
  4453. _ struct{} `type:"structure"`
  4454. // The ARN of the rules package.
  4455. //
  4456. // Arn is a required field
  4457. Arn *string `locationName:"arn" min:"1" type:"string" required:"true"`
  4458. // The description of the rules package.
  4459. Description *string `locationName:"description" type:"string"`
  4460. // The name of the rules package.
  4461. //
  4462. // Name is a required field
  4463. Name *string `locationName:"name" type:"string" required:"true"`
  4464. // The provider of the rules package.
  4465. //
  4466. // Provider is a required field
  4467. Provider *string `locationName:"provider" type:"string" required:"true"`
  4468. // The version ID of the rules package.
  4469. //
  4470. // Version is a required field
  4471. Version *string `locationName:"version" type:"string" required:"true"`
  4472. }
  4473. // String returns the string representation
  4474. func (s RulesPackage) String() string {
  4475. return awsutil.Prettify(s)
  4476. }
  4477. // GoString returns the string representation
  4478. func (s RulesPackage) GoString() string {
  4479. return s.String()
  4480. }
  4481. // This data type is used in the Finding data type.
  4482. type ServiceAttributes struct {
  4483. _ struct{} `type:"structure"`
  4484. // The ARN of the assessment run during which the finding is generated.
  4485. AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string"`
  4486. // The ARN of the rules package that is used to generate the finding.
  4487. RulesPackageArn *string `locationName:"rulesPackageArn" min:"1" type:"string"`
  4488. // The schema version of this data type.
  4489. //
  4490. // SchemaVersion is a required field
  4491. SchemaVersion *int64 `locationName:"schemaVersion" type:"integer" required:"true"`
  4492. }
  4493. // String returns the string representation
  4494. func (s ServiceAttributes) String() string {
  4495. return awsutil.Prettify(s)
  4496. }
  4497. // GoString returns the string representation
  4498. func (s ServiceAttributes) GoString() string {
  4499. return s.String()
  4500. }
  4501. type SetTagsForResourceInput struct {
  4502. _ struct{} `type:"structure"`
  4503. // The ARN of the assessment template that you want to set tags to.
  4504. //
  4505. // ResourceArn is a required field
  4506. ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"`
  4507. // A collection of key and value pairs that you want to set to the assessment
  4508. // template.
  4509. Tags []*Tag `locationName:"tags" type:"list"`
  4510. }
  4511. // String returns the string representation
  4512. func (s SetTagsForResourceInput) String() string {
  4513. return awsutil.Prettify(s)
  4514. }
  4515. // GoString returns the string representation
  4516. func (s SetTagsForResourceInput) GoString() string {
  4517. return s.String()
  4518. }
  4519. // Validate inspects the fields of the type to determine if they are valid.
  4520. func (s *SetTagsForResourceInput) Validate() error {
  4521. invalidParams := request.ErrInvalidParams{Context: "SetTagsForResourceInput"}
  4522. if s.ResourceArn == nil {
  4523. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  4524. }
  4525. if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  4526. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  4527. }
  4528. if s.Tags != nil {
  4529. for i, v := range s.Tags {
  4530. if v == nil {
  4531. continue
  4532. }
  4533. if err := v.Validate(); err != nil {
  4534. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  4535. }
  4536. }
  4537. }
  4538. if invalidParams.Len() > 0 {
  4539. return invalidParams
  4540. }
  4541. return nil
  4542. }
  4543. type SetTagsForResourceOutput struct {
  4544. _ struct{} `type:"structure"`
  4545. }
  4546. // String returns the string representation
  4547. func (s SetTagsForResourceOutput) String() string {
  4548. return awsutil.Prettify(s)
  4549. }
  4550. // GoString returns the string representation
  4551. func (s SetTagsForResourceOutput) GoString() string {
  4552. return s.String()
  4553. }
  4554. type StartAssessmentRunInput struct {
  4555. _ struct{} `type:"structure"`
  4556. // You can specify the name for the assessment run, or you can use the auto-generated
  4557. // name that is based on the assessment template name. The name must be unique
  4558. // for the assessment template.
  4559. AssessmentRunName *string `locationName:"assessmentRunName" min:"1" type:"string"`
  4560. // The ARN of the assessment template of the assessment run that you want to
  4561. // start.
  4562. //
  4563. // AssessmentTemplateArn is a required field
  4564. AssessmentTemplateArn *string `locationName:"assessmentTemplateArn" min:"1" type:"string" required:"true"`
  4565. }
  4566. // String returns the string representation
  4567. func (s StartAssessmentRunInput) String() string {
  4568. return awsutil.Prettify(s)
  4569. }
  4570. // GoString returns the string representation
  4571. func (s StartAssessmentRunInput) GoString() string {
  4572. return s.String()
  4573. }
  4574. // Validate inspects the fields of the type to determine if they are valid.
  4575. func (s *StartAssessmentRunInput) Validate() error {
  4576. invalidParams := request.ErrInvalidParams{Context: "StartAssessmentRunInput"}
  4577. if s.AssessmentRunName != nil && len(*s.AssessmentRunName) < 1 {
  4578. invalidParams.Add(request.NewErrParamMinLen("AssessmentRunName", 1))
  4579. }
  4580. if s.AssessmentTemplateArn == nil {
  4581. invalidParams.Add(request.NewErrParamRequired("AssessmentTemplateArn"))
  4582. }
  4583. if s.AssessmentTemplateArn != nil && len(*s.AssessmentTemplateArn) < 1 {
  4584. invalidParams.Add(request.NewErrParamMinLen("AssessmentTemplateArn", 1))
  4585. }
  4586. if invalidParams.Len() > 0 {
  4587. return invalidParams
  4588. }
  4589. return nil
  4590. }
  4591. type StartAssessmentRunOutput struct {
  4592. _ struct{} `type:"structure"`
  4593. // The ARN of the assessment run that has been started.
  4594. //
  4595. // AssessmentRunArn is a required field
  4596. AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"`
  4597. }
  4598. // String returns the string representation
  4599. func (s StartAssessmentRunOutput) String() string {
  4600. return awsutil.Prettify(s)
  4601. }
  4602. // GoString returns the string representation
  4603. func (s StartAssessmentRunOutput) GoString() string {
  4604. return s.String()
  4605. }
  4606. type StopAssessmentRunInput struct {
  4607. _ struct{} `type:"structure"`
  4608. // The ARN of the assessment run that you want to stop.
  4609. //
  4610. // AssessmentRunArn is a required field
  4611. AssessmentRunArn *string `locationName:"assessmentRunArn" min:"1" type:"string" required:"true"`
  4612. }
  4613. // String returns the string representation
  4614. func (s StopAssessmentRunInput) String() string {
  4615. return awsutil.Prettify(s)
  4616. }
  4617. // GoString returns the string representation
  4618. func (s StopAssessmentRunInput) GoString() string {
  4619. return s.String()
  4620. }
  4621. // Validate inspects the fields of the type to determine if they are valid.
  4622. func (s *StopAssessmentRunInput) Validate() error {
  4623. invalidParams := request.ErrInvalidParams{Context: "StopAssessmentRunInput"}
  4624. if s.AssessmentRunArn == nil {
  4625. invalidParams.Add(request.NewErrParamRequired("AssessmentRunArn"))
  4626. }
  4627. if s.AssessmentRunArn != nil && len(*s.AssessmentRunArn) < 1 {
  4628. invalidParams.Add(request.NewErrParamMinLen("AssessmentRunArn", 1))
  4629. }
  4630. if invalidParams.Len() > 0 {
  4631. return invalidParams
  4632. }
  4633. return nil
  4634. }
  4635. type StopAssessmentRunOutput struct {
  4636. _ struct{} `type:"structure"`
  4637. }
  4638. // String returns the string representation
  4639. func (s StopAssessmentRunOutput) String() string {
  4640. return awsutil.Prettify(s)
  4641. }
  4642. // GoString returns the string representation
  4643. func (s StopAssessmentRunOutput) GoString() string {
  4644. return s.String()
  4645. }
  4646. type SubscribeToEventInput struct {
  4647. _ struct{} `type:"structure"`
  4648. // The event for which you want to receive SNS notifications.
  4649. //
  4650. // Event is a required field
  4651. Event *string `locationName:"event" type:"string" required:"true" enum:"Event"`
  4652. // The ARN of the assessment template that is used during the event for which
  4653. // you want to receive SNS notifications.
  4654. //
  4655. // ResourceArn is a required field
  4656. ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"`
  4657. // The ARN of the SNS topic to which the SNS notifications are sent.
  4658. //
  4659. // TopicArn is a required field
  4660. TopicArn *string `locationName:"topicArn" min:"1" type:"string" required:"true"`
  4661. }
  4662. // String returns the string representation
  4663. func (s SubscribeToEventInput) String() string {
  4664. return awsutil.Prettify(s)
  4665. }
  4666. // GoString returns the string representation
  4667. func (s SubscribeToEventInput) GoString() string {
  4668. return s.String()
  4669. }
  4670. // Validate inspects the fields of the type to determine if they are valid.
  4671. func (s *SubscribeToEventInput) Validate() error {
  4672. invalidParams := request.ErrInvalidParams{Context: "SubscribeToEventInput"}
  4673. if s.Event == nil {
  4674. invalidParams.Add(request.NewErrParamRequired("Event"))
  4675. }
  4676. if s.ResourceArn == nil {
  4677. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  4678. }
  4679. if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  4680. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  4681. }
  4682. if s.TopicArn == nil {
  4683. invalidParams.Add(request.NewErrParamRequired("TopicArn"))
  4684. }
  4685. if s.TopicArn != nil && len(*s.TopicArn) < 1 {
  4686. invalidParams.Add(request.NewErrParamMinLen("TopicArn", 1))
  4687. }
  4688. if invalidParams.Len() > 0 {
  4689. return invalidParams
  4690. }
  4691. return nil
  4692. }
  4693. type SubscribeToEventOutput struct {
  4694. _ struct{} `type:"structure"`
  4695. }
  4696. // String returns the string representation
  4697. func (s SubscribeToEventOutput) String() string {
  4698. return awsutil.Prettify(s)
  4699. }
  4700. // GoString returns the string representation
  4701. func (s SubscribeToEventOutput) GoString() string {
  4702. return s.String()
  4703. }
  4704. // This data type is used as a response element in the ListEventSubscriptions
  4705. // action.
  4706. type Subscription struct {
  4707. _ struct{} `type:"structure"`
  4708. // The list of existing event subscriptions.
  4709. //
  4710. // EventSubscriptions is a required field
  4711. EventSubscriptions []*EventSubscription `locationName:"eventSubscriptions" min:"1" type:"list" required:"true"`
  4712. // The ARN of the assessment template that is used during the event for which
  4713. // the SNS notification is sent.
  4714. //
  4715. // ResourceArn is a required field
  4716. ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"`
  4717. // The ARN of the Amazon Simple Notification Service (SNS) topic to which the
  4718. // SNS notifications are sent.
  4719. //
  4720. // TopicArn is a required field
  4721. TopicArn *string `locationName:"topicArn" min:"1" type:"string" required:"true"`
  4722. }
  4723. // String returns the string representation
  4724. func (s Subscription) String() string {
  4725. return awsutil.Prettify(s)
  4726. }
  4727. // GoString returns the string representation
  4728. func (s Subscription) GoString() string {
  4729. return s.String()
  4730. }
  4731. // A key and value pair. This data type is used as a request parameter in the
  4732. // SetTagsForResource action and a response element in the ListTagsForResource
  4733. // action.
  4734. type Tag struct {
  4735. _ struct{} `type:"structure"`
  4736. // A tag key.
  4737. //
  4738. // Key is a required field
  4739. Key *string `locationName:"key" min:"1" type:"string" required:"true"`
  4740. // A value assigned to a tag key.
  4741. Value *string `locationName:"value" min:"1" type:"string"`
  4742. }
  4743. // String returns the string representation
  4744. func (s Tag) String() string {
  4745. return awsutil.Prettify(s)
  4746. }
  4747. // GoString returns the string representation
  4748. func (s Tag) GoString() string {
  4749. return s.String()
  4750. }
  4751. // Validate inspects the fields of the type to determine if they are valid.
  4752. func (s *Tag) Validate() error {
  4753. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  4754. if s.Key == nil {
  4755. invalidParams.Add(request.NewErrParamRequired("Key"))
  4756. }
  4757. if s.Key != nil && len(*s.Key) < 1 {
  4758. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  4759. }
  4760. if s.Value != nil && len(*s.Value) < 1 {
  4761. invalidParams.Add(request.NewErrParamMinLen("Value", 1))
  4762. }
  4763. if invalidParams.Len() > 0 {
  4764. return invalidParams
  4765. }
  4766. return nil
  4767. }
  4768. // The metadata about the Amazon Inspector application data metrics collected
  4769. // by the agent. This data type is used as the response element in the GetTelemetryMetadata
  4770. // action.
  4771. type TelemetryMetadata struct {
  4772. _ struct{} `type:"structure"`
  4773. // The count of messages that the agent sends to the Amazon Inspector service.
  4774. //
  4775. // Count is a required field
  4776. Count *int64 `locationName:"count" type:"long" required:"true"`
  4777. // The data size of messages that the agent sends to the Amazon Inspector service.
  4778. DataSize *int64 `locationName:"dataSize" type:"long"`
  4779. // A specific type of behavioral data that is collected by the agent.
  4780. //
  4781. // MessageType is a required field
  4782. MessageType *string `locationName:"messageType" min:"1" type:"string" required:"true"`
  4783. }
  4784. // String returns the string representation
  4785. func (s TelemetryMetadata) String() string {
  4786. return awsutil.Prettify(s)
  4787. }
  4788. // GoString returns the string representation
  4789. func (s TelemetryMetadata) GoString() string {
  4790. return s.String()
  4791. }
  4792. // This data type is used in the AssessmentRunFilter data type.
  4793. type TimestampRange struct {
  4794. _ struct{} `type:"structure"`
  4795. // The minimum value of the timestamp range.
  4796. BeginDate *time.Time `locationName:"beginDate" type:"timestamp" timestampFormat:"unix"`
  4797. // The maximum value of the timestamp range.
  4798. EndDate *time.Time `locationName:"endDate" type:"timestamp" timestampFormat:"unix"`
  4799. }
  4800. // String returns the string representation
  4801. func (s TimestampRange) String() string {
  4802. return awsutil.Prettify(s)
  4803. }
  4804. // GoString returns the string representation
  4805. func (s TimestampRange) GoString() string {
  4806. return s.String()
  4807. }
  4808. type UnsubscribeFromEventInput struct {
  4809. _ struct{} `type:"structure"`
  4810. // The event for which you want to stop receiving SNS notifications.
  4811. //
  4812. // Event is a required field
  4813. Event *string `locationName:"event" type:"string" required:"true" enum:"Event"`
  4814. // The ARN of the assessment template that is used during the event for which
  4815. // you want to stop receiving SNS notifications.
  4816. //
  4817. // ResourceArn is a required field
  4818. ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"`
  4819. // The ARN of the SNS topic to which SNS notifications are sent.
  4820. //
  4821. // TopicArn is a required field
  4822. TopicArn *string `locationName:"topicArn" min:"1" type:"string" required:"true"`
  4823. }
  4824. // String returns the string representation
  4825. func (s UnsubscribeFromEventInput) String() string {
  4826. return awsutil.Prettify(s)
  4827. }
  4828. // GoString returns the string representation
  4829. func (s UnsubscribeFromEventInput) GoString() string {
  4830. return s.String()
  4831. }
  4832. // Validate inspects the fields of the type to determine if they are valid.
  4833. func (s *UnsubscribeFromEventInput) Validate() error {
  4834. invalidParams := request.ErrInvalidParams{Context: "UnsubscribeFromEventInput"}
  4835. if s.Event == nil {
  4836. invalidParams.Add(request.NewErrParamRequired("Event"))
  4837. }
  4838. if s.ResourceArn == nil {
  4839. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  4840. }
  4841. if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  4842. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  4843. }
  4844. if s.TopicArn == nil {
  4845. invalidParams.Add(request.NewErrParamRequired("TopicArn"))
  4846. }
  4847. if s.TopicArn != nil && len(*s.TopicArn) < 1 {
  4848. invalidParams.Add(request.NewErrParamMinLen("TopicArn", 1))
  4849. }
  4850. if invalidParams.Len() > 0 {
  4851. return invalidParams
  4852. }
  4853. return nil
  4854. }
  4855. type UnsubscribeFromEventOutput struct {
  4856. _ struct{} `type:"structure"`
  4857. }
  4858. // String returns the string representation
  4859. func (s UnsubscribeFromEventOutput) String() string {
  4860. return awsutil.Prettify(s)
  4861. }
  4862. // GoString returns the string representation
  4863. func (s UnsubscribeFromEventOutput) GoString() string {
  4864. return s.String()
  4865. }
  4866. type UpdateAssessmentTargetInput struct {
  4867. _ struct{} `type:"structure"`
  4868. // The ARN of the assessment target that you want to update.
  4869. //
  4870. // AssessmentTargetArn is a required field
  4871. AssessmentTargetArn *string `locationName:"assessmentTargetArn" min:"1" type:"string" required:"true"`
  4872. // The name of the assessment target that you want to update.
  4873. //
  4874. // AssessmentTargetName is a required field
  4875. AssessmentTargetName *string `locationName:"assessmentTargetName" min:"1" type:"string" required:"true"`
  4876. // The ARN of the resource group that is used to specify the new resource group
  4877. // to associate with the assessment target.
  4878. //
  4879. // ResourceGroupArn is a required field
  4880. ResourceGroupArn *string `locationName:"resourceGroupArn" min:"1" type:"string" required:"true"`
  4881. }
  4882. // String returns the string representation
  4883. func (s UpdateAssessmentTargetInput) String() string {
  4884. return awsutil.Prettify(s)
  4885. }
  4886. // GoString returns the string representation
  4887. func (s UpdateAssessmentTargetInput) GoString() string {
  4888. return s.String()
  4889. }
  4890. // Validate inspects the fields of the type to determine if they are valid.
  4891. func (s *UpdateAssessmentTargetInput) Validate() error {
  4892. invalidParams := request.ErrInvalidParams{Context: "UpdateAssessmentTargetInput"}
  4893. if s.AssessmentTargetArn == nil {
  4894. invalidParams.Add(request.NewErrParamRequired("AssessmentTargetArn"))
  4895. }
  4896. if s.AssessmentTargetArn != nil && len(*s.AssessmentTargetArn) < 1 {
  4897. invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetArn", 1))
  4898. }
  4899. if s.AssessmentTargetName == nil {
  4900. invalidParams.Add(request.NewErrParamRequired("AssessmentTargetName"))
  4901. }
  4902. if s.AssessmentTargetName != nil && len(*s.AssessmentTargetName) < 1 {
  4903. invalidParams.Add(request.NewErrParamMinLen("AssessmentTargetName", 1))
  4904. }
  4905. if s.ResourceGroupArn == nil {
  4906. invalidParams.Add(request.NewErrParamRequired("ResourceGroupArn"))
  4907. }
  4908. if s.ResourceGroupArn != nil && len(*s.ResourceGroupArn) < 1 {
  4909. invalidParams.Add(request.NewErrParamMinLen("ResourceGroupArn", 1))
  4910. }
  4911. if invalidParams.Len() > 0 {
  4912. return invalidParams
  4913. }
  4914. return nil
  4915. }
  4916. type UpdateAssessmentTargetOutput struct {
  4917. _ struct{} `type:"structure"`
  4918. }
  4919. // String returns the string representation
  4920. func (s UpdateAssessmentTargetOutput) String() string {
  4921. return awsutil.Prettify(s)
  4922. }
  4923. // GoString returns the string representation
  4924. func (s UpdateAssessmentTargetOutput) GoString() string {
  4925. return s.String()
  4926. }
  4927. const (
  4928. // AccessDeniedErrorCodeAccessDeniedToAssessmentTarget is a AccessDeniedErrorCode enum value
  4929. AccessDeniedErrorCodeAccessDeniedToAssessmentTarget = "ACCESS_DENIED_TO_ASSESSMENT_TARGET"
  4930. // AccessDeniedErrorCodeAccessDeniedToAssessmentTemplate is a AccessDeniedErrorCode enum value
  4931. AccessDeniedErrorCodeAccessDeniedToAssessmentTemplate = "ACCESS_DENIED_TO_ASSESSMENT_TEMPLATE"
  4932. // AccessDeniedErrorCodeAccessDeniedToAssessmentRun is a AccessDeniedErrorCode enum value
  4933. AccessDeniedErrorCodeAccessDeniedToAssessmentRun = "ACCESS_DENIED_TO_ASSESSMENT_RUN"
  4934. // AccessDeniedErrorCodeAccessDeniedToFinding is a AccessDeniedErrorCode enum value
  4935. AccessDeniedErrorCodeAccessDeniedToFinding = "ACCESS_DENIED_TO_FINDING"
  4936. // AccessDeniedErrorCodeAccessDeniedToResourceGroup is a AccessDeniedErrorCode enum value
  4937. AccessDeniedErrorCodeAccessDeniedToResourceGroup = "ACCESS_DENIED_TO_RESOURCE_GROUP"
  4938. // AccessDeniedErrorCodeAccessDeniedToRulesPackage is a AccessDeniedErrorCode enum value
  4939. AccessDeniedErrorCodeAccessDeniedToRulesPackage = "ACCESS_DENIED_TO_RULES_PACKAGE"
  4940. // AccessDeniedErrorCodeAccessDeniedToSnsTopic is a AccessDeniedErrorCode enum value
  4941. AccessDeniedErrorCodeAccessDeniedToSnsTopic = "ACCESS_DENIED_TO_SNS_TOPIC"
  4942. // AccessDeniedErrorCodeAccessDeniedToIamRole is a AccessDeniedErrorCode enum value
  4943. AccessDeniedErrorCodeAccessDeniedToIamRole = "ACCESS_DENIED_TO_IAM_ROLE"
  4944. )
  4945. const (
  4946. // AgentHealthHealthy is a AgentHealth enum value
  4947. AgentHealthHealthy = "HEALTHY"
  4948. // AgentHealthUnhealthy is a AgentHealth enum value
  4949. AgentHealthUnhealthy = "UNHEALTHY"
  4950. )
  4951. const (
  4952. // AgentHealthCodeIdle is a AgentHealthCode enum value
  4953. AgentHealthCodeIdle = "IDLE"
  4954. // AgentHealthCodeRunning is a AgentHealthCode enum value
  4955. AgentHealthCodeRunning = "RUNNING"
  4956. // AgentHealthCodeShutdown is a AgentHealthCode enum value
  4957. AgentHealthCodeShutdown = "SHUTDOWN"
  4958. // AgentHealthCodeUnhealthy is a AgentHealthCode enum value
  4959. AgentHealthCodeUnhealthy = "UNHEALTHY"
  4960. // AgentHealthCodeThrottled is a AgentHealthCode enum value
  4961. AgentHealthCodeThrottled = "THROTTLED"
  4962. // AgentHealthCodeUnknown is a AgentHealthCode enum value
  4963. AgentHealthCodeUnknown = "UNKNOWN"
  4964. )
  4965. const (
  4966. // AssessmentRunNotificationSnsStatusCodeSuccess is a AssessmentRunNotificationSnsStatusCode enum value
  4967. AssessmentRunNotificationSnsStatusCodeSuccess = "SUCCESS"
  4968. // AssessmentRunNotificationSnsStatusCodeTopicDoesNotExist is a AssessmentRunNotificationSnsStatusCode enum value
  4969. AssessmentRunNotificationSnsStatusCodeTopicDoesNotExist = "TOPIC_DOES_NOT_EXIST"
  4970. // AssessmentRunNotificationSnsStatusCodeAccessDenied is a AssessmentRunNotificationSnsStatusCode enum value
  4971. AssessmentRunNotificationSnsStatusCodeAccessDenied = "ACCESS_DENIED"
  4972. // AssessmentRunNotificationSnsStatusCodeInternalError is a AssessmentRunNotificationSnsStatusCode enum value
  4973. AssessmentRunNotificationSnsStatusCodeInternalError = "INTERNAL_ERROR"
  4974. )
  4975. const (
  4976. // AssessmentRunStateCreated is a AssessmentRunState enum value
  4977. AssessmentRunStateCreated = "CREATED"
  4978. // AssessmentRunStateStartDataCollectionPending is a AssessmentRunState enum value
  4979. AssessmentRunStateStartDataCollectionPending = "START_DATA_COLLECTION_PENDING"
  4980. // AssessmentRunStateStartDataCollectionInProgress is a AssessmentRunState enum value
  4981. AssessmentRunStateStartDataCollectionInProgress = "START_DATA_COLLECTION_IN_PROGRESS"
  4982. // AssessmentRunStateCollectingData is a AssessmentRunState enum value
  4983. AssessmentRunStateCollectingData = "COLLECTING_DATA"
  4984. // AssessmentRunStateStopDataCollectionPending is a AssessmentRunState enum value
  4985. AssessmentRunStateStopDataCollectionPending = "STOP_DATA_COLLECTION_PENDING"
  4986. // AssessmentRunStateDataCollected is a AssessmentRunState enum value
  4987. AssessmentRunStateDataCollected = "DATA_COLLECTED"
  4988. // AssessmentRunStateEvaluatingRules is a AssessmentRunState enum value
  4989. AssessmentRunStateEvaluatingRules = "EVALUATING_RULES"
  4990. // AssessmentRunStateFailed is a AssessmentRunState enum value
  4991. AssessmentRunStateFailed = "FAILED"
  4992. // AssessmentRunStateCompleted is a AssessmentRunState enum value
  4993. AssessmentRunStateCompleted = "COMPLETED"
  4994. // AssessmentRunStateCompletedWithErrors is a AssessmentRunState enum value
  4995. AssessmentRunStateCompletedWithErrors = "COMPLETED_WITH_ERRORS"
  4996. )
  4997. const (
  4998. // AssetTypeEc2Instance is a AssetType enum value
  4999. AssetTypeEc2Instance = "ec2-instance"
  5000. )
  5001. const (
  5002. // EventAssessmentRunStarted is a Event enum value
  5003. EventAssessmentRunStarted = "ASSESSMENT_RUN_STARTED"
  5004. // EventAssessmentRunCompleted is a Event enum value
  5005. EventAssessmentRunCompleted = "ASSESSMENT_RUN_COMPLETED"
  5006. // EventAssessmentRunStateChanged is a Event enum value
  5007. EventAssessmentRunStateChanged = "ASSESSMENT_RUN_STATE_CHANGED"
  5008. // EventFindingReported is a Event enum value
  5009. EventFindingReported = "FINDING_REPORTED"
  5010. // EventOther is a Event enum value
  5011. EventOther = "OTHER"
  5012. )
  5013. const (
  5014. // FailedItemErrorCodeInvalidArn is a FailedItemErrorCode enum value
  5015. FailedItemErrorCodeInvalidArn = "INVALID_ARN"
  5016. // FailedItemErrorCodeDuplicateArn is a FailedItemErrorCode enum value
  5017. FailedItemErrorCodeDuplicateArn = "DUPLICATE_ARN"
  5018. // FailedItemErrorCodeItemDoesNotExist is a FailedItemErrorCode enum value
  5019. FailedItemErrorCodeItemDoesNotExist = "ITEM_DOES_NOT_EXIST"
  5020. // FailedItemErrorCodeAccessDenied is a FailedItemErrorCode enum value
  5021. FailedItemErrorCodeAccessDenied = "ACCESS_DENIED"
  5022. // FailedItemErrorCodeLimitExceeded is a FailedItemErrorCode enum value
  5023. FailedItemErrorCodeLimitExceeded = "LIMIT_EXCEEDED"
  5024. // FailedItemErrorCodeInternalError is a FailedItemErrorCode enum value
  5025. FailedItemErrorCodeInternalError = "INTERNAL_ERROR"
  5026. )
  5027. const (
  5028. // InvalidCrossAccountRoleErrorCodeRoleDoesNotExistOrInvalidTrustRelationship is a InvalidCrossAccountRoleErrorCode enum value
  5029. InvalidCrossAccountRoleErrorCodeRoleDoesNotExistOrInvalidTrustRelationship = "ROLE_DOES_NOT_EXIST_OR_INVALID_TRUST_RELATIONSHIP"
  5030. // InvalidCrossAccountRoleErrorCodeRoleDoesNotHaveCorrectPolicy is a InvalidCrossAccountRoleErrorCode enum value
  5031. InvalidCrossAccountRoleErrorCodeRoleDoesNotHaveCorrectPolicy = "ROLE_DOES_NOT_HAVE_CORRECT_POLICY"
  5032. )
  5033. const (
  5034. // InvalidInputErrorCodeInvalidAssessmentTargetArn is a InvalidInputErrorCode enum value
  5035. InvalidInputErrorCodeInvalidAssessmentTargetArn = "INVALID_ASSESSMENT_TARGET_ARN"
  5036. // InvalidInputErrorCodeInvalidAssessmentTemplateArn is a InvalidInputErrorCode enum value
  5037. InvalidInputErrorCodeInvalidAssessmentTemplateArn = "INVALID_ASSESSMENT_TEMPLATE_ARN"
  5038. // InvalidInputErrorCodeInvalidAssessmentRunArn is a InvalidInputErrorCode enum value
  5039. InvalidInputErrorCodeInvalidAssessmentRunArn = "INVALID_ASSESSMENT_RUN_ARN"
  5040. // InvalidInputErrorCodeInvalidFindingArn is a InvalidInputErrorCode enum value
  5041. InvalidInputErrorCodeInvalidFindingArn = "INVALID_FINDING_ARN"
  5042. // InvalidInputErrorCodeInvalidResourceGroupArn is a InvalidInputErrorCode enum value
  5043. InvalidInputErrorCodeInvalidResourceGroupArn = "INVALID_RESOURCE_GROUP_ARN"
  5044. // InvalidInputErrorCodeInvalidRulesPackageArn is a InvalidInputErrorCode enum value
  5045. InvalidInputErrorCodeInvalidRulesPackageArn = "INVALID_RULES_PACKAGE_ARN"
  5046. // InvalidInputErrorCodeInvalidResourceArn is a InvalidInputErrorCode enum value
  5047. InvalidInputErrorCodeInvalidResourceArn = "INVALID_RESOURCE_ARN"
  5048. // InvalidInputErrorCodeInvalidSnsTopicArn is a InvalidInputErrorCode enum value
  5049. InvalidInputErrorCodeInvalidSnsTopicArn = "INVALID_SNS_TOPIC_ARN"
  5050. // InvalidInputErrorCodeInvalidIamRoleArn is a InvalidInputErrorCode enum value
  5051. InvalidInputErrorCodeInvalidIamRoleArn = "INVALID_IAM_ROLE_ARN"
  5052. // InvalidInputErrorCodeInvalidAssessmentTargetName is a InvalidInputErrorCode enum value
  5053. InvalidInputErrorCodeInvalidAssessmentTargetName = "INVALID_ASSESSMENT_TARGET_NAME"
  5054. // InvalidInputErrorCodeInvalidAssessmentTargetNamePattern is a InvalidInputErrorCode enum value
  5055. InvalidInputErrorCodeInvalidAssessmentTargetNamePattern = "INVALID_ASSESSMENT_TARGET_NAME_PATTERN"
  5056. // InvalidInputErrorCodeInvalidAssessmentTemplateName is a InvalidInputErrorCode enum value
  5057. InvalidInputErrorCodeInvalidAssessmentTemplateName = "INVALID_ASSESSMENT_TEMPLATE_NAME"
  5058. // InvalidInputErrorCodeInvalidAssessmentTemplateNamePattern is a InvalidInputErrorCode enum value
  5059. InvalidInputErrorCodeInvalidAssessmentTemplateNamePattern = "INVALID_ASSESSMENT_TEMPLATE_NAME_PATTERN"
  5060. // InvalidInputErrorCodeInvalidAssessmentTemplateDuration is a InvalidInputErrorCode enum value
  5061. InvalidInputErrorCodeInvalidAssessmentTemplateDuration = "INVALID_ASSESSMENT_TEMPLATE_DURATION"
  5062. // InvalidInputErrorCodeInvalidAssessmentTemplateDurationRange is a InvalidInputErrorCode enum value
  5063. InvalidInputErrorCodeInvalidAssessmentTemplateDurationRange = "INVALID_ASSESSMENT_TEMPLATE_DURATION_RANGE"
  5064. // InvalidInputErrorCodeInvalidAssessmentRunDurationRange is a InvalidInputErrorCode enum value
  5065. InvalidInputErrorCodeInvalidAssessmentRunDurationRange = "INVALID_ASSESSMENT_RUN_DURATION_RANGE"
  5066. // InvalidInputErrorCodeInvalidAssessmentRunStartTimeRange is a InvalidInputErrorCode enum value
  5067. InvalidInputErrorCodeInvalidAssessmentRunStartTimeRange = "INVALID_ASSESSMENT_RUN_START_TIME_RANGE"
  5068. // InvalidInputErrorCodeInvalidAssessmentRunCompletionTimeRange is a InvalidInputErrorCode enum value
  5069. InvalidInputErrorCodeInvalidAssessmentRunCompletionTimeRange = "INVALID_ASSESSMENT_RUN_COMPLETION_TIME_RANGE"
  5070. // InvalidInputErrorCodeInvalidAssessmentRunStateChangeTimeRange is a InvalidInputErrorCode enum value
  5071. InvalidInputErrorCodeInvalidAssessmentRunStateChangeTimeRange = "INVALID_ASSESSMENT_RUN_STATE_CHANGE_TIME_RANGE"
  5072. // InvalidInputErrorCodeInvalidAssessmentRunState is a InvalidInputErrorCode enum value
  5073. InvalidInputErrorCodeInvalidAssessmentRunState = "INVALID_ASSESSMENT_RUN_STATE"
  5074. // InvalidInputErrorCodeInvalidTag is a InvalidInputErrorCode enum value
  5075. InvalidInputErrorCodeInvalidTag = "INVALID_TAG"
  5076. // InvalidInputErrorCodeInvalidTagKey is a InvalidInputErrorCode enum value
  5077. InvalidInputErrorCodeInvalidTagKey = "INVALID_TAG_KEY"
  5078. // InvalidInputErrorCodeInvalidTagValue is a InvalidInputErrorCode enum value
  5079. InvalidInputErrorCodeInvalidTagValue = "INVALID_TAG_VALUE"
  5080. // InvalidInputErrorCodeInvalidResourceGroupTagKey is a InvalidInputErrorCode enum value
  5081. InvalidInputErrorCodeInvalidResourceGroupTagKey = "INVALID_RESOURCE_GROUP_TAG_KEY"
  5082. // InvalidInputErrorCodeInvalidResourceGroupTagValue is a InvalidInputErrorCode enum value
  5083. InvalidInputErrorCodeInvalidResourceGroupTagValue = "INVALID_RESOURCE_GROUP_TAG_VALUE"
  5084. // InvalidInputErrorCodeInvalidAttribute is a InvalidInputErrorCode enum value
  5085. InvalidInputErrorCodeInvalidAttribute = "INVALID_ATTRIBUTE"
  5086. // InvalidInputErrorCodeInvalidUserAttribute is a InvalidInputErrorCode enum value
  5087. InvalidInputErrorCodeInvalidUserAttribute = "INVALID_USER_ATTRIBUTE"
  5088. // InvalidInputErrorCodeInvalidUserAttributeKey is a InvalidInputErrorCode enum value
  5089. InvalidInputErrorCodeInvalidUserAttributeKey = "INVALID_USER_ATTRIBUTE_KEY"
  5090. // InvalidInputErrorCodeInvalidUserAttributeValue is a InvalidInputErrorCode enum value
  5091. InvalidInputErrorCodeInvalidUserAttributeValue = "INVALID_USER_ATTRIBUTE_VALUE"
  5092. // InvalidInputErrorCodeInvalidPaginationToken is a InvalidInputErrorCode enum value
  5093. InvalidInputErrorCodeInvalidPaginationToken = "INVALID_PAGINATION_TOKEN"
  5094. // InvalidInputErrorCodeInvalidMaxResults is a InvalidInputErrorCode enum value
  5095. InvalidInputErrorCodeInvalidMaxResults = "INVALID_MAX_RESULTS"
  5096. // InvalidInputErrorCodeInvalidAgentId is a InvalidInputErrorCode enum value
  5097. InvalidInputErrorCodeInvalidAgentId = "INVALID_AGENT_ID"
  5098. // InvalidInputErrorCodeInvalidAutoScalingGroup is a InvalidInputErrorCode enum value
  5099. InvalidInputErrorCodeInvalidAutoScalingGroup = "INVALID_AUTO_SCALING_GROUP"
  5100. // InvalidInputErrorCodeInvalidRuleName is a InvalidInputErrorCode enum value
  5101. InvalidInputErrorCodeInvalidRuleName = "INVALID_RULE_NAME"
  5102. // InvalidInputErrorCodeInvalidSeverity is a InvalidInputErrorCode enum value
  5103. InvalidInputErrorCodeInvalidSeverity = "INVALID_SEVERITY"
  5104. // InvalidInputErrorCodeInvalidLocale is a InvalidInputErrorCode enum value
  5105. InvalidInputErrorCodeInvalidLocale = "INVALID_LOCALE"
  5106. // InvalidInputErrorCodeInvalidEvent is a InvalidInputErrorCode enum value
  5107. InvalidInputErrorCodeInvalidEvent = "INVALID_EVENT"
  5108. // InvalidInputErrorCodeAssessmentTargetNameAlreadyTaken is a InvalidInputErrorCode enum value
  5109. InvalidInputErrorCodeAssessmentTargetNameAlreadyTaken = "ASSESSMENT_TARGET_NAME_ALREADY_TAKEN"
  5110. // InvalidInputErrorCodeAssessmentTemplateNameAlreadyTaken is a InvalidInputErrorCode enum value
  5111. InvalidInputErrorCodeAssessmentTemplateNameAlreadyTaken = "ASSESSMENT_TEMPLATE_NAME_ALREADY_TAKEN"
  5112. // InvalidInputErrorCodeInvalidNumberOfAssessmentTargetArns is a InvalidInputErrorCode enum value
  5113. InvalidInputErrorCodeInvalidNumberOfAssessmentTargetArns = "INVALID_NUMBER_OF_ASSESSMENT_TARGET_ARNS"
  5114. // InvalidInputErrorCodeInvalidNumberOfAssessmentTemplateArns is a InvalidInputErrorCode enum value
  5115. InvalidInputErrorCodeInvalidNumberOfAssessmentTemplateArns = "INVALID_NUMBER_OF_ASSESSMENT_TEMPLATE_ARNS"
  5116. // InvalidInputErrorCodeInvalidNumberOfAssessmentRunArns is a InvalidInputErrorCode enum value
  5117. InvalidInputErrorCodeInvalidNumberOfAssessmentRunArns = "INVALID_NUMBER_OF_ASSESSMENT_RUN_ARNS"
  5118. // InvalidInputErrorCodeInvalidNumberOfFindingArns is a InvalidInputErrorCode enum value
  5119. InvalidInputErrorCodeInvalidNumberOfFindingArns = "INVALID_NUMBER_OF_FINDING_ARNS"
  5120. // InvalidInputErrorCodeInvalidNumberOfResourceGroupArns is a InvalidInputErrorCode enum value
  5121. InvalidInputErrorCodeInvalidNumberOfResourceGroupArns = "INVALID_NUMBER_OF_RESOURCE_GROUP_ARNS"
  5122. // InvalidInputErrorCodeInvalidNumberOfRulesPackageArns is a InvalidInputErrorCode enum value
  5123. InvalidInputErrorCodeInvalidNumberOfRulesPackageArns = "INVALID_NUMBER_OF_RULES_PACKAGE_ARNS"
  5124. // InvalidInputErrorCodeInvalidNumberOfAssessmentRunStates is a InvalidInputErrorCode enum value
  5125. InvalidInputErrorCodeInvalidNumberOfAssessmentRunStates = "INVALID_NUMBER_OF_ASSESSMENT_RUN_STATES"
  5126. // InvalidInputErrorCodeInvalidNumberOfTags is a InvalidInputErrorCode enum value
  5127. InvalidInputErrorCodeInvalidNumberOfTags = "INVALID_NUMBER_OF_TAGS"
  5128. // InvalidInputErrorCodeInvalidNumberOfResourceGroupTags is a InvalidInputErrorCode enum value
  5129. InvalidInputErrorCodeInvalidNumberOfResourceGroupTags = "INVALID_NUMBER_OF_RESOURCE_GROUP_TAGS"
  5130. // InvalidInputErrorCodeInvalidNumberOfAttributes is a InvalidInputErrorCode enum value
  5131. InvalidInputErrorCodeInvalidNumberOfAttributes = "INVALID_NUMBER_OF_ATTRIBUTES"
  5132. // InvalidInputErrorCodeInvalidNumberOfUserAttributes is a InvalidInputErrorCode enum value
  5133. InvalidInputErrorCodeInvalidNumberOfUserAttributes = "INVALID_NUMBER_OF_USER_ATTRIBUTES"
  5134. // InvalidInputErrorCodeInvalidNumberOfAgentIds is a InvalidInputErrorCode enum value
  5135. InvalidInputErrorCodeInvalidNumberOfAgentIds = "INVALID_NUMBER_OF_AGENT_IDS"
  5136. // InvalidInputErrorCodeInvalidNumberOfAutoScalingGroups is a InvalidInputErrorCode enum value
  5137. InvalidInputErrorCodeInvalidNumberOfAutoScalingGroups = "INVALID_NUMBER_OF_AUTO_SCALING_GROUPS"
  5138. // InvalidInputErrorCodeInvalidNumberOfRuleNames is a InvalidInputErrorCode enum value
  5139. InvalidInputErrorCodeInvalidNumberOfRuleNames = "INVALID_NUMBER_OF_RULE_NAMES"
  5140. // InvalidInputErrorCodeInvalidNumberOfSeverities is a InvalidInputErrorCode enum value
  5141. InvalidInputErrorCodeInvalidNumberOfSeverities = "INVALID_NUMBER_OF_SEVERITIES"
  5142. )
  5143. const (
  5144. // LimitExceededErrorCodeAssessmentTargetLimitExceeded is a LimitExceededErrorCode enum value
  5145. LimitExceededErrorCodeAssessmentTargetLimitExceeded = "ASSESSMENT_TARGET_LIMIT_EXCEEDED"
  5146. // LimitExceededErrorCodeAssessmentTemplateLimitExceeded is a LimitExceededErrorCode enum value
  5147. LimitExceededErrorCodeAssessmentTemplateLimitExceeded = "ASSESSMENT_TEMPLATE_LIMIT_EXCEEDED"
  5148. // LimitExceededErrorCodeAssessmentRunLimitExceeded is a LimitExceededErrorCode enum value
  5149. LimitExceededErrorCodeAssessmentRunLimitExceeded = "ASSESSMENT_RUN_LIMIT_EXCEEDED"
  5150. // LimitExceededErrorCodeResourceGroupLimitExceeded is a LimitExceededErrorCode enum value
  5151. LimitExceededErrorCodeResourceGroupLimitExceeded = "RESOURCE_GROUP_LIMIT_EXCEEDED"
  5152. // LimitExceededErrorCodeEventSubscriptionLimitExceeded is a LimitExceededErrorCode enum value
  5153. LimitExceededErrorCodeEventSubscriptionLimitExceeded = "EVENT_SUBSCRIPTION_LIMIT_EXCEEDED"
  5154. )
  5155. const (
  5156. // LocaleEnUs is a Locale enum value
  5157. LocaleEnUs = "EN_US"
  5158. )
  5159. const (
  5160. // NoSuchEntityErrorCodeAssessmentTargetDoesNotExist is a NoSuchEntityErrorCode enum value
  5161. NoSuchEntityErrorCodeAssessmentTargetDoesNotExist = "ASSESSMENT_TARGET_DOES_NOT_EXIST"
  5162. // NoSuchEntityErrorCodeAssessmentTemplateDoesNotExist is a NoSuchEntityErrorCode enum value
  5163. NoSuchEntityErrorCodeAssessmentTemplateDoesNotExist = "ASSESSMENT_TEMPLATE_DOES_NOT_EXIST"
  5164. // NoSuchEntityErrorCodeAssessmentRunDoesNotExist is a NoSuchEntityErrorCode enum value
  5165. NoSuchEntityErrorCodeAssessmentRunDoesNotExist = "ASSESSMENT_RUN_DOES_NOT_EXIST"
  5166. // NoSuchEntityErrorCodeFindingDoesNotExist is a NoSuchEntityErrorCode enum value
  5167. NoSuchEntityErrorCodeFindingDoesNotExist = "FINDING_DOES_NOT_EXIST"
  5168. // NoSuchEntityErrorCodeResourceGroupDoesNotExist is a NoSuchEntityErrorCode enum value
  5169. NoSuchEntityErrorCodeResourceGroupDoesNotExist = "RESOURCE_GROUP_DOES_NOT_EXIST"
  5170. // NoSuchEntityErrorCodeRulesPackageDoesNotExist is a NoSuchEntityErrorCode enum value
  5171. NoSuchEntityErrorCodeRulesPackageDoesNotExist = "RULES_PACKAGE_DOES_NOT_EXIST"
  5172. // NoSuchEntityErrorCodeSnsTopicDoesNotExist is a NoSuchEntityErrorCode enum value
  5173. NoSuchEntityErrorCodeSnsTopicDoesNotExist = "SNS_TOPIC_DOES_NOT_EXIST"
  5174. // NoSuchEntityErrorCodeIamRoleDoesNotExist is a NoSuchEntityErrorCode enum value
  5175. NoSuchEntityErrorCodeIamRoleDoesNotExist = "IAM_ROLE_DOES_NOT_EXIST"
  5176. )
  5177. const (
  5178. // SeverityLow is a Severity enum value
  5179. SeverityLow = "Low"
  5180. // SeverityMedium is a Severity enum value
  5181. SeverityMedium = "Medium"
  5182. // SeverityHigh is a Severity enum value
  5183. SeverityHigh = "High"
  5184. // SeverityInformational is a Severity enum value
  5185. SeverityInformational = "Informational"
  5186. // SeverityUndefined is a Severity enum value
  5187. SeverityUndefined = "Undefined"
  5188. )