api.go 305 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package autoscaling provides a client for Auto Scaling.
  3. package autoscaling
  4. import (
  5. "fmt"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/query"
  11. )
  12. const opAttachInstances = "AttachInstances"
  13. // AttachInstancesRequest generates a "aws/request.Request" representing the
  14. // client's request for the AttachInstances operation. The "output" return
  15. // value can be used to capture response data after the request's "Send" method
  16. // is called.
  17. //
  18. // See AttachInstances for usage and error information.
  19. //
  20. // Creating a request object using this method should be used when you want to inject
  21. // custom logic into the request's lifecycle using a custom handler, or if you want to
  22. // access properties on the request object before or after sending the request. If
  23. // you just want the service response, call the AttachInstances method directly
  24. // instead.
  25. //
  26. // Note: You must call the "Send" method on the returned request object in order
  27. // to execute the request.
  28. //
  29. // // Example sending a request using the AttachInstancesRequest method.
  30. // req, resp := client.AttachInstancesRequest(params)
  31. //
  32. // err := req.Send()
  33. // if err == nil { // resp is now filled
  34. // fmt.Println(resp)
  35. // }
  36. //
  37. func (c *AutoScaling) AttachInstancesRequest(input *AttachInstancesInput) (req *request.Request, output *AttachInstancesOutput) {
  38. op := &request.Operation{
  39. Name: opAttachInstances,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &AttachInstancesInput{}
  45. }
  46. req = c.newRequest(op, input, output)
  47. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  48. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  49. output = &AttachInstancesOutput{}
  50. req.Data = output
  51. return
  52. }
  53. // AttachInstances API operation for Auto Scaling.
  54. //
  55. // Attaches one or more EC2 instances to the specified Auto Scaling group.
  56. //
  57. // When you attach instances, Auto Scaling increases the desired capacity of
  58. // the group by the number of instances being attached. If the number of instances
  59. // being attached plus the desired capacity of the group exceeds the maximum
  60. // size of the group, the operation fails.
  61. //
  62. // If there is a Classic load balancer attached to your Auto Scaling group,
  63. // the instances are also registered with the load balancer. If there are target
  64. // groups attached to your Auto Scaling group, the instances are also registered
  65. // with the target groups.
  66. //
  67. // For more information, see Attach EC2 Instances to Your Auto Scaling Group
  68. // (http://docs.aws.amazon.com/autoscaling/latest/userguide/attach-instance-asg.html)
  69. // in the Auto Scaling User Guide.
  70. //
  71. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  72. // with awserr.Error's Code and Message methods to get detailed information about
  73. // the error.
  74. //
  75. // See the AWS API reference guide for Auto Scaling's
  76. // API operation AttachInstances for usage and error information.
  77. //
  78. // Returned Error Codes:
  79. // * ResourceContention
  80. // You already have a pending update to an Auto Scaling resource (for example,
  81. // a group, instance, or load balancer).
  82. //
  83. func (c *AutoScaling) AttachInstances(input *AttachInstancesInput) (*AttachInstancesOutput, error) {
  84. req, out := c.AttachInstancesRequest(input)
  85. err := req.Send()
  86. return out, err
  87. }
  88. const opAttachLoadBalancerTargetGroups = "AttachLoadBalancerTargetGroups"
  89. // AttachLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the
  90. // client's request for the AttachLoadBalancerTargetGroups operation. The "output" return
  91. // value can be used to capture response data after the request's "Send" method
  92. // is called.
  93. //
  94. // See AttachLoadBalancerTargetGroups for usage and error information.
  95. //
  96. // Creating a request object using this method should be used when you want to inject
  97. // custom logic into the request's lifecycle using a custom handler, or if you want to
  98. // access properties on the request object before or after sending the request. If
  99. // you just want the service response, call the AttachLoadBalancerTargetGroups method directly
  100. // instead.
  101. //
  102. // Note: You must call the "Send" method on the returned request object in order
  103. // to execute the request.
  104. //
  105. // // Example sending a request using the AttachLoadBalancerTargetGroupsRequest method.
  106. // req, resp := client.AttachLoadBalancerTargetGroupsRequest(params)
  107. //
  108. // err := req.Send()
  109. // if err == nil { // resp is now filled
  110. // fmt.Println(resp)
  111. // }
  112. //
  113. func (c *AutoScaling) AttachLoadBalancerTargetGroupsRequest(input *AttachLoadBalancerTargetGroupsInput) (req *request.Request, output *AttachLoadBalancerTargetGroupsOutput) {
  114. op := &request.Operation{
  115. Name: opAttachLoadBalancerTargetGroups,
  116. HTTPMethod: "POST",
  117. HTTPPath: "/",
  118. }
  119. if input == nil {
  120. input = &AttachLoadBalancerTargetGroupsInput{}
  121. }
  122. req = c.newRequest(op, input, output)
  123. output = &AttachLoadBalancerTargetGroupsOutput{}
  124. req.Data = output
  125. return
  126. }
  127. // AttachLoadBalancerTargetGroups API operation for Auto Scaling.
  128. //
  129. // Attaches one or more target groups to the specified Auto Scaling group.
  130. //
  131. // To describe the target groups for an Auto Scaling group, use DescribeLoadBalancerTargetGroups.
  132. // To detach the target group from the Auto Scaling group, use DetachLoadBalancerTargetGroups.
  133. //
  134. // For more information, see Attach a Load Balancer to Your Auto Scaling Group
  135. // (http://docs.aws.amazon.com/autoscaling/latest/userguide/attach-load-balancer-asg.html)
  136. // in the Auto Scaling User Guide.
  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 Auto Scaling's
  143. // API operation AttachLoadBalancerTargetGroups for usage and error information.
  144. //
  145. // Returned Error Codes:
  146. // * ResourceContention
  147. // You already have a pending update to an Auto Scaling resource (for example,
  148. // a group, instance, or load balancer).
  149. //
  150. func (c *AutoScaling) AttachLoadBalancerTargetGroups(input *AttachLoadBalancerTargetGroupsInput) (*AttachLoadBalancerTargetGroupsOutput, error) {
  151. req, out := c.AttachLoadBalancerTargetGroupsRequest(input)
  152. err := req.Send()
  153. return out, err
  154. }
  155. const opAttachLoadBalancers = "AttachLoadBalancers"
  156. // AttachLoadBalancersRequest generates a "aws/request.Request" representing the
  157. // client's request for the AttachLoadBalancers operation. The "output" return
  158. // value can be used to capture response data after the request's "Send" method
  159. // is called.
  160. //
  161. // See AttachLoadBalancers for usage and error information.
  162. //
  163. // Creating a request object using this method should be used when you want to inject
  164. // custom logic into the request's lifecycle using a custom handler, or if you want to
  165. // access properties on the request object before or after sending the request. If
  166. // you just want the service response, call the AttachLoadBalancers method directly
  167. // instead.
  168. //
  169. // Note: You must call the "Send" method on the returned request object in order
  170. // to execute the request.
  171. //
  172. // // Example sending a request using the AttachLoadBalancersRequest method.
  173. // req, resp := client.AttachLoadBalancersRequest(params)
  174. //
  175. // err := req.Send()
  176. // if err == nil { // resp is now filled
  177. // fmt.Println(resp)
  178. // }
  179. //
  180. func (c *AutoScaling) AttachLoadBalancersRequest(input *AttachLoadBalancersInput) (req *request.Request, output *AttachLoadBalancersOutput) {
  181. op := &request.Operation{
  182. Name: opAttachLoadBalancers,
  183. HTTPMethod: "POST",
  184. HTTPPath: "/",
  185. }
  186. if input == nil {
  187. input = &AttachLoadBalancersInput{}
  188. }
  189. req = c.newRequest(op, input, output)
  190. output = &AttachLoadBalancersOutput{}
  191. req.Data = output
  192. return
  193. }
  194. // AttachLoadBalancers API operation for Auto Scaling.
  195. //
  196. // Attaches one or more Classic load balancers to the specified Auto Scaling
  197. // group.
  198. //
  199. // To attach an Application load balancer instead, see AttachLoadBalancerTargetGroups.
  200. //
  201. // To describe the load balancers for an Auto Scaling group, use DescribeLoadBalancers.
  202. // To detach the load balancer from the Auto Scaling group, use DetachLoadBalancers.
  203. //
  204. // For more information, see Attach a Load Balancer to Your Auto Scaling Group
  205. // (http://docs.aws.amazon.com/autoscaling/latest/userguide/attach-load-balancer-asg.html)
  206. // in the Auto Scaling User Guide.
  207. //
  208. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  209. // with awserr.Error's Code and Message methods to get detailed information about
  210. // the error.
  211. //
  212. // See the AWS API reference guide for Auto Scaling's
  213. // API operation AttachLoadBalancers for usage and error information.
  214. //
  215. // Returned Error Codes:
  216. // * ResourceContention
  217. // You already have a pending update to an Auto Scaling resource (for example,
  218. // a group, instance, or load balancer).
  219. //
  220. func (c *AutoScaling) AttachLoadBalancers(input *AttachLoadBalancersInput) (*AttachLoadBalancersOutput, error) {
  221. req, out := c.AttachLoadBalancersRequest(input)
  222. err := req.Send()
  223. return out, err
  224. }
  225. const opCompleteLifecycleAction = "CompleteLifecycleAction"
  226. // CompleteLifecycleActionRequest generates a "aws/request.Request" representing the
  227. // client's request for the CompleteLifecycleAction operation. The "output" return
  228. // value can be used to capture response data after the request's "Send" method
  229. // is called.
  230. //
  231. // See CompleteLifecycleAction for usage and error information.
  232. //
  233. // Creating a request object using this method should be used when you want to inject
  234. // custom logic into the request's lifecycle using a custom handler, or if you want to
  235. // access properties on the request object before or after sending the request. If
  236. // you just want the service response, call the CompleteLifecycleAction method directly
  237. // instead.
  238. //
  239. // Note: You must call the "Send" method on the returned request object in order
  240. // to execute the request.
  241. //
  242. // // Example sending a request using the CompleteLifecycleActionRequest method.
  243. // req, resp := client.CompleteLifecycleActionRequest(params)
  244. //
  245. // err := req.Send()
  246. // if err == nil { // resp is now filled
  247. // fmt.Println(resp)
  248. // }
  249. //
  250. func (c *AutoScaling) CompleteLifecycleActionRequest(input *CompleteLifecycleActionInput) (req *request.Request, output *CompleteLifecycleActionOutput) {
  251. op := &request.Operation{
  252. Name: opCompleteLifecycleAction,
  253. HTTPMethod: "POST",
  254. HTTPPath: "/",
  255. }
  256. if input == nil {
  257. input = &CompleteLifecycleActionInput{}
  258. }
  259. req = c.newRequest(op, input, output)
  260. output = &CompleteLifecycleActionOutput{}
  261. req.Data = output
  262. return
  263. }
  264. // CompleteLifecycleAction API operation for Auto Scaling.
  265. //
  266. // Completes the lifecycle action for the specified token or instance with the
  267. // specified result.
  268. //
  269. // This step is a part of the procedure for adding a lifecycle hook to an Auto
  270. // Scaling group:
  271. //
  272. // (Optional) Create a Lambda function and a rule that allows CloudWatch Events
  273. // to invoke your Lambda function when Auto Scaling launches or terminates instances.
  274. //
  275. // (Optional) Create a notification target and an IAM role. The target can be
  276. // either an Amazon SQS queue or an Amazon SNS topic. The role allows Auto Scaling
  277. // to publish lifecycle notifications to the target.
  278. //
  279. // Create the lifecycle hook. Specify whether the hook is used when the instances
  280. // launch or terminate.
  281. //
  282. // If you need more time, record the lifecycle action heartbeat to keep the
  283. // instance in a pending state.
  284. //
  285. // If you finish before the timeout period ends, complete the lifecycle action.
  286. //
  287. // For more information, see Auto Scaling Lifecycle (http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroupLifecycle.html)
  288. // in the Auto Scaling User Guide.
  289. //
  290. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  291. // with awserr.Error's Code and Message methods to get detailed information about
  292. // the error.
  293. //
  294. // See the AWS API reference guide for Auto Scaling's
  295. // API operation CompleteLifecycleAction for usage and error information.
  296. //
  297. // Returned Error Codes:
  298. // * ResourceContention
  299. // You already have a pending update to an Auto Scaling resource (for example,
  300. // a group, instance, or load balancer).
  301. //
  302. func (c *AutoScaling) CompleteLifecycleAction(input *CompleteLifecycleActionInput) (*CompleteLifecycleActionOutput, error) {
  303. req, out := c.CompleteLifecycleActionRequest(input)
  304. err := req.Send()
  305. return out, err
  306. }
  307. const opCreateAutoScalingGroup = "CreateAutoScalingGroup"
  308. // CreateAutoScalingGroupRequest generates a "aws/request.Request" representing the
  309. // client's request for the CreateAutoScalingGroup operation. The "output" return
  310. // value can be used to capture response data after the request's "Send" method
  311. // is called.
  312. //
  313. // See CreateAutoScalingGroup for usage and error information.
  314. //
  315. // Creating a request object using this method should be used when you want to inject
  316. // custom logic into the request's lifecycle using a custom handler, or if you want to
  317. // access properties on the request object before or after sending the request. If
  318. // you just want the service response, call the CreateAutoScalingGroup method directly
  319. // instead.
  320. //
  321. // Note: You must call the "Send" method on the returned request object in order
  322. // to execute the request.
  323. //
  324. // // Example sending a request using the CreateAutoScalingGroupRequest method.
  325. // req, resp := client.CreateAutoScalingGroupRequest(params)
  326. //
  327. // err := req.Send()
  328. // if err == nil { // resp is now filled
  329. // fmt.Println(resp)
  330. // }
  331. //
  332. func (c *AutoScaling) CreateAutoScalingGroupRequest(input *CreateAutoScalingGroupInput) (req *request.Request, output *CreateAutoScalingGroupOutput) {
  333. op := &request.Operation{
  334. Name: opCreateAutoScalingGroup,
  335. HTTPMethod: "POST",
  336. HTTPPath: "/",
  337. }
  338. if input == nil {
  339. input = &CreateAutoScalingGroupInput{}
  340. }
  341. req = c.newRequest(op, input, output)
  342. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  343. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  344. output = &CreateAutoScalingGroupOutput{}
  345. req.Data = output
  346. return
  347. }
  348. // CreateAutoScalingGroup API operation for Auto Scaling.
  349. //
  350. // Creates an Auto Scaling group with the specified name and attributes.
  351. //
  352. // If you exceed your maximum limit of Auto Scaling groups, which by default
  353. // is 20 per region, the call fails. For information about viewing and updating
  354. // this limit, see DescribeAccountLimits.
  355. //
  356. // For more information, see Auto Scaling Groups (http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroup.html)
  357. // in the Auto Scaling User Guide.
  358. //
  359. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  360. // with awserr.Error's Code and Message methods to get detailed information about
  361. // the error.
  362. //
  363. // See the AWS API reference guide for Auto Scaling's
  364. // API operation CreateAutoScalingGroup for usage and error information.
  365. //
  366. // Returned Error Codes:
  367. // * AlreadyExists
  368. // You already have an Auto Scaling group or launch configuration with this
  369. // name.
  370. //
  371. // * LimitExceeded
  372. // You have already reached a limit for your Auto Scaling resources (for example,
  373. // groups, launch configurations, or lifecycle hooks). For more information,
  374. // see DescribeAccountLimits.
  375. //
  376. // * ResourceContention
  377. // You already have a pending update to an Auto Scaling resource (for example,
  378. // a group, instance, or load balancer).
  379. //
  380. func (c *AutoScaling) CreateAutoScalingGroup(input *CreateAutoScalingGroupInput) (*CreateAutoScalingGroupOutput, error) {
  381. req, out := c.CreateAutoScalingGroupRequest(input)
  382. err := req.Send()
  383. return out, err
  384. }
  385. const opCreateLaunchConfiguration = "CreateLaunchConfiguration"
  386. // CreateLaunchConfigurationRequest generates a "aws/request.Request" representing the
  387. // client's request for the CreateLaunchConfiguration operation. The "output" return
  388. // value can be used to capture response data after the request's "Send" method
  389. // is called.
  390. //
  391. // See CreateLaunchConfiguration for usage and error information.
  392. //
  393. // Creating a request object using this method should be used when you want to inject
  394. // custom logic into the request's lifecycle using a custom handler, or if you want to
  395. // access properties on the request object before or after sending the request. If
  396. // you just want the service response, call the CreateLaunchConfiguration method directly
  397. // instead.
  398. //
  399. // Note: You must call the "Send" method on the returned request object in order
  400. // to execute the request.
  401. //
  402. // // Example sending a request using the CreateLaunchConfigurationRequest method.
  403. // req, resp := client.CreateLaunchConfigurationRequest(params)
  404. //
  405. // err := req.Send()
  406. // if err == nil { // resp is now filled
  407. // fmt.Println(resp)
  408. // }
  409. //
  410. func (c *AutoScaling) CreateLaunchConfigurationRequest(input *CreateLaunchConfigurationInput) (req *request.Request, output *CreateLaunchConfigurationOutput) {
  411. op := &request.Operation{
  412. Name: opCreateLaunchConfiguration,
  413. HTTPMethod: "POST",
  414. HTTPPath: "/",
  415. }
  416. if input == nil {
  417. input = &CreateLaunchConfigurationInput{}
  418. }
  419. req = c.newRequest(op, input, output)
  420. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  421. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  422. output = &CreateLaunchConfigurationOutput{}
  423. req.Data = output
  424. return
  425. }
  426. // CreateLaunchConfiguration API operation for Auto Scaling.
  427. //
  428. // Creates a launch configuration.
  429. //
  430. // If you exceed your maximum limit of launch configurations, which by default
  431. // is 100 per region, the call fails. For information about viewing and updating
  432. // this limit, see DescribeAccountLimits.
  433. //
  434. // For more information, see Launch Configurations (http://docs.aws.amazon.com/autoscaling/latest/userguide/LaunchConfiguration.html)
  435. // in the Auto Scaling User Guide.
  436. //
  437. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  438. // with awserr.Error's Code and Message methods to get detailed information about
  439. // the error.
  440. //
  441. // See the AWS API reference guide for Auto Scaling's
  442. // API operation CreateLaunchConfiguration for usage and error information.
  443. //
  444. // Returned Error Codes:
  445. // * AlreadyExists
  446. // You already have an Auto Scaling group or launch configuration with this
  447. // name.
  448. //
  449. // * LimitExceeded
  450. // You have already reached a limit for your Auto Scaling resources (for example,
  451. // groups, launch configurations, or lifecycle hooks). For more information,
  452. // see DescribeAccountLimits.
  453. //
  454. // * ResourceContention
  455. // You already have a pending update to an Auto Scaling resource (for example,
  456. // a group, instance, or load balancer).
  457. //
  458. func (c *AutoScaling) CreateLaunchConfiguration(input *CreateLaunchConfigurationInput) (*CreateLaunchConfigurationOutput, error) {
  459. req, out := c.CreateLaunchConfigurationRequest(input)
  460. err := req.Send()
  461. return out, err
  462. }
  463. const opCreateOrUpdateTags = "CreateOrUpdateTags"
  464. // CreateOrUpdateTagsRequest generates a "aws/request.Request" representing the
  465. // client's request for the CreateOrUpdateTags operation. The "output" return
  466. // value can be used to capture response data after the request's "Send" method
  467. // is called.
  468. //
  469. // See CreateOrUpdateTags for usage and error information.
  470. //
  471. // Creating a request object using this method should be used when you want to inject
  472. // custom logic into the request's lifecycle using a custom handler, or if you want to
  473. // access properties on the request object before or after sending the request. If
  474. // you just want the service response, call the CreateOrUpdateTags method directly
  475. // instead.
  476. //
  477. // Note: You must call the "Send" method on the returned request object in order
  478. // to execute the request.
  479. //
  480. // // Example sending a request using the CreateOrUpdateTagsRequest method.
  481. // req, resp := client.CreateOrUpdateTagsRequest(params)
  482. //
  483. // err := req.Send()
  484. // if err == nil { // resp is now filled
  485. // fmt.Println(resp)
  486. // }
  487. //
  488. func (c *AutoScaling) CreateOrUpdateTagsRequest(input *CreateOrUpdateTagsInput) (req *request.Request, output *CreateOrUpdateTagsOutput) {
  489. op := &request.Operation{
  490. Name: opCreateOrUpdateTags,
  491. HTTPMethod: "POST",
  492. HTTPPath: "/",
  493. }
  494. if input == nil {
  495. input = &CreateOrUpdateTagsInput{}
  496. }
  497. req = c.newRequest(op, input, output)
  498. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  499. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  500. output = &CreateOrUpdateTagsOutput{}
  501. req.Data = output
  502. return
  503. }
  504. // CreateOrUpdateTags API operation for Auto Scaling.
  505. //
  506. // Creates or updates tags for the specified Auto Scaling group.
  507. //
  508. // When you specify a tag with a key that already exists, the operation overwrites
  509. // the previous tag definition, and you do not get an error message.
  510. //
  511. // For more information, see Tagging Auto Scaling Groups and Instances (http://docs.aws.amazon.com/autoscaling/latest/userguide/autoscaling-tagging.html)
  512. // in the Auto Scaling User Guide.
  513. //
  514. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  515. // with awserr.Error's Code and Message methods to get detailed information about
  516. // the error.
  517. //
  518. // See the AWS API reference guide for Auto Scaling's
  519. // API operation CreateOrUpdateTags for usage and error information.
  520. //
  521. // Returned Error Codes:
  522. // * LimitExceeded
  523. // You have already reached a limit for your Auto Scaling resources (for example,
  524. // groups, launch configurations, or lifecycle hooks). For more information,
  525. // see DescribeAccountLimits.
  526. //
  527. // * AlreadyExists
  528. // You already have an Auto Scaling group or launch configuration with this
  529. // name.
  530. //
  531. // * ResourceContention
  532. // You already have a pending update to an Auto Scaling resource (for example,
  533. // a group, instance, or load balancer).
  534. //
  535. func (c *AutoScaling) CreateOrUpdateTags(input *CreateOrUpdateTagsInput) (*CreateOrUpdateTagsOutput, error) {
  536. req, out := c.CreateOrUpdateTagsRequest(input)
  537. err := req.Send()
  538. return out, err
  539. }
  540. const opDeleteAutoScalingGroup = "DeleteAutoScalingGroup"
  541. // DeleteAutoScalingGroupRequest generates a "aws/request.Request" representing the
  542. // client's request for the DeleteAutoScalingGroup operation. The "output" return
  543. // value can be used to capture response data after the request's "Send" method
  544. // is called.
  545. //
  546. // See DeleteAutoScalingGroup for usage and error information.
  547. //
  548. // Creating a request object using this method should be used when you want to inject
  549. // custom logic into the request's lifecycle using a custom handler, or if you want to
  550. // access properties on the request object before or after sending the request. If
  551. // you just want the service response, call the DeleteAutoScalingGroup method directly
  552. // instead.
  553. //
  554. // Note: You must call the "Send" method on the returned request object in order
  555. // to execute the request.
  556. //
  557. // // Example sending a request using the DeleteAutoScalingGroupRequest method.
  558. // req, resp := client.DeleteAutoScalingGroupRequest(params)
  559. //
  560. // err := req.Send()
  561. // if err == nil { // resp is now filled
  562. // fmt.Println(resp)
  563. // }
  564. //
  565. func (c *AutoScaling) DeleteAutoScalingGroupRequest(input *DeleteAutoScalingGroupInput) (req *request.Request, output *DeleteAutoScalingGroupOutput) {
  566. op := &request.Operation{
  567. Name: opDeleteAutoScalingGroup,
  568. HTTPMethod: "POST",
  569. HTTPPath: "/",
  570. }
  571. if input == nil {
  572. input = &DeleteAutoScalingGroupInput{}
  573. }
  574. req = c.newRequest(op, input, output)
  575. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  576. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  577. output = &DeleteAutoScalingGroupOutput{}
  578. req.Data = output
  579. return
  580. }
  581. // DeleteAutoScalingGroup API operation for Auto Scaling.
  582. //
  583. // Deletes the specified Auto Scaling group.
  584. //
  585. // If the group has instances or scaling activities in progress, you must specify
  586. // the option to force the deletion in order for it to succeed.
  587. //
  588. // If the group has policies, deleting the group deletes the policies, the underlying
  589. // alarm actions, and any alarm that no longer has an associated action.
  590. //
  591. // To remove instances from the Auto Scaling group before deleting it, call
  592. // DetachInstances with the list of instances and the option to decrement the
  593. // desired capacity so that Auto Scaling does not launch replacement instances.
  594. //
  595. // To terminate all instances before deleting the Auto Scaling group, call UpdateAutoScalingGroup
  596. // and set the minimum size and desired capacity of the Auto Scaling group to
  597. // zero.
  598. //
  599. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  600. // with awserr.Error's Code and Message methods to get detailed information about
  601. // the error.
  602. //
  603. // See the AWS API reference guide for Auto Scaling's
  604. // API operation DeleteAutoScalingGroup for usage and error information.
  605. //
  606. // Returned Error Codes:
  607. // * ScalingActivityInProgress
  608. // The operation can't be performed because there are scaling activities in
  609. // progress.
  610. //
  611. // * ResourceInUse
  612. // The operation can't be performed because the resource is in use.
  613. //
  614. // * ResourceContention
  615. // You already have a pending update to an Auto Scaling resource (for example,
  616. // a group, instance, or load balancer).
  617. //
  618. func (c *AutoScaling) DeleteAutoScalingGroup(input *DeleteAutoScalingGroupInput) (*DeleteAutoScalingGroupOutput, error) {
  619. req, out := c.DeleteAutoScalingGroupRequest(input)
  620. err := req.Send()
  621. return out, err
  622. }
  623. const opDeleteLaunchConfiguration = "DeleteLaunchConfiguration"
  624. // DeleteLaunchConfigurationRequest generates a "aws/request.Request" representing the
  625. // client's request for the DeleteLaunchConfiguration operation. The "output" return
  626. // value can be used to capture response data after the request's "Send" method
  627. // is called.
  628. //
  629. // See DeleteLaunchConfiguration for usage and error information.
  630. //
  631. // Creating a request object using this method should be used when you want to inject
  632. // custom logic into the request's lifecycle using a custom handler, or if you want to
  633. // access properties on the request object before or after sending the request. If
  634. // you just want the service response, call the DeleteLaunchConfiguration method directly
  635. // instead.
  636. //
  637. // Note: You must call the "Send" method on the returned request object in order
  638. // to execute the request.
  639. //
  640. // // Example sending a request using the DeleteLaunchConfigurationRequest method.
  641. // req, resp := client.DeleteLaunchConfigurationRequest(params)
  642. //
  643. // err := req.Send()
  644. // if err == nil { // resp is now filled
  645. // fmt.Println(resp)
  646. // }
  647. //
  648. func (c *AutoScaling) DeleteLaunchConfigurationRequest(input *DeleteLaunchConfigurationInput) (req *request.Request, output *DeleteLaunchConfigurationOutput) {
  649. op := &request.Operation{
  650. Name: opDeleteLaunchConfiguration,
  651. HTTPMethod: "POST",
  652. HTTPPath: "/",
  653. }
  654. if input == nil {
  655. input = &DeleteLaunchConfigurationInput{}
  656. }
  657. req = c.newRequest(op, input, output)
  658. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  659. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  660. output = &DeleteLaunchConfigurationOutput{}
  661. req.Data = output
  662. return
  663. }
  664. // DeleteLaunchConfiguration API operation for Auto Scaling.
  665. //
  666. // Deletes the specified launch configuration.
  667. //
  668. // The launch configuration must not be attached to an Auto Scaling group. When
  669. // this call completes, the launch configuration is no longer available for
  670. // use.
  671. //
  672. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  673. // with awserr.Error's Code and Message methods to get detailed information about
  674. // the error.
  675. //
  676. // See the AWS API reference guide for Auto Scaling's
  677. // API operation DeleteLaunchConfiguration for usage and error information.
  678. //
  679. // Returned Error Codes:
  680. // * ResourceInUse
  681. // The operation can't be performed because the resource is in use.
  682. //
  683. // * ResourceContention
  684. // You already have a pending update to an Auto Scaling resource (for example,
  685. // a group, instance, or load balancer).
  686. //
  687. func (c *AutoScaling) DeleteLaunchConfiguration(input *DeleteLaunchConfigurationInput) (*DeleteLaunchConfigurationOutput, error) {
  688. req, out := c.DeleteLaunchConfigurationRequest(input)
  689. err := req.Send()
  690. return out, err
  691. }
  692. const opDeleteLifecycleHook = "DeleteLifecycleHook"
  693. // DeleteLifecycleHookRequest generates a "aws/request.Request" representing the
  694. // client's request for the DeleteLifecycleHook operation. The "output" return
  695. // value can be used to capture response data after the request's "Send" method
  696. // is called.
  697. //
  698. // See DeleteLifecycleHook for usage and error information.
  699. //
  700. // Creating a request object using this method should be used when you want to inject
  701. // custom logic into the request's lifecycle using a custom handler, or if you want to
  702. // access properties on the request object before or after sending the request. If
  703. // you just want the service response, call the DeleteLifecycleHook method directly
  704. // instead.
  705. //
  706. // Note: You must call the "Send" method on the returned request object in order
  707. // to execute the request.
  708. //
  709. // // Example sending a request using the DeleteLifecycleHookRequest method.
  710. // req, resp := client.DeleteLifecycleHookRequest(params)
  711. //
  712. // err := req.Send()
  713. // if err == nil { // resp is now filled
  714. // fmt.Println(resp)
  715. // }
  716. //
  717. func (c *AutoScaling) DeleteLifecycleHookRequest(input *DeleteLifecycleHookInput) (req *request.Request, output *DeleteLifecycleHookOutput) {
  718. op := &request.Operation{
  719. Name: opDeleteLifecycleHook,
  720. HTTPMethod: "POST",
  721. HTTPPath: "/",
  722. }
  723. if input == nil {
  724. input = &DeleteLifecycleHookInput{}
  725. }
  726. req = c.newRequest(op, input, output)
  727. output = &DeleteLifecycleHookOutput{}
  728. req.Data = output
  729. return
  730. }
  731. // DeleteLifecycleHook API operation for Auto Scaling.
  732. //
  733. // Deletes the specified lifecycle hook.
  734. //
  735. // If there are any outstanding lifecycle actions, they are completed first
  736. // (ABANDON for launching instances, CONTINUE for terminating instances).
  737. //
  738. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  739. // with awserr.Error's Code and Message methods to get detailed information about
  740. // the error.
  741. //
  742. // See the AWS API reference guide for Auto Scaling's
  743. // API operation DeleteLifecycleHook for usage and error information.
  744. //
  745. // Returned Error Codes:
  746. // * ResourceContention
  747. // You already have a pending update to an Auto Scaling resource (for example,
  748. // a group, instance, or load balancer).
  749. //
  750. func (c *AutoScaling) DeleteLifecycleHook(input *DeleteLifecycleHookInput) (*DeleteLifecycleHookOutput, error) {
  751. req, out := c.DeleteLifecycleHookRequest(input)
  752. err := req.Send()
  753. return out, err
  754. }
  755. const opDeleteNotificationConfiguration = "DeleteNotificationConfiguration"
  756. // DeleteNotificationConfigurationRequest generates a "aws/request.Request" representing the
  757. // client's request for the DeleteNotificationConfiguration operation. The "output" return
  758. // value can be used to capture response data after the request's "Send" method
  759. // is called.
  760. //
  761. // See DeleteNotificationConfiguration for usage and error information.
  762. //
  763. // Creating a request object using this method should be used when you want to inject
  764. // custom logic into the request's lifecycle using a custom handler, or if you want to
  765. // access properties on the request object before or after sending the request. If
  766. // you just want the service response, call the DeleteNotificationConfiguration method directly
  767. // instead.
  768. //
  769. // Note: You must call the "Send" method on the returned request object in order
  770. // to execute the request.
  771. //
  772. // // Example sending a request using the DeleteNotificationConfigurationRequest method.
  773. // req, resp := client.DeleteNotificationConfigurationRequest(params)
  774. //
  775. // err := req.Send()
  776. // if err == nil { // resp is now filled
  777. // fmt.Println(resp)
  778. // }
  779. //
  780. func (c *AutoScaling) DeleteNotificationConfigurationRequest(input *DeleteNotificationConfigurationInput) (req *request.Request, output *DeleteNotificationConfigurationOutput) {
  781. op := &request.Operation{
  782. Name: opDeleteNotificationConfiguration,
  783. HTTPMethod: "POST",
  784. HTTPPath: "/",
  785. }
  786. if input == nil {
  787. input = &DeleteNotificationConfigurationInput{}
  788. }
  789. req = c.newRequest(op, input, output)
  790. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  791. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  792. output = &DeleteNotificationConfigurationOutput{}
  793. req.Data = output
  794. return
  795. }
  796. // DeleteNotificationConfiguration API operation for Auto Scaling.
  797. //
  798. // Deletes the specified notification.
  799. //
  800. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  801. // with awserr.Error's Code and Message methods to get detailed information about
  802. // the error.
  803. //
  804. // See the AWS API reference guide for Auto Scaling's
  805. // API operation DeleteNotificationConfiguration for usage and error information.
  806. //
  807. // Returned Error Codes:
  808. // * ResourceContention
  809. // You already have a pending update to an Auto Scaling resource (for example,
  810. // a group, instance, or load balancer).
  811. //
  812. func (c *AutoScaling) DeleteNotificationConfiguration(input *DeleteNotificationConfigurationInput) (*DeleteNotificationConfigurationOutput, error) {
  813. req, out := c.DeleteNotificationConfigurationRequest(input)
  814. err := req.Send()
  815. return out, err
  816. }
  817. const opDeletePolicy = "DeletePolicy"
  818. // DeletePolicyRequest generates a "aws/request.Request" representing the
  819. // client's request for the DeletePolicy operation. The "output" return
  820. // value can be used to capture response data after the request's "Send" method
  821. // is called.
  822. //
  823. // See DeletePolicy for usage and error information.
  824. //
  825. // Creating a request object using this method should be used when you want to inject
  826. // custom logic into the request's lifecycle using a custom handler, or if you want to
  827. // access properties on the request object before or after sending the request. If
  828. // you just want the service response, call the DeletePolicy method directly
  829. // instead.
  830. //
  831. // Note: You must call the "Send" method on the returned request object in order
  832. // to execute the request.
  833. //
  834. // // Example sending a request using the DeletePolicyRequest method.
  835. // req, resp := client.DeletePolicyRequest(params)
  836. //
  837. // err := req.Send()
  838. // if err == nil { // resp is now filled
  839. // fmt.Println(resp)
  840. // }
  841. //
  842. func (c *AutoScaling) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) {
  843. op := &request.Operation{
  844. Name: opDeletePolicy,
  845. HTTPMethod: "POST",
  846. HTTPPath: "/",
  847. }
  848. if input == nil {
  849. input = &DeletePolicyInput{}
  850. }
  851. req = c.newRequest(op, input, output)
  852. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  853. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  854. output = &DeletePolicyOutput{}
  855. req.Data = output
  856. return
  857. }
  858. // DeletePolicy API operation for Auto Scaling.
  859. //
  860. // Deletes the specified Auto Scaling policy.
  861. //
  862. // Deleting a policy deletes the underlying alarm action, but does not delete
  863. // the alarm, even if it no longer has an associated action.
  864. //
  865. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  866. // with awserr.Error's Code and Message methods to get detailed information about
  867. // the error.
  868. //
  869. // See the AWS API reference guide for Auto Scaling's
  870. // API operation DeletePolicy for usage and error information.
  871. //
  872. // Returned Error Codes:
  873. // * ResourceContention
  874. // You already have a pending update to an Auto Scaling resource (for example,
  875. // a group, instance, or load balancer).
  876. //
  877. func (c *AutoScaling) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutput, error) {
  878. req, out := c.DeletePolicyRequest(input)
  879. err := req.Send()
  880. return out, err
  881. }
  882. const opDeleteScheduledAction = "DeleteScheduledAction"
  883. // DeleteScheduledActionRequest generates a "aws/request.Request" representing the
  884. // client's request for the DeleteScheduledAction operation. The "output" return
  885. // value can be used to capture response data after the request's "Send" method
  886. // is called.
  887. //
  888. // See DeleteScheduledAction for usage and error information.
  889. //
  890. // Creating a request object using this method should be used when you want to inject
  891. // custom logic into the request's lifecycle using a custom handler, or if you want to
  892. // access properties on the request object before or after sending the request. If
  893. // you just want the service response, call the DeleteScheduledAction method directly
  894. // instead.
  895. //
  896. // Note: You must call the "Send" method on the returned request object in order
  897. // to execute the request.
  898. //
  899. // // Example sending a request using the DeleteScheduledActionRequest method.
  900. // req, resp := client.DeleteScheduledActionRequest(params)
  901. //
  902. // err := req.Send()
  903. // if err == nil { // resp is now filled
  904. // fmt.Println(resp)
  905. // }
  906. //
  907. func (c *AutoScaling) DeleteScheduledActionRequest(input *DeleteScheduledActionInput) (req *request.Request, output *DeleteScheduledActionOutput) {
  908. op := &request.Operation{
  909. Name: opDeleteScheduledAction,
  910. HTTPMethod: "POST",
  911. HTTPPath: "/",
  912. }
  913. if input == nil {
  914. input = &DeleteScheduledActionInput{}
  915. }
  916. req = c.newRequest(op, input, output)
  917. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  918. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  919. output = &DeleteScheduledActionOutput{}
  920. req.Data = output
  921. return
  922. }
  923. // DeleteScheduledAction API operation for Auto Scaling.
  924. //
  925. // Deletes the specified scheduled action.
  926. //
  927. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  928. // with awserr.Error's Code and Message methods to get detailed information about
  929. // the error.
  930. //
  931. // See the AWS API reference guide for Auto Scaling's
  932. // API operation DeleteScheduledAction for usage and error information.
  933. //
  934. // Returned Error Codes:
  935. // * ResourceContention
  936. // You already have a pending update to an Auto Scaling resource (for example,
  937. // a group, instance, or load balancer).
  938. //
  939. func (c *AutoScaling) DeleteScheduledAction(input *DeleteScheduledActionInput) (*DeleteScheduledActionOutput, error) {
  940. req, out := c.DeleteScheduledActionRequest(input)
  941. err := req.Send()
  942. return out, err
  943. }
  944. const opDeleteTags = "DeleteTags"
  945. // DeleteTagsRequest generates a "aws/request.Request" representing the
  946. // client's request for the DeleteTags operation. The "output" return
  947. // value can be used to capture response data after the request's "Send" method
  948. // is called.
  949. //
  950. // See DeleteTags for usage and error information.
  951. //
  952. // Creating a request object using this method should be used when you want to inject
  953. // custom logic into the request's lifecycle using a custom handler, or if you want to
  954. // access properties on the request object before or after sending the request. If
  955. // you just want the service response, call the DeleteTags method directly
  956. // instead.
  957. //
  958. // Note: You must call the "Send" method on the returned request object in order
  959. // to execute the request.
  960. //
  961. // // Example sending a request using the DeleteTagsRequest method.
  962. // req, resp := client.DeleteTagsRequest(params)
  963. //
  964. // err := req.Send()
  965. // if err == nil { // resp is now filled
  966. // fmt.Println(resp)
  967. // }
  968. //
  969. func (c *AutoScaling) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) {
  970. op := &request.Operation{
  971. Name: opDeleteTags,
  972. HTTPMethod: "POST",
  973. HTTPPath: "/",
  974. }
  975. if input == nil {
  976. input = &DeleteTagsInput{}
  977. }
  978. req = c.newRequest(op, input, output)
  979. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  980. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  981. output = &DeleteTagsOutput{}
  982. req.Data = output
  983. return
  984. }
  985. // DeleteTags API operation for Auto Scaling.
  986. //
  987. // Deletes the specified tags.
  988. //
  989. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  990. // with awserr.Error's Code and Message methods to get detailed information about
  991. // the error.
  992. //
  993. // See the AWS API reference guide for Auto Scaling's
  994. // API operation DeleteTags for usage and error information.
  995. //
  996. // Returned Error Codes:
  997. // * ResourceContention
  998. // You already have a pending update to an Auto Scaling resource (for example,
  999. // a group, instance, or load balancer).
  1000. //
  1001. func (c *AutoScaling) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
  1002. req, out := c.DeleteTagsRequest(input)
  1003. err := req.Send()
  1004. return out, err
  1005. }
  1006. const opDescribeAccountLimits = "DescribeAccountLimits"
  1007. // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the
  1008. // client's request for the DescribeAccountLimits operation. The "output" return
  1009. // value can be used to capture response data after the request's "Send" method
  1010. // is called.
  1011. //
  1012. // See DescribeAccountLimits for usage and error information.
  1013. //
  1014. // Creating a request object using this method should be used when you want to inject
  1015. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1016. // access properties on the request object before or after sending the request. If
  1017. // you just want the service response, call the DescribeAccountLimits method directly
  1018. // instead.
  1019. //
  1020. // Note: You must call the "Send" method on the returned request object in order
  1021. // to execute the request.
  1022. //
  1023. // // Example sending a request using the DescribeAccountLimitsRequest method.
  1024. // req, resp := client.DescribeAccountLimitsRequest(params)
  1025. //
  1026. // err := req.Send()
  1027. // if err == nil { // resp is now filled
  1028. // fmt.Println(resp)
  1029. // }
  1030. //
  1031. func (c *AutoScaling) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) (req *request.Request, output *DescribeAccountLimitsOutput) {
  1032. op := &request.Operation{
  1033. Name: opDescribeAccountLimits,
  1034. HTTPMethod: "POST",
  1035. HTTPPath: "/",
  1036. }
  1037. if input == nil {
  1038. input = &DescribeAccountLimitsInput{}
  1039. }
  1040. req = c.newRequest(op, input, output)
  1041. output = &DescribeAccountLimitsOutput{}
  1042. req.Data = output
  1043. return
  1044. }
  1045. // DescribeAccountLimits API operation for Auto Scaling.
  1046. //
  1047. // Describes the current Auto Scaling resource limits for your AWS account.
  1048. //
  1049. // For information about requesting an increase in these limits, see AWS Service
  1050. // Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html)
  1051. // in the Amazon Web Services General Reference.
  1052. //
  1053. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1054. // with awserr.Error's Code and Message methods to get detailed information about
  1055. // the error.
  1056. //
  1057. // See the AWS API reference guide for Auto Scaling's
  1058. // API operation DescribeAccountLimits for usage and error information.
  1059. //
  1060. // Returned Error Codes:
  1061. // * ResourceContention
  1062. // You already have a pending update to an Auto Scaling resource (for example,
  1063. // a group, instance, or load balancer).
  1064. //
  1065. func (c *AutoScaling) DescribeAccountLimits(input *DescribeAccountLimitsInput) (*DescribeAccountLimitsOutput, error) {
  1066. req, out := c.DescribeAccountLimitsRequest(input)
  1067. err := req.Send()
  1068. return out, err
  1069. }
  1070. const opDescribeAdjustmentTypes = "DescribeAdjustmentTypes"
  1071. // DescribeAdjustmentTypesRequest generates a "aws/request.Request" representing the
  1072. // client's request for the DescribeAdjustmentTypes operation. The "output" return
  1073. // value can be used to capture response data after the request's "Send" method
  1074. // is called.
  1075. //
  1076. // See DescribeAdjustmentTypes for usage and error information.
  1077. //
  1078. // Creating a request object using this method should be used when you want to inject
  1079. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1080. // access properties on the request object before or after sending the request. If
  1081. // you just want the service response, call the DescribeAdjustmentTypes method directly
  1082. // instead.
  1083. //
  1084. // Note: You must call the "Send" method on the returned request object in order
  1085. // to execute the request.
  1086. //
  1087. // // Example sending a request using the DescribeAdjustmentTypesRequest method.
  1088. // req, resp := client.DescribeAdjustmentTypesRequest(params)
  1089. //
  1090. // err := req.Send()
  1091. // if err == nil { // resp is now filled
  1092. // fmt.Println(resp)
  1093. // }
  1094. //
  1095. func (c *AutoScaling) DescribeAdjustmentTypesRequest(input *DescribeAdjustmentTypesInput) (req *request.Request, output *DescribeAdjustmentTypesOutput) {
  1096. op := &request.Operation{
  1097. Name: opDescribeAdjustmentTypes,
  1098. HTTPMethod: "POST",
  1099. HTTPPath: "/",
  1100. }
  1101. if input == nil {
  1102. input = &DescribeAdjustmentTypesInput{}
  1103. }
  1104. req = c.newRequest(op, input, output)
  1105. output = &DescribeAdjustmentTypesOutput{}
  1106. req.Data = output
  1107. return
  1108. }
  1109. // DescribeAdjustmentTypes API operation for Auto Scaling.
  1110. //
  1111. // Describes the policy adjustment types for use with PutScalingPolicy.
  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 Auto Scaling's
  1118. // API operation DescribeAdjustmentTypes for usage and error information.
  1119. //
  1120. // Returned Error Codes:
  1121. // * ResourceContention
  1122. // You already have a pending update to an Auto Scaling resource (for example,
  1123. // a group, instance, or load balancer).
  1124. //
  1125. func (c *AutoScaling) DescribeAdjustmentTypes(input *DescribeAdjustmentTypesInput) (*DescribeAdjustmentTypesOutput, error) {
  1126. req, out := c.DescribeAdjustmentTypesRequest(input)
  1127. err := req.Send()
  1128. return out, err
  1129. }
  1130. const opDescribeAutoScalingGroups = "DescribeAutoScalingGroups"
  1131. // DescribeAutoScalingGroupsRequest generates a "aws/request.Request" representing the
  1132. // client's request for the DescribeAutoScalingGroups operation. The "output" return
  1133. // value can be used to capture response data after the request's "Send" method
  1134. // is called.
  1135. //
  1136. // See DescribeAutoScalingGroups for usage and error information.
  1137. //
  1138. // Creating a request object using this method should be used when you want to inject
  1139. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1140. // access properties on the request object before or after sending the request. If
  1141. // you just want the service response, call the DescribeAutoScalingGroups method directly
  1142. // instead.
  1143. //
  1144. // Note: You must call the "Send" method on the returned request object in order
  1145. // to execute the request.
  1146. //
  1147. // // Example sending a request using the DescribeAutoScalingGroupsRequest method.
  1148. // req, resp := client.DescribeAutoScalingGroupsRequest(params)
  1149. //
  1150. // err := req.Send()
  1151. // if err == nil { // resp is now filled
  1152. // fmt.Println(resp)
  1153. // }
  1154. //
  1155. func (c *AutoScaling) DescribeAutoScalingGroupsRequest(input *DescribeAutoScalingGroupsInput) (req *request.Request, output *DescribeAutoScalingGroupsOutput) {
  1156. op := &request.Operation{
  1157. Name: opDescribeAutoScalingGroups,
  1158. HTTPMethod: "POST",
  1159. HTTPPath: "/",
  1160. Paginator: &request.Paginator{
  1161. InputTokens: []string{"NextToken"},
  1162. OutputTokens: []string{"NextToken"},
  1163. LimitToken: "MaxRecords",
  1164. TruncationToken: "",
  1165. },
  1166. }
  1167. if input == nil {
  1168. input = &DescribeAutoScalingGroupsInput{}
  1169. }
  1170. req = c.newRequest(op, input, output)
  1171. output = &DescribeAutoScalingGroupsOutput{}
  1172. req.Data = output
  1173. return
  1174. }
  1175. // DescribeAutoScalingGroups API operation for Auto Scaling.
  1176. //
  1177. // Describes one or more Auto Scaling groups.
  1178. //
  1179. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1180. // with awserr.Error's Code and Message methods to get detailed information about
  1181. // the error.
  1182. //
  1183. // See the AWS API reference guide for Auto Scaling's
  1184. // API operation DescribeAutoScalingGroups for usage and error information.
  1185. //
  1186. // Returned Error Codes:
  1187. // * InvalidNextToken
  1188. // The NextToken value is not valid.
  1189. //
  1190. // * ResourceContention
  1191. // You already have a pending update to an Auto Scaling resource (for example,
  1192. // a group, instance, or load balancer).
  1193. //
  1194. func (c *AutoScaling) DescribeAutoScalingGroups(input *DescribeAutoScalingGroupsInput) (*DescribeAutoScalingGroupsOutput, error) {
  1195. req, out := c.DescribeAutoScalingGroupsRequest(input)
  1196. err := req.Send()
  1197. return out, err
  1198. }
  1199. // DescribeAutoScalingGroupsPages iterates over the pages of a DescribeAutoScalingGroups operation,
  1200. // calling the "fn" function with the response data for each page. To stop
  1201. // iterating, return false from the fn function.
  1202. //
  1203. // See DescribeAutoScalingGroups method for more information on how to use this operation.
  1204. //
  1205. // Note: This operation can generate multiple requests to a service.
  1206. //
  1207. // // Example iterating over at most 3 pages of a DescribeAutoScalingGroups operation.
  1208. // pageNum := 0
  1209. // err := client.DescribeAutoScalingGroupsPages(params,
  1210. // func(page *DescribeAutoScalingGroupsOutput, lastPage bool) bool {
  1211. // pageNum++
  1212. // fmt.Println(page)
  1213. // return pageNum <= 3
  1214. // })
  1215. //
  1216. func (c *AutoScaling) DescribeAutoScalingGroupsPages(input *DescribeAutoScalingGroupsInput, fn func(p *DescribeAutoScalingGroupsOutput, lastPage bool) (shouldContinue bool)) error {
  1217. page, _ := c.DescribeAutoScalingGroupsRequest(input)
  1218. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1219. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1220. return fn(p.(*DescribeAutoScalingGroupsOutput), lastPage)
  1221. })
  1222. }
  1223. const opDescribeAutoScalingInstances = "DescribeAutoScalingInstances"
  1224. // DescribeAutoScalingInstancesRequest generates a "aws/request.Request" representing the
  1225. // client's request for the DescribeAutoScalingInstances operation. The "output" return
  1226. // value can be used to capture response data after the request's "Send" method
  1227. // is called.
  1228. //
  1229. // See DescribeAutoScalingInstances for usage and error information.
  1230. //
  1231. // Creating a request object using this method should be used when you want to inject
  1232. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1233. // access properties on the request object before or after sending the request. If
  1234. // you just want the service response, call the DescribeAutoScalingInstances method directly
  1235. // instead.
  1236. //
  1237. // Note: You must call the "Send" method on the returned request object in order
  1238. // to execute the request.
  1239. //
  1240. // // Example sending a request using the DescribeAutoScalingInstancesRequest method.
  1241. // req, resp := client.DescribeAutoScalingInstancesRequest(params)
  1242. //
  1243. // err := req.Send()
  1244. // if err == nil { // resp is now filled
  1245. // fmt.Println(resp)
  1246. // }
  1247. //
  1248. func (c *AutoScaling) DescribeAutoScalingInstancesRequest(input *DescribeAutoScalingInstancesInput) (req *request.Request, output *DescribeAutoScalingInstancesOutput) {
  1249. op := &request.Operation{
  1250. Name: opDescribeAutoScalingInstances,
  1251. HTTPMethod: "POST",
  1252. HTTPPath: "/",
  1253. Paginator: &request.Paginator{
  1254. InputTokens: []string{"NextToken"},
  1255. OutputTokens: []string{"NextToken"},
  1256. LimitToken: "MaxRecords",
  1257. TruncationToken: "",
  1258. },
  1259. }
  1260. if input == nil {
  1261. input = &DescribeAutoScalingInstancesInput{}
  1262. }
  1263. req = c.newRequest(op, input, output)
  1264. output = &DescribeAutoScalingInstancesOutput{}
  1265. req.Data = output
  1266. return
  1267. }
  1268. // DescribeAutoScalingInstances API operation for Auto Scaling.
  1269. //
  1270. // Describes one or more Auto Scaling instances.
  1271. //
  1272. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1273. // with awserr.Error's Code and Message methods to get detailed information about
  1274. // the error.
  1275. //
  1276. // See the AWS API reference guide for Auto Scaling's
  1277. // API operation DescribeAutoScalingInstances for usage and error information.
  1278. //
  1279. // Returned Error Codes:
  1280. // * InvalidNextToken
  1281. // The NextToken value is not valid.
  1282. //
  1283. // * ResourceContention
  1284. // You already have a pending update to an Auto Scaling resource (for example,
  1285. // a group, instance, or load balancer).
  1286. //
  1287. func (c *AutoScaling) DescribeAutoScalingInstances(input *DescribeAutoScalingInstancesInput) (*DescribeAutoScalingInstancesOutput, error) {
  1288. req, out := c.DescribeAutoScalingInstancesRequest(input)
  1289. err := req.Send()
  1290. return out, err
  1291. }
  1292. // DescribeAutoScalingInstancesPages iterates over the pages of a DescribeAutoScalingInstances operation,
  1293. // calling the "fn" function with the response data for each page. To stop
  1294. // iterating, return false from the fn function.
  1295. //
  1296. // See DescribeAutoScalingInstances method for more information on how to use this operation.
  1297. //
  1298. // Note: This operation can generate multiple requests to a service.
  1299. //
  1300. // // Example iterating over at most 3 pages of a DescribeAutoScalingInstances operation.
  1301. // pageNum := 0
  1302. // err := client.DescribeAutoScalingInstancesPages(params,
  1303. // func(page *DescribeAutoScalingInstancesOutput, lastPage bool) bool {
  1304. // pageNum++
  1305. // fmt.Println(page)
  1306. // return pageNum <= 3
  1307. // })
  1308. //
  1309. func (c *AutoScaling) DescribeAutoScalingInstancesPages(input *DescribeAutoScalingInstancesInput, fn func(p *DescribeAutoScalingInstancesOutput, lastPage bool) (shouldContinue bool)) error {
  1310. page, _ := c.DescribeAutoScalingInstancesRequest(input)
  1311. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1312. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1313. return fn(p.(*DescribeAutoScalingInstancesOutput), lastPage)
  1314. })
  1315. }
  1316. const opDescribeAutoScalingNotificationTypes = "DescribeAutoScalingNotificationTypes"
  1317. // DescribeAutoScalingNotificationTypesRequest generates a "aws/request.Request" representing the
  1318. // client's request for the DescribeAutoScalingNotificationTypes operation. The "output" return
  1319. // value can be used to capture response data after the request's "Send" method
  1320. // is called.
  1321. //
  1322. // See DescribeAutoScalingNotificationTypes for usage and error information.
  1323. //
  1324. // Creating a request object using this method should be used when you want to inject
  1325. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1326. // access properties on the request object before or after sending the request. If
  1327. // you just want the service response, call the DescribeAutoScalingNotificationTypes method directly
  1328. // instead.
  1329. //
  1330. // Note: You must call the "Send" method on the returned request object in order
  1331. // to execute the request.
  1332. //
  1333. // // Example sending a request using the DescribeAutoScalingNotificationTypesRequest method.
  1334. // req, resp := client.DescribeAutoScalingNotificationTypesRequest(params)
  1335. //
  1336. // err := req.Send()
  1337. // if err == nil { // resp is now filled
  1338. // fmt.Println(resp)
  1339. // }
  1340. //
  1341. func (c *AutoScaling) DescribeAutoScalingNotificationTypesRequest(input *DescribeAutoScalingNotificationTypesInput) (req *request.Request, output *DescribeAutoScalingNotificationTypesOutput) {
  1342. op := &request.Operation{
  1343. Name: opDescribeAutoScalingNotificationTypes,
  1344. HTTPMethod: "POST",
  1345. HTTPPath: "/",
  1346. }
  1347. if input == nil {
  1348. input = &DescribeAutoScalingNotificationTypesInput{}
  1349. }
  1350. req = c.newRequest(op, input, output)
  1351. output = &DescribeAutoScalingNotificationTypesOutput{}
  1352. req.Data = output
  1353. return
  1354. }
  1355. // DescribeAutoScalingNotificationTypes API operation for Auto Scaling.
  1356. //
  1357. // Describes the notification types that are supported by Auto Scaling.
  1358. //
  1359. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1360. // with awserr.Error's Code and Message methods to get detailed information about
  1361. // the error.
  1362. //
  1363. // See the AWS API reference guide for Auto Scaling's
  1364. // API operation DescribeAutoScalingNotificationTypes for usage and error information.
  1365. //
  1366. // Returned Error Codes:
  1367. // * ResourceContention
  1368. // You already have a pending update to an Auto Scaling resource (for example,
  1369. // a group, instance, or load balancer).
  1370. //
  1371. func (c *AutoScaling) DescribeAutoScalingNotificationTypes(input *DescribeAutoScalingNotificationTypesInput) (*DescribeAutoScalingNotificationTypesOutput, error) {
  1372. req, out := c.DescribeAutoScalingNotificationTypesRequest(input)
  1373. err := req.Send()
  1374. return out, err
  1375. }
  1376. const opDescribeLaunchConfigurations = "DescribeLaunchConfigurations"
  1377. // DescribeLaunchConfigurationsRequest generates a "aws/request.Request" representing the
  1378. // client's request for the DescribeLaunchConfigurations operation. The "output" return
  1379. // value can be used to capture response data after the request's "Send" method
  1380. // is called.
  1381. //
  1382. // See DescribeLaunchConfigurations for usage and error information.
  1383. //
  1384. // Creating a request object using this method should be used when you want to inject
  1385. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1386. // access properties on the request object before or after sending the request. If
  1387. // you just want the service response, call the DescribeLaunchConfigurations method directly
  1388. // instead.
  1389. //
  1390. // Note: You must call the "Send" method on the returned request object in order
  1391. // to execute the request.
  1392. //
  1393. // // Example sending a request using the DescribeLaunchConfigurationsRequest method.
  1394. // req, resp := client.DescribeLaunchConfigurationsRequest(params)
  1395. //
  1396. // err := req.Send()
  1397. // if err == nil { // resp is now filled
  1398. // fmt.Println(resp)
  1399. // }
  1400. //
  1401. func (c *AutoScaling) DescribeLaunchConfigurationsRequest(input *DescribeLaunchConfigurationsInput) (req *request.Request, output *DescribeLaunchConfigurationsOutput) {
  1402. op := &request.Operation{
  1403. Name: opDescribeLaunchConfigurations,
  1404. HTTPMethod: "POST",
  1405. HTTPPath: "/",
  1406. Paginator: &request.Paginator{
  1407. InputTokens: []string{"NextToken"},
  1408. OutputTokens: []string{"NextToken"},
  1409. LimitToken: "MaxRecords",
  1410. TruncationToken: "",
  1411. },
  1412. }
  1413. if input == nil {
  1414. input = &DescribeLaunchConfigurationsInput{}
  1415. }
  1416. req = c.newRequest(op, input, output)
  1417. output = &DescribeLaunchConfigurationsOutput{}
  1418. req.Data = output
  1419. return
  1420. }
  1421. // DescribeLaunchConfigurations API operation for Auto Scaling.
  1422. //
  1423. // Describes one or more launch configurations.
  1424. //
  1425. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1426. // with awserr.Error's Code and Message methods to get detailed information about
  1427. // the error.
  1428. //
  1429. // See the AWS API reference guide for Auto Scaling's
  1430. // API operation DescribeLaunchConfigurations for usage and error information.
  1431. //
  1432. // Returned Error Codes:
  1433. // * InvalidNextToken
  1434. // The NextToken value is not valid.
  1435. //
  1436. // * ResourceContention
  1437. // You already have a pending update to an Auto Scaling resource (for example,
  1438. // a group, instance, or load balancer).
  1439. //
  1440. func (c *AutoScaling) DescribeLaunchConfigurations(input *DescribeLaunchConfigurationsInput) (*DescribeLaunchConfigurationsOutput, error) {
  1441. req, out := c.DescribeLaunchConfigurationsRequest(input)
  1442. err := req.Send()
  1443. return out, err
  1444. }
  1445. // DescribeLaunchConfigurationsPages iterates over the pages of a DescribeLaunchConfigurations operation,
  1446. // calling the "fn" function with the response data for each page. To stop
  1447. // iterating, return false from the fn function.
  1448. //
  1449. // See DescribeLaunchConfigurations method for more information on how to use this operation.
  1450. //
  1451. // Note: This operation can generate multiple requests to a service.
  1452. //
  1453. // // Example iterating over at most 3 pages of a DescribeLaunchConfigurations operation.
  1454. // pageNum := 0
  1455. // err := client.DescribeLaunchConfigurationsPages(params,
  1456. // func(page *DescribeLaunchConfigurationsOutput, lastPage bool) bool {
  1457. // pageNum++
  1458. // fmt.Println(page)
  1459. // return pageNum <= 3
  1460. // })
  1461. //
  1462. func (c *AutoScaling) DescribeLaunchConfigurationsPages(input *DescribeLaunchConfigurationsInput, fn func(p *DescribeLaunchConfigurationsOutput, lastPage bool) (shouldContinue bool)) error {
  1463. page, _ := c.DescribeLaunchConfigurationsRequest(input)
  1464. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1465. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1466. return fn(p.(*DescribeLaunchConfigurationsOutput), lastPage)
  1467. })
  1468. }
  1469. const opDescribeLifecycleHookTypes = "DescribeLifecycleHookTypes"
  1470. // DescribeLifecycleHookTypesRequest generates a "aws/request.Request" representing the
  1471. // client's request for the DescribeLifecycleHookTypes operation. The "output" return
  1472. // value can be used to capture response data after the request's "Send" method
  1473. // is called.
  1474. //
  1475. // See DescribeLifecycleHookTypes for usage and error information.
  1476. //
  1477. // Creating a request object using this method should be used when you want to inject
  1478. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1479. // access properties on the request object before or after sending the request. If
  1480. // you just want the service response, call the DescribeLifecycleHookTypes method directly
  1481. // instead.
  1482. //
  1483. // Note: You must call the "Send" method on the returned request object in order
  1484. // to execute the request.
  1485. //
  1486. // // Example sending a request using the DescribeLifecycleHookTypesRequest method.
  1487. // req, resp := client.DescribeLifecycleHookTypesRequest(params)
  1488. //
  1489. // err := req.Send()
  1490. // if err == nil { // resp is now filled
  1491. // fmt.Println(resp)
  1492. // }
  1493. //
  1494. func (c *AutoScaling) DescribeLifecycleHookTypesRequest(input *DescribeLifecycleHookTypesInput) (req *request.Request, output *DescribeLifecycleHookTypesOutput) {
  1495. op := &request.Operation{
  1496. Name: opDescribeLifecycleHookTypes,
  1497. HTTPMethod: "POST",
  1498. HTTPPath: "/",
  1499. }
  1500. if input == nil {
  1501. input = &DescribeLifecycleHookTypesInput{}
  1502. }
  1503. req = c.newRequest(op, input, output)
  1504. output = &DescribeLifecycleHookTypesOutput{}
  1505. req.Data = output
  1506. return
  1507. }
  1508. // DescribeLifecycleHookTypes API operation for Auto Scaling.
  1509. //
  1510. // Describes the available types of lifecycle hooks.
  1511. //
  1512. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1513. // with awserr.Error's Code and Message methods to get detailed information about
  1514. // the error.
  1515. //
  1516. // See the AWS API reference guide for Auto Scaling's
  1517. // API operation DescribeLifecycleHookTypes for usage and error information.
  1518. //
  1519. // Returned Error Codes:
  1520. // * ResourceContention
  1521. // You already have a pending update to an Auto Scaling resource (for example,
  1522. // a group, instance, or load balancer).
  1523. //
  1524. func (c *AutoScaling) DescribeLifecycleHookTypes(input *DescribeLifecycleHookTypesInput) (*DescribeLifecycleHookTypesOutput, error) {
  1525. req, out := c.DescribeLifecycleHookTypesRequest(input)
  1526. err := req.Send()
  1527. return out, err
  1528. }
  1529. const opDescribeLifecycleHooks = "DescribeLifecycleHooks"
  1530. // DescribeLifecycleHooksRequest generates a "aws/request.Request" representing the
  1531. // client's request for the DescribeLifecycleHooks operation. The "output" return
  1532. // value can be used to capture response data after the request's "Send" method
  1533. // is called.
  1534. //
  1535. // See DescribeLifecycleHooks for usage and error information.
  1536. //
  1537. // Creating a request object using this method should be used when you want to inject
  1538. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1539. // access properties on the request object before or after sending the request. If
  1540. // you just want the service response, call the DescribeLifecycleHooks method directly
  1541. // instead.
  1542. //
  1543. // Note: You must call the "Send" method on the returned request object in order
  1544. // to execute the request.
  1545. //
  1546. // // Example sending a request using the DescribeLifecycleHooksRequest method.
  1547. // req, resp := client.DescribeLifecycleHooksRequest(params)
  1548. //
  1549. // err := req.Send()
  1550. // if err == nil { // resp is now filled
  1551. // fmt.Println(resp)
  1552. // }
  1553. //
  1554. func (c *AutoScaling) DescribeLifecycleHooksRequest(input *DescribeLifecycleHooksInput) (req *request.Request, output *DescribeLifecycleHooksOutput) {
  1555. op := &request.Operation{
  1556. Name: opDescribeLifecycleHooks,
  1557. HTTPMethod: "POST",
  1558. HTTPPath: "/",
  1559. }
  1560. if input == nil {
  1561. input = &DescribeLifecycleHooksInput{}
  1562. }
  1563. req = c.newRequest(op, input, output)
  1564. output = &DescribeLifecycleHooksOutput{}
  1565. req.Data = output
  1566. return
  1567. }
  1568. // DescribeLifecycleHooks API operation for Auto Scaling.
  1569. //
  1570. // Describes the lifecycle hooks for the specified Auto Scaling group.
  1571. //
  1572. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1573. // with awserr.Error's Code and Message methods to get detailed information about
  1574. // the error.
  1575. //
  1576. // See the AWS API reference guide for Auto Scaling's
  1577. // API operation DescribeLifecycleHooks for usage and error information.
  1578. //
  1579. // Returned Error Codes:
  1580. // * ResourceContention
  1581. // You already have a pending update to an Auto Scaling resource (for example,
  1582. // a group, instance, or load balancer).
  1583. //
  1584. func (c *AutoScaling) DescribeLifecycleHooks(input *DescribeLifecycleHooksInput) (*DescribeLifecycleHooksOutput, error) {
  1585. req, out := c.DescribeLifecycleHooksRequest(input)
  1586. err := req.Send()
  1587. return out, err
  1588. }
  1589. const opDescribeLoadBalancerTargetGroups = "DescribeLoadBalancerTargetGroups"
  1590. // DescribeLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the
  1591. // client's request for the DescribeLoadBalancerTargetGroups operation. The "output" return
  1592. // value can be used to capture response data after the request's "Send" method
  1593. // is called.
  1594. //
  1595. // See DescribeLoadBalancerTargetGroups for usage and error information.
  1596. //
  1597. // Creating a request object using this method should be used when you want to inject
  1598. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1599. // access properties on the request object before or after sending the request. If
  1600. // you just want the service response, call the DescribeLoadBalancerTargetGroups method directly
  1601. // instead.
  1602. //
  1603. // Note: You must call the "Send" method on the returned request object in order
  1604. // to execute the request.
  1605. //
  1606. // // Example sending a request using the DescribeLoadBalancerTargetGroupsRequest method.
  1607. // req, resp := client.DescribeLoadBalancerTargetGroupsRequest(params)
  1608. //
  1609. // err := req.Send()
  1610. // if err == nil { // resp is now filled
  1611. // fmt.Println(resp)
  1612. // }
  1613. //
  1614. func (c *AutoScaling) DescribeLoadBalancerTargetGroupsRequest(input *DescribeLoadBalancerTargetGroupsInput) (req *request.Request, output *DescribeLoadBalancerTargetGroupsOutput) {
  1615. op := &request.Operation{
  1616. Name: opDescribeLoadBalancerTargetGroups,
  1617. HTTPMethod: "POST",
  1618. HTTPPath: "/",
  1619. }
  1620. if input == nil {
  1621. input = &DescribeLoadBalancerTargetGroupsInput{}
  1622. }
  1623. req = c.newRequest(op, input, output)
  1624. output = &DescribeLoadBalancerTargetGroupsOutput{}
  1625. req.Data = output
  1626. return
  1627. }
  1628. // DescribeLoadBalancerTargetGroups API operation for Auto Scaling.
  1629. //
  1630. // Describes the target groups for the specified Auto Scaling group.
  1631. //
  1632. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1633. // with awserr.Error's Code and Message methods to get detailed information about
  1634. // the error.
  1635. //
  1636. // See the AWS API reference guide for Auto Scaling's
  1637. // API operation DescribeLoadBalancerTargetGroups for usage and error information.
  1638. //
  1639. // Returned Error Codes:
  1640. // * ResourceContention
  1641. // You already have a pending update to an Auto Scaling resource (for example,
  1642. // a group, instance, or load balancer).
  1643. //
  1644. func (c *AutoScaling) DescribeLoadBalancerTargetGroups(input *DescribeLoadBalancerTargetGroupsInput) (*DescribeLoadBalancerTargetGroupsOutput, error) {
  1645. req, out := c.DescribeLoadBalancerTargetGroupsRequest(input)
  1646. err := req.Send()
  1647. return out, err
  1648. }
  1649. const opDescribeLoadBalancers = "DescribeLoadBalancers"
  1650. // DescribeLoadBalancersRequest generates a "aws/request.Request" representing the
  1651. // client's request for the DescribeLoadBalancers operation. The "output" return
  1652. // value can be used to capture response data after the request's "Send" method
  1653. // is called.
  1654. //
  1655. // See DescribeLoadBalancers for usage and error information.
  1656. //
  1657. // Creating a request object using this method should be used when you want to inject
  1658. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1659. // access properties on the request object before or after sending the request. If
  1660. // you just want the service response, call the DescribeLoadBalancers method directly
  1661. // instead.
  1662. //
  1663. // Note: You must call the "Send" method on the returned request object in order
  1664. // to execute the request.
  1665. //
  1666. // // Example sending a request using the DescribeLoadBalancersRequest method.
  1667. // req, resp := client.DescribeLoadBalancersRequest(params)
  1668. //
  1669. // err := req.Send()
  1670. // if err == nil { // resp is now filled
  1671. // fmt.Println(resp)
  1672. // }
  1673. //
  1674. func (c *AutoScaling) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) (req *request.Request, output *DescribeLoadBalancersOutput) {
  1675. op := &request.Operation{
  1676. Name: opDescribeLoadBalancers,
  1677. HTTPMethod: "POST",
  1678. HTTPPath: "/",
  1679. }
  1680. if input == nil {
  1681. input = &DescribeLoadBalancersInput{}
  1682. }
  1683. req = c.newRequest(op, input, output)
  1684. output = &DescribeLoadBalancersOutput{}
  1685. req.Data = output
  1686. return
  1687. }
  1688. // DescribeLoadBalancers API operation for Auto Scaling.
  1689. //
  1690. // Describes the load balancers for the specified Auto Scaling group.
  1691. //
  1692. // Note that this operation describes only Classic load balancers. If you have
  1693. // Application load balancers, use DescribeLoadBalancerTargetGroups instead.
  1694. //
  1695. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1696. // with awserr.Error's Code and Message methods to get detailed information about
  1697. // the error.
  1698. //
  1699. // See the AWS API reference guide for Auto Scaling's
  1700. // API operation DescribeLoadBalancers for usage and error information.
  1701. //
  1702. // Returned Error Codes:
  1703. // * ResourceContention
  1704. // You already have a pending update to an Auto Scaling resource (for example,
  1705. // a group, instance, or load balancer).
  1706. //
  1707. func (c *AutoScaling) DescribeLoadBalancers(input *DescribeLoadBalancersInput) (*DescribeLoadBalancersOutput, error) {
  1708. req, out := c.DescribeLoadBalancersRequest(input)
  1709. err := req.Send()
  1710. return out, err
  1711. }
  1712. const opDescribeMetricCollectionTypes = "DescribeMetricCollectionTypes"
  1713. // DescribeMetricCollectionTypesRequest generates a "aws/request.Request" representing the
  1714. // client's request for the DescribeMetricCollectionTypes operation. The "output" return
  1715. // value can be used to capture response data after the request's "Send" method
  1716. // is called.
  1717. //
  1718. // See DescribeMetricCollectionTypes for usage and error information.
  1719. //
  1720. // Creating a request object using this method should be used when you want to inject
  1721. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1722. // access properties on the request object before or after sending the request. If
  1723. // you just want the service response, call the DescribeMetricCollectionTypes method directly
  1724. // instead.
  1725. //
  1726. // Note: You must call the "Send" method on the returned request object in order
  1727. // to execute the request.
  1728. //
  1729. // // Example sending a request using the DescribeMetricCollectionTypesRequest method.
  1730. // req, resp := client.DescribeMetricCollectionTypesRequest(params)
  1731. //
  1732. // err := req.Send()
  1733. // if err == nil { // resp is now filled
  1734. // fmt.Println(resp)
  1735. // }
  1736. //
  1737. func (c *AutoScaling) DescribeMetricCollectionTypesRequest(input *DescribeMetricCollectionTypesInput) (req *request.Request, output *DescribeMetricCollectionTypesOutput) {
  1738. op := &request.Operation{
  1739. Name: opDescribeMetricCollectionTypes,
  1740. HTTPMethod: "POST",
  1741. HTTPPath: "/",
  1742. }
  1743. if input == nil {
  1744. input = &DescribeMetricCollectionTypesInput{}
  1745. }
  1746. req = c.newRequest(op, input, output)
  1747. output = &DescribeMetricCollectionTypesOutput{}
  1748. req.Data = output
  1749. return
  1750. }
  1751. // DescribeMetricCollectionTypes API operation for Auto Scaling.
  1752. //
  1753. // Describes the available CloudWatch metrics for Auto Scaling.
  1754. //
  1755. // Note that the GroupStandbyInstances metric is not returned by default. You
  1756. // must explicitly request this metric when calling EnableMetricsCollection.
  1757. //
  1758. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1759. // with awserr.Error's Code and Message methods to get detailed information about
  1760. // the error.
  1761. //
  1762. // See the AWS API reference guide for Auto Scaling's
  1763. // API operation DescribeMetricCollectionTypes for usage and error information.
  1764. //
  1765. // Returned Error Codes:
  1766. // * ResourceContention
  1767. // You already have a pending update to an Auto Scaling resource (for example,
  1768. // a group, instance, or load balancer).
  1769. //
  1770. func (c *AutoScaling) DescribeMetricCollectionTypes(input *DescribeMetricCollectionTypesInput) (*DescribeMetricCollectionTypesOutput, error) {
  1771. req, out := c.DescribeMetricCollectionTypesRequest(input)
  1772. err := req.Send()
  1773. return out, err
  1774. }
  1775. const opDescribeNotificationConfigurations = "DescribeNotificationConfigurations"
  1776. // DescribeNotificationConfigurationsRequest generates a "aws/request.Request" representing the
  1777. // client's request for the DescribeNotificationConfigurations operation. The "output" return
  1778. // value can be used to capture response data after the request's "Send" method
  1779. // is called.
  1780. //
  1781. // See DescribeNotificationConfigurations for usage and error information.
  1782. //
  1783. // Creating a request object using this method should be used when you want to inject
  1784. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1785. // access properties on the request object before or after sending the request. If
  1786. // you just want the service response, call the DescribeNotificationConfigurations method directly
  1787. // instead.
  1788. //
  1789. // Note: You must call the "Send" method on the returned request object in order
  1790. // to execute the request.
  1791. //
  1792. // // Example sending a request using the DescribeNotificationConfigurationsRequest method.
  1793. // req, resp := client.DescribeNotificationConfigurationsRequest(params)
  1794. //
  1795. // err := req.Send()
  1796. // if err == nil { // resp is now filled
  1797. // fmt.Println(resp)
  1798. // }
  1799. //
  1800. func (c *AutoScaling) DescribeNotificationConfigurationsRequest(input *DescribeNotificationConfigurationsInput) (req *request.Request, output *DescribeNotificationConfigurationsOutput) {
  1801. op := &request.Operation{
  1802. Name: opDescribeNotificationConfigurations,
  1803. HTTPMethod: "POST",
  1804. HTTPPath: "/",
  1805. Paginator: &request.Paginator{
  1806. InputTokens: []string{"NextToken"},
  1807. OutputTokens: []string{"NextToken"},
  1808. LimitToken: "MaxRecords",
  1809. TruncationToken: "",
  1810. },
  1811. }
  1812. if input == nil {
  1813. input = &DescribeNotificationConfigurationsInput{}
  1814. }
  1815. req = c.newRequest(op, input, output)
  1816. output = &DescribeNotificationConfigurationsOutput{}
  1817. req.Data = output
  1818. return
  1819. }
  1820. // DescribeNotificationConfigurations API operation for Auto Scaling.
  1821. //
  1822. // Describes the notification actions associated with the specified Auto Scaling
  1823. // group.
  1824. //
  1825. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1826. // with awserr.Error's Code and Message methods to get detailed information about
  1827. // the error.
  1828. //
  1829. // See the AWS API reference guide for Auto Scaling's
  1830. // API operation DescribeNotificationConfigurations for usage and error information.
  1831. //
  1832. // Returned Error Codes:
  1833. // * InvalidNextToken
  1834. // The NextToken value is not valid.
  1835. //
  1836. // * ResourceContention
  1837. // You already have a pending update to an Auto Scaling resource (for example,
  1838. // a group, instance, or load balancer).
  1839. //
  1840. func (c *AutoScaling) DescribeNotificationConfigurations(input *DescribeNotificationConfigurationsInput) (*DescribeNotificationConfigurationsOutput, error) {
  1841. req, out := c.DescribeNotificationConfigurationsRequest(input)
  1842. err := req.Send()
  1843. return out, err
  1844. }
  1845. // DescribeNotificationConfigurationsPages iterates over the pages of a DescribeNotificationConfigurations operation,
  1846. // calling the "fn" function with the response data for each page. To stop
  1847. // iterating, return false from the fn function.
  1848. //
  1849. // See DescribeNotificationConfigurations method for more information on how to use this operation.
  1850. //
  1851. // Note: This operation can generate multiple requests to a service.
  1852. //
  1853. // // Example iterating over at most 3 pages of a DescribeNotificationConfigurations operation.
  1854. // pageNum := 0
  1855. // err := client.DescribeNotificationConfigurationsPages(params,
  1856. // func(page *DescribeNotificationConfigurationsOutput, lastPage bool) bool {
  1857. // pageNum++
  1858. // fmt.Println(page)
  1859. // return pageNum <= 3
  1860. // })
  1861. //
  1862. func (c *AutoScaling) DescribeNotificationConfigurationsPages(input *DescribeNotificationConfigurationsInput, fn func(p *DescribeNotificationConfigurationsOutput, lastPage bool) (shouldContinue bool)) error {
  1863. page, _ := c.DescribeNotificationConfigurationsRequest(input)
  1864. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1865. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1866. return fn(p.(*DescribeNotificationConfigurationsOutput), lastPage)
  1867. })
  1868. }
  1869. const opDescribePolicies = "DescribePolicies"
  1870. // DescribePoliciesRequest generates a "aws/request.Request" representing the
  1871. // client's request for the DescribePolicies operation. The "output" return
  1872. // value can be used to capture response data after the request's "Send" method
  1873. // is called.
  1874. //
  1875. // See DescribePolicies for usage and error information.
  1876. //
  1877. // Creating a request object using this method should be used when you want to inject
  1878. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1879. // access properties on the request object before or after sending the request. If
  1880. // you just want the service response, call the DescribePolicies method directly
  1881. // instead.
  1882. //
  1883. // Note: You must call the "Send" method on the returned request object in order
  1884. // to execute the request.
  1885. //
  1886. // // Example sending a request using the DescribePoliciesRequest method.
  1887. // req, resp := client.DescribePoliciesRequest(params)
  1888. //
  1889. // err := req.Send()
  1890. // if err == nil { // resp is now filled
  1891. // fmt.Println(resp)
  1892. // }
  1893. //
  1894. func (c *AutoScaling) DescribePoliciesRequest(input *DescribePoliciesInput) (req *request.Request, output *DescribePoliciesOutput) {
  1895. op := &request.Operation{
  1896. Name: opDescribePolicies,
  1897. HTTPMethod: "POST",
  1898. HTTPPath: "/",
  1899. Paginator: &request.Paginator{
  1900. InputTokens: []string{"NextToken"},
  1901. OutputTokens: []string{"NextToken"},
  1902. LimitToken: "MaxRecords",
  1903. TruncationToken: "",
  1904. },
  1905. }
  1906. if input == nil {
  1907. input = &DescribePoliciesInput{}
  1908. }
  1909. req = c.newRequest(op, input, output)
  1910. output = &DescribePoliciesOutput{}
  1911. req.Data = output
  1912. return
  1913. }
  1914. // DescribePolicies API operation for Auto Scaling.
  1915. //
  1916. // Describes the policies for the specified Auto Scaling group.
  1917. //
  1918. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1919. // with awserr.Error's Code and Message methods to get detailed information about
  1920. // the error.
  1921. //
  1922. // See the AWS API reference guide for Auto Scaling's
  1923. // API operation DescribePolicies for usage and error information.
  1924. //
  1925. // Returned Error Codes:
  1926. // * InvalidNextToken
  1927. // The NextToken value is not valid.
  1928. //
  1929. // * ResourceContention
  1930. // You already have a pending update to an Auto Scaling resource (for example,
  1931. // a group, instance, or load balancer).
  1932. //
  1933. func (c *AutoScaling) DescribePolicies(input *DescribePoliciesInput) (*DescribePoliciesOutput, error) {
  1934. req, out := c.DescribePoliciesRequest(input)
  1935. err := req.Send()
  1936. return out, err
  1937. }
  1938. // DescribePoliciesPages iterates over the pages of a DescribePolicies operation,
  1939. // calling the "fn" function with the response data for each page. To stop
  1940. // iterating, return false from the fn function.
  1941. //
  1942. // See DescribePolicies method for more information on how to use this operation.
  1943. //
  1944. // Note: This operation can generate multiple requests to a service.
  1945. //
  1946. // // Example iterating over at most 3 pages of a DescribePolicies operation.
  1947. // pageNum := 0
  1948. // err := client.DescribePoliciesPages(params,
  1949. // func(page *DescribePoliciesOutput, lastPage bool) bool {
  1950. // pageNum++
  1951. // fmt.Println(page)
  1952. // return pageNum <= 3
  1953. // })
  1954. //
  1955. func (c *AutoScaling) DescribePoliciesPages(input *DescribePoliciesInput, fn func(p *DescribePoliciesOutput, lastPage bool) (shouldContinue bool)) error {
  1956. page, _ := c.DescribePoliciesRequest(input)
  1957. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1958. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1959. return fn(p.(*DescribePoliciesOutput), lastPage)
  1960. })
  1961. }
  1962. const opDescribeScalingActivities = "DescribeScalingActivities"
  1963. // DescribeScalingActivitiesRequest generates a "aws/request.Request" representing the
  1964. // client's request for the DescribeScalingActivities operation. The "output" return
  1965. // value can be used to capture response data after the request's "Send" method
  1966. // is called.
  1967. //
  1968. // See DescribeScalingActivities for usage and error information.
  1969. //
  1970. // Creating a request object using this method should be used when you want to inject
  1971. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1972. // access properties on the request object before or after sending the request. If
  1973. // you just want the service response, call the DescribeScalingActivities method directly
  1974. // instead.
  1975. //
  1976. // Note: You must call the "Send" method on the returned request object in order
  1977. // to execute the request.
  1978. //
  1979. // // Example sending a request using the DescribeScalingActivitiesRequest method.
  1980. // req, resp := client.DescribeScalingActivitiesRequest(params)
  1981. //
  1982. // err := req.Send()
  1983. // if err == nil { // resp is now filled
  1984. // fmt.Println(resp)
  1985. // }
  1986. //
  1987. func (c *AutoScaling) DescribeScalingActivitiesRequest(input *DescribeScalingActivitiesInput) (req *request.Request, output *DescribeScalingActivitiesOutput) {
  1988. op := &request.Operation{
  1989. Name: opDescribeScalingActivities,
  1990. HTTPMethod: "POST",
  1991. HTTPPath: "/",
  1992. Paginator: &request.Paginator{
  1993. InputTokens: []string{"NextToken"},
  1994. OutputTokens: []string{"NextToken"},
  1995. LimitToken: "MaxRecords",
  1996. TruncationToken: "",
  1997. },
  1998. }
  1999. if input == nil {
  2000. input = &DescribeScalingActivitiesInput{}
  2001. }
  2002. req = c.newRequest(op, input, output)
  2003. output = &DescribeScalingActivitiesOutput{}
  2004. req.Data = output
  2005. return
  2006. }
  2007. // DescribeScalingActivities API operation for Auto Scaling.
  2008. //
  2009. // Describes one or more scaling activities for the specified Auto Scaling group.
  2010. //
  2011. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2012. // with awserr.Error's Code and Message methods to get detailed information about
  2013. // the error.
  2014. //
  2015. // See the AWS API reference guide for Auto Scaling's
  2016. // API operation DescribeScalingActivities for usage and error information.
  2017. //
  2018. // Returned Error Codes:
  2019. // * InvalidNextToken
  2020. // The NextToken value is not valid.
  2021. //
  2022. // * ResourceContention
  2023. // You already have a pending update to an Auto Scaling resource (for example,
  2024. // a group, instance, or load balancer).
  2025. //
  2026. func (c *AutoScaling) DescribeScalingActivities(input *DescribeScalingActivitiesInput) (*DescribeScalingActivitiesOutput, error) {
  2027. req, out := c.DescribeScalingActivitiesRequest(input)
  2028. err := req.Send()
  2029. return out, err
  2030. }
  2031. // DescribeScalingActivitiesPages iterates over the pages of a DescribeScalingActivities operation,
  2032. // calling the "fn" function with the response data for each page. To stop
  2033. // iterating, return false from the fn function.
  2034. //
  2035. // See DescribeScalingActivities method for more information on how to use this operation.
  2036. //
  2037. // Note: This operation can generate multiple requests to a service.
  2038. //
  2039. // // Example iterating over at most 3 pages of a DescribeScalingActivities operation.
  2040. // pageNum := 0
  2041. // err := client.DescribeScalingActivitiesPages(params,
  2042. // func(page *DescribeScalingActivitiesOutput, lastPage bool) bool {
  2043. // pageNum++
  2044. // fmt.Println(page)
  2045. // return pageNum <= 3
  2046. // })
  2047. //
  2048. func (c *AutoScaling) DescribeScalingActivitiesPages(input *DescribeScalingActivitiesInput, fn func(p *DescribeScalingActivitiesOutput, lastPage bool) (shouldContinue bool)) error {
  2049. page, _ := c.DescribeScalingActivitiesRequest(input)
  2050. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2051. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2052. return fn(p.(*DescribeScalingActivitiesOutput), lastPage)
  2053. })
  2054. }
  2055. const opDescribeScalingProcessTypes = "DescribeScalingProcessTypes"
  2056. // DescribeScalingProcessTypesRequest generates a "aws/request.Request" representing the
  2057. // client's request for the DescribeScalingProcessTypes operation. The "output" return
  2058. // value can be used to capture response data after the request's "Send" method
  2059. // is called.
  2060. //
  2061. // See DescribeScalingProcessTypes for usage and error information.
  2062. //
  2063. // Creating a request object using this method should be used when you want to inject
  2064. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2065. // access properties on the request object before or after sending the request. If
  2066. // you just want the service response, call the DescribeScalingProcessTypes method directly
  2067. // instead.
  2068. //
  2069. // Note: You must call the "Send" method on the returned request object in order
  2070. // to execute the request.
  2071. //
  2072. // // Example sending a request using the DescribeScalingProcessTypesRequest method.
  2073. // req, resp := client.DescribeScalingProcessTypesRequest(params)
  2074. //
  2075. // err := req.Send()
  2076. // if err == nil { // resp is now filled
  2077. // fmt.Println(resp)
  2078. // }
  2079. //
  2080. func (c *AutoScaling) DescribeScalingProcessTypesRequest(input *DescribeScalingProcessTypesInput) (req *request.Request, output *DescribeScalingProcessTypesOutput) {
  2081. op := &request.Operation{
  2082. Name: opDescribeScalingProcessTypes,
  2083. HTTPMethod: "POST",
  2084. HTTPPath: "/",
  2085. }
  2086. if input == nil {
  2087. input = &DescribeScalingProcessTypesInput{}
  2088. }
  2089. req = c.newRequest(op, input, output)
  2090. output = &DescribeScalingProcessTypesOutput{}
  2091. req.Data = output
  2092. return
  2093. }
  2094. // DescribeScalingProcessTypes API operation for Auto Scaling.
  2095. //
  2096. // Describes the scaling process types for use with ResumeProcesses and SuspendProcesses.
  2097. //
  2098. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2099. // with awserr.Error's Code and Message methods to get detailed information about
  2100. // the error.
  2101. //
  2102. // See the AWS API reference guide for Auto Scaling's
  2103. // API operation DescribeScalingProcessTypes for usage and error information.
  2104. //
  2105. // Returned Error Codes:
  2106. // * ResourceContention
  2107. // You already have a pending update to an Auto Scaling resource (for example,
  2108. // a group, instance, or load balancer).
  2109. //
  2110. func (c *AutoScaling) DescribeScalingProcessTypes(input *DescribeScalingProcessTypesInput) (*DescribeScalingProcessTypesOutput, error) {
  2111. req, out := c.DescribeScalingProcessTypesRequest(input)
  2112. err := req.Send()
  2113. return out, err
  2114. }
  2115. const opDescribeScheduledActions = "DescribeScheduledActions"
  2116. // DescribeScheduledActionsRequest generates a "aws/request.Request" representing the
  2117. // client's request for the DescribeScheduledActions operation. The "output" return
  2118. // value can be used to capture response data after the request's "Send" method
  2119. // is called.
  2120. //
  2121. // See DescribeScheduledActions for usage and error information.
  2122. //
  2123. // Creating a request object using this method should be used when you want to inject
  2124. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2125. // access properties on the request object before or after sending the request. If
  2126. // you just want the service response, call the DescribeScheduledActions method directly
  2127. // instead.
  2128. //
  2129. // Note: You must call the "Send" method on the returned request object in order
  2130. // to execute the request.
  2131. //
  2132. // // Example sending a request using the DescribeScheduledActionsRequest method.
  2133. // req, resp := client.DescribeScheduledActionsRequest(params)
  2134. //
  2135. // err := req.Send()
  2136. // if err == nil { // resp is now filled
  2137. // fmt.Println(resp)
  2138. // }
  2139. //
  2140. func (c *AutoScaling) DescribeScheduledActionsRequest(input *DescribeScheduledActionsInput) (req *request.Request, output *DescribeScheduledActionsOutput) {
  2141. op := &request.Operation{
  2142. Name: opDescribeScheduledActions,
  2143. HTTPMethod: "POST",
  2144. HTTPPath: "/",
  2145. Paginator: &request.Paginator{
  2146. InputTokens: []string{"NextToken"},
  2147. OutputTokens: []string{"NextToken"},
  2148. LimitToken: "MaxRecords",
  2149. TruncationToken: "",
  2150. },
  2151. }
  2152. if input == nil {
  2153. input = &DescribeScheduledActionsInput{}
  2154. }
  2155. req = c.newRequest(op, input, output)
  2156. output = &DescribeScheduledActionsOutput{}
  2157. req.Data = output
  2158. return
  2159. }
  2160. // DescribeScheduledActions API operation for Auto Scaling.
  2161. //
  2162. // Describes the actions scheduled for your Auto Scaling group that haven't
  2163. // run. To describe the actions that have already run, use DescribeScalingActivities.
  2164. //
  2165. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2166. // with awserr.Error's Code and Message methods to get detailed information about
  2167. // the error.
  2168. //
  2169. // See the AWS API reference guide for Auto Scaling's
  2170. // API operation DescribeScheduledActions for usage and error information.
  2171. //
  2172. // Returned Error Codes:
  2173. // * InvalidNextToken
  2174. // The NextToken value is not valid.
  2175. //
  2176. // * ResourceContention
  2177. // You already have a pending update to an Auto Scaling resource (for example,
  2178. // a group, instance, or load balancer).
  2179. //
  2180. func (c *AutoScaling) DescribeScheduledActions(input *DescribeScheduledActionsInput) (*DescribeScheduledActionsOutput, error) {
  2181. req, out := c.DescribeScheduledActionsRequest(input)
  2182. err := req.Send()
  2183. return out, err
  2184. }
  2185. // DescribeScheduledActionsPages iterates over the pages of a DescribeScheduledActions operation,
  2186. // calling the "fn" function with the response data for each page. To stop
  2187. // iterating, return false from the fn function.
  2188. //
  2189. // See DescribeScheduledActions method for more information on how to use this operation.
  2190. //
  2191. // Note: This operation can generate multiple requests to a service.
  2192. //
  2193. // // Example iterating over at most 3 pages of a DescribeScheduledActions operation.
  2194. // pageNum := 0
  2195. // err := client.DescribeScheduledActionsPages(params,
  2196. // func(page *DescribeScheduledActionsOutput, lastPage bool) bool {
  2197. // pageNum++
  2198. // fmt.Println(page)
  2199. // return pageNum <= 3
  2200. // })
  2201. //
  2202. func (c *AutoScaling) DescribeScheduledActionsPages(input *DescribeScheduledActionsInput, fn func(p *DescribeScheduledActionsOutput, lastPage bool) (shouldContinue bool)) error {
  2203. page, _ := c.DescribeScheduledActionsRequest(input)
  2204. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2205. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2206. return fn(p.(*DescribeScheduledActionsOutput), lastPage)
  2207. })
  2208. }
  2209. const opDescribeTags = "DescribeTags"
  2210. // DescribeTagsRequest generates a "aws/request.Request" representing the
  2211. // client's request for the DescribeTags operation. The "output" return
  2212. // value can be used to capture response data after the request's "Send" method
  2213. // is called.
  2214. //
  2215. // See DescribeTags for usage and error information.
  2216. //
  2217. // Creating a request object using this method should be used when you want to inject
  2218. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2219. // access properties on the request object before or after sending the request. If
  2220. // you just want the service response, call the DescribeTags method directly
  2221. // instead.
  2222. //
  2223. // Note: You must call the "Send" method on the returned request object in order
  2224. // to execute the request.
  2225. //
  2226. // // Example sending a request using the DescribeTagsRequest method.
  2227. // req, resp := client.DescribeTagsRequest(params)
  2228. //
  2229. // err := req.Send()
  2230. // if err == nil { // resp is now filled
  2231. // fmt.Println(resp)
  2232. // }
  2233. //
  2234. func (c *AutoScaling) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) {
  2235. op := &request.Operation{
  2236. Name: opDescribeTags,
  2237. HTTPMethod: "POST",
  2238. HTTPPath: "/",
  2239. Paginator: &request.Paginator{
  2240. InputTokens: []string{"NextToken"},
  2241. OutputTokens: []string{"NextToken"},
  2242. LimitToken: "MaxRecords",
  2243. TruncationToken: "",
  2244. },
  2245. }
  2246. if input == nil {
  2247. input = &DescribeTagsInput{}
  2248. }
  2249. req = c.newRequest(op, input, output)
  2250. output = &DescribeTagsOutput{}
  2251. req.Data = output
  2252. return
  2253. }
  2254. // DescribeTags API operation for Auto Scaling.
  2255. //
  2256. // Describes the specified tags.
  2257. //
  2258. // You can use filters to limit the results. For example, you can query for
  2259. // the tags for a specific Auto Scaling group. You can specify multiple values
  2260. // for a filter. A tag must match at least one of the specified values for it
  2261. // to be included in the results.
  2262. //
  2263. // You can also specify multiple filters. The result includes information for
  2264. // a particular tag only if it matches all the filters. If there's no match,
  2265. // no special message is returned.
  2266. //
  2267. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2268. // with awserr.Error's Code and Message methods to get detailed information about
  2269. // the error.
  2270. //
  2271. // See the AWS API reference guide for Auto Scaling's
  2272. // API operation DescribeTags for usage and error information.
  2273. //
  2274. // Returned Error Codes:
  2275. // * InvalidNextToken
  2276. // The NextToken value is not valid.
  2277. //
  2278. // * ResourceContention
  2279. // You already have a pending update to an Auto Scaling resource (for example,
  2280. // a group, instance, or load balancer).
  2281. //
  2282. func (c *AutoScaling) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
  2283. req, out := c.DescribeTagsRequest(input)
  2284. err := req.Send()
  2285. return out, err
  2286. }
  2287. // DescribeTagsPages iterates over the pages of a DescribeTags operation,
  2288. // calling the "fn" function with the response data for each page. To stop
  2289. // iterating, return false from the fn function.
  2290. //
  2291. // See DescribeTags method for more information on how to use this operation.
  2292. //
  2293. // Note: This operation can generate multiple requests to a service.
  2294. //
  2295. // // Example iterating over at most 3 pages of a DescribeTags operation.
  2296. // pageNum := 0
  2297. // err := client.DescribeTagsPages(params,
  2298. // func(page *DescribeTagsOutput, lastPage bool) bool {
  2299. // pageNum++
  2300. // fmt.Println(page)
  2301. // return pageNum <= 3
  2302. // })
  2303. //
  2304. func (c *AutoScaling) DescribeTagsPages(input *DescribeTagsInput, fn func(p *DescribeTagsOutput, lastPage bool) (shouldContinue bool)) error {
  2305. page, _ := c.DescribeTagsRequest(input)
  2306. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2307. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2308. return fn(p.(*DescribeTagsOutput), lastPage)
  2309. })
  2310. }
  2311. const opDescribeTerminationPolicyTypes = "DescribeTerminationPolicyTypes"
  2312. // DescribeTerminationPolicyTypesRequest generates a "aws/request.Request" representing the
  2313. // client's request for the DescribeTerminationPolicyTypes operation. The "output" return
  2314. // value can be used to capture response data after the request's "Send" method
  2315. // is called.
  2316. //
  2317. // See DescribeTerminationPolicyTypes for usage and error information.
  2318. //
  2319. // Creating a request object using this method should be used when you want to inject
  2320. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2321. // access properties on the request object before or after sending the request. If
  2322. // you just want the service response, call the DescribeTerminationPolicyTypes method directly
  2323. // instead.
  2324. //
  2325. // Note: You must call the "Send" method on the returned request object in order
  2326. // to execute the request.
  2327. //
  2328. // // Example sending a request using the DescribeTerminationPolicyTypesRequest method.
  2329. // req, resp := client.DescribeTerminationPolicyTypesRequest(params)
  2330. //
  2331. // err := req.Send()
  2332. // if err == nil { // resp is now filled
  2333. // fmt.Println(resp)
  2334. // }
  2335. //
  2336. func (c *AutoScaling) DescribeTerminationPolicyTypesRequest(input *DescribeTerminationPolicyTypesInput) (req *request.Request, output *DescribeTerminationPolicyTypesOutput) {
  2337. op := &request.Operation{
  2338. Name: opDescribeTerminationPolicyTypes,
  2339. HTTPMethod: "POST",
  2340. HTTPPath: "/",
  2341. }
  2342. if input == nil {
  2343. input = &DescribeTerminationPolicyTypesInput{}
  2344. }
  2345. req = c.newRequest(op, input, output)
  2346. output = &DescribeTerminationPolicyTypesOutput{}
  2347. req.Data = output
  2348. return
  2349. }
  2350. // DescribeTerminationPolicyTypes API operation for Auto Scaling.
  2351. //
  2352. // Describes the termination policies supported by Auto Scaling.
  2353. //
  2354. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2355. // with awserr.Error's Code and Message methods to get detailed information about
  2356. // the error.
  2357. //
  2358. // See the AWS API reference guide for Auto Scaling's
  2359. // API operation DescribeTerminationPolicyTypes for usage and error information.
  2360. //
  2361. // Returned Error Codes:
  2362. // * ResourceContention
  2363. // You already have a pending update to an Auto Scaling resource (for example,
  2364. // a group, instance, or load balancer).
  2365. //
  2366. func (c *AutoScaling) DescribeTerminationPolicyTypes(input *DescribeTerminationPolicyTypesInput) (*DescribeTerminationPolicyTypesOutput, error) {
  2367. req, out := c.DescribeTerminationPolicyTypesRequest(input)
  2368. err := req.Send()
  2369. return out, err
  2370. }
  2371. const opDetachInstances = "DetachInstances"
  2372. // DetachInstancesRequest generates a "aws/request.Request" representing the
  2373. // client's request for the DetachInstances operation. The "output" return
  2374. // value can be used to capture response data after the request's "Send" method
  2375. // is called.
  2376. //
  2377. // See DetachInstances for usage and error information.
  2378. //
  2379. // Creating a request object using this method should be used when you want to inject
  2380. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2381. // access properties on the request object before or after sending the request. If
  2382. // you just want the service response, call the DetachInstances method directly
  2383. // instead.
  2384. //
  2385. // Note: You must call the "Send" method on the returned request object in order
  2386. // to execute the request.
  2387. //
  2388. // // Example sending a request using the DetachInstancesRequest method.
  2389. // req, resp := client.DetachInstancesRequest(params)
  2390. //
  2391. // err := req.Send()
  2392. // if err == nil { // resp is now filled
  2393. // fmt.Println(resp)
  2394. // }
  2395. //
  2396. func (c *AutoScaling) DetachInstancesRequest(input *DetachInstancesInput) (req *request.Request, output *DetachInstancesOutput) {
  2397. op := &request.Operation{
  2398. Name: opDetachInstances,
  2399. HTTPMethod: "POST",
  2400. HTTPPath: "/",
  2401. }
  2402. if input == nil {
  2403. input = &DetachInstancesInput{}
  2404. }
  2405. req = c.newRequest(op, input, output)
  2406. output = &DetachInstancesOutput{}
  2407. req.Data = output
  2408. return
  2409. }
  2410. // DetachInstances API operation for Auto Scaling.
  2411. //
  2412. // Removes one or more instances from the specified Auto Scaling group.
  2413. //
  2414. // After the instances are detached, you can manage them independently from
  2415. // the rest of the Auto Scaling group.
  2416. //
  2417. // If you do not specify the option to decrement the desired capacity, Auto
  2418. // Scaling launches instances to replace the ones that are detached.
  2419. //
  2420. // If there is a Classic load balancer attached to the Auto Scaling group, the
  2421. // instances are deregistered from the load balancer. If there are target groups
  2422. // attached to the Auto Scaling group, the instances are deregistered from the
  2423. // target groups.
  2424. //
  2425. // For more information, see Detach EC2 Instances from Your Auto Scaling Group
  2426. // (http://docs.aws.amazon.com/autoscaling/latest/userguide/detach-instance-asg.html)
  2427. // in the Auto Scaling User Guide.
  2428. //
  2429. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2430. // with awserr.Error's Code and Message methods to get detailed information about
  2431. // the error.
  2432. //
  2433. // See the AWS API reference guide for Auto Scaling's
  2434. // API operation DetachInstances for usage and error information.
  2435. //
  2436. // Returned Error Codes:
  2437. // * ResourceContention
  2438. // You already have a pending update to an Auto Scaling resource (for example,
  2439. // a group, instance, or load balancer).
  2440. //
  2441. func (c *AutoScaling) DetachInstances(input *DetachInstancesInput) (*DetachInstancesOutput, error) {
  2442. req, out := c.DetachInstancesRequest(input)
  2443. err := req.Send()
  2444. return out, err
  2445. }
  2446. const opDetachLoadBalancerTargetGroups = "DetachLoadBalancerTargetGroups"
  2447. // DetachLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the
  2448. // client's request for the DetachLoadBalancerTargetGroups operation. The "output" return
  2449. // value can be used to capture response data after the request's "Send" method
  2450. // is called.
  2451. //
  2452. // See DetachLoadBalancerTargetGroups for usage and error information.
  2453. //
  2454. // Creating a request object using this method should be used when you want to inject
  2455. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2456. // access properties on the request object before or after sending the request. If
  2457. // you just want the service response, call the DetachLoadBalancerTargetGroups method directly
  2458. // instead.
  2459. //
  2460. // Note: You must call the "Send" method on the returned request object in order
  2461. // to execute the request.
  2462. //
  2463. // // Example sending a request using the DetachLoadBalancerTargetGroupsRequest method.
  2464. // req, resp := client.DetachLoadBalancerTargetGroupsRequest(params)
  2465. //
  2466. // err := req.Send()
  2467. // if err == nil { // resp is now filled
  2468. // fmt.Println(resp)
  2469. // }
  2470. //
  2471. func (c *AutoScaling) DetachLoadBalancerTargetGroupsRequest(input *DetachLoadBalancerTargetGroupsInput) (req *request.Request, output *DetachLoadBalancerTargetGroupsOutput) {
  2472. op := &request.Operation{
  2473. Name: opDetachLoadBalancerTargetGroups,
  2474. HTTPMethod: "POST",
  2475. HTTPPath: "/",
  2476. }
  2477. if input == nil {
  2478. input = &DetachLoadBalancerTargetGroupsInput{}
  2479. }
  2480. req = c.newRequest(op, input, output)
  2481. output = &DetachLoadBalancerTargetGroupsOutput{}
  2482. req.Data = output
  2483. return
  2484. }
  2485. // DetachLoadBalancerTargetGroups API operation for Auto Scaling.
  2486. //
  2487. // Detaches one or more target groups from the specified Auto Scaling group.
  2488. //
  2489. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2490. // with awserr.Error's Code and Message methods to get detailed information about
  2491. // the error.
  2492. //
  2493. // See the AWS API reference guide for Auto Scaling's
  2494. // API operation DetachLoadBalancerTargetGroups for usage and error information.
  2495. //
  2496. // Returned Error Codes:
  2497. // * ResourceContention
  2498. // You already have a pending update to an Auto Scaling resource (for example,
  2499. // a group, instance, or load balancer).
  2500. //
  2501. func (c *AutoScaling) DetachLoadBalancerTargetGroups(input *DetachLoadBalancerTargetGroupsInput) (*DetachLoadBalancerTargetGroupsOutput, error) {
  2502. req, out := c.DetachLoadBalancerTargetGroupsRequest(input)
  2503. err := req.Send()
  2504. return out, err
  2505. }
  2506. const opDetachLoadBalancers = "DetachLoadBalancers"
  2507. // DetachLoadBalancersRequest generates a "aws/request.Request" representing the
  2508. // client's request for the DetachLoadBalancers operation. The "output" return
  2509. // value can be used to capture response data after the request's "Send" method
  2510. // is called.
  2511. //
  2512. // See DetachLoadBalancers for usage and error information.
  2513. //
  2514. // Creating a request object using this method should be used when you want to inject
  2515. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2516. // access properties on the request object before or after sending the request. If
  2517. // you just want the service response, call the DetachLoadBalancers method directly
  2518. // instead.
  2519. //
  2520. // Note: You must call the "Send" method on the returned request object in order
  2521. // to execute the request.
  2522. //
  2523. // // Example sending a request using the DetachLoadBalancersRequest method.
  2524. // req, resp := client.DetachLoadBalancersRequest(params)
  2525. //
  2526. // err := req.Send()
  2527. // if err == nil { // resp is now filled
  2528. // fmt.Println(resp)
  2529. // }
  2530. //
  2531. func (c *AutoScaling) DetachLoadBalancersRequest(input *DetachLoadBalancersInput) (req *request.Request, output *DetachLoadBalancersOutput) {
  2532. op := &request.Operation{
  2533. Name: opDetachLoadBalancers,
  2534. HTTPMethod: "POST",
  2535. HTTPPath: "/",
  2536. }
  2537. if input == nil {
  2538. input = &DetachLoadBalancersInput{}
  2539. }
  2540. req = c.newRequest(op, input, output)
  2541. output = &DetachLoadBalancersOutput{}
  2542. req.Data = output
  2543. return
  2544. }
  2545. // DetachLoadBalancers API operation for Auto Scaling.
  2546. //
  2547. // Detaches one or more Classic load balancers from the specified Auto Scaling
  2548. // group.
  2549. //
  2550. // Note that this operation detaches only Classic load balancers. If you have
  2551. // Application load balancers, use DetachLoadBalancerTargetGroups instead.
  2552. //
  2553. // When you detach a load balancer, it enters the Removing state while deregistering
  2554. // the instances in the group. When all instances are deregistered, then you
  2555. // can no longer describe the load balancer using DescribeLoadBalancers. Note
  2556. // that the instances remain running.
  2557. //
  2558. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2559. // with awserr.Error's Code and Message methods to get detailed information about
  2560. // the error.
  2561. //
  2562. // See the AWS API reference guide for Auto Scaling's
  2563. // API operation DetachLoadBalancers for usage and error information.
  2564. //
  2565. // Returned Error Codes:
  2566. // * ResourceContention
  2567. // You already have a pending update to an Auto Scaling resource (for example,
  2568. // a group, instance, or load balancer).
  2569. //
  2570. func (c *AutoScaling) DetachLoadBalancers(input *DetachLoadBalancersInput) (*DetachLoadBalancersOutput, error) {
  2571. req, out := c.DetachLoadBalancersRequest(input)
  2572. err := req.Send()
  2573. return out, err
  2574. }
  2575. const opDisableMetricsCollection = "DisableMetricsCollection"
  2576. // DisableMetricsCollectionRequest generates a "aws/request.Request" representing the
  2577. // client's request for the DisableMetricsCollection operation. The "output" return
  2578. // value can be used to capture response data after the request's "Send" method
  2579. // is called.
  2580. //
  2581. // See DisableMetricsCollection for usage and error information.
  2582. //
  2583. // Creating a request object using this method should be used when you want to inject
  2584. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2585. // access properties on the request object before or after sending the request. If
  2586. // you just want the service response, call the DisableMetricsCollection method directly
  2587. // instead.
  2588. //
  2589. // Note: You must call the "Send" method on the returned request object in order
  2590. // to execute the request.
  2591. //
  2592. // // Example sending a request using the DisableMetricsCollectionRequest method.
  2593. // req, resp := client.DisableMetricsCollectionRequest(params)
  2594. //
  2595. // err := req.Send()
  2596. // if err == nil { // resp is now filled
  2597. // fmt.Println(resp)
  2598. // }
  2599. //
  2600. func (c *AutoScaling) DisableMetricsCollectionRequest(input *DisableMetricsCollectionInput) (req *request.Request, output *DisableMetricsCollectionOutput) {
  2601. op := &request.Operation{
  2602. Name: opDisableMetricsCollection,
  2603. HTTPMethod: "POST",
  2604. HTTPPath: "/",
  2605. }
  2606. if input == nil {
  2607. input = &DisableMetricsCollectionInput{}
  2608. }
  2609. req = c.newRequest(op, input, output)
  2610. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  2611. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2612. output = &DisableMetricsCollectionOutput{}
  2613. req.Data = output
  2614. return
  2615. }
  2616. // DisableMetricsCollection API operation for Auto Scaling.
  2617. //
  2618. // Disables group metrics for the specified Auto Scaling group.
  2619. //
  2620. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2621. // with awserr.Error's Code and Message methods to get detailed information about
  2622. // the error.
  2623. //
  2624. // See the AWS API reference guide for Auto Scaling's
  2625. // API operation DisableMetricsCollection for usage and error information.
  2626. //
  2627. // Returned Error Codes:
  2628. // * ResourceContention
  2629. // You already have a pending update to an Auto Scaling resource (for example,
  2630. // a group, instance, or load balancer).
  2631. //
  2632. func (c *AutoScaling) DisableMetricsCollection(input *DisableMetricsCollectionInput) (*DisableMetricsCollectionOutput, error) {
  2633. req, out := c.DisableMetricsCollectionRequest(input)
  2634. err := req.Send()
  2635. return out, err
  2636. }
  2637. const opEnableMetricsCollection = "EnableMetricsCollection"
  2638. // EnableMetricsCollectionRequest generates a "aws/request.Request" representing the
  2639. // client's request for the EnableMetricsCollection operation. The "output" return
  2640. // value can be used to capture response data after the request's "Send" method
  2641. // is called.
  2642. //
  2643. // See EnableMetricsCollection for usage and error information.
  2644. //
  2645. // Creating a request object using this method should be used when you want to inject
  2646. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2647. // access properties on the request object before or after sending the request. If
  2648. // you just want the service response, call the EnableMetricsCollection method directly
  2649. // instead.
  2650. //
  2651. // Note: You must call the "Send" method on the returned request object in order
  2652. // to execute the request.
  2653. //
  2654. // // Example sending a request using the EnableMetricsCollectionRequest method.
  2655. // req, resp := client.EnableMetricsCollectionRequest(params)
  2656. //
  2657. // err := req.Send()
  2658. // if err == nil { // resp is now filled
  2659. // fmt.Println(resp)
  2660. // }
  2661. //
  2662. func (c *AutoScaling) EnableMetricsCollectionRequest(input *EnableMetricsCollectionInput) (req *request.Request, output *EnableMetricsCollectionOutput) {
  2663. op := &request.Operation{
  2664. Name: opEnableMetricsCollection,
  2665. HTTPMethod: "POST",
  2666. HTTPPath: "/",
  2667. }
  2668. if input == nil {
  2669. input = &EnableMetricsCollectionInput{}
  2670. }
  2671. req = c.newRequest(op, input, output)
  2672. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  2673. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2674. output = &EnableMetricsCollectionOutput{}
  2675. req.Data = output
  2676. return
  2677. }
  2678. // EnableMetricsCollection API operation for Auto Scaling.
  2679. //
  2680. // Enables group metrics for the specified Auto Scaling group. For more information,
  2681. // see Monitoring Your Auto Scaling Groups and Instances (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-monitoring.html)
  2682. // in the Auto Scaling User Guide.
  2683. //
  2684. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2685. // with awserr.Error's Code and Message methods to get detailed information about
  2686. // the error.
  2687. //
  2688. // See the AWS API reference guide for Auto Scaling's
  2689. // API operation EnableMetricsCollection for usage and error information.
  2690. //
  2691. // Returned Error Codes:
  2692. // * ResourceContention
  2693. // You already have a pending update to an Auto Scaling resource (for example,
  2694. // a group, instance, or load balancer).
  2695. //
  2696. func (c *AutoScaling) EnableMetricsCollection(input *EnableMetricsCollectionInput) (*EnableMetricsCollectionOutput, error) {
  2697. req, out := c.EnableMetricsCollectionRequest(input)
  2698. err := req.Send()
  2699. return out, err
  2700. }
  2701. const opEnterStandby = "EnterStandby"
  2702. // EnterStandbyRequest generates a "aws/request.Request" representing the
  2703. // client's request for the EnterStandby operation. The "output" return
  2704. // value can be used to capture response data after the request's "Send" method
  2705. // is called.
  2706. //
  2707. // See EnterStandby for usage and error information.
  2708. //
  2709. // Creating a request object using this method should be used when you want to inject
  2710. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2711. // access properties on the request object before or after sending the request. If
  2712. // you just want the service response, call the EnterStandby method directly
  2713. // instead.
  2714. //
  2715. // Note: You must call the "Send" method on the returned request object in order
  2716. // to execute the request.
  2717. //
  2718. // // Example sending a request using the EnterStandbyRequest method.
  2719. // req, resp := client.EnterStandbyRequest(params)
  2720. //
  2721. // err := req.Send()
  2722. // if err == nil { // resp is now filled
  2723. // fmt.Println(resp)
  2724. // }
  2725. //
  2726. func (c *AutoScaling) EnterStandbyRequest(input *EnterStandbyInput) (req *request.Request, output *EnterStandbyOutput) {
  2727. op := &request.Operation{
  2728. Name: opEnterStandby,
  2729. HTTPMethod: "POST",
  2730. HTTPPath: "/",
  2731. }
  2732. if input == nil {
  2733. input = &EnterStandbyInput{}
  2734. }
  2735. req = c.newRequest(op, input, output)
  2736. output = &EnterStandbyOutput{}
  2737. req.Data = output
  2738. return
  2739. }
  2740. // EnterStandby API operation for Auto Scaling.
  2741. //
  2742. // Moves the specified instances into Standby mode.
  2743. //
  2744. // For more information, see Auto Scaling Lifecycle (http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroupLifecycle.html)
  2745. // in the Auto Scaling User Guide.
  2746. //
  2747. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2748. // with awserr.Error's Code and Message methods to get detailed information about
  2749. // the error.
  2750. //
  2751. // See the AWS API reference guide for Auto Scaling's
  2752. // API operation EnterStandby for usage and error information.
  2753. //
  2754. // Returned Error Codes:
  2755. // * ResourceContention
  2756. // You already have a pending update to an Auto Scaling resource (for example,
  2757. // a group, instance, or load balancer).
  2758. //
  2759. func (c *AutoScaling) EnterStandby(input *EnterStandbyInput) (*EnterStandbyOutput, error) {
  2760. req, out := c.EnterStandbyRequest(input)
  2761. err := req.Send()
  2762. return out, err
  2763. }
  2764. const opExecutePolicy = "ExecutePolicy"
  2765. // ExecutePolicyRequest generates a "aws/request.Request" representing the
  2766. // client's request for the ExecutePolicy operation. The "output" return
  2767. // value can be used to capture response data after the request's "Send" method
  2768. // is called.
  2769. //
  2770. // See ExecutePolicy for usage and error information.
  2771. //
  2772. // Creating a request object using this method should be used when you want to inject
  2773. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2774. // access properties on the request object before or after sending the request. If
  2775. // you just want the service response, call the ExecutePolicy method directly
  2776. // instead.
  2777. //
  2778. // Note: You must call the "Send" method on the returned request object in order
  2779. // to execute the request.
  2780. //
  2781. // // Example sending a request using the ExecutePolicyRequest method.
  2782. // req, resp := client.ExecutePolicyRequest(params)
  2783. //
  2784. // err := req.Send()
  2785. // if err == nil { // resp is now filled
  2786. // fmt.Println(resp)
  2787. // }
  2788. //
  2789. func (c *AutoScaling) ExecutePolicyRequest(input *ExecutePolicyInput) (req *request.Request, output *ExecutePolicyOutput) {
  2790. op := &request.Operation{
  2791. Name: opExecutePolicy,
  2792. HTTPMethod: "POST",
  2793. HTTPPath: "/",
  2794. }
  2795. if input == nil {
  2796. input = &ExecutePolicyInput{}
  2797. }
  2798. req = c.newRequest(op, input, output)
  2799. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  2800. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2801. output = &ExecutePolicyOutput{}
  2802. req.Data = output
  2803. return
  2804. }
  2805. // ExecutePolicy API operation for Auto Scaling.
  2806. //
  2807. // Executes the specified policy.
  2808. //
  2809. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2810. // with awserr.Error's Code and Message methods to get detailed information about
  2811. // the error.
  2812. //
  2813. // See the AWS API reference guide for Auto Scaling's
  2814. // API operation ExecutePolicy for usage and error information.
  2815. //
  2816. // Returned Error Codes:
  2817. // * ScalingActivityInProgress
  2818. // The operation can't be performed because there are scaling activities in
  2819. // progress.
  2820. //
  2821. // * ResourceContention
  2822. // You already have a pending update to an Auto Scaling resource (for example,
  2823. // a group, instance, or load balancer).
  2824. //
  2825. func (c *AutoScaling) ExecutePolicy(input *ExecutePolicyInput) (*ExecutePolicyOutput, error) {
  2826. req, out := c.ExecutePolicyRequest(input)
  2827. err := req.Send()
  2828. return out, err
  2829. }
  2830. const opExitStandby = "ExitStandby"
  2831. // ExitStandbyRequest generates a "aws/request.Request" representing the
  2832. // client's request for the ExitStandby operation. The "output" return
  2833. // value can be used to capture response data after the request's "Send" method
  2834. // is called.
  2835. //
  2836. // See ExitStandby for usage and error information.
  2837. //
  2838. // Creating a request object using this method should be used when you want to inject
  2839. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2840. // access properties on the request object before or after sending the request. If
  2841. // you just want the service response, call the ExitStandby method directly
  2842. // instead.
  2843. //
  2844. // Note: You must call the "Send" method on the returned request object in order
  2845. // to execute the request.
  2846. //
  2847. // // Example sending a request using the ExitStandbyRequest method.
  2848. // req, resp := client.ExitStandbyRequest(params)
  2849. //
  2850. // err := req.Send()
  2851. // if err == nil { // resp is now filled
  2852. // fmt.Println(resp)
  2853. // }
  2854. //
  2855. func (c *AutoScaling) ExitStandbyRequest(input *ExitStandbyInput) (req *request.Request, output *ExitStandbyOutput) {
  2856. op := &request.Operation{
  2857. Name: opExitStandby,
  2858. HTTPMethod: "POST",
  2859. HTTPPath: "/",
  2860. }
  2861. if input == nil {
  2862. input = &ExitStandbyInput{}
  2863. }
  2864. req = c.newRequest(op, input, output)
  2865. output = &ExitStandbyOutput{}
  2866. req.Data = output
  2867. return
  2868. }
  2869. // ExitStandby API operation for Auto Scaling.
  2870. //
  2871. // Moves the specified instances out of Standby mode.
  2872. //
  2873. // For more information, see Auto Scaling Lifecycle (http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroupLifecycle.html)
  2874. // in the Auto Scaling User Guide.
  2875. //
  2876. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2877. // with awserr.Error's Code and Message methods to get detailed information about
  2878. // the error.
  2879. //
  2880. // See the AWS API reference guide for Auto Scaling's
  2881. // API operation ExitStandby for usage and error information.
  2882. //
  2883. // Returned Error Codes:
  2884. // * ResourceContention
  2885. // You already have a pending update to an Auto Scaling resource (for example,
  2886. // a group, instance, or load balancer).
  2887. //
  2888. func (c *AutoScaling) ExitStandby(input *ExitStandbyInput) (*ExitStandbyOutput, error) {
  2889. req, out := c.ExitStandbyRequest(input)
  2890. err := req.Send()
  2891. return out, err
  2892. }
  2893. const opPutLifecycleHook = "PutLifecycleHook"
  2894. // PutLifecycleHookRequest generates a "aws/request.Request" representing the
  2895. // client's request for the PutLifecycleHook operation. The "output" return
  2896. // value can be used to capture response data after the request's "Send" method
  2897. // is called.
  2898. //
  2899. // See PutLifecycleHook for usage and error information.
  2900. //
  2901. // Creating a request object using this method should be used when you want to inject
  2902. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2903. // access properties on the request object before or after sending the request. If
  2904. // you just want the service response, call the PutLifecycleHook method directly
  2905. // instead.
  2906. //
  2907. // Note: You must call the "Send" method on the returned request object in order
  2908. // to execute the request.
  2909. //
  2910. // // Example sending a request using the PutLifecycleHookRequest method.
  2911. // req, resp := client.PutLifecycleHookRequest(params)
  2912. //
  2913. // err := req.Send()
  2914. // if err == nil { // resp is now filled
  2915. // fmt.Println(resp)
  2916. // }
  2917. //
  2918. func (c *AutoScaling) PutLifecycleHookRequest(input *PutLifecycleHookInput) (req *request.Request, output *PutLifecycleHookOutput) {
  2919. op := &request.Operation{
  2920. Name: opPutLifecycleHook,
  2921. HTTPMethod: "POST",
  2922. HTTPPath: "/",
  2923. }
  2924. if input == nil {
  2925. input = &PutLifecycleHookInput{}
  2926. }
  2927. req = c.newRequest(op, input, output)
  2928. output = &PutLifecycleHookOutput{}
  2929. req.Data = output
  2930. return
  2931. }
  2932. // PutLifecycleHook API operation for Auto Scaling.
  2933. //
  2934. // Creates or updates a lifecycle hook for the specified Auto Scaling Group.
  2935. //
  2936. // A lifecycle hook tells Auto Scaling that you want to perform an action on
  2937. // an instance that is not actively in service; for example, either when the
  2938. // instance launches or before the instance terminates.
  2939. //
  2940. // This step is a part of the procedure for adding a lifecycle hook to an Auto
  2941. // Scaling group:
  2942. //
  2943. // (Optional) Create a Lambda function and a rule that allows CloudWatch Events
  2944. // to invoke your Lambda function when Auto Scaling launches or terminates instances.
  2945. //
  2946. // (Optional) Create a notification target and an IAM role. The target can be
  2947. // either an Amazon SQS queue or an Amazon SNS topic. The role allows Auto Scaling
  2948. // to publish lifecycle notifications to the target.
  2949. //
  2950. // Create the lifecycle hook. Specify whether the hook is used when the instances
  2951. // launch or terminate.
  2952. //
  2953. // If you need more time, record the lifecycle action heartbeat to keep the
  2954. // instance in a pending state.
  2955. //
  2956. // If you finish before the timeout period ends, complete the lifecycle action.
  2957. //
  2958. // For more information, see Auto Scaling Lifecycle Hooks (http://docs.aws.amazon.com/autoscaling/latest/userguide/lifecycle-hooks.html)
  2959. // in the Auto Scaling User Guide.
  2960. //
  2961. // If you exceed your maximum limit of lifecycle hooks, which by default is
  2962. // 50 per Auto Scaling group, the call fails. For information about updating
  2963. // this limit, see AWS Service Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html)
  2964. // in the Amazon Web Services General Reference.
  2965. //
  2966. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2967. // with awserr.Error's Code and Message methods to get detailed information about
  2968. // the error.
  2969. //
  2970. // See the AWS API reference guide for Auto Scaling's
  2971. // API operation PutLifecycleHook for usage and error information.
  2972. //
  2973. // Returned Error Codes:
  2974. // * LimitExceeded
  2975. // You have already reached a limit for your Auto Scaling resources (for example,
  2976. // groups, launch configurations, or lifecycle hooks). For more information,
  2977. // see DescribeAccountLimits.
  2978. //
  2979. // * ResourceContention
  2980. // You already have a pending update to an Auto Scaling resource (for example,
  2981. // a group, instance, or load balancer).
  2982. //
  2983. func (c *AutoScaling) PutLifecycleHook(input *PutLifecycleHookInput) (*PutLifecycleHookOutput, error) {
  2984. req, out := c.PutLifecycleHookRequest(input)
  2985. err := req.Send()
  2986. return out, err
  2987. }
  2988. const opPutNotificationConfiguration = "PutNotificationConfiguration"
  2989. // PutNotificationConfigurationRequest generates a "aws/request.Request" representing the
  2990. // client's request for the PutNotificationConfiguration operation. The "output" return
  2991. // value can be used to capture response data after the request's "Send" method
  2992. // is called.
  2993. //
  2994. // See PutNotificationConfiguration for usage and error information.
  2995. //
  2996. // Creating a request object using this method should be used when you want to inject
  2997. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2998. // access properties on the request object before or after sending the request. If
  2999. // you just want the service response, call the PutNotificationConfiguration method directly
  3000. // instead.
  3001. //
  3002. // Note: You must call the "Send" method on the returned request object in order
  3003. // to execute the request.
  3004. //
  3005. // // Example sending a request using the PutNotificationConfigurationRequest method.
  3006. // req, resp := client.PutNotificationConfigurationRequest(params)
  3007. //
  3008. // err := req.Send()
  3009. // if err == nil { // resp is now filled
  3010. // fmt.Println(resp)
  3011. // }
  3012. //
  3013. func (c *AutoScaling) PutNotificationConfigurationRequest(input *PutNotificationConfigurationInput) (req *request.Request, output *PutNotificationConfigurationOutput) {
  3014. op := &request.Operation{
  3015. Name: opPutNotificationConfiguration,
  3016. HTTPMethod: "POST",
  3017. HTTPPath: "/",
  3018. }
  3019. if input == nil {
  3020. input = &PutNotificationConfigurationInput{}
  3021. }
  3022. req = c.newRequest(op, input, output)
  3023. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  3024. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3025. output = &PutNotificationConfigurationOutput{}
  3026. req.Data = output
  3027. return
  3028. }
  3029. // PutNotificationConfiguration API operation for Auto Scaling.
  3030. //
  3031. // Configures an Auto Scaling group to send notifications when specified events
  3032. // take place. Subscribers to the specified topic can have messages delivered
  3033. // to an endpoint such as a web server or an email address.
  3034. //
  3035. // This configuration overwrites any existing configuration.
  3036. //
  3037. // For more information see Getting SNS Notifications When Your Auto Scaling
  3038. // Group Scales (http://docs.aws.amazon.com/autoscaling/latest/userguide/ASGettingNotifications.html)
  3039. // in the Auto Scaling User Guide.
  3040. //
  3041. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3042. // with awserr.Error's Code and Message methods to get detailed information about
  3043. // the error.
  3044. //
  3045. // See the AWS API reference guide for Auto Scaling's
  3046. // API operation PutNotificationConfiguration for usage and error information.
  3047. //
  3048. // Returned Error Codes:
  3049. // * LimitExceeded
  3050. // You have already reached a limit for your Auto Scaling resources (for example,
  3051. // groups, launch configurations, or lifecycle hooks). For more information,
  3052. // see DescribeAccountLimits.
  3053. //
  3054. // * ResourceContention
  3055. // You already have a pending update to an Auto Scaling resource (for example,
  3056. // a group, instance, or load balancer).
  3057. //
  3058. func (c *AutoScaling) PutNotificationConfiguration(input *PutNotificationConfigurationInput) (*PutNotificationConfigurationOutput, error) {
  3059. req, out := c.PutNotificationConfigurationRequest(input)
  3060. err := req.Send()
  3061. return out, err
  3062. }
  3063. const opPutScalingPolicy = "PutScalingPolicy"
  3064. // PutScalingPolicyRequest generates a "aws/request.Request" representing the
  3065. // client's request for the PutScalingPolicy operation. The "output" return
  3066. // value can be used to capture response data after the request's "Send" method
  3067. // is called.
  3068. //
  3069. // See PutScalingPolicy for usage and error information.
  3070. //
  3071. // Creating a request object using this method should be used when you want to inject
  3072. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3073. // access properties on the request object before or after sending the request. If
  3074. // you just want the service response, call the PutScalingPolicy method directly
  3075. // instead.
  3076. //
  3077. // Note: You must call the "Send" method on the returned request object in order
  3078. // to execute the request.
  3079. //
  3080. // // Example sending a request using the PutScalingPolicyRequest method.
  3081. // req, resp := client.PutScalingPolicyRequest(params)
  3082. //
  3083. // err := req.Send()
  3084. // if err == nil { // resp is now filled
  3085. // fmt.Println(resp)
  3086. // }
  3087. //
  3088. func (c *AutoScaling) PutScalingPolicyRequest(input *PutScalingPolicyInput) (req *request.Request, output *PutScalingPolicyOutput) {
  3089. op := &request.Operation{
  3090. Name: opPutScalingPolicy,
  3091. HTTPMethod: "POST",
  3092. HTTPPath: "/",
  3093. }
  3094. if input == nil {
  3095. input = &PutScalingPolicyInput{}
  3096. }
  3097. req = c.newRequest(op, input, output)
  3098. output = &PutScalingPolicyOutput{}
  3099. req.Data = output
  3100. return
  3101. }
  3102. // PutScalingPolicy API operation for Auto Scaling.
  3103. //
  3104. // Creates or updates a policy for an Auto Scaling group. To update an existing
  3105. // policy, use the existing policy name and set the parameters you want to change.
  3106. // Any existing parameter not changed in an update to an existing policy is
  3107. // not changed in this update request.
  3108. //
  3109. // If you exceed your maximum limit of step adjustments, which by default is
  3110. // 20 per region, the call fails. For information about updating this limit,
  3111. // see AWS Service Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html)
  3112. // in the Amazon Web Services General Reference.
  3113. //
  3114. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3115. // with awserr.Error's Code and Message methods to get detailed information about
  3116. // the error.
  3117. //
  3118. // See the AWS API reference guide for Auto Scaling's
  3119. // API operation PutScalingPolicy for usage and error information.
  3120. //
  3121. // Returned Error Codes:
  3122. // * LimitExceeded
  3123. // You have already reached a limit for your Auto Scaling resources (for example,
  3124. // groups, launch configurations, or lifecycle hooks). For more information,
  3125. // see DescribeAccountLimits.
  3126. //
  3127. // * ResourceContention
  3128. // You already have a pending update to an Auto Scaling resource (for example,
  3129. // a group, instance, or load balancer).
  3130. //
  3131. func (c *AutoScaling) PutScalingPolicy(input *PutScalingPolicyInput) (*PutScalingPolicyOutput, error) {
  3132. req, out := c.PutScalingPolicyRequest(input)
  3133. err := req.Send()
  3134. return out, err
  3135. }
  3136. const opPutScheduledUpdateGroupAction = "PutScheduledUpdateGroupAction"
  3137. // PutScheduledUpdateGroupActionRequest generates a "aws/request.Request" representing the
  3138. // client's request for the PutScheduledUpdateGroupAction operation. The "output" return
  3139. // value can be used to capture response data after the request's "Send" method
  3140. // is called.
  3141. //
  3142. // See PutScheduledUpdateGroupAction for usage and error information.
  3143. //
  3144. // Creating a request object using this method should be used when you want to inject
  3145. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3146. // access properties on the request object before or after sending the request. If
  3147. // you just want the service response, call the PutScheduledUpdateGroupAction method directly
  3148. // instead.
  3149. //
  3150. // Note: You must call the "Send" method on the returned request object in order
  3151. // to execute the request.
  3152. //
  3153. // // Example sending a request using the PutScheduledUpdateGroupActionRequest method.
  3154. // req, resp := client.PutScheduledUpdateGroupActionRequest(params)
  3155. //
  3156. // err := req.Send()
  3157. // if err == nil { // resp is now filled
  3158. // fmt.Println(resp)
  3159. // }
  3160. //
  3161. func (c *AutoScaling) PutScheduledUpdateGroupActionRequest(input *PutScheduledUpdateGroupActionInput) (req *request.Request, output *PutScheduledUpdateGroupActionOutput) {
  3162. op := &request.Operation{
  3163. Name: opPutScheduledUpdateGroupAction,
  3164. HTTPMethod: "POST",
  3165. HTTPPath: "/",
  3166. }
  3167. if input == nil {
  3168. input = &PutScheduledUpdateGroupActionInput{}
  3169. }
  3170. req = c.newRequest(op, input, output)
  3171. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  3172. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3173. output = &PutScheduledUpdateGroupActionOutput{}
  3174. req.Data = output
  3175. return
  3176. }
  3177. // PutScheduledUpdateGroupAction API operation for Auto Scaling.
  3178. //
  3179. // Creates or updates a scheduled scaling action for an Auto Scaling group.
  3180. // When updating a scheduled scaling action, if you leave a parameter unspecified,
  3181. // the corresponding value remains unchanged.
  3182. //
  3183. // For more information, see Scheduled Scaling (http://docs.aws.amazon.com/autoscaling/latest/userguide/schedule_time.html)
  3184. // in the Auto Scaling User Guide.
  3185. //
  3186. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3187. // with awserr.Error's Code and Message methods to get detailed information about
  3188. // the error.
  3189. //
  3190. // See the AWS API reference guide for Auto Scaling's
  3191. // API operation PutScheduledUpdateGroupAction for usage and error information.
  3192. //
  3193. // Returned Error Codes:
  3194. // * AlreadyExists
  3195. // You already have an Auto Scaling group or launch configuration with this
  3196. // name.
  3197. //
  3198. // * LimitExceeded
  3199. // You have already reached a limit for your Auto Scaling resources (for example,
  3200. // groups, launch configurations, or lifecycle hooks). For more information,
  3201. // see DescribeAccountLimits.
  3202. //
  3203. // * ResourceContention
  3204. // You already have a pending update to an Auto Scaling resource (for example,
  3205. // a group, instance, or load balancer).
  3206. //
  3207. func (c *AutoScaling) PutScheduledUpdateGroupAction(input *PutScheduledUpdateGroupActionInput) (*PutScheduledUpdateGroupActionOutput, error) {
  3208. req, out := c.PutScheduledUpdateGroupActionRequest(input)
  3209. err := req.Send()
  3210. return out, err
  3211. }
  3212. const opRecordLifecycleActionHeartbeat = "RecordLifecycleActionHeartbeat"
  3213. // RecordLifecycleActionHeartbeatRequest generates a "aws/request.Request" representing the
  3214. // client's request for the RecordLifecycleActionHeartbeat operation. The "output" return
  3215. // value can be used to capture response data after the request's "Send" method
  3216. // is called.
  3217. //
  3218. // See RecordLifecycleActionHeartbeat for usage and error information.
  3219. //
  3220. // Creating a request object using this method should be used when you want to inject
  3221. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3222. // access properties on the request object before or after sending the request. If
  3223. // you just want the service response, call the RecordLifecycleActionHeartbeat method directly
  3224. // instead.
  3225. //
  3226. // Note: You must call the "Send" method on the returned request object in order
  3227. // to execute the request.
  3228. //
  3229. // // Example sending a request using the RecordLifecycleActionHeartbeatRequest method.
  3230. // req, resp := client.RecordLifecycleActionHeartbeatRequest(params)
  3231. //
  3232. // err := req.Send()
  3233. // if err == nil { // resp is now filled
  3234. // fmt.Println(resp)
  3235. // }
  3236. //
  3237. func (c *AutoScaling) RecordLifecycleActionHeartbeatRequest(input *RecordLifecycleActionHeartbeatInput) (req *request.Request, output *RecordLifecycleActionHeartbeatOutput) {
  3238. op := &request.Operation{
  3239. Name: opRecordLifecycleActionHeartbeat,
  3240. HTTPMethod: "POST",
  3241. HTTPPath: "/",
  3242. }
  3243. if input == nil {
  3244. input = &RecordLifecycleActionHeartbeatInput{}
  3245. }
  3246. req = c.newRequest(op, input, output)
  3247. output = &RecordLifecycleActionHeartbeatOutput{}
  3248. req.Data = output
  3249. return
  3250. }
  3251. // RecordLifecycleActionHeartbeat API operation for Auto Scaling.
  3252. //
  3253. // Records a heartbeat for the lifecycle action associated with the specified
  3254. // token or instance. This extends the timeout by the length of time defined
  3255. // using PutLifecycleHook.
  3256. //
  3257. // This step is a part of the procedure for adding a lifecycle hook to an Auto
  3258. // Scaling group:
  3259. //
  3260. // (Optional) Create a Lambda function and a rule that allows CloudWatch Events
  3261. // to invoke your Lambda function when Auto Scaling launches or terminates instances.
  3262. //
  3263. // (Optional) Create a notification target and an IAM role. The target can be
  3264. // either an Amazon SQS queue or an Amazon SNS topic. The role allows Auto Scaling
  3265. // to publish lifecycle notifications to the target.
  3266. //
  3267. // Create the lifecycle hook. Specify whether the hook is used when the instances
  3268. // launch or terminate.
  3269. //
  3270. // If you need more time, record the lifecycle action heartbeat to keep the
  3271. // instance in a pending state.
  3272. //
  3273. // If you finish before the timeout period ends, complete the lifecycle action.
  3274. //
  3275. // For more information, see Auto Scaling Lifecycle (http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroupLifecycle.html)
  3276. // in the Auto Scaling User Guide.
  3277. //
  3278. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3279. // with awserr.Error's Code and Message methods to get detailed information about
  3280. // the error.
  3281. //
  3282. // See the AWS API reference guide for Auto Scaling's
  3283. // API operation RecordLifecycleActionHeartbeat for usage and error information.
  3284. //
  3285. // Returned Error Codes:
  3286. // * ResourceContention
  3287. // You already have a pending update to an Auto Scaling resource (for example,
  3288. // a group, instance, or load balancer).
  3289. //
  3290. func (c *AutoScaling) RecordLifecycleActionHeartbeat(input *RecordLifecycleActionHeartbeatInput) (*RecordLifecycleActionHeartbeatOutput, error) {
  3291. req, out := c.RecordLifecycleActionHeartbeatRequest(input)
  3292. err := req.Send()
  3293. return out, err
  3294. }
  3295. const opResumeProcesses = "ResumeProcesses"
  3296. // ResumeProcessesRequest generates a "aws/request.Request" representing the
  3297. // client's request for the ResumeProcesses operation. The "output" return
  3298. // value can be used to capture response data after the request's "Send" method
  3299. // is called.
  3300. //
  3301. // See ResumeProcesses for usage and error information.
  3302. //
  3303. // Creating a request object using this method should be used when you want to inject
  3304. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3305. // access properties on the request object before or after sending the request. If
  3306. // you just want the service response, call the ResumeProcesses method directly
  3307. // instead.
  3308. //
  3309. // Note: You must call the "Send" method on the returned request object in order
  3310. // to execute the request.
  3311. //
  3312. // // Example sending a request using the ResumeProcessesRequest method.
  3313. // req, resp := client.ResumeProcessesRequest(params)
  3314. //
  3315. // err := req.Send()
  3316. // if err == nil { // resp is now filled
  3317. // fmt.Println(resp)
  3318. // }
  3319. //
  3320. func (c *AutoScaling) ResumeProcessesRequest(input *ScalingProcessQuery) (req *request.Request, output *ResumeProcessesOutput) {
  3321. op := &request.Operation{
  3322. Name: opResumeProcesses,
  3323. HTTPMethod: "POST",
  3324. HTTPPath: "/",
  3325. }
  3326. if input == nil {
  3327. input = &ScalingProcessQuery{}
  3328. }
  3329. req = c.newRequest(op, input, output)
  3330. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  3331. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3332. output = &ResumeProcessesOutput{}
  3333. req.Data = output
  3334. return
  3335. }
  3336. // ResumeProcesses API operation for Auto Scaling.
  3337. //
  3338. // Resumes the specified suspended Auto Scaling processes, or all suspended
  3339. // process, for the specified Auto Scaling group.
  3340. //
  3341. // For more information, see Suspending and Resuming Auto Scaling Processes
  3342. // (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-suspend-resume-processes.html)
  3343. // in the Auto Scaling User Guide.
  3344. //
  3345. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3346. // with awserr.Error's Code and Message methods to get detailed information about
  3347. // the error.
  3348. //
  3349. // See the AWS API reference guide for Auto Scaling's
  3350. // API operation ResumeProcesses for usage and error information.
  3351. //
  3352. // Returned Error Codes:
  3353. // * ResourceInUse
  3354. // The operation can't be performed because the resource is in use.
  3355. //
  3356. // * ResourceContention
  3357. // You already have a pending update to an Auto Scaling resource (for example,
  3358. // a group, instance, or load balancer).
  3359. //
  3360. func (c *AutoScaling) ResumeProcesses(input *ScalingProcessQuery) (*ResumeProcessesOutput, error) {
  3361. req, out := c.ResumeProcessesRequest(input)
  3362. err := req.Send()
  3363. return out, err
  3364. }
  3365. const opSetDesiredCapacity = "SetDesiredCapacity"
  3366. // SetDesiredCapacityRequest generates a "aws/request.Request" representing the
  3367. // client's request for the SetDesiredCapacity operation. The "output" return
  3368. // value can be used to capture response data after the request's "Send" method
  3369. // is called.
  3370. //
  3371. // See SetDesiredCapacity for usage and error information.
  3372. //
  3373. // Creating a request object using this method should be used when you want to inject
  3374. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3375. // access properties on the request object before or after sending the request. If
  3376. // you just want the service response, call the SetDesiredCapacity method directly
  3377. // instead.
  3378. //
  3379. // Note: You must call the "Send" method on the returned request object in order
  3380. // to execute the request.
  3381. //
  3382. // // Example sending a request using the SetDesiredCapacityRequest method.
  3383. // req, resp := client.SetDesiredCapacityRequest(params)
  3384. //
  3385. // err := req.Send()
  3386. // if err == nil { // resp is now filled
  3387. // fmt.Println(resp)
  3388. // }
  3389. //
  3390. func (c *AutoScaling) SetDesiredCapacityRequest(input *SetDesiredCapacityInput) (req *request.Request, output *SetDesiredCapacityOutput) {
  3391. op := &request.Operation{
  3392. Name: opSetDesiredCapacity,
  3393. HTTPMethod: "POST",
  3394. HTTPPath: "/",
  3395. }
  3396. if input == nil {
  3397. input = &SetDesiredCapacityInput{}
  3398. }
  3399. req = c.newRequest(op, input, output)
  3400. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  3401. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3402. output = &SetDesiredCapacityOutput{}
  3403. req.Data = output
  3404. return
  3405. }
  3406. // SetDesiredCapacity API operation for Auto Scaling.
  3407. //
  3408. // Sets the size of the specified Auto Scaling group.
  3409. //
  3410. // For more information about desired capacity, see What Is Auto Scaling? (http://docs.aws.amazon.com/autoscaling/latest/userguide/WhatIsAutoScaling.html)
  3411. // in the Auto Scaling User Guide.
  3412. //
  3413. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3414. // with awserr.Error's Code and Message methods to get detailed information about
  3415. // the error.
  3416. //
  3417. // See the AWS API reference guide for Auto Scaling's
  3418. // API operation SetDesiredCapacity for usage and error information.
  3419. //
  3420. // Returned Error Codes:
  3421. // * ScalingActivityInProgress
  3422. // The operation can't be performed because there are scaling activities in
  3423. // progress.
  3424. //
  3425. // * ResourceContention
  3426. // You already have a pending update to an Auto Scaling resource (for example,
  3427. // a group, instance, or load balancer).
  3428. //
  3429. func (c *AutoScaling) SetDesiredCapacity(input *SetDesiredCapacityInput) (*SetDesiredCapacityOutput, error) {
  3430. req, out := c.SetDesiredCapacityRequest(input)
  3431. err := req.Send()
  3432. return out, err
  3433. }
  3434. const opSetInstanceHealth = "SetInstanceHealth"
  3435. // SetInstanceHealthRequest generates a "aws/request.Request" representing the
  3436. // client's request for the SetInstanceHealth operation. The "output" return
  3437. // value can be used to capture response data after the request's "Send" method
  3438. // is called.
  3439. //
  3440. // See SetInstanceHealth for usage and error information.
  3441. //
  3442. // Creating a request object using this method should be used when you want to inject
  3443. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3444. // access properties on the request object before or after sending the request. If
  3445. // you just want the service response, call the SetInstanceHealth method directly
  3446. // instead.
  3447. //
  3448. // Note: You must call the "Send" method on the returned request object in order
  3449. // to execute the request.
  3450. //
  3451. // // Example sending a request using the SetInstanceHealthRequest method.
  3452. // req, resp := client.SetInstanceHealthRequest(params)
  3453. //
  3454. // err := req.Send()
  3455. // if err == nil { // resp is now filled
  3456. // fmt.Println(resp)
  3457. // }
  3458. //
  3459. func (c *AutoScaling) SetInstanceHealthRequest(input *SetInstanceHealthInput) (req *request.Request, output *SetInstanceHealthOutput) {
  3460. op := &request.Operation{
  3461. Name: opSetInstanceHealth,
  3462. HTTPMethod: "POST",
  3463. HTTPPath: "/",
  3464. }
  3465. if input == nil {
  3466. input = &SetInstanceHealthInput{}
  3467. }
  3468. req = c.newRequest(op, input, output)
  3469. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  3470. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3471. output = &SetInstanceHealthOutput{}
  3472. req.Data = output
  3473. return
  3474. }
  3475. // SetInstanceHealth API operation for Auto Scaling.
  3476. //
  3477. // Sets the health status of the specified instance.
  3478. //
  3479. // For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/latest/userguide/healthcheck.html)
  3480. // in the Auto Scaling User Guide.
  3481. //
  3482. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3483. // with awserr.Error's Code and Message methods to get detailed information about
  3484. // the error.
  3485. //
  3486. // See the AWS API reference guide for Auto Scaling's
  3487. // API operation SetInstanceHealth for usage and error information.
  3488. //
  3489. // Returned Error Codes:
  3490. // * ResourceContention
  3491. // You already have a pending update to an Auto Scaling resource (for example,
  3492. // a group, instance, or load balancer).
  3493. //
  3494. func (c *AutoScaling) SetInstanceHealth(input *SetInstanceHealthInput) (*SetInstanceHealthOutput, error) {
  3495. req, out := c.SetInstanceHealthRequest(input)
  3496. err := req.Send()
  3497. return out, err
  3498. }
  3499. const opSetInstanceProtection = "SetInstanceProtection"
  3500. // SetInstanceProtectionRequest generates a "aws/request.Request" representing the
  3501. // client's request for the SetInstanceProtection operation. The "output" return
  3502. // value can be used to capture response data after the request's "Send" method
  3503. // is called.
  3504. //
  3505. // See SetInstanceProtection for usage and error information.
  3506. //
  3507. // Creating a request object using this method should be used when you want to inject
  3508. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3509. // access properties on the request object before or after sending the request. If
  3510. // you just want the service response, call the SetInstanceProtection method directly
  3511. // instead.
  3512. //
  3513. // Note: You must call the "Send" method on the returned request object in order
  3514. // to execute the request.
  3515. //
  3516. // // Example sending a request using the SetInstanceProtectionRequest method.
  3517. // req, resp := client.SetInstanceProtectionRequest(params)
  3518. //
  3519. // err := req.Send()
  3520. // if err == nil { // resp is now filled
  3521. // fmt.Println(resp)
  3522. // }
  3523. //
  3524. func (c *AutoScaling) SetInstanceProtectionRequest(input *SetInstanceProtectionInput) (req *request.Request, output *SetInstanceProtectionOutput) {
  3525. op := &request.Operation{
  3526. Name: opSetInstanceProtection,
  3527. HTTPMethod: "POST",
  3528. HTTPPath: "/",
  3529. }
  3530. if input == nil {
  3531. input = &SetInstanceProtectionInput{}
  3532. }
  3533. req = c.newRequest(op, input, output)
  3534. output = &SetInstanceProtectionOutput{}
  3535. req.Data = output
  3536. return
  3537. }
  3538. // SetInstanceProtection API operation for Auto Scaling.
  3539. //
  3540. // Updates the instance protection settings of the specified instances.
  3541. //
  3542. // For more information, see Instance Protection (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-termination.html#instance-protection)
  3543. // in the Auto Scaling User Guide.
  3544. //
  3545. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3546. // with awserr.Error's Code and Message methods to get detailed information about
  3547. // the error.
  3548. //
  3549. // See the AWS API reference guide for Auto Scaling's
  3550. // API operation SetInstanceProtection for usage and error information.
  3551. //
  3552. // Returned Error Codes:
  3553. // * LimitExceeded
  3554. // You have already reached a limit for your Auto Scaling resources (for example,
  3555. // groups, launch configurations, or lifecycle hooks). For more information,
  3556. // see DescribeAccountLimits.
  3557. //
  3558. // * ResourceContention
  3559. // You already have a pending update to an Auto Scaling resource (for example,
  3560. // a group, instance, or load balancer).
  3561. //
  3562. func (c *AutoScaling) SetInstanceProtection(input *SetInstanceProtectionInput) (*SetInstanceProtectionOutput, error) {
  3563. req, out := c.SetInstanceProtectionRequest(input)
  3564. err := req.Send()
  3565. return out, err
  3566. }
  3567. const opSuspendProcesses = "SuspendProcesses"
  3568. // SuspendProcessesRequest generates a "aws/request.Request" representing the
  3569. // client's request for the SuspendProcesses operation. The "output" return
  3570. // value can be used to capture response data after the request's "Send" method
  3571. // is called.
  3572. //
  3573. // See SuspendProcesses for usage and error information.
  3574. //
  3575. // Creating a request object using this method should be used when you want to inject
  3576. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3577. // access properties on the request object before or after sending the request. If
  3578. // you just want the service response, call the SuspendProcesses method directly
  3579. // instead.
  3580. //
  3581. // Note: You must call the "Send" method on the returned request object in order
  3582. // to execute the request.
  3583. //
  3584. // // Example sending a request using the SuspendProcessesRequest method.
  3585. // req, resp := client.SuspendProcessesRequest(params)
  3586. //
  3587. // err := req.Send()
  3588. // if err == nil { // resp is now filled
  3589. // fmt.Println(resp)
  3590. // }
  3591. //
  3592. func (c *AutoScaling) SuspendProcessesRequest(input *ScalingProcessQuery) (req *request.Request, output *SuspendProcessesOutput) {
  3593. op := &request.Operation{
  3594. Name: opSuspendProcesses,
  3595. HTTPMethod: "POST",
  3596. HTTPPath: "/",
  3597. }
  3598. if input == nil {
  3599. input = &ScalingProcessQuery{}
  3600. }
  3601. req = c.newRequest(op, input, output)
  3602. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  3603. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3604. output = &SuspendProcessesOutput{}
  3605. req.Data = output
  3606. return
  3607. }
  3608. // SuspendProcesses API operation for Auto Scaling.
  3609. //
  3610. // Suspends the specified Auto Scaling processes, or all processes, for the
  3611. // specified Auto Scaling group.
  3612. //
  3613. // Note that if you suspend either the Launch or Terminate process types, it
  3614. // can prevent other process types from functioning properly.
  3615. //
  3616. // To resume processes that have been suspended, use ResumeProcesses.
  3617. //
  3618. // For more information, see Suspending and Resuming Auto Scaling Processes
  3619. // (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-suspend-resume-processes.html)
  3620. // in the Auto Scaling User Guide.
  3621. //
  3622. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3623. // with awserr.Error's Code and Message methods to get detailed information about
  3624. // the error.
  3625. //
  3626. // See the AWS API reference guide for Auto Scaling's
  3627. // API operation SuspendProcesses for usage and error information.
  3628. //
  3629. // Returned Error Codes:
  3630. // * ResourceInUse
  3631. // The operation can't be performed because the resource is in use.
  3632. //
  3633. // * ResourceContention
  3634. // You already have a pending update to an Auto Scaling resource (for example,
  3635. // a group, instance, or load balancer).
  3636. //
  3637. func (c *AutoScaling) SuspendProcesses(input *ScalingProcessQuery) (*SuspendProcessesOutput, error) {
  3638. req, out := c.SuspendProcessesRequest(input)
  3639. err := req.Send()
  3640. return out, err
  3641. }
  3642. const opTerminateInstanceInAutoScalingGroup = "TerminateInstanceInAutoScalingGroup"
  3643. // TerminateInstanceInAutoScalingGroupRequest generates a "aws/request.Request" representing the
  3644. // client's request for the TerminateInstanceInAutoScalingGroup operation. The "output" return
  3645. // value can be used to capture response data after the request's "Send" method
  3646. // is called.
  3647. //
  3648. // See TerminateInstanceInAutoScalingGroup for usage and error information.
  3649. //
  3650. // Creating a request object using this method should be used when you want to inject
  3651. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3652. // access properties on the request object before or after sending the request. If
  3653. // you just want the service response, call the TerminateInstanceInAutoScalingGroup method directly
  3654. // instead.
  3655. //
  3656. // Note: You must call the "Send" method on the returned request object in order
  3657. // to execute the request.
  3658. //
  3659. // // Example sending a request using the TerminateInstanceInAutoScalingGroupRequest method.
  3660. // req, resp := client.TerminateInstanceInAutoScalingGroupRequest(params)
  3661. //
  3662. // err := req.Send()
  3663. // if err == nil { // resp is now filled
  3664. // fmt.Println(resp)
  3665. // }
  3666. //
  3667. func (c *AutoScaling) TerminateInstanceInAutoScalingGroupRequest(input *TerminateInstanceInAutoScalingGroupInput) (req *request.Request, output *TerminateInstanceInAutoScalingGroupOutput) {
  3668. op := &request.Operation{
  3669. Name: opTerminateInstanceInAutoScalingGroup,
  3670. HTTPMethod: "POST",
  3671. HTTPPath: "/",
  3672. }
  3673. if input == nil {
  3674. input = &TerminateInstanceInAutoScalingGroupInput{}
  3675. }
  3676. req = c.newRequest(op, input, output)
  3677. output = &TerminateInstanceInAutoScalingGroupOutput{}
  3678. req.Data = output
  3679. return
  3680. }
  3681. // TerminateInstanceInAutoScalingGroup API operation for Auto Scaling.
  3682. //
  3683. // Terminates the specified instance and optionally adjusts the desired group
  3684. // size.
  3685. //
  3686. // This call simply makes a termination request. The instance is not terminated
  3687. // immediately.
  3688. //
  3689. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3690. // with awserr.Error's Code and Message methods to get detailed information about
  3691. // the error.
  3692. //
  3693. // See the AWS API reference guide for Auto Scaling's
  3694. // API operation TerminateInstanceInAutoScalingGroup for usage and error information.
  3695. //
  3696. // Returned Error Codes:
  3697. // * ScalingActivityInProgress
  3698. // The operation can't be performed because there are scaling activities in
  3699. // progress.
  3700. //
  3701. // * ResourceContention
  3702. // You already have a pending update to an Auto Scaling resource (for example,
  3703. // a group, instance, or load balancer).
  3704. //
  3705. func (c *AutoScaling) TerminateInstanceInAutoScalingGroup(input *TerminateInstanceInAutoScalingGroupInput) (*TerminateInstanceInAutoScalingGroupOutput, error) {
  3706. req, out := c.TerminateInstanceInAutoScalingGroupRequest(input)
  3707. err := req.Send()
  3708. return out, err
  3709. }
  3710. const opUpdateAutoScalingGroup = "UpdateAutoScalingGroup"
  3711. // UpdateAutoScalingGroupRequest generates a "aws/request.Request" representing the
  3712. // client's request for the UpdateAutoScalingGroup operation. The "output" return
  3713. // value can be used to capture response data after the request's "Send" method
  3714. // is called.
  3715. //
  3716. // See UpdateAutoScalingGroup for usage and error information.
  3717. //
  3718. // Creating a request object using this method should be used when you want to inject
  3719. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3720. // access properties on the request object before or after sending the request. If
  3721. // you just want the service response, call the UpdateAutoScalingGroup method directly
  3722. // instead.
  3723. //
  3724. // Note: You must call the "Send" method on the returned request object in order
  3725. // to execute the request.
  3726. //
  3727. // // Example sending a request using the UpdateAutoScalingGroupRequest method.
  3728. // req, resp := client.UpdateAutoScalingGroupRequest(params)
  3729. //
  3730. // err := req.Send()
  3731. // if err == nil { // resp is now filled
  3732. // fmt.Println(resp)
  3733. // }
  3734. //
  3735. func (c *AutoScaling) UpdateAutoScalingGroupRequest(input *UpdateAutoScalingGroupInput) (req *request.Request, output *UpdateAutoScalingGroupOutput) {
  3736. op := &request.Operation{
  3737. Name: opUpdateAutoScalingGroup,
  3738. HTTPMethod: "POST",
  3739. HTTPPath: "/",
  3740. }
  3741. if input == nil {
  3742. input = &UpdateAutoScalingGroupInput{}
  3743. }
  3744. req = c.newRequest(op, input, output)
  3745. req.Handlers.Unmarshal.Remove(query.UnmarshalHandler)
  3746. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3747. output = &UpdateAutoScalingGroupOutput{}
  3748. req.Data = output
  3749. return
  3750. }
  3751. // UpdateAutoScalingGroup API operation for Auto Scaling.
  3752. //
  3753. // Updates the configuration for the specified Auto Scaling group.
  3754. //
  3755. // To update an Auto Scaling group with a launch configuration with InstanceMonitoring
  3756. // set to False, you must first disable the collection of group metrics. Otherwise,
  3757. // you will get an error. If you have previously enabled the collection of group
  3758. // metrics, you can disable it using DisableMetricsCollection.
  3759. //
  3760. // The new settings are registered upon the completion of this call. Any launch
  3761. // configuration settings take effect on any triggers after this call returns.
  3762. // Scaling activities that are currently in progress aren't affected.
  3763. //
  3764. // Note the following:
  3765. //
  3766. // * If you specify a new value for MinSize without specifying a value for
  3767. // DesiredCapacity, and the new MinSize is larger than the current size of
  3768. // the group, we implicitly call SetDesiredCapacity to set the size of the
  3769. // group to the new value of MinSize.
  3770. //
  3771. // * If you specify a new value for MaxSize without specifying a value for
  3772. // DesiredCapacity, and the new MaxSize is smaller than the current size
  3773. // of the group, we implicitly call SetDesiredCapacity to set the size of
  3774. // the group to the new value of MaxSize.
  3775. //
  3776. // * All other optional parameters are left unchanged if not specified.
  3777. //
  3778. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3779. // with awserr.Error's Code and Message methods to get detailed information about
  3780. // the error.
  3781. //
  3782. // See the AWS API reference guide for Auto Scaling's
  3783. // API operation UpdateAutoScalingGroup for usage and error information.
  3784. //
  3785. // Returned Error Codes:
  3786. // * ScalingActivityInProgress
  3787. // The operation can't be performed because there are scaling activities in
  3788. // progress.
  3789. //
  3790. // * ResourceContention
  3791. // You already have a pending update to an Auto Scaling resource (for example,
  3792. // a group, instance, or load balancer).
  3793. //
  3794. func (c *AutoScaling) UpdateAutoScalingGroup(input *UpdateAutoScalingGroupInput) (*UpdateAutoScalingGroupOutput, error) {
  3795. req, out := c.UpdateAutoScalingGroupRequest(input)
  3796. err := req.Send()
  3797. return out, err
  3798. }
  3799. // Describes scaling activity, which is a long-running process that represents
  3800. // a change to your Auto Scaling group, such as changing its size or replacing
  3801. // an instance.
  3802. type Activity struct {
  3803. _ struct{} `type:"structure"`
  3804. // The ID of the activity.
  3805. //
  3806. // ActivityId is a required field
  3807. ActivityId *string `type:"string" required:"true"`
  3808. // The name of the Auto Scaling group.
  3809. //
  3810. // AutoScalingGroupName is a required field
  3811. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  3812. // The reason the activity began.
  3813. //
  3814. // Cause is a required field
  3815. Cause *string `min:"1" type:"string" required:"true"`
  3816. // A friendly, more verbose description of the activity.
  3817. Description *string `type:"string"`
  3818. // The details about the activity.
  3819. Details *string `type:"string"`
  3820. // The end time of the activity.
  3821. EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  3822. // A value between 0 and 100 that indicates the progress of the activity.
  3823. Progress *int64 `type:"integer"`
  3824. // The start time of the activity.
  3825. //
  3826. // StartTime is a required field
  3827. StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
  3828. // The current status of the activity.
  3829. //
  3830. // StatusCode is a required field
  3831. StatusCode *string `type:"string" required:"true" enum:"ScalingActivityStatusCode"`
  3832. // A friendly, more verbose description of the activity status.
  3833. StatusMessage *string `min:"1" type:"string"`
  3834. }
  3835. // String returns the string representation
  3836. func (s Activity) String() string {
  3837. return awsutil.Prettify(s)
  3838. }
  3839. // GoString returns the string representation
  3840. func (s Activity) GoString() string {
  3841. return s.String()
  3842. }
  3843. // Describes a policy adjustment type.
  3844. //
  3845. // For more information, see Dynamic Scaling (http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html)
  3846. // in the Auto Scaling User Guide.
  3847. type AdjustmentType struct {
  3848. _ struct{} `type:"structure"`
  3849. // The policy adjustment type. The valid values are ChangeInCapacity, ExactCapacity,
  3850. // and PercentChangeInCapacity.
  3851. AdjustmentType *string `min:"1" type:"string"`
  3852. }
  3853. // String returns the string representation
  3854. func (s AdjustmentType) String() string {
  3855. return awsutil.Prettify(s)
  3856. }
  3857. // GoString returns the string representation
  3858. func (s AdjustmentType) GoString() string {
  3859. return s.String()
  3860. }
  3861. // Describes an alarm.
  3862. type Alarm struct {
  3863. _ struct{} `type:"structure"`
  3864. // The Amazon Resource Name (ARN) of the alarm.
  3865. AlarmARN *string `min:"1" type:"string"`
  3866. // The name of the alarm.
  3867. AlarmName *string `min:"1" type:"string"`
  3868. }
  3869. // String returns the string representation
  3870. func (s Alarm) String() string {
  3871. return awsutil.Prettify(s)
  3872. }
  3873. // GoString returns the string representation
  3874. func (s Alarm) GoString() string {
  3875. return s.String()
  3876. }
  3877. // Contains the parameters for AttachInstances.
  3878. type AttachInstancesInput struct {
  3879. _ struct{} `type:"structure"`
  3880. // The name of the group.
  3881. //
  3882. // AutoScalingGroupName is a required field
  3883. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  3884. // One or more instance IDs.
  3885. InstanceIds []*string `type:"list"`
  3886. }
  3887. // String returns the string representation
  3888. func (s AttachInstancesInput) String() string {
  3889. return awsutil.Prettify(s)
  3890. }
  3891. // GoString returns the string representation
  3892. func (s AttachInstancesInput) GoString() string {
  3893. return s.String()
  3894. }
  3895. // Validate inspects the fields of the type to determine if they are valid.
  3896. func (s *AttachInstancesInput) Validate() error {
  3897. invalidParams := request.ErrInvalidParams{Context: "AttachInstancesInput"}
  3898. if s.AutoScalingGroupName == nil {
  3899. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  3900. }
  3901. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  3902. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  3903. }
  3904. if invalidParams.Len() > 0 {
  3905. return invalidParams
  3906. }
  3907. return nil
  3908. }
  3909. type AttachInstancesOutput struct {
  3910. _ struct{} `type:"structure"`
  3911. }
  3912. // String returns the string representation
  3913. func (s AttachInstancesOutput) String() string {
  3914. return awsutil.Prettify(s)
  3915. }
  3916. // GoString returns the string representation
  3917. func (s AttachInstancesOutput) GoString() string {
  3918. return s.String()
  3919. }
  3920. // Contains the parameters for AttachLoadBalancerTargetGroups.
  3921. type AttachLoadBalancerTargetGroupsInput struct {
  3922. _ struct{} `type:"structure"`
  3923. // The name of the Auto Scaling group.
  3924. //
  3925. // AutoScalingGroupName is a required field
  3926. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  3927. // The Amazon Resource Names (ARN) of the target groups.
  3928. //
  3929. // TargetGroupARNs is a required field
  3930. TargetGroupARNs []*string `type:"list" required:"true"`
  3931. }
  3932. // String returns the string representation
  3933. func (s AttachLoadBalancerTargetGroupsInput) String() string {
  3934. return awsutil.Prettify(s)
  3935. }
  3936. // GoString returns the string representation
  3937. func (s AttachLoadBalancerTargetGroupsInput) GoString() string {
  3938. return s.String()
  3939. }
  3940. // Validate inspects the fields of the type to determine if they are valid.
  3941. func (s *AttachLoadBalancerTargetGroupsInput) Validate() error {
  3942. invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancerTargetGroupsInput"}
  3943. if s.AutoScalingGroupName == nil {
  3944. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  3945. }
  3946. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  3947. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  3948. }
  3949. if s.TargetGroupARNs == nil {
  3950. invalidParams.Add(request.NewErrParamRequired("TargetGroupARNs"))
  3951. }
  3952. if invalidParams.Len() > 0 {
  3953. return invalidParams
  3954. }
  3955. return nil
  3956. }
  3957. type AttachLoadBalancerTargetGroupsOutput struct {
  3958. _ struct{} `type:"structure"`
  3959. }
  3960. // String returns the string representation
  3961. func (s AttachLoadBalancerTargetGroupsOutput) String() string {
  3962. return awsutil.Prettify(s)
  3963. }
  3964. // GoString returns the string representation
  3965. func (s AttachLoadBalancerTargetGroupsOutput) GoString() string {
  3966. return s.String()
  3967. }
  3968. // Contains the parameters for AttachLoadBalancers.
  3969. type AttachLoadBalancersInput struct {
  3970. _ struct{} `type:"structure"`
  3971. // The name of the group.
  3972. //
  3973. // AutoScalingGroupName is a required field
  3974. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  3975. // One or more load balancer names.
  3976. //
  3977. // LoadBalancerNames is a required field
  3978. LoadBalancerNames []*string `type:"list" required:"true"`
  3979. }
  3980. // String returns the string representation
  3981. func (s AttachLoadBalancersInput) String() string {
  3982. return awsutil.Prettify(s)
  3983. }
  3984. // GoString returns the string representation
  3985. func (s AttachLoadBalancersInput) GoString() string {
  3986. return s.String()
  3987. }
  3988. // Validate inspects the fields of the type to determine if they are valid.
  3989. func (s *AttachLoadBalancersInput) Validate() error {
  3990. invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancersInput"}
  3991. if s.AutoScalingGroupName == nil {
  3992. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  3993. }
  3994. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  3995. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  3996. }
  3997. if s.LoadBalancerNames == nil {
  3998. invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames"))
  3999. }
  4000. if invalidParams.Len() > 0 {
  4001. return invalidParams
  4002. }
  4003. return nil
  4004. }
  4005. // Contains the output of AttachLoadBalancers.
  4006. type AttachLoadBalancersOutput struct {
  4007. _ struct{} `type:"structure"`
  4008. }
  4009. // String returns the string representation
  4010. func (s AttachLoadBalancersOutput) String() string {
  4011. return awsutil.Prettify(s)
  4012. }
  4013. // GoString returns the string representation
  4014. func (s AttachLoadBalancersOutput) GoString() string {
  4015. return s.String()
  4016. }
  4017. // Describes a block device mapping.
  4018. type BlockDeviceMapping struct {
  4019. _ struct{} `type:"structure"`
  4020. // The device name exposed to the EC2 instance (for example, /dev/sdh or xvdh).
  4021. //
  4022. // DeviceName is a required field
  4023. DeviceName *string `min:"1" type:"string" required:"true"`
  4024. // The information about the Amazon EBS volume.
  4025. Ebs *Ebs `type:"structure"`
  4026. // Suppresses a device mapping.
  4027. //
  4028. // If this parameter is true for the root device, the instance might fail the
  4029. // EC2 health check. Auto Scaling launches a replacement instance if the instance
  4030. // fails the health check.
  4031. NoDevice *bool `type:"boolean"`
  4032. // The name of the virtual device (for example, ephemeral0).
  4033. VirtualName *string `min:"1" type:"string"`
  4034. }
  4035. // String returns the string representation
  4036. func (s BlockDeviceMapping) String() string {
  4037. return awsutil.Prettify(s)
  4038. }
  4039. // GoString returns the string representation
  4040. func (s BlockDeviceMapping) GoString() string {
  4041. return s.String()
  4042. }
  4043. // Validate inspects the fields of the type to determine if they are valid.
  4044. func (s *BlockDeviceMapping) Validate() error {
  4045. invalidParams := request.ErrInvalidParams{Context: "BlockDeviceMapping"}
  4046. if s.DeviceName == nil {
  4047. invalidParams.Add(request.NewErrParamRequired("DeviceName"))
  4048. }
  4049. if s.DeviceName != nil && len(*s.DeviceName) < 1 {
  4050. invalidParams.Add(request.NewErrParamMinLen("DeviceName", 1))
  4051. }
  4052. if s.VirtualName != nil && len(*s.VirtualName) < 1 {
  4053. invalidParams.Add(request.NewErrParamMinLen("VirtualName", 1))
  4054. }
  4055. if s.Ebs != nil {
  4056. if err := s.Ebs.Validate(); err != nil {
  4057. invalidParams.AddNested("Ebs", err.(request.ErrInvalidParams))
  4058. }
  4059. }
  4060. if invalidParams.Len() > 0 {
  4061. return invalidParams
  4062. }
  4063. return nil
  4064. }
  4065. // Contains the parameters for CompleteLifecycleAction.
  4066. type CompleteLifecycleActionInput struct {
  4067. _ struct{} `type:"structure"`
  4068. // The name of the group for the lifecycle hook.
  4069. //
  4070. // AutoScalingGroupName is a required field
  4071. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  4072. // The ID of the instance.
  4073. InstanceId *string `min:"1" type:"string"`
  4074. // The action for the group to take. This parameter can be either CONTINUE or
  4075. // ABANDON.
  4076. //
  4077. // LifecycleActionResult is a required field
  4078. LifecycleActionResult *string `type:"string" required:"true"`
  4079. // A universally unique identifier (UUID) that identifies a specific lifecycle
  4080. // action associated with an instance. Auto Scaling sends this token to the
  4081. // notification target you specified when you created the lifecycle hook.
  4082. LifecycleActionToken *string `min:"36" type:"string"`
  4083. // The name of the lifecycle hook.
  4084. //
  4085. // LifecycleHookName is a required field
  4086. LifecycleHookName *string `min:"1" type:"string" required:"true"`
  4087. }
  4088. // String returns the string representation
  4089. func (s CompleteLifecycleActionInput) String() string {
  4090. return awsutil.Prettify(s)
  4091. }
  4092. // GoString returns the string representation
  4093. func (s CompleteLifecycleActionInput) GoString() string {
  4094. return s.String()
  4095. }
  4096. // Validate inspects the fields of the type to determine if they are valid.
  4097. func (s *CompleteLifecycleActionInput) Validate() error {
  4098. invalidParams := request.ErrInvalidParams{Context: "CompleteLifecycleActionInput"}
  4099. if s.AutoScalingGroupName == nil {
  4100. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  4101. }
  4102. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  4103. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  4104. }
  4105. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  4106. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  4107. }
  4108. if s.LifecycleActionResult == nil {
  4109. invalidParams.Add(request.NewErrParamRequired("LifecycleActionResult"))
  4110. }
  4111. if s.LifecycleActionToken != nil && len(*s.LifecycleActionToken) < 36 {
  4112. invalidParams.Add(request.NewErrParamMinLen("LifecycleActionToken", 36))
  4113. }
  4114. if s.LifecycleHookName == nil {
  4115. invalidParams.Add(request.NewErrParamRequired("LifecycleHookName"))
  4116. }
  4117. if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 {
  4118. invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1))
  4119. }
  4120. if invalidParams.Len() > 0 {
  4121. return invalidParams
  4122. }
  4123. return nil
  4124. }
  4125. // Contains the output of CompleteLifecycleAction.
  4126. type CompleteLifecycleActionOutput struct {
  4127. _ struct{} `type:"structure"`
  4128. }
  4129. // String returns the string representation
  4130. func (s CompleteLifecycleActionOutput) String() string {
  4131. return awsutil.Prettify(s)
  4132. }
  4133. // GoString returns the string representation
  4134. func (s CompleteLifecycleActionOutput) GoString() string {
  4135. return s.String()
  4136. }
  4137. // Contains the parameters for CreateAutoScalingGroup.
  4138. type CreateAutoScalingGroupInput struct {
  4139. _ struct{} `type:"structure"`
  4140. // The name of the group. This name must be unique within the scope of your
  4141. // AWS account.
  4142. //
  4143. // AutoScalingGroupName is a required field
  4144. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  4145. // One or more Availability Zones for the group. This parameter is optional
  4146. // if you specify one or more subnets.
  4147. AvailabilityZones []*string `min:"1" type:"list"`
  4148. // The amount of time, in seconds, after a scaling activity completes before
  4149. // another scaling activity can start. The default is 300.
  4150. //
  4151. // For more information, see Auto Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/latest/userguide/Cooldown.html)
  4152. // in the Auto Scaling User Guide.
  4153. DefaultCooldown *int64 `type:"integer"`
  4154. // The number of EC2 instances that should be running in the group. This number
  4155. // must be greater than or equal to the minimum size of the group and less than
  4156. // or equal to the maximum size of the group.
  4157. DesiredCapacity *int64 `type:"integer"`
  4158. // The amount of time, in seconds, that Auto Scaling waits before checking the
  4159. // health status of an EC2 instance that has come into service. During this
  4160. // time, any health check failures for the instance are ignored. The default
  4161. // is 0.
  4162. //
  4163. // This parameter is required if you are adding an ELB health check.
  4164. //
  4165. // For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/latest/userguide/healthcheck.html)
  4166. // in the Auto Scaling User Guide.
  4167. HealthCheckGracePeriod *int64 `type:"integer"`
  4168. // The service to use for the health checks. The valid values are EC2 and ELB.
  4169. //
  4170. // By default, health checks use Amazon EC2 instance status checks to determine
  4171. // the health of an instance. For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/latest/userguide/healthcheck.html)
  4172. // in the Auto Scaling User Guide.
  4173. HealthCheckType *string `min:"1" type:"string"`
  4174. // The ID of the instance used to create a launch configuration for the group.
  4175. // Alternatively, specify a launch configuration instead of an EC2 instance.
  4176. //
  4177. // When you specify an ID of an instance, Auto Scaling creates a new launch
  4178. // configuration and associates it with the group. This launch configuration
  4179. // derives its attributes from the specified instance, with the exception of
  4180. // the block device mapping.
  4181. //
  4182. // For more information, see Create an Auto Scaling Group Using an EC2 Instance
  4183. // (http://docs.aws.amazon.com/autoscaling/latest/userguide/create-asg-from-instance.html)
  4184. // in the Auto Scaling User Guide.
  4185. InstanceId *string `min:"1" type:"string"`
  4186. // The name of the launch configuration. Alternatively, specify an EC2 instance
  4187. // instead of a launch configuration.
  4188. LaunchConfigurationName *string `min:"1" type:"string"`
  4189. // One or more Classic load balancers. To specify an Application load balancer,
  4190. // use TargetGroupARNs instead.
  4191. //
  4192. // For more information, see Using a Load Balancer With an Auto Scaling Group
  4193. // (http://docs.aws.amazon.com/autoscaling/latest/userguide/create-asg-from-instance.html)
  4194. // in the Auto Scaling User Guide.
  4195. LoadBalancerNames []*string `type:"list"`
  4196. // The maximum size of the group.
  4197. //
  4198. // MaxSize is a required field
  4199. MaxSize *int64 `type:"integer" required:"true"`
  4200. // The minimum size of the group.
  4201. //
  4202. // MinSize is a required field
  4203. MinSize *int64 `type:"integer" required:"true"`
  4204. // Indicates whether newly launched instances are protected from termination
  4205. // by Auto Scaling when scaling in.
  4206. NewInstancesProtectedFromScaleIn *bool `type:"boolean"`
  4207. // The name of the placement group into which you'll launch your instances,
  4208. // if any. For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html)
  4209. // in the Amazon Elastic Compute Cloud User Guide.
  4210. PlacementGroup *string `min:"1" type:"string"`
  4211. // One or more tags.
  4212. //
  4213. // For more information, see Tagging Auto Scaling Groups and Instances (http://docs.aws.amazon.com/autoscaling/latest/userguide/autoscaling-tagging.html)
  4214. // in the Auto Scaling User Guide.
  4215. Tags []*Tag `type:"list"`
  4216. // The Amazon Resource Names (ARN) of the target groups.
  4217. TargetGroupARNs []*string `type:"list"`
  4218. // One or more termination policies used to select the instance to terminate.
  4219. // These policies are executed in the order that they are listed.
  4220. //
  4221. // For more information, see Controlling Which Instances Auto Scaling Terminates
  4222. // During Scale In (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-termination.html)
  4223. // in the Auto Scaling User Guide.
  4224. TerminationPolicies []*string `type:"list"`
  4225. // A comma-separated list of subnet identifiers for your virtual private cloud
  4226. // (VPC).
  4227. //
  4228. // If you specify subnets and Availability Zones with this call, ensure that
  4229. // the subnets' Availability Zones match the Availability Zones specified.
  4230. //
  4231. // For more information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/latest/userguide/asg-in-vpc.html)
  4232. // in the Auto Scaling User Guide.
  4233. VPCZoneIdentifier *string `min:"1" type:"string"`
  4234. }
  4235. // String returns the string representation
  4236. func (s CreateAutoScalingGroupInput) String() string {
  4237. return awsutil.Prettify(s)
  4238. }
  4239. // GoString returns the string representation
  4240. func (s CreateAutoScalingGroupInput) GoString() string {
  4241. return s.String()
  4242. }
  4243. // Validate inspects the fields of the type to determine if they are valid.
  4244. func (s *CreateAutoScalingGroupInput) Validate() error {
  4245. invalidParams := request.ErrInvalidParams{Context: "CreateAutoScalingGroupInput"}
  4246. if s.AutoScalingGroupName == nil {
  4247. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  4248. }
  4249. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  4250. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  4251. }
  4252. if s.AvailabilityZones != nil && len(s.AvailabilityZones) < 1 {
  4253. invalidParams.Add(request.NewErrParamMinLen("AvailabilityZones", 1))
  4254. }
  4255. if s.HealthCheckType != nil && len(*s.HealthCheckType) < 1 {
  4256. invalidParams.Add(request.NewErrParamMinLen("HealthCheckType", 1))
  4257. }
  4258. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  4259. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  4260. }
  4261. if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 {
  4262. invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1))
  4263. }
  4264. if s.MaxSize == nil {
  4265. invalidParams.Add(request.NewErrParamRequired("MaxSize"))
  4266. }
  4267. if s.MinSize == nil {
  4268. invalidParams.Add(request.NewErrParamRequired("MinSize"))
  4269. }
  4270. if s.PlacementGroup != nil && len(*s.PlacementGroup) < 1 {
  4271. invalidParams.Add(request.NewErrParamMinLen("PlacementGroup", 1))
  4272. }
  4273. if s.VPCZoneIdentifier != nil && len(*s.VPCZoneIdentifier) < 1 {
  4274. invalidParams.Add(request.NewErrParamMinLen("VPCZoneIdentifier", 1))
  4275. }
  4276. if s.Tags != nil {
  4277. for i, v := range s.Tags {
  4278. if v == nil {
  4279. continue
  4280. }
  4281. if err := v.Validate(); err != nil {
  4282. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  4283. }
  4284. }
  4285. }
  4286. if invalidParams.Len() > 0 {
  4287. return invalidParams
  4288. }
  4289. return nil
  4290. }
  4291. type CreateAutoScalingGroupOutput struct {
  4292. _ struct{} `type:"structure"`
  4293. }
  4294. // String returns the string representation
  4295. func (s CreateAutoScalingGroupOutput) String() string {
  4296. return awsutil.Prettify(s)
  4297. }
  4298. // GoString returns the string representation
  4299. func (s CreateAutoScalingGroupOutput) GoString() string {
  4300. return s.String()
  4301. }
  4302. // Contains the parameters for CreateLaunchConfiguration.
  4303. type CreateLaunchConfigurationInput struct {
  4304. _ struct{} `type:"structure"`
  4305. // Used for groups that launch instances into a virtual private cloud (VPC).
  4306. // Specifies whether to assign a public IP address to each instance. For more
  4307. // information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/latest/userguide/asg-in-vpc.html)
  4308. // in the Auto Scaling User Guide.
  4309. //
  4310. // If you specify this parameter, be sure to specify at least one subnet when
  4311. // you create your group.
  4312. //
  4313. // Default: If the instance is launched into a default subnet, the default is
  4314. // true. If the instance is launched into a nondefault subnet, the default is
  4315. // false. For more information, see Supported Platforms (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html)
  4316. // in the Amazon Elastic Compute Cloud User Guide.
  4317. AssociatePublicIpAddress *bool `type:"boolean"`
  4318. // One or more mappings that specify how block devices are exposed to the instance.
  4319. // For more information, see Block Device Mapping (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
  4320. // in the Amazon Elastic Compute Cloud User Guide.
  4321. BlockDeviceMappings []*BlockDeviceMapping `type:"list"`
  4322. // The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.
  4323. // This parameter is supported only if you are launching EC2-Classic instances.
  4324. // For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
  4325. // in the Amazon Elastic Compute Cloud User Guide.
  4326. ClassicLinkVPCId *string `min:"1" type:"string"`
  4327. // The IDs of one or more security groups for the specified ClassicLink-enabled
  4328. // VPC. This parameter is required if you specify a ClassicLink-enabled VPC,
  4329. // and is not supported otherwise. For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
  4330. // in the Amazon Elastic Compute Cloud User Guide.
  4331. ClassicLinkVPCSecurityGroups []*string `type:"list"`
  4332. // Indicates whether the instance is optimized for Amazon EBS I/O. By default,
  4333. // the instance is not optimized for EBS I/O. The optimization provides dedicated
  4334. // throughput to Amazon EBS and an optimized configuration stack to provide
  4335. // optimal I/O performance. This optimization is not available with all instance
  4336. // types. Additional usage charges apply. For more information, see Amazon EBS-Optimized
  4337. // Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html)
  4338. // in the Amazon Elastic Compute Cloud User Guide.
  4339. EbsOptimized *bool `type:"boolean"`
  4340. // The name or the Amazon Resource Name (ARN) of the instance profile associated
  4341. // with the IAM role for the instance.
  4342. //
  4343. // EC2 instances launched with an IAM role will automatically have AWS security
  4344. // credentials available. You can use IAM roles with Auto Scaling to automatically
  4345. // enable applications running on your EC2 instances to securely access other
  4346. // AWS resources. For more information, see Launch Auto Scaling Instances with
  4347. // an IAM Role (http://docs.aws.amazon.com/autoscaling/latest/userguide/us-iam-role.html)
  4348. // in the Auto Scaling User Guide.
  4349. IamInstanceProfile *string `min:"1" type:"string"`
  4350. // The ID of the Amazon Machine Image (AMI) to use to launch your EC2 instances.
  4351. // For more information, see Finding an AMI (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html)
  4352. // in the Amazon Elastic Compute Cloud User Guide.
  4353. ImageId *string `min:"1" type:"string"`
  4354. // The ID of the instance to use to create the launch configuration.
  4355. //
  4356. // The new launch configuration derives attributes from the instance, with the
  4357. // exception of the block device mapping.
  4358. //
  4359. // To create a launch configuration with a block device mapping or override
  4360. // any other instance attributes, specify them as part of the same request.
  4361. //
  4362. // For more information, see Create a Launch Configuration Using an EC2 Instance
  4363. // (http://docs.aws.amazon.com/autoscaling/latest/userguide/create-lc-with-instanceID.html)
  4364. // in the Auto Scaling User Guide.
  4365. InstanceId *string `min:"1" type:"string"`
  4366. // Enables detailed monitoring (true) or basic monitoring (false) for the Auto
  4367. // Scaling instances.
  4368. InstanceMonitoring *InstanceMonitoring `type:"structure"`
  4369. // The instance type of the EC2 instance. For information about available instance
  4370. // types, see Available Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes)
  4371. // in the Amazon Elastic Compute Cloud User Guide.
  4372. InstanceType *string `min:"1" type:"string"`
  4373. // The ID of the kernel associated with the AMI.
  4374. KernelId *string `min:"1" type:"string"`
  4375. // The name of the key pair. For more information, see Amazon EC2 Key Pairs
  4376. // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) in
  4377. // the Amazon Elastic Compute Cloud User Guide.
  4378. KeyName *string `min:"1" type:"string"`
  4379. // The name of the launch configuration. This name must be unique within the
  4380. // scope of your AWS account.
  4381. //
  4382. // LaunchConfigurationName is a required field
  4383. LaunchConfigurationName *string `min:"1" type:"string" required:"true"`
  4384. // The tenancy of the instance. An instance with a tenancy of dedicated runs
  4385. // on single-tenant hardware and can only be launched into a VPC.
  4386. //
  4387. // You must set the value of this parameter to dedicated if want to launch Dedicated
  4388. // Instances into a shared tenancy VPC (VPC with instance placement tenancy
  4389. // attribute set to default).
  4390. //
  4391. // If you specify this parameter, be sure to specify at least one subnet when
  4392. // you create your group.
  4393. //
  4394. // For more information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/latest/userguide/asg-in-vpc.html)
  4395. // in the Auto Scaling User Guide.
  4396. //
  4397. // Valid values: default | dedicated
  4398. PlacementTenancy *string `min:"1" type:"string"`
  4399. // The ID of the RAM disk associated with the AMI.
  4400. RamdiskId *string `min:"1" type:"string"`
  4401. // One or more security groups with which to associate the instances.
  4402. //
  4403. // If your instances are launched in EC2-Classic, you can either specify security
  4404. // group names or the security group IDs. For more information about security
  4405. // groups for EC2-Classic, see Amazon EC2 Security Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html)
  4406. // in the Amazon Elastic Compute Cloud User Guide.
  4407. //
  4408. // If your instances are launched into a VPC, specify security group IDs. For
  4409. // more information, see Security Groups for Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html)
  4410. // in the Amazon Virtual Private Cloud User Guide.
  4411. SecurityGroups []*string `type:"list"`
  4412. // The maximum hourly price to be paid for any Spot Instance launched to fulfill
  4413. // the request. Spot Instances are launched when the price you specify exceeds
  4414. // the current Spot market price. For more information, see Launching Spot Instances
  4415. // in Your Auto Scaling Group (http://docs.aws.amazon.com/autoscaling/latest/userguide/US-SpotInstances.html)
  4416. // in the Auto Scaling User Guide.
  4417. SpotPrice *string `min:"1" type:"string"`
  4418. // The user data to make available to the launched EC2 instances. For more information,
  4419. // see Instance Metadata and User Data (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
  4420. // in the Amazon Elastic Compute Cloud User Guide.
  4421. UserData *string `type:"string"`
  4422. }
  4423. // String returns the string representation
  4424. func (s CreateLaunchConfigurationInput) String() string {
  4425. return awsutil.Prettify(s)
  4426. }
  4427. // GoString returns the string representation
  4428. func (s CreateLaunchConfigurationInput) GoString() string {
  4429. return s.String()
  4430. }
  4431. // Validate inspects the fields of the type to determine if they are valid.
  4432. func (s *CreateLaunchConfigurationInput) Validate() error {
  4433. invalidParams := request.ErrInvalidParams{Context: "CreateLaunchConfigurationInput"}
  4434. if s.ClassicLinkVPCId != nil && len(*s.ClassicLinkVPCId) < 1 {
  4435. invalidParams.Add(request.NewErrParamMinLen("ClassicLinkVPCId", 1))
  4436. }
  4437. if s.IamInstanceProfile != nil && len(*s.IamInstanceProfile) < 1 {
  4438. invalidParams.Add(request.NewErrParamMinLen("IamInstanceProfile", 1))
  4439. }
  4440. if s.ImageId != nil && len(*s.ImageId) < 1 {
  4441. invalidParams.Add(request.NewErrParamMinLen("ImageId", 1))
  4442. }
  4443. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  4444. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  4445. }
  4446. if s.InstanceType != nil && len(*s.InstanceType) < 1 {
  4447. invalidParams.Add(request.NewErrParamMinLen("InstanceType", 1))
  4448. }
  4449. if s.KernelId != nil && len(*s.KernelId) < 1 {
  4450. invalidParams.Add(request.NewErrParamMinLen("KernelId", 1))
  4451. }
  4452. if s.KeyName != nil && len(*s.KeyName) < 1 {
  4453. invalidParams.Add(request.NewErrParamMinLen("KeyName", 1))
  4454. }
  4455. if s.LaunchConfigurationName == nil {
  4456. invalidParams.Add(request.NewErrParamRequired("LaunchConfigurationName"))
  4457. }
  4458. if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 {
  4459. invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1))
  4460. }
  4461. if s.PlacementTenancy != nil && len(*s.PlacementTenancy) < 1 {
  4462. invalidParams.Add(request.NewErrParamMinLen("PlacementTenancy", 1))
  4463. }
  4464. if s.RamdiskId != nil && len(*s.RamdiskId) < 1 {
  4465. invalidParams.Add(request.NewErrParamMinLen("RamdiskId", 1))
  4466. }
  4467. if s.SpotPrice != nil && len(*s.SpotPrice) < 1 {
  4468. invalidParams.Add(request.NewErrParamMinLen("SpotPrice", 1))
  4469. }
  4470. if s.BlockDeviceMappings != nil {
  4471. for i, v := range s.BlockDeviceMappings {
  4472. if v == nil {
  4473. continue
  4474. }
  4475. if err := v.Validate(); err != nil {
  4476. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "BlockDeviceMappings", i), err.(request.ErrInvalidParams))
  4477. }
  4478. }
  4479. }
  4480. if invalidParams.Len() > 0 {
  4481. return invalidParams
  4482. }
  4483. return nil
  4484. }
  4485. type CreateLaunchConfigurationOutput struct {
  4486. _ struct{} `type:"structure"`
  4487. }
  4488. // String returns the string representation
  4489. func (s CreateLaunchConfigurationOutput) String() string {
  4490. return awsutil.Prettify(s)
  4491. }
  4492. // GoString returns the string representation
  4493. func (s CreateLaunchConfigurationOutput) GoString() string {
  4494. return s.String()
  4495. }
  4496. // Contains the parameters for CreateOrUpdateTags.
  4497. type CreateOrUpdateTagsInput struct {
  4498. _ struct{} `type:"structure"`
  4499. // One or more tags.
  4500. //
  4501. // Tags is a required field
  4502. Tags []*Tag `type:"list" required:"true"`
  4503. }
  4504. // String returns the string representation
  4505. func (s CreateOrUpdateTagsInput) String() string {
  4506. return awsutil.Prettify(s)
  4507. }
  4508. // GoString returns the string representation
  4509. func (s CreateOrUpdateTagsInput) GoString() string {
  4510. return s.String()
  4511. }
  4512. // Validate inspects the fields of the type to determine if they are valid.
  4513. func (s *CreateOrUpdateTagsInput) Validate() error {
  4514. invalidParams := request.ErrInvalidParams{Context: "CreateOrUpdateTagsInput"}
  4515. if s.Tags == nil {
  4516. invalidParams.Add(request.NewErrParamRequired("Tags"))
  4517. }
  4518. if s.Tags != nil {
  4519. for i, v := range s.Tags {
  4520. if v == nil {
  4521. continue
  4522. }
  4523. if err := v.Validate(); err != nil {
  4524. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  4525. }
  4526. }
  4527. }
  4528. if invalidParams.Len() > 0 {
  4529. return invalidParams
  4530. }
  4531. return nil
  4532. }
  4533. type CreateOrUpdateTagsOutput struct {
  4534. _ struct{} `type:"structure"`
  4535. }
  4536. // String returns the string representation
  4537. func (s CreateOrUpdateTagsOutput) String() string {
  4538. return awsutil.Prettify(s)
  4539. }
  4540. // GoString returns the string representation
  4541. func (s CreateOrUpdateTagsOutput) GoString() string {
  4542. return s.String()
  4543. }
  4544. // Contains the parameters for DeleteAutoScalingGroup.
  4545. type DeleteAutoScalingGroupInput struct {
  4546. _ struct{} `type:"structure"`
  4547. // The name of the group to delete.
  4548. //
  4549. // AutoScalingGroupName is a required field
  4550. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  4551. // Specifies that the group will be deleted along with all instances associated
  4552. // with the group, without waiting for all instances to be terminated. This
  4553. // parameter also deletes any lifecycle actions associated with the group.
  4554. ForceDelete *bool `type:"boolean"`
  4555. }
  4556. // String returns the string representation
  4557. func (s DeleteAutoScalingGroupInput) String() string {
  4558. return awsutil.Prettify(s)
  4559. }
  4560. // GoString returns the string representation
  4561. func (s DeleteAutoScalingGroupInput) GoString() string {
  4562. return s.String()
  4563. }
  4564. // Validate inspects the fields of the type to determine if they are valid.
  4565. func (s *DeleteAutoScalingGroupInput) Validate() error {
  4566. invalidParams := request.ErrInvalidParams{Context: "DeleteAutoScalingGroupInput"}
  4567. if s.AutoScalingGroupName == nil {
  4568. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  4569. }
  4570. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  4571. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  4572. }
  4573. if invalidParams.Len() > 0 {
  4574. return invalidParams
  4575. }
  4576. return nil
  4577. }
  4578. type DeleteAutoScalingGroupOutput struct {
  4579. _ struct{} `type:"structure"`
  4580. }
  4581. // String returns the string representation
  4582. func (s DeleteAutoScalingGroupOutput) String() string {
  4583. return awsutil.Prettify(s)
  4584. }
  4585. // GoString returns the string representation
  4586. func (s DeleteAutoScalingGroupOutput) GoString() string {
  4587. return s.String()
  4588. }
  4589. // Contains the parameters for DeleteLaunchConfiguration.
  4590. type DeleteLaunchConfigurationInput struct {
  4591. _ struct{} `type:"structure"`
  4592. // The name of the launch configuration.
  4593. //
  4594. // LaunchConfigurationName is a required field
  4595. LaunchConfigurationName *string `min:"1" type:"string" required:"true"`
  4596. }
  4597. // String returns the string representation
  4598. func (s DeleteLaunchConfigurationInput) String() string {
  4599. return awsutil.Prettify(s)
  4600. }
  4601. // GoString returns the string representation
  4602. func (s DeleteLaunchConfigurationInput) GoString() string {
  4603. return s.String()
  4604. }
  4605. // Validate inspects the fields of the type to determine if they are valid.
  4606. func (s *DeleteLaunchConfigurationInput) Validate() error {
  4607. invalidParams := request.ErrInvalidParams{Context: "DeleteLaunchConfigurationInput"}
  4608. if s.LaunchConfigurationName == nil {
  4609. invalidParams.Add(request.NewErrParamRequired("LaunchConfigurationName"))
  4610. }
  4611. if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 {
  4612. invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1))
  4613. }
  4614. if invalidParams.Len() > 0 {
  4615. return invalidParams
  4616. }
  4617. return nil
  4618. }
  4619. type DeleteLaunchConfigurationOutput struct {
  4620. _ struct{} `type:"structure"`
  4621. }
  4622. // String returns the string representation
  4623. func (s DeleteLaunchConfigurationOutput) String() string {
  4624. return awsutil.Prettify(s)
  4625. }
  4626. // GoString returns the string representation
  4627. func (s DeleteLaunchConfigurationOutput) GoString() string {
  4628. return s.String()
  4629. }
  4630. // Contains the parameters for DeleteLifecycleHook.
  4631. type DeleteLifecycleHookInput struct {
  4632. _ struct{} `type:"structure"`
  4633. // The name of the Auto Scaling group for the lifecycle hook.
  4634. //
  4635. // AutoScalingGroupName is a required field
  4636. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  4637. // The name of the lifecycle hook.
  4638. //
  4639. // LifecycleHookName is a required field
  4640. LifecycleHookName *string `min:"1" type:"string" required:"true"`
  4641. }
  4642. // String returns the string representation
  4643. func (s DeleteLifecycleHookInput) String() string {
  4644. return awsutil.Prettify(s)
  4645. }
  4646. // GoString returns the string representation
  4647. func (s DeleteLifecycleHookInput) GoString() string {
  4648. return s.String()
  4649. }
  4650. // Validate inspects the fields of the type to determine if they are valid.
  4651. func (s *DeleteLifecycleHookInput) Validate() error {
  4652. invalidParams := request.ErrInvalidParams{Context: "DeleteLifecycleHookInput"}
  4653. if s.AutoScalingGroupName == nil {
  4654. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  4655. }
  4656. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  4657. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  4658. }
  4659. if s.LifecycleHookName == nil {
  4660. invalidParams.Add(request.NewErrParamRequired("LifecycleHookName"))
  4661. }
  4662. if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 {
  4663. invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1))
  4664. }
  4665. if invalidParams.Len() > 0 {
  4666. return invalidParams
  4667. }
  4668. return nil
  4669. }
  4670. // Contains the output of DeleteLifecycleHook.
  4671. type DeleteLifecycleHookOutput struct {
  4672. _ struct{} `type:"structure"`
  4673. }
  4674. // String returns the string representation
  4675. func (s DeleteLifecycleHookOutput) String() string {
  4676. return awsutil.Prettify(s)
  4677. }
  4678. // GoString returns the string representation
  4679. func (s DeleteLifecycleHookOutput) GoString() string {
  4680. return s.String()
  4681. }
  4682. // Contains the parameters for DeleteNotificationConfiguration.
  4683. type DeleteNotificationConfigurationInput struct {
  4684. _ struct{} `type:"structure"`
  4685. // The name of the Auto Scaling group.
  4686. //
  4687. // AutoScalingGroupName is a required field
  4688. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  4689. // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service
  4690. // (SNS) topic.
  4691. //
  4692. // TopicARN is a required field
  4693. TopicARN *string `min:"1" type:"string" required:"true"`
  4694. }
  4695. // String returns the string representation
  4696. func (s DeleteNotificationConfigurationInput) String() string {
  4697. return awsutil.Prettify(s)
  4698. }
  4699. // GoString returns the string representation
  4700. func (s DeleteNotificationConfigurationInput) GoString() string {
  4701. return s.String()
  4702. }
  4703. // Validate inspects the fields of the type to determine if they are valid.
  4704. func (s *DeleteNotificationConfigurationInput) Validate() error {
  4705. invalidParams := request.ErrInvalidParams{Context: "DeleteNotificationConfigurationInput"}
  4706. if s.AutoScalingGroupName == nil {
  4707. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  4708. }
  4709. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  4710. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  4711. }
  4712. if s.TopicARN == nil {
  4713. invalidParams.Add(request.NewErrParamRequired("TopicARN"))
  4714. }
  4715. if s.TopicARN != nil && len(*s.TopicARN) < 1 {
  4716. invalidParams.Add(request.NewErrParamMinLen("TopicARN", 1))
  4717. }
  4718. if invalidParams.Len() > 0 {
  4719. return invalidParams
  4720. }
  4721. return nil
  4722. }
  4723. type DeleteNotificationConfigurationOutput struct {
  4724. _ struct{} `type:"structure"`
  4725. }
  4726. // String returns the string representation
  4727. func (s DeleteNotificationConfigurationOutput) String() string {
  4728. return awsutil.Prettify(s)
  4729. }
  4730. // GoString returns the string representation
  4731. func (s DeleteNotificationConfigurationOutput) GoString() string {
  4732. return s.String()
  4733. }
  4734. // Contains the parameters for DeletePolicy.
  4735. type DeletePolicyInput struct {
  4736. _ struct{} `type:"structure"`
  4737. // The name of the Auto Scaling group.
  4738. AutoScalingGroupName *string `min:"1" type:"string"`
  4739. // The name or Amazon Resource Name (ARN) of the policy.
  4740. //
  4741. // PolicyName is a required field
  4742. PolicyName *string `min:"1" type:"string" required:"true"`
  4743. }
  4744. // String returns the string representation
  4745. func (s DeletePolicyInput) String() string {
  4746. return awsutil.Prettify(s)
  4747. }
  4748. // GoString returns the string representation
  4749. func (s DeletePolicyInput) GoString() string {
  4750. return s.String()
  4751. }
  4752. // Validate inspects the fields of the type to determine if they are valid.
  4753. func (s *DeletePolicyInput) Validate() error {
  4754. invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"}
  4755. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  4756. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  4757. }
  4758. if s.PolicyName == nil {
  4759. invalidParams.Add(request.NewErrParamRequired("PolicyName"))
  4760. }
  4761. if s.PolicyName != nil && len(*s.PolicyName) < 1 {
  4762. invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
  4763. }
  4764. if invalidParams.Len() > 0 {
  4765. return invalidParams
  4766. }
  4767. return nil
  4768. }
  4769. type DeletePolicyOutput struct {
  4770. _ struct{} `type:"structure"`
  4771. }
  4772. // String returns the string representation
  4773. func (s DeletePolicyOutput) String() string {
  4774. return awsutil.Prettify(s)
  4775. }
  4776. // GoString returns the string representation
  4777. func (s DeletePolicyOutput) GoString() string {
  4778. return s.String()
  4779. }
  4780. // Contains the parameters for DeleteScheduledAction.
  4781. type DeleteScheduledActionInput struct {
  4782. _ struct{} `type:"structure"`
  4783. // The name of the Auto Scaling group.
  4784. //
  4785. // AutoScalingGroupName is a required field
  4786. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  4787. // The name of the action to delete.
  4788. //
  4789. // ScheduledActionName is a required field
  4790. ScheduledActionName *string `min:"1" type:"string" required:"true"`
  4791. }
  4792. // String returns the string representation
  4793. func (s DeleteScheduledActionInput) String() string {
  4794. return awsutil.Prettify(s)
  4795. }
  4796. // GoString returns the string representation
  4797. func (s DeleteScheduledActionInput) GoString() string {
  4798. return s.String()
  4799. }
  4800. // Validate inspects the fields of the type to determine if they are valid.
  4801. func (s *DeleteScheduledActionInput) Validate() error {
  4802. invalidParams := request.ErrInvalidParams{Context: "DeleteScheduledActionInput"}
  4803. if s.AutoScalingGroupName == nil {
  4804. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  4805. }
  4806. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  4807. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  4808. }
  4809. if s.ScheduledActionName == nil {
  4810. invalidParams.Add(request.NewErrParamRequired("ScheduledActionName"))
  4811. }
  4812. if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 {
  4813. invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1))
  4814. }
  4815. if invalidParams.Len() > 0 {
  4816. return invalidParams
  4817. }
  4818. return nil
  4819. }
  4820. type DeleteScheduledActionOutput struct {
  4821. _ struct{} `type:"structure"`
  4822. }
  4823. // String returns the string representation
  4824. func (s DeleteScheduledActionOutput) String() string {
  4825. return awsutil.Prettify(s)
  4826. }
  4827. // GoString returns the string representation
  4828. func (s DeleteScheduledActionOutput) GoString() string {
  4829. return s.String()
  4830. }
  4831. // Contains the parameters for DeleteTags.
  4832. type DeleteTagsInput struct {
  4833. _ struct{} `type:"structure"`
  4834. // One or more tags.
  4835. //
  4836. // Tags is a required field
  4837. Tags []*Tag `type:"list" required:"true"`
  4838. }
  4839. // String returns the string representation
  4840. func (s DeleteTagsInput) String() string {
  4841. return awsutil.Prettify(s)
  4842. }
  4843. // GoString returns the string representation
  4844. func (s DeleteTagsInput) GoString() string {
  4845. return s.String()
  4846. }
  4847. // Validate inspects the fields of the type to determine if they are valid.
  4848. func (s *DeleteTagsInput) Validate() error {
  4849. invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"}
  4850. if s.Tags == nil {
  4851. invalidParams.Add(request.NewErrParamRequired("Tags"))
  4852. }
  4853. if s.Tags != nil {
  4854. for i, v := range s.Tags {
  4855. if v == nil {
  4856. continue
  4857. }
  4858. if err := v.Validate(); err != nil {
  4859. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  4860. }
  4861. }
  4862. }
  4863. if invalidParams.Len() > 0 {
  4864. return invalidParams
  4865. }
  4866. return nil
  4867. }
  4868. type DeleteTagsOutput struct {
  4869. _ struct{} `type:"structure"`
  4870. }
  4871. // String returns the string representation
  4872. func (s DeleteTagsOutput) String() string {
  4873. return awsutil.Prettify(s)
  4874. }
  4875. // GoString returns the string representation
  4876. func (s DeleteTagsOutput) GoString() string {
  4877. return s.String()
  4878. }
  4879. type DescribeAccountLimitsInput struct {
  4880. _ struct{} `type:"structure"`
  4881. }
  4882. // String returns the string representation
  4883. func (s DescribeAccountLimitsInput) String() string {
  4884. return awsutil.Prettify(s)
  4885. }
  4886. // GoString returns the string representation
  4887. func (s DescribeAccountLimitsInput) GoString() string {
  4888. return s.String()
  4889. }
  4890. // Contains the parameters for DescribeAccountLimits.
  4891. type DescribeAccountLimitsOutput struct {
  4892. _ struct{} `type:"structure"`
  4893. // The maximum number of groups allowed for your AWS account. The default limit
  4894. // is 20 per region.
  4895. MaxNumberOfAutoScalingGroups *int64 `type:"integer"`
  4896. // The maximum number of launch configurations allowed for your AWS account.
  4897. // The default limit is 100 per region.
  4898. MaxNumberOfLaunchConfigurations *int64 `type:"integer"`
  4899. // The current number of groups for your AWS account.
  4900. NumberOfAutoScalingGroups *int64 `type:"integer"`
  4901. // The current number of launch configurations for your AWS account.
  4902. NumberOfLaunchConfigurations *int64 `type:"integer"`
  4903. }
  4904. // String returns the string representation
  4905. func (s DescribeAccountLimitsOutput) String() string {
  4906. return awsutil.Prettify(s)
  4907. }
  4908. // GoString returns the string representation
  4909. func (s DescribeAccountLimitsOutput) GoString() string {
  4910. return s.String()
  4911. }
  4912. type DescribeAdjustmentTypesInput struct {
  4913. _ struct{} `type:"structure"`
  4914. }
  4915. // String returns the string representation
  4916. func (s DescribeAdjustmentTypesInput) String() string {
  4917. return awsutil.Prettify(s)
  4918. }
  4919. // GoString returns the string representation
  4920. func (s DescribeAdjustmentTypesInput) GoString() string {
  4921. return s.String()
  4922. }
  4923. // Contains the parameters for DescribeAdjustmentTypes.
  4924. type DescribeAdjustmentTypesOutput struct {
  4925. _ struct{} `type:"structure"`
  4926. // The policy adjustment types.
  4927. AdjustmentTypes []*AdjustmentType `type:"list"`
  4928. }
  4929. // String returns the string representation
  4930. func (s DescribeAdjustmentTypesOutput) String() string {
  4931. return awsutil.Prettify(s)
  4932. }
  4933. // GoString returns the string representation
  4934. func (s DescribeAdjustmentTypesOutput) GoString() string {
  4935. return s.String()
  4936. }
  4937. // Contains the parameters for DescribeAutoScalingGroups.
  4938. type DescribeAutoScalingGroupsInput struct {
  4939. _ struct{} `type:"structure"`
  4940. // The group names. If you omit this parameter, all Auto Scaling groups are
  4941. // described.
  4942. AutoScalingGroupNames []*string `type:"list"`
  4943. // The maximum number of items to return with this call.
  4944. MaxRecords *int64 `type:"integer"`
  4945. // The token for the next set of items to return. (You received this token from
  4946. // a previous call.)
  4947. NextToken *string `type:"string"`
  4948. }
  4949. // String returns the string representation
  4950. func (s DescribeAutoScalingGroupsInput) String() string {
  4951. return awsutil.Prettify(s)
  4952. }
  4953. // GoString returns the string representation
  4954. func (s DescribeAutoScalingGroupsInput) GoString() string {
  4955. return s.String()
  4956. }
  4957. // Contains the output for DescribeAutoScalingGroups.
  4958. type DescribeAutoScalingGroupsOutput struct {
  4959. _ struct{} `type:"structure"`
  4960. // The groups.
  4961. //
  4962. // AutoScalingGroups is a required field
  4963. AutoScalingGroups []*Group `type:"list" required:"true"`
  4964. // The token to use when requesting the next set of items. If there are no additional
  4965. // items to return, the string is empty.
  4966. NextToken *string `type:"string"`
  4967. }
  4968. // String returns the string representation
  4969. func (s DescribeAutoScalingGroupsOutput) String() string {
  4970. return awsutil.Prettify(s)
  4971. }
  4972. // GoString returns the string representation
  4973. func (s DescribeAutoScalingGroupsOutput) GoString() string {
  4974. return s.String()
  4975. }
  4976. // Contains the parameters for DescribeAutoScalingInstances.
  4977. type DescribeAutoScalingInstancesInput struct {
  4978. _ struct{} `type:"structure"`
  4979. // The instances to describe; up to 50 instance IDs. If you omit this parameter,
  4980. // all Auto Scaling instances are described. If you specify an ID that does
  4981. // not exist, it is ignored with no error.
  4982. InstanceIds []*string `type:"list"`
  4983. // The maximum number of items to return with this call.
  4984. MaxRecords *int64 `type:"integer"`
  4985. // The token for the next set of items to return. (You received this token from
  4986. // a previous call.)
  4987. NextToken *string `type:"string"`
  4988. }
  4989. // String returns the string representation
  4990. func (s DescribeAutoScalingInstancesInput) String() string {
  4991. return awsutil.Prettify(s)
  4992. }
  4993. // GoString returns the string representation
  4994. func (s DescribeAutoScalingInstancesInput) GoString() string {
  4995. return s.String()
  4996. }
  4997. // Contains the output of DescribeAutoScalingInstances.
  4998. type DescribeAutoScalingInstancesOutput struct {
  4999. _ struct{} `type:"structure"`
  5000. // The instances.
  5001. AutoScalingInstances []*InstanceDetails `type:"list"`
  5002. // The token to use when requesting the next set of items. If there are no additional
  5003. // items to return, the string is empty.
  5004. NextToken *string `type:"string"`
  5005. }
  5006. // String returns the string representation
  5007. func (s DescribeAutoScalingInstancesOutput) String() string {
  5008. return awsutil.Prettify(s)
  5009. }
  5010. // GoString returns the string representation
  5011. func (s DescribeAutoScalingInstancesOutput) GoString() string {
  5012. return s.String()
  5013. }
  5014. type DescribeAutoScalingNotificationTypesInput struct {
  5015. _ struct{} `type:"structure"`
  5016. }
  5017. // String returns the string representation
  5018. func (s DescribeAutoScalingNotificationTypesInput) String() string {
  5019. return awsutil.Prettify(s)
  5020. }
  5021. // GoString returns the string representation
  5022. func (s DescribeAutoScalingNotificationTypesInput) GoString() string {
  5023. return s.String()
  5024. }
  5025. // Contains the output of DescribeAutoScalingNotificationTypes.
  5026. type DescribeAutoScalingNotificationTypesOutput struct {
  5027. _ struct{} `type:"structure"`
  5028. // The notification types.
  5029. AutoScalingNotificationTypes []*string `type:"list"`
  5030. }
  5031. // String returns the string representation
  5032. func (s DescribeAutoScalingNotificationTypesOutput) String() string {
  5033. return awsutil.Prettify(s)
  5034. }
  5035. // GoString returns the string representation
  5036. func (s DescribeAutoScalingNotificationTypesOutput) GoString() string {
  5037. return s.String()
  5038. }
  5039. // Contains the parameters for DescribeLaunchConfigurations.
  5040. type DescribeLaunchConfigurationsInput struct {
  5041. _ struct{} `type:"structure"`
  5042. // The launch configuration names. If you omit this parameter, all launch configurations
  5043. // are described.
  5044. LaunchConfigurationNames []*string `type:"list"`
  5045. // The maximum number of items to return with this call. The default is 100.
  5046. MaxRecords *int64 `type:"integer"`
  5047. // The token for the next set of items to return. (You received this token from
  5048. // a previous call.)
  5049. NextToken *string `type:"string"`
  5050. }
  5051. // String returns the string representation
  5052. func (s DescribeLaunchConfigurationsInput) String() string {
  5053. return awsutil.Prettify(s)
  5054. }
  5055. // GoString returns the string representation
  5056. func (s DescribeLaunchConfigurationsInput) GoString() string {
  5057. return s.String()
  5058. }
  5059. // Contains the output of DescribeLaunchConfigurations.
  5060. type DescribeLaunchConfigurationsOutput struct {
  5061. _ struct{} `type:"structure"`
  5062. // The launch configurations.
  5063. //
  5064. // LaunchConfigurations is a required field
  5065. LaunchConfigurations []*LaunchConfiguration `type:"list" required:"true"`
  5066. // The token to use when requesting the next set of items. If there are no additional
  5067. // items to return, the string is empty.
  5068. NextToken *string `type:"string"`
  5069. }
  5070. // String returns the string representation
  5071. func (s DescribeLaunchConfigurationsOutput) String() string {
  5072. return awsutil.Prettify(s)
  5073. }
  5074. // GoString returns the string representation
  5075. func (s DescribeLaunchConfigurationsOutput) GoString() string {
  5076. return s.String()
  5077. }
  5078. type DescribeLifecycleHookTypesInput struct {
  5079. _ struct{} `type:"structure"`
  5080. }
  5081. // String returns the string representation
  5082. func (s DescribeLifecycleHookTypesInput) String() string {
  5083. return awsutil.Prettify(s)
  5084. }
  5085. // GoString returns the string representation
  5086. func (s DescribeLifecycleHookTypesInput) GoString() string {
  5087. return s.String()
  5088. }
  5089. // Contains the output of DescribeLifecycleHookTypes.
  5090. type DescribeLifecycleHookTypesOutput struct {
  5091. _ struct{} `type:"structure"`
  5092. // The lifecycle hook types.
  5093. LifecycleHookTypes []*string `type:"list"`
  5094. }
  5095. // String returns the string representation
  5096. func (s DescribeLifecycleHookTypesOutput) String() string {
  5097. return awsutil.Prettify(s)
  5098. }
  5099. // GoString returns the string representation
  5100. func (s DescribeLifecycleHookTypesOutput) GoString() string {
  5101. return s.String()
  5102. }
  5103. // Contains the parameters for DescribeLifecycleHooks.
  5104. type DescribeLifecycleHooksInput struct {
  5105. _ struct{} `type:"structure"`
  5106. // The name of the group.
  5107. //
  5108. // AutoScalingGroupName is a required field
  5109. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5110. // The names of one or more lifecycle hooks. If you omit this parameter, all
  5111. // lifecycle hooks are described.
  5112. LifecycleHookNames []*string `type:"list"`
  5113. }
  5114. // String returns the string representation
  5115. func (s DescribeLifecycleHooksInput) String() string {
  5116. return awsutil.Prettify(s)
  5117. }
  5118. // GoString returns the string representation
  5119. func (s DescribeLifecycleHooksInput) GoString() string {
  5120. return s.String()
  5121. }
  5122. // Validate inspects the fields of the type to determine if they are valid.
  5123. func (s *DescribeLifecycleHooksInput) Validate() error {
  5124. invalidParams := request.ErrInvalidParams{Context: "DescribeLifecycleHooksInput"}
  5125. if s.AutoScalingGroupName == nil {
  5126. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5127. }
  5128. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5129. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5130. }
  5131. if invalidParams.Len() > 0 {
  5132. return invalidParams
  5133. }
  5134. return nil
  5135. }
  5136. // Contains the output of DescribeLifecycleHooks.
  5137. type DescribeLifecycleHooksOutput struct {
  5138. _ struct{} `type:"structure"`
  5139. // The lifecycle hooks for the specified group.
  5140. LifecycleHooks []*LifecycleHook `type:"list"`
  5141. }
  5142. // String returns the string representation
  5143. func (s DescribeLifecycleHooksOutput) String() string {
  5144. return awsutil.Prettify(s)
  5145. }
  5146. // GoString returns the string representation
  5147. func (s DescribeLifecycleHooksOutput) GoString() string {
  5148. return s.String()
  5149. }
  5150. // Contains the parameters for DescribeLoadBalancerTargetGroups.
  5151. type DescribeLoadBalancerTargetGroupsInput struct {
  5152. _ struct{} `type:"structure"`
  5153. // The name of the Auto Scaling group.
  5154. //
  5155. // AutoScalingGroupName is a required field
  5156. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5157. // The maximum number of items to return with this call.
  5158. MaxRecords *int64 `type:"integer"`
  5159. // The token for the next set of items to return. (You received this token from
  5160. // a previous call.)
  5161. NextToken *string `type:"string"`
  5162. }
  5163. // String returns the string representation
  5164. func (s DescribeLoadBalancerTargetGroupsInput) String() string {
  5165. return awsutil.Prettify(s)
  5166. }
  5167. // GoString returns the string representation
  5168. func (s DescribeLoadBalancerTargetGroupsInput) GoString() string {
  5169. return s.String()
  5170. }
  5171. // Validate inspects the fields of the type to determine if they are valid.
  5172. func (s *DescribeLoadBalancerTargetGroupsInput) Validate() error {
  5173. invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancerTargetGroupsInput"}
  5174. if s.AutoScalingGroupName == nil {
  5175. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5176. }
  5177. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5178. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5179. }
  5180. if invalidParams.Len() > 0 {
  5181. return invalidParams
  5182. }
  5183. return nil
  5184. }
  5185. // Contains the output of DescribeLoadBalancerTargetGroups.
  5186. type DescribeLoadBalancerTargetGroupsOutput struct {
  5187. _ struct{} `type:"structure"`
  5188. // Information about the target groups.
  5189. LoadBalancerTargetGroups []*LoadBalancerTargetGroupState `type:"list"`
  5190. // The token to use when requesting the next set of items. If there are no additional
  5191. // items to return, the string is empty.
  5192. NextToken *string `type:"string"`
  5193. }
  5194. // String returns the string representation
  5195. func (s DescribeLoadBalancerTargetGroupsOutput) String() string {
  5196. return awsutil.Prettify(s)
  5197. }
  5198. // GoString returns the string representation
  5199. func (s DescribeLoadBalancerTargetGroupsOutput) GoString() string {
  5200. return s.String()
  5201. }
  5202. // Contains the parameters for DescribeLoadBalancers.
  5203. type DescribeLoadBalancersInput struct {
  5204. _ struct{} `type:"structure"`
  5205. // The name of the group.
  5206. //
  5207. // AutoScalingGroupName is a required field
  5208. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5209. // The maximum number of items to return with this call.
  5210. MaxRecords *int64 `type:"integer"`
  5211. // The token for the next set of items to return. (You received this token from
  5212. // a previous call.)
  5213. NextToken *string `type:"string"`
  5214. }
  5215. // String returns the string representation
  5216. func (s DescribeLoadBalancersInput) String() string {
  5217. return awsutil.Prettify(s)
  5218. }
  5219. // GoString returns the string representation
  5220. func (s DescribeLoadBalancersInput) GoString() string {
  5221. return s.String()
  5222. }
  5223. // Validate inspects the fields of the type to determine if they are valid.
  5224. func (s *DescribeLoadBalancersInput) Validate() error {
  5225. invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancersInput"}
  5226. if s.AutoScalingGroupName == nil {
  5227. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5228. }
  5229. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5230. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5231. }
  5232. if invalidParams.Len() > 0 {
  5233. return invalidParams
  5234. }
  5235. return nil
  5236. }
  5237. // Contains the output of DescribeLoadBalancers.
  5238. type DescribeLoadBalancersOutput struct {
  5239. _ struct{} `type:"structure"`
  5240. // The load balancers.
  5241. LoadBalancers []*LoadBalancerState `type:"list"`
  5242. // The token to use when requesting the next set of items. If there are no additional
  5243. // items to return, the string is empty.
  5244. NextToken *string `type:"string"`
  5245. }
  5246. // String returns the string representation
  5247. func (s DescribeLoadBalancersOutput) String() string {
  5248. return awsutil.Prettify(s)
  5249. }
  5250. // GoString returns the string representation
  5251. func (s DescribeLoadBalancersOutput) GoString() string {
  5252. return s.String()
  5253. }
  5254. type DescribeMetricCollectionTypesInput struct {
  5255. _ struct{} `type:"structure"`
  5256. }
  5257. // String returns the string representation
  5258. func (s DescribeMetricCollectionTypesInput) String() string {
  5259. return awsutil.Prettify(s)
  5260. }
  5261. // GoString returns the string representation
  5262. func (s DescribeMetricCollectionTypesInput) GoString() string {
  5263. return s.String()
  5264. }
  5265. // Contains the output of DescribeMetricsCollectionTypes.
  5266. type DescribeMetricCollectionTypesOutput struct {
  5267. _ struct{} `type:"structure"`
  5268. // The granularities for the metrics.
  5269. Granularities []*MetricGranularityType `type:"list"`
  5270. // One or more metrics.
  5271. Metrics []*MetricCollectionType `type:"list"`
  5272. }
  5273. // String returns the string representation
  5274. func (s DescribeMetricCollectionTypesOutput) String() string {
  5275. return awsutil.Prettify(s)
  5276. }
  5277. // GoString returns the string representation
  5278. func (s DescribeMetricCollectionTypesOutput) GoString() string {
  5279. return s.String()
  5280. }
  5281. // Contains the parameters for DescribeNotificationConfigurations.
  5282. type DescribeNotificationConfigurationsInput struct {
  5283. _ struct{} `type:"structure"`
  5284. // The name of the group.
  5285. AutoScalingGroupNames []*string `type:"list"`
  5286. // The maximum number of items to return with this call.
  5287. MaxRecords *int64 `type:"integer"`
  5288. // The token for the next set of items to return. (You received this token from
  5289. // a previous call.)
  5290. NextToken *string `type:"string"`
  5291. }
  5292. // String returns the string representation
  5293. func (s DescribeNotificationConfigurationsInput) String() string {
  5294. return awsutil.Prettify(s)
  5295. }
  5296. // GoString returns the string representation
  5297. func (s DescribeNotificationConfigurationsInput) GoString() string {
  5298. return s.String()
  5299. }
  5300. // Contains the output from DescribeNotificationConfigurations.
  5301. type DescribeNotificationConfigurationsOutput struct {
  5302. _ struct{} `type:"structure"`
  5303. // The token to use when requesting the next set of items. If there are no additional
  5304. // items to return, the string is empty.
  5305. NextToken *string `type:"string"`
  5306. // The notification configurations.
  5307. //
  5308. // NotificationConfigurations is a required field
  5309. NotificationConfigurations []*NotificationConfiguration `type:"list" required:"true"`
  5310. }
  5311. // String returns the string representation
  5312. func (s DescribeNotificationConfigurationsOutput) String() string {
  5313. return awsutil.Prettify(s)
  5314. }
  5315. // GoString returns the string representation
  5316. func (s DescribeNotificationConfigurationsOutput) GoString() string {
  5317. return s.String()
  5318. }
  5319. // Contains the parameters for DescribePolicies.
  5320. type DescribePoliciesInput struct {
  5321. _ struct{} `type:"structure"`
  5322. // The name of the group.
  5323. AutoScalingGroupName *string `min:"1" type:"string"`
  5324. // The maximum number of items to be returned with each call.
  5325. MaxRecords *int64 `type:"integer"`
  5326. // The token for the next set of items to return. (You received this token from
  5327. // a previous call.)
  5328. NextToken *string `type:"string"`
  5329. // One or more policy names or policy ARNs to be described. If you omit this
  5330. // parameter, all policy names are described. If an group name is provided,
  5331. // the results are limited to that group. This list is limited to 50 items.
  5332. // If you specify an unknown policy name, it is ignored with no error.
  5333. PolicyNames []*string `type:"list"`
  5334. // One or more policy types. Valid values are SimpleScaling and StepScaling.
  5335. PolicyTypes []*string `type:"list"`
  5336. }
  5337. // String returns the string representation
  5338. func (s DescribePoliciesInput) String() string {
  5339. return awsutil.Prettify(s)
  5340. }
  5341. // GoString returns the string representation
  5342. func (s DescribePoliciesInput) GoString() string {
  5343. return s.String()
  5344. }
  5345. // Validate inspects the fields of the type to determine if they are valid.
  5346. func (s *DescribePoliciesInput) Validate() error {
  5347. invalidParams := request.ErrInvalidParams{Context: "DescribePoliciesInput"}
  5348. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5349. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5350. }
  5351. if invalidParams.Len() > 0 {
  5352. return invalidParams
  5353. }
  5354. return nil
  5355. }
  5356. // Contains the output of DescribePolicies.
  5357. type DescribePoliciesOutput struct {
  5358. _ struct{} `type:"structure"`
  5359. // The token to use when requesting the next set of items. If there are no additional
  5360. // items to return, the string is empty.
  5361. NextToken *string `type:"string"`
  5362. // The scaling policies.
  5363. ScalingPolicies []*ScalingPolicy `type:"list"`
  5364. }
  5365. // String returns the string representation
  5366. func (s DescribePoliciesOutput) String() string {
  5367. return awsutil.Prettify(s)
  5368. }
  5369. // GoString returns the string representation
  5370. func (s DescribePoliciesOutput) GoString() string {
  5371. return s.String()
  5372. }
  5373. // Contains the parameters for DescribeScalingActivities.
  5374. type DescribeScalingActivitiesInput struct {
  5375. _ struct{} `type:"structure"`
  5376. // The activity IDs of the desired scaling activities. If you omit this parameter,
  5377. // all activities for the past six weeks are described. If you specify an Auto
  5378. // Scaling group, the results are limited to that group. The list of requested
  5379. // activities cannot contain more than 50 items. If unknown activities are requested,
  5380. // they are ignored with no error.
  5381. ActivityIds []*string `type:"list"`
  5382. // The name of the group.
  5383. AutoScalingGroupName *string `min:"1" type:"string"`
  5384. // The maximum number of items to return with this call.
  5385. MaxRecords *int64 `type:"integer"`
  5386. // The token for the next set of items to return. (You received this token from
  5387. // a previous call.)
  5388. NextToken *string `type:"string"`
  5389. }
  5390. // String returns the string representation
  5391. func (s DescribeScalingActivitiesInput) String() string {
  5392. return awsutil.Prettify(s)
  5393. }
  5394. // GoString returns the string representation
  5395. func (s DescribeScalingActivitiesInput) GoString() string {
  5396. return s.String()
  5397. }
  5398. // Validate inspects the fields of the type to determine if they are valid.
  5399. func (s *DescribeScalingActivitiesInput) Validate() error {
  5400. invalidParams := request.ErrInvalidParams{Context: "DescribeScalingActivitiesInput"}
  5401. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5402. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5403. }
  5404. if invalidParams.Len() > 0 {
  5405. return invalidParams
  5406. }
  5407. return nil
  5408. }
  5409. // Contains the output of DescribeScalingActivities.
  5410. type DescribeScalingActivitiesOutput struct {
  5411. _ struct{} `type:"structure"`
  5412. // The scaling activities. Activities are sorted by start time. Activities still
  5413. // in progress are described first.
  5414. //
  5415. // Activities is a required field
  5416. Activities []*Activity `type:"list" required:"true"`
  5417. // The token to use when requesting the next set of items. If there are no additional
  5418. // items to return, the string is empty.
  5419. NextToken *string `type:"string"`
  5420. }
  5421. // String returns the string representation
  5422. func (s DescribeScalingActivitiesOutput) String() string {
  5423. return awsutil.Prettify(s)
  5424. }
  5425. // GoString returns the string representation
  5426. func (s DescribeScalingActivitiesOutput) GoString() string {
  5427. return s.String()
  5428. }
  5429. type DescribeScalingProcessTypesInput struct {
  5430. _ struct{} `type:"structure"`
  5431. }
  5432. // String returns the string representation
  5433. func (s DescribeScalingProcessTypesInput) String() string {
  5434. return awsutil.Prettify(s)
  5435. }
  5436. // GoString returns the string representation
  5437. func (s DescribeScalingProcessTypesInput) GoString() string {
  5438. return s.String()
  5439. }
  5440. // Contains the output of DescribeScalingProcessTypes.
  5441. type DescribeScalingProcessTypesOutput struct {
  5442. _ struct{} `type:"structure"`
  5443. // The names of the process types.
  5444. Processes []*ProcessType `type:"list"`
  5445. }
  5446. // String returns the string representation
  5447. func (s DescribeScalingProcessTypesOutput) String() string {
  5448. return awsutil.Prettify(s)
  5449. }
  5450. // GoString returns the string representation
  5451. func (s DescribeScalingProcessTypesOutput) GoString() string {
  5452. return s.String()
  5453. }
  5454. // Contains the parameters for DescribeScheduledActions.
  5455. type DescribeScheduledActionsInput struct {
  5456. _ struct{} `type:"structure"`
  5457. // The name of the group.
  5458. AutoScalingGroupName *string `min:"1" type:"string"`
  5459. // The latest scheduled start time to return. If scheduled action names are
  5460. // provided, this parameter is ignored.
  5461. EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  5462. // The maximum number of items to return with this call.
  5463. MaxRecords *int64 `type:"integer"`
  5464. // The token for the next set of items to return. (You received this token from
  5465. // a previous call.)
  5466. NextToken *string `type:"string"`
  5467. // Describes one or more scheduled actions. If you omit this parameter, all
  5468. // scheduled actions are described. If you specify an unknown scheduled action,
  5469. // it is ignored with no error.
  5470. //
  5471. // You can describe up to a maximum of 50 instances with a single call. If there
  5472. // are more items to return, the call returns a token. To get the next set of
  5473. // items, repeat the call with the returned token.
  5474. ScheduledActionNames []*string `type:"list"`
  5475. // The earliest scheduled start time to return. If scheduled action names are
  5476. // provided, this parameter is ignored.
  5477. StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  5478. }
  5479. // String returns the string representation
  5480. func (s DescribeScheduledActionsInput) String() string {
  5481. return awsutil.Prettify(s)
  5482. }
  5483. // GoString returns the string representation
  5484. func (s DescribeScheduledActionsInput) GoString() string {
  5485. return s.String()
  5486. }
  5487. // Validate inspects the fields of the type to determine if they are valid.
  5488. func (s *DescribeScheduledActionsInput) Validate() error {
  5489. invalidParams := request.ErrInvalidParams{Context: "DescribeScheduledActionsInput"}
  5490. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5491. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5492. }
  5493. if invalidParams.Len() > 0 {
  5494. return invalidParams
  5495. }
  5496. return nil
  5497. }
  5498. // Contains the output of DescribeScheduledActions.
  5499. type DescribeScheduledActionsOutput struct {
  5500. _ struct{} `type:"structure"`
  5501. // The token to use when requesting the next set of items. If there are no additional
  5502. // items to return, the string is empty.
  5503. NextToken *string `type:"string"`
  5504. // The scheduled actions.
  5505. ScheduledUpdateGroupActions []*ScheduledUpdateGroupAction `type:"list"`
  5506. }
  5507. // String returns the string representation
  5508. func (s DescribeScheduledActionsOutput) String() string {
  5509. return awsutil.Prettify(s)
  5510. }
  5511. // GoString returns the string representation
  5512. func (s DescribeScheduledActionsOutput) GoString() string {
  5513. return s.String()
  5514. }
  5515. // Contains the parameters for DescribeTags.
  5516. type DescribeTagsInput struct {
  5517. _ struct{} `type:"structure"`
  5518. // A filter used to scope the tags to return.
  5519. Filters []*Filter `type:"list"`
  5520. // The maximum number of items to return with this call.
  5521. MaxRecords *int64 `type:"integer"`
  5522. // The token for the next set of items to return. (You received this token from
  5523. // a previous call.)
  5524. NextToken *string `type:"string"`
  5525. }
  5526. // String returns the string representation
  5527. func (s DescribeTagsInput) String() string {
  5528. return awsutil.Prettify(s)
  5529. }
  5530. // GoString returns the string representation
  5531. func (s DescribeTagsInput) GoString() string {
  5532. return s.String()
  5533. }
  5534. // Contains the output of DescribeTags.
  5535. type DescribeTagsOutput struct {
  5536. _ struct{} `type:"structure"`
  5537. // The token to use when requesting the next set of items. If there are no additional
  5538. // items to return, the string is empty.
  5539. NextToken *string `type:"string"`
  5540. // One or more tags.
  5541. Tags []*TagDescription `type:"list"`
  5542. }
  5543. // String returns the string representation
  5544. func (s DescribeTagsOutput) String() string {
  5545. return awsutil.Prettify(s)
  5546. }
  5547. // GoString returns the string representation
  5548. func (s DescribeTagsOutput) GoString() string {
  5549. return s.String()
  5550. }
  5551. type DescribeTerminationPolicyTypesInput struct {
  5552. _ struct{} `type:"structure"`
  5553. }
  5554. // String returns the string representation
  5555. func (s DescribeTerminationPolicyTypesInput) String() string {
  5556. return awsutil.Prettify(s)
  5557. }
  5558. // GoString returns the string representation
  5559. func (s DescribeTerminationPolicyTypesInput) GoString() string {
  5560. return s.String()
  5561. }
  5562. // Contains the output of DescribeTerminationPolicyTypes.
  5563. type DescribeTerminationPolicyTypesOutput struct {
  5564. _ struct{} `type:"structure"`
  5565. // The termination policies supported by Auto Scaling (OldestInstance, OldestLaunchConfiguration,
  5566. // NewestInstance, ClosestToNextInstanceHour, and Default).
  5567. TerminationPolicyTypes []*string `type:"list"`
  5568. }
  5569. // String returns the string representation
  5570. func (s DescribeTerminationPolicyTypesOutput) String() string {
  5571. return awsutil.Prettify(s)
  5572. }
  5573. // GoString returns the string representation
  5574. func (s DescribeTerminationPolicyTypesOutput) GoString() string {
  5575. return s.String()
  5576. }
  5577. // Contains the parameters for DetachInstances.
  5578. type DetachInstancesInput struct {
  5579. _ struct{} `type:"structure"`
  5580. // The name of the group.
  5581. //
  5582. // AutoScalingGroupName is a required field
  5583. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5584. // One or more instance IDs.
  5585. InstanceIds []*string `type:"list"`
  5586. // If True, the Auto Scaling group decrements the desired capacity value by
  5587. // the number of instances detached.
  5588. //
  5589. // ShouldDecrementDesiredCapacity is a required field
  5590. ShouldDecrementDesiredCapacity *bool `type:"boolean" required:"true"`
  5591. }
  5592. // String returns the string representation
  5593. func (s DetachInstancesInput) String() string {
  5594. return awsutil.Prettify(s)
  5595. }
  5596. // GoString returns the string representation
  5597. func (s DetachInstancesInput) GoString() string {
  5598. return s.String()
  5599. }
  5600. // Validate inspects the fields of the type to determine if they are valid.
  5601. func (s *DetachInstancesInput) Validate() error {
  5602. invalidParams := request.ErrInvalidParams{Context: "DetachInstancesInput"}
  5603. if s.AutoScalingGroupName == nil {
  5604. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5605. }
  5606. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5607. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5608. }
  5609. if s.ShouldDecrementDesiredCapacity == nil {
  5610. invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity"))
  5611. }
  5612. if invalidParams.Len() > 0 {
  5613. return invalidParams
  5614. }
  5615. return nil
  5616. }
  5617. // Contains the output of DetachInstances.
  5618. type DetachInstancesOutput struct {
  5619. _ struct{} `type:"structure"`
  5620. // The activities related to detaching the instances from the Auto Scaling group.
  5621. Activities []*Activity `type:"list"`
  5622. }
  5623. // String returns the string representation
  5624. func (s DetachInstancesOutput) String() string {
  5625. return awsutil.Prettify(s)
  5626. }
  5627. // GoString returns the string representation
  5628. func (s DetachInstancesOutput) GoString() string {
  5629. return s.String()
  5630. }
  5631. type DetachLoadBalancerTargetGroupsInput struct {
  5632. _ struct{} `type:"structure"`
  5633. // The name of the Auto Scaling group.
  5634. //
  5635. // AutoScalingGroupName is a required field
  5636. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5637. // The Amazon Resource Names (ARN) of the target groups.
  5638. //
  5639. // TargetGroupARNs is a required field
  5640. TargetGroupARNs []*string `type:"list" required:"true"`
  5641. }
  5642. // String returns the string representation
  5643. func (s DetachLoadBalancerTargetGroupsInput) String() string {
  5644. return awsutil.Prettify(s)
  5645. }
  5646. // GoString returns the string representation
  5647. func (s DetachLoadBalancerTargetGroupsInput) GoString() string {
  5648. return s.String()
  5649. }
  5650. // Validate inspects the fields of the type to determine if they are valid.
  5651. func (s *DetachLoadBalancerTargetGroupsInput) Validate() error {
  5652. invalidParams := request.ErrInvalidParams{Context: "DetachLoadBalancerTargetGroupsInput"}
  5653. if s.AutoScalingGroupName == nil {
  5654. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5655. }
  5656. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5657. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5658. }
  5659. if s.TargetGroupARNs == nil {
  5660. invalidParams.Add(request.NewErrParamRequired("TargetGroupARNs"))
  5661. }
  5662. if invalidParams.Len() > 0 {
  5663. return invalidParams
  5664. }
  5665. return nil
  5666. }
  5667. type DetachLoadBalancerTargetGroupsOutput struct {
  5668. _ struct{} `type:"structure"`
  5669. }
  5670. // String returns the string representation
  5671. func (s DetachLoadBalancerTargetGroupsOutput) String() string {
  5672. return awsutil.Prettify(s)
  5673. }
  5674. // GoString returns the string representation
  5675. func (s DetachLoadBalancerTargetGroupsOutput) GoString() string {
  5676. return s.String()
  5677. }
  5678. // Contains the parameters for DetachLoadBalancers.
  5679. type DetachLoadBalancersInput struct {
  5680. _ struct{} `type:"structure"`
  5681. // The name of the Auto Scaling group.
  5682. //
  5683. // AutoScalingGroupName is a required field
  5684. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5685. // One or more load balancer names.
  5686. //
  5687. // LoadBalancerNames is a required field
  5688. LoadBalancerNames []*string `type:"list" required:"true"`
  5689. }
  5690. // String returns the string representation
  5691. func (s DetachLoadBalancersInput) String() string {
  5692. return awsutil.Prettify(s)
  5693. }
  5694. // GoString returns the string representation
  5695. func (s DetachLoadBalancersInput) GoString() string {
  5696. return s.String()
  5697. }
  5698. // Validate inspects the fields of the type to determine if they are valid.
  5699. func (s *DetachLoadBalancersInput) Validate() error {
  5700. invalidParams := request.ErrInvalidParams{Context: "DetachLoadBalancersInput"}
  5701. if s.AutoScalingGroupName == nil {
  5702. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5703. }
  5704. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5705. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5706. }
  5707. if s.LoadBalancerNames == nil {
  5708. invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames"))
  5709. }
  5710. if invalidParams.Len() > 0 {
  5711. return invalidParams
  5712. }
  5713. return nil
  5714. }
  5715. // Contains the output for DetachLoadBalancers.
  5716. type DetachLoadBalancersOutput struct {
  5717. _ struct{} `type:"structure"`
  5718. }
  5719. // String returns the string representation
  5720. func (s DetachLoadBalancersOutput) String() string {
  5721. return awsutil.Prettify(s)
  5722. }
  5723. // GoString returns the string representation
  5724. func (s DetachLoadBalancersOutput) GoString() string {
  5725. return s.String()
  5726. }
  5727. // Contains the parameters for DisableMetricsCollection.
  5728. type DisableMetricsCollectionInput struct {
  5729. _ struct{} `type:"structure"`
  5730. // The name or Amazon Resource Name (ARN) of the group.
  5731. //
  5732. // AutoScalingGroupName is a required field
  5733. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5734. // One or more of the following metrics. If you omit this parameter, all metrics
  5735. // are disabled.
  5736. //
  5737. // * GroupMinSize
  5738. //
  5739. // * GroupMaxSize
  5740. //
  5741. // * GroupDesiredCapacity
  5742. //
  5743. // * GroupInServiceInstances
  5744. //
  5745. // * GroupPendingInstances
  5746. //
  5747. // * GroupStandbyInstances
  5748. //
  5749. // * GroupTerminatingInstances
  5750. //
  5751. // * GroupTotalInstances
  5752. Metrics []*string `type:"list"`
  5753. }
  5754. // String returns the string representation
  5755. func (s DisableMetricsCollectionInput) String() string {
  5756. return awsutil.Prettify(s)
  5757. }
  5758. // GoString returns the string representation
  5759. func (s DisableMetricsCollectionInput) GoString() string {
  5760. return s.String()
  5761. }
  5762. // Validate inspects the fields of the type to determine if they are valid.
  5763. func (s *DisableMetricsCollectionInput) Validate() error {
  5764. invalidParams := request.ErrInvalidParams{Context: "DisableMetricsCollectionInput"}
  5765. if s.AutoScalingGroupName == nil {
  5766. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5767. }
  5768. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5769. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5770. }
  5771. if invalidParams.Len() > 0 {
  5772. return invalidParams
  5773. }
  5774. return nil
  5775. }
  5776. type DisableMetricsCollectionOutput struct {
  5777. _ struct{} `type:"structure"`
  5778. }
  5779. // String returns the string representation
  5780. func (s DisableMetricsCollectionOutput) String() string {
  5781. return awsutil.Prettify(s)
  5782. }
  5783. // GoString returns the string representation
  5784. func (s DisableMetricsCollectionOutput) GoString() string {
  5785. return s.String()
  5786. }
  5787. // Describes an Amazon EBS volume.
  5788. type Ebs struct {
  5789. _ struct{} `type:"structure"`
  5790. // Indicates whether the volume is deleted on instance termination.
  5791. //
  5792. // Default: true
  5793. DeleteOnTermination *bool `type:"boolean"`
  5794. // Indicates whether the volume should be encrypted. Encrypted EBS volumes must
  5795. // be attached to instances that support Amazon EBS encryption. Volumes that
  5796. // are created from encrypted snapshots are automatically encrypted. There is
  5797. // no way to create an encrypted volume from an unencrypted snapshot or an unencrypted
  5798. // volume from an encrypted snapshot. For more information, see Amazon EBS Encryption
  5799. // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in
  5800. // the Amazon Elastic Compute Cloud User Guide.
  5801. Encrypted *bool `type:"boolean"`
  5802. // The number of I/O operations per second (IOPS) to provision for the volume.
  5803. //
  5804. // Constraint: Required when the volume type is io1.
  5805. Iops *int64 `min:"100" type:"integer"`
  5806. // The ID of the snapshot.
  5807. SnapshotId *string `min:"1" type:"string"`
  5808. // The volume size, in GiB. For standard volumes, specify a value from 1 to
  5809. // 1,024. For io1 volumes, specify a value from 4 to 16,384. For gp2 volumes,
  5810. // specify a value from 1 to 16,384. If you specify a snapshot, the volume size
  5811. // must be equal to or larger than the snapshot size.
  5812. //
  5813. // Default: If you create a volume from a snapshot and you don't specify a volume
  5814. // size, the default is the snapshot size.
  5815. VolumeSize *int64 `min:"1" type:"integer"`
  5816. // The volume type. For more information, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html)
  5817. // in the Amazon Elastic Compute Cloud User Guide.
  5818. //
  5819. // Valid values: standard | io1 | gp2
  5820. //
  5821. // Default: standard
  5822. VolumeType *string `min:"1" type:"string"`
  5823. }
  5824. // String returns the string representation
  5825. func (s Ebs) String() string {
  5826. return awsutil.Prettify(s)
  5827. }
  5828. // GoString returns the string representation
  5829. func (s Ebs) GoString() string {
  5830. return s.String()
  5831. }
  5832. // Validate inspects the fields of the type to determine if they are valid.
  5833. func (s *Ebs) Validate() error {
  5834. invalidParams := request.ErrInvalidParams{Context: "Ebs"}
  5835. if s.Iops != nil && *s.Iops < 100 {
  5836. invalidParams.Add(request.NewErrParamMinValue("Iops", 100))
  5837. }
  5838. if s.SnapshotId != nil && len(*s.SnapshotId) < 1 {
  5839. invalidParams.Add(request.NewErrParamMinLen("SnapshotId", 1))
  5840. }
  5841. if s.VolumeSize != nil && *s.VolumeSize < 1 {
  5842. invalidParams.Add(request.NewErrParamMinValue("VolumeSize", 1))
  5843. }
  5844. if s.VolumeType != nil && len(*s.VolumeType) < 1 {
  5845. invalidParams.Add(request.NewErrParamMinLen("VolumeType", 1))
  5846. }
  5847. if invalidParams.Len() > 0 {
  5848. return invalidParams
  5849. }
  5850. return nil
  5851. }
  5852. // Contains the parameters for EnableMetricsCollection.
  5853. type EnableMetricsCollectionInput struct {
  5854. _ struct{} `type:"structure"`
  5855. // The name or ARN of the Auto Scaling group.
  5856. //
  5857. // AutoScalingGroupName is a required field
  5858. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5859. // The granularity to associate with the metrics to collect. The only valid
  5860. // value is 1Minute.
  5861. //
  5862. // Granularity is a required field
  5863. Granularity *string `min:"1" type:"string" required:"true"`
  5864. // One or more of the following metrics. If you omit this parameter, all metrics
  5865. // are enabled.
  5866. //
  5867. // * GroupMinSize
  5868. //
  5869. // * GroupMaxSize
  5870. //
  5871. // * GroupDesiredCapacity
  5872. //
  5873. // * GroupInServiceInstances
  5874. //
  5875. // * GroupPendingInstances
  5876. //
  5877. // * GroupStandbyInstances
  5878. //
  5879. // * GroupTerminatingInstances
  5880. //
  5881. // * GroupTotalInstances
  5882. Metrics []*string `type:"list"`
  5883. }
  5884. // String returns the string representation
  5885. func (s EnableMetricsCollectionInput) String() string {
  5886. return awsutil.Prettify(s)
  5887. }
  5888. // GoString returns the string representation
  5889. func (s EnableMetricsCollectionInput) GoString() string {
  5890. return s.String()
  5891. }
  5892. // Validate inspects the fields of the type to determine if they are valid.
  5893. func (s *EnableMetricsCollectionInput) Validate() error {
  5894. invalidParams := request.ErrInvalidParams{Context: "EnableMetricsCollectionInput"}
  5895. if s.AutoScalingGroupName == nil {
  5896. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5897. }
  5898. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5899. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5900. }
  5901. if s.Granularity == nil {
  5902. invalidParams.Add(request.NewErrParamRequired("Granularity"))
  5903. }
  5904. if s.Granularity != nil && len(*s.Granularity) < 1 {
  5905. invalidParams.Add(request.NewErrParamMinLen("Granularity", 1))
  5906. }
  5907. if invalidParams.Len() > 0 {
  5908. return invalidParams
  5909. }
  5910. return nil
  5911. }
  5912. type EnableMetricsCollectionOutput struct {
  5913. _ struct{} `type:"structure"`
  5914. }
  5915. // String returns the string representation
  5916. func (s EnableMetricsCollectionOutput) String() string {
  5917. return awsutil.Prettify(s)
  5918. }
  5919. // GoString returns the string representation
  5920. func (s EnableMetricsCollectionOutput) GoString() string {
  5921. return s.String()
  5922. }
  5923. // Describes an enabled metric.
  5924. type EnabledMetric struct {
  5925. _ struct{} `type:"structure"`
  5926. // The granularity of the metric. The only valid value is 1Minute.
  5927. Granularity *string `min:"1" type:"string"`
  5928. // One of the following metrics:
  5929. //
  5930. // * GroupMinSize
  5931. //
  5932. // * GroupMaxSize
  5933. //
  5934. // * GroupDesiredCapacity
  5935. //
  5936. // * GroupInServiceInstances
  5937. //
  5938. // * GroupPendingInstances
  5939. //
  5940. // * GroupStandbyInstances
  5941. //
  5942. // * GroupTerminatingInstances
  5943. //
  5944. // * GroupTotalInstances
  5945. Metric *string `min:"1" type:"string"`
  5946. }
  5947. // String returns the string representation
  5948. func (s EnabledMetric) String() string {
  5949. return awsutil.Prettify(s)
  5950. }
  5951. // GoString returns the string representation
  5952. func (s EnabledMetric) GoString() string {
  5953. return s.String()
  5954. }
  5955. // Contains the parameters for EnteStandby.
  5956. type EnterStandbyInput struct {
  5957. _ struct{} `type:"structure"`
  5958. // The name of the Auto Scaling group.
  5959. //
  5960. // AutoScalingGroupName is a required field
  5961. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5962. // One or more instances to move into Standby mode. You must specify at least
  5963. // one instance ID.
  5964. InstanceIds []*string `type:"list"`
  5965. // Specifies whether the instances moved to Standby mode count as part of the
  5966. // Auto Scaling group's desired capacity. If set, the desired capacity for the
  5967. // Auto Scaling group decrements by the number of instances moved to Standby
  5968. // mode.
  5969. //
  5970. // ShouldDecrementDesiredCapacity is a required field
  5971. ShouldDecrementDesiredCapacity *bool `type:"boolean" required:"true"`
  5972. }
  5973. // String returns the string representation
  5974. func (s EnterStandbyInput) String() string {
  5975. return awsutil.Prettify(s)
  5976. }
  5977. // GoString returns the string representation
  5978. func (s EnterStandbyInput) GoString() string {
  5979. return s.String()
  5980. }
  5981. // Validate inspects the fields of the type to determine if they are valid.
  5982. func (s *EnterStandbyInput) Validate() error {
  5983. invalidParams := request.ErrInvalidParams{Context: "EnterStandbyInput"}
  5984. if s.AutoScalingGroupName == nil {
  5985. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5986. }
  5987. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5988. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5989. }
  5990. if s.ShouldDecrementDesiredCapacity == nil {
  5991. invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity"))
  5992. }
  5993. if invalidParams.Len() > 0 {
  5994. return invalidParams
  5995. }
  5996. return nil
  5997. }
  5998. // Contains the output of EnterStandby.
  5999. type EnterStandbyOutput struct {
  6000. _ struct{} `type:"structure"`
  6001. // The activities related to moving instances into Standby mode.
  6002. Activities []*Activity `type:"list"`
  6003. }
  6004. // String returns the string representation
  6005. func (s EnterStandbyOutput) String() string {
  6006. return awsutil.Prettify(s)
  6007. }
  6008. // GoString returns the string representation
  6009. func (s EnterStandbyOutput) GoString() string {
  6010. return s.String()
  6011. }
  6012. // Contains the parameters for ExecutePolicy.
  6013. type ExecutePolicyInput struct {
  6014. _ struct{} `type:"structure"`
  6015. // The name or Amazon Resource Name (ARN) of the Auto Scaling group.
  6016. AutoScalingGroupName *string `min:"1" type:"string"`
  6017. // The breach threshold for the alarm.
  6018. //
  6019. // This parameter is required if the policy type is StepScaling and not supported
  6020. // otherwise.
  6021. BreachThreshold *float64 `type:"double"`
  6022. // If this parameter is true, Auto Scaling waits for the cooldown period to
  6023. // complete before executing the policy. Otherwise, Auto Scaling executes the
  6024. // policy without waiting for the cooldown period to complete.
  6025. //
  6026. // This parameter is not supported if the policy type is StepScaling.
  6027. //
  6028. // For more information, see Auto Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/latest/userguide/Cooldown.html)
  6029. // in the Auto Scaling User Guide.
  6030. HonorCooldown *bool `type:"boolean"`
  6031. // The metric value to compare to BreachThreshold. This enables you to execute
  6032. // a policy of type StepScaling and determine which step adjustment to use.
  6033. // For example, if the breach threshold is 50 and you want to use a step adjustment
  6034. // with a lower bound of 0 and an upper bound of 10, you can set the metric
  6035. // value to 59.
  6036. //
  6037. // If you specify a metric value that doesn't correspond to a step adjustment
  6038. // for the policy, the call returns an error.
  6039. //
  6040. // This parameter is required if the policy type is StepScaling and not supported
  6041. // otherwise.
  6042. MetricValue *float64 `type:"double"`
  6043. // The name or ARN of the policy.
  6044. //
  6045. // PolicyName is a required field
  6046. PolicyName *string `min:"1" type:"string" required:"true"`
  6047. }
  6048. // String returns the string representation
  6049. func (s ExecutePolicyInput) String() string {
  6050. return awsutil.Prettify(s)
  6051. }
  6052. // GoString returns the string representation
  6053. func (s ExecutePolicyInput) GoString() string {
  6054. return s.String()
  6055. }
  6056. // Validate inspects the fields of the type to determine if they are valid.
  6057. func (s *ExecutePolicyInput) Validate() error {
  6058. invalidParams := request.ErrInvalidParams{Context: "ExecutePolicyInput"}
  6059. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6060. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6061. }
  6062. if s.PolicyName == nil {
  6063. invalidParams.Add(request.NewErrParamRequired("PolicyName"))
  6064. }
  6065. if s.PolicyName != nil && len(*s.PolicyName) < 1 {
  6066. invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
  6067. }
  6068. if invalidParams.Len() > 0 {
  6069. return invalidParams
  6070. }
  6071. return nil
  6072. }
  6073. type ExecutePolicyOutput struct {
  6074. _ struct{} `type:"structure"`
  6075. }
  6076. // String returns the string representation
  6077. func (s ExecutePolicyOutput) String() string {
  6078. return awsutil.Prettify(s)
  6079. }
  6080. // GoString returns the string representation
  6081. func (s ExecutePolicyOutput) GoString() string {
  6082. return s.String()
  6083. }
  6084. // Contains the parameters for ExitStandby.
  6085. type ExitStandbyInput struct {
  6086. _ struct{} `type:"structure"`
  6087. // The name of the Auto Scaling group.
  6088. //
  6089. // AutoScalingGroupName is a required field
  6090. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  6091. // One or more instance IDs. You must specify at least one instance ID.
  6092. InstanceIds []*string `type:"list"`
  6093. }
  6094. // String returns the string representation
  6095. func (s ExitStandbyInput) String() string {
  6096. return awsutil.Prettify(s)
  6097. }
  6098. // GoString returns the string representation
  6099. func (s ExitStandbyInput) GoString() string {
  6100. return s.String()
  6101. }
  6102. // Validate inspects the fields of the type to determine if they are valid.
  6103. func (s *ExitStandbyInput) Validate() error {
  6104. invalidParams := request.ErrInvalidParams{Context: "ExitStandbyInput"}
  6105. if s.AutoScalingGroupName == nil {
  6106. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  6107. }
  6108. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6109. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6110. }
  6111. if invalidParams.Len() > 0 {
  6112. return invalidParams
  6113. }
  6114. return nil
  6115. }
  6116. // Contains the parameters for ExitStandby.
  6117. type ExitStandbyOutput struct {
  6118. _ struct{} `type:"structure"`
  6119. // The activities related to moving instances out of Standby mode.
  6120. Activities []*Activity `type:"list"`
  6121. }
  6122. // String returns the string representation
  6123. func (s ExitStandbyOutput) String() string {
  6124. return awsutil.Prettify(s)
  6125. }
  6126. // GoString returns the string representation
  6127. func (s ExitStandbyOutput) GoString() string {
  6128. return s.String()
  6129. }
  6130. // Describes a filter.
  6131. type Filter struct {
  6132. _ struct{} `type:"structure"`
  6133. // The name of the filter. The valid values are: "auto-scaling-group", "key",
  6134. // "value", and "propagate-at-launch".
  6135. Name *string `type:"string"`
  6136. // The value of the filter.
  6137. Values []*string `type:"list"`
  6138. }
  6139. // String returns the string representation
  6140. func (s Filter) String() string {
  6141. return awsutil.Prettify(s)
  6142. }
  6143. // GoString returns the string representation
  6144. func (s Filter) GoString() string {
  6145. return s.String()
  6146. }
  6147. // Describes an Auto Scaling group.
  6148. type Group struct {
  6149. _ struct{} `type:"structure"`
  6150. // The Amazon Resource Name (ARN) of the group.
  6151. AutoScalingGroupARN *string `min:"1" type:"string"`
  6152. // The name of the group.
  6153. //
  6154. // AutoScalingGroupName is a required field
  6155. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  6156. // One or more Availability Zones for the group.
  6157. //
  6158. // AvailabilityZones is a required field
  6159. AvailabilityZones []*string `min:"1" type:"list" required:"true"`
  6160. // The date and time the group was created.
  6161. //
  6162. // CreatedTime is a required field
  6163. CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
  6164. // The amount of time, in seconds, after a scaling activity completes before
  6165. // another scaling activity can start.
  6166. //
  6167. // DefaultCooldown is a required field
  6168. DefaultCooldown *int64 `type:"integer" required:"true"`
  6169. // The desired size of the group.
  6170. //
  6171. // DesiredCapacity is a required field
  6172. DesiredCapacity *int64 `type:"integer" required:"true"`
  6173. // The metrics enabled for the group.
  6174. EnabledMetrics []*EnabledMetric `type:"list"`
  6175. // The amount of time, in seconds, that Auto Scaling waits before checking the
  6176. // health status of an EC2 instance that has come into service.
  6177. HealthCheckGracePeriod *int64 `type:"integer"`
  6178. // The service to use for the health checks. The valid values are EC2 and ELB.
  6179. //
  6180. // HealthCheckType is a required field
  6181. HealthCheckType *string `min:"1" type:"string" required:"true"`
  6182. // The EC2 instances associated with the group.
  6183. Instances []*Instance `type:"list"`
  6184. // The name of the associated launch configuration.
  6185. LaunchConfigurationName *string `min:"1" type:"string"`
  6186. // One or more load balancers associated with the group.
  6187. LoadBalancerNames []*string `type:"list"`
  6188. // The maximum size of the group.
  6189. //
  6190. // MaxSize is a required field
  6191. MaxSize *int64 `type:"integer" required:"true"`
  6192. // The minimum size of the group.
  6193. //
  6194. // MinSize is a required field
  6195. MinSize *int64 `type:"integer" required:"true"`
  6196. // Indicates whether newly launched instances are protected from termination
  6197. // by Auto Scaling when scaling in.
  6198. NewInstancesProtectedFromScaleIn *bool `type:"boolean"`
  6199. // The name of the placement group into which you'll launch your instances,
  6200. // if any. For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html)
  6201. // in the Amazon Elastic Compute Cloud User Guide.
  6202. PlacementGroup *string `min:"1" type:"string"`
  6203. // The current state of the group when DeleteAutoScalingGroup is in progress.
  6204. Status *string `min:"1" type:"string"`
  6205. // The suspended processes associated with the group.
  6206. SuspendedProcesses []*SuspendedProcess `type:"list"`
  6207. // The tags for the group.
  6208. Tags []*TagDescription `type:"list"`
  6209. // The Amazon Resource Names (ARN) of the target groups for your load balancer.
  6210. TargetGroupARNs []*string `type:"list"`
  6211. // The termination policies for the group.
  6212. TerminationPolicies []*string `type:"list"`
  6213. // One or more subnet IDs, if applicable, separated by commas.
  6214. //
  6215. // If you specify VPCZoneIdentifier and AvailabilityZones, ensure that the Availability
  6216. // Zones of the subnets match the values for AvailabilityZones.
  6217. VPCZoneIdentifier *string `min:"1" type:"string"`
  6218. }
  6219. // String returns the string representation
  6220. func (s Group) String() string {
  6221. return awsutil.Prettify(s)
  6222. }
  6223. // GoString returns the string representation
  6224. func (s Group) GoString() string {
  6225. return s.String()
  6226. }
  6227. // Describes an EC2 instance.
  6228. type Instance struct {
  6229. _ struct{} `type:"structure"`
  6230. // The Availability Zone in which the instance is running.
  6231. //
  6232. // AvailabilityZone is a required field
  6233. AvailabilityZone *string `min:"1" type:"string" required:"true"`
  6234. // The last reported health status of the instance. "Healthy" means that the
  6235. // instance is healthy and should remain in service. "Unhealthy" means that
  6236. // the instance is unhealthy and Auto Scaling should terminate and replace it.
  6237. //
  6238. // HealthStatus is a required field
  6239. HealthStatus *string `min:"1" type:"string" required:"true"`
  6240. // The ID of the instance.
  6241. //
  6242. // InstanceId is a required field
  6243. InstanceId *string `min:"1" type:"string" required:"true"`
  6244. // The launch configuration associated with the instance.
  6245. //
  6246. // LaunchConfigurationName is a required field
  6247. LaunchConfigurationName *string `min:"1" type:"string" required:"true"`
  6248. // A description of the current lifecycle state. Note that the Quarantined state
  6249. // is not used.
  6250. //
  6251. // LifecycleState is a required field
  6252. LifecycleState *string `type:"string" required:"true" enum:"LifecycleState"`
  6253. // Indicates whether the instance is protected from termination by Auto Scaling
  6254. // when scaling in.
  6255. //
  6256. // ProtectedFromScaleIn is a required field
  6257. ProtectedFromScaleIn *bool `type:"boolean" required:"true"`
  6258. }
  6259. // String returns the string representation
  6260. func (s Instance) String() string {
  6261. return awsutil.Prettify(s)
  6262. }
  6263. // GoString returns the string representation
  6264. func (s Instance) GoString() string {
  6265. return s.String()
  6266. }
  6267. // Describes an EC2 instance associated with an Auto Scaling group.
  6268. type InstanceDetails struct {
  6269. _ struct{} `type:"structure"`
  6270. // The name of the Auto Scaling group associated with the instance.
  6271. //
  6272. // AutoScalingGroupName is a required field
  6273. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  6274. // The Availability Zone for the instance.
  6275. //
  6276. // AvailabilityZone is a required field
  6277. AvailabilityZone *string `min:"1" type:"string" required:"true"`
  6278. // The last reported health status of this instance. "Healthy" means that the
  6279. // instance is healthy and should remain in service. "Unhealthy" means that
  6280. // the instance is unhealthy and Auto Scaling should terminate and replace it.
  6281. //
  6282. // HealthStatus is a required field
  6283. HealthStatus *string `min:"1" type:"string" required:"true"`
  6284. // The ID of the instance.
  6285. //
  6286. // InstanceId is a required field
  6287. InstanceId *string `min:"1" type:"string" required:"true"`
  6288. // The launch configuration associated with the instance.
  6289. //
  6290. // LaunchConfigurationName is a required field
  6291. LaunchConfigurationName *string `min:"1" type:"string" required:"true"`
  6292. // The lifecycle state for the instance. For more information, see Auto Scaling
  6293. // Lifecycle (http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroupLifecycle.html)
  6294. // in the Auto Scaling User Guide.
  6295. //
  6296. // LifecycleState is a required field
  6297. LifecycleState *string `min:"1" type:"string" required:"true"`
  6298. // Indicates whether the instance is protected from termination by Auto Scaling
  6299. // when scaling in.
  6300. //
  6301. // ProtectedFromScaleIn is a required field
  6302. ProtectedFromScaleIn *bool `type:"boolean" required:"true"`
  6303. }
  6304. // String returns the string representation
  6305. func (s InstanceDetails) String() string {
  6306. return awsutil.Prettify(s)
  6307. }
  6308. // GoString returns the string representation
  6309. func (s InstanceDetails) GoString() string {
  6310. return s.String()
  6311. }
  6312. // Describes whether instance monitoring is enabled.
  6313. type InstanceMonitoring struct {
  6314. _ struct{} `type:"structure"`
  6315. // If True, instance monitoring is enabled.
  6316. Enabled *bool `type:"boolean"`
  6317. }
  6318. // String returns the string representation
  6319. func (s InstanceMonitoring) String() string {
  6320. return awsutil.Prettify(s)
  6321. }
  6322. // GoString returns the string representation
  6323. func (s InstanceMonitoring) GoString() string {
  6324. return s.String()
  6325. }
  6326. // Describes a launch configuration.
  6327. type LaunchConfiguration struct {
  6328. _ struct{} `type:"structure"`
  6329. // [EC2-VPC] Indicates whether to assign a public IP address to each instance.
  6330. AssociatePublicIpAddress *bool `type:"boolean"`
  6331. // A block device mapping, which specifies the block devices for the instance.
  6332. BlockDeviceMappings []*BlockDeviceMapping `type:"list"`
  6333. // The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.
  6334. // This parameter can only be used if you are launching EC2-Classic instances.
  6335. // For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
  6336. // in the Amazon Elastic Compute Cloud User Guide.
  6337. ClassicLinkVPCId *string `min:"1" type:"string"`
  6338. // The IDs of one or more security groups for the VPC specified in ClassicLinkVPCId.
  6339. // This parameter is required if you specify a ClassicLink-enabled VPC, and
  6340. // cannot be used otherwise. For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
  6341. // in the Amazon Elastic Compute Cloud User Guide.
  6342. ClassicLinkVPCSecurityGroups []*string `type:"list"`
  6343. // The creation date and time for the launch configuration.
  6344. //
  6345. // CreatedTime is a required field
  6346. CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
  6347. // Controls whether the instance is optimized for EBS I/O (true) or not (false).
  6348. EbsOptimized *bool `type:"boolean"`
  6349. // The name or Amazon Resource Name (ARN) of the instance profile associated
  6350. // with the IAM role for the instance.
  6351. IamInstanceProfile *string `min:"1" type:"string"`
  6352. // The ID of the Amazon Machine Image (AMI).
  6353. //
  6354. // ImageId is a required field
  6355. ImageId *string `min:"1" type:"string" required:"true"`
  6356. // Controls whether instances in this group are launched with detailed (true)
  6357. // or basic (false) monitoring.
  6358. InstanceMonitoring *InstanceMonitoring `type:"structure"`
  6359. // The instance type for the instances.
  6360. //
  6361. // InstanceType is a required field
  6362. InstanceType *string `min:"1" type:"string" required:"true"`
  6363. // The ID of the kernel associated with the AMI.
  6364. KernelId *string `min:"1" type:"string"`
  6365. // The name of the key pair.
  6366. KeyName *string `min:"1" type:"string"`
  6367. // The Amazon Resource Name (ARN) of the launch configuration.
  6368. LaunchConfigurationARN *string `min:"1" type:"string"`
  6369. // The name of the launch configuration.
  6370. //
  6371. // LaunchConfigurationName is a required field
  6372. LaunchConfigurationName *string `min:"1" type:"string" required:"true"`
  6373. // The tenancy of the instance, either default or dedicated. An instance with
  6374. // dedicated tenancy runs in an isolated, single-tenant hardware and can only
  6375. // be launched into a VPC.
  6376. PlacementTenancy *string `min:"1" type:"string"`
  6377. // The ID of the RAM disk associated with the AMI.
  6378. RamdiskId *string `min:"1" type:"string"`
  6379. // The security groups to associate with the instances.
  6380. SecurityGroups []*string `type:"list"`
  6381. // The price to bid when launching Spot Instances.
  6382. SpotPrice *string `min:"1" type:"string"`
  6383. // The user data available to the instances.
  6384. UserData *string `type:"string"`
  6385. }
  6386. // String returns the string representation
  6387. func (s LaunchConfiguration) String() string {
  6388. return awsutil.Prettify(s)
  6389. }
  6390. // GoString returns the string representation
  6391. func (s LaunchConfiguration) GoString() string {
  6392. return s.String()
  6393. }
  6394. // Describes a lifecycle hook, which tells Auto Scaling that you want to perform
  6395. // an action when an instance launches or terminates. When you have a lifecycle
  6396. // hook in place, the Auto Scaling group will either:
  6397. //
  6398. // * Pause the instance after it launches, but before it is put into service
  6399. //
  6400. // * Pause the instance as it terminates, but before it is fully terminated
  6401. //
  6402. // For more information, see Auto Scaling Lifecycle (http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroupLifecycle.html)
  6403. // in the Auto Scaling User Guide.
  6404. type LifecycleHook struct {
  6405. _ struct{} `type:"structure"`
  6406. // The name of the Auto Scaling group for the lifecycle hook.
  6407. AutoScalingGroupName *string `min:"1" type:"string"`
  6408. // Defines the action the Auto Scaling group should take when the lifecycle
  6409. // hook timeout elapses or if an unexpected failure occurs. The valid values
  6410. // are CONTINUE and ABANDON. The default value is CONTINUE.
  6411. DefaultResult *string `type:"string"`
  6412. // The maximum time, in seconds, that an instance can remain in a Pending:Wait
  6413. // or Terminating:Wait state. The maximum is 172800 seconds (48 hours) or 100
  6414. // times HeartbeatTimeout, whichever is smaller.
  6415. GlobalTimeout *int64 `type:"integer"`
  6416. // The maximum time, in seconds, that can elapse before the lifecycle hook times
  6417. // out. The default is 3600 seconds (1 hour). When the lifecycle hook times
  6418. // out, Auto Scaling performs the default action. You can prevent the lifecycle
  6419. // hook from timing out by calling RecordLifecycleActionHeartbeat.
  6420. HeartbeatTimeout *int64 `type:"integer"`
  6421. // The name of the lifecycle hook.
  6422. LifecycleHookName *string `min:"1" type:"string"`
  6423. // The state of the EC2 instance to which you want to attach the lifecycle hook.
  6424. // For a list of lifecycle hook types, see DescribeLifecycleHookTypes.
  6425. LifecycleTransition *string `type:"string"`
  6426. // Additional information that you want to include any time Auto Scaling sends
  6427. // a message to the notification target.
  6428. NotificationMetadata *string `min:"1" type:"string"`
  6429. // The ARN of the notification target that Auto Scaling uses to notify you when
  6430. // an instance is in the transition state for the lifecycle hook. This ARN target
  6431. // can be either an SQS queue or an SNS topic. The notification message sent
  6432. // to the target includes the following:
  6433. //
  6434. // * Lifecycle action token
  6435. //
  6436. // * User account ID
  6437. //
  6438. // * Name of the Auto Scaling group
  6439. //
  6440. // * Lifecycle hook name
  6441. //
  6442. // * EC2 instance ID
  6443. //
  6444. // * Lifecycle transition
  6445. //
  6446. // * Notification metadata
  6447. NotificationTargetARN *string `min:"1" type:"string"`
  6448. // The ARN of the IAM role that allows the Auto Scaling group to publish to
  6449. // the specified notification target.
  6450. RoleARN *string `min:"1" type:"string"`
  6451. }
  6452. // String returns the string representation
  6453. func (s LifecycleHook) String() string {
  6454. return awsutil.Prettify(s)
  6455. }
  6456. // GoString returns the string representation
  6457. func (s LifecycleHook) GoString() string {
  6458. return s.String()
  6459. }
  6460. // Describes the state of a Classic load balancer.
  6461. //
  6462. // If you specify a load balancer when creating the Auto Scaling group, the
  6463. // state of the load balancer is InService.
  6464. //
  6465. // If you attach a load balancer to an existing Auto Scaling group, the initial
  6466. // state is Adding. The state transitions to Added after all instances in the
  6467. // group are registered with the load balancer. If ELB health checks are enabled
  6468. // for the load balancer, the state transitions to InService after at least
  6469. // one instance in the group passes the health check. If EC2 health checks are
  6470. // enabled instead, the load balancer remains in the Added state.
  6471. type LoadBalancerState struct {
  6472. _ struct{} `type:"structure"`
  6473. // The name of the load balancer.
  6474. LoadBalancerName *string `min:"1" type:"string"`
  6475. // One of the following load balancer states:
  6476. //
  6477. // * Adding - The instances in the group are being registered with the load
  6478. // balancer.
  6479. //
  6480. // * Added - All instances in the group are registered with the load balancer.
  6481. //
  6482. // * InService - At least one instance in the group passed an ELB health
  6483. // check.
  6484. //
  6485. // * Removing - The instances in the group are being deregistered from the
  6486. // load balancer. If connection draining is enabled, Elastic Load Balancing
  6487. // waits for in-flight requests to complete before deregistering the instances.
  6488. //
  6489. // * Removed - All instances in the group are deregistered from the load
  6490. // balancer.
  6491. State *string `min:"1" type:"string"`
  6492. }
  6493. // String returns the string representation
  6494. func (s LoadBalancerState) String() string {
  6495. return awsutil.Prettify(s)
  6496. }
  6497. // GoString returns the string representation
  6498. func (s LoadBalancerState) GoString() string {
  6499. return s.String()
  6500. }
  6501. // Describes the state of a target group.
  6502. //
  6503. // If you attach a target group to an existing Auto Scaling group, the initial
  6504. // state is Adding. The state transitions to Added after all Auto Scaling instances
  6505. // are registered with the target group. If ELB health checks are enabled, the
  6506. // state transitions to InService after at least one Auto Scaling instance passes
  6507. // the health check. If EC2 health checks are enabled instead, the target group
  6508. // remains in the Added state.
  6509. type LoadBalancerTargetGroupState struct {
  6510. _ struct{} `type:"structure"`
  6511. // The Amazon Resource Name (ARN) of the target group.
  6512. LoadBalancerTargetGroupARN *string `min:"1" type:"string"`
  6513. // The state of the target group.
  6514. //
  6515. // * Adding - The Auto Scaling instances are being registered with the target
  6516. // group.
  6517. //
  6518. // * Added - All Auto Scaling instances are registered with the target group.
  6519. //
  6520. // * InService - At least one Auto Scaling instance passed an ELB health
  6521. // check.
  6522. //
  6523. // * Removing - The Auto Scaling instances are being deregistered from the
  6524. // target group. If connection draining is enabled, Elastic Load Balancing
  6525. // waits for in-flight requests to complete before deregistering the instances.
  6526. //
  6527. // * Removed - All Auto Scaling instances are deregistered from the target
  6528. // group.
  6529. State *string `min:"1" type:"string"`
  6530. }
  6531. // String returns the string representation
  6532. func (s LoadBalancerTargetGroupState) String() string {
  6533. return awsutil.Prettify(s)
  6534. }
  6535. // GoString returns the string representation
  6536. func (s LoadBalancerTargetGroupState) GoString() string {
  6537. return s.String()
  6538. }
  6539. // Describes a metric.
  6540. type MetricCollectionType struct {
  6541. _ struct{} `type:"structure"`
  6542. // One of the following metrics:
  6543. //
  6544. // * GroupMinSize
  6545. //
  6546. // * GroupMaxSize
  6547. //
  6548. // * GroupDesiredCapacity
  6549. //
  6550. // * GroupInServiceInstances
  6551. //
  6552. // * GroupPendingInstances
  6553. //
  6554. // * GroupStandbyInstances
  6555. //
  6556. // * GroupTerminatingInstances
  6557. //
  6558. // * GroupTotalInstances
  6559. Metric *string `min:"1" type:"string"`
  6560. }
  6561. // String returns the string representation
  6562. func (s MetricCollectionType) String() string {
  6563. return awsutil.Prettify(s)
  6564. }
  6565. // GoString returns the string representation
  6566. func (s MetricCollectionType) GoString() string {
  6567. return s.String()
  6568. }
  6569. // Describes a granularity of a metric.
  6570. type MetricGranularityType struct {
  6571. _ struct{} `type:"structure"`
  6572. // The granularity. The only valid value is 1Minute.
  6573. Granularity *string `min:"1" type:"string"`
  6574. }
  6575. // String returns the string representation
  6576. func (s MetricGranularityType) String() string {
  6577. return awsutil.Prettify(s)
  6578. }
  6579. // GoString returns the string representation
  6580. func (s MetricGranularityType) GoString() string {
  6581. return s.String()
  6582. }
  6583. // Describes a notification.
  6584. type NotificationConfiguration struct {
  6585. _ struct{} `type:"structure"`
  6586. // The name of the group.
  6587. AutoScalingGroupName *string `min:"1" type:"string"`
  6588. // One of the following event notification types:
  6589. //
  6590. // * autoscaling:EC2_INSTANCE_LAUNCH
  6591. //
  6592. // * autoscaling:EC2_INSTANCE_LAUNCH_ERROR
  6593. //
  6594. // * autoscaling:EC2_INSTANCE_TERMINATE
  6595. //
  6596. // * autoscaling:EC2_INSTANCE_TERMINATE_ERROR
  6597. //
  6598. // * autoscaling:TEST_NOTIFICATION
  6599. NotificationType *string `min:"1" type:"string"`
  6600. // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service
  6601. // (SNS) topic.
  6602. TopicARN *string `min:"1" type:"string"`
  6603. }
  6604. // String returns the string representation
  6605. func (s NotificationConfiguration) String() string {
  6606. return awsutil.Prettify(s)
  6607. }
  6608. // GoString returns the string representation
  6609. func (s NotificationConfiguration) GoString() string {
  6610. return s.String()
  6611. }
  6612. // Describes a process type.
  6613. //
  6614. // For more information, see Auto Scaling Processes (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-suspend-resume-processes.html#process-types)
  6615. // in the Auto Scaling User Guide.
  6616. type ProcessType struct {
  6617. _ struct{} `type:"structure"`
  6618. // One of the following processes:
  6619. //
  6620. // * Launch
  6621. //
  6622. // * Terminate
  6623. //
  6624. // * AddToLoadBalancer
  6625. //
  6626. // * AlarmNotification
  6627. //
  6628. // * AZRebalance
  6629. //
  6630. // * HealthCheck
  6631. //
  6632. // * ReplaceUnhealthy
  6633. //
  6634. // * ScheduledActions
  6635. //
  6636. // ProcessName is a required field
  6637. ProcessName *string `min:"1" type:"string" required:"true"`
  6638. }
  6639. // String returns the string representation
  6640. func (s ProcessType) String() string {
  6641. return awsutil.Prettify(s)
  6642. }
  6643. // GoString returns the string representation
  6644. func (s ProcessType) GoString() string {
  6645. return s.String()
  6646. }
  6647. // Contains the parameters for PutLifecycleHook.
  6648. type PutLifecycleHookInput struct {
  6649. _ struct{} `type:"structure"`
  6650. // The name of the Auto Scaling group to which you want to assign the lifecycle
  6651. // hook.
  6652. //
  6653. // AutoScalingGroupName is a required field
  6654. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  6655. // Defines the action the Auto Scaling group should take when the lifecycle
  6656. // hook timeout elapses or if an unexpected failure occurs. This parameter can
  6657. // be either CONTINUE or ABANDON. The default value is ABANDON.
  6658. DefaultResult *string `type:"string"`
  6659. // The amount of time, in seconds, that can elapse before the lifecycle hook
  6660. // times out. When the lifecycle hook times out, Auto Scaling performs the default
  6661. // action. You can prevent the lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat.
  6662. // The default is 3600 seconds (1 hour).
  6663. HeartbeatTimeout *int64 `type:"integer"`
  6664. // The name of the lifecycle hook.
  6665. //
  6666. // LifecycleHookName is a required field
  6667. LifecycleHookName *string `min:"1" type:"string" required:"true"`
  6668. // The instance state to which you want to attach the lifecycle hook. For a
  6669. // list of lifecycle hook types, see DescribeLifecycleHookTypes.
  6670. //
  6671. // This parameter is required for new lifecycle hooks, but optional when updating
  6672. // existing hooks.
  6673. LifecycleTransition *string `type:"string"`
  6674. // Contains additional information that you want to include any time Auto Scaling
  6675. // sends a message to the notification target.
  6676. NotificationMetadata *string `min:"1" type:"string"`
  6677. // The ARN of the notification target that Auto Scaling will use to notify you
  6678. // when an instance is in the transition state for the lifecycle hook. This
  6679. // target can be either an SQS queue or an SNS topic. If you specify an empty
  6680. // string, this overrides the current ARN.
  6681. //
  6682. // This operation uses the JSON format when sending notifications to an Amazon
  6683. // SQS queue, and an email key/value pair format when sending notifications
  6684. // to an Amazon SNS topic.
  6685. //
  6686. // When you specify a notification target, Auto Scaling sends it a test message.
  6687. // Test messages contains the following additional key/value pair: "Event":
  6688. // "autoscaling:TEST_NOTIFICATION".
  6689. NotificationTargetARN *string `type:"string"`
  6690. // The ARN of the IAM role that allows the Auto Scaling group to publish to
  6691. // the specified notification target.
  6692. //
  6693. // This parameter is required for new lifecycle hooks, but optional when updating
  6694. // existing hooks.
  6695. RoleARN *string `min:"1" type:"string"`
  6696. }
  6697. // String returns the string representation
  6698. func (s PutLifecycleHookInput) String() string {
  6699. return awsutil.Prettify(s)
  6700. }
  6701. // GoString returns the string representation
  6702. func (s PutLifecycleHookInput) GoString() string {
  6703. return s.String()
  6704. }
  6705. // Validate inspects the fields of the type to determine if they are valid.
  6706. func (s *PutLifecycleHookInput) Validate() error {
  6707. invalidParams := request.ErrInvalidParams{Context: "PutLifecycleHookInput"}
  6708. if s.AutoScalingGroupName == nil {
  6709. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  6710. }
  6711. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6712. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6713. }
  6714. if s.LifecycleHookName == nil {
  6715. invalidParams.Add(request.NewErrParamRequired("LifecycleHookName"))
  6716. }
  6717. if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 {
  6718. invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1))
  6719. }
  6720. if s.NotificationMetadata != nil && len(*s.NotificationMetadata) < 1 {
  6721. invalidParams.Add(request.NewErrParamMinLen("NotificationMetadata", 1))
  6722. }
  6723. if s.RoleARN != nil && len(*s.RoleARN) < 1 {
  6724. invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1))
  6725. }
  6726. if invalidParams.Len() > 0 {
  6727. return invalidParams
  6728. }
  6729. return nil
  6730. }
  6731. // Contains the output of PutLifecycleHook.
  6732. type PutLifecycleHookOutput struct {
  6733. _ struct{} `type:"structure"`
  6734. }
  6735. // String returns the string representation
  6736. func (s PutLifecycleHookOutput) String() string {
  6737. return awsutil.Prettify(s)
  6738. }
  6739. // GoString returns the string representation
  6740. func (s PutLifecycleHookOutput) GoString() string {
  6741. return s.String()
  6742. }
  6743. // Contains the parameters for PutNotificationConfiguration.
  6744. type PutNotificationConfigurationInput struct {
  6745. _ struct{} `type:"structure"`
  6746. // The name of the Auto Scaling group.
  6747. //
  6748. // AutoScalingGroupName is a required field
  6749. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  6750. // The type of event that will cause the notification to be sent. For details
  6751. // about notification types supported by Auto Scaling, see DescribeAutoScalingNotificationTypes.
  6752. //
  6753. // NotificationTypes is a required field
  6754. NotificationTypes []*string `type:"list" required:"true"`
  6755. // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service
  6756. // (SNS) topic.
  6757. //
  6758. // TopicARN is a required field
  6759. TopicARN *string `min:"1" type:"string" required:"true"`
  6760. }
  6761. // String returns the string representation
  6762. func (s PutNotificationConfigurationInput) String() string {
  6763. return awsutil.Prettify(s)
  6764. }
  6765. // GoString returns the string representation
  6766. func (s PutNotificationConfigurationInput) GoString() string {
  6767. return s.String()
  6768. }
  6769. // Validate inspects the fields of the type to determine if they are valid.
  6770. func (s *PutNotificationConfigurationInput) Validate() error {
  6771. invalidParams := request.ErrInvalidParams{Context: "PutNotificationConfigurationInput"}
  6772. if s.AutoScalingGroupName == nil {
  6773. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  6774. }
  6775. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6776. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6777. }
  6778. if s.NotificationTypes == nil {
  6779. invalidParams.Add(request.NewErrParamRequired("NotificationTypes"))
  6780. }
  6781. if s.TopicARN == nil {
  6782. invalidParams.Add(request.NewErrParamRequired("TopicARN"))
  6783. }
  6784. if s.TopicARN != nil && len(*s.TopicARN) < 1 {
  6785. invalidParams.Add(request.NewErrParamMinLen("TopicARN", 1))
  6786. }
  6787. if invalidParams.Len() > 0 {
  6788. return invalidParams
  6789. }
  6790. return nil
  6791. }
  6792. type PutNotificationConfigurationOutput struct {
  6793. _ struct{} `type:"structure"`
  6794. }
  6795. // String returns the string representation
  6796. func (s PutNotificationConfigurationOutput) String() string {
  6797. return awsutil.Prettify(s)
  6798. }
  6799. // GoString returns the string representation
  6800. func (s PutNotificationConfigurationOutput) GoString() string {
  6801. return s.String()
  6802. }
  6803. // Contains the parameters for PutScalingPolicy.
  6804. type PutScalingPolicyInput struct {
  6805. _ struct{} `type:"structure"`
  6806. // The adjustment type. Valid values are ChangeInCapacity, ExactCapacity, and
  6807. // PercentChangeInCapacity.
  6808. //
  6809. // For more information, see Dynamic Scaling (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-scale-based-on-demand.html)
  6810. // in the Auto Scaling User Guide.
  6811. //
  6812. // AdjustmentType is a required field
  6813. AdjustmentType *string `min:"1" type:"string" required:"true"`
  6814. // The name or ARN of the group.
  6815. //
  6816. // AutoScalingGroupName is a required field
  6817. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  6818. // The amount of time, in seconds, after a scaling activity completes and before
  6819. // the next scaling activity can start. If this parameter is not specified,
  6820. // the default cooldown period for the group applies.
  6821. //
  6822. // This parameter is not supported unless the policy type is SimpleScaling.
  6823. //
  6824. // For more information, see Auto Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/latest/userguide/Cooldown.html)
  6825. // in the Auto Scaling User Guide.
  6826. Cooldown *int64 `type:"integer"`
  6827. // The estimated time, in seconds, until a newly launched instance can contribute
  6828. // to the CloudWatch metrics. The default is to use the value specified for
  6829. // the default cooldown period for the group.
  6830. //
  6831. // This parameter is not supported if the policy type is SimpleScaling.
  6832. EstimatedInstanceWarmup *int64 `type:"integer"`
  6833. // The aggregation type for the CloudWatch metrics. Valid values are Minimum,
  6834. // Maximum, and Average. If the aggregation type is null, the value is treated
  6835. // as Average.
  6836. //
  6837. // This parameter is not supported if the policy type is SimpleScaling.
  6838. MetricAggregationType *string `min:"1" type:"string"`
  6839. // The minimum number of instances to scale. If the value of AdjustmentType
  6840. // is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity
  6841. // of the Auto Scaling group by at least this many instances. Otherwise, the
  6842. // error is ValidationError.
  6843. MinAdjustmentMagnitude *int64 `type:"integer"`
  6844. // Available for backward compatibility. Use MinAdjustmentMagnitude instead.
  6845. MinAdjustmentStep *int64 `deprecated:"true" type:"integer"`
  6846. // The name of the policy.
  6847. //
  6848. // PolicyName is a required field
  6849. PolicyName *string `min:"1" type:"string" required:"true"`
  6850. // The policy type. Valid values are SimpleScaling and StepScaling. If the policy
  6851. // type is null, the value is treated as SimpleScaling.
  6852. PolicyType *string `min:"1" type:"string"`
  6853. // The amount by which to scale, based on the specified adjustment type. A positive
  6854. // value adds to the current capacity while a negative number removes from the
  6855. // current capacity.
  6856. //
  6857. // This parameter is required if the policy type is SimpleScaling and not supported
  6858. // otherwise.
  6859. ScalingAdjustment *int64 `type:"integer"`
  6860. // A set of adjustments that enable you to scale based on the size of the alarm
  6861. // breach.
  6862. //
  6863. // This parameter is required if the policy type is StepScaling and not supported
  6864. // otherwise.
  6865. StepAdjustments []*StepAdjustment `type:"list"`
  6866. }
  6867. // String returns the string representation
  6868. func (s PutScalingPolicyInput) String() string {
  6869. return awsutil.Prettify(s)
  6870. }
  6871. // GoString returns the string representation
  6872. func (s PutScalingPolicyInput) GoString() string {
  6873. return s.String()
  6874. }
  6875. // Validate inspects the fields of the type to determine if they are valid.
  6876. func (s *PutScalingPolicyInput) Validate() error {
  6877. invalidParams := request.ErrInvalidParams{Context: "PutScalingPolicyInput"}
  6878. if s.AdjustmentType == nil {
  6879. invalidParams.Add(request.NewErrParamRequired("AdjustmentType"))
  6880. }
  6881. if s.AdjustmentType != nil && len(*s.AdjustmentType) < 1 {
  6882. invalidParams.Add(request.NewErrParamMinLen("AdjustmentType", 1))
  6883. }
  6884. if s.AutoScalingGroupName == nil {
  6885. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  6886. }
  6887. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6888. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6889. }
  6890. if s.MetricAggregationType != nil && len(*s.MetricAggregationType) < 1 {
  6891. invalidParams.Add(request.NewErrParamMinLen("MetricAggregationType", 1))
  6892. }
  6893. if s.PolicyName == nil {
  6894. invalidParams.Add(request.NewErrParamRequired("PolicyName"))
  6895. }
  6896. if s.PolicyName != nil && len(*s.PolicyName) < 1 {
  6897. invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
  6898. }
  6899. if s.PolicyType != nil && len(*s.PolicyType) < 1 {
  6900. invalidParams.Add(request.NewErrParamMinLen("PolicyType", 1))
  6901. }
  6902. if s.StepAdjustments != nil {
  6903. for i, v := range s.StepAdjustments {
  6904. if v == nil {
  6905. continue
  6906. }
  6907. if err := v.Validate(); err != nil {
  6908. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "StepAdjustments", i), err.(request.ErrInvalidParams))
  6909. }
  6910. }
  6911. }
  6912. if invalidParams.Len() > 0 {
  6913. return invalidParams
  6914. }
  6915. return nil
  6916. }
  6917. // Contains the output of PutScalingPolicy.
  6918. type PutScalingPolicyOutput struct {
  6919. _ struct{} `type:"structure"`
  6920. // The Amazon Resource Name (ARN) of the policy.
  6921. PolicyARN *string `min:"1" type:"string"`
  6922. }
  6923. // String returns the string representation
  6924. func (s PutScalingPolicyOutput) String() string {
  6925. return awsutil.Prettify(s)
  6926. }
  6927. // GoString returns the string representation
  6928. func (s PutScalingPolicyOutput) GoString() string {
  6929. return s.String()
  6930. }
  6931. // Contains the parameters for PutScheduledUpdateGroupAction.
  6932. type PutScheduledUpdateGroupActionInput struct {
  6933. _ struct{} `type:"structure"`
  6934. // The name or Amazon Resource Name (ARN) of the Auto Scaling group.
  6935. //
  6936. // AutoScalingGroupName is a required field
  6937. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  6938. // The number of EC2 instances that should be running in the group.
  6939. DesiredCapacity *int64 `type:"integer"`
  6940. // The time for the recurring schedule to end. Auto Scaling does not perform
  6941. // the action after this time.
  6942. EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  6943. // The maximum size for the Auto Scaling group.
  6944. MaxSize *int64 `type:"integer"`
  6945. // The minimum size for the Auto Scaling group.
  6946. MinSize *int64 `type:"integer"`
  6947. // The recurring schedule for this action, in Unix cron syntax format. For more
  6948. // information, see Cron (http://en.wikipedia.org/wiki/Cron) in Wikipedia.
  6949. Recurrence *string `min:"1" type:"string"`
  6950. // The name of this scaling action.
  6951. //
  6952. // ScheduledActionName is a required field
  6953. ScheduledActionName *string `min:"1" type:"string" required:"true"`
  6954. // The time for this action to start, in "YYYY-MM-DDThh:mm:ssZ" format in UTC/GMT
  6955. // only (for example, 2014-06-01T00:00:00Z).
  6956. //
  6957. // If you specify Recurrence and StartTime, Auto Scaling performs the action
  6958. // at this time, and then performs the action based on the specified recurrence.
  6959. //
  6960. // If you try to schedule your action in the past, Auto Scaling returns an error
  6961. // message.
  6962. StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  6963. // This parameter is deprecated.
  6964. Time *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  6965. }
  6966. // String returns the string representation
  6967. func (s PutScheduledUpdateGroupActionInput) String() string {
  6968. return awsutil.Prettify(s)
  6969. }
  6970. // GoString returns the string representation
  6971. func (s PutScheduledUpdateGroupActionInput) GoString() string {
  6972. return s.String()
  6973. }
  6974. // Validate inspects the fields of the type to determine if they are valid.
  6975. func (s *PutScheduledUpdateGroupActionInput) Validate() error {
  6976. invalidParams := request.ErrInvalidParams{Context: "PutScheduledUpdateGroupActionInput"}
  6977. if s.AutoScalingGroupName == nil {
  6978. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  6979. }
  6980. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6981. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6982. }
  6983. if s.Recurrence != nil && len(*s.Recurrence) < 1 {
  6984. invalidParams.Add(request.NewErrParamMinLen("Recurrence", 1))
  6985. }
  6986. if s.ScheduledActionName == nil {
  6987. invalidParams.Add(request.NewErrParamRequired("ScheduledActionName"))
  6988. }
  6989. if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 {
  6990. invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1))
  6991. }
  6992. if invalidParams.Len() > 0 {
  6993. return invalidParams
  6994. }
  6995. return nil
  6996. }
  6997. type PutScheduledUpdateGroupActionOutput struct {
  6998. _ struct{} `type:"structure"`
  6999. }
  7000. // String returns the string representation
  7001. func (s PutScheduledUpdateGroupActionOutput) String() string {
  7002. return awsutil.Prettify(s)
  7003. }
  7004. // GoString returns the string representation
  7005. func (s PutScheduledUpdateGroupActionOutput) GoString() string {
  7006. return s.String()
  7007. }
  7008. // Contains the parameters for RecordLifecycleActionHeartbeat.
  7009. type RecordLifecycleActionHeartbeatInput struct {
  7010. _ struct{} `type:"structure"`
  7011. // The name of the Auto Scaling group for the hook.
  7012. //
  7013. // AutoScalingGroupName is a required field
  7014. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7015. // The ID of the instance.
  7016. InstanceId *string `min:"1" type:"string"`
  7017. // A token that uniquely identifies a specific lifecycle action associated with
  7018. // an instance. Auto Scaling sends this token to the notification target you
  7019. // specified when you created the lifecycle hook.
  7020. LifecycleActionToken *string `min:"36" type:"string"`
  7021. // The name of the lifecycle hook.
  7022. //
  7023. // LifecycleHookName is a required field
  7024. LifecycleHookName *string `min:"1" type:"string" required:"true"`
  7025. }
  7026. // String returns the string representation
  7027. func (s RecordLifecycleActionHeartbeatInput) String() string {
  7028. return awsutil.Prettify(s)
  7029. }
  7030. // GoString returns the string representation
  7031. func (s RecordLifecycleActionHeartbeatInput) GoString() string {
  7032. return s.String()
  7033. }
  7034. // Validate inspects the fields of the type to determine if they are valid.
  7035. func (s *RecordLifecycleActionHeartbeatInput) Validate() error {
  7036. invalidParams := request.ErrInvalidParams{Context: "RecordLifecycleActionHeartbeatInput"}
  7037. if s.AutoScalingGroupName == nil {
  7038. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7039. }
  7040. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7041. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7042. }
  7043. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  7044. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  7045. }
  7046. if s.LifecycleActionToken != nil && len(*s.LifecycleActionToken) < 36 {
  7047. invalidParams.Add(request.NewErrParamMinLen("LifecycleActionToken", 36))
  7048. }
  7049. if s.LifecycleHookName == nil {
  7050. invalidParams.Add(request.NewErrParamRequired("LifecycleHookName"))
  7051. }
  7052. if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 {
  7053. invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1))
  7054. }
  7055. if invalidParams.Len() > 0 {
  7056. return invalidParams
  7057. }
  7058. return nil
  7059. }
  7060. // Contains the output of RecordLifecycleActionHeartBeat.
  7061. type RecordLifecycleActionHeartbeatOutput struct {
  7062. _ struct{} `type:"structure"`
  7063. }
  7064. // String returns the string representation
  7065. func (s RecordLifecycleActionHeartbeatOutput) String() string {
  7066. return awsutil.Prettify(s)
  7067. }
  7068. // GoString returns the string representation
  7069. func (s RecordLifecycleActionHeartbeatOutput) GoString() string {
  7070. return s.String()
  7071. }
  7072. type ResumeProcessesOutput struct {
  7073. _ struct{} `type:"structure"`
  7074. }
  7075. // String returns the string representation
  7076. func (s ResumeProcessesOutput) String() string {
  7077. return awsutil.Prettify(s)
  7078. }
  7079. // GoString returns the string representation
  7080. func (s ResumeProcessesOutput) GoString() string {
  7081. return s.String()
  7082. }
  7083. // Describes a scaling policy.
  7084. type ScalingPolicy struct {
  7085. _ struct{} `type:"structure"`
  7086. // The adjustment type, which specifies how ScalingAdjustment is interpreted.
  7087. // Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
  7088. AdjustmentType *string `min:"1" type:"string"`
  7089. // The CloudWatch alarms related to the policy.
  7090. Alarms []*Alarm `type:"list"`
  7091. // The name of the Auto Scaling group associated with this scaling policy.
  7092. AutoScalingGroupName *string `min:"1" type:"string"`
  7093. // The amount of time, in seconds, after a scaling activity completes before
  7094. // any further trigger-related scaling activities can start.
  7095. Cooldown *int64 `type:"integer"`
  7096. // The estimated time, in seconds, until a newly launched instance can contribute
  7097. // to the CloudWatch metrics.
  7098. EstimatedInstanceWarmup *int64 `type:"integer"`
  7099. // The aggregation type for the CloudWatch metrics. Valid values are Minimum,
  7100. // Maximum, and Average.
  7101. MetricAggregationType *string `min:"1" type:"string"`
  7102. // The minimum number of instances to scale. If the value of AdjustmentType
  7103. // is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity
  7104. // of the Auto Scaling group by at least this many instances. Otherwise, the
  7105. // error is ValidationError.
  7106. MinAdjustmentMagnitude *int64 `type:"integer"`
  7107. // Available for backward compatibility. Use MinAdjustmentMagnitude instead.
  7108. MinAdjustmentStep *int64 `deprecated:"true" type:"integer"`
  7109. // The Amazon Resource Name (ARN) of the policy.
  7110. PolicyARN *string `min:"1" type:"string"`
  7111. // The name of the scaling policy.
  7112. PolicyName *string `min:"1" type:"string"`
  7113. // The policy type. Valid values are SimpleScaling and StepScaling.
  7114. PolicyType *string `min:"1" type:"string"`
  7115. // The amount by which to scale, based on the specified adjustment type. A positive
  7116. // value adds to the current capacity while a negative number removes from the
  7117. // current capacity.
  7118. ScalingAdjustment *int64 `type:"integer"`
  7119. // A set of adjustments that enable you to scale based on the size of the alarm
  7120. // breach.
  7121. StepAdjustments []*StepAdjustment `type:"list"`
  7122. }
  7123. // String returns the string representation
  7124. func (s ScalingPolicy) String() string {
  7125. return awsutil.Prettify(s)
  7126. }
  7127. // GoString returns the string representation
  7128. func (s ScalingPolicy) GoString() string {
  7129. return s.String()
  7130. }
  7131. // Contains the parameters for SuspendProcesses and ResumeProcesses.
  7132. type ScalingProcessQuery struct {
  7133. _ struct{} `type:"structure"`
  7134. // The name or Amazon Resource Name (ARN) of the Auto Scaling group.
  7135. //
  7136. // AutoScalingGroupName is a required field
  7137. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7138. // One or more of the following processes. If you omit this parameter, all processes
  7139. // are specified.
  7140. //
  7141. // * Launch
  7142. //
  7143. // * Terminate
  7144. //
  7145. // * HealthCheck
  7146. //
  7147. // * ReplaceUnhealthy
  7148. //
  7149. // * AZRebalance
  7150. //
  7151. // * AlarmNotification
  7152. //
  7153. // * ScheduledActions
  7154. //
  7155. // * AddToLoadBalancer
  7156. ScalingProcesses []*string `type:"list"`
  7157. }
  7158. // String returns the string representation
  7159. func (s ScalingProcessQuery) String() string {
  7160. return awsutil.Prettify(s)
  7161. }
  7162. // GoString returns the string representation
  7163. func (s ScalingProcessQuery) GoString() string {
  7164. return s.String()
  7165. }
  7166. // Validate inspects the fields of the type to determine if they are valid.
  7167. func (s *ScalingProcessQuery) Validate() error {
  7168. invalidParams := request.ErrInvalidParams{Context: "ScalingProcessQuery"}
  7169. if s.AutoScalingGroupName == nil {
  7170. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7171. }
  7172. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7173. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7174. }
  7175. if invalidParams.Len() > 0 {
  7176. return invalidParams
  7177. }
  7178. return nil
  7179. }
  7180. // Describes a scheduled update to an Auto Scaling group.
  7181. type ScheduledUpdateGroupAction struct {
  7182. _ struct{} `type:"structure"`
  7183. // The name of the group.
  7184. AutoScalingGroupName *string `min:"1" type:"string"`
  7185. // The number of instances you prefer to maintain in the group.
  7186. DesiredCapacity *int64 `type:"integer"`
  7187. // The date and time that the action is scheduled to end. This date and time
  7188. // can be up to one month in the future.
  7189. EndTime *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  7190. // The maximum size of the group.
  7191. MaxSize *int64 `type:"integer"`
  7192. // The minimum size of the group.
  7193. MinSize *int64 `type:"integer"`
  7194. // The recurring schedule for the action.
  7195. Recurrence *string `min:"1" type:"string"`
  7196. // The Amazon Resource Name (ARN) of the scheduled action.
  7197. ScheduledActionARN *string `min:"1" type:"string"`
  7198. // The name of the scheduled action.
  7199. ScheduledActionName *string `min:"1" type:"string"`
  7200. // The date and time that the action is scheduled to begin. This date and time
  7201. // can be up to one month in the future.
  7202. //
  7203. // When StartTime and EndTime are specified with Recurrence, they form the boundaries
  7204. // of when the recurring action will start and stop.
  7205. StartTime *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  7206. // This parameter is deprecated.
  7207. Time *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  7208. }
  7209. // String returns the string representation
  7210. func (s ScheduledUpdateGroupAction) String() string {
  7211. return awsutil.Prettify(s)
  7212. }
  7213. // GoString returns the string representation
  7214. func (s ScheduledUpdateGroupAction) GoString() string {
  7215. return s.String()
  7216. }
  7217. // Contains the parameters for SetDesiredCapacity.
  7218. type SetDesiredCapacityInput struct {
  7219. _ struct{} `type:"structure"`
  7220. // The name of the Auto Scaling group.
  7221. //
  7222. // AutoScalingGroupName is a required field
  7223. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7224. // The number of EC2 instances that should be running in the Auto Scaling group.
  7225. //
  7226. // DesiredCapacity is a required field
  7227. DesiredCapacity *int64 `type:"integer" required:"true"`
  7228. // By default, SetDesiredCapacity overrides any cooldown period associated with
  7229. // the Auto Scaling group. Specify True to make Auto Scaling to wait for the
  7230. // cool-down period associated with the Auto Scaling group to complete before
  7231. // initiating a scaling activity to set your Auto Scaling group to its new capacity.
  7232. HonorCooldown *bool `type:"boolean"`
  7233. }
  7234. // String returns the string representation
  7235. func (s SetDesiredCapacityInput) String() string {
  7236. return awsutil.Prettify(s)
  7237. }
  7238. // GoString returns the string representation
  7239. func (s SetDesiredCapacityInput) GoString() string {
  7240. return s.String()
  7241. }
  7242. // Validate inspects the fields of the type to determine if they are valid.
  7243. func (s *SetDesiredCapacityInput) Validate() error {
  7244. invalidParams := request.ErrInvalidParams{Context: "SetDesiredCapacityInput"}
  7245. if s.AutoScalingGroupName == nil {
  7246. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7247. }
  7248. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7249. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7250. }
  7251. if s.DesiredCapacity == nil {
  7252. invalidParams.Add(request.NewErrParamRequired("DesiredCapacity"))
  7253. }
  7254. if invalidParams.Len() > 0 {
  7255. return invalidParams
  7256. }
  7257. return nil
  7258. }
  7259. type SetDesiredCapacityOutput struct {
  7260. _ struct{} `type:"structure"`
  7261. }
  7262. // String returns the string representation
  7263. func (s SetDesiredCapacityOutput) String() string {
  7264. return awsutil.Prettify(s)
  7265. }
  7266. // GoString returns the string representation
  7267. func (s SetDesiredCapacityOutput) GoString() string {
  7268. return s.String()
  7269. }
  7270. // Contains the parameters for SetInstanceHealth.
  7271. type SetInstanceHealthInput struct {
  7272. _ struct{} `type:"structure"`
  7273. // The health status of the instance. Set to Healthy if you want the instance
  7274. // to remain in service. Set to Unhealthy if you want the instance to be out
  7275. // of service. Auto Scaling will terminate and replace the unhealthy instance.
  7276. //
  7277. // HealthStatus is a required field
  7278. HealthStatus *string `min:"1" type:"string" required:"true"`
  7279. // The ID of the instance.
  7280. //
  7281. // InstanceId is a required field
  7282. InstanceId *string `min:"1" type:"string" required:"true"`
  7283. // If the Auto Scaling group of the specified instance has a HealthCheckGracePeriod
  7284. // specified for the group, by default, this call will respect the grace period.
  7285. // Set this to False, if you do not want the call to respect the grace period
  7286. // associated with the group.
  7287. //
  7288. // For more information, see the description of the health check grace period
  7289. // for CreateAutoScalingGroup.
  7290. ShouldRespectGracePeriod *bool `type:"boolean"`
  7291. }
  7292. // String returns the string representation
  7293. func (s SetInstanceHealthInput) String() string {
  7294. return awsutil.Prettify(s)
  7295. }
  7296. // GoString returns the string representation
  7297. func (s SetInstanceHealthInput) GoString() string {
  7298. return s.String()
  7299. }
  7300. // Validate inspects the fields of the type to determine if they are valid.
  7301. func (s *SetInstanceHealthInput) Validate() error {
  7302. invalidParams := request.ErrInvalidParams{Context: "SetInstanceHealthInput"}
  7303. if s.HealthStatus == nil {
  7304. invalidParams.Add(request.NewErrParamRequired("HealthStatus"))
  7305. }
  7306. if s.HealthStatus != nil && len(*s.HealthStatus) < 1 {
  7307. invalidParams.Add(request.NewErrParamMinLen("HealthStatus", 1))
  7308. }
  7309. if s.InstanceId == nil {
  7310. invalidParams.Add(request.NewErrParamRequired("InstanceId"))
  7311. }
  7312. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  7313. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  7314. }
  7315. if invalidParams.Len() > 0 {
  7316. return invalidParams
  7317. }
  7318. return nil
  7319. }
  7320. type SetInstanceHealthOutput struct {
  7321. _ struct{} `type:"structure"`
  7322. }
  7323. // String returns the string representation
  7324. func (s SetInstanceHealthOutput) String() string {
  7325. return awsutil.Prettify(s)
  7326. }
  7327. // GoString returns the string representation
  7328. func (s SetInstanceHealthOutput) GoString() string {
  7329. return s.String()
  7330. }
  7331. // Contains the parameters for SetInstanceProtection.
  7332. type SetInstanceProtectionInput struct {
  7333. _ struct{} `type:"structure"`
  7334. // The name of the group.
  7335. //
  7336. // AutoScalingGroupName is a required field
  7337. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7338. // One or more instance IDs.
  7339. //
  7340. // InstanceIds is a required field
  7341. InstanceIds []*string `type:"list" required:"true"`
  7342. // Indicates whether the instance is protected from termination by Auto Scaling
  7343. // when scaling in.
  7344. //
  7345. // ProtectedFromScaleIn is a required field
  7346. ProtectedFromScaleIn *bool `type:"boolean" required:"true"`
  7347. }
  7348. // String returns the string representation
  7349. func (s SetInstanceProtectionInput) String() string {
  7350. return awsutil.Prettify(s)
  7351. }
  7352. // GoString returns the string representation
  7353. func (s SetInstanceProtectionInput) GoString() string {
  7354. return s.String()
  7355. }
  7356. // Validate inspects the fields of the type to determine if they are valid.
  7357. func (s *SetInstanceProtectionInput) Validate() error {
  7358. invalidParams := request.ErrInvalidParams{Context: "SetInstanceProtectionInput"}
  7359. if s.AutoScalingGroupName == nil {
  7360. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7361. }
  7362. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7363. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7364. }
  7365. if s.InstanceIds == nil {
  7366. invalidParams.Add(request.NewErrParamRequired("InstanceIds"))
  7367. }
  7368. if s.ProtectedFromScaleIn == nil {
  7369. invalidParams.Add(request.NewErrParamRequired("ProtectedFromScaleIn"))
  7370. }
  7371. if invalidParams.Len() > 0 {
  7372. return invalidParams
  7373. }
  7374. return nil
  7375. }
  7376. // Contains the output of SetInstanceProtection.
  7377. type SetInstanceProtectionOutput struct {
  7378. _ struct{} `type:"structure"`
  7379. }
  7380. // String returns the string representation
  7381. func (s SetInstanceProtectionOutput) String() string {
  7382. return awsutil.Prettify(s)
  7383. }
  7384. // GoString returns the string representation
  7385. func (s SetInstanceProtectionOutput) GoString() string {
  7386. return s.String()
  7387. }
  7388. // Describes an adjustment based on the difference between the value of the
  7389. // aggregated CloudWatch metric and the breach threshold that you've defined
  7390. // for the alarm.
  7391. //
  7392. // For the following examples, suppose that you have an alarm with a breach
  7393. // threshold of 50:
  7394. //
  7395. // * If you want the adjustment to be triggered when the metric is greater
  7396. // than or equal to 50 and less than 60, specify a lower bound of 0 and an
  7397. // upper bound of 10.
  7398. //
  7399. // * If you want the adjustment to be triggered when the metric is greater
  7400. // than 40 and less than or equal to 50, specify a lower bound of -10 and
  7401. // an upper bound of 0.
  7402. //
  7403. // There are a few rules for the step adjustments for your step policy:
  7404. //
  7405. // * The ranges of your step adjustments can't overlap or have a gap.
  7406. //
  7407. // * At most one step adjustment can have a null lower bound. If one step
  7408. // adjustment has a negative lower bound, then there must be a step adjustment
  7409. // with a null lower bound.
  7410. //
  7411. // * At most one step adjustment can have a null upper bound. If one step
  7412. // adjustment has a positive upper bound, then there must be a step adjustment
  7413. // with a null upper bound.
  7414. //
  7415. // * The upper and lower bound can't be null in the same step adjustment.
  7416. type StepAdjustment struct {
  7417. _ struct{} `type:"structure"`
  7418. // The lower bound for the difference between the alarm threshold and the CloudWatch
  7419. // metric. If the metric value is above the breach threshold, the lower bound
  7420. // is inclusive (the metric must be greater than or equal to the threshold plus
  7421. // the lower bound). Otherwise, it is exclusive (the metric must be greater
  7422. // than the threshold plus the lower bound). A null value indicates negative
  7423. // infinity.
  7424. MetricIntervalLowerBound *float64 `type:"double"`
  7425. // The upper bound for the difference between the alarm threshold and the CloudWatch
  7426. // metric. If the metric value is above the breach threshold, the upper bound
  7427. // is exclusive (the metric must be less than the threshold plus the upper bound).
  7428. // Otherwise, it is inclusive (the metric must be less than or equal to the
  7429. // threshold plus the upper bound). A null value indicates positive infinity.
  7430. //
  7431. // The upper bound must be greater than the lower bound.
  7432. MetricIntervalUpperBound *float64 `type:"double"`
  7433. // The amount by which to scale, based on the specified adjustment type. A positive
  7434. // value adds to the current capacity while a negative number removes from the
  7435. // current capacity.
  7436. //
  7437. // ScalingAdjustment is a required field
  7438. ScalingAdjustment *int64 `type:"integer" required:"true"`
  7439. }
  7440. // String returns the string representation
  7441. func (s StepAdjustment) String() string {
  7442. return awsutil.Prettify(s)
  7443. }
  7444. // GoString returns the string representation
  7445. func (s StepAdjustment) GoString() string {
  7446. return s.String()
  7447. }
  7448. // Validate inspects the fields of the type to determine if they are valid.
  7449. func (s *StepAdjustment) Validate() error {
  7450. invalidParams := request.ErrInvalidParams{Context: "StepAdjustment"}
  7451. if s.ScalingAdjustment == nil {
  7452. invalidParams.Add(request.NewErrParamRequired("ScalingAdjustment"))
  7453. }
  7454. if invalidParams.Len() > 0 {
  7455. return invalidParams
  7456. }
  7457. return nil
  7458. }
  7459. type SuspendProcessesOutput struct {
  7460. _ struct{} `type:"structure"`
  7461. }
  7462. // String returns the string representation
  7463. func (s SuspendProcessesOutput) String() string {
  7464. return awsutil.Prettify(s)
  7465. }
  7466. // GoString returns the string representation
  7467. func (s SuspendProcessesOutput) GoString() string {
  7468. return s.String()
  7469. }
  7470. // Describes an Auto Scaling process that has been suspended. For more information,
  7471. // see ProcessType.
  7472. type SuspendedProcess struct {
  7473. _ struct{} `type:"structure"`
  7474. // The name of the suspended process.
  7475. ProcessName *string `min:"1" type:"string"`
  7476. // The reason that the process was suspended.
  7477. SuspensionReason *string `min:"1" type:"string"`
  7478. }
  7479. // String returns the string representation
  7480. func (s SuspendedProcess) String() string {
  7481. return awsutil.Prettify(s)
  7482. }
  7483. // GoString returns the string representation
  7484. func (s SuspendedProcess) GoString() string {
  7485. return s.String()
  7486. }
  7487. // Describes a tag for an Auto Scaling group.
  7488. type Tag struct {
  7489. _ struct{} `type:"structure"`
  7490. // The tag key.
  7491. //
  7492. // Key is a required field
  7493. Key *string `min:"1" type:"string" required:"true"`
  7494. // Determines whether the tag is added to new instances as they are launched
  7495. // in the group.
  7496. PropagateAtLaunch *bool `type:"boolean"`
  7497. // The name of the group.
  7498. ResourceId *string `type:"string"`
  7499. // The type of resource. The only supported value is auto-scaling-group.
  7500. ResourceType *string `type:"string"`
  7501. // The tag value.
  7502. Value *string `type:"string"`
  7503. }
  7504. // String returns the string representation
  7505. func (s Tag) String() string {
  7506. return awsutil.Prettify(s)
  7507. }
  7508. // GoString returns the string representation
  7509. func (s Tag) GoString() string {
  7510. return s.String()
  7511. }
  7512. // Validate inspects the fields of the type to determine if they are valid.
  7513. func (s *Tag) Validate() error {
  7514. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  7515. if s.Key == nil {
  7516. invalidParams.Add(request.NewErrParamRequired("Key"))
  7517. }
  7518. if s.Key != nil && len(*s.Key) < 1 {
  7519. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7520. }
  7521. if invalidParams.Len() > 0 {
  7522. return invalidParams
  7523. }
  7524. return nil
  7525. }
  7526. // Describes a tag for an Auto Scaling group.
  7527. type TagDescription struct {
  7528. _ struct{} `type:"structure"`
  7529. // The tag key.
  7530. Key *string `min:"1" type:"string"`
  7531. // Determines whether the tag is added to new instances as they are launched
  7532. // in the group.
  7533. PropagateAtLaunch *bool `type:"boolean"`
  7534. // The name of the group.
  7535. ResourceId *string `type:"string"`
  7536. // The type of resource. The only supported value is auto-scaling-group.
  7537. ResourceType *string `type:"string"`
  7538. // The tag value.
  7539. Value *string `type:"string"`
  7540. }
  7541. // String returns the string representation
  7542. func (s TagDescription) String() string {
  7543. return awsutil.Prettify(s)
  7544. }
  7545. // GoString returns the string representation
  7546. func (s TagDescription) GoString() string {
  7547. return s.String()
  7548. }
  7549. // Contains the parameters for TerminateInstanceInAutoScalingGroup.
  7550. type TerminateInstanceInAutoScalingGroupInput struct {
  7551. _ struct{} `type:"structure"`
  7552. // The ID of the instance.
  7553. //
  7554. // InstanceId is a required field
  7555. InstanceId *string `min:"1" type:"string" required:"true"`
  7556. // If true, terminating the instance also decrements the size of the Auto Scaling
  7557. // group.
  7558. //
  7559. // ShouldDecrementDesiredCapacity is a required field
  7560. ShouldDecrementDesiredCapacity *bool `type:"boolean" required:"true"`
  7561. }
  7562. // String returns the string representation
  7563. func (s TerminateInstanceInAutoScalingGroupInput) String() string {
  7564. return awsutil.Prettify(s)
  7565. }
  7566. // GoString returns the string representation
  7567. func (s TerminateInstanceInAutoScalingGroupInput) GoString() string {
  7568. return s.String()
  7569. }
  7570. // Validate inspects the fields of the type to determine if they are valid.
  7571. func (s *TerminateInstanceInAutoScalingGroupInput) Validate() error {
  7572. invalidParams := request.ErrInvalidParams{Context: "TerminateInstanceInAutoScalingGroupInput"}
  7573. if s.InstanceId == nil {
  7574. invalidParams.Add(request.NewErrParamRequired("InstanceId"))
  7575. }
  7576. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  7577. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  7578. }
  7579. if s.ShouldDecrementDesiredCapacity == nil {
  7580. invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity"))
  7581. }
  7582. if invalidParams.Len() > 0 {
  7583. return invalidParams
  7584. }
  7585. return nil
  7586. }
  7587. // Contains the output of TerminateInstancesInAutoScalingGroup.
  7588. type TerminateInstanceInAutoScalingGroupOutput struct {
  7589. _ struct{} `type:"structure"`
  7590. // A scaling activity.
  7591. Activity *Activity `type:"structure"`
  7592. }
  7593. // String returns the string representation
  7594. func (s TerminateInstanceInAutoScalingGroupOutput) String() string {
  7595. return awsutil.Prettify(s)
  7596. }
  7597. // GoString returns the string representation
  7598. func (s TerminateInstanceInAutoScalingGroupOutput) GoString() string {
  7599. return s.String()
  7600. }
  7601. // Contains the parameters for UpdateAutoScalingGroup.
  7602. type UpdateAutoScalingGroupInput struct {
  7603. _ struct{} `type:"structure"`
  7604. // The name of the Auto Scaling group.
  7605. //
  7606. // AutoScalingGroupName is a required field
  7607. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7608. // One or more Availability Zones for the group.
  7609. AvailabilityZones []*string `min:"1" type:"list"`
  7610. // The amount of time, in seconds, after a scaling activity completes before
  7611. // another scaling activity can start. The default is 300.
  7612. //
  7613. // For more information, see Auto Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/latest/userguide/Cooldown.html)
  7614. // in the Auto Scaling User Guide.
  7615. DefaultCooldown *int64 `type:"integer"`
  7616. // The number of EC2 instances that should be running in the Auto Scaling group.
  7617. // This number must be greater than or equal to the minimum size of the group
  7618. // and less than or equal to the maximum size of the group.
  7619. DesiredCapacity *int64 `type:"integer"`
  7620. // The amount of time, in seconds, that Auto Scaling waits before checking the
  7621. // health status of an EC2 instance that has come into service. The default
  7622. // is 0.
  7623. //
  7624. // For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/latest/userguide/healthcheck.html)
  7625. // in the Auto Scaling User Guide.
  7626. HealthCheckGracePeriod *int64 `type:"integer"`
  7627. // The service to use for the health checks. The valid values are EC2 and ELB.
  7628. HealthCheckType *string `min:"1" type:"string"`
  7629. // The name of the launch configuration.
  7630. LaunchConfigurationName *string `min:"1" type:"string"`
  7631. // The maximum size of the Auto Scaling group.
  7632. MaxSize *int64 `type:"integer"`
  7633. // The minimum size of the Auto Scaling group.
  7634. MinSize *int64 `type:"integer"`
  7635. // Indicates whether newly launched instances are protected from termination
  7636. // by Auto Scaling when scaling in.
  7637. NewInstancesProtectedFromScaleIn *bool `type:"boolean"`
  7638. // The name of the placement group into which you'll launch your instances,
  7639. // if any. For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html)
  7640. // in the Amazon Elastic Compute Cloud User Guide.
  7641. PlacementGroup *string `min:"1" type:"string"`
  7642. // A standalone termination policy or a list of termination policies used to
  7643. // select the instance to terminate. The policies are executed in the order
  7644. // that they are listed.
  7645. //
  7646. // For more information, see Controlling Which Instances Auto Scaling Terminates
  7647. // During Scale In (http://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-termination.html)
  7648. // in the Auto Scaling User Guide.
  7649. TerminationPolicies []*string `type:"list"`
  7650. // The ID of the subnet, if you are launching into a VPC. You can specify several
  7651. // subnets in a comma-separated list.
  7652. //
  7653. // When you specify VPCZoneIdentifier with AvailabilityZones, ensure that the
  7654. // subnets' Availability Zones match the values you specify for AvailabilityZones.
  7655. //
  7656. // For more information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/latest/userguide/asg-in-vpc.html)
  7657. // in the Auto Scaling User Guide.
  7658. VPCZoneIdentifier *string `min:"1" type:"string"`
  7659. }
  7660. // String returns the string representation
  7661. func (s UpdateAutoScalingGroupInput) String() string {
  7662. return awsutil.Prettify(s)
  7663. }
  7664. // GoString returns the string representation
  7665. func (s UpdateAutoScalingGroupInput) GoString() string {
  7666. return s.String()
  7667. }
  7668. // Validate inspects the fields of the type to determine if they are valid.
  7669. func (s *UpdateAutoScalingGroupInput) Validate() error {
  7670. invalidParams := request.ErrInvalidParams{Context: "UpdateAutoScalingGroupInput"}
  7671. if s.AutoScalingGroupName == nil {
  7672. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7673. }
  7674. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7675. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7676. }
  7677. if s.AvailabilityZones != nil && len(s.AvailabilityZones) < 1 {
  7678. invalidParams.Add(request.NewErrParamMinLen("AvailabilityZones", 1))
  7679. }
  7680. if s.HealthCheckType != nil && len(*s.HealthCheckType) < 1 {
  7681. invalidParams.Add(request.NewErrParamMinLen("HealthCheckType", 1))
  7682. }
  7683. if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 {
  7684. invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1))
  7685. }
  7686. if s.PlacementGroup != nil && len(*s.PlacementGroup) < 1 {
  7687. invalidParams.Add(request.NewErrParamMinLen("PlacementGroup", 1))
  7688. }
  7689. if s.VPCZoneIdentifier != nil && len(*s.VPCZoneIdentifier) < 1 {
  7690. invalidParams.Add(request.NewErrParamMinLen("VPCZoneIdentifier", 1))
  7691. }
  7692. if invalidParams.Len() > 0 {
  7693. return invalidParams
  7694. }
  7695. return nil
  7696. }
  7697. type UpdateAutoScalingGroupOutput struct {
  7698. _ struct{} `type:"structure"`
  7699. }
  7700. // String returns the string representation
  7701. func (s UpdateAutoScalingGroupOutput) String() string {
  7702. return awsutil.Prettify(s)
  7703. }
  7704. // GoString returns the string representation
  7705. func (s UpdateAutoScalingGroupOutput) GoString() string {
  7706. return s.String()
  7707. }
  7708. const (
  7709. // LifecycleStatePending is a LifecycleState enum value
  7710. LifecycleStatePending = "Pending"
  7711. // LifecycleStatePendingWait is a LifecycleState enum value
  7712. LifecycleStatePendingWait = "Pending:Wait"
  7713. // LifecycleStatePendingProceed is a LifecycleState enum value
  7714. LifecycleStatePendingProceed = "Pending:Proceed"
  7715. // LifecycleStateQuarantined is a LifecycleState enum value
  7716. LifecycleStateQuarantined = "Quarantined"
  7717. // LifecycleStateInService is a LifecycleState enum value
  7718. LifecycleStateInService = "InService"
  7719. // LifecycleStateTerminating is a LifecycleState enum value
  7720. LifecycleStateTerminating = "Terminating"
  7721. // LifecycleStateTerminatingWait is a LifecycleState enum value
  7722. LifecycleStateTerminatingWait = "Terminating:Wait"
  7723. // LifecycleStateTerminatingProceed is a LifecycleState enum value
  7724. LifecycleStateTerminatingProceed = "Terminating:Proceed"
  7725. // LifecycleStateTerminated is a LifecycleState enum value
  7726. LifecycleStateTerminated = "Terminated"
  7727. // LifecycleStateDetaching is a LifecycleState enum value
  7728. LifecycleStateDetaching = "Detaching"
  7729. // LifecycleStateDetached is a LifecycleState enum value
  7730. LifecycleStateDetached = "Detached"
  7731. // LifecycleStateEnteringStandby is a LifecycleState enum value
  7732. LifecycleStateEnteringStandby = "EnteringStandby"
  7733. // LifecycleStateStandby is a LifecycleState enum value
  7734. LifecycleStateStandby = "Standby"
  7735. )
  7736. const (
  7737. // ScalingActivityStatusCodePendingSpotBidPlacement is a ScalingActivityStatusCode enum value
  7738. ScalingActivityStatusCodePendingSpotBidPlacement = "PendingSpotBidPlacement"
  7739. // ScalingActivityStatusCodeWaitingForSpotInstanceRequestId is a ScalingActivityStatusCode enum value
  7740. ScalingActivityStatusCodeWaitingForSpotInstanceRequestId = "WaitingForSpotInstanceRequestId"
  7741. // ScalingActivityStatusCodeWaitingForSpotInstanceId is a ScalingActivityStatusCode enum value
  7742. ScalingActivityStatusCodeWaitingForSpotInstanceId = "WaitingForSpotInstanceId"
  7743. // ScalingActivityStatusCodeWaitingForInstanceId is a ScalingActivityStatusCode enum value
  7744. ScalingActivityStatusCodeWaitingForInstanceId = "WaitingForInstanceId"
  7745. // ScalingActivityStatusCodePreInService is a ScalingActivityStatusCode enum value
  7746. ScalingActivityStatusCodePreInService = "PreInService"
  7747. // ScalingActivityStatusCodeInProgress is a ScalingActivityStatusCode enum value
  7748. ScalingActivityStatusCodeInProgress = "InProgress"
  7749. // ScalingActivityStatusCodeWaitingForElbconnectionDraining is a ScalingActivityStatusCode enum value
  7750. ScalingActivityStatusCodeWaitingForElbconnectionDraining = "WaitingForELBConnectionDraining"
  7751. // ScalingActivityStatusCodeMidLifecycleAction is a ScalingActivityStatusCode enum value
  7752. ScalingActivityStatusCodeMidLifecycleAction = "MidLifecycleAction"
  7753. // ScalingActivityStatusCodeWaitingForInstanceWarmup is a ScalingActivityStatusCode enum value
  7754. ScalingActivityStatusCodeWaitingForInstanceWarmup = "WaitingForInstanceWarmup"
  7755. // ScalingActivityStatusCodeSuccessful is a ScalingActivityStatusCode enum value
  7756. ScalingActivityStatusCodeSuccessful = "Successful"
  7757. // ScalingActivityStatusCodeFailed is a ScalingActivityStatusCode enum value
  7758. ScalingActivityStatusCodeFailed = "Failed"
  7759. // ScalingActivityStatusCodeCancelled is a ScalingActivityStatusCode enum value
  7760. ScalingActivityStatusCodeCancelled = "Cancelled"
  7761. )