api.go 155 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package ssm provides a client for Amazon Simple Systems Management Service.
  3. package ssm
  4. import (
  5. "fmt"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. )
  10. const opAddTagsToResource = "AddTagsToResource"
  11. // AddTagsToResourceRequest generates a "aws/request.Request" representing the
  12. // client's request for the AddTagsToResource operation. The "output" return
  13. // value can be used to capture response data after the request's "Send" method
  14. // is called.
  15. //
  16. // See AddTagsToResource for usage and error information.
  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 AddTagsToResource 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 AddTagsToResourceRequest method.
  28. // req, resp := client.AddTagsToResourceRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. func (c *SSM) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *request.Request, output *AddTagsToResourceOutput) {
  36. op := &request.Operation{
  37. Name: opAddTagsToResource,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/",
  40. }
  41. if input == nil {
  42. input = &AddTagsToResourceInput{}
  43. }
  44. req = c.newRequest(op, input, output)
  45. output = &AddTagsToResourceOutput{}
  46. req.Data = output
  47. return
  48. }
  49. // AddTagsToResource API operation for Amazon Simple Systems Management Service.
  50. //
  51. // Adds or overwrites one or more tags for the specified resource. Tags are
  52. // metadata that you assign to your managed instances. Tags enable you to categorize
  53. // your managed instances in different ways, for example, by purpose, owner,
  54. // or environment. Each tag consists of a key and an optional value, both of
  55. // which you define. For example, you could define a set of tags for your account's
  56. // managed instances that helps you track each instance's owner and stack level.
  57. // For example: Key=Owner and Value=DbAdmin, SysAdmin, or Dev. Or Key=Stack
  58. // and Value=Production, Pre-Production, or Test. Each resource can have a maximum
  59. // of 10 tags.
  60. //
  61. // We recommend that you devise a set of tag keys that meets your needs for
  62. // each resource type. Using a consistent set of tag keys makes it easier for
  63. // you to manage your resources. You can search and filter the resources based
  64. // on the tags you add. Tags don't have any semantic meaning to Amazon EC2 and
  65. // are interpreted strictly as a string of characters.
  66. //
  67. // For more information about tags, see Tagging Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html)
  68. // in the Amazon EC2 User Guide.
  69. //
  70. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  71. // with awserr.Error's Code and Message methods to get detailed information about
  72. // the error.
  73. //
  74. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  75. // API operation AddTagsToResource for usage and error information.
  76. //
  77. // Returned Error Codes:
  78. // * InvalidResourceType
  79. // The resource type is not valid. If you are attempting to tag an instance,
  80. // the instance must be a registered, managed instance.
  81. //
  82. // * InvalidResourceId
  83. // The resource ID is not valid. Verify that you entered the correct ID and
  84. // try again.
  85. //
  86. // * InternalServerError
  87. // An error occurred on the server side.
  88. //
  89. func (c *SSM) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) {
  90. req, out := c.AddTagsToResourceRequest(input)
  91. err := req.Send()
  92. return out, err
  93. }
  94. const opCancelCommand = "CancelCommand"
  95. // CancelCommandRequest generates a "aws/request.Request" representing the
  96. // client's request for the CancelCommand operation. The "output" return
  97. // value can be used to capture response data after the request's "Send" method
  98. // is called.
  99. //
  100. // See CancelCommand for usage and error information.
  101. //
  102. // Creating a request object using this method should be used when you want to inject
  103. // custom logic into the request's lifecycle using a custom handler, or if you want to
  104. // access properties on the request object before or after sending the request. If
  105. // you just want the service response, call the CancelCommand method directly
  106. // instead.
  107. //
  108. // Note: You must call the "Send" method on the returned request object in order
  109. // to execute the request.
  110. //
  111. // // Example sending a request using the CancelCommandRequest method.
  112. // req, resp := client.CancelCommandRequest(params)
  113. //
  114. // err := req.Send()
  115. // if err == nil { // resp is now filled
  116. // fmt.Println(resp)
  117. // }
  118. //
  119. func (c *SSM) CancelCommandRequest(input *CancelCommandInput) (req *request.Request, output *CancelCommandOutput) {
  120. op := &request.Operation{
  121. Name: opCancelCommand,
  122. HTTPMethod: "POST",
  123. HTTPPath: "/",
  124. }
  125. if input == nil {
  126. input = &CancelCommandInput{}
  127. }
  128. req = c.newRequest(op, input, output)
  129. output = &CancelCommandOutput{}
  130. req.Data = output
  131. return
  132. }
  133. // CancelCommand API operation for Amazon Simple Systems Management Service.
  134. //
  135. // Attempts to cancel the command specified by the Command ID. There is no guarantee
  136. // that the command will be terminated and the underlying process stopped.
  137. //
  138. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  139. // with awserr.Error's Code and Message methods to get detailed information about
  140. // the error.
  141. //
  142. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  143. // API operation CancelCommand for usage and error information.
  144. //
  145. // Returned Error Codes:
  146. // * InternalServerError
  147. // An error occurred on the server side.
  148. //
  149. // * InvalidCommandId
  150. //
  151. // * InvalidInstanceId
  152. // The instance is not in valid state. Valid states are: Running, Pending, Stopped,
  153. // Stopping. Invalid states are: Shutting-down and Terminated.
  154. //
  155. // * DuplicateInstanceId
  156. // You cannot specify an instance ID in more than one association.
  157. //
  158. func (c *SSM) CancelCommand(input *CancelCommandInput) (*CancelCommandOutput, error) {
  159. req, out := c.CancelCommandRequest(input)
  160. err := req.Send()
  161. return out, err
  162. }
  163. const opCreateActivation = "CreateActivation"
  164. // CreateActivationRequest generates a "aws/request.Request" representing the
  165. // client's request for the CreateActivation operation. The "output" return
  166. // value can be used to capture response data after the request's "Send" method
  167. // is called.
  168. //
  169. // See CreateActivation for usage and error information.
  170. //
  171. // Creating a request object using this method should be used when you want to inject
  172. // custom logic into the request's lifecycle using a custom handler, or if you want to
  173. // access properties on the request object before or after sending the request. If
  174. // you just want the service response, call the CreateActivation method directly
  175. // instead.
  176. //
  177. // Note: You must call the "Send" method on the returned request object in order
  178. // to execute the request.
  179. //
  180. // // Example sending a request using the CreateActivationRequest method.
  181. // req, resp := client.CreateActivationRequest(params)
  182. //
  183. // err := req.Send()
  184. // if err == nil { // resp is now filled
  185. // fmt.Println(resp)
  186. // }
  187. //
  188. func (c *SSM) CreateActivationRequest(input *CreateActivationInput) (req *request.Request, output *CreateActivationOutput) {
  189. op := &request.Operation{
  190. Name: opCreateActivation,
  191. HTTPMethod: "POST",
  192. HTTPPath: "/",
  193. }
  194. if input == nil {
  195. input = &CreateActivationInput{}
  196. }
  197. req = c.newRequest(op, input, output)
  198. output = &CreateActivationOutput{}
  199. req.Data = output
  200. return
  201. }
  202. // CreateActivation API operation for Amazon Simple Systems Management Service.
  203. //
  204. // Registers your on-premises server or virtual machine with Amazon EC2 so that
  205. // you can manage these resources using Run Command. An on-premises server or
  206. // virtual machine that has been registered with EC2 is called a managed instance.
  207. // For more information about activations, see Setting Up Managed Instances
  208. // (Linux) (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/managed-instances.html)
  209. // or Setting Up Managed Instances (Windows) (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/managed-instances.html)
  210. // in the Amazon EC2 User Guide.
  211. //
  212. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  213. // with awserr.Error's Code and Message methods to get detailed information about
  214. // the error.
  215. //
  216. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  217. // API operation CreateActivation for usage and error information.
  218. //
  219. // Returned Error Codes:
  220. // * InternalServerError
  221. // An error occurred on the server side.
  222. //
  223. func (c *SSM) CreateActivation(input *CreateActivationInput) (*CreateActivationOutput, error) {
  224. req, out := c.CreateActivationRequest(input)
  225. err := req.Send()
  226. return out, err
  227. }
  228. const opCreateAssociation = "CreateAssociation"
  229. // CreateAssociationRequest generates a "aws/request.Request" representing the
  230. // client's request for the CreateAssociation operation. The "output" return
  231. // value can be used to capture response data after the request's "Send" method
  232. // is called.
  233. //
  234. // See CreateAssociation for usage and error information.
  235. //
  236. // Creating a request object using this method should be used when you want to inject
  237. // custom logic into the request's lifecycle using a custom handler, or if you want to
  238. // access properties on the request object before or after sending the request. If
  239. // you just want the service response, call the CreateAssociation method directly
  240. // instead.
  241. //
  242. // Note: You must call the "Send" method on the returned request object in order
  243. // to execute the request.
  244. //
  245. // // Example sending a request using the CreateAssociationRequest method.
  246. // req, resp := client.CreateAssociationRequest(params)
  247. //
  248. // err := req.Send()
  249. // if err == nil { // resp is now filled
  250. // fmt.Println(resp)
  251. // }
  252. //
  253. func (c *SSM) CreateAssociationRequest(input *CreateAssociationInput) (req *request.Request, output *CreateAssociationOutput) {
  254. op := &request.Operation{
  255. Name: opCreateAssociation,
  256. HTTPMethod: "POST",
  257. HTTPPath: "/",
  258. }
  259. if input == nil {
  260. input = &CreateAssociationInput{}
  261. }
  262. req = c.newRequest(op, input, output)
  263. output = &CreateAssociationOutput{}
  264. req.Data = output
  265. return
  266. }
  267. // CreateAssociation API operation for Amazon Simple Systems Management Service.
  268. //
  269. // Associates the specified SSM document with the specified instance.
  270. //
  271. // When you associate an SSM document with an instance, the configuration agent
  272. // on the instance (SSM agent for Linux and EC2Config service for Windows) processes
  273. // the document and configures the instance as specified.
  274. //
  275. // If you associate a document with an instance that already has an associated
  276. // document, the system throws the AssociationAlreadyExists exception.
  277. //
  278. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  279. // with awserr.Error's Code and Message methods to get detailed information about
  280. // the error.
  281. //
  282. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  283. // API operation CreateAssociation for usage and error information.
  284. //
  285. // Returned Error Codes:
  286. // * AssociationAlreadyExists
  287. // The specified association already exists.
  288. //
  289. // * AssociationLimitExceeded
  290. // You can have at most 2,000 active associations.
  291. //
  292. // * InternalServerError
  293. // An error occurred on the server side.
  294. //
  295. // * InvalidDocument
  296. // The specified document does not exist.
  297. //
  298. // * InvalidInstanceId
  299. // The instance is not in valid state. Valid states are: Running, Pending, Stopped,
  300. // Stopping. Invalid states are: Shutting-down and Terminated.
  301. //
  302. // * UnsupportedPlatformType
  303. // The document does not support the platform type of the given instance ID(s).
  304. // For example, you sent an SSM document for a Windows instance to a Linux instance.
  305. //
  306. // * InvalidParameters
  307. // You must specify values for all required parameters in the SSM document.
  308. // You can only supply values to parameters defined in the SSM document.
  309. //
  310. func (c *SSM) CreateAssociation(input *CreateAssociationInput) (*CreateAssociationOutput, error) {
  311. req, out := c.CreateAssociationRequest(input)
  312. err := req.Send()
  313. return out, err
  314. }
  315. const opCreateAssociationBatch = "CreateAssociationBatch"
  316. // CreateAssociationBatchRequest generates a "aws/request.Request" representing the
  317. // client's request for the CreateAssociationBatch operation. The "output" return
  318. // value can be used to capture response data after the request's "Send" method
  319. // is called.
  320. //
  321. // See CreateAssociationBatch for usage and error information.
  322. //
  323. // Creating a request object using this method should be used when you want to inject
  324. // custom logic into the request's lifecycle using a custom handler, or if you want to
  325. // access properties on the request object before or after sending the request. If
  326. // you just want the service response, call the CreateAssociationBatch method directly
  327. // instead.
  328. //
  329. // Note: You must call the "Send" method on the returned request object in order
  330. // to execute the request.
  331. //
  332. // // Example sending a request using the CreateAssociationBatchRequest method.
  333. // req, resp := client.CreateAssociationBatchRequest(params)
  334. //
  335. // err := req.Send()
  336. // if err == nil { // resp is now filled
  337. // fmt.Println(resp)
  338. // }
  339. //
  340. func (c *SSM) CreateAssociationBatchRequest(input *CreateAssociationBatchInput) (req *request.Request, output *CreateAssociationBatchOutput) {
  341. op := &request.Operation{
  342. Name: opCreateAssociationBatch,
  343. HTTPMethod: "POST",
  344. HTTPPath: "/",
  345. }
  346. if input == nil {
  347. input = &CreateAssociationBatchInput{}
  348. }
  349. req = c.newRequest(op, input, output)
  350. output = &CreateAssociationBatchOutput{}
  351. req.Data = output
  352. return
  353. }
  354. // CreateAssociationBatch API operation for Amazon Simple Systems Management Service.
  355. //
  356. // Associates the specified SSM document with the specified instances.
  357. //
  358. // When you associate an SSM document with an instance, the configuration agent
  359. // on the instance (SSM agent for Linux and EC2Config service for Windows) processes
  360. // the document and configures the instance as specified.
  361. //
  362. // If you associate a document with an instance that already has an associated
  363. // document, the system throws the AssociationAlreadyExists exception.
  364. //
  365. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  366. // with awserr.Error's Code and Message methods to get detailed information about
  367. // the error.
  368. //
  369. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  370. // API operation CreateAssociationBatch for usage and error information.
  371. //
  372. // Returned Error Codes:
  373. // * InternalServerError
  374. // An error occurred on the server side.
  375. //
  376. // * InvalidDocument
  377. // The specified document does not exist.
  378. //
  379. // * InvalidInstanceId
  380. // The instance is not in valid state. Valid states are: Running, Pending, Stopped,
  381. // Stopping. Invalid states are: Shutting-down and Terminated.
  382. //
  383. // * InvalidParameters
  384. // You must specify values for all required parameters in the SSM document.
  385. // You can only supply values to parameters defined in the SSM document.
  386. //
  387. // * DuplicateInstanceId
  388. // You cannot specify an instance ID in more than one association.
  389. //
  390. // * AssociationLimitExceeded
  391. // You can have at most 2,000 active associations.
  392. //
  393. // * UnsupportedPlatformType
  394. // The document does not support the platform type of the given instance ID(s).
  395. // For example, you sent an SSM document for a Windows instance to a Linux instance.
  396. //
  397. func (c *SSM) CreateAssociationBatch(input *CreateAssociationBatchInput) (*CreateAssociationBatchOutput, error) {
  398. req, out := c.CreateAssociationBatchRequest(input)
  399. err := req.Send()
  400. return out, err
  401. }
  402. const opCreateDocument = "CreateDocument"
  403. // CreateDocumentRequest generates a "aws/request.Request" representing the
  404. // client's request for the CreateDocument operation. The "output" return
  405. // value can be used to capture response data after the request's "Send" method
  406. // is called.
  407. //
  408. // See CreateDocument for usage and error information.
  409. //
  410. // Creating a request object using this method should be used when you want to inject
  411. // custom logic into the request's lifecycle using a custom handler, or if you want to
  412. // access properties on the request object before or after sending the request. If
  413. // you just want the service response, call the CreateDocument method directly
  414. // instead.
  415. //
  416. // Note: You must call the "Send" method on the returned request object in order
  417. // to execute the request.
  418. //
  419. // // Example sending a request using the CreateDocumentRequest method.
  420. // req, resp := client.CreateDocumentRequest(params)
  421. //
  422. // err := req.Send()
  423. // if err == nil { // resp is now filled
  424. // fmt.Println(resp)
  425. // }
  426. //
  427. func (c *SSM) CreateDocumentRequest(input *CreateDocumentInput) (req *request.Request, output *CreateDocumentOutput) {
  428. op := &request.Operation{
  429. Name: opCreateDocument,
  430. HTTPMethod: "POST",
  431. HTTPPath: "/",
  432. }
  433. if input == nil {
  434. input = &CreateDocumentInput{}
  435. }
  436. req = c.newRequest(op, input, output)
  437. output = &CreateDocumentOutput{}
  438. req.Data = output
  439. return
  440. }
  441. // CreateDocument API operation for Amazon Simple Systems Management Service.
  442. //
  443. // Creates an SSM document.
  444. //
  445. // After you create an SSM document, you can use CreateAssociation to associate
  446. // it with one or more running instances.
  447. //
  448. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  449. // with awserr.Error's Code and Message methods to get detailed information about
  450. // the error.
  451. //
  452. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  453. // API operation CreateDocument for usage and error information.
  454. //
  455. // Returned Error Codes:
  456. // * DocumentAlreadyExists
  457. // The specified SSM document already exists.
  458. //
  459. // * MaxDocumentSizeExceeded
  460. // The size limit of an SSM document is 64 KB.
  461. //
  462. // * InternalServerError
  463. // An error occurred on the server side.
  464. //
  465. // * InvalidDocumentContent
  466. // The content for the SSM document is not valid.
  467. //
  468. // * DocumentLimitExceeded
  469. // You can have at most 200 active SSM documents.
  470. //
  471. func (c *SSM) CreateDocument(input *CreateDocumentInput) (*CreateDocumentOutput, error) {
  472. req, out := c.CreateDocumentRequest(input)
  473. err := req.Send()
  474. return out, err
  475. }
  476. const opDeleteActivation = "DeleteActivation"
  477. // DeleteActivationRequest generates a "aws/request.Request" representing the
  478. // client's request for the DeleteActivation operation. The "output" return
  479. // value can be used to capture response data after the request's "Send" method
  480. // is called.
  481. //
  482. // See DeleteActivation for usage and error information.
  483. //
  484. // Creating a request object using this method should be used when you want to inject
  485. // custom logic into the request's lifecycle using a custom handler, or if you want to
  486. // access properties on the request object before or after sending the request. If
  487. // you just want the service response, call the DeleteActivation method directly
  488. // instead.
  489. //
  490. // Note: You must call the "Send" method on the returned request object in order
  491. // to execute the request.
  492. //
  493. // // Example sending a request using the DeleteActivationRequest method.
  494. // req, resp := client.DeleteActivationRequest(params)
  495. //
  496. // err := req.Send()
  497. // if err == nil { // resp is now filled
  498. // fmt.Println(resp)
  499. // }
  500. //
  501. func (c *SSM) DeleteActivationRequest(input *DeleteActivationInput) (req *request.Request, output *DeleteActivationOutput) {
  502. op := &request.Operation{
  503. Name: opDeleteActivation,
  504. HTTPMethod: "POST",
  505. HTTPPath: "/",
  506. }
  507. if input == nil {
  508. input = &DeleteActivationInput{}
  509. }
  510. req = c.newRequest(op, input, output)
  511. output = &DeleteActivationOutput{}
  512. req.Data = output
  513. return
  514. }
  515. // DeleteActivation API operation for Amazon Simple Systems Management Service.
  516. //
  517. // Deletes an activation. You are not required to delete an activation. If you
  518. // delete an activation, you can no longer use it to register additional managed
  519. // instances. Deleting an activation does not de-register managed instances.
  520. // You must manually de-register managed instances.
  521. //
  522. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  523. // with awserr.Error's Code and Message methods to get detailed information about
  524. // the error.
  525. //
  526. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  527. // API operation DeleteActivation for usage and error information.
  528. //
  529. // Returned Error Codes:
  530. // * InvalidActivationId
  531. // The activation ID is not valid. Verify the you entered the correct ActivationId
  532. // or ActivationCode and try again.
  533. //
  534. // * InvalidActivation
  535. // The activation is not valid. The activation might have been deleted, or the
  536. // ActivationId and the ActivationCode do not match.
  537. //
  538. // * InternalServerError
  539. // An error occurred on the server side.
  540. //
  541. func (c *SSM) DeleteActivation(input *DeleteActivationInput) (*DeleteActivationOutput, error) {
  542. req, out := c.DeleteActivationRequest(input)
  543. err := req.Send()
  544. return out, err
  545. }
  546. const opDeleteAssociation = "DeleteAssociation"
  547. // DeleteAssociationRequest generates a "aws/request.Request" representing the
  548. // client's request for the DeleteAssociation operation. The "output" return
  549. // value can be used to capture response data after the request's "Send" method
  550. // is called.
  551. //
  552. // See DeleteAssociation for usage and error information.
  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 DeleteAssociation 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 DeleteAssociationRequest method.
  564. // req, resp := client.DeleteAssociationRequest(params)
  565. //
  566. // err := req.Send()
  567. // if err == nil { // resp is now filled
  568. // fmt.Println(resp)
  569. // }
  570. //
  571. func (c *SSM) DeleteAssociationRequest(input *DeleteAssociationInput) (req *request.Request, output *DeleteAssociationOutput) {
  572. op := &request.Operation{
  573. Name: opDeleteAssociation,
  574. HTTPMethod: "POST",
  575. HTTPPath: "/",
  576. }
  577. if input == nil {
  578. input = &DeleteAssociationInput{}
  579. }
  580. req = c.newRequest(op, input, output)
  581. output = &DeleteAssociationOutput{}
  582. req.Data = output
  583. return
  584. }
  585. // DeleteAssociation API operation for Amazon Simple Systems Management Service.
  586. //
  587. // Disassociates the specified SSM document from the specified instance.
  588. //
  589. // When you disassociate an SSM document from an instance, it does not change
  590. // the configuration of the instance. To change the configuration state of an
  591. // instance after you disassociate a document, you must create a new document
  592. // with the desired configuration and associate it with the instance.
  593. //
  594. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  595. // with awserr.Error's Code and Message methods to get detailed information about
  596. // the error.
  597. //
  598. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  599. // API operation DeleteAssociation for usage and error information.
  600. //
  601. // Returned Error Codes:
  602. // * AssociationDoesNotExist
  603. // The specified association does not exist.
  604. //
  605. // * InternalServerError
  606. // An error occurred on the server side.
  607. //
  608. // * InvalidDocument
  609. // The specified document does not exist.
  610. //
  611. // * InvalidInstanceId
  612. // The instance is not in valid state. Valid states are: Running, Pending, Stopped,
  613. // Stopping. Invalid states are: Shutting-down and Terminated.
  614. //
  615. // * TooManyUpdates
  616. // There are concurrent updates for a resource that supports one update at a
  617. // time.
  618. //
  619. func (c *SSM) DeleteAssociation(input *DeleteAssociationInput) (*DeleteAssociationOutput, error) {
  620. req, out := c.DeleteAssociationRequest(input)
  621. err := req.Send()
  622. return out, err
  623. }
  624. const opDeleteDocument = "DeleteDocument"
  625. // DeleteDocumentRequest generates a "aws/request.Request" representing the
  626. // client's request for the DeleteDocument operation. The "output" return
  627. // value can be used to capture response data after the request's "Send" method
  628. // is called.
  629. //
  630. // See DeleteDocument for usage and error information.
  631. //
  632. // Creating a request object using this method should be used when you want to inject
  633. // custom logic into the request's lifecycle using a custom handler, or if you want to
  634. // access properties on the request object before or after sending the request. If
  635. // you just want the service response, call the DeleteDocument method directly
  636. // instead.
  637. //
  638. // Note: You must call the "Send" method on the returned request object in order
  639. // to execute the request.
  640. //
  641. // // Example sending a request using the DeleteDocumentRequest method.
  642. // req, resp := client.DeleteDocumentRequest(params)
  643. //
  644. // err := req.Send()
  645. // if err == nil { // resp is now filled
  646. // fmt.Println(resp)
  647. // }
  648. //
  649. func (c *SSM) DeleteDocumentRequest(input *DeleteDocumentInput) (req *request.Request, output *DeleteDocumentOutput) {
  650. op := &request.Operation{
  651. Name: opDeleteDocument,
  652. HTTPMethod: "POST",
  653. HTTPPath: "/",
  654. }
  655. if input == nil {
  656. input = &DeleteDocumentInput{}
  657. }
  658. req = c.newRequest(op, input, output)
  659. output = &DeleteDocumentOutput{}
  660. req.Data = output
  661. return
  662. }
  663. // DeleteDocument API operation for Amazon Simple Systems Management Service.
  664. //
  665. // Deletes the SSM document and all instance associations to the document.
  666. //
  667. // Before you delete the SSM document, we recommend that you use DeleteAssociation
  668. // to disassociate all instances that are associated with the document.
  669. //
  670. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  671. // with awserr.Error's Code and Message methods to get detailed information about
  672. // the error.
  673. //
  674. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  675. // API operation DeleteDocument for usage and error information.
  676. //
  677. // Returned Error Codes:
  678. // * InternalServerError
  679. // An error occurred on the server side.
  680. //
  681. // * InvalidDocument
  682. // The specified document does not exist.
  683. //
  684. // * InvalidDocumentOperation
  685. // You attempted to delete a document while it is still shared. You must stop
  686. // sharing the document before you can delete it.
  687. //
  688. // * AssociatedInstances
  689. // You must disassociate an SSM document from all instances before you can delete
  690. // it.
  691. //
  692. func (c *SSM) DeleteDocument(input *DeleteDocumentInput) (*DeleteDocumentOutput, error) {
  693. req, out := c.DeleteDocumentRequest(input)
  694. err := req.Send()
  695. return out, err
  696. }
  697. const opDeregisterManagedInstance = "DeregisterManagedInstance"
  698. // DeregisterManagedInstanceRequest generates a "aws/request.Request" representing the
  699. // client's request for the DeregisterManagedInstance operation. The "output" return
  700. // value can be used to capture response data after the request's "Send" method
  701. // is called.
  702. //
  703. // See DeregisterManagedInstance for usage and error information.
  704. //
  705. // Creating a request object using this method should be used when you want to inject
  706. // custom logic into the request's lifecycle using a custom handler, or if you want to
  707. // access properties on the request object before or after sending the request. If
  708. // you just want the service response, call the DeregisterManagedInstance method directly
  709. // instead.
  710. //
  711. // Note: You must call the "Send" method on the returned request object in order
  712. // to execute the request.
  713. //
  714. // // Example sending a request using the DeregisterManagedInstanceRequest method.
  715. // req, resp := client.DeregisterManagedInstanceRequest(params)
  716. //
  717. // err := req.Send()
  718. // if err == nil { // resp is now filled
  719. // fmt.Println(resp)
  720. // }
  721. //
  722. func (c *SSM) DeregisterManagedInstanceRequest(input *DeregisterManagedInstanceInput) (req *request.Request, output *DeregisterManagedInstanceOutput) {
  723. op := &request.Operation{
  724. Name: opDeregisterManagedInstance,
  725. HTTPMethod: "POST",
  726. HTTPPath: "/",
  727. }
  728. if input == nil {
  729. input = &DeregisterManagedInstanceInput{}
  730. }
  731. req = c.newRequest(op, input, output)
  732. output = &DeregisterManagedInstanceOutput{}
  733. req.Data = output
  734. return
  735. }
  736. // DeregisterManagedInstance API operation for Amazon Simple Systems Management Service.
  737. //
  738. // Removes the server or virtual machine from the list of registered servers.
  739. // You can reregister the instance again at any time. If you don’t plan to use
  740. // Run Command on the server, we suggest uninstalling the SSM agent first.
  741. //
  742. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  743. // with awserr.Error's Code and Message methods to get detailed information about
  744. // the error.
  745. //
  746. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  747. // API operation DeregisterManagedInstance for usage and error information.
  748. //
  749. // Returned Error Codes:
  750. // * InvalidInstanceId
  751. // The instance is not in valid state. Valid states are: Running, Pending, Stopped,
  752. // Stopping. Invalid states are: Shutting-down and Terminated.
  753. //
  754. // * InternalServerError
  755. // An error occurred on the server side.
  756. //
  757. func (c *SSM) DeregisterManagedInstance(input *DeregisterManagedInstanceInput) (*DeregisterManagedInstanceOutput, error) {
  758. req, out := c.DeregisterManagedInstanceRequest(input)
  759. err := req.Send()
  760. return out, err
  761. }
  762. const opDescribeActivations = "DescribeActivations"
  763. // DescribeActivationsRequest generates a "aws/request.Request" representing the
  764. // client's request for the DescribeActivations operation. The "output" return
  765. // value can be used to capture response data after the request's "Send" method
  766. // is called.
  767. //
  768. // See DescribeActivations for usage and error information.
  769. //
  770. // Creating a request object using this method should be used when you want to inject
  771. // custom logic into the request's lifecycle using a custom handler, or if you want to
  772. // access properties on the request object before or after sending the request. If
  773. // you just want the service response, call the DescribeActivations method directly
  774. // instead.
  775. //
  776. // Note: You must call the "Send" method on the returned request object in order
  777. // to execute the request.
  778. //
  779. // // Example sending a request using the DescribeActivationsRequest method.
  780. // req, resp := client.DescribeActivationsRequest(params)
  781. //
  782. // err := req.Send()
  783. // if err == nil { // resp is now filled
  784. // fmt.Println(resp)
  785. // }
  786. //
  787. func (c *SSM) DescribeActivationsRequest(input *DescribeActivationsInput) (req *request.Request, output *DescribeActivationsOutput) {
  788. op := &request.Operation{
  789. Name: opDescribeActivations,
  790. HTTPMethod: "POST",
  791. HTTPPath: "/",
  792. Paginator: &request.Paginator{
  793. InputTokens: []string{"NextToken"},
  794. OutputTokens: []string{"NextToken"},
  795. LimitToken: "MaxResults",
  796. TruncationToken: "",
  797. },
  798. }
  799. if input == nil {
  800. input = &DescribeActivationsInput{}
  801. }
  802. req = c.newRequest(op, input, output)
  803. output = &DescribeActivationsOutput{}
  804. req.Data = output
  805. return
  806. }
  807. // DescribeActivations API operation for Amazon Simple Systems Management Service.
  808. //
  809. // Details about the activation, including: the date and time the activation
  810. // was created, the expiration date, the IAM role assigned to the instances
  811. // in the activation, and the number of instances activated by this registration.
  812. //
  813. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  814. // with awserr.Error's Code and Message methods to get detailed information about
  815. // the error.
  816. //
  817. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  818. // API operation DescribeActivations for usage and error information.
  819. //
  820. // Returned Error Codes:
  821. // * InvalidFilter
  822. // The filter name is not valid. Verify the you entered the correct name and
  823. // try again.
  824. //
  825. // * InvalidNextToken
  826. // The specified token is not valid.
  827. //
  828. // * InternalServerError
  829. // An error occurred on the server side.
  830. //
  831. func (c *SSM) DescribeActivations(input *DescribeActivationsInput) (*DescribeActivationsOutput, error) {
  832. req, out := c.DescribeActivationsRequest(input)
  833. err := req.Send()
  834. return out, err
  835. }
  836. // DescribeActivationsPages iterates over the pages of a DescribeActivations operation,
  837. // calling the "fn" function with the response data for each page. To stop
  838. // iterating, return false from the fn function.
  839. //
  840. // See DescribeActivations method for more information on how to use this operation.
  841. //
  842. // Note: This operation can generate multiple requests to a service.
  843. //
  844. // // Example iterating over at most 3 pages of a DescribeActivations operation.
  845. // pageNum := 0
  846. // err := client.DescribeActivationsPages(params,
  847. // func(page *DescribeActivationsOutput, lastPage bool) bool {
  848. // pageNum++
  849. // fmt.Println(page)
  850. // return pageNum <= 3
  851. // })
  852. //
  853. func (c *SSM) DescribeActivationsPages(input *DescribeActivationsInput, fn func(p *DescribeActivationsOutput, lastPage bool) (shouldContinue bool)) error {
  854. page, _ := c.DescribeActivationsRequest(input)
  855. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  856. return page.EachPage(func(p interface{}, lastPage bool) bool {
  857. return fn(p.(*DescribeActivationsOutput), lastPage)
  858. })
  859. }
  860. const opDescribeAssociation = "DescribeAssociation"
  861. // DescribeAssociationRequest generates a "aws/request.Request" representing the
  862. // client's request for the DescribeAssociation operation. The "output" return
  863. // value can be used to capture response data after the request's "Send" method
  864. // is called.
  865. //
  866. // See DescribeAssociation for usage and error information.
  867. //
  868. // Creating a request object using this method should be used when you want to inject
  869. // custom logic into the request's lifecycle using a custom handler, or if you want to
  870. // access properties on the request object before or after sending the request. If
  871. // you just want the service response, call the DescribeAssociation method directly
  872. // instead.
  873. //
  874. // Note: You must call the "Send" method on the returned request object in order
  875. // to execute the request.
  876. //
  877. // // Example sending a request using the DescribeAssociationRequest method.
  878. // req, resp := client.DescribeAssociationRequest(params)
  879. //
  880. // err := req.Send()
  881. // if err == nil { // resp is now filled
  882. // fmt.Println(resp)
  883. // }
  884. //
  885. func (c *SSM) DescribeAssociationRequest(input *DescribeAssociationInput) (req *request.Request, output *DescribeAssociationOutput) {
  886. op := &request.Operation{
  887. Name: opDescribeAssociation,
  888. HTTPMethod: "POST",
  889. HTTPPath: "/",
  890. }
  891. if input == nil {
  892. input = &DescribeAssociationInput{}
  893. }
  894. req = c.newRequest(op, input, output)
  895. output = &DescribeAssociationOutput{}
  896. req.Data = output
  897. return
  898. }
  899. // DescribeAssociation API operation for Amazon Simple Systems Management Service.
  900. //
  901. // Describes the associations for the specified SSM document or instance.
  902. //
  903. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  904. // with awserr.Error's Code and Message methods to get detailed information about
  905. // the error.
  906. //
  907. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  908. // API operation DescribeAssociation for usage and error information.
  909. //
  910. // Returned Error Codes:
  911. // * AssociationDoesNotExist
  912. // The specified association does not exist.
  913. //
  914. // * InternalServerError
  915. // An error occurred on the server side.
  916. //
  917. // * InvalidDocument
  918. // The specified document does not exist.
  919. //
  920. // * InvalidInstanceId
  921. // The instance is not in valid state. Valid states are: Running, Pending, Stopped,
  922. // Stopping. Invalid states are: Shutting-down and Terminated.
  923. //
  924. func (c *SSM) DescribeAssociation(input *DescribeAssociationInput) (*DescribeAssociationOutput, error) {
  925. req, out := c.DescribeAssociationRequest(input)
  926. err := req.Send()
  927. return out, err
  928. }
  929. const opDescribeDocument = "DescribeDocument"
  930. // DescribeDocumentRequest generates a "aws/request.Request" representing the
  931. // client's request for the DescribeDocument operation. The "output" return
  932. // value can be used to capture response data after the request's "Send" method
  933. // is called.
  934. //
  935. // See DescribeDocument for usage and error information.
  936. //
  937. // Creating a request object using this method should be used when you want to inject
  938. // custom logic into the request's lifecycle using a custom handler, or if you want to
  939. // access properties on the request object before or after sending the request. If
  940. // you just want the service response, call the DescribeDocument method directly
  941. // instead.
  942. //
  943. // Note: You must call the "Send" method on the returned request object in order
  944. // to execute the request.
  945. //
  946. // // Example sending a request using the DescribeDocumentRequest method.
  947. // req, resp := client.DescribeDocumentRequest(params)
  948. //
  949. // err := req.Send()
  950. // if err == nil { // resp is now filled
  951. // fmt.Println(resp)
  952. // }
  953. //
  954. func (c *SSM) DescribeDocumentRequest(input *DescribeDocumentInput) (req *request.Request, output *DescribeDocumentOutput) {
  955. op := &request.Operation{
  956. Name: opDescribeDocument,
  957. HTTPMethod: "POST",
  958. HTTPPath: "/",
  959. }
  960. if input == nil {
  961. input = &DescribeDocumentInput{}
  962. }
  963. req = c.newRequest(op, input, output)
  964. output = &DescribeDocumentOutput{}
  965. req.Data = output
  966. return
  967. }
  968. // DescribeDocument API operation for Amazon Simple Systems Management Service.
  969. //
  970. // Describes the specified SSM document.
  971. //
  972. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  973. // with awserr.Error's Code and Message methods to get detailed information about
  974. // the error.
  975. //
  976. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  977. // API operation DescribeDocument for usage and error information.
  978. //
  979. // Returned Error Codes:
  980. // * InternalServerError
  981. // An error occurred on the server side.
  982. //
  983. // * InvalidDocument
  984. // The specified document does not exist.
  985. //
  986. func (c *SSM) DescribeDocument(input *DescribeDocumentInput) (*DescribeDocumentOutput, error) {
  987. req, out := c.DescribeDocumentRequest(input)
  988. err := req.Send()
  989. return out, err
  990. }
  991. const opDescribeDocumentPermission = "DescribeDocumentPermission"
  992. // DescribeDocumentPermissionRequest generates a "aws/request.Request" representing the
  993. // client's request for the DescribeDocumentPermission operation. The "output" return
  994. // value can be used to capture response data after the request's "Send" method
  995. // is called.
  996. //
  997. // See DescribeDocumentPermission for usage and error information.
  998. //
  999. // Creating a request object using this method should be used when you want to inject
  1000. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1001. // access properties on the request object before or after sending the request. If
  1002. // you just want the service response, call the DescribeDocumentPermission method directly
  1003. // instead.
  1004. //
  1005. // Note: You must call the "Send" method on the returned request object in order
  1006. // to execute the request.
  1007. //
  1008. // // Example sending a request using the DescribeDocumentPermissionRequest method.
  1009. // req, resp := client.DescribeDocumentPermissionRequest(params)
  1010. //
  1011. // err := req.Send()
  1012. // if err == nil { // resp is now filled
  1013. // fmt.Println(resp)
  1014. // }
  1015. //
  1016. func (c *SSM) DescribeDocumentPermissionRequest(input *DescribeDocumentPermissionInput) (req *request.Request, output *DescribeDocumentPermissionOutput) {
  1017. op := &request.Operation{
  1018. Name: opDescribeDocumentPermission,
  1019. HTTPMethod: "POST",
  1020. HTTPPath: "/",
  1021. }
  1022. if input == nil {
  1023. input = &DescribeDocumentPermissionInput{}
  1024. }
  1025. req = c.newRequest(op, input, output)
  1026. output = &DescribeDocumentPermissionOutput{}
  1027. req.Data = output
  1028. return
  1029. }
  1030. // DescribeDocumentPermission API operation for Amazon Simple Systems Management Service.
  1031. //
  1032. // Describes the permissions for an SSM document. If you created the document,
  1033. // you are the owner. If a document is shared, it can either be shared privately
  1034. // (by specifying a user’s AWS account ID) or publicly (All).
  1035. //
  1036. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1037. // with awserr.Error's Code and Message methods to get detailed information about
  1038. // the error.
  1039. //
  1040. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  1041. // API operation DescribeDocumentPermission for usage and error information.
  1042. //
  1043. // Returned Error Codes:
  1044. // * InternalServerError
  1045. // An error occurred on the server side.
  1046. //
  1047. // * InvalidDocument
  1048. // The specified document does not exist.
  1049. //
  1050. // * InvalidPermissionType
  1051. // The permission type is not supported. Share is the only supported permission
  1052. // type.
  1053. //
  1054. func (c *SSM) DescribeDocumentPermission(input *DescribeDocumentPermissionInput) (*DescribeDocumentPermissionOutput, error) {
  1055. req, out := c.DescribeDocumentPermissionRequest(input)
  1056. err := req.Send()
  1057. return out, err
  1058. }
  1059. const opDescribeInstanceInformation = "DescribeInstanceInformation"
  1060. // DescribeInstanceInformationRequest generates a "aws/request.Request" representing the
  1061. // client's request for the DescribeInstanceInformation operation. The "output" return
  1062. // value can be used to capture response data after the request's "Send" method
  1063. // is called.
  1064. //
  1065. // See DescribeInstanceInformation for usage and error information.
  1066. //
  1067. // Creating a request object using this method should be used when you want to inject
  1068. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1069. // access properties on the request object before or after sending the request. If
  1070. // you just want the service response, call the DescribeInstanceInformation method directly
  1071. // instead.
  1072. //
  1073. // Note: You must call the "Send" method on the returned request object in order
  1074. // to execute the request.
  1075. //
  1076. // // Example sending a request using the DescribeInstanceInformationRequest method.
  1077. // req, resp := client.DescribeInstanceInformationRequest(params)
  1078. //
  1079. // err := req.Send()
  1080. // if err == nil { // resp is now filled
  1081. // fmt.Println(resp)
  1082. // }
  1083. //
  1084. func (c *SSM) DescribeInstanceInformationRequest(input *DescribeInstanceInformationInput) (req *request.Request, output *DescribeInstanceInformationOutput) {
  1085. op := &request.Operation{
  1086. Name: opDescribeInstanceInformation,
  1087. HTTPMethod: "POST",
  1088. HTTPPath: "/",
  1089. Paginator: &request.Paginator{
  1090. InputTokens: []string{"NextToken"},
  1091. OutputTokens: []string{"NextToken"},
  1092. LimitToken: "MaxResults",
  1093. TruncationToken: "",
  1094. },
  1095. }
  1096. if input == nil {
  1097. input = &DescribeInstanceInformationInput{}
  1098. }
  1099. req = c.newRequest(op, input, output)
  1100. output = &DescribeInstanceInformationOutput{}
  1101. req.Data = output
  1102. return
  1103. }
  1104. // DescribeInstanceInformation API operation for Amazon Simple Systems Management Service.
  1105. //
  1106. // Describes one or more of your instances. You can use this to get information
  1107. // about instances like the operating system platform, the SSM agent version
  1108. // (Linux), status etc. If you specify one or more instance IDs, it returns
  1109. // information for those instances. If you do not specify instance IDs, it returns
  1110. // information for all your instances. If you specify an instance ID that is
  1111. // not valid or an instance that you do not own, you receive an error.
  1112. //
  1113. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1114. // with awserr.Error's Code and Message methods to get detailed information about
  1115. // the error.
  1116. //
  1117. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  1118. // API operation DescribeInstanceInformation for usage and error information.
  1119. //
  1120. // Returned Error Codes:
  1121. // * InternalServerError
  1122. // An error occurred on the server side.
  1123. //
  1124. // * InvalidInstanceId
  1125. // The instance is not in valid state. Valid states are: Running, Pending, Stopped,
  1126. // Stopping. Invalid states are: Shutting-down and Terminated.
  1127. //
  1128. // * InvalidNextToken
  1129. // The specified token is not valid.
  1130. //
  1131. // * InvalidInstanceInformationFilterValue
  1132. // The specified filter value is not valid.
  1133. //
  1134. // * InvalidFilterKey
  1135. // The specified key is not valid.
  1136. //
  1137. func (c *SSM) DescribeInstanceInformation(input *DescribeInstanceInformationInput) (*DescribeInstanceInformationOutput, error) {
  1138. req, out := c.DescribeInstanceInformationRequest(input)
  1139. err := req.Send()
  1140. return out, err
  1141. }
  1142. // DescribeInstanceInformationPages iterates over the pages of a DescribeInstanceInformation operation,
  1143. // calling the "fn" function with the response data for each page. To stop
  1144. // iterating, return false from the fn function.
  1145. //
  1146. // See DescribeInstanceInformation method for more information on how to use this operation.
  1147. //
  1148. // Note: This operation can generate multiple requests to a service.
  1149. //
  1150. // // Example iterating over at most 3 pages of a DescribeInstanceInformation operation.
  1151. // pageNum := 0
  1152. // err := client.DescribeInstanceInformationPages(params,
  1153. // func(page *DescribeInstanceInformationOutput, lastPage bool) bool {
  1154. // pageNum++
  1155. // fmt.Println(page)
  1156. // return pageNum <= 3
  1157. // })
  1158. //
  1159. func (c *SSM) DescribeInstanceInformationPages(input *DescribeInstanceInformationInput, fn func(p *DescribeInstanceInformationOutput, lastPage bool) (shouldContinue bool)) error {
  1160. page, _ := c.DescribeInstanceInformationRequest(input)
  1161. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1162. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1163. return fn(p.(*DescribeInstanceInformationOutput), lastPage)
  1164. })
  1165. }
  1166. const opGetDocument = "GetDocument"
  1167. // GetDocumentRequest generates a "aws/request.Request" representing the
  1168. // client's request for the GetDocument operation. The "output" return
  1169. // value can be used to capture response data after the request's "Send" method
  1170. // is called.
  1171. //
  1172. // See GetDocument for usage and error information.
  1173. //
  1174. // Creating a request object using this method should be used when you want to inject
  1175. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1176. // access properties on the request object before or after sending the request. If
  1177. // you just want the service response, call the GetDocument method directly
  1178. // instead.
  1179. //
  1180. // Note: You must call the "Send" method on the returned request object in order
  1181. // to execute the request.
  1182. //
  1183. // // Example sending a request using the GetDocumentRequest method.
  1184. // req, resp := client.GetDocumentRequest(params)
  1185. //
  1186. // err := req.Send()
  1187. // if err == nil { // resp is now filled
  1188. // fmt.Println(resp)
  1189. // }
  1190. //
  1191. func (c *SSM) GetDocumentRequest(input *GetDocumentInput) (req *request.Request, output *GetDocumentOutput) {
  1192. op := &request.Operation{
  1193. Name: opGetDocument,
  1194. HTTPMethod: "POST",
  1195. HTTPPath: "/",
  1196. }
  1197. if input == nil {
  1198. input = &GetDocumentInput{}
  1199. }
  1200. req = c.newRequest(op, input, output)
  1201. output = &GetDocumentOutput{}
  1202. req.Data = output
  1203. return
  1204. }
  1205. // GetDocument API operation for Amazon Simple Systems Management Service.
  1206. //
  1207. // Gets the contents of the specified SSM document.
  1208. //
  1209. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1210. // with awserr.Error's Code and Message methods to get detailed information about
  1211. // the error.
  1212. //
  1213. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  1214. // API operation GetDocument for usage and error information.
  1215. //
  1216. // Returned Error Codes:
  1217. // * InternalServerError
  1218. // An error occurred on the server side.
  1219. //
  1220. // * InvalidDocument
  1221. // The specified document does not exist.
  1222. //
  1223. func (c *SSM) GetDocument(input *GetDocumentInput) (*GetDocumentOutput, error) {
  1224. req, out := c.GetDocumentRequest(input)
  1225. err := req.Send()
  1226. return out, err
  1227. }
  1228. const opListAssociations = "ListAssociations"
  1229. // ListAssociationsRequest generates a "aws/request.Request" representing the
  1230. // client's request for the ListAssociations operation. The "output" return
  1231. // value can be used to capture response data after the request's "Send" method
  1232. // is called.
  1233. //
  1234. // See ListAssociations for usage and error information.
  1235. //
  1236. // Creating a request object using this method should be used when you want to inject
  1237. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1238. // access properties on the request object before or after sending the request. If
  1239. // you just want the service response, call the ListAssociations method directly
  1240. // instead.
  1241. //
  1242. // Note: You must call the "Send" method on the returned request object in order
  1243. // to execute the request.
  1244. //
  1245. // // Example sending a request using the ListAssociationsRequest method.
  1246. // req, resp := client.ListAssociationsRequest(params)
  1247. //
  1248. // err := req.Send()
  1249. // if err == nil { // resp is now filled
  1250. // fmt.Println(resp)
  1251. // }
  1252. //
  1253. func (c *SSM) ListAssociationsRequest(input *ListAssociationsInput) (req *request.Request, output *ListAssociationsOutput) {
  1254. op := &request.Operation{
  1255. Name: opListAssociations,
  1256. HTTPMethod: "POST",
  1257. HTTPPath: "/",
  1258. Paginator: &request.Paginator{
  1259. InputTokens: []string{"NextToken"},
  1260. OutputTokens: []string{"NextToken"},
  1261. LimitToken: "MaxResults",
  1262. TruncationToken: "",
  1263. },
  1264. }
  1265. if input == nil {
  1266. input = &ListAssociationsInput{}
  1267. }
  1268. req = c.newRequest(op, input, output)
  1269. output = &ListAssociationsOutput{}
  1270. req.Data = output
  1271. return
  1272. }
  1273. // ListAssociations API operation for Amazon Simple Systems Management Service.
  1274. //
  1275. // Lists the associations for the specified SSM document or instance.
  1276. //
  1277. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1278. // with awserr.Error's Code and Message methods to get detailed information about
  1279. // the error.
  1280. //
  1281. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  1282. // API operation ListAssociations for usage and error information.
  1283. //
  1284. // Returned Error Codes:
  1285. // * InternalServerError
  1286. // An error occurred on the server side.
  1287. //
  1288. // * InvalidNextToken
  1289. // The specified token is not valid.
  1290. //
  1291. func (c *SSM) ListAssociations(input *ListAssociationsInput) (*ListAssociationsOutput, error) {
  1292. req, out := c.ListAssociationsRequest(input)
  1293. err := req.Send()
  1294. return out, err
  1295. }
  1296. // ListAssociationsPages iterates over the pages of a ListAssociations operation,
  1297. // calling the "fn" function with the response data for each page. To stop
  1298. // iterating, return false from the fn function.
  1299. //
  1300. // See ListAssociations method for more information on how to use this operation.
  1301. //
  1302. // Note: This operation can generate multiple requests to a service.
  1303. //
  1304. // // Example iterating over at most 3 pages of a ListAssociations operation.
  1305. // pageNum := 0
  1306. // err := client.ListAssociationsPages(params,
  1307. // func(page *ListAssociationsOutput, lastPage bool) bool {
  1308. // pageNum++
  1309. // fmt.Println(page)
  1310. // return pageNum <= 3
  1311. // })
  1312. //
  1313. func (c *SSM) ListAssociationsPages(input *ListAssociationsInput, fn func(p *ListAssociationsOutput, lastPage bool) (shouldContinue bool)) error {
  1314. page, _ := c.ListAssociationsRequest(input)
  1315. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1316. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1317. return fn(p.(*ListAssociationsOutput), lastPage)
  1318. })
  1319. }
  1320. const opListCommandInvocations = "ListCommandInvocations"
  1321. // ListCommandInvocationsRequest generates a "aws/request.Request" representing the
  1322. // client's request for the ListCommandInvocations operation. The "output" return
  1323. // value can be used to capture response data after the request's "Send" method
  1324. // is called.
  1325. //
  1326. // See ListCommandInvocations for usage and error information.
  1327. //
  1328. // Creating a request object using this method should be used when you want to inject
  1329. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1330. // access properties on the request object before or after sending the request. If
  1331. // you just want the service response, call the ListCommandInvocations method directly
  1332. // instead.
  1333. //
  1334. // Note: You must call the "Send" method on the returned request object in order
  1335. // to execute the request.
  1336. //
  1337. // // Example sending a request using the ListCommandInvocationsRequest method.
  1338. // req, resp := client.ListCommandInvocationsRequest(params)
  1339. //
  1340. // err := req.Send()
  1341. // if err == nil { // resp is now filled
  1342. // fmt.Println(resp)
  1343. // }
  1344. //
  1345. func (c *SSM) ListCommandInvocationsRequest(input *ListCommandInvocationsInput) (req *request.Request, output *ListCommandInvocationsOutput) {
  1346. op := &request.Operation{
  1347. Name: opListCommandInvocations,
  1348. HTTPMethod: "POST",
  1349. HTTPPath: "/",
  1350. Paginator: &request.Paginator{
  1351. InputTokens: []string{"NextToken"},
  1352. OutputTokens: []string{"NextToken"},
  1353. LimitToken: "MaxResults",
  1354. TruncationToken: "",
  1355. },
  1356. }
  1357. if input == nil {
  1358. input = &ListCommandInvocationsInput{}
  1359. }
  1360. req = c.newRequest(op, input, output)
  1361. output = &ListCommandInvocationsOutput{}
  1362. req.Data = output
  1363. return
  1364. }
  1365. // ListCommandInvocations API operation for Amazon Simple Systems Management Service.
  1366. //
  1367. // An invocation is copy of a command sent to a specific instance. A command
  1368. // can apply to one or more instances. A command invocation applies to one instance.
  1369. // For example, if a user executes SendCommand against three instances, then
  1370. // a command invocation is created for each requested instance ID. ListCommandInvocations
  1371. // provide status about command execution.
  1372. //
  1373. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1374. // with awserr.Error's Code and Message methods to get detailed information about
  1375. // the error.
  1376. //
  1377. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  1378. // API operation ListCommandInvocations for usage and error information.
  1379. //
  1380. // Returned Error Codes:
  1381. // * InternalServerError
  1382. // An error occurred on the server side.
  1383. //
  1384. // * InvalidCommandId
  1385. //
  1386. // * InvalidInstanceId
  1387. // The instance is not in valid state. Valid states are: Running, Pending, Stopped,
  1388. // Stopping. Invalid states are: Shutting-down and Terminated.
  1389. //
  1390. // * InvalidFilterKey
  1391. // The specified key is not valid.
  1392. //
  1393. // * InvalidNextToken
  1394. // The specified token is not valid.
  1395. //
  1396. func (c *SSM) ListCommandInvocations(input *ListCommandInvocationsInput) (*ListCommandInvocationsOutput, error) {
  1397. req, out := c.ListCommandInvocationsRequest(input)
  1398. err := req.Send()
  1399. return out, err
  1400. }
  1401. // ListCommandInvocationsPages iterates over the pages of a ListCommandInvocations operation,
  1402. // calling the "fn" function with the response data for each page. To stop
  1403. // iterating, return false from the fn function.
  1404. //
  1405. // See ListCommandInvocations method for more information on how to use this operation.
  1406. //
  1407. // Note: This operation can generate multiple requests to a service.
  1408. //
  1409. // // Example iterating over at most 3 pages of a ListCommandInvocations operation.
  1410. // pageNum := 0
  1411. // err := client.ListCommandInvocationsPages(params,
  1412. // func(page *ListCommandInvocationsOutput, lastPage bool) bool {
  1413. // pageNum++
  1414. // fmt.Println(page)
  1415. // return pageNum <= 3
  1416. // })
  1417. //
  1418. func (c *SSM) ListCommandInvocationsPages(input *ListCommandInvocationsInput, fn func(p *ListCommandInvocationsOutput, lastPage bool) (shouldContinue bool)) error {
  1419. page, _ := c.ListCommandInvocationsRequest(input)
  1420. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1421. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1422. return fn(p.(*ListCommandInvocationsOutput), lastPage)
  1423. })
  1424. }
  1425. const opListCommands = "ListCommands"
  1426. // ListCommandsRequest generates a "aws/request.Request" representing the
  1427. // client's request for the ListCommands operation. The "output" return
  1428. // value can be used to capture response data after the request's "Send" method
  1429. // is called.
  1430. //
  1431. // See ListCommands for usage and error information.
  1432. //
  1433. // Creating a request object using this method should be used when you want to inject
  1434. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1435. // access properties on the request object before or after sending the request. If
  1436. // you just want the service response, call the ListCommands method directly
  1437. // instead.
  1438. //
  1439. // Note: You must call the "Send" method on the returned request object in order
  1440. // to execute the request.
  1441. //
  1442. // // Example sending a request using the ListCommandsRequest method.
  1443. // req, resp := client.ListCommandsRequest(params)
  1444. //
  1445. // err := req.Send()
  1446. // if err == nil { // resp is now filled
  1447. // fmt.Println(resp)
  1448. // }
  1449. //
  1450. func (c *SSM) ListCommandsRequest(input *ListCommandsInput) (req *request.Request, output *ListCommandsOutput) {
  1451. op := &request.Operation{
  1452. Name: opListCommands,
  1453. HTTPMethod: "POST",
  1454. HTTPPath: "/",
  1455. Paginator: &request.Paginator{
  1456. InputTokens: []string{"NextToken"},
  1457. OutputTokens: []string{"NextToken"},
  1458. LimitToken: "MaxResults",
  1459. TruncationToken: "",
  1460. },
  1461. }
  1462. if input == nil {
  1463. input = &ListCommandsInput{}
  1464. }
  1465. req = c.newRequest(op, input, output)
  1466. output = &ListCommandsOutput{}
  1467. req.Data = output
  1468. return
  1469. }
  1470. // ListCommands API operation for Amazon Simple Systems Management Service.
  1471. //
  1472. // Lists the commands requested by users of the AWS account.
  1473. //
  1474. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1475. // with awserr.Error's Code and Message methods to get detailed information about
  1476. // the error.
  1477. //
  1478. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  1479. // API operation ListCommands for usage and error information.
  1480. //
  1481. // Returned Error Codes:
  1482. // * InternalServerError
  1483. // An error occurred on the server side.
  1484. //
  1485. // * InvalidCommandId
  1486. //
  1487. // * InvalidInstanceId
  1488. // The instance is not in valid state. Valid states are: Running, Pending, Stopped,
  1489. // Stopping. Invalid states are: Shutting-down and Terminated.
  1490. //
  1491. // * InvalidFilterKey
  1492. // The specified key is not valid.
  1493. //
  1494. // * InvalidNextToken
  1495. // The specified token is not valid.
  1496. //
  1497. func (c *SSM) ListCommands(input *ListCommandsInput) (*ListCommandsOutput, error) {
  1498. req, out := c.ListCommandsRequest(input)
  1499. err := req.Send()
  1500. return out, err
  1501. }
  1502. // ListCommandsPages iterates over the pages of a ListCommands operation,
  1503. // calling the "fn" function with the response data for each page. To stop
  1504. // iterating, return false from the fn function.
  1505. //
  1506. // See ListCommands method for more information on how to use this operation.
  1507. //
  1508. // Note: This operation can generate multiple requests to a service.
  1509. //
  1510. // // Example iterating over at most 3 pages of a ListCommands operation.
  1511. // pageNum := 0
  1512. // err := client.ListCommandsPages(params,
  1513. // func(page *ListCommandsOutput, lastPage bool) bool {
  1514. // pageNum++
  1515. // fmt.Println(page)
  1516. // return pageNum <= 3
  1517. // })
  1518. //
  1519. func (c *SSM) ListCommandsPages(input *ListCommandsInput, fn func(p *ListCommandsOutput, lastPage bool) (shouldContinue bool)) error {
  1520. page, _ := c.ListCommandsRequest(input)
  1521. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1522. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1523. return fn(p.(*ListCommandsOutput), lastPage)
  1524. })
  1525. }
  1526. const opListDocuments = "ListDocuments"
  1527. // ListDocumentsRequest generates a "aws/request.Request" representing the
  1528. // client's request for the ListDocuments operation. The "output" return
  1529. // value can be used to capture response data after the request's "Send" method
  1530. // is called.
  1531. //
  1532. // See ListDocuments for usage and error information.
  1533. //
  1534. // Creating a request object using this method should be used when you want to inject
  1535. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1536. // access properties on the request object before or after sending the request. If
  1537. // you just want the service response, call the ListDocuments method directly
  1538. // instead.
  1539. //
  1540. // Note: You must call the "Send" method on the returned request object in order
  1541. // to execute the request.
  1542. //
  1543. // // Example sending a request using the ListDocumentsRequest method.
  1544. // req, resp := client.ListDocumentsRequest(params)
  1545. //
  1546. // err := req.Send()
  1547. // if err == nil { // resp is now filled
  1548. // fmt.Println(resp)
  1549. // }
  1550. //
  1551. func (c *SSM) ListDocumentsRequest(input *ListDocumentsInput) (req *request.Request, output *ListDocumentsOutput) {
  1552. op := &request.Operation{
  1553. Name: opListDocuments,
  1554. HTTPMethod: "POST",
  1555. HTTPPath: "/",
  1556. Paginator: &request.Paginator{
  1557. InputTokens: []string{"NextToken"},
  1558. OutputTokens: []string{"NextToken"},
  1559. LimitToken: "MaxResults",
  1560. TruncationToken: "",
  1561. },
  1562. }
  1563. if input == nil {
  1564. input = &ListDocumentsInput{}
  1565. }
  1566. req = c.newRequest(op, input, output)
  1567. output = &ListDocumentsOutput{}
  1568. req.Data = output
  1569. return
  1570. }
  1571. // ListDocuments API operation for Amazon Simple Systems Management Service.
  1572. //
  1573. // Describes one or more of your SSM documents.
  1574. //
  1575. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1576. // with awserr.Error's Code and Message methods to get detailed information about
  1577. // the error.
  1578. //
  1579. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  1580. // API operation ListDocuments for usage and error information.
  1581. //
  1582. // Returned Error Codes:
  1583. // * InternalServerError
  1584. // An error occurred on the server side.
  1585. //
  1586. // * InvalidNextToken
  1587. // The specified token is not valid.
  1588. //
  1589. // * InvalidFilterKey
  1590. // The specified key is not valid.
  1591. //
  1592. func (c *SSM) ListDocuments(input *ListDocumentsInput) (*ListDocumentsOutput, error) {
  1593. req, out := c.ListDocumentsRequest(input)
  1594. err := req.Send()
  1595. return out, err
  1596. }
  1597. // ListDocumentsPages iterates over the pages of a ListDocuments operation,
  1598. // calling the "fn" function with the response data for each page. To stop
  1599. // iterating, return false from the fn function.
  1600. //
  1601. // See ListDocuments method for more information on how to use this operation.
  1602. //
  1603. // Note: This operation can generate multiple requests to a service.
  1604. //
  1605. // // Example iterating over at most 3 pages of a ListDocuments operation.
  1606. // pageNum := 0
  1607. // err := client.ListDocumentsPages(params,
  1608. // func(page *ListDocumentsOutput, lastPage bool) bool {
  1609. // pageNum++
  1610. // fmt.Println(page)
  1611. // return pageNum <= 3
  1612. // })
  1613. //
  1614. func (c *SSM) ListDocumentsPages(input *ListDocumentsInput, fn func(p *ListDocumentsOutput, lastPage bool) (shouldContinue bool)) error {
  1615. page, _ := c.ListDocumentsRequest(input)
  1616. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1617. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1618. return fn(p.(*ListDocumentsOutput), lastPage)
  1619. })
  1620. }
  1621. const opListTagsForResource = "ListTagsForResource"
  1622. // ListTagsForResourceRequest generates a "aws/request.Request" representing the
  1623. // client's request for the ListTagsForResource operation. The "output" return
  1624. // value can be used to capture response data after the request's "Send" method
  1625. // is called.
  1626. //
  1627. // See ListTagsForResource for usage and error information.
  1628. //
  1629. // Creating a request object using this method should be used when you want to inject
  1630. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1631. // access properties on the request object before or after sending the request. If
  1632. // you just want the service response, call the ListTagsForResource method directly
  1633. // instead.
  1634. //
  1635. // Note: You must call the "Send" method on the returned request object in order
  1636. // to execute the request.
  1637. //
  1638. // // Example sending a request using the ListTagsForResourceRequest method.
  1639. // req, resp := client.ListTagsForResourceRequest(params)
  1640. //
  1641. // err := req.Send()
  1642. // if err == nil { // resp is now filled
  1643. // fmt.Println(resp)
  1644. // }
  1645. //
  1646. func (c *SSM) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
  1647. op := &request.Operation{
  1648. Name: opListTagsForResource,
  1649. HTTPMethod: "POST",
  1650. HTTPPath: "/",
  1651. }
  1652. if input == nil {
  1653. input = &ListTagsForResourceInput{}
  1654. }
  1655. req = c.newRequest(op, input, output)
  1656. output = &ListTagsForResourceOutput{}
  1657. req.Data = output
  1658. return
  1659. }
  1660. // ListTagsForResource API operation for Amazon Simple Systems Management Service.
  1661. //
  1662. // Returns a list of the tags assigned to the specified resource.
  1663. //
  1664. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1665. // with awserr.Error's Code and Message methods to get detailed information about
  1666. // the error.
  1667. //
  1668. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  1669. // API operation ListTagsForResource for usage and error information.
  1670. //
  1671. // Returned Error Codes:
  1672. // * InvalidResourceType
  1673. // The resource type is not valid. If you are attempting to tag an instance,
  1674. // the instance must be a registered, managed instance.
  1675. //
  1676. // * InvalidResourceId
  1677. // The resource ID is not valid. Verify that you entered the correct ID and
  1678. // try again.
  1679. //
  1680. // * InternalServerError
  1681. // An error occurred on the server side.
  1682. //
  1683. func (c *SSM) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
  1684. req, out := c.ListTagsForResourceRequest(input)
  1685. err := req.Send()
  1686. return out, err
  1687. }
  1688. const opModifyDocumentPermission = "ModifyDocumentPermission"
  1689. // ModifyDocumentPermissionRequest generates a "aws/request.Request" representing the
  1690. // client's request for the ModifyDocumentPermission operation. The "output" return
  1691. // value can be used to capture response data after the request's "Send" method
  1692. // is called.
  1693. //
  1694. // See ModifyDocumentPermission for usage and error information.
  1695. //
  1696. // Creating a request object using this method should be used when you want to inject
  1697. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1698. // access properties on the request object before or after sending the request. If
  1699. // you just want the service response, call the ModifyDocumentPermission method directly
  1700. // instead.
  1701. //
  1702. // Note: You must call the "Send" method on the returned request object in order
  1703. // to execute the request.
  1704. //
  1705. // // Example sending a request using the ModifyDocumentPermissionRequest method.
  1706. // req, resp := client.ModifyDocumentPermissionRequest(params)
  1707. //
  1708. // err := req.Send()
  1709. // if err == nil { // resp is now filled
  1710. // fmt.Println(resp)
  1711. // }
  1712. //
  1713. func (c *SSM) ModifyDocumentPermissionRequest(input *ModifyDocumentPermissionInput) (req *request.Request, output *ModifyDocumentPermissionOutput) {
  1714. op := &request.Operation{
  1715. Name: opModifyDocumentPermission,
  1716. HTTPMethod: "POST",
  1717. HTTPPath: "/",
  1718. }
  1719. if input == nil {
  1720. input = &ModifyDocumentPermissionInput{}
  1721. }
  1722. req = c.newRequest(op, input, output)
  1723. output = &ModifyDocumentPermissionOutput{}
  1724. req.Data = output
  1725. return
  1726. }
  1727. // ModifyDocumentPermission API operation for Amazon Simple Systems Management Service.
  1728. //
  1729. // Share a document publicly or privately. If you share a document privately,
  1730. // you must specify the AWS user account IDs for those people who can use the
  1731. // document. If you share a document publicly, you must specify All as the account
  1732. // ID.
  1733. //
  1734. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1735. // with awserr.Error's Code and Message methods to get detailed information about
  1736. // the error.
  1737. //
  1738. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  1739. // API operation ModifyDocumentPermission for usage and error information.
  1740. //
  1741. // Returned Error Codes:
  1742. // * InternalServerError
  1743. // An error occurred on the server side.
  1744. //
  1745. // * InvalidDocument
  1746. // The specified document does not exist.
  1747. //
  1748. // * InvalidPermissionType
  1749. // The permission type is not supported. Share is the only supported permission
  1750. // type.
  1751. //
  1752. // * DocumentPermissionLimit
  1753. // The document cannot be shared with more AWS user accounts. You can share
  1754. // a document with a maximum of 20 accounts. You can publicly share up to five
  1755. // documents. If you need to increase this limit, contact AWS Support.
  1756. //
  1757. // * DocumentLimitExceeded
  1758. // You can have at most 200 active SSM documents.
  1759. //
  1760. func (c *SSM) ModifyDocumentPermission(input *ModifyDocumentPermissionInput) (*ModifyDocumentPermissionOutput, error) {
  1761. req, out := c.ModifyDocumentPermissionRequest(input)
  1762. err := req.Send()
  1763. return out, err
  1764. }
  1765. const opRemoveTagsFromResource = "RemoveTagsFromResource"
  1766. // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the
  1767. // client's request for the RemoveTagsFromResource operation. The "output" return
  1768. // value can be used to capture response data after the request's "Send" method
  1769. // is called.
  1770. //
  1771. // See RemoveTagsFromResource for usage and error information.
  1772. //
  1773. // Creating a request object using this method should be used when you want to inject
  1774. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1775. // access properties on the request object before or after sending the request. If
  1776. // you just want the service response, call the RemoveTagsFromResource method directly
  1777. // instead.
  1778. //
  1779. // Note: You must call the "Send" method on the returned request object in order
  1780. // to execute the request.
  1781. //
  1782. // // Example sending a request using the RemoveTagsFromResourceRequest method.
  1783. // req, resp := client.RemoveTagsFromResourceRequest(params)
  1784. //
  1785. // err := req.Send()
  1786. // if err == nil { // resp is now filled
  1787. // fmt.Println(resp)
  1788. // }
  1789. //
  1790. func (c *SSM) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) (req *request.Request, output *RemoveTagsFromResourceOutput) {
  1791. op := &request.Operation{
  1792. Name: opRemoveTagsFromResource,
  1793. HTTPMethod: "POST",
  1794. HTTPPath: "/",
  1795. }
  1796. if input == nil {
  1797. input = &RemoveTagsFromResourceInput{}
  1798. }
  1799. req = c.newRequest(op, input, output)
  1800. output = &RemoveTagsFromResourceOutput{}
  1801. req.Data = output
  1802. return
  1803. }
  1804. // RemoveTagsFromResource API operation for Amazon Simple Systems Management Service.
  1805. //
  1806. // Removes all tags from the specified resource.
  1807. //
  1808. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1809. // with awserr.Error's Code and Message methods to get detailed information about
  1810. // the error.
  1811. //
  1812. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  1813. // API operation RemoveTagsFromResource for usage and error information.
  1814. //
  1815. // Returned Error Codes:
  1816. // * InvalidResourceType
  1817. // The resource type is not valid. If you are attempting to tag an instance,
  1818. // the instance must be a registered, managed instance.
  1819. //
  1820. // * InvalidResourceId
  1821. // The resource ID is not valid. Verify that you entered the correct ID and
  1822. // try again.
  1823. //
  1824. // * InternalServerError
  1825. // An error occurred on the server side.
  1826. //
  1827. func (c *SSM) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) {
  1828. req, out := c.RemoveTagsFromResourceRequest(input)
  1829. err := req.Send()
  1830. return out, err
  1831. }
  1832. const opSendCommand = "SendCommand"
  1833. // SendCommandRequest generates a "aws/request.Request" representing the
  1834. // client's request for the SendCommand operation. The "output" return
  1835. // value can be used to capture response data after the request's "Send" method
  1836. // is called.
  1837. //
  1838. // See SendCommand for usage and error information.
  1839. //
  1840. // Creating a request object using this method should be used when you want to inject
  1841. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1842. // access properties on the request object before or after sending the request. If
  1843. // you just want the service response, call the SendCommand method directly
  1844. // instead.
  1845. //
  1846. // Note: You must call the "Send" method on the returned request object in order
  1847. // to execute the request.
  1848. //
  1849. // // Example sending a request using the SendCommandRequest method.
  1850. // req, resp := client.SendCommandRequest(params)
  1851. //
  1852. // err := req.Send()
  1853. // if err == nil { // resp is now filled
  1854. // fmt.Println(resp)
  1855. // }
  1856. //
  1857. func (c *SSM) SendCommandRequest(input *SendCommandInput) (req *request.Request, output *SendCommandOutput) {
  1858. op := &request.Operation{
  1859. Name: opSendCommand,
  1860. HTTPMethod: "POST",
  1861. HTTPPath: "/",
  1862. }
  1863. if input == nil {
  1864. input = &SendCommandInput{}
  1865. }
  1866. req = c.newRequest(op, input, output)
  1867. output = &SendCommandOutput{}
  1868. req.Data = output
  1869. return
  1870. }
  1871. // SendCommand API operation for Amazon Simple Systems Management Service.
  1872. //
  1873. // Executes commands on one or more remote instances.
  1874. //
  1875. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1876. // with awserr.Error's Code and Message methods to get detailed information about
  1877. // the error.
  1878. //
  1879. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  1880. // API operation SendCommand for usage and error information.
  1881. //
  1882. // Returned Error Codes:
  1883. // * DuplicateInstanceId
  1884. // You cannot specify an instance ID in more than one association.
  1885. //
  1886. // * InternalServerError
  1887. // An error occurred on the server side.
  1888. //
  1889. // * InvalidInstanceId
  1890. // The instance is not in valid state. Valid states are: Running, Pending, Stopped,
  1891. // Stopping. Invalid states are: Shutting-down and Terminated.
  1892. //
  1893. // * InvalidDocument
  1894. // The specified document does not exist.
  1895. //
  1896. // * InvalidOutputFolder
  1897. // The S3 bucket does not exist.
  1898. //
  1899. // * InvalidParameters
  1900. // You must specify values for all required parameters in the SSM document.
  1901. // You can only supply values to parameters defined in the SSM document.
  1902. //
  1903. // * UnsupportedPlatformType
  1904. // The document does not support the platform type of the given instance ID(s).
  1905. // For example, you sent an SSM document for a Windows instance to a Linux instance.
  1906. //
  1907. // * MaxDocumentSizeExceeded
  1908. // The size limit of an SSM document is 64 KB.
  1909. //
  1910. // * InvalidRole
  1911. // The role name can't contain invalid characters. Also verify that you specified
  1912. // an IAM role for notifications that includes the required trust policy. For
  1913. // information about configuring the IAM role for SSM notifications, see Configuring
  1914. // SNS Notifications SSM (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/rc-sns.html)
  1915. // in the Amazon Elastic Compute Cloud User Guide .
  1916. //
  1917. // * InvalidNotificationConfig
  1918. // One or more configuration items is not valid. Verify that a valid Amazon
  1919. // Resource Name (ARN) was provided for an Amazon SNS topic.
  1920. //
  1921. func (c *SSM) SendCommand(input *SendCommandInput) (*SendCommandOutput, error) {
  1922. req, out := c.SendCommandRequest(input)
  1923. err := req.Send()
  1924. return out, err
  1925. }
  1926. const opUpdateAssociationStatus = "UpdateAssociationStatus"
  1927. // UpdateAssociationStatusRequest generates a "aws/request.Request" representing the
  1928. // client's request for the UpdateAssociationStatus operation. The "output" return
  1929. // value can be used to capture response data after the request's "Send" method
  1930. // is called.
  1931. //
  1932. // See UpdateAssociationStatus for usage and error information.
  1933. //
  1934. // Creating a request object using this method should be used when you want to inject
  1935. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1936. // access properties on the request object before or after sending the request. If
  1937. // you just want the service response, call the UpdateAssociationStatus method directly
  1938. // instead.
  1939. //
  1940. // Note: You must call the "Send" method on the returned request object in order
  1941. // to execute the request.
  1942. //
  1943. // // Example sending a request using the UpdateAssociationStatusRequest method.
  1944. // req, resp := client.UpdateAssociationStatusRequest(params)
  1945. //
  1946. // err := req.Send()
  1947. // if err == nil { // resp is now filled
  1948. // fmt.Println(resp)
  1949. // }
  1950. //
  1951. func (c *SSM) UpdateAssociationStatusRequest(input *UpdateAssociationStatusInput) (req *request.Request, output *UpdateAssociationStatusOutput) {
  1952. op := &request.Operation{
  1953. Name: opUpdateAssociationStatus,
  1954. HTTPMethod: "POST",
  1955. HTTPPath: "/",
  1956. }
  1957. if input == nil {
  1958. input = &UpdateAssociationStatusInput{}
  1959. }
  1960. req = c.newRequest(op, input, output)
  1961. output = &UpdateAssociationStatusOutput{}
  1962. req.Data = output
  1963. return
  1964. }
  1965. // UpdateAssociationStatus API operation for Amazon Simple Systems Management Service.
  1966. //
  1967. // Updates the status of the SSM document associated with the specified instance.
  1968. //
  1969. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1970. // with awserr.Error's Code and Message methods to get detailed information about
  1971. // the error.
  1972. //
  1973. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  1974. // API operation UpdateAssociationStatus for usage and error information.
  1975. //
  1976. // Returned Error Codes:
  1977. // * InternalServerError
  1978. // An error occurred on the server side.
  1979. //
  1980. // * InvalidInstanceId
  1981. // The instance is not in valid state. Valid states are: Running, Pending, Stopped,
  1982. // Stopping. Invalid states are: Shutting-down and Terminated.
  1983. //
  1984. // * InvalidDocument
  1985. // The specified document does not exist.
  1986. //
  1987. // * AssociationDoesNotExist
  1988. // The specified association does not exist.
  1989. //
  1990. // * StatusUnchanged
  1991. // The updated status is the same as the current status.
  1992. //
  1993. // * TooManyUpdates
  1994. // There are concurrent updates for a resource that supports one update at a
  1995. // time.
  1996. //
  1997. func (c *SSM) UpdateAssociationStatus(input *UpdateAssociationStatusInput) (*UpdateAssociationStatusOutput, error) {
  1998. req, out := c.UpdateAssociationStatusRequest(input)
  1999. err := req.Send()
  2000. return out, err
  2001. }
  2002. const opUpdateManagedInstanceRole = "UpdateManagedInstanceRole"
  2003. // UpdateManagedInstanceRoleRequest generates a "aws/request.Request" representing the
  2004. // client's request for the UpdateManagedInstanceRole operation. The "output" return
  2005. // value can be used to capture response data after the request's "Send" method
  2006. // is called.
  2007. //
  2008. // See UpdateManagedInstanceRole for usage and error information.
  2009. //
  2010. // Creating a request object using this method should be used when you want to inject
  2011. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2012. // access properties on the request object before or after sending the request. If
  2013. // you just want the service response, call the UpdateManagedInstanceRole method directly
  2014. // instead.
  2015. //
  2016. // Note: You must call the "Send" method on the returned request object in order
  2017. // to execute the request.
  2018. //
  2019. // // Example sending a request using the UpdateManagedInstanceRoleRequest method.
  2020. // req, resp := client.UpdateManagedInstanceRoleRequest(params)
  2021. //
  2022. // err := req.Send()
  2023. // if err == nil { // resp is now filled
  2024. // fmt.Println(resp)
  2025. // }
  2026. //
  2027. func (c *SSM) UpdateManagedInstanceRoleRequest(input *UpdateManagedInstanceRoleInput) (req *request.Request, output *UpdateManagedInstanceRoleOutput) {
  2028. op := &request.Operation{
  2029. Name: opUpdateManagedInstanceRole,
  2030. HTTPMethod: "POST",
  2031. HTTPPath: "/",
  2032. }
  2033. if input == nil {
  2034. input = &UpdateManagedInstanceRoleInput{}
  2035. }
  2036. req = c.newRequest(op, input, output)
  2037. output = &UpdateManagedInstanceRoleOutput{}
  2038. req.Data = output
  2039. return
  2040. }
  2041. // UpdateManagedInstanceRole API operation for Amazon Simple Systems Management Service.
  2042. //
  2043. // Assigns or changes an Amazon Identity and Access Management (IAM) role to
  2044. // the managed instance.
  2045. //
  2046. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2047. // with awserr.Error's Code and Message methods to get detailed information about
  2048. // the error.
  2049. //
  2050. // See the AWS API reference guide for Amazon Simple Systems Management Service's
  2051. // API operation UpdateManagedInstanceRole for usage and error information.
  2052. //
  2053. // Returned Error Codes:
  2054. // * InvalidInstanceId
  2055. // The instance is not in valid state. Valid states are: Running, Pending, Stopped,
  2056. // Stopping. Invalid states are: Shutting-down and Terminated.
  2057. //
  2058. // * InternalServerError
  2059. // An error occurred on the server side.
  2060. //
  2061. func (c *SSM) UpdateManagedInstanceRole(input *UpdateManagedInstanceRoleInput) (*UpdateManagedInstanceRoleOutput, error) {
  2062. req, out := c.UpdateManagedInstanceRoleRequest(input)
  2063. err := req.Send()
  2064. return out, err
  2065. }
  2066. // An activation registers one or more on-premises servers or virtual machines
  2067. // (VMs) with AWS so that you can configure those servers or VMs using Run Command.
  2068. // A server or VM that has been registered with AWS is called a managed instance.
  2069. type Activation struct {
  2070. _ struct{} `type:"structure"`
  2071. // The ID created by SSM when you submitted the activation.
  2072. ActivationId *string `type:"string"`
  2073. // The date the activation was created.
  2074. CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  2075. // A name for the managed instance when it is created.
  2076. DefaultInstanceName *string `type:"string"`
  2077. // A user defined description of the activation.
  2078. Description *string `type:"string"`
  2079. // The date when this activation can no longer be used to register managed instances.
  2080. ExpirationDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  2081. // Whether or not the activation is expired.
  2082. Expired *bool `type:"boolean"`
  2083. // The Amazon Identity and Access Management (IAM) role to assign to the managed
  2084. // instance.
  2085. IamRole *string `type:"string"`
  2086. // The maximum number of managed instances that can be registered using this
  2087. // activation.
  2088. RegistrationLimit *int64 `min:"1" type:"integer"`
  2089. // The number of managed instances already registered with this activation.
  2090. RegistrationsCount *int64 `min:"1" type:"integer"`
  2091. }
  2092. // String returns the string representation
  2093. func (s Activation) String() string {
  2094. return awsutil.Prettify(s)
  2095. }
  2096. // GoString returns the string representation
  2097. func (s Activation) GoString() string {
  2098. return s.String()
  2099. }
  2100. type AddTagsToResourceInput struct {
  2101. _ struct{} `type:"structure"`
  2102. // The resource ID you want to tag.
  2103. //
  2104. // ResourceId is a required field
  2105. ResourceId *string `type:"string" required:"true"`
  2106. // Specifies the type of resource you are tagging.
  2107. //
  2108. // ResourceType is a required field
  2109. ResourceType *string `type:"string" required:"true" enum:"ResourceTypeForTagging"`
  2110. // One or more tags. The value parameter is required, but if you don't want
  2111. // the tag to have a value, specify the parameter with no value, and we set
  2112. // the value to an empty string.
  2113. //
  2114. // Tags is a required field
  2115. Tags []*Tag `type:"list" required:"true"`
  2116. }
  2117. // String returns the string representation
  2118. func (s AddTagsToResourceInput) String() string {
  2119. return awsutil.Prettify(s)
  2120. }
  2121. // GoString returns the string representation
  2122. func (s AddTagsToResourceInput) GoString() string {
  2123. return s.String()
  2124. }
  2125. // Validate inspects the fields of the type to determine if they are valid.
  2126. func (s *AddTagsToResourceInput) Validate() error {
  2127. invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"}
  2128. if s.ResourceId == nil {
  2129. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  2130. }
  2131. if s.ResourceType == nil {
  2132. invalidParams.Add(request.NewErrParamRequired("ResourceType"))
  2133. }
  2134. if s.Tags == nil {
  2135. invalidParams.Add(request.NewErrParamRequired("Tags"))
  2136. }
  2137. if s.Tags != nil {
  2138. for i, v := range s.Tags {
  2139. if v == nil {
  2140. continue
  2141. }
  2142. if err := v.Validate(); err != nil {
  2143. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  2144. }
  2145. }
  2146. }
  2147. if invalidParams.Len() > 0 {
  2148. return invalidParams
  2149. }
  2150. return nil
  2151. }
  2152. type AddTagsToResourceOutput struct {
  2153. _ struct{} `type:"structure"`
  2154. }
  2155. // String returns the string representation
  2156. func (s AddTagsToResourceOutput) String() string {
  2157. return awsutil.Prettify(s)
  2158. }
  2159. // GoString returns the string representation
  2160. func (s AddTagsToResourceOutput) GoString() string {
  2161. return s.String()
  2162. }
  2163. // Describes an association of an SSM document and an instance.
  2164. type Association struct {
  2165. _ struct{} `type:"structure"`
  2166. // The ID of the instance.
  2167. InstanceId *string `type:"string"`
  2168. // The name of the SSM document.
  2169. Name *string `type:"string"`
  2170. }
  2171. // String returns the string representation
  2172. func (s Association) String() string {
  2173. return awsutil.Prettify(s)
  2174. }
  2175. // GoString returns the string representation
  2176. func (s Association) GoString() string {
  2177. return s.String()
  2178. }
  2179. // Describes the parameters for a document.
  2180. type AssociationDescription struct {
  2181. _ struct{} `type:"structure"`
  2182. // The date when the association was made.
  2183. Date *time.Time `type:"timestamp" timestampFormat:"unix"`
  2184. // The ID of the instance.
  2185. InstanceId *string `type:"string"`
  2186. // The name of the SSM document.
  2187. Name *string `type:"string"`
  2188. // A description of the parameters for a document.
  2189. Parameters map[string][]*string `type:"map"`
  2190. // The association status.
  2191. Status *AssociationStatus `type:"structure"`
  2192. }
  2193. // String returns the string representation
  2194. func (s AssociationDescription) String() string {
  2195. return awsutil.Prettify(s)
  2196. }
  2197. // GoString returns the string representation
  2198. func (s AssociationDescription) GoString() string {
  2199. return s.String()
  2200. }
  2201. // Describes a filter.
  2202. type AssociationFilter struct {
  2203. _ struct{} `type:"structure"`
  2204. // The name of the filter.
  2205. //
  2206. // Key is a required field
  2207. Key *string `locationName:"key" type:"string" required:"true" enum:"AssociationFilterKey"`
  2208. // The filter value.
  2209. //
  2210. // Value is a required field
  2211. Value *string `locationName:"value" min:"1" type:"string" required:"true"`
  2212. }
  2213. // String returns the string representation
  2214. func (s AssociationFilter) String() string {
  2215. return awsutil.Prettify(s)
  2216. }
  2217. // GoString returns the string representation
  2218. func (s AssociationFilter) GoString() string {
  2219. return s.String()
  2220. }
  2221. // Validate inspects the fields of the type to determine if they are valid.
  2222. func (s *AssociationFilter) Validate() error {
  2223. invalidParams := request.ErrInvalidParams{Context: "AssociationFilter"}
  2224. if s.Key == nil {
  2225. invalidParams.Add(request.NewErrParamRequired("Key"))
  2226. }
  2227. if s.Value == nil {
  2228. invalidParams.Add(request.NewErrParamRequired("Value"))
  2229. }
  2230. if s.Value != nil && len(*s.Value) < 1 {
  2231. invalidParams.Add(request.NewErrParamMinLen("Value", 1))
  2232. }
  2233. if invalidParams.Len() > 0 {
  2234. return invalidParams
  2235. }
  2236. return nil
  2237. }
  2238. // Describes an association status.
  2239. type AssociationStatus struct {
  2240. _ struct{} `type:"structure"`
  2241. // A user-defined string.
  2242. AdditionalInfo *string `type:"string"`
  2243. // The date when the status changed.
  2244. //
  2245. // Date is a required field
  2246. Date *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
  2247. // The reason for the status.
  2248. //
  2249. // Message is a required field
  2250. Message *string `type:"string" required:"true"`
  2251. // The status.
  2252. //
  2253. // Name is a required field
  2254. Name *string `type:"string" required:"true" enum:"AssociationStatusName"`
  2255. }
  2256. // String returns the string representation
  2257. func (s AssociationStatus) String() string {
  2258. return awsutil.Prettify(s)
  2259. }
  2260. // GoString returns the string representation
  2261. func (s AssociationStatus) GoString() string {
  2262. return s.String()
  2263. }
  2264. // Validate inspects the fields of the type to determine if they are valid.
  2265. func (s *AssociationStatus) Validate() error {
  2266. invalidParams := request.ErrInvalidParams{Context: "AssociationStatus"}
  2267. if s.Date == nil {
  2268. invalidParams.Add(request.NewErrParamRequired("Date"))
  2269. }
  2270. if s.Message == nil {
  2271. invalidParams.Add(request.NewErrParamRequired("Message"))
  2272. }
  2273. if s.Name == nil {
  2274. invalidParams.Add(request.NewErrParamRequired("Name"))
  2275. }
  2276. if invalidParams.Len() > 0 {
  2277. return invalidParams
  2278. }
  2279. return nil
  2280. }
  2281. type CancelCommandInput struct {
  2282. _ struct{} `type:"structure"`
  2283. // The ID of the command you want to cancel.
  2284. //
  2285. // CommandId is a required field
  2286. CommandId *string `min:"36" type:"string" required:"true"`
  2287. // (Optional) A list of instance IDs on which you want to cancel the command.
  2288. // If not provided, the command is canceled on every instance on which it was
  2289. // requested.
  2290. InstanceIds []*string `min:"1" type:"list"`
  2291. }
  2292. // String returns the string representation
  2293. func (s CancelCommandInput) String() string {
  2294. return awsutil.Prettify(s)
  2295. }
  2296. // GoString returns the string representation
  2297. func (s CancelCommandInput) GoString() string {
  2298. return s.String()
  2299. }
  2300. // Validate inspects the fields of the type to determine if they are valid.
  2301. func (s *CancelCommandInput) Validate() error {
  2302. invalidParams := request.ErrInvalidParams{Context: "CancelCommandInput"}
  2303. if s.CommandId == nil {
  2304. invalidParams.Add(request.NewErrParamRequired("CommandId"))
  2305. }
  2306. if s.CommandId != nil && len(*s.CommandId) < 36 {
  2307. invalidParams.Add(request.NewErrParamMinLen("CommandId", 36))
  2308. }
  2309. if s.InstanceIds != nil && len(s.InstanceIds) < 1 {
  2310. invalidParams.Add(request.NewErrParamMinLen("InstanceIds", 1))
  2311. }
  2312. if invalidParams.Len() > 0 {
  2313. return invalidParams
  2314. }
  2315. return nil
  2316. }
  2317. // Whether or not the command was successfully canceled. There is no guarantee
  2318. // that a request can be canceled.
  2319. type CancelCommandOutput struct {
  2320. _ struct{} `type:"structure"`
  2321. }
  2322. // String returns the string representation
  2323. func (s CancelCommandOutput) String() string {
  2324. return awsutil.Prettify(s)
  2325. }
  2326. // GoString returns the string representation
  2327. func (s CancelCommandOutput) GoString() string {
  2328. return s.String()
  2329. }
  2330. // Describes a command request.
  2331. type Command struct {
  2332. _ struct{} `type:"structure"`
  2333. // A unique identifier for this command.
  2334. CommandId *string `min:"36" type:"string"`
  2335. // User-specified information about the command, such as a brief description
  2336. // of what the command should do.
  2337. Comment *string `type:"string"`
  2338. // The name of the SSM document requested for execution.
  2339. DocumentName *string `type:"string"`
  2340. // If this time is reached and the command has not already started executing,
  2341. // it will not execute. Calculated based on the ExpiresAfter user input provided
  2342. // as part of the SendCommand API.
  2343. ExpiresAfter *time.Time `type:"timestamp" timestampFormat:"unix"`
  2344. // The instance IDs against which this command was requested.
  2345. InstanceIds []*string `min:"1" type:"list"`
  2346. // Configurations for sending notifications about command status changes.
  2347. NotificationConfig *NotificationConfig `type:"structure"`
  2348. // The S3 bucket where the responses to the command executions should be stored.
  2349. // This was requested when issuing the command.
  2350. OutputS3BucketName *string `min:"3" type:"string"`
  2351. // The S3 directory path inside the bucket where the responses to the command
  2352. // executions should be stored. This was requested when issuing the command.
  2353. OutputS3KeyPrefix *string `type:"string"`
  2354. // The parameter values to be inserted in the SSM document when executing the
  2355. // command.
  2356. Parameters map[string][]*string `type:"map"`
  2357. // The date and time the command was requested.
  2358. RequestedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2359. // The IAM service role that SSM uses to act on your behalf when sending notifications
  2360. // about command status changes.
  2361. ServiceRole *string `type:"string"`
  2362. // The status of the command.
  2363. Status *string `type:"string" enum:"CommandStatus"`
  2364. }
  2365. // String returns the string representation
  2366. func (s Command) String() string {
  2367. return awsutil.Prettify(s)
  2368. }
  2369. // GoString returns the string representation
  2370. func (s Command) GoString() string {
  2371. return s.String()
  2372. }
  2373. // Describes a command filter.
  2374. type CommandFilter struct {
  2375. _ struct{} `type:"structure"`
  2376. // The name of the filter. For example, requested date and time.
  2377. //
  2378. // Key is a required field
  2379. Key *string `locationName:"key" type:"string" required:"true" enum:"CommandFilterKey"`
  2380. // The filter value. For example: June 30, 2015.
  2381. //
  2382. // Value is a required field
  2383. Value *string `locationName:"value" min:"1" type:"string" required:"true"`
  2384. }
  2385. // String returns the string representation
  2386. func (s CommandFilter) String() string {
  2387. return awsutil.Prettify(s)
  2388. }
  2389. // GoString returns the string representation
  2390. func (s CommandFilter) GoString() string {
  2391. return s.String()
  2392. }
  2393. // Validate inspects the fields of the type to determine if they are valid.
  2394. func (s *CommandFilter) Validate() error {
  2395. invalidParams := request.ErrInvalidParams{Context: "CommandFilter"}
  2396. if s.Key == nil {
  2397. invalidParams.Add(request.NewErrParamRequired("Key"))
  2398. }
  2399. if s.Value == nil {
  2400. invalidParams.Add(request.NewErrParamRequired("Value"))
  2401. }
  2402. if s.Value != nil && len(*s.Value) < 1 {
  2403. invalidParams.Add(request.NewErrParamMinLen("Value", 1))
  2404. }
  2405. if invalidParams.Len() > 0 {
  2406. return invalidParams
  2407. }
  2408. return nil
  2409. }
  2410. // An invocation is copy of a command sent to a specific instance. A command
  2411. // can apply to one or more instances. A command invocation applies to one instance.
  2412. // For example, if a user executes SendCommand against three instances, then
  2413. // a command invocation is created for each requested instance ID. A command
  2414. // invocation returns status and detail information about a command you executed.
  2415. type CommandInvocation struct {
  2416. _ struct{} `type:"structure"`
  2417. // The command against which this invocation was requested.
  2418. CommandId *string `min:"36" type:"string"`
  2419. CommandPlugins []*CommandPlugin `type:"list"`
  2420. // User-specified information about the command, such as a brief description
  2421. // of what the command should do.
  2422. Comment *string `type:"string"`
  2423. // The document name that was requested for execution.
  2424. DocumentName *string `type:"string"`
  2425. // The instance ID in which this invocation was requested.
  2426. InstanceId *string `type:"string"`
  2427. // Configurations for sending notifications about command status changes on
  2428. // a per instance basis.
  2429. NotificationConfig *NotificationConfig `type:"structure"`
  2430. // The time and date the request was sent to this instance.
  2431. RequestedDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2432. // The IAM service role that SSM uses to act on your behalf when sending notifications
  2433. // about command status changes on a per instance basis.
  2434. ServiceRole *string `type:"string"`
  2435. // Whether or not the invocation succeeded, failed, or is pending.
  2436. Status *string `type:"string" enum:"CommandInvocationStatus"`
  2437. // Gets the trace output sent by the agent.
  2438. TraceOutput *string `type:"string"`
  2439. }
  2440. // String returns the string representation
  2441. func (s CommandInvocation) String() string {
  2442. return awsutil.Prettify(s)
  2443. }
  2444. // GoString returns the string representation
  2445. func (s CommandInvocation) GoString() string {
  2446. return s.String()
  2447. }
  2448. // Describes plugin details.
  2449. type CommandPlugin struct {
  2450. _ struct{} `type:"structure"`
  2451. // The name of the plugin. Must be one of the following: aws:updateAgent, aws:domainjoin,
  2452. // aws:applications, aws:runPowerShellScript, aws:psmodule, aws:cloudWatch,
  2453. // aws:runShellScript, or aws:updateSSMAgent.
  2454. Name *string `min:"4" type:"string"`
  2455. // Output of the plugin execution.
  2456. Output *string `type:"string"`
  2457. // The S3 bucket where the responses to the command executions should be stored.
  2458. // This was requested when issuing the command.
  2459. OutputS3BucketName *string `min:"3" type:"string"`
  2460. // The S3 directory path inside the bucket where the responses to the command
  2461. // executions should be stored. This was requested when issuing the command.
  2462. OutputS3KeyPrefix *string `type:"string"`
  2463. // A numeric response code generated after executing the plugin.
  2464. ResponseCode *int64 `type:"integer"`
  2465. // The time the plugin stopped executing. Could stop prematurely if, for example,
  2466. // a cancel command was sent.
  2467. ResponseFinishDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2468. // The time the plugin started executing.
  2469. ResponseStartDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  2470. // The status of this plugin. You can execute a document with multiple plugins.
  2471. Status *string `type:"string" enum:"CommandPluginStatus"`
  2472. }
  2473. // String returns the string representation
  2474. func (s CommandPlugin) String() string {
  2475. return awsutil.Prettify(s)
  2476. }
  2477. // GoString returns the string representation
  2478. func (s CommandPlugin) GoString() string {
  2479. return s.String()
  2480. }
  2481. type CreateActivationInput struct {
  2482. _ struct{} `type:"structure"`
  2483. // The name of the registered, managed instance as it will appear in the Amazon
  2484. // EC2 console or when you use the AWS command line tools to list EC2 resources.
  2485. DefaultInstanceName *string `type:"string"`
  2486. // A user-defined description of the resource that you want to register with
  2487. // Amazon EC2.
  2488. Description *string `type:"string"`
  2489. // The date by which this activation request should expire. The default value
  2490. // is 24 hours.
  2491. ExpirationDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  2492. // The Amazon Identity and Access Management (IAM) role that you want to assign
  2493. // to the managed instance.
  2494. //
  2495. // IamRole is a required field
  2496. IamRole *string `type:"string" required:"true"`
  2497. // Specify the maximum number of managed instances you want to register. The
  2498. // default value is 1 instance.
  2499. RegistrationLimit *int64 `min:"1" type:"integer"`
  2500. }
  2501. // String returns the string representation
  2502. func (s CreateActivationInput) String() string {
  2503. return awsutil.Prettify(s)
  2504. }
  2505. // GoString returns the string representation
  2506. func (s CreateActivationInput) GoString() string {
  2507. return s.String()
  2508. }
  2509. // Validate inspects the fields of the type to determine if they are valid.
  2510. func (s *CreateActivationInput) Validate() error {
  2511. invalidParams := request.ErrInvalidParams{Context: "CreateActivationInput"}
  2512. if s.IamRole == nil {
  2513. invalidParams.Add(request.NewErrParamRequired("IamRole"))
  2514. }
  2515. if s.RegistrationLimit != nil && *s.RegistrationLimit < 1 {
  2516. invalidParams.Add(request.NewErrParamMinValue("RegistrationLimit", 1))
  2517. }
  2518. if invalidParams.Len() > 0 {
  2519. return invalidParams
  2520. }
  2521. return nil
  2522. }
  2523. type CreateActivationOutput struct {
  2524. _ struct{} `type:"structure"`
  2525. // The code the system generates when it processes the activation. The activation
  2526. // code functions like a password to validate the activation ID.
  2527. ActivationCode *string `min:"20" type:"string"`
  2528. // The ID number generated by the system when it processed the activation. The
  2529. // activation ID functions like a user name.
  2530. ActivationId *string `type:"string"`
  2531. }
  2532. // String returns the string representation
  2533. func (s CreateActivationOutput) String() string {
  2534. return awsutil.Prettify(s)
  2535. }
  2536. // GoString returns the string representation
  2537. func (s CreateActivationOutput) GoString() string {
  2538. return s.String()
  2539. }
  2540. type CreateAssociationBatchInput struct {
  2541. _ struct{} `type:"structure"`
  2542. // One or more associations.
  2543. //
  2544. // Entries is a required field
  2545. Entries []*CreateAssociationBatchRequestEntry `locationNameList:"entries" type:"list" required:"true"`
  2546. }
  2547. // String returns the string representation
  2548. func (s CreateAssociationBatchInput) String() string {
  2549. return awsutil.Prettify(s)
  2550. }
  2551. // GoString returns the string representation
  2552. func (s CreateAssociationBatchInput) GoString() string {
  2553. return s.String()
  2554. }
  2555. // Validate inspects the fields of the type to determine if they are valid.
  2556. func (s *CreateAssociationBatchInput) Validate() error {
  2557. invalidParams := request.ErrInvalidParams{Context: "CreateAssociationBatchInput"}
  2558. if s.Entries == nil {
  2559. invalidParams.Add(request.NewErrParamRequired("Entries"))
  2560. }
  2561. if invalidParams.Len() > 0 {
  2562. return invalidParams
  2563. }
  2564. return nil
  2565. }
  2566. type CreateAssociationBatchOutput struct {
  2567. _ struct{} `type:"structure"`
  2568. // Information about the associations that failed.
  2569. Failed []*FailedCreateAssociation `locationNameList:"FailedCreateAssociationEntry" type:"list"`
  2570. // Information about the associations that succeeded.
  2571. Successful []*AssociationDescription `locationNameList:"AssociationDescription" type:"list"`
  2572. }
  2573. // String returns the string representation
  2574. func (s CreateAssociationBatchOutput) String() string {
  2575. return awsutil.Prettify(s)
  2576. }
  2577. // GoString returns the string representation
  2578. func (s CreateAssociationBatchOutput) GoString() string {
  2579. return s.String()
  2580. }
  2581. // Describes the association of an SSM document and an instance.
  2582. type CreateAssociationBatchRequestEntry struct {
  2583. _ struct{} `type:"structure"`
  2584. // The ID of the instance.
  2585. InstanceId *string `type:"string"`
  2586. // The name of the configuration document.
  2587. Name *string `type:"string"`
  2588. // A description of the parameters for a document.
  2589. Parameters map[string][]*string `type:"map"`
  2590. }
  2591. // String returns the string representation
  2592. func (s CreateAssociationBatchRequestEntry) String() string {
  2593. return awsutil.Prettify(s)
  2594. }
  2595. // GoString returns the string representation
  2596. func (s CreateAssociationBatchRequestEntry) GoString() string {
  2597. return s.String()
  2598. }
  2599. type CreateAssociationInput struct {
  2600. _ struct{} `type:"structure"`
  2601. // The instance ID.
  2602. //
  2603. // InstanceId is a required field
  2604. InstanceId *string `type:"string" required:"true"`
  2605. // The name of the SSM document.
  2606. //
  2607. // Name is a required field
  2608. Name *string `type:"string" required:"true"`
  2609. // The parameters for the documents runtime configuration.
  2610. Parameters map[string][]*string `type:"map"`
  2611. }
  2612. // String returns the string representation
  2613. func (s CreateAssociationInput) String() string {
  2614. return awsutil.Prettify(s)
  2615. }
  2616. // GoString returns the string representation
  2617. func (s CreateAssociationInput) GoString() string {
  2618. return s.String()
  2619. }
  2620. // Validate inspects the fields of the type to determine if they are valid.
  2621. func (s *CreateAssociationInput) Validate() error {
  2622. invalidParams := request.ErrInvalidParams{Context: "CreateAssociationInput"}
  2623. if s.InstanceId == nil {
  2624. invalidParams.Add(request.NewErrParamRequired("InstanceId"))
  2625. }
  2626. if s.Name == nil {
  2627. invalidParams.Add(request.NewErrParamRequired("Name"))
  2628. }
  2629. if invalidParams.Len() > 0 {
  2630. return invalidParams
  2631. }
  2632. return nil
  2633. }
  2634. type CreateAssociationOutput struct {
  2635. _ struct{} `type:"structure"`
  2636. // Information about the association.
  2637. AssociationDescription *AssociationDescription `type:"structure"`
  2638. }
  2639. // String returns the string representation
  2640. func (s CreateAssociationOutput) String() string {
  2641. return awsutil.Prettify(s)
  2642. }
  2643. // GoString returns the string representation
  2644. func (s CreateAssociationOutput) GoString() string {
  2645. return s.String()
  2646. }
  2647. type CreateDocumentInput struct {
  2648. _ struct{} `type:"structure"`
  2649. // A valid JSON string.
  2650. //
  2651. // Content is a required field
  2652. Content *string `min:"1" type:"string" required:"true"`
  2653. // A name for the SSM document.
  2654. //
  2655. // Name is a required field
  2656. Name *string `type:"string" required:"true"`
  2657. }
  2658. // String returns the string representation
  2659. func (s CreateDocumentInput) String() string {
  2660. return awsutil.Prettify(s)
  2661. }
  2662. // GoString returns the string representation
  2663. func (s CreateDocumentInput) GoString() string {
  2664. return s.String()
  2665. }
  2666. // Validate inspects the fields of the type to determine if they are valid.
  2667. func (s *CreateDocumentInput) Validate() error {
  2668. invalidParams := request.ErrInvalidParams{Context: "CreateDocumentInput"}
  2669. if s.Content == nil {
  2670. invalidParams.Add(request.NewErrParamRequired("Content"))
  2671. }
  2672. if s.Content != nil && len(*s.Content) < 1 {
  2673. invalidParams.Add(request.NewErrParamMinLen("Content", 1))
  2674. }
  2675. if s.Name == nil {
  2676. invalidParams.Add(request.NewErrParamRequired("Name"))
  2677. }
  2678. if invalidParams.Len() > 0 {
  2679. return invalidParams
  2680. }
  2681. return nil
  2682. }
  2683. type CreateDocumentOutput struct {
  2684. _ struct{} `type:"structure"`
  2685. // Information about the SSM document.
  2686. DocumentDescription *DocumentDescription `type:"structure"`
  2687. }
  2688. // String returns the string representation
  2689. func (s CreateDocumentOutput) String() string {
  2690. return awsutil.Prettify(s)
  2691. }
  2692. // GoString returns the string representation
  2693. func (s CreateDocumentOutput) GoString() string {
  2694. return s.String()
  2695. }
  2696. type DeleteActivationInput struct {
  2697. _ struct{} `type:"structure"`
  2698. // The ID of the activation that you want to delete.
  2699. //
  2700. // ActivationId is a required field
  2701. ActivationId *string `type:"string" required:"true"`
  2702. }
  2703. // String returns the string representation
  2704. func (s DeleteActivationInput) String() string {
  2705. return awsutil.Prettify(s)
  2706. }
  2707. // GoString returns the string representation
  2708. func (s DeleteActivationInput) GoString() string {
  2709. return s.String()
  2710. }
  2711. // Validate inspects the fields of the type to determine if they are valid.
  2712. func (s *DeleteActivationInput) Validate() error {
  2713. invalidParams := request.ErrInvalidParams{Context: "DeleteActivationInput"}
  2714. if s.ActivationId == nil {
  2715. invalidParams.Add(request.NewErrParamRequired("ActivationId"))
  2716. }
  2717. if invalidParams.Len() > 0 {
  2718. return invalidParams
  2719. }
  2720. return nil
  2721. }
  2722. type DeleteActivationOutput struct {
  2723. _ struct{} `type:"structure"`
  2724. }
  2725. // String returns the string representation
  2726. func (s DeleteActivationOutput) String() string {
  2727. return awsutil.Prettify(s)
  2728. }
  2729. // GoString returns the string representation
  2730. func (s DeleteActivationOutput) GoString() string {
  2731. return s.String()
  2732. }
  2733. type DeleteAssociationInput struct {
  2734. _ struct{} `type:"structure"`
  2735. // The ID of the instance.
  2736. //
  2737. // InstanceId is a required field
  2738. InstanceId *string `type:"string" required:"true"`
  2739. // The name of the SSM document.
  2740. //
  2741. // Name is a required field
  2742. Name *string `type:"string" required:"true"`
  2743. }
  2744. // String returns the string representation
  2745. func (s DeleteAssociationInput) String() string {
  2746. return awsutil.Prettify(s)
  2747. }
  2748. // GoString returns the string representation
  2749. func (s DeleteAssociationInput) GoString() string {
  2750. return s.String()
  2751. }
  2752. // Validate inspects the fields of the type to determine if they are valid.
  2753. func (s *DeleteAssociationInput) Validate() error {
  2754. invalidParams := request.ErrInvalidParams{Context: "DeleteAssociationInput"}
  2755. if s.InstanceId == nil {
  2756. invalidParams.Add(request.NewErrParamRequired("InstanceId"))
  2757. }
  2758. if s.Name == nil {
  2759. invalidParams.Add(request.NewErrParamRequired("Name"))
  2760. }
  2761. if invalidParams.Len() > 0 {
  2762. return invalidParams
  2763. }
  2764. return nil
  2765. }
  2766. type DeleteAssociationOutput struct {
  2767. _ struct{} `type:"structure"`
  2768. }
  2769. // String returns the string representation
  2770. func (s DeleteAssociationOutput) String() string {
  2771. return awsutil.Prettify(s)
  2772. }
  2773. // GoString returns the string representation
  2774. func (s DeleteAssociationOutput) GoString() string {
  2775. return s.String()
  2776. }
  2777. type DeleteDocumentInput struct {
  2778. _ struct{} `type:"structure"`
  2779. // The name of the SSM document.
  2780. //
  2781. // Name is a required field
  2782. Name *string `type:"string" required:"true"`
  2783. }
  2784. // String returns the string representation
  2785. func (s DeleteDocumentInput) String() string {
  2786. return awsutil.Prettify(s)
  2787. }
  2788. // GoString returns the string representation
  2789. func (s DeleteDocumentInput) GoString() string {
  2790. return s.String()
  2791. }
  2792. // Validate inspects the fields of the type to determine if they are valid.
  2793. func (s *DeleteDocumentInput) Validate() error {
  2794. invalidParams := request.ErrInvalidParams{Context: "DeleteDocumentInput"}
  2795. if s.Name == nil {
  2796. invalidParams.Add(request.NewErrParamRequired("Name"))
  2797. }
  2798. if invalidParams.Len() > 0 {
  2799. return invalidParams
  2800. }
  2801. return nil
  2802. }
  2803. type DeleteDocumentOutput struct {
  2804. _ struct{} `type:"structure"`
  2805. }
  2806. // String returns the string representation
  2807. func (s DeleteDocumentOutput) String() string {
  2808. return awsutil.Prettify(s)
  2809. }
  2810. // GoString returns the string representation
  2811. func (s DeleteDocumentOutput) GoString() string {
  2812. return s.String()
  2813. }
  2814. type DeregisterManagedInstanceInput struct {
  2815. _ struct{} `type:"structure"`
  2816. // The ID assigned to the managed instance when you registered it using the
  2817. // activation process.
  2818. //
  2819. // InstanceId is a required field
  2820. InstanceId *string `type:"string" required:"true"`
  2821. }
  2822. // String returns the string representation
  2823. func (s DeregisterManagedInstanceInput) String() string {
  2824. return awsutil.Prettify(s)
  2825. }
  2826. // GoString returns the string representation
  2827. func (s DeregisterManagedInstanceInput) GoString() string {
  2828. return s.String()
  2829. }
  2830. // Validate inspects the fields of the type to determine if they are valid.
  2831. func (s *DeregisterManagedInstanceInput) Validate() error {
  2832. invalidParams := request.ErrInvalidParams{Context: "DeregisterManagedInstanceInput"}
  2833. if s.InstanceId == nil {
  2834. invalidParams.Add(request.NewErrParamRequired("InstanceId"))
  2835. }
  2836. if invalidParams.Len() > 0 {
  2837. return invalidParams
  2838. }
  2839. return nil
  2840. }
  2841. type DeregisterManagedInstanceOutput struct {
  2842. _ struct{} `type:"structure"`
  2843. }
  2844. // String returns the string representation
  2845. func (s DeregisterManagedInstanceOutput) String() string {
  2846. return awsutil.Prettify(s)
  2847. }
  2848. // GoString returns the string representation
  2849. func (s DeregisterManagedInstanceOutput) GoString() string {
  2850. return s.String()
  2851. }
  2852. // Filter for the DescribeActivation API.
  2853. type DescribeActivationsFilter struct {
  2854. _ struct{} `type:"structure"`
  2855. // The name of the filter.
  2856. FilterKey *string `type:"string" enum:"DescribeActivationsFilterKeys"`
  2857. // The filter values.
  2858. FilterValues []*string `type:"list"`
  2859. }
  2860. // String returns the string representation
  2861. func (s DescribeActivationsFilter) String() string {
  2862. return awsutil.Prettify(s)
  2863. }
  2864. // GoString returns the string representation
  2865. func (s DescribeActivationsFilter) GoString() string {
  2866. return s.String()
  2867. }
  2868. type DescribeActivationsInput struct {
  2869. _ struct{} `type:"structure"`
  2870. // A filter to view information about your activations.
  2871. Filters []*DescribeActivationsFilter `type:"list"`
  2872. // The maximum number of items to return for this call. The call also returns
  2873. // a token that you can specify in a subsequent call to get the next set of
  2874. // results.
  2875. MaxResults *int64 `min:"1" type:"integer"`
  2876. // A token to start the list. Use this token to get the next set of results.
  2877. NextToken *string `type:"string"`
  2878. }
  2879. // String returns the string representation
  2880. func (s DescribeActivationsInput) String() string {
  2881. return awsutil.Prettify(s)
  2882. }
  2883. // GoString returns the string representation
  2884. func (s DescribeActivationsInput) GoString() string {
  2885. return s.String()
  2886. }
  2887. // Validate inspects the fields of the type to determine if they are valid.
  2888. func (s *DescribeActivationsInput) Validate() error {
  2889. invalidParams := request.ErrInvalidParams{Context: "DescribeActivationsInput"}
  2890. if s.MaxResults != nil && *s.MaxResults < 1 {
  2891. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2892. }
  2893. if invalidParams.Len() > 0 {
  2894. return invalidParams
  2895. }
  2896. return nil
  2897. }
  2898. type DescribeActivationsOutput struct {
  2899. _ struct{} `type:"structure"`
  2900. // A list of activations for your AWS account.
  2901. ActivationList []*Activation `type:"list"`
  2902. // The token for the next set of items to return. Use this token to get the
  2903. // next set of results.
  2904. NextToken *string `type:"string"`
  2905. }
  2906. // String returns the string representation
  2907. func (s DescribeActivationsOutput) String() string {
  2908. return awsutil.Prettify(s)
  2909. }
  2910. // GoString returns the string representation
  2911. func (s DescribeActivationsOutput) GoString() string {
  2912. return s.String()
  2913. }
  2914. type DescribeAssociationInput struct {
  2915. _ struct{} `type:"structure"`
  2916. // The instance ID.
  2917. //
  2918. // InstanceId is a required field
  2919. InstanceId *string `type:"string" required:"true"`
  2920. // The name of the SSM document.
  2921. //
  2922. // Name is a required field
  2923. Name *string `type:"string" required:"true"`
  2924. }
  2925. // String returns the string representation
  2926. func (s DescribeAssociationInput) String() string {
  2927. return awsutil.Prettify(s)
  2928. }
  2929. // GoString returns the string representation
  2930. func (s DescribeAssociationInput) GoString() string {
  2931. return s.String()
  2932. }
  2933. // Validate inspects the fields of the type to determine if they are valid.
  2934. func (s *DescribeAssociationInput) Validate() error {
  2935. invalidParams := request.ErrInvalidParams{Context: "DescribeAssociationInput"}
  2936. if s.InstanceId == nil {
  2937. invalidParams.Add(request.NewErrParamRequired("InstanceId"))
  2938. }
  2939. if s.Name == nil {
  2940. invalidParams.Add(request.NewErrParamRequired("Name"))
  2941. }
  2942. if invalidParams.Len() > 0 {
  2943. return invalidParams
  2944. }
  2945. return nil
  2946. }
  2947. type DescribeAssociationOutput struct {
  2948. _ struct{} `type:"structure"`
  2949. // Information about the association.
  2950. AssociationDescription *AssociationDescription `type:"structure"`
  2951. }
  2952. // String returns the string representation
  2953. func (s DescribeAssociationOutput) String() string {
  2954. return awsutil.Prettify(s)
  2955. }
  2956. // GoString returns the string representation
  2957. func (s DescribeAssociationOutput) GoString() string {
  2958. return s.String()
  2959. }
  2960. type DescribeDocumentInput struct {
  2961. _ struct{} `type:"structure"`
  2962. // The name of the SSM document.
  2963. //
  2964. // Name is a required field
  2965. Name *string `type:"string" required:"true"`
  2966. }
  2967. // String returns the string representation
  2968. func (s DescribeDocumentInput) String() string {
  2969. return awsutil.Prettify(s)
  2970. }
  2971. // GoString returns the string representation
  2972. func (s DescribeDocumentInput) GoString() string {
  2973. return s.String()
  2974. }
  2975. // Validate inspects the fields of the type to determine if they are valid.
  2976. func (s *DescribeDocumentInput) Validate() error {
  2977. invalidParams := request.ErrInvalidParams{Context: "DescribeDocumentInput"}
  2978. if s.Name == nil {
  2979. invalidParams.Add(request.NewErrParamRequired("Name"))
  2980. }
  2981. if invalidParams.Len() > 0 {
  2982. return invalidParams
  2983. }
  2984. return nil
  2985. }
  2986. type DescribeDocumentOutput struct {
  2987. _ struct{} `type:"structure"`
  2988. // Information about the SSM document.
  2989. Document *DocumentDescription `type:"structure"`
  2990. }
  2991. // String returns the string representation
  2992. func (s DescribeDocumentOutput) String() string {
  2993. return awsutil.Prettify(s)
  2994. }
  2995. // GoString returns the string representation
  2996. func (s DescribeDocumentOutput) GoString() string {
  2997. return s.String()
  2998. }
  2999. type DescribeDocumentPermissionInput struct {
  3000. _ struct{} `type:"structure"`
  3001. // The name of the document for which you are the owner.
  3002. //
  3003. // Name is a required field
  3004. Name *string `type:"string" required:"true"`
  3005. // The permission type for the document. The permission type can be Share.
  3006. //
  3007. // PermissionType is a required field
  3008. PermissionType *string `type:"string" required:"true" enum:"DocumentPermissionType"`
  3009. }
  3010. // String returns the string representation
  3011. func (s DescribeDocumentPermissionInput) String() string {
  3012. return awsutil.Prettify(s)
  3013. }
  3014. // GoString returns the string representation
  3015. func (s DescribeDocumentPermissionInput) GoString() string {
  3016. return s.String()
  3017. }
  3018. // Validate inspects the fields of the type to determine if they are valid.
  3019. func (s *DescribeDocumentPermissionInput) Validate() error {
  3020. invalidParams := request.ErrInvalidParams{Context: "DescribeDocumentPermissionInput"}
  3021. if s.Name == nil {
  3022. invalidParams.Add(request.NewErrParamRequired("Name"))
  3023. }
  3024. if s.PermissionType == nil {
  3025. invalidParams.Add(request.NewErrParamRequired("PermissionType"))
  3026. }
  3027. if invalidParams.Len() > 0 {
  3028. return invalidParams
  3029. }
  3030. return nil
  3031. }
  3032. type DescribeDocumentPermissionOutput struct {
  3033. _ struct{} `type:"structure"`
  3034. // The account IDs that have permission to use this document. The ID can be
  3035. // either an AWS account or All.
  3036. AccountIds []*string `locationNameList:"AccountId" type:"list"`
  3037. }
  3038. // String returns the string representation
  3039. func (s DescribeDocumentPermissionOutput) String() string {
  3040. return awsutil.Prettify(s)
  3041. }
  3042. // GoString returns the string representation
  3043. func (s DescribeDocumentPermissionOutput) GoString() string {
  3044. return s.String()
  3045. }
  3046. type DescribeInstanceInformationInput struct {
  3047. _ struct{} `type:"structure"`
  3048. // One or more filters. Use a filter to return a more specific list of instances.
  3049. InstanceInformationFilterList []*InstanceInformationFilter `locationNameList:"InstanceInformationFilter" min:"1" type:"list"`
  3050. // The maximum number of items to return for this call. The call also returns
  3051. // a token that you can specify in a subsequent call to get the next set of
  3052. // results.
  3053. MaxResults *int64 `min:"5" type:"integer"`
  3054. // The token for the next set of items to return. (You received this token from
  3055. // a previous call.)
  3056. NextToken *string `type:"string"`
  3057. }
  3058. // String returns the string representation
  3059. func (s DescribeInstanceInformationInput) String() string {
  3060. return awsutil.Prettify(s)
  3061. }
  3062. // GoString returns the string representation
  3063. func (s DescribeInstanceInformationInput) GoString() string {
  3064. return s.String()
  3065. }
  3066. // Validate inspects the fields of the type to determine if they are valid.
  3067. func (s *DescribeInstanceInformationInput) Validate() error {
  3068. invalidParams := request.ErrInvalidParams{Context: "DescribeInstanceInformationInput"}
  3069. if s.InstanceInformationFilterList != nil && len(s.InstanceInformationFilterList) < 1 {
  3070. invalidParams.Add(request.NewErrParamMinLen("InstanceInformationFilterList", 1))
  3071. }
  3072. if s.MaxResults != nil && *s.MaxResults < 5 {
  3073. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5))
  3074. }
  3075. if s.InstanceInformationFilterList != nil {
  3076. for i, v := range s.InstanceInformationFilterList {
  3077. if v == nil {
  3078. continue
  3079. }
  3080. if err := v.Validate(); err != nil {
  3081. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InstanceInformationFilterList", i), err.(request.ErrInvalidParams))
  3082. }
  3083. }
  3084. }
  3085. if invalidParams.Len() > 0 {
  3086. return invalidParams
  3087. }
  3088. return nil
  3089. }
  3090. type DescribeInstanceInformationOutput struct {
  3091. _ struct{} `type:"structure"`
  3092. // The instance information list.
  3093. InstanceInformationList []*InstanceInformation `locationNameList:"InstanceInformation" type:"list"`
  3094. // The token to use when requesting the next set of items. If there are no additional
  3095. // items to return, the string is empty.
  3096. NextToken *string `type:"string"`
  3097. }
  3098. // String returns the string representation
  3099. func (s DescribeInstanceInformationOutput) String() string {
  3100. return awsutil.Prettify(s)
  3101. }
  3102. // GoString returns the string representation
  3103. func (s DescribeInstanceInformationOutput) GoString() string {
  3104. return s.String()
  3105. }
  3106. // Describes an SSM document.
  3107. type DocumentDescription struct {
  3108. _ struct{} `type:"structure"`
  3109. // The date when the SSM document was created.
  3110. CreatedDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  3111. // A description of the document.
  3112. Description *string `type:"string"`
  3113. // The Sha256 or Sha1 hash created by the system when the document was created.
  3114. //
  3115. // Sha1 hashes have been deprecated.
  3116. Hash *string `type:"string"`
  3117. // Sha256 or Sha1.
  3118. //
  3119. // Sha1 hashes have been deprecated.
  3120. HashType *string `type:"string" enum:"DocumentHashType"`
  3121. // The name of the SSM document.
  3122. Name *string `type:"string"`
  3123. // The AWS user account of the person who created the document.
  3124. Owner *string `type:"string"`
  3125. // A description of the parameters for a document.
  3126. Parameters []*DocumentParameter `locationNameList:"DocumentParameter" type:"list"`
  3127. // The list of OS platforms compatible with this SSM document.
  3128. PlatformTypes []*string `locationNameList:"PlatformType" type:"list"`
  3129. // The SHA1 hash of the document, which you can use for verification purposes.
  3130. Sha1 *string `type:"string"`
  3131. // The status of the SSM document.
  3132. Status *string `type:"string" enum:"DocumentStatus"`
  3133. }
  3134. // String returns the string representation
  3135. func (s DocumentDescription) String() string {
  3136. return awsutil.Prettify(s)
  3137. }
  3138. // GoString returns the string representation
  3139. func (s DocumentDescription) GoString() string {
  3140. return s.String()
  3141. }
  3142. // Describes a filter.
  3143. type DocumentFilter struct {
  3144. _ struct{} `type:"structure"`
  3145. // The name of the filter.
  3146. //
  3147. // Key is a required field
  3148. Key *string `locationName:"key" type:"string" required:"true" enum:"DocumentFilterKey"`
  3149. // The value of the filter.
  3150. //
  3151. // Value is a required field
  3152. Value *string `locationName:"value" min:"1" type:"string" required:"true"`
  3153. }
  3154. // String returns the string representation
  3155. func (s DocumentFilter) String() string {
  3156. return awsutil.Prettify(s)
  3157. }
  3158. // GoString returns the string representation
  3159. func (s DocumentFilter) GoString() string {
  3160. return s.String()
  3161. }
  3162. // Validate inspects the fields of the type to determine if they are valid.
  3163. func (s *DocumentFilter) Validate() error {
  3164. invalidParams := request.ErrInvalidParams{Context: "DocumentFilter"}
  3165. if s.Key == nil {
  3166. invalidParams.Add(request.NewErrParamRequired("Key"))
  3167. }
  3168. if s.Value == nil {
  3169. invalidParams.Add(request.NewErrParamRequired("Value"))
  3170. }
  3171. if s.Value != nil && len(*s.Value) < 1 {
  3172. invalidParams.Add(request.NewErrParamMinLen("Value", 1))
  3173. }
  3174. if invalidParams.Len() > 0 {
  3175. return invalidParams
  3176. }
  3177. return nil
  3178. }
  3179. // Describes the name of an SSM document.
  3180. type DocumentIdentifier struct {
  3181. _ struct{} `type:"structure"`
  3182. // The name of the SSM document.
  3183. Name *string `type:"string"`
  3184. // The AWS user account of the person who created the document.
  3185. Owner *string `type:"string"`
  3186. // The operating system platform.
  3187. PlatformTypes []*string `locationNameList:"PlatformType" type:"list"`
  3188. }
  3189. // String returns the string representation
  3190. func (s DocumentIdentifier) String() string {
  3191. return awsutil.Prettify(s)
  3192. }
  3193. // GoString returns the string representation
  3194. func (s DocumentIdentifier) GoString() string {
  3195. return s.String()
  3196. }
  3197. // Parameters specified in the SSM document that execute on the server when
  3198. // the command is run.
  3199. type DocumentParameter struct {
  3200. _ struct{} `type:"structure"`
  3201. // If specified, the default values for the parameters. Parameters without a
  3202. // default value are required. Parameters with a default value are optional.
  3203. DefaultValue *string `type:"string"`
  3204. // A description of what the parameter does, how to use it, the default value,
  3205. // and whether or not the parameter is optional.
  3206. Description *string `type:"string"`
  3207. // The name of the parameter.
  3208. Name *string `type:"string"`
  3209. // The type of parameter. The type can be either “String” or “StringList”.
  3210. Type *string `type:"string" enum:"DocumentParameterType"`
  3211. }
  3212. // String returns the string representation
  3213. func (s DocumentParameter) String() string {
  3214. return awsutil.Prettify(s)
  3215. }
  3216. // GoString returns the string representation
  3217. func (s DocumentParameter) GoString() string {
  3218. return s.String()
  3219. }
  3220. // Describes a failed association.
  3221. type FailedCreateAssociation struct {
  3222. _ struct{} `type:"structure"`
  3223. // The association.
  3224. Entry *CreateAssociationBatchRequestEntry `type:"structure"`
  3225. // The source of the failure.
  3226. Fault *string `type:"string" enum:"Fault"`
  3227. // A description of the failure.
  3228. Message *string `type:"string"`
  3229. }
  3230. // String returns the string representation
  3231. func (s FailedCreateAssociation) String() string {
  3232. return awsutil.Prettify(s)
  3233. }
  3234. // GoString returns the string representation
  3235. func (s FailedCreateAssociation) GoString() string {
  3236. return s.String()
  3237. }
  3238. type GetDocumentInput struct {
  3239. _ struct{} `type:"structure"`
  3240. // The name of the SSM document.
  3241. //
  3242. // Name is a required field
  3243. Name *string `type:"string" required:"true"`
  3244. }
  3245. // String returns the string representation
  3246. func (s GetDocumentInput) String() string {
  3247. return awsutil.Prettify(s)
  3248. }
  3249. // GoString returns the string representation
  3250. func (s GetDocumentInput) GoString() string {
  3251. return s.String()
  3252. }
  3253. // Validate inspects the fields of the type to determine if they are valid.
  3254. func (s *GetDocumentInput) Validate() error {
  3255. invalidParams := request.ErrInvalidParams{Context: "GetDocumentInput"}
  3256. if s.Name == nil {
  3257. invalidParams.Add(request.NewErrParamRequired("Name"))
  3258. }
  3259. if invalidParams.Len() > 0 {
  3260. return invalidParams
  3261. }
  3262. return nil
  3263. }
  3264. type GetDocumentOutput struct {
  3265. _ struct{} `type:"structure"`
  3266. // The contents of the SSM document.
  3267. Content *string `min:"1" type:"string"`
  3268. // The name of the SSM document.
  3269. Name *string `type:"string"`
  3270. }
  3271. // String returns the string representation
  3272. func (s GetDocumentOutput) String() string {
  3273. return awsutil.Prettify(s)
  3274. }
  3275. // GoString returns the string representation
  3276. func (s GetDocumentOutput) GoString() string {
  3277. return s.String()
  3278. }
  3279. // Describes a filter for a specific list of instances.
  3280. type InstanceInformation struct {
  3281. _ struct{} `type:"structure"`
  3282. // The activation ID created by SSM when the server or VM was registered.
  3283. ActivationId *string `type:"string"`
  3284. // The version of the SSM agent running on your Linux instance.
  3285. AgentVersion *string `type:"string"`
  3286. // The fully qualified host name of the managed instance.
  3287. ComputerName *string `min:"1" type:"string"`
  3288. // The IP address of the managed instance.
  3289. IPAddress *string `min:"1" type:"string"`
  3290. // The Amazon Identity and Access Management (IAM) role assigned to EC2 instances
  3291. // or managed instances.
  3292. IamRole *string `type:"string"`
  3293. // The instance ID.
  3294. InstanceId *string `type:"string"`
  3295. // Indicates whether latest version of the SSM agent is running on your instance.
  3296. IsLatestVersion *bool `type:"boolean"`
  3297. // The date and time when agent last pinged SSM service.
  3298. LastPingDateTime *time.Time `type:"timestamp" timestampFormat:"unix"`
  3299. // The name of the managed instance.
  3300. Name *string `type:"string"`
  3301. // Connection status of the SSM agent.
  3302. PingStatus *string `type:"string" enum:"PingStatus"`
  3303. // The name of the operating system platform running on your instance.
  3304. PlatformName *string `type:"string"`
  3305. // The operating system platform type.
  3306. PlatformType *string `type:"string" enum:"PlatformType"`
  3307. // The version of the OS platform running on your instance.
  3308. PlatformVersion *string `type:"string"`
  3309. // The date the server or VM was registered with AWS as a managed instance.
  3310. RegistrationDate *time.Time `type:"timestamp" timestampFormat:"unix"`
  3311. // The type of instance. Instances are either EC2 instances or managed instances.
  3312. ResourceType *string `type:"string" enum:"ResourceType"`
  3313. }
  3314. // String returns the string representation
  3315. func (s InstanceInformation) String() string {
  3316. return awsutil.Prettify(s)
  3317. }
  3318. // GoString returns the string representation
  3319. func (s InstanceInformation) GoString() string {
  3320. return s.String()
  3321. }
  3322. // Describes a filter for a specific list of instances.
  3323. type InstanceInformationFilter struct {
  3324. _ struct{} `type:"structure"`
  3325. // The name of the filter.
  3326. //
  3327. // Key is a required field
  3328. Key *string `locationName:"key" type:"string" required:"true" enum:"InstanceInformationFilterKey"`
  3329. // The filter values.
  3330. //
  3331. // ValueSet is a required field
  3332. ValueSet []*string `locationName:"valueSet" locationNameList:"InstanceInformationFilterValue" min:"1" type:"list" required:"true"`
  3333. }
  3334. // String returns the string representation
  3335. func (s InstanceInformationFilter) String() string {
  3336. return awsutil.Prettify(s)
  3337. }
  3338. // GoString returns the string representation
  3339. func (s InstanceInformationFilter) GoString() string {
  3340. return s.String()
  3341. }
  3342. // Validate inspects the fields of the type to determine if they are valid.
  3343. func (s *InstanceInformationFilter) Validate() error {
  3344. invalidParams := request.ErrInvalidParams{Context: "InstanceInformationFilter"}
  3345. if s.Key == nil {
  3346. invalidParams.Add(request.NewErrParamRequired("Key"))
  3347. }
  3348. if s.ValueSet == nil {
  3349. invalidParams.Add(request.NewErrParamRequired("ValueSet"))
  3350. }
  3351. if s.ValueSet != nil && len(s.ValueSet) < 1 {
  3352. invalidParams.Add(request.NewErrParamMinLen("ValueSet", 1))
  3353. }
  3354. if invalidParams.Len() > 0 {
  3355. return invalidParams
  3356. }
  3357. return nil
  3358. }
  3359. type ListAssociationsInput struct {
  3360. _ struct{} `type:"structure"`
  3361. // One or more filters. Use a filter to return a more specific list of results.
  3362. //
  3363. // AssociationFilterList is a required field
  3364. AssociationFilterList []*AssociationFilter `locationNameList:"AssociationFilter" min:"1" type:"list" required:"true"`
  3365. // The maximum number of items to return for this call. The call also returns
  3366. // a token that you can specify in a subsequent call to get the next set of
  3367. // results.
  3368. MaxResults *int64 `min:"1" type:"integer"`
  3369. // The token for the next set of items to return. (You received this token from
  3370. // a previous call.)
  3371. NextToken *string `type:"string"`
  3372. }
  3373. // String returns the string representation
  3374. func (s ListAssociationsInput) String() string {
  3375. return awsutil.Prettify(s)
  3376. }
  3377. // GoString returns the string representation
  3378. func (s ListAssociationsInput) GoString() string {
  3379. return s.String()
  3380. }
  3381. // Validate inspects the fields of the type to determine if they are valid.
  3382. func (s *ListAssociationsInput) Validate() error {
  3383. invalidParams := request.ErrInvalidParams{Context: "ListAssociationsInput"}
  3384. if s.AssociationFilterList == nil {
  3385. invalidParams.Add(request.NewErrParamRequired("AssociationFilterList"))
  3386. }
  3387. if s.AssociationFilterList != nil && len(s.AssociationFilterList) < 1 {
  3388. invalidParams.Add(request.NewErrParamMinLen("AssociationFilterList", 1))
  3389. }
  3390. if s.MaxResults != nil && *s.MaxResults < 1 {
  3391. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3392. }
  3393. if s.AssociationFilterList != nil {
  3394. for i, v := range s.AssociationFilterList {
  3395. if v == nil {
  3396. continue
  3397. }
  3398. if err := v.Validate(); err != nil {
  3399. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AssociationFilterList", i), err.(request.ErrInvalidParams))
  3400. }
  3401. }
  3402. }
  3403. if invalidParams.Len() > 0 {
  3404. return invalidParams
  3405. }
  3406. return nil
  3407. }
  3408. type ListAssociationsOutput struct {
  3409. _ struct{} `type:"structure"`
  3410. // The associations.
  3411. Associations []*Association `locationNameList:"Association" type:"list"`
  3412. // The token to use when requesting the next set of items. If there are no additional
  3413. // items to return, the string is empty.
  3414. NextToken *string `type:"string"`
  3415. }
  3416. // String returns the string representation
  3417. func (s ListAssociationsOutput) String() string {
  3418. return awsutil.Prettify(s)
  3419. }
  3420. // GoString returns the string representation
  3421. func (s ListAssociationsOutput) GoString() string {
  3422. return s.String()
  3423. }
  3424. type ListCommandInvocationsInput struct {
  3425. _ struct{} `type:"structure"`
  3426. // (Optional) The invocations for a specific command ID.
  3427. CommandId *string `min:"36" type:"string"`
  3428. // (Optional) If set this returns the response of the command executions and
  3429. // any command output. By default this is set to False.
  3430. Details *bool `type:"boolean"`
  3431. // (Optional) One or more filters. Use a filter to return a more specific list
  3432. // of results.
  3433. Filters []*CommandFilter `min:"1" type:"list"`
  3434. // (Optional) The command execution details for a specific instance ID.
  3435. InstanceId *string `type:"string"`
  3436. // (Optional) The maximum number of items to return for this call. The call
  3437. // also returns a token that you can specify in a subsequent call to get the
  3438. // next set of results.
  3439. MaxResults *int64 `min:"1" type:"integer"`
  3440. // (Optional) The token for the next set of items to return. (You received this
  3441. // token from a previous call.)
  3442. NextToken *string `type:"string"`
  3443. }
  3444. // String returns the string representation
  3445. func (s ListCommandInvocationsInput) String() string {
  3446. return awsutil.Prettify(s)
  3447. }
  3448. // GoString returns the string representation
  3449. func (s ListCommandInvocationsInput) GoString() string {
  3450. return s.String()
  3451. }
  3452. // Validate inspects the fields of the type to determine if they are valid.
  3453. func (s *ListCommandInvocationsInput) Validate() error {
  3454. invalidParams := request.ErrInvalidParams{Context: "ListCommandInvocationsInput"}
  3455. if s.CommandId != nil && len(*s.CommandId) < 36 {
  3456. invalidParams.Add(request.NewErrParamMinLen("CommandId", 36))
  3457. }
  3458. if s.Filters != nil && len(s.Filters) < 1 {
  3459. invalidParams.Add(request.NewErrParamMinLen("Filters", 1))
  3460. }
  3461. if s.MaxResults != nil && *s.MaxResults < 1 {
  3462. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3463. }
  3464. if s.Filters != nil {
  3465. for i, v := range s.Filters {
  3466. if v == nil {
  3467. continue
  3468. }
  3469. if err := v.Validate(); err != nil {
  3470. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams))
  3471. }
  3472. }
  3473. }
  3474. if invalidParams.Len() > 0 {
  3475. return invalidParams
  3476. }
  3477. return nil
  3478. }
  3479. type ListCommandInvocationsOutput struct {
  3480. _ struct{} `type:"structure"`
  3481. // (Optional) A list of all invocations.
  3482. CommandInvocations []*CommandInvocation `type:"list"`
  3483. // (Optional) The token for the next set of items to return. (You received this
  3484. // token from a previous call.)
  3485. NextToken *string `type:"string"`
  3486. }
  3487. // String returns the string representation
  3488. func (s ListCommandInvocationsOutput) String() string {
  3489. return awsutil.Prettify(s)
  3490. }
  3491. // GoString returns the string representation
  3492. func (s ListCommandInvocationsOutput) GoString() string {
  3493. return s.String()
  3494. }
  3495. type ListCommandsInput struct {
  3496. _ struct{} `type:"structure"`
  3497. // (Optional) If provided, lists only the specified command.
  3498. CommandId *string `min:"36" type:"string"`
  3499. // (Optional) One or more filters. Use a filter to return a more specific list
  3500. // of results.
  3501. Filters []*CommandFilter `min:"1" type:"list"`
  3502. // (Optional) Lists commands issued against this instance ID.
  3503. InstanceId *string `type:"string"`
  3504. // (Optional) The maximum number of items to return for this call. The call
  3505. // also returns a token that you can specify in a subsequent call to get the
  3506. // next set of results.
  3507. MaxResults *int64 `min:"1" type:"integer"`
  3508. // (Optional) The token for the next set of items to return. (You received this
  3509. // token from a previous call.)
  3510. NextToken *string `type:"string"`
  3511. }
  3512. // String returns the string representation
  3513. func (s ListCommandsInput) String() string {
  3514. return awsutil.Prettify(s)
  3515. }
  3516. // GoString returns the string representation
  3517. func (s ListCommandsInput) GoString() string {
  3518. return s.String()
  3519. }
  3520. // Validate inspects the fields of the type to determine if they are valid.
  3521. func (s *ListCommandsInput) Validate() error {
  3522. invalidParams := request.ErrInvalidParams{Context: "ListCommandsInput"}
  3523. if s.CommandId != nil && len(*s.CommandId) < 36 {
  3524. invalidParams.Add(request.NewErrParamMinLen("CommandId", 36))
  3525. }
  3526. if s.Filters != nil && len(s.Filters) < 1 {
  3527. invalidParams.Add(request.NewErrParamMinLen("Filters", 1))
  3528. }
  3529. if s.MaxResults != nil && *s.MaxResults < 1 {
  3530. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3531. }
  3532. if s.Filters != nil {
  3533. for i, v := range s.Filters {
  3534. if v == nil {
  3535. continue
  3536. }
  3537. if err := v.Validate(); err != nil {
  3538. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams))
  3539. }
  3540. }
  3541. }
  3542. if invalidParams.Len() > 0 {
  3543. return invalidParams
  3544. }
  3545. return nil
  3546. }
  3547. type ListCommandsOutput struct {
  3548. _ struct{} `type:"structure"`
  3549. // (Optional) The list of commands requested by the user.
  3550. Commands []*Command `type:"list"`
  3551. // (Optional) The token for the next set of items to return. (You received this
  3552. // token from a previous call.)
  3553. NextToken *string `type:"string"`
  3554. }
  3555. // String returns the string representation
  3556. func (s ListCommandsOutput) String() string {
  3557. return awsutil.Prettify(s)
  3558. }
  3559. // GoString returns the string representation
  3560. func (s ListCommandsOutput) GoString() string {
  3561. return s.String()
  3562. }
  3563. type ListDocumentsInput struct {
  3564. _ struct{} `type:"structure"`
  3565. // One or more filters. Use a filter to return a more specific list of results.
  3566. DocumentFilterList []*DocumentFilter `locationNameList:"DocumentFilter" min:"1" type:"list"`
  3567. // The maximum number of items to return for this call. The call also returns
  3568. // a token that you can specify in a subsequent call to get the next set of
  3569. // results.
  3570. MaxResults *int64 `min:"1" type:"integer"`
  3571. // The token for the next set of items to return. (You received this token from
  3572. // a previous call.)
  3573. NextToken *string `type:"string"`
  3574. }
  3575. // String returns the string representation
  3576. func (s ListDocumentsInput) String() string {
  3577. return awsutil.Prettify(s)
  3578. }
  3579. // GoString returns the string representation
  3580. func (s ListDocumentsInput) GoString() string {
  3581. return s.String()
  3582. }
  3583. // Validate inspects the fields of the type to determine if they are valid.
  3584. func (s *ListDocumentsInput) Validate() error {
  3585. invalidParams := request.ErrInvalidParams{Context: "ListDocumentsInput"}
  3586. if s.DocumentFilterList != nil && len(s.DocumentFilterList) < 1 {
  3587. invalidParams.Add(request.NewErrParamMinLen("DocumentFilterList", 1))
  3588. }
  3589. if s.MaxResults != nil && *s.MaxResults < 1 {
  3590. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3591. }
  3592. if s.DocumentFilterList != nil {
  3593. for i, v := range s.DocumentFilterList {
  3594. if v == nil {
  3595. continue
  3596. }
  3597. if err := v.Validate(); err != nil {
  3598. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DocumentFilterList", i), err.(request.ErrInvalidParams))
  3599. }
  3600. }
  3601. }
  3602. if invalidParams.Len() > 0 {
  3603. return invalidParams
  3604. }
  3605. return nil
  3606. }
  3607. type ListDocumentsOutput struct {
  3608. _ struct{} `type:"structure"`
  3609. // The names of the SSM documents.
  3610. DocumentIdentifiers []*DocumentIdentifier `locationNameList:"DocumentIdentifier" type:"list"`
  3611. // The token to use when requesting the next set of items. If there are no additional
  3612. // items to return, the string is empty.
  3613. NextToken *string `type:"string"`
  3614. }
  3615. // String returns the string representation
  3616. func (s ListDocumentsOutput) String() string {
  3617. return awsutil.Prettify(s)
  3618. }
  3619. // GoString returns the string representation
  3620. func (s ListDocumentsOutput) GoString() string {
  3621. return s.String()
  3622. }
  3623. type ListTagsForResourceInput struct {
  3624. _ struct{} `type:"structure"`
  3625. // The resource ID for which you want to see a list of tags.
  3626. //
  3627. // ResourceId is a required field
  3628. ResourceId *string `type:"string" required:"true"`
  3629. // Returns a list of tags for a specific resource type.
  3630. //
  3631. // ResourceType is a required field
  3632. ResourceType *string `type:"string" required:"true" enum:"ResourceTypeForTagging"`
  3633. }
  3634. // String returns the string representation
  3635. func (s ListTagsForResourceInput) String() string {
  3636. return awsutil.Prettify(s)
  3637. }
  3638. // GoString returns the string representation
  3639. func (s ListTagsForResourceInput) GoString() string {
  3640. return s.String()
  3641. }
  3642. // Validate inspects the fields of the type to determine if they are valid.
  3643. func (s *ListTagsForResourceInput) Validate() error {
  3644. invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
  3645. if s.ResourceId == nil {
  3646. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  3647. }
  3648. if s.ResourceType == nil {
  3649. invalidParams.Add(request.NewErrParamRequired("ResourceType"))
  3650. }
  3651. if invalidParams.Len() > 0 {
  3652. return invalidParams
  3653. }
  3654. return nil
  3655. }
  3656. type ListTagsForResourceOutput struct {
  3657. _ struct{} `type:"structure"`
  3658. // A list of tags.
  3659. TagList []*Tag `type:"list"`
  3660. }
  3661. // String returns the string representation
  3662. func (s ListTagsForResourceOutput) String() string {
  3663. return awsutil.Prettify(s)
  3664. }
  3665. // GoString returns the string representation
  3666. func (s ListTagsForResourceOutput) GoString() string {
  3667. return s.String()
  3668. }
  3669. type ModifyDocumentPermissionInput struct {
  3670. _ struct{} `type:"structure"`
  3671. // The AWS user accounts that should have access to the document. The account
  3672. // IDs can either be a group of account IDs or All.
  3673. AccountIdsToAdd []*string `locationNameList:"AccountId" type:"list"`
  3674. // The AWS user accounts that should no longer have access to the document.
  3675. // The AWS user account can either be a group of account IDs or All. This action
  3676. // has a higher priority than AccountIdsToAdd. If you specify an account ID
  3677. // to add and the same ID to remove, the system removes access to the document.
  3678. AccountIdsToRemove []*string `locationNameList:"AccountId" type:"list"`
  3679. // The name of the document that you want to share.
  3680. //
  3681. // Name is a required field
  3682. Name *string `type:"string" required:"true"`
  3683. // The permission type for the document. The permission type can be Share.
  3684. //
  3685. // PermissionType is a required field
  3686. PermissionType *string `type:"string" required:"true" enum:"DocumentPermissionType"`
  3687. }
  3688. // String returns the string representation
  3689. func (s ModifyDocumentPermissionInput) String() string {
  3690. return awsutil.Prettify(s)
  3691. }
  3692. // GoString returns the string representation
  3693. func (s ModifyDocumentPermissionInput) GoString() string {
  3694. return s.String()
  3695. }
  3696. // Validate inspects the fields of the type to determine if they are valid.
  3697. func (s *ModifyDocumentPermissionInput) Validate() error {
  3698. invalidParams := request.ErrInvalidParams{Context: "ModifyDocumentPermissionInput"}
  3699. if s.Name == nil {
  3700. invalidParams.Add(request.NewErrParamRequired("Name"))
  3701. }
  3702. if s.PermissionType == nil {
  3703. invalidParams.Add(request.NewErrParamRequired("PermissionType"))
  3704. }
  3705. if invalidParams.Len() > 0 {
  3706. return invalidParams
  3707. }
  3708. return nil
  3709. }
  3710. type ModifyDocumentPermissionOutput struct {
  3711. _ struct{} `type:"structure"`
  3712. }
  3713. // String returns the string representation
  3714. func (s ModifyDocumentPermissionOutput) String() string {
  3715. return awsutil.Prettify(s)
  3716. }
  3717. // GoString returns the string representation
  3718. func (s ModifyDocumentPermissionOutput) GoString() string {
  3719. return s.String()
  3720. }
  3721. // Configurations for sending notifications.
  3722. type NotificationConfig struct {
  3723. _ struct{} `type:"structure"`
  3724. // An Amazon Resource Name (ARN) for a Simple Notification Service (SNS) topic.
  3725. // SSM pushes notifications about command status changes to this topic.
  3726. NotificationArn *string `type:"string"`
  3727. // The different events for which you can receive notifications. These events
  3728. // include the following: All (events), InProgress, Success, TimedOut, Cancelled,
  3729. // Failed. To learn more about these events, see Monitoring Commands (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitor-commands.html)
  3730. // in the Amazon Elastic Compute Cloud User Guide .
  3731. NotificationEvents []*string `type:"list"`
  3732. // Command: Receive notification when the status of a command changes. Invocation:
  3733. // For commands sent to multiple instances, receive notification on a per-instance
  3734. // basis when the status of a command changes.
  3735. NotificationType *string `type:"string" enum:"NotificationType"`
  3736. }
  3737. // String returns the string representation
  3738. func (s NotificationConfig) String() string {
  3739. return awsutil.Prettify(s)
  3740. }
  3741. // GoString returns the string representation
  3742. func (s NotificationConfig) GoString() string {
  3743. return s.String()
  3744. }
  3745. type RemoveTagsFromResourceInput struct {
  3746. _ struct{} `type:"structure"`
  3747. // The resource ID for which you want to remove tags.
  3748. //
  3749. // ResourceId is a required field
  3750. ResourceId *string `type:"string" required:"true"`
  3751. // The type of resource of which you want to remove a tag.
  3752. //
  3753. // ResourceType is a required field
  3754. ResourceType *string `type:"string" required:"true" enum:"ResourceTypeForTagging"`
  3755. // Tag keys that you want to remove from the specified resource.
  3756. //
  3757. // TagKeys is a required field
  3758. TagKeys []*string `type:"list" required:"true"`
  3759. }
  3760. // String returns the string representation
  3761. func (s RemoveTagsFromResourceInput) String() string {
  3762. return awsutil.Prettify(s)
  3763. }
  3764. // GoString returns the string representation
  3765. func (s RemoveTagsFromResourceInput) GoString() string {
  3766. return s.String()
  3767. }
  3768. // Validate inspects the fields of the type to determine if they are valid.
  3769. func (s *RemoveTagsFromResourceInput) Validate() error {
  3770. invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromResourceInput"}
  3771. if s.ResourceId == nil {
  3772. invalidParams.Add(request.NewErrParamRequired("ResourceId"))
  3773. }
  3774. if s.ResourceType == nil {
  3775. invalidParams.Add(request.NewErrParamRequired("ResourceType"))
  3776. }
  3777. if s.TagKeys == nil {
  3778. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  3779. }
  3780. if invalidParams.Len() > 0 {
  3781. return invalidParams
  3782. }
  3783. return nil
  3784. }
  3785. type RemoveTagsFromResourceOutput struct {
  3786. _ struct{} `type:"structure"`
  3787. }
  3788. // String returns the string representation
  3789. func (s RemoveTagsFromResourceOutput) String() string {
  3790. return awsutil.Prettify(s)
  3791. }
  3792. // GoString returns the string representation
  3793. func (s RemoveTagsFromResourceOutput) GoString() string {
  3794. return s.String()
  3795. }
  3796. type SendCommandInput struct {
  3797. _ struct{} `type:"structure"`
  3798. // User-specified information about the command, such as a brief description
  3799. // of what the command should do.
  3800. Comment *string `type:"string"`
  3801. // The Sha256 or Sha1 hash created by the system when the document was created.
  3802. //
  3803. // Sha1 hashes have been deprecated.
  3804. DocumentHash *string `type:"string"`
  3805. // Sha256 or Sha1.
  3806. //
  3807. // Sha1 hashes have been deprecated.
  3808. DocumentHashType *string `type:"string" enum:"DocumentHashType"`
  3809. // Required. The name of the SSM document to execute. This can be an SSM public
  3810. // document or a custom document.
  3811. //
  3812. // DocumentName is a required field
  3813. DocumentName *string `type:"string" required:"true"`
  3814. // Required. The instance IDs where the command should execute. You can specify
  3815. // a maximum of 50 IDs.
  3816. //
  3817. // InstanceIds is a required field
  3818. InstanceIds []*string `min:"1" type:"list" required:"true"`
  3819. // Configurations for sending notifications.
  3820. NotificationConfig *NotificationConfig `type:"structure"`
  3821. // The name of the S3 bucket where command execution responses should be stored.
  3822. OutputS3BucketName *string `min:"3" type:"string"`
  3823. // The directory structure within the S3 bucket where the responses should be
  3824. // stored.
  3825. OutputS3KeyPrefix *string `type:"string"`
  3826. // The required and optional parameters specified in the SSM document being
  3827. // executed.
  3828. Parameters map[string][]*string `type:"map"`
  3829. // The IAM role that SSM uses to send notifications.
  3830. ServiceRoleArn *string `type:"string"`
  3831. // If this time is reached and the command has not already started executing,
  3832. // it will not execute.
  3833. TimeoutSeconds *int64 `min:"30" type:"integer"`
  3834. }
  3835. // String returns the string representation
  3836. func (s SendCommandInput) String() string {
  3837. return awsutil.Prettify(s)
  3838. }
  3839. // GoString returns the string representation
  3840. func (s SendCommandInput) GoString() string {
  3841. return s.String()
  3842. }
  3843. // Validate inspects the fields of the type to determine if they are valid.
  3844. func (s *SendCommandInput) Validate() error {
  3845. invalidParams := request.ErrInvalidParams{Context: "SendCommandInput"}
  3846. if s.DocumentName == nil {
  3847. invalidParams.Add(request.NewErrParamRequired("DocumentName"))
  3848. }
  3849. if s.InstanceIds == nil {
  3850. invalidParams.Add(request.NewErrParamRequired("InstanceIds"))
  3851. }
  3852. if s.InstanceIds != nil && len(s.InstanceIds) < 1 {
  3853. invalidParams.Add(request.NewErrParamMinLen("InstanceIds", 1))
  3854. }
  3855. if s.OutputS3BucketName != nil && len(*s.OutputS3BucketName) < 3 {
  3856. invalidParams.Add(request.NewErrParamMinLen("OutputS3BucketName", 3))
  3857. }
  3858. if s.TimeoutSeconds != nil && *s.TimeoutSeconds < 30 {
  3859. invalidParams.Add(request.NewErrParamMinValue("TimeoutSeconds", 30))
  3860. }
  3861. if invalidParams.Len() > 0 {
  3862. return invalidParams
  3863. }
  3864. return nil
  3865. }
  3866. type SendCommandOutput struct {
  3867. _ struct{} `type:"structure"`
  3868. // The request as it was received by SSM. Also provides the command ID which
  3869. // can be used future references to this request.
  3870. Command *Command `type:"structure"`
  3871. }
  3872. // String returns the string representation
  3873. func (s SendCommandOutput) String() string {
  3874. return awsutil.Prettify(s)
  3875. }
  3876. // GoString returns the string representation
  3877. func (s SendCommandOutput) GoString() string {
  3878. return s.String()
  3879. }
  3880. // Metadata that you assign to your managed instances. Tags enable you to categorize
  3881. // your managed instances in different ways, for example, by purpose, owner,
  3882. // or environment.
  3883. type Tag struct {
  3884. _ struct{} `type:"structure"`
  3885. // The name of the tag.
  3886. //
  3887. // Key is a required field
  3888. Key *string `min:"1" type:"string" required:"true"`
  3889. // The value of the tag.
  3890. //
  3891. // Value is a required field
  3892. Value *string `min:"1" type:"string" required:"true"`
  3893. }
  3894. // String returns the string representation
  3895. func (s Tag) String() string {
  3896. return awsutil.Prettify(s)
  3897. }
  3898. // GoString returns the string representation
  3899. func (s Tag) GoString() string {
  3900. return s.String()
  3901. }
  3902. // Validate inspects the fields of the type to determine if they are valid.
  3903. func (s *Tag) Validate() error {
  3904. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  3905. if s.Key == nil {
  3906. invalidParams.Add(request.NewErrParamRequired("Key"))
  3907. }
  3908. if s.Key != nil && len(*s.Key) < 1 {
  3909. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  3910. }
  3911. if s.Value == nil {
  3912. invalidParams.Add(request.NewErrParamRequired("Value"))
  3913. }
  3914. if s.Value != nil && len(*s.Value) < 1 {
  3915. invalidParams.Add(request.NewErrParamMinLen("Value", 1))
  3916. }
  3917. if invalidParams.Len() > 0 {
  3918. return invalidParams
  3919. }
  3920. return nil
  3921. }
  3922. type UpdateAssociationStatusInput struct {
  3923. _ struct{} `type:"structure"`
  3924. // The association status.
  3925. //
  3926. // AssociationStatus is a required field
  3927. AssociationStatus *AssociationStatus `type:"structure" required:"true"`
  3928. // The ID of the instance.
  3929. //
  3930. // InstanceId is a required field
  3931. InstanceId *string `type:"string" required:"true"`
  3932. // The name of the SSM document.
  3933. //
  3934. // Name is a required field
  3935. Name *string `type:"string" required:"true"`
  3936. }
  3937. // String returns the string representation
  3938. func (s UpdateAssociationStatusInput) String() string {
  3939. return awsutil.Prettify(s)
  3940. }
  3941. // GoString returns the string representation
  3942. func (s UpdateAssociationStatusInput) GoString() string {
  3943. return s.String()
  3944. }
  3945. // Validate inspects the fields of the type to determine if they are valid.
  3946. func (s *UpdateAssociationStatusInput) Validate() error {
  3947. invalidParams := request.ErrInvalidParams{Context: "UpdateAssociationStatusInput"}
  3948. if s.AssociationStatus == nil {
  3949. invalidParams.Add(request.NewErrParamRequired("AssociationStatus"))
  3950. }
  3951. if s.InstanceId == nil {
  3952. invalidParams.Add(request.NewErrParamRequired("InstanceId"))
  3953. }
  3954. if s.Name == nil {
  3955. invalidParams.Add(request.NewErrParamRequired("Name"))
  3956. }
  3957. if s.AssociationStatus != nil {
  3958. if err := s.AssociationStatus.Validate(); err != nil {
  3959. invalidParams.AddNested("AssociationStatus", err.(request.ErrInvalidParams))
  3960. }
  3961. }
  3962. if invalidParams.Len() > 0 {
  3963. return invalidParams
  3964. }
  3965. return nil
  3966. }
  3967. type UpdateAssociationStatusOutput struct {
  3968. _ struct{} `type:"structure"`
  3969. // Information about the association.
  3970. AssociationDescription *AssociationDescription `type:"structure"`
  3971. }
  3972. // String returns the string representation
  3973. func (s UpdateAssociationStatusOutput) String() string {
  3974. return awsutil.Prettify(s)
  3975. }
  3976. // GoString returns the string representation
  3977. func (s UpdateAssociationStatusOutput) GoString() string {
  3978. return s.String()
  3979. }
  3980. type UpdateManagedInstanceRoleInput struct {
  3981. _ struct{} `type:"structure"`
  3982. // The IAM role you want to assign or change.
  3983. //
  3984. // IamRole is a required field
  3985. IamRole *string `type:"string" required:"true"`
  3986. // The ID of the managed instance where you want to update the role.
  3987. //
  3988. // InstanceId is a required field
  3989. InstanceId *string `type:"string" required:"true"`
  3990. }
  3991. // String returns the string representation
  3992. func (s UpdateManagedInstanceRoleInput) String() string {
  3993. return awsutil.Prettify(s)
  3994. }
  3995. // GoString returns the string representation
  3996. func (s UpdateManagedInstanceRoleInput) GoString() string {
  3997. return s.String()
  3998. }
  3999. // Validate inspects the fields of the type to determine if they are valid.
  4000. func (s *UpdateManagedInstanceRoleInput) Validate() error {
  4001. invalidParams := request.ErrInvalidParams{Context: "UpdateManagedInstanceRoleInput"}
  4002. if s.IamRole == nil {
  4003. invalidParams.Add(request.NewErrParamRequired("IamRole"))
  4004. }
  4005. if s.InstanceId == nil {
  4006. invalidParams.Add(request.NewErrParamRequired("InstanceId"))
  4007. }
  4008. if invalidParams.Len() > 0 {
  4009. return invalidParams
  4010. }
  4011. return nil
  4012. }
  4013. type UpdateManagedInstanceRoleOutput struct {
  4014. _ struct{} `type:"structure"`
  4015. }
  4016. // String returns the string representation
  4017. func (s UpdateManagedInstanceRoleOutput) String() string {
  4018. return awsutil.Prettify(s)
  4019. }
  4020. // GoString returns the string representation
  4021. func (s UpdateManagedInstanceRoleOutput) GoString() string {
  4022. return s.String()
  4023. }
  4024. const (
  4025. // AssociationFilterKeyInstanceId is a AssociationFilterKey enum value
  4026. AssociationFilterKeyInstanceId = "InstanceId"
  4027. // AssociationFilterKeyName is a AssociationFilterKey enum value
  4028. AssociationFilterKeyName = "Name"
  4029. )
  4030. const (
  4031. // AssociationStatusNamePending is a AssociationStatusName enum value
  4032. AssociationStatusNamePending = "Pending"
  4033. // AssociationStatusNameSuccess is a AssociationStatusName enum value
  4034. AssociationStatusNameSuccess = "Success"
  4035. // AssociationStatusNameFailed is a AssociationStatusName enum value
  4036. AssociationStatusNameFailed = "Failed"
  4037. )
  4038. const (
  4039. // CommandFilterKeyInvokedAfter is a CommandFilterKey enum value
  4040. CommandFilterKeyInvokedAfter = "InvokedAfter"
  4041. // CommandFilterKeyInvokedBefore is a CommandFilterKey enum value
  4042. CommandFilterKeyInvokedBefore = "InvokedBefore"
  4043. // CommandFilterKeyStatus is a CommandFilterKey enum value
  4044. CommandFilterKeyStatus = "Status"
  4045. )
  4046. const (
  4047. // CommandInvocationStatusPending is a CommandInvocationStatus enum value
  4048. CommandInvocationStatusPending = "Pending"
  4049. // CommandInvocationStatusInProgress is a CommandInvocationStatus enum value
  4050. CommandInvocationStatusInProgress = "InProgress"
  4051. // CommandInvocationStatusCancelling is a CommandInvocationStatus enum value
  4052. CommandInvocationStatusCancelling = "Cancelling"
  4053. // CommandInvocationStatusSuccess is a CommandInvocationStatus enum value
  4054. CommandInvocationStatusSuccess = "Success"
  4055. // CommandInvocationStatusTimedOut is a CommandInvocationStatus enum value
  4056. CommandInvocationStatusTimedOut = "TimedOut"
  4057. // CommandInvocationStatusCancelled is a CommandInvocationStatus enum value
  4058. CommandInvocationStatusCancelled = "Cancelled"
  4059. // CommandInvocationStatusFailed is a CommandInvocationStatus enum value
  4060. CommandInvocationStatusFailed = "Failed"
  4061. )
  4062. const (
  4063. // CommandPluginStatusPending is a CommandPluginStatus enum value
  4064. CommandPluginStatusPending = "Pending"
  4065. // CommandPluginStatusInProgress is a CommandPluginStatus enum value
  4066. CommandPluginStatusInProgress = "InProgress"
  4067. // CommandPluginStatusSuccess is a CommandPluginStatus enum value
  4068. CommandPluginStatusSuccess = "Success"
  4069. // CommandPluginStatusTimedOut is a CommandPluginStatus enum value
  4070. CommandPluginStatusTimedOut = "TimedOut"
  4071. // CommandPluginStatusCancelled is a CommandPluginStatus enum value
  4072. CommandPluginStatusCancelled = "Cancelled"
  4073. // CommandPluginStatusFailed is a CommandPluginStatus enum value
  4074. CommandPluginStatusFailed = "Failed"
  4075. )
  4076. const (
  4077. // CommandStatusPending is a CommandStatus enum value
  4078. CommandStatusPending = "Pending"
  4079. // CommandStatusInProgress is a CommandStatus enum value
  4080. CommandStatusInProgress = "InProgress"
  4081. // CommandStatusCancelling is a CommandStatus enum value
  4082. CommandStatusCancelling = "Cancelling"
  4083. // CommandStatusSuccess is a CommandStatus enum value
  4084. CommandStatusSuccess = "Success"
  4085. // CommandStatusTimedOut is a CommandStatus enum value
  4086. CommandStatusTimedOut = "TimedOut"
  4087. // CommandStatusCancelled is a CommandStatus enum value
  4088. CommandStatusCancelled = "Cancelled"
  4089. // CommandStatusFailed is a CommandStatus enum value
  4090. CommandStatusFailed = "Failed"
  4091. )
  4092. const (
  4093. // DescribeActivationsFilterKeysActivationIds is a DescribeActivationsFilterKeys enum value
  4094. DescribeActivationsFilterKeysActivationIds = "ActivationIds"
  4095. // DescribeActivationsFilterKeysDefaultInstanceName is a DescribeActivationsFilterKeys enum value
  4096. DescribeActivationsFilterKeysDefaultInstanceName = "DefaultInstanceName"
  4097. // DescribeActivationsFilterKeysIamRole is a DescribeActivationsFilterKeys enum value
  4098. DescribeActivationsFilterKeysIamRole = "IamRole"
  4099. )
  4100. const (
  4101. // DocumentFilterKeyName is a DocumentFilterKey enum value
  4102. DocumentFilterKeyName = "Name"
  4103. // DocumentFilterKeyOwner is a DocumentFilterKey enum value
  4104. DocumentFilterKeyOwner = "Owner"
  4105. // DocumentFilterKeyPlatformTypes is a DocumentFilterKey enum value
  4106. DocumentFilterKeyPlatformTypes = "PlatformTypes"
  4107. )
  4108. const (
  4109. // DocumentHashTypeSha256 is a DocumentHashType enum value
  4110. DocumentHashTypeSha256 = "Sha256"
  4111. // DocumentHashTypeSha1 is a DocumentHashType enum value
  4112. DocumentHashTypeSha1 = "Sha1"
  4113. )
  4114. const (
  4115. // DocumentParameterTypeString is a DocumentParameterType enum value
  4116. DocumentParameterTypeString = "String"
  4117. // DocumentParameterTypeStringList is a DocumentParameterType enum value
  4118. DocumentParameterTypeStringList = "StringList"
  4119. )
  4120. const (
  4121. // DocumentPermissionTypeShare is a DocumentPermissionType enum value
  4122. DocumentPermissionTypeShare = "Share"
  4123. )
  4124. const (
  4125. // DocumentStatusCreating is a DocumentStatus enum value
  4126. DocumentStatusCreating = "Creating"
  4127. // DocumentStatusActive is a DocumentStatus enum value
  4128. DocumentStatusActive = "Active"
  4129. // DocumentStatusDeleting is a DocumentStatus enum value
  4130. DocumentStatusDeleting = "Deleting"
  4131. )
  4132. const (
  4133. // FaultClient is a Fault enum value
  4134. FaultClient = "Client"
  4135. // FaultServer is a Fault enum value
  4136. FaultServer = "Server"
  4137. // FaultUnknown is a Fault enum value
  4138. FaultUnknown = "Unknown"
  4139. )
  4140. const (
  4141. // InstanceInformationFilterKeyInstanceIds is a InstanceInformationFilterKey enum value
  4142. InstanceInformationFilterKeyInstanceIds = "InstanceIds"
  4143. // InstanceInformationFilterKeyAgentVersion is a InstanceInformationFilterKey enum value
  4144. InstanceInformationFilterKeyAgentVersion = "AgentVersion"
  4145. // InstanceInformationFilterKeyPingStatus is a InstanceInformationFilterKey enum value
  4146. InstanceInformationFilterKeyPingStatus = "PingStatus"
  4147. // InstanceInformationFilterKeyPlatformTypes is a InstanceInformationFilterKey enum value
  4148. InstanceInformationFilterKeyPlatformTypes = "PlatformTypes"
  4149. // InstanceInformationFilterKeyActivationIds is a InstanceInformationFilterKey enum value
  4150. InstanceInformationFilterKeyActivationIds = "ActivationIds"
  4151. // InstanceInformationFilterKeyIamRole is a InstanceInformationFilterKey enum value
  4152. InstanceInformationFilterKeyIamRole = "IamRole"
  4153. // InstanceInformationFilterKeyResourceType is a InstanceInformationFilterKey enum value
  4154. InstanceInformationFilterKeyResourceType = "ResourceType"
  4155. )
  4156. const (
  4157. // NotificationEventAll is a NotificationEvent enum value
  4158. NotificationEventAll = "All"
  4159. // NotificationEventInProgress is a NotificationEvent enum value
  4160. NotificationEventInProgress = "InProgress"
  4161. // NotificationEventSuccess is a NotificationEvent enum value
  4162. NotificationEventSuccess = "Success"
  4163. // NotificationEventTimedOut is a NotificationEvent enum value
  4164. NotificationEventTimedOut = "TimedOut"
  4165. // NotificationEventCancelled is a NotificationEvent enum value
  4166. NotificationEventCancelled = "Cancelled"
  4167. // NotificationEventFailed is a NotificationEvent enum value
  4168. NotificationEventFailed = "Failed"
  4169. )
  4170. const (
  4171. // NotificationTypeCommand is a NotificationType enum value
  4172. NotificationTypeCommand = "Command"
  4173. // NotificationTypeInvocation is a NotificationType enum value
  4174. NotificationTypeInvocation = "Invocation"
  4175. )
  4176. const (
  4177. // PingStatusOnline is a PingStatus enum value
  4178. PingStatusOnline = "Online"
  4179. // PingStatusConnectionLost is a PingStatus enum value
  4180. PingStatusConnectionLost = "ConnectionLost"
  4181. // PingStatusInactive is a PingStatus enum value
  4182. PingStatusInactive = "Inactive"
  4183. )
  4184. const (
  4185. // PlatformTypeWindows is a PlatformType enum value
  4186. PlatformTypeWindows = "Windows"
  4187. // PlatformTypeLinux is a PlatformType enum value
  4188. PlatformTypeLinux = "Linux"
  4189. )
  4190. const (
  4191. // ResourceTypeManagedInstance is a ResourceType enum value
  4192. ResourceTypeManagedInstance = "ManagedInstance"
  4193. // ResourceTypeDocument is a ResourceType enum value
  4194. ResourceTypeDocument = "Document"
  4195. // ResourceTypeEc2instance is a ResourceType enum value
  4196. ResourceTypeEc2instance = "EC2Instance"
  4197. )
  4198. const (
  4199. // ResourceTypeForTaggingManagedInstance is a ResourceTypeForTagging enum value
  4200. ResourceTypeForTaggingManagedInstance = "ManagedInstance"
  4201. )