api.go 168 KB

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