api.go 476 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package autoscaling
  3. import (
  4. "fmt"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  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 will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See AttachInstances for more information on using the AttachInstances
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  27. //
  28. // // Example sending a request using the AttachInstancesRequest method.
  29. // req, resp := client.AttachInstancesRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachInstances
  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. output = &AttachInstancesOutput{}
  47. req = c.newRequest(op, input, output)
  48. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  49. return
  50. }
  51. // AttachInstances API operation for Auto Scaling.
  52. //
  53. // Attaches one or more EC2 instances to the specified Auto Scaling group.
  54. //
  55. // When you attach instances, Amazon EC2 Auto Scaling increases the desired
  56. // capacity of the group by the number of instances being attached. If the number
  57. // of instances being attached plus the desired capacity of the group exceeds
  58. // the maximum size of the group, the operation fails.
  59. //
  60. // If there is a Classic Load Balancer attached to your Auto Scaling group,
  61. // the instances are also registered with the load balancer. If there are target
  62. // groups attached to your Auto Scaling group, the instances are also registered
  63. // with the target groups.
  64. //
  65. // For more information, see Attach EC2 Instances to Your Auto Scaling Group
  66. // (http://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-instance-asg.html)
  67. // in the Amazon EC2 Auto Scaling User Guide.
  68. //
  69. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  70. // with awserr.Error's Code and Message methods to get detailed information about
  71. // the error.
  72. //
  73. // See the AWS API reference guide for Auto Scaling's
  74. // API operation AttachInstances for usage and error information.
  75. //
  76. // Returned Error Codes:
  77. // * ErrCodeResourceContentionFault "ResourceContention"
  78. // You already have a pending update to an Auto Scaling resource (for example,
  79. // a group, instance, or load balancer).
  80. //
  81. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  82. // The service-linked role is not yet ready for use.
  83. //
  84. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachInstances
  85. func (c *AutoScaling) AttachInstances(input *AttachInstancesInput) (*AttachInstancesOutput, error) {
  86. req, out := c.AttachInstancesRequest(input)
  87. return out, req.Send()
  88. }
  89. // AttachInstancesWithContext is the same as AttachInstances with the addition of
  90. // the ability to pass a context and additional request options.
  91. //
  92. // See AttachInstances for details on how to use this API operation.
  93. //
  94. // The context must be non-nil and will be used for request cancellation. If
  95. // the context is nil a panic will occur. In the future the SDK may create
  96. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  97. // for more information on using Contexts.
  98. func (c *AutoScaling) AttachInstancesWithContext(ctx aws.Context, input *AttachInstancesInput, opts ...request.Option) (*AttachInstancesOutput, error) {
  99. req, out := c.AttachInstancesRequest(input)
  100. req.SetContext(ctx)
  101. req.ApplyOptions(opts...)
  102. return out, req.Send()
  103. }
  104. const opAttachLoadBalancerTargetGroups = "AttachLoadBalancerTargetGroups"
  105. // AttachLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the
  106. // client's request for the AttachLoadBalancerTargetGroups operation. The "output" return
  107. // value will be populated with the request's response once the request completes
  108. // successfully.
  109. //
  110. // Use "Send" method on the returned Request to send the API call to the service.
  111. // the "output" return value is not valid until after Send returns without error.
  112. //
  113. // See AttachLoadBalancerTargetGroups for more information on using the AttachLoadBalancerTargetGroups
  114. // API call, and error handling.
  115. //
  116. // This method is useful when you want to inject custom logic or configuration
  117. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  118. //
  119. //
  120. // // Example sending a request using the AttachLoadBalancerTargetGroupsRequest method.
  121. // req, resp := client.AttachLoadBalancerTargetGroupsRequest(params)
  122. //
  123. // err := req.Send()
  124. // if err == nil { // resp is now filled
  125. // fmt.Println(resp)
  126. // }
  127. //
  128. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancerTargetGroups
  129. func (c *AutoScaling) AttachLoadBalancerTargetGroupsRequest(input *AttachLoadBalancerTargetGroupsInput) (req *request.Request, output *AttachLoadBalancerTargetGroupsOutput) {
  130. op := &request.Operation{
  131. Name: opAttachLoadBalancerTargetGroups,
  132. HTTPMethod: "POST",
  133. HTTPPath: "/",
  134. }
  135. if input == nil {
  136. input = &AttachLoadBalancerTargetGroupsInput{}
  137. }
  138. output = &AttachLoadBalancerTargetGroupsOutput{}
  139. req = c.newRequest(op, input, output)
  140. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  141. return
  142. }
  143. // AttachLoadBalancerTargetGroups API operation for Auto Scaling.
  144. //
  145. // Attaches one or more target groups to the specified Auto Scaling group.
  146. //
  147. // To describe the target groups for an Auto Scaling group, use DescribeLoadBalancerTargetGroups.
  148. // To detach the target group from the Auto Scaling group, use DetachLoadBalancerTargetGroups.
  149. //
  150. // For more information, see Attach a Load Balancer to Your Auto Scaling Group
  151. // (http://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-load-balancer-asg.html)
  152. // in the Amazon EC2 Auto Scaling User Guide.
  153. //
  154. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  155. // with awserr.Error's Code and Message methods to get detailed information about
  156. // the error.
  157. //
  158. // See the AWS API reference guide for Auto Scaling's
  159. // API operation AttachLoadBalancerTargetGroups for usage and error information.
  160. //
  161. // Returned Error Codes:
  162. // * ErrCodeResourceContentionFault "ResourceContention"
  163. // You already have a pending update to an Auto Scaling resource (for example,
  164. // a group, instance, or load balancer).
  165. //
  166. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  167. // The service-linked role is not yet ready for use.
  168. //
  169. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancerTargetGroups
  170. func (c *AutoScaling) AttachLoadBalancerTargetGroups(input *AttachLoadBalancerTargetGroupsInput) (*AttachLoadBalancerTargetGroupsOutput, error) {
  171. req, out := c.AttachLoadBalancerTargetGroupsRequest(input)
  172. return out, req.Send()
  173. }
  174. // AttachLoadBalancerTargetGroupsWithContext is the same as AttachLoadBalancerTargetGroups with the addition of
  175. // the ability to pass a context and additional request options.
  176. //
  177. // See AttachLoadBalancerTargetGroups for details on how to use this API operation.
  178. //
  179. // The context must be non-nil and will be used for request cancellation. If
  180. // the context is nil a panic will occur. In the future the SDK may create
  181. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  182. // for more information on using Contexts.
  183. func (c *AutoScaling) AttachLoadBalancerTargetGroupsWithContext(ctx aws.Context, input *AttachLoadBalancerTargetGroupsInput, opts ...request.Option) (*AttachLoadBalancerTargetGroupsOutput, error) {
  184. req, out := c.AttachLoadBalancerTargetGroupsRequest(input)
  185. req.SetContext(ctx)
  186. req.ApplyOptions(opts...)
  187. return out, req.Send()
  188. }
  189. const opAttachLoadBalancers = "AttachLoadBalancers"
  190. // AttachLoadBalancersRequest generates a "aws/request.Request" representing the
  191. // client's request for the AttachLoadBalancers operation. The "output" return
  192. // value will be populated with the request's response once the request completes
  193. // successfully.
  194. //
  195. // Use "Send" method on the returned Request to send the API call to the service.
  196. // the "output" return value is not valid until after Send returns without error.
  197. //
  198. // See AttachLoadBalancers for more information on using the AttachLoadBalancers
  199. // API call, and error handling.
  200. //
  201. // This method is useful when you want to inject custom logic or configuration
  202. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  203. //
  204. //
  205. // // Example sending a request using the AttachLoadBalancersRequest method.
  206. // req, resp := client.AttachLoadBalancersRequest(params)
  207. //
  208. // err := req.Send()
  209. // if err == nil { // resp is now filled
  210. // fmt.Println(resp)
  211. // }
  212. //
  213. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancers
  214. func (c *AutoScaling) AttachLoadBalancersRequest(input *AttachLoadBalancersInput) (req *request.Request, output *AttachLoadBalancersOutput) {
  215. op := &request.Operation{
  216. Name: opAttachLoadBalancers,
  217. HTTPMethod: "POST",
  218. HTTPPath: "/",
  219. }
  220. if input == nil {
  221. input = &AttachLoadBalancersInput{}
  222. }
  223. output = &AttachLoadBalancersOutput{}
  224. req = c.newRequest(op, input, output)
  225. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  226. return
  227. }
  228. // AttachLoadBalancers API operation for Auto Scaling.
  229. //
  230. // Attaches one or more Classic Load Balancers to the specified Auto Scaling
  231. // group.
  232. //
  233. // To attach an Application Load Balancer instead, see AttachLoadBalancerTargetGroups.
  234. //
  235. // To describe the load balancers for an Auto Scaling group, use DescribeLoadBalancers.
  236. // To detach the load balancer from the Auto Scaling group, use DetachLoadBalancers.
  237. //
  238. // For more information, see Attach a Load Balancer to Your Auto Scaling Group
  239. // (http://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-load-balancer-asg.html)
  240. // in the Amazon EC2 Auto Scaling User Guide.
  241. //
  242. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  243. // with awserr.Error's Code and Message methods to get detailed information about
  244. // the error.
  245. //
  246. // See the AWS API reference guide for Auto Scaling's
  247. // API operation AttachLoadBalancers for usage and error information.
  248. //
  249. // Returned Error Codes:
  250. // * ErrCodeResourceContentionFault "ResourceContention"
  251. // You already have a pending update to an Auto Scaling resource (for example,
  252. // a group, instance, or load balancer).
  253. //
  254. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  255. // The service-linked role is not yet ready for use.
  256. //
  257. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancers
  258. func (c *AutoScaling) AttachLoadBalancers(input *AttachLoadBalancersInput) (*AttachLoadBalancersOutput, error) {
  259. req, out := c.AttachLoadBalancersRequest(input)
  260. return out, req.Send()
  261. }
  262. // AttachLoadBalancersWithContext is the same as AttachLoadBalancers with the addition of
  263. // the ability to pass a context and additional request options.
  264. //
  265. // See AttachLoadBalancers for details on how to use this API operation.
  266. //
  267. // The context must be non-nil and will be used for request cancellation. If
  268. // the context is nil a panic will occur. In the future the SDK may create
  269. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  270. // for more information on using Contexts.
  271. func (c *AutoScaling) AttachLoadBalancersWithContext(ctx aws.Context, input *AttachLoadBalancersInput, opts ...request.Option) (*AttachLoadBalancersOutput, error) {
  272. req, out := c.AttachLoadBalancersRequest(input)
  273. req.SetContext(ctx)
  274. req.ApplyOptions(opts...)
  275. return out, req.Send()
  276. }
  277. const opBatchDeleteScheduledAction = "BatchDeleteScheduledAction"
  278. // BatchDeleteScheduledActionRequest generates a "aws/request.Request" representing the
  279. // client's request for the BatchDeleteScheduledAction operation. The "output" return
  280. // value will be populated with the request's response once the request completes
  281. // successfully.
  282. //
  283. // Use "Send" method on the returned Request to send the API call to the service.
  284. // the "output" return value is not valid until after Send returns without error.
  285. //
  286. // See BatchDeleteScheduledAction for more information on using the BatchDeleteScheduledAction
  287. // API call, and error handling.
  288. //
  289. // This method is useful when you want to inject custom logic or configuration
  290. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  291. //
  292. //
  293. // // Example sending a request using the BatchDeleteScheduledActionRequest method.
  294. // req, resp := client.BatchDeleteScheduledActionRequest(params)
  295. //
  296. // err := req.Send()
  297. // if err == nil { // resp is now filled
  298. // fmt.Println(resp)
  299. // }
  300. //
  301. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchDeleteScheduledAction
  302. func (c *AutoScaling) BatchDeleteScheduledActionRequest(input *BatchDeleteScheduledActionInput) (req *request.Request, output *BatchDeleteScheduledActionOutput) {
  303. op := &request.Operation{
  304. Name: opBatchDeleteScheduledAction,
  305. HTTPMethod: "POST",
  306. HTTPPath: "/",
  307. }
  308. if input == nil {
  309. input = &BatchDeleteScheduledActionInput{}
  310. }
  311. output = &BatchDeleteScheduledActionOutput{}
  312. req = c.newRequest(op, input, output)
  313. return
  314. }
  315. // BatchDeleteScheduledAction API operation for Auto Scaling.
  316. //
  317. // Deletes one or more scheduled actions for the specified Auto Scaling group.
  318. //
  319. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  320. // with awserr.Error's Code and Message methods to get detailed information about
  321. // the error.
  322. //
  323. // See the AWS API reference guide for Auto Scaling's
  324. // API operation BatchDeleteScheduledAction for usage and error information.
  325. //
  326. // Returned Error Codes:
  327. // * ErrCodeResourceContentionFault "ResourceContention"
  328. // You already have a pending update to an Auto Scaling resource (for example,
  329. // a group, instance, or load balancer).
  330. //
  331. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchDeleteScheduledAction
  332. func (c *AutoScaling) BatchDeleteScheduledAction(input *BatchDeleteScheduledActionInput) (*BatchDeleteScheduledActionOutput, error) {
  333. req, out := c.BatchDeleteScheduledActionRequest(input)
  334. return out, req.Send()
  335. }
  336. // BatchDeleteScheduledActionWithContext is the same as BatchDeleteScheduledAction with the addition of
  337. // the ability to pass a context and additional request options.
  338. //
  339. // See BatchDeleteScheduledAction for details on how to use this API operation.
  340. //
  341. // The context must be non-nil and will be used for request cancellation. If
  342. // the context is nil a panic will occur. In the future the SDK may create
  343. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  344. // for more information on using Contexts.
  345. func (c *AutoScaling) BatchDeleteScheduledActionWithContext(ctx aws.Context, input *BatchDeleteScheduledActionInput, opts ...request.Option) (*BatchDeleteScheduledActionOutput, error) {
  346. req, out := c.BatchDeleteScheduledActionRequest(input)
  347. req.SetContext(ctx)
  348. req.ApplyOptions(opts...)
  349. return out, req.Send()
  350. }
  351. const opBatchPutScheduledUpdateGroupAction = "BatchPutScheduledUpdateGroupAction"
  352. // BatchPutScheduledUpdateGroupActionRequest generates a "aws/request.Request" representing the
  353. // client's request for the BatchPutScheduledUpdateGroupAction operation. The "output" return
  354. // value will be populated with the request's response once the request completes
  355. // successfully.
  356. //
  357. // Use "Send" method on the returned Request to send the API call to the service.
  358. // the "output" return value is not valid until after Send returns without error.
  359. //
  360. // See BatchPutScheduledUpdateGroupAction for more information on using the BatchPutScheduledUpdateGroupAction
  361. // API call, and error handling.
  362. //
  363. // This method is useful when you want to inject custom logic or configuration
  364. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  365. //
  366. //
  367. // // Example sending a request using the BatchPutScheduledUpdateGroupActionRequest method.
  368. // req, resp := client.BatchPutScheduledUpdateGroupActionRequest(params)
  369. //
  370. // err := req.Send()
  371. // if err == nil { // resp is now filled
  372. // fmt.Println(resp)
  373. // }
  374. //
  375. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchPutScheduledUpdateGroupAction
  376. func (c *AutoScaling) BatchPutScheduledUpdateGroupActionRequest(input *BatchPutScheduledUpdateGroupActionInput) (req *request.Request, output *BatchPutScheduledUpdateGroupActionOutput) {
  377. op := &request.Operation{
  378. Name: opBatchPutScheduledUpdateGroupAction,
  379. HTTPMethod: "POST",
  380. HTTPPath: "/",
  381. }
  382. if input == nil {
  383. input = &BatchPutScheduledUpdateGroupActionInput{}
  384. }
  385. output = &BatchPutScheduledUpdateGroupActionOutput{}
  386. req = c.newRequest(op, input, output)
  387. return
  388. }
  389. // BatchPutScheduledUpdateGroupAction API operation for Auto Scaling.
  390. //
  391. // Creates or updates one or more scheduled scaling actions for an Auto Scaling
  392. // group. If you leave a parameter unspecified when updating a scheduled scaling
  393. // action, the corresponding value remains unchanged.
  394. //
  395. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  396. // with awserr.Error's Code and Message methods to get detailed information about
  397. // the error.
  398. //
  399. // See the AWS API reference guide for Auto Scaling's
  400. // API operation BatchPutScheduledUpdateGroupAction for usage and error information.
  401. //
  402. // Returned Error Codes:
  403. // * ErrCodeAlreadyExistsFault "AlreadyExists"
  404. // You already have an Auto Scaling group or launch configuration with this
  405. // name.
  406. //
  407. // * ErrCodeLimitExceededFault "LimitExceeded"
  408. // You have already reached a limit for your Auto Scaling resources (for example,
  409. // groups, launch configurations, or lifecycle hooks). For more information,
  410. // see DescribeAccountLimits.
  411. //
  412. // * ErrCodeResourceContentionFault "ResourceContention"
  413. // You already have a pending update to an Auto Scaling resource (for example,
  414. // a group, instance, or load balancer).
  415. //
  416. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchPutScheduledUpdateGroupAction
  417. func (c *AutoScaling) BatchPutScheduledUpdateGroupAction(input *BatchPutScheduledUpdateGroupActionInput) (*BatchPutScheduledUpdateGroupActionOutput, error) {
  418. req, out := c.BatchPutScheduledUpdateGroupActionRequest(input)
  419. return out, req.Send()
  420. }
  421. // BatchPutScheduledUpdateGroupActionWithContext is the same as BatchPutScheduledUpdateGroupAction with the addition of
  422. // the ability to pass a context and additional request options.
  423. //
  424. // See BatchPutScheduledUpdateGroupAction for details on how to use this API operation.
  425. //
  426. // The context must be non-nil and will be used for request cancellation. If
  427. // the context is nil a panic will occur. In the future the SDK may create
  428. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  429. // for more information on using Contexts.
  430. func (c *AutoScaling) BatchPutScheduledUpdateGroupActionWithContext(ctx aws.Context, input *BatchPutScheduledUpdateGroupActionInput, opts ...request.Option) (*BatchPutScheduledUpdateGroupActionOutput, error) {
  431. req, out := c.BatchPutScheduledUpdateGroupActionRequest(input)
  432. req.SetContext(ctx)
  433. req.ApplyOptions(opts...)
  434. return out, req.Send()
  435. }
  436. const opCompleteLifecycleAction = "CompleteLifecycleAction"
  437. // CompleteLifecycleActionRequest generates a "aws/request.Request" representing the
  438. // client's request for the CompleteLifecycleAction operation. The "output" return
  439. // value will be populated with the request's response once the request completes
  440. // successfully.
  441. //
  442. // Use "Send" method on the returned Request to send the API call to the service.
  443. // the "output" return value is not valid until after Send returns without error.
  444. //
  445. // See CompleteLifecycleAction for more information on using the CompleteLifecycleAction
  446. // API call, and error handling.
  447. //
  448. // This method is useful when you want to inject custom logic or configuration
  449. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  450. //
  451. //
  452. // // Example sending a request using the CompleteLifecycleActionRequest method.
  453. // req, resp := client.CompleteLifecycleActionRequest(params)
  454. //
  455. // err := req.Send()
  456. // if err == nil { // resp is now filled
  457. // fmt.Println(resp)
  458. // }
  459. //
  460. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CompleteLifecycleAction
  461. func (c *AutoScaling) CompleteLifecycleActionRequest(input *CompleteLifecycleActionInput) (req *request.Request, output *CompleteLifecycleActionOutput) {
  462. op := &request.Operation{
  463. Name: opCompleteLifecycleAction,
  464. HTTPMethod: "POST",
  465. HTTPPath: "/",
  466. }
  467. if input == nil {
  468. input = &CompleteLifecycleActionInput{}
  469. }
  470. output = &CompleteLifecycleActionOutput{}
  471. req = c.newRequest(op, input, output)
  472. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  473. return
  474. }
  475. // CompleteLifecycleAction API operation for Auto Scaling.
  476. //
  477. // Completes the lifecycle action for the specified token or instance with the
  478. // specified result.
  479. //
  480. // This step is a part of the procedure for adding a lifecycle hook to an Auto
  481. // Scaling group:
  482. //
  483. // (Optional) Create a Lambda function and a rule that allows CloudWatch Events
  484. // to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates
  485. // instances.
  486. //
  487. // (Optional) Create a notification target and an IAM role. The target can be
  488. // either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon
  489. // EC2 Auto Scaling to publish lifecycle notifications to the target.
  490. //
  491. // Create the lifecycle hook. Specify whether the hook is used when the instances
  492. // launch or terminate.
  493. //
  494. // If you need more time, record the lifecycle action heartbeat to keep the
  495. // instance in a pending state.
  496. //
  497. // If you finish before the timeout period ends, complete the lifecycle action.
  498. //
  499. // For more information, see Auto Scaling Lifecycle (http://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html)
  500. // in the Amazon EC2 Auto Scaling User Guide.
  501. //
  502. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  503. // with awserr.Error's Code and Message methods to get detailed information about
  504. // the error.
  505. //
  506. // See the AWS API reference guide for Auto Scaling's
  507. // API operation CompleteLifecycleAction for usage and error information.
  508. //
  509. // Returned Error Codes:
  510. // * ErrCodeResourceContentionFault "ResourceContention"
  511. // You already have a pending update to an Auto Scaling resource (for example,
  512. // a group, instance, or load balancer).
  513. //
  514. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CompleteLifecycleAction
  515. func (c *AutoScaling) CompleteLifecycleAction(input *CompleteLifecycleActionInput) (*CompleteLifecycleActionOutput, error) {
  516. req, out := c.CompleteLifecycleActionRequest(input)
  517. return out, req.Send()
  518. }
  519. // CompleteLifecycleActionWithContext is the same as CompleteLifecycleAction with the addition of
  520. // the ability to pass a context and additional request options.
  521. //
  522. // See CompleteLifecycleAction for details on how to use this API operation.
  523. //
  524. // The context must be non-nil and will be used for request cancellation. If
  525. // the context is nil a panic will occur. In the future the SDK may create
  526. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  527. // for more information on using Contexts.
  528. func (c *AutoScaling) CompleteLifecycleActionWithContext(ctx aws.Context, input *CompleteLifecycleActionInput, opts ...request.Option) (*CompleteLifecycleActionOutput, error) {
  529. req, out := c.CompleteLifecycleActionRequest(input)
  530. req.SetContext(ctx)
  531. req.ApplyOptions(opts...)
  532. return out, req.Send()
  533. }
  534. const opCreateAutoScalingGroup = "CreateAutoScalingGroup"
  535. // CreateAutoScalingGroupRequest generates a "aws/request.Request" representing the
  536. // client's request for the CreateAutoScalingGroup operation. The "output" return
  537. // value will be populated with the request's response once the request completes
  538. // successfully.
  539. //
  540. // Use "Send" method on the returned Request to send the API call to the service.
  541. // the "output" return value is not valid until after Send returns without error.
  542. //
  543. // See CreateAutoScalingGroup for more information on using the CreateAutoScalingGroup
  544. // API call, and error handling.
  545. //
  546. // This method is useful when you want to inject custom logic or configuration
  547. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  548. //
  549. //
  550. // // Example sending a request using the CreateAutoScalingGroupRequest method.
  551. // req, resp := client.CreateAutoScalingGroupRequest(params)
  552. //
  553. // err := req.Send()
  554. // if err == nil { // resp is now filled
  555. // fmt.Println(resp)
  556. // }
  557. //
  558. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateAutoScalingGroup
  559. func (c *AutoScaling) CreateAutoScalingGroupRequest(input *CreateAutoScalingGroupInput) (req *request.Request, output *CreateAutoScalingGroupOutput) {
  560. op := &request.Operation{
  561. Name: opCreateAutoScalingGroup,
  562. HTTPMethod: "POST",
  563. HTTPPath: "/",
  564. }
  565. if input == nil {
  566. input = &CreateAutoScalingGroupInput{}
  567. }
  568. output = &CreateAutoScalingGroupOutput{}
  569. req = c.newRequest(op, input, output)
  570. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  571. return
  572. }
  573. // CreateAutoScalingGroup API operation for Auto Scaling.
  574. //
  575. // Creates an Auto Scaling group with the specified name and attributes.
  576. //
  577. // If you exceed your maximum limit of Auto Scaling groups, the call fails.
  578. // For information about viewing this limit, see DescribeAccountLimits. For
  579. // information about updating this limit, see Auto Scaling Limits (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html)
  580. // in the Amazon EC2 Auto Scaling User Guide.
  581. //
  582. // For more information, see Auto Scaling Groups (http://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroup.html)
  583. // in the Amazon EC2 Auto Scaling User Guide.
  584. //
  585. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  586. // with awserr.Error's Code and Message methods to get detailed information about
  587. // the error.
  588. //
  589. // See the AWS API reference guide for Auto Scaling's
  590. // API operation CreateAutoScalingGroup for usage and error information.
  591. //
  592. // Returned Error Codes:
  593. // * ErrCodeAlreadyExistsFault "AlreadyExists"
  594. // You already have an Auto Scaling group or launch configuration with this
  595. // name.
  596. //
  597. // * ErrCodeLimitExceededFault "LimitExceeded"
  598. // You have already reached a limit for your Auto Scaling resources (for example,
  599. // groups, launch configurations, or lifecycle hooks). For more information,
  600. // see DescribeAccountLimits.
  601. //
  602. // * ErrCodeResourceContentionFault "ResourceContention"
  603. // You already have a pending update to an Auto Scaling resource (for example,
  604. // a group, instance, or load balancer).
  605. //
  606. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  607. // The service-linked role is not yet ready for use.
  608. //
  609. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateAutoScalingGroup
  610. func (c *AutoScaling) CreateAutoScalingGroup(input *CreateAutoScalingGroupInput) (*CreateAutoScalingGroupOutput, error) {
  611. req, out := c.CreateAutoScalingGroupRequest(input)
  612. return out, req.Send()
  613. }
  614. // CreateAutoScalingGroupWithContext is the same as CreateAutoScalingGroup with the addition of
  615. // the ability to pass a context and additional request options.
  616. //
  617. // See CreateAutoScalingGroup for details on how to use this API operation.
  618. //
  619. // The context must be non-nil and will be used for request cancellation. If
  620. // the context is nil a panic will occur. In the future the SDK may create
  621. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  622. // for more information on using Contexts.
  623. func (c *AutoScaling) CreateAutoScalingGroupWithContext(ctx aws.Context, input *CreateAutoScalingGroupInput, opts ...request.Option) (*CreateAutoScalingGroupOutput, error) {
  624. req, out := c.CreateAutoScalingGroupRequest(input)
  625. req.SetContext(ctx)
  626. req.ApplyOptions(opts...)
  627. return out, req.Send()
  628. }
  629. const opCreateLaunchConfiguration = "CreateLaunchConfiguration"
  630. // CreateLaunchConfigurationRequest generates a "aws/request.Request" representing the
  631. // client's request for the CreateLaunchConfiguration operation. The "output" return
  632. // value will be populated with the request's response once the request completes
  633. // successfully.
  634. //
  635. // Use "Send" method on the returned Request to send the API call to the service.
  636. // the "output" return value is not valid until after Send returns without error.
  637. //
  638. // See CreateLaunchConfiguration for more information on using the CreateLaunchConfiguration
  639. // API call, and error handling.
  640. //
  641. // This method is useful when you want to inject custom logic or configuration
  642. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  643. //
  644. //
  645. // // Example sending a request using the CreateLaunchConfigurationRequest method.
  646. // req, resp := client.CreateLaunchConfigurationRequest(params)
  647. //
  648. // err := req.Send()
  649. // if err == nil { // resp is now filled
  650. // fmt.Println(resp)
  651. // }
  652. //
  653. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateLaunchConfiguration
  654. func (c *AutoScaling) CreateLaunchConfigurationRequest(input *CreateLaunchConfigurationInput) (req *request.Request, output *CreateLaunchConfigurationOutput) {
  655. op := &request.Operation{
  656. Name: opCreateLaunchConfiguration,
  657. HTTPMethod: "POST",
  658. HTTPPath: "/",
  659. }
  660. if input == nil {
  661. input = &CreateLaunchConfigurationInput{}
  662. }
  663. output = &CreateLaunchConfigurationOutput{}
  664. req = c.newRequest(op, input, output)
  665. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  666. return
  667. }
  668. // CreateLaunchConfiguration API operation for Auto Scaling.
  669. //
  670. // Creates a launch configuration.
  671. //
  672. // If you exceed your maximum limit of launch configurations, the call fails.
  673. // For information about viewing this limit, see DescribeAccountLimits. For
  674. // information about updating this limit, see Auto Scaling Limits (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html)
  675. // in the Amazon EC2 Auto Scaling User Guide.
  676. //
  677. // For more information, see Launch Configurations (http://docs.aws.amazon.com/autoscaling/ec2/userguide/LaunchConfiguration.html)
  678. // in the Amazon EC2 Auto Scaling User Guide.
  679. //
  680. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  681. // with awserr.Error's Code and Message methods to get detailed information about
  682. // the error.
  683. //
  684. // See the AWS API reference guide for Auto Scaling's
  685. // API operation CreateLaunchConfiguration for usage and error information.
  686. //
  687. // Returned Error Codes:
  688. // * ErrCodeAlreadyExistsFault "AlreadyExists"
  689. // You already have an Auto Scaling group or launch configuration with this
  690. // name.
  691. //
  692. // * ErrCodeLimitExceededFault "LimitExceeded"
  693. // You have already reached a limit for your Auto Scaling resources (for example,
  694. // groups, launch configurations, or lifecycle hooks). For more information,
  695. // see DescribeAccountLimits.
  696. //
  697. // * ErrCodeResourceContentionFault "ResourceContention"
  698. // You already have a pending update to an Auto Scaling resource (for example,
  699. // a group, instance, or load balancer).
  700. //
  701. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateLaunchConfiguration
  702. func (c *AutoScaling) CreateLaunchConfiguration(input *CreateLaunchConfigurationInput) (*CreateLaunchConfigurationOutput, error) {
  703. req, out := c.CreateLaunchConfigurationRequest(input)
  704. return out, req.Send()
  705. }
  706. // CreateLaunchConfigurationWithContext is the same as CreateLaunchConfiguration with the addition of
  707. // the ability to pass a context and additional request options.
  708. //
  709. // See CreateLaunchConfiguration for details on how to use this API operation.
  710. //
  711. // The context must be non-nil and will be used for request cancellation. If
  712. // the context is nil a panic will occur. In the future the SDK may create
  713. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  714. // for more information on using Contexts.
  715. func (c *AutoScaling) CreateLaunchConfigurationWithContext(ctx aws.Context, input *CreateLaunchConfigurationInput, opts ...request.Option) (*CreateLaunchConfigurationOutput, error) {
  716. req, out := c.CreateLaunchConfigurationRequest(input)
  717. req.SetContext(ctx)
  718. req.ApplyOptions(opts...)
  719. return out, req.Send()
  720. }
  721. const opCreateOrUpdateTags = "CreateOrUpdateTags"
  722. // CreateOrUpdateTagsRequest generates a "aws/request.Request" representing the
  723. // client's request for the CreateOrUpdateTags operation. The "output" return
  724. // value will be populated with the request's response once the request completes
  725. // successfully.
  726. //
  727. // Use "Send" method on the returned Request to send the API call to the service.
  728. // the "output" return value is not valid until after Send returns without error.
  729. //
  730. // See CreateOrUpdateTags for more information on using the CreateOrUpdateTags
  731. // API call, and error handling.
  732. //
  733. // This method is useful when you want to inject custom logic or configuration
  734. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  735. //
  736. //
  737. // // Example sending a request using the CreateOrUpdateTagsRequest method.
  738. // req, resp := client.CreateOrUpdateTagsRequest(params)
  739. //
  740. // err := req.Send()
  741. // if err == nil { // resp is now filled
  742. // fmt.Println(resp)
  743. // }
  744. //
  745. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateOrUpdateTags
  746. func (c *AutoScaling) CreateOrUpdateTagsRequest(input *CreateOrUpdateTagsInput) (req *request.Request, output *CreateOrUpdateTagsOutput) {
  747. op := &request.Operation{
  748. Name: opCreateOrUpdateTags,
  749. HTTPMethod: "POST",
  750. HTTPPath: "/",
  751. }
  752. if input == nil {
  753. input = &CreateOrUpdateTagsInput{}
  754. }
  755. output = &CreateOrUpdateTagsOutput{}
  756. req = c.newRequest(op, input, output)
  757. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  758. return
  759. }
  760. // CreateOrUpdateTags API operation for Auto Scaling.
  761. //
  762. // Creates or updates tags for the specified Auto Scaling group.
  763. //
  764. // When you specify a tag with a key that already exists, the operation overwrites
  765. // the previous tag definition, and you do not get an error message.
  766. //
  767. // For more information, see Tagging Auto Scaling Groups and Instances (http://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html)
  768. // in the Amazon EC2 Auto Scaling User Guide.
  769. //
  770. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  771. // with awserr.Error's Code and Message methods to get detailed information about
  772. // the error.
  773. //
  774. // See the AWS API reference guide for Auto Scaling's
  775. // API operation CreateOrUpdateTags for usage and error information.
  776. //
  777. // Returned Error Codes:
  778. // * ErrCodeLimitExceededFault "LimitExceeded"
  779. // You have already reached a limit for your Auto Scaling resources (for example,
  780. // groups, launch configurations, or lifecycle hooks). For more information,
  781. // see DescribeAccountLimits.
  782. //
  783. // * ErrCodeAlreadyExistsFault "AlreadyExists"
  784. // You already have an Auto Scaling group or launch configuration with this
  785. // name.
  786. //
  787. // * ErrCodeResourceContentionFault "ResourceContention"
  788. // You already have a pending update to an Auto Scaling resource (for example,
  789. // a group, instance, or load balancer).
  790. //
  791. // * ErrCodeResourceInUseFault "ResourceInUse"
  792. // The operation can't be performed because the resource is in use.
  793. //
  794. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateOrUpdateTags
  795. func (c *AutoScaling) CreateOrUpdateTags(input *CreateOrUpdateTagsInput) (*CreateOrUpdateTagsOutput, error) {
  796. req, out := c.CreateOrUpdateTagsRequest(input)
  797. return out, req.Send()
  798. }
  799. // CreateOrUpdateTagsWithContext is the same as CreateOrUpdateTags with the addition of
  800. // the ability to pass a context and additional request options.
  801. //
  802. // See CreateOrUpdateTags for details on how to use this API operation.
  803. //
  804. // The context must be non-nil and will be used for request cancellation. If
  805. // the context is nil a panic will occur. In the future the SDK may create
  806. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  807. // for more information on using Contexts.
  808. func (c *AutoScaling) CreateOrUpdateTagsWithContext(ctx aws.Context, input *CreateOrUpdateTagsInput, opts ...request.Option) (*CreateOrUpdateTagsOutput, error) {
  809. req, out := c.CreateOrUpdateTagsRequest(input)
  810. req.SetContext(ctx)
  811. req.ApplyOptions(opts...)
  812. return out, req.Send()
  813. }
  814. const opDeleteAutoScalingGroup = "DeleteAutoScalingGroup"
  815. // DeleteAutoScalingGroupRequest generates a "aws/request.Request" representing the
  816. // client's request for the DeleteAutoScalingGroup operation. The "output" return
  817. // value will be populated with the request's response once the request completes
  818. // successfully.
  819. //
  820. // Use "Send" method on the returned Request to send the API call to the service.
  821. // the "output" return value is not valid until after Send returns without error.
  822. //
  823. // See DeleteAutoScalingGroup for more information on using the DeleteAutoScalingGroup
  824. // API call, and error handling.
  825. //
  826. // This method is useful when you want to inject custom logic or configuration
  827. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  828. //
  829. //
  830. // // Example sending a request using the DeleteAutoScalingGroupRequest method.
  831. // req, resp := client.DeleteAutoScalingGroupRequest(params)
  832. //
  833. // err := req.Send()
  834. // if err == nil { // resp is now filled
  835. // fmt.Println(resp)
  836. // }
  837. //
  838. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteAutoScalingGroup
  839. func (c *AutoScaling) DeleteAutoScalingGroupRequest(input *DeleteAutoScalingGroupInput) (req *request.Request, output *DeleteAutoScalingGroupOutput) {
  840. op := &request.Operation{
  841. Name: opDeleteAutoScalingGroup,
  842. HTTPMethod: "POST",
  843. HTTPPath: "/",
  844. }
  845. if input == nil {
  846. input = &DeleteAutoScalingGroupInput{}
  847. }
  848. output = &DeleteAutoScalingGroupOutput{}
  849. req = c.newRequest(op, input, output)
  850. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  851. return
  852. }
  853. // DeleteAutoScalingGroup API operation for Auto Scaling.
  854. //
  855. // Deletes the specified Auto Scaling group.
  856. //
  857. // If the group has instances or scaling activities in progress, you must specify
  858. // the option to force the deletion in order for it to succeed.
  859. //
  860. // If the group has policies, deleting the group deletes the policies, the underlying
  861. // alarm actions, and any alarm that no longer has an associated action.
  862. //
  863. // To remove instances from the Auto Scaling group before deleting it, call
  864. // DetachInstances with the list of instances and the option to decrement the
  865. // desired capacity. This ensures that Amazon EC2 Auto Scaling does not launch
  866. // replacement instances.
  867. //
  868. // To terminate all instances before deleting the Auto Scaling group, call UpdateAutoScalingGroup
  869. // and set the minimum size and desired capacity of the Auto Scaling group to
  870. // zero.
  871. //
  872. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  873. // with awserr.Error's Code and Message methods to get detailed information about
  874. // the error.
  875. //
  876. // See the AWS API reference guide for Auto Scaling's
  877. // API operation DeleteAutoScalingGroup for usage and error information.
  878. //
  879. // Returned Error Codes:
  880. // * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress"
  881. // The operation can't be performed because there are scaling activities in
  882. // progress.
  883. //
  884. // * ErrCodeResourceInUseFault "ResourceInUse"
  885. // The operation can't be performed because the resource is in use.
  886. //
  887. // * ErrCodeResourceContentionFault "ResourceContention"
  888. // You already have a pending update to an Auto Scaling resource (for example,
  889. // a group, instance, or load balancer).
  890. //
  891. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteAutoScalingGroup
  892. func (c *AutoScaling) DeleteAutoScalingGroup(input *DeleteAutoScalingGroupInput) (*DeleteAutoScalingGroupOutput, error) {
  893. req, out := c.DeleteAutoScalingGroupRequest(input)
  894. return out, req.Send()
  895. }
  896. // DeleteAutoScalingGroupWithContext is the same as DeleteAutoScalingGroup with the addition of
  897. // the ability to pass a context and additional request options.
  898. //
  899. // See DeleteAutoScalingGroup for details on how to use this API operation.
  900. //
  901. // The context must be non-nil and will be used for request cancellation. If
  902. // the context is nil a panic will occur. In the future the SDK may create
  903. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  904. // for more information on using Contexts.
  905. func (c *AutoScaling) DeleteAutoScalingGroupWithContext(ctx aws.Context, input *DeleteAutoScalingGroupInput, opts ...request.Option) (*DeleteAutoScalingGroupOutput, error) {
  906. req, out := c.DeleteAutoScalingGroupRequest(input)
  907. req.SetContext(ctx)
  908. req.ApplyOptions(opts...)
  909. return out, req.Send()
  910. }
  911. const opDeleteLaunchConfiguration = "DeleteLaunchConfiguration"
  912. // DeleteLaunchConfigurationRequest generates a "aws/request.Request" representing the
  913. // client's request for the DeleteLaunchConfiguration operation. The "output" return
  914. // value will be populated with the request's response once the request completes
  915. // successfully.
  916. //
  917. // Use "Send" method on the returned Request to send the API call to the service.
  918. // the "output" return value is not valid until after Send returns without error.
  919. //
  920. // See DeleteLaunchConfiguration for more information on using the DeleteLaunchConfiguration
  921. // API call, and error handling.
  922. //
  923. // This method is useful when you want to inject custom logic or configuration
  924. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  925. //
  926. //
  927. // // Example sending a request using the DeleteLaunchConfigurationRequest method.
  928. // req, resp := client.DeleteLaunchConfigurationRequest(params)
  929. //
  930. // err := req.Send()
  931. // if err == nil { // resp is now filled
  932. // fmt.Println(resp)
  933. // }
  934. //
  935. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLaunchConfiguration
  936. func (c *AutoScaling) DeleteLaunchConfigurationRequest(input *DeleteLaunchConfigurationInput) (req *request.Request, output *DeleteLaunchConfigurationOutput) {
  937. op := &request.Operation{
  938. Name: opDeleteLaunchConfiguration,
  939. HTTPMethod: "POST",
  940. HTTPPath: "/",
  941. }
  942. if input == nil {
  943. input = &DeleteLaunchConfigurationInput{}
  944. }
  945. output = &DeleteLaunchConfigurationOutput{}
  946. req = c.newRequest(op, input, output)
  947. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  948. return
  949. }
  950. // DeleteLaunchConfiguration API operation for Auto Scaling.
  951. //
  952. // Deletes the specified launch configuration.
  953. //
  954. // The launch configuration must not be attached to an Auto Scaling group. When
  955. // this call completes, the launch configuration is no longer available for
  956. // use.
  957. //
  958. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  959. // with awserr.Error's Code and Message methods to get detailed information about
  960. // the error.
  961. //
  962. // See the AWS API reference guide for Auto Scaling's
  963. // API operation DeleteLaunchConfiguration for usage and error information.
  964. //
  965. // Returned Error Codes:
  966. // * ErrCodeResourceInUseFault "ResourceInUse"
  967. // The operation can't be performed because the resource is in use.
  968. //
  969. // * ErrCodeResourceContentionFault "ResourceContention"
  970. // You already have a pending update to an Auto Scaling resource (for example,
  971. // a group, instance, or load balancer).
  972. //
  973. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLaunchConfiguration
  974. func (c *AutoScaling) DeleteLaunchConfiguration(input *DeleteLaunchConfigurationInput) (*DeleteLaunchConfigurationOutput, error) {
  975. req, out := c.DeleteLaunchConfigurationRequest(input)
  976. return out, req.Send()
  977. }
  978. // DeleteLaunchConfigurationWithContext is the same as DeleteLaunchConfiguration with the addition of
  979. // the ability to pass a context and additional request options.
  980. //
  981. // See DeleteLaunchConfiguration for details on how to use this API operation.
  982. //
  983. // The context must be non-nil and will be used for request cancellation. If
  984. // the context is nil a panic will occur. In the future the SDK may create
  985. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  986. // for more information on using Contexts.
  987. func (c *AutoScaling) DeleteLaunchConfigurationWithContext(ctx aws.Context, input *DeleteLaunchConfigurationInput, opts ...request.Option) (*DeleteLaunchConfigurationOutput, error) {
  988. req, out := c.DeleteLaunchConfigurationRequest(input)
  989. req.SetContext(ctx)
  990. req.ApplyOptions(opts...)
  991. return out, req.Send()
  992. }
  993. const opDeleteLifecycleHook = "DeleteLifecycleHook"
  994. // DeleteLifecycleHookRequest generates a "aws/request.Request" representing the
  995. // client's request for the DeleteLifecycleHook operation. The "output" return
  996. // value will be populated with the request's response once the request completes
  997. // successfully.
  998. //
  999. // Use "Send" method on the returned Request to send the API call to the service.
  1000. // the "output" return value is not valid until after Send returns without error.
  1001. //
  1002. // See DeleteLifecycleHook for more information on using the DeleteLifecycleHook
  1003. // API call, and error handling.
  1004. //
  1005. // This method is useful when you want to inject custom logic or configuration
  1006. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1007. //
  1008. //
  1009. // // Example sending a request using the DeleteLifecycleHookRequest method.
  1010. // req, resp := client.DeleteLifecycleHookRequest(params)
  1011. //
  1012. // err := req.Send()
  1013. // if err == nil { // resp is now filled
  1014. // fmt.Println(resp)
  1015. // }
  1016. //
  1017. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLifecycleHook
  1018. func (c *AutoScaling) DeleteLifecycleHookRequest(input *DeleteLifecycleHookInput) (req *request.Request, output *DeleteLifecycleHookOutput) {
  1019. op := &request.Operation{
  1020. Name: opDeleteLifecycleHook,
  1021. HTTPMethod: "POST",
  1022. HTTPPath: "/",
  1023. }
  1024. if input == nil {
  1025. input = &DeleteLifecycleHookInput{}
  1026. }
  1027. output = &DeleteLifecycleHookOutput{}
  1028. req = c.newRequest(op, input, output)
  1029. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1030. return
  1031. }
  1032. // DeleteLifecycleHook API operation for Auto Scaling.
  1033. //
  1034. // Deletes the specified lifecycle hook.
  1035. //
  1036. // If there are any outstanding lifecycle actions, they are completed first
  1037. // (ABANDON for launching instances, CONTINUE for terminating instances).
  1038. //
  1039. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1040. // with awserr.Error's Code and Message methods to get detailed information about
  1041. // the error.
  1042. //
  1043. // See the AWS API reference guide for Auto Scaling's
  1044. // API operation DeleteLifecycleHook for usage and error information.
  1045. //
  1046. // Returned Error Codes:
  1047. // * ErrCodeResourceContentionFault "ResourceContention"
  1048. // You already have a pending update to an Auto Scaling resource (for example,
  1049. // a group, instance, or load balancer).
  1050. //
  1051. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLifecycleHook
  1052. func (c *AutoScaling) DeleteLifecycleHook(input *DeleteLifecycleHookInput) (*DeleteLifecycleHookOutput, error) {
  1053. req, out := c.DeleteLifecycleHookRequest(input)
  1054. return out, req.Send()
  1055. }
  1056. // DeleteLifecycleHookWithContext is the same as DeleteLifecycleHook with the addition of
  1057. // the ability to pass a context and additional request options.
  1058. //
  1059. // See DeleteLifecycleHook for details on how to use this API operation.
  1060. //
  1061. // The context must be non-nil and will be used for request cancellation. If
  1062. // the context is nil a panic will occur. In the future the SDK may create
  1063. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1064. // for more information on using Contexts.
  1065. func (c *AutoScaling) DeleteLifecycleHookWithContext(ctx aws.Context, input *DeleteLifecycleHookInput, opts ...request.Option) (*DeleteLifecycleHookOutput, error) {
  1066. req, out := c.DeleteLifecycleHookRequest(input)
  1067. req.SetContext(ctx)
  1068. req.ApplyOptions(opts...)
  1069. return out, req.Send()
  1070. }
  1071. const opDeleteNotificationConfiguration = "DeleteNotificationConfiguration"
  1072. // DeleteNotificationConfigurationRequest generates a "aws/request.Request" representing the
  1073. // client's request for the DeleteNotificationConfiguration operation. The "output" return
  1074. // value will be populated with the request's response once the request completes
  1075. // successfully.
  1076. //
  1077. // Use "Send" method on the returned Request to send the API call to the service.
  1078. // the "output" return value is not valid until after Send returns without error.
  1079. //
  1080. // See DeleteNotificationConfiguration for more information on using the DeleteNotificationConfiguration
  1081. // API call, and error handling.
  1082. //
  1083. // This method is useful when you want to inject custom logic or configuration
  1084. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1085. //
  1086. //
  1087. // // Example sending a request using the DeleteNotificationConfigurationRequest method.
  1088. // req, resp := client.DeleteNotificationConfigurationRequest(params)
  1089. //
  1090. // err := req.Send()
  1091. // if err == nil { // resp is now filled
  1092. // fmt.Println(resp)
  1093. // }
  1094. //
  1095. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteNotificationConfiguration
  1096. func (c *AutoScaling) DeleteNotificationConfigurationRequest(input *DeleteNotificationConfigurationInput) (req *request.Request, output *DeleteNotificationConfigurationOutput) {
  1097. op := &request.Operation{
  1098. Name: opDeleteNotificationConfiguration,
  1099. HTTPMethod: "POST",
  1100. HTTPPath: "/",
  1101. }
  1102. if input == nil {
  1103. input = &DeleteNotificationConfigurationInput{}
  1104. }
  1105. output = &DeleteNotificationConfigurationOutput{}
  1106. req = c.newRequest(op, input, output)
  1107. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1108. return
  1109. }
  1110. // DeleteNotificationConfiguration API operation for Auto Scaling.
  1111. //
  1112. // Deletes the specified notification.
  1113. //
  1114. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1115. // with awserr.Error's Code and Message methods to get detailed information about
  1116. // the error.
  1117. //
  1118. // See the AWS API reference guide for Auto Scaling's
  1119. // API operation DeleteNotificationConfiguration for usage and error information.
  1120. //
  1121. // Returned Error Codes:
  1122. // * ErrCodeResourceContentionFault "ResourceContention"
  1123. // You already have a pending update to an Auto Scaling resource (for example,
  1124. // a group, instance, or load balancer).
  1125. //
  1126. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteNotificationConfiguration
  1127. func (c *AutoScaling) DeleteNotificationConfiguration(input *DeleteNotificationConfigurationInput) (*DeleteNotificationConfigurationOutput, error) {
  1128. req, out := c.DeleteNotificationConfigurationRequest(input)
  1129. return out, req.Send()
  1130. }
  1131. // DeleteNotificationConfigurationWithContext is the same as DeleteNotificationConfiguration with the addition of
  1132. // the ability to pass a context and additional request options.
  1133. //
  1134. // See DeleteNotificationConfiguration for details on how to use this API operation.
  1135. //
  1136. // The context must be non-nil and will be used for request cancellation. If
  1137. // the context is nil a panic will occur. In the future the SDK may create
  1138. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1139. // for more information on using Contexts.
  1140. func (c *AutoScaling) DeleteNotificationConfigurationWithContext(ctx aws.Context, input *DeleteNotificationConfigurationInput, opts ...request.Option) (*DeleteNotificationConfigurationOutput, error) {
  1141. req, out := c.DeleteNotificationConfigurationRequest(input)
  1142. req.SetContext(ctx)
  1143. req.ApplyOptions(opts...)
  1144. return out, req.Send()
  1145. }
  1146. const opDeletePolicy = "DeletePolicy"
  1147. // DeletePolicyRequest generates a "aws/request.Request" representing the
  1148. // client's request for the DeletePolicy operation. The "output" return
  1149. // value will be populated with the request's response once the request completes
  1150. // successfully.
  1151. //
  1152. // Use "Send" method on the returned Request to send the API call to the service.
  1153. // the "output" return value is not valid until after Send returns without error.
  1154. //
  1155. // See DeletePolicy for more information on using the DeletePolicy
  1156. // API call, and error handling.
  1157. //
  1158. // This method is useful when you want to inject custom logic or configuration
  1159. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1160. //
  1161. //
  1162. // // Example sending a request using the DeletePolicyRequest method.
  1163. // req, resp := client.DeletePolicyRequest(params)
  1164. //
  1165. // err := req.Send()
  1166. // if err == nil { // resp is now filled
  1167. // fmt.Println(resp)
  1168. // }
  1169. //
  1170. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeletePolicy
  1171. func (c *AutoScaling) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) {
  1172. op := &request.Operation{
  1173. Name: opDeletePolicy,
  1174. HTTPMethod: "POST",
  1175. HTTPPath: "/",
  1176. }
  1177. if input == nil {
  1178. input = &DeletePolicyInput{}
  1179. }
  1180. output = &DeletePolicyOutput{}
  1181. req = c.newRequest(op, input, output)
  1182. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1183. return
  1184. }
  1185. // DeletePolicy API operation for Auto Scaling.
  1186. //
  1187. // Deletes the specified Auto Scaling policy.
  1188. //
  1189. // Deleting a policy deletes the underlying alarm action, but does not delete
  1190. // the alarm, even if it no longer has an associated action.
  1191. //
  1192. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1193. // with awserr.Error's Code and Message methods to get detailed information about
  1194. // the error.
  1195. //
  1196. // See the AWS API reference guide for Auto Scaling's
  1197. // API operation DeletePolicy for usage and error information.
  1198. //
  1199. // Returned Error Codes:
  1200. // * ErrCodeResourceContentionFault "ResourceContention"
  1201. // You already have a pending update to an Auto Scaling resource (for example,
  1202. // a group, instance, or load balancer).
  1203. //
  1204. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  1205. // The service-linked role is not yet ready for use.
  1206. //
  1207. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeletePolicy
  1208. func (c *AutoScaling) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutput, error) {
  1209. req, out := c.DeletePolicyRequest(input)
  1210. return out, req.Send()
  1211. }
  1212. // DeletePolicyWithContext is the same as DeletePolicy with the addition of
  1213. // the ability to pass a context and additional request options.
  1214. //
  1215. // See DeletePolicy for details on how to use this API operation.
  1216. //
  1217. // The context must be non-nil and will be used for request cancellation. If
  1218. // the context is nil a panic will occur. In the future the SDK may create
  1219. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1220. // for more information on using Contexts.
  1221. func (c *AutoScaling) DeletePolicyWithContext(ctx aws.Context, input *DeletePolicyInput, opts ...request.Option) (*DeletePolicyOutput, error) {
  1222. req, out := c.DeletePolicyRequest(input)
  1223. req.SetContext(ctx)
  1224. req.ApplyOptions(opts...)
  1225. return out, req.Send()
  1226. }
  1227. const opDeleteScheduledAction = "DeleteScheduledAction"
  1228. // DeleteScheduledActionRequest generates a "aws/request.Request" representing the
  1229. // client's request for the DeleteScheduledAction operation. The "output" return
  1230. // value will be populated with the request's response once the request completes
  1231. // successfully.
  1232. //
  1233. // Use "Send" method on the returned Request to send the API call to the service.
  1234. // the "output" return value is not valid until after Send returns without error.
  1235. //
  1236. // See DeleteScheduledAction for more information on using the DeleteScheduledAction
  1237. // API call, and error handling.
  1238. //
  1239. // This method is useful when you want to inject custom logic or configuration
  1240. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1241. //
  1242. //
  1243. // // Example sending a request using the DeleteScheduledActionRequest method.
  1244. // req, resp := client.DeleteScheduledActionRequest(params)
  1245. //
  1246. // err := req.Send()
  1247. // if err == nil { // resp is now filled
  1248. // fmt.Println(resp)
  1249. // }
  1250. //
  1251. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteScheduledAction
  1252. func (c *AutoScaling) DeleteScheduledActionRequest(input *DeleteScheduledActionInput) (req *request.Request, output *DeleteScheduledActionOutput) {
  1253. op := &request.Operation{
  1254. Name: opDeleteScheduledAction,
  1255. HTTPMethod: "POST",
  1256. HTTPPath: "/",
  1257. }
  1258. if input == nil {
  1259. input = &DeleteScheduledActionInput{}
  1260. }
  1261. output = &DeleteScheduledActionOutput{}
  1262. req = c.newRequest(op, input, output)
  1263. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1264. return
  1265. }
  1266. // DeleteScheduledAction API operation for Auto Scaling.
  1267. //
  1268. // Deletes the specified scheduled action.
  1269. //
  1270. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1271. // with awserr.Error's Code and Message methods to get detailed information about
  1272. // the error.
  1273. //
  1274. // See the AWS API reference guide for Auto Scaling's
  1275. // API operation DeleteScheduledAction for usage and error information.
  1276. //
  1277. // Returned Error Codes:
  1278. // * ErrCodeResourceContentionFault "ResourceContention"
  1279. // You already have a pending update to an Auto Scaling resource (for example,
  1280. // a group, instance, or load balancer).
  1281. //
  1282. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteScheduledAction
  1283. func (c *AutoScaling) DeleteScheduledAction(input *DeleteScheduledActionInput) (*DeleteScheduledActionOutput, error) {
  1284. req, out := c.DeleteScheduledActionRequest(input)
  1285. return out, req.Send()
  1286. }
  1287. // DeleteScheduledActionWithContext is the same as DeleteScheduledAction with the addition of
  1288. // the ability to pass a context and additional request options.
  1289. //
  1290. // See DeleteScheduledAction for details on how to use this API operation.
  1291. //
  1292. // The context must be non-nil and will be used for request cancellation. If
  1293. // the context is nil a panic will occur. In the future the SDK may create
  1294. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1295. // for more information on using Contexts.
  1296. func (c *AutoScaling) DeleteScheduledActionWithContext(ctx aws.Context, input *DeleteScheduledActionInput, opts ...request.Option) (*DeleteScheduledActionOutput, error) {
  1297. req, out := c.DeleteScheduledActionRequest(input)
  1298. req.SetContext(ctx)
  1299. req.ApplyOptions(opts...)
  1300. return out, req.Send()
  1301. }
  1302. const opDeleteTags = "DeleteTags"
  1303. // DeleteTagsRequest generates a "aws/request.Request" representing the
  1304. // client's request for the DeleteTags operation. The "output" return
  1305. // value will be populated with the request's response once the request completes
  1306. // successfully.
  1307. //
  1308. // Use "Send" method on the returned Request to send the API call to the service.
  1309. // the "output" return value is not valid until after Send returns without error.
  1310. //
  1311. // See DeleteTags for more information on using the DeleteTags
  1312. // API call, and error handling.
  1313. //
  1314. // This method is useful when you want to inject custom logic or configuration
  1315. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1316. //
  1317. //
  1318. // // Example sending a request using the DeleteTagsRequest method.
  1319. // req, resp := client.DeleteTagsRequest(params)
  1320. //
  1321. // err := req.Send()
  1322. // if err == nil { // resp is now filled
  1323. // fmt.Println(resp)
  1324. // }
  1325. //
  1326. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteTags
  1327. func (c *AutoScaling) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) {
  1328. op := &request.Operation{
  1329. Name: opDeleteTags,
  1330. HTTPMethod: "POST",
  1331. HTTPPath: "/",
  1332. }
  1333. if input == nil {
  1334. input = &DeleteTagsInput{}
  1335. }
  1336. output = &DeleteTagsOutput{}
  1337. req = c.newRequest(op, input, output)
  1338. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1339. return
  1340. }
  1341. // DeleteTags API operation for Auto Scaling.
  1342. //
  1343. // Deletes the specified tags.
  1344. //
  1345. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1346. // with awserr.Error's Code and Message methods to get detailed information about
  1347. // the error.
  1348. //
  1349. // See the AWS API reference guide for Auto Scaling's
  1350. // API operation DeleteTags for usage and error information.
  1351. //
  1352. // Returned Error Codes:
  1353. // * ErrCodeResourceContentionFault "ResourceContention"
  1354. // You already have a pending update to an Auto Scaling resource (for example,
  1355. // a group, instance, or load balancer).
  1356. //
  1357. // * ErrCodeResourceInUseFault "ResourceInUse"
  1358. // The operation can't be performed because the resource is in use.
  1359. //
  1360. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteTags
  1361. func (c *AutoScaling) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
  1362. req, out := c.DeleteTagsRequest(input)
  1363. return out, req.Send()
  1364. }
  1365. // DeleteTagsWithContext is the same as DeleteTags with the addition of
  1366. // the ability to pass a context and additional request options.
  1367. //
  1368. // See DeleteTags for details on how to use this API operation.
  1369. //
  1370. // The context must be non-nil and will be used for request cancellation. If
  1371. // the context is nil a panic will occur. In the future the SDK may create
  1372. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1373. // for more information on using Contexts.
  1374. func (c *AutoScaling) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) {
  1375. req, out := c.DeleteTagsRequest(input)
  1376. req.SetContext(ctx)
  1377. req.ApplyOptions(opts...)
  1378. return out, req.Send()
  1379. }
  1380. const opDescribeAccountLimits = "DescribeAccountLimits"
  1381. // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the
  1382. // client's request for the DescribeAccountLimits operation. The "output" return
  1383. // value will be populated with the request's response once the request completes
  1384. // successfully.
  1385. //
  1386. // Use "Send" method on the returned Request to send the API call to the service.
  1387. // the "output" return value is not valid until after Send returns without error.
  1388. //
  1389. // See DescribeAccountLimits for more information on using the DescribeAccountLimits
  1390. // API call, and error handling.
  1391. //
  1392. // This method is useful when you want to inject custom logic or configuration
  1393. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1394. //
  1395. //
  1396. // // Example sending a request using the DescribeAccountLimitsRequest method.
  1397. // req, resp := client.DescribeAccountLimitsRequest(params)
  1398. //
  1399. // err := req.Send()
  1400. // if err == nil { // resp is now filled
  1401. // fmt.Println(resp)
  1402. // }
  1403. //
  1404. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAccountLimits
  1405. func (c *AutoScaling) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) (req *request.Request, output *DescribeAccountLimitsOutput) {
  1406. op := &request.Operation{
  1407. Name: opDescribeAccountLimits,
  1408. HTTPMethod: "POST",
  1409. HTTPPath: "/",
  1410. }
  1411. if input == nil {
  1412. input = &DescribeAccountLimitsInput{}
  1413. }
  1414. output = &DescribeAccountLimitsOutput{}
  1415. req = c.newRequest(op, input, output)
  1416. return
  1417. }
  1418. // DescribeAccountLimits API operation for Auto Scaling.
  1419. //
  1420. // Describes the current Auto Scaling resource limits for your AWS account.
  1421. //
  1422. // For information about requesting an increase in these limits, see Auto Scaling
  1423. // Limits (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html)
  1424. // in the Amazon EC2 Auto Scaling User Guide.
  1425. //
  1426. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1427. // with awserr.Error's Code and Message methods to get detailed information about
  1428. // the error.
  1429. //
  1430. // See the AWS API reference guide for Auto Scaling's
  1431. // API operation DescribeAccountLimits for usage and error information.
  1432. //
  1433. // Returned Error Codes:
  1434. // * ErrCodeResourceContentionFault "ResourceContention"
  1435. // You already have a pending update to an Auto Scaling resource (for example,
  1436. // a group, instance, or load balancer).
  1437. //
  1438. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAccountLimits
  1439. func (c *AutoScaling) DescribeAccountLimits(input *DescribeAccountLimitsInput) (*DescribeAccountLimitsOutput, error) {
  1440. req, out := c.DescribeAccountLimitsRequest(input)
  1441. return out, req.Send()
  1442. }
  1443. // DescribeAccountLimitsWithContext is the same as DescribeAccountLimits with the addition of
  1444. // the ability to pass a context and additional request options.
  1445. //
  1446. // See DescribeAccountLimits for details on how to use this API operation.
  1447. //
  1448. // The context must be non-nil and will be used for request cancellation. If
  1449. // the context is nil a panic will occur. In the future the SDK may create
  1450. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1451. // for more information on using Contexts.
  1452. func (c *AutoScaling) DescribeAccountLimitsWithContext(ctx aws.Context, input *DescribeAccountLimitsInput, opts ...request.Option) (*DescribeAccountLimitsOutput, error) {
  1453. req, out := c.DescribeAccountLimitsRequest(input)
  1454. req.SetContext(ctx)
  1455. req.ApplyOptions(opts...)
  1456. return out, req.Send()
  1457. }
  1458. const opDescribeAdjustmentTypes = "DescribeAdjustmentTypes"
  1459. // DescribeAdjustmentTypesRequest generates a "aws/request.Request" representing the
  1460. // client's request for the DescribeAdjustmentTypes operation. The "output" return
  1461. // value will be populated with the request's response once the request completes
  1462. // successfully.
  1463. //
  1464. // Use "Send" method on the returned Request to send the API call to the service.
  1465. // the "output" return value is not valid until after Send returns without error.
  1466. //
  1467. // See DescribeAdjustmentTypes for more information on using the DescribeAdjustmentTypes
  1468. // API call, and error handling.
  1469. //
  1470. // This method is useful when you want to inject custom logic or configuration
  1471. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1472. //
  1473. //
  1474. // // Example sending a request using the DescribeAdjustmentTypesRequest method.
  1475. // req, resp := client.DescribeAdjustmentTypesRequest(params)
  1476. //
  1477. // err := req.Send()
  1478. // if err == nil { // resp is now filled
  1479. // fmt.Println(resp)
  1480. // }
  1481. //
  1482. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAdjustmentTypes
  1483. func (c *AutoScaling) DescribeAdjustmentTypesRequest(input *DescribeAdjustmentTypesInput) (req *request.Request, output *DescribeAdjustmentTypesOutput) {
  1484. op := &request.Operation{
  1485. Name: opDescribeAdjustmentTypes,
  1486. HTTPMethod: "POST",
  1487. HTTPPath: "/",
  1488. }
  1489. if input == nil {
  1490. input = &DescribeAdjustmentTypesInput{}
  1491. }
  1492. output = &DescribeAdjustmentTypesOutput{}
  1493. req = c.newRequest(op, input, output)
  1494. return
  1495. }
  1496. // DescribeAdjustmentTypes API operation for Auto Scaling.
  1497. //
  1498. // Describes the policy adjustment types for use with PutScalingPolicy.
  1499. //
  1500. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1501. // with awserr.Error's Code and Message methods to get detailed information about
  1502. // the error.
  1503. //
  1504. // See the AWS API reference guide for Auto Scaling's
  1505. // API operation DescribeAdjustmentTypes for usage and error information.
  1506. //
  1507. // Returned Error Codes:
  1508. // * ErrCodeResourceContentionFault "ResourceContention"
  1509. // You already have a pending update to an Auto Scaling resource (for example,
  1510. // a group, instance, or load balancer).
  1511. //
  1512. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAdjustmentTypes
  1513. func (c *AutoScaling) DescribeAdjustmentTypes(input *DescribeAdjustmentTypesInput) (*DescribeAdjustmentTypesOutput, error) {
  1514. req, out := c.DescribeAdjustmentTypesRequest(input)
  1515. return out, req.Send()
  1516. }
  1517. // DescribeAdjustmentTypesWithContext is the same as DescribeAdjustmentTypes with the addition of
  1518. // the ability to pass a context and additional request options.
  1519. //
  1520. // See DescribeAdjustmentTypes for details on how to use this API operation.
  1521. //
  1522. // The context must be non-nil and will be used for request cancellation. If
  1523. // the context is nil a panic will occur. In the future the SDK may create
  1524. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1525. // for more information on using Contexts.
  1526. func (c *AutoScaling) DescribeAdjustmentTypesWithContext(ctx aws.Context, input *DescribeAdjustmentTypesInput, opts ...request.Option) (*DescribeAdjustmentTypesOutput, error) {
  1527. req, out := c.DescribeAdjustmentTypesRequest(input)
  1528. req.SetContext(ctx)
  1529. req.ApplyOptions(opts...)
  1530. return out, req.Send()
  1531. }
  1532. const opDescribeAutoScalingGroups = "DescribeAutoScalingGroups"
  1533. // DescribeAutoScalingGroupsRequest generates a "aws/request.Request" representing the
  1534. // client's request for the DescribeAutoScalingGroups operation. The "output" return
  1535. // value will be populated with the request's response once the request completes
  1536. // successfully.
  1537. //
  1538. // Use "Send" method on the returned Request to send the API call to the service.
  1539. // the "output" return value is not valid until after Send returns without error.
  1540. //
  1541. // See DescribeAutoScalingGroups for more information on using the DescribeAutoScalingGroups
  1542. // API call, and error handling.
  1543. //
  1544. // This method is useful when you want to inject custom logic or configuration
  1545. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1546. //
  1547. //
  1548. // // Example sending a request using the DescribeAutoScalingGroupsRequest method.
  1549. // req, resp := client.DescribeAutoScalingGroupsRequest(params)
  1550. //
  1551. // err := req.Send()
  1552. // if err == nil { // resp is now filled
  1553. // fmt.Println(resp)
  1554. // }
  1555. //
  1556. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingGroups
  1557. func (c *AutoScaling) DescribeAutoScalingGroupsRequest(input *DescribeAutoScalingGroupsInput) (req *request.Request, output *DescribeAutoScalingGroupsOutput) {
  1558. op := &request.Operation{
  1559. Name: opDescribeAutoScalingGroups,
  1560. HTTPMethod: "POST",
  1561. HTTPPath: "/",
  1562. Paginator: &request.Paginator{
  1563. InputTokens: []string{"NextToken"},
  1564. OutputTokens: []string{"NextToken"},
  1565. LimitToken: "MaxRecords",
  1566. TruncationToken: "",
  1567. },
  1568. }
  1569. if input == nil {
  1570. input = &DescribeAutoScalingGroupsInput{}
  1571. }
  1572. output = &DescribeAutoScalingGroupsOutput{}
  1573. req = c.newRequest(op, input, output)
  1574. return
  1575. }
  1576. // DescribeAutoScalingGroups API operation for Auto Scaling.
  1577. //
  1578. // Describes one or more Auto Scaling groups.
  1579. //
  1580. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1581. // with awserr.Error's Code and Message methods to get detailed information about
  1582. // the error.
  1583. //
  1584. // See the AWS API reference guide for Auto Scaling's
  1585. // API operation DescribeAutoScalingGroups for usage and error information.
  1586. //
  1587. // Returned Error Codes:
  1588. // * ErrCodeInvalidNextToken "InvalidNextToken"
  1589. // The NextToken value is not valid.
  1590. //
  1591. // * ErrCodeResourceContentionFault "ResourceContention"
  1592. // You already have a pending update to an Auto Scaling resource (for example,
  1593. // a group, instance, or load balancer).
  1594. //
  1595. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingGroups
  1596. func (c *AutoScaling) DescribeAutoScalingGroups(input *DescribeAutoScalingGroupsInput) (*DescribeAutoScalingGroupsOutput, error) {
  1597. req, out := c.DescribeAutoScalingGroupsRequest(input)
  1598. return out, req.Send()
  1599. }
  1600. // DescribeAutoScalingGroupsWithContext is the same as DescribeAutoScalingGroups with the addition of
  1601. // the ability to pass a context and additional request options.
  1602. //
  1603. // See DescribeAutoScalingGroups for details on how to use this API operation.
  1604. //
  1605. // The context must be non-nil and will be used for request cancellation. If
  1606. // the context is nil a panic will occur. In the future the SDK may create
  1607. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1608. // for more information on using Contexts.
  1609. func (c *AutoScaling) DescribeAutoScalingGroupsWithContext(ctx aws.Context, input *DescribeAutoScalingGroupsInput, opts ...request.Option) (*DescribeAutoScalingGroupsOutput, error) {
  1610. req, out := c.DescribeAutoScalingGroupsRequest(input)
  1611. req.SetContext(ctx)
  1612. req.ApplyOptions(opts...)
  1613. return out, req.Send()
  1614. }
  1615. // DescribeAutoScalingGroupsPages iterates over the pages of a DescribeAutoScalingGroups operation,
  1616. // calling the "fn" function with the response data for each page. To stop
  1617. // iterating, return false from the fn function.
  1618. //
  1619. // See DescribeAutoScalingGroups method for more information on how to use this operation.
  1620. //
  1621. // Note: This operation can generate multiple requests to a service.
  1622. //
  1623. // // Example iterating over at most 3 pages of a DescribeAutoScalingGroups operation.
  1624. // pageNum := 0
  1625. // err := client.DescribeAutoScalingGroupsPages(params,
  1626. // func(page *DescribeAutoScalingGroupsOutput, lastPage bool) bool {
  1627. // pageNum++
  1628. // fmt.Println(page)
  1629. // return pageNum <= 3
  1630. // })
  1631. //
  1632. func (c *AutoScaling) DescribeAutoScalingGroupsPages(input *DescribeAutoScalingGroupsInput, fn func(*DescribeAutoScalingGroupsOutput, bool) bool) error {
  1633. return c.DescribeAutoScalingGroupsPagesWithContext(aws.BackgroundContext(), input, fn)
  1634. }
  1635. // DescribeAutoScalingGroupsPagesWithContext same as DescribeAutoScalingGroupsPages except
  1636. // it takes a Context and allows setting request options on the pages.
  1637. //
  1638. // The context must be non-nil and will be used for request cancellation. If
  1639. // the context is nil a panic will occur. In the future the SDK may create
  1640. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1641. // for more information on using Contexts.
  1642. func (c *AutoScaling) DescribeAutoScalingGroupsPagesWithContext(ctx aws.Context, input *DescribeAutoScalingGroupsInput, fn func(*DescribeAutoScalingGroupsOutput, bool) bool, opts ...request.Option) error {
  1643. p := request.Pagination{
  1644. NewRequest: func() (*request.Request, error) {
  1645. var inCpy *DescribeAutoScalingGroupsInput
  1646. if input != nil {
  1647. tmp := *input
  1648. inCpy = &tmp
  1649. }
  1650. req, _ := c.DescribeAutoScalingGroupsRequest(inCpy)
  1651. req.SetContext(ctx)
  1652. req.ApplyOptions(opts...)
  1653. return req, nil
  1654. },
  1655. }
  1656. cont := true
  1657. for p.Next() && cont {
  1658. cont = fn(p.Page().(*DescribeAutoScalingGroupsOutput), !p.HasNextPage())
  1659. }
  1660. return p.Err()
  1661. }
  1662. const opDescribeAutoScalingInstances = "DescribeAutoScalingInstances"
  1663. // DescribeAutoScalingInstancesRequest generates a "aws/request.Request" representing the
  1664. // client's request for the DescribeAutoScalingInstances operation. The "output" return
  1665. // value will be populated with the request's response once the request completes
  1666. // successfully.
  1667. //
  1668. // Use "Send" method on the returned Request to send the API call to the service.
  1669. // the "output" return value is not valid until after Send returns without error.
  1670. //
  1671. // See DescribeAutoScalingInstances for more information on using the DescribeAutoScalingInstances
  1672. // API call, and error handling.
  1673. //
  1674. // This method is useful when you want to inject custom logic or configuration
  1675. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1676. //
  1677. //
  1678. // // Example sending a request using the DescribeAutoScalingInstancesRequest method.
  1679. // req, resp := client.DescribeAutoScalingInstancesRequest(params)
  1680. //
  1681. // err := req.Send()
  1682. // if err == nil { // resp is now filled
  1683. // fmt.Println(resp)
  1684. // }
  1685. //
  1686. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingInstances
  1687. func (c *AutoScaling) DescribeAutoScalingInstancesRequest(input *DescribeAutoScalingInstancesInput) (req *request.Request, output *DescribeAutoScalingInstancesOutput) {
  1688. op := &request.Operation{
  1689. Name: opDescribeAutoScalingInstances,
  1690. HTTPMethod: "POST",
  1691. HTTPPath: "/",
  1692. Paginator: &request.Paginator{
  1693. InputTokens: []string{"NextToken"},
  1694. OutputTokens: []string{"NextToken"},
  1695. LimitToken: "MaxRecords",
  1696. TruncationToken: "",
  1697. },
  1698. }
  1699. if input == nil {
  1700. input = &DescribeAutoScalingInstancesInput{}
  1701. }
  1702. output = &DescribeAutoScalingInstancesOutput{}
  1703. req = c.newRequest(op, input, output)
  1704. return
  1705. }
  1706. // DescribeAutoScalingInstances API operation for Auto Scaling.
  1707. //
  1708. // Describes one or more Auto Scaling instances.
  1709. //
  1710. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1711. // with awserr.Error's Code and Message methods to get detailed information about
  1712. // the error.
  1713. //
  1714. // See the AWS API reference guide for Auto Scaling's
  1715. // API operation DescribeAutoScalingInstances for usage and error information.
  1716. //
  1717. // Returned Error Codes:
  1718. // * ErrCodeInvalidNextToken "InvalidNextToken"
  1719. // The NextToken value is not valid.
  1720. //
  1721. // * ErrCodeResourceContentionFault "ResourceContention"
  1722. // You already have a pending update to an Auto Scaling resource (for example,
  1723. // a group, instance, or load balancer).
  1724. //
  1725. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingInstances
  1726. func (c *AutoScaling) DescribeAutoScalingInstances(input *DescribeAutoScalingInstancesInput) (*DescribeAutoScalingInstancesOutput, error) {
  1727. req, out := c.DescribeAutoScalingInstancesRequest(input)
  1728. return out, req.Send()
  1729. }
  1730. // DescribeAutoScalingInstancesWithContext is the same as DescribeAutoScalingInstances with the addition of
  1731. // the ability to pass a context and additional request options.
  1732. //
  1733. // See DescribeAutoScalingInstances for details on how to use this API operation.
  1734. //
  1735. // The context must be non-nil and will be used for request cancellation. If
  1736. // the context is nil a panic will occur. In the future the SDK may create
  1737. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1738. // for more information on using Contexts.
  1739. func (c *AutoScaling) DescribeAutoScalingInstancesWithContext(ctx aws.Context, input *DescribeAutoScalingInstancesInput, opts ...request.Option) (*DescribeAutoScalingInstancesOutput, error) {
  1740. req, out := c.DescribeAutoScalingInstancesRequest(input)
  1741. req.SetContext(ctx)
  1742. req.ApplyOptions(opts...)
  1743. return out, req.Send()
  1744. }
  1745. // DescribeAutoScalingInstancesPages iterates over the pages of a DescribeAutoScalingInstances operation,
  1746. // calling the "fn" function with the response data for each page. To stop
  1747. // iterating, return false from the fn function.
  1748. //
  1749. // See DescribeAutoScalingInstances method for more information on how to use this operation.
  1750. //
  1751. // Note: This operation can generate multiple requests to a service.
  1752. //
  1753. // // Example iterating over at most 3 pages of a DescribeAutoScalingInstances operation.
  1754. // pageNum := 0
  1755. // err := client.DescribeAutoScalingInstancesPages(params,
  1756. // func(page *DescribeAutoScalingInstancesOutput, lastPage bool) bool {
  1757. // pageNum++
  1758. // fmt.Println(page)
  1759. // return pageNum <= 3
  1760. // })
  1761. //
  1762. func (c *AutoScaling) DescribeAutoScalingInstancesPages(input *DescribeAutoScalingInstancesInput, fn func(*DescribeAutoScalingInstancesOutput, bool) bool) error {
  1763. return c.DescribeAutoScalingInstancesPagesWithContext(aws.BackgroundContext(), input, fn)
  1764. }
  1765. // DescribeAutoScalingInstancesPagesWithContext same as DescribeAutoScalingInstancesPages except
  1766. // it takes a Context and allows setting request options on the pages.
  1767. //
  1768. // The context must be non-nil and will be used for request cancellation. If
  1769. // the context is nil a panic will occur. In the future the SDK may create
  1770. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1771. // for more information on using Contexts.
  1772. func (c *AutoScaling) DescribeAutoScalingInstancesPagesWithContext(ctx aws.Context, input *DescribeAutoScalingInstancesInput, fn func(*DescribeAutoScalingInstancesOutput, bool) bool, opts ...request.Option) error {
  1773. p := request.Pagination{
  1774. NewRequest: func() (*request.Request, error) {
  1775. var inCpy *DescribeAutoScalingInstancesInput
  1776. if input != nil {
  1777. tmp := *input
  1778. inCpy = &tmp
  1779. }
  1780. req, _ := c.DescribeAutoScalingInstancesRequest(inCpy)
  1781. req.SetContext(ctx)
  1782. req.ApplyOptions(opts...)
  1783. return req, nil
  1784. },
  1785. }
  1786. cont := true
  1787. for p.Next() && cont {
  1788. cont = fn(p.Page().(*DescribeAutoScalingInstancesOutput), !p.HasNextPage())
  1789. }
  1790. return p.Err()
  1791. }
  1792. const opDescribeAutoScalingNotificationTypes = "DescribeAutoScalingNotificationTypes"
  1793. // DescribeAutoScalingNotificationTypesRequest generates a "aws/request.Request" representing the
  1794. // client's request for the DescribeAutoScalingNotificationTypes operation. The "output" return
  1795. // value will be populated with the request's response once the request completes
  1796. // successfully.
  1797. //
  1798. // Use "Send" method on the returned Request to send the API call to the service.
  1799. // the "output" return value is not valid until after Send returns without error.
  1800. //
  1801. // See DescribeAutoScalingNotificationTypes for more information on using the DescribeAutoScalingNotificationTypes
  1802. // API call, and error handling.
  1803. //
  1804. // This method is useful when you want to inject custom logic or configuration
  1805. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1806. //
  1807. //
  1808. // // Example sending a request using the DescribeAutoScalingNotificationTypesRequest method.
  1809. // req, resp := client.DescribeAutoScalingNotificationTypesRequest(params)
  1810. //
  1811. // err := req.Send()
  1812. // if err == nil { // resp is now filled
  1813. // fmt.Println(resp)
  1814. // }
  1815. //
  1816. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingNotificationTypes
  1817. func (c *AutoScaling) DescribeAutoScalingNotificationTypesRequest(input *DescribeAutoScalingNotificationTypesInput) (req *request.Request, output *DescribeAutoScalingNotificationTypesOutput) {
  1818. op := &request.Operation{
  1819. Name: opDescribeAutoScalingNotificationTypes,
  1820. HTTPMethod: "POST",
  1821. HTTPPath: "/",
  1822. }
  1823. if input == nil {
  1824. input = &DescribeAutoScalingNotificationTypesInput{}
  1825. }
  1826. output = &DescribeAutoScalingNotificationTypesOutput{}
  1827. req = c.newRequest(op, input, output)
  1828. return
  1829. }
  1830. // DescribeAutoScalingNotificationTypes API operation for Auto Scaling.
  1831. //
  1832. // Describes the notification types that are supported by Amazon EC2 Auto Scaling.
  1833. //
  1834. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1835. // with awserr.Error's Code and Message methods to get detailed information about
  1836. // the error.
  1837. //
  1838. // See the AWS API reference guide for Auto Scaling's
  1839. // API operation DescribeAutoScalingNotificationTypes for usage and error information.
  1840. //
  1841. // Returned Error Codes:
  1842. // * ErrCodeResourceContentionFault "ResourceContention"
  1843. // You already have a pending update to an Auto Scaling resource (for example,
  1844. // a group, instance, or load balancer).
  1845. //
  1846. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingNotificationTypes
  1847. func (c *AutoScaling) DescribeAutoScalingNotificationTypes(input *DescribeAutoScalingNotificationTypesInput) (*DescribeAutoScalingNotificationTypesOutput, error) {
  1848. req, out := c.DescribeAutoScalingNotificationTypesRequest(input)
  1849. return out, req.Send()
  1850. }
  1851. // DescribeAutoScalingNotificationTypesWithContext is the same as DescribeAutoScalingNotificationTypes with the addition of
  1852. // the ability to pass a context and additional request options.
  1853. //
  1854. // See DescribeAutoScalingNotificationTypes for details on how to use this API operation.
  1855. //
  1856. // The context must be non-nil and will be used for request cancellation. If
  1857. // the context is nil a panic will occur. In the future the SDK may create
  1858. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1859. // for more information on using Contexts.
  1860. func (c *AutoScaling) DescribeAutoScalingNotificationTypesWithContext(ctx aws.Context, input *DescribeAutoScalingNotificationTypesInput, opts ...request.Option) (*DescribeAutoScalingNotificationTypesOutput, error) {
  1861. req, out := c.DescribeAutoScalingNotificationTypesRequest(input)
  1862. req.SetContext(ctx)
  1863. req.ApplyOptions(opts...)
  1864. return out, req.Send()
  1865. }
  1866. const opDescribeLaunchConfigurations = "DescribeLaunchConfigurations"
  1867. // DescribeLaunchConfigurationsRequest generates a "aws/request.Request" representing the
  1868. // client's request for the DescribeLaunchConfigurations operation. The "output" return
  1869. // value will be populated with the request's response once the request completes
  1870. // successfully.
  1871. //
  1872. // Use "Send" method on the returned Request to send the API call to the service.
  1873. // the "output" return value is not valid until after Send returns without error.
  1874. //
  1875. // See DescribeLaunchConfigurations for more information on using the DescribeLaunchConfigurations
  1876. // API call, and error handling.
  1877. //
  1878. // This method is useful when you want to inject custom logic or configuration
  1879. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1880. //
  1881. //
  1882. // // Example sending a request using the DescribeLaunchConfigurationsRequest method.
  1883. // req, resp := client.DescribeLaunchConfigurationsRequest(params)
  1884. //
  1885. // err := req.Send()
  1886. // if err == nil { // resp is now filled
  1887. // fmt.Println(resp)
  1888. // }
  1889. //
  1890. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLaunchConfigurations
  1891. func (c *AutoScaling) DescribeLaunchConfigurationsRequest(input *DescribeLaunchConfigurationsInput) (req *request.Request, output *DescribeLaunchConfigurationsOutput) {
  1892. op := &request.Operation{
  1893. Name: opDescribeLaunchConfigurations,
  1894. HTTPMethod: "POST",
  1895. HTTPPath: "/",
  1896. Paginator: &request.Paginator{
  1897. InputTokens: []string{"NextToken"},
  1898. OutputTokens: []string{"NextToken"},
  1899. LimitToken: "MaxRecords",
  1900. TruncationToken: "",
  1901. },
  1902. }
  1903. if input == nil {
  1904. input = &DescribeLaunchConfigurationsInput{}
  1905. }
  1906. output = &DescribeLaunchConfigurationsOutput{}
  1907. req = c.newRequest(op, input, output)
  1908. return
  1909. }
  1910. // DescribeLaunchConfigurations API operation for Auto Scaling.
  1911. //
  1912. // Describes one or more launch configurations.
  1913. //
  1914. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1915. // with awserr.Error's Code and Message methods to get detailed information about
  1916. // the error.
  1917. //
  1918. // See the AWS API reference guide for Auto Scaling's
  1919. // API operation DescribeLaunchConfigurations for usage and error information.
  1920. //
  1921. // Returned Error Codes:
  1922. // * ErrCodeInvalidNextToken "InvalidNextToken"
  1923. // The NextToken value is not valid.
  1924. //
  1925. // * ErrCodeResourceContentionFault "ResourceContention"
  1926. // You already have a pending update to an Auto Scaling resource (for example,
  1927. // a group, instance, or load balancer).
  1928. //
  1929. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLaunchConfigurations
  1930. func (c *AutoScaling) DescribeLaunchConfigurations(input *DescribeLaunchConfigurationsInput) (*DescribeLaunchConfigurationsOutput, error) {
  1931. req, out := c.DescribeLaunchConfigurationsRequest(input)
  1932. return out, req.Send()
  1933. }
  1934. // DescribeLaunchConfigurationsWithContext is the same as DescribeLaunchConfigurations with the addition of
  1935. // the ability to pass a context and additional request options.
  1936. //
  1937. // See DescribeLaunchConfigurations for details on how to use this API operation.
  1938. //
  1939. // The context must be non-nil and will be used for request cancellation. If
  1940. // the context is nil a panic will occur. In the future the SDK may create
  1941. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1942. // for more information on using Contexts.
  1943. func (c *AutoScaling) DescribeLaunchConfigurationsWithContext(ctx aws.Context, input *DescribeLaunchConfigurationsInput, opts ...request.Option) (*DescribeLaunchConfigurationsOutput, error) {
  1944. req, out := c.DescribeLaunchConfigurationsRequest(input)
  1945. req.SetContext(ctx)
  1946. req.ApplyOptions(opts...)
  1947. return out, req.Send()
  1948. }
  1949. // DescribeLaunchConfigurationsPages iterates over the pages of a DescribeLaunchConfigurations operation,
  1950. // calling the "fn" function with the response data for each page. To stop
  1951. // iterating, return false from the fn function.
  1952. //
  1953. // See DescribeLaunchConfigurations method for more information on how to use this operation.
  1954. //
  1955. // Note: This operation can generate multiple requests to a service.
  1956. //
  1957. // // Example iterating over at most 3 pages of a DescribeLaunchConfigurations operation.
  1958. // pageNum := 0
  1959. // err := client.DescribeLaunchConfigurationsPages(params,
  1960. // func(page *DescribeLaunchConfigurationsOutput, lastPage bool) bool {
  1961. // pageNum++
  1962. // fmt.Println(page)
  1963. // return pageNum <= 3
  1964. // })
  1965. //
  1966. func (c *AutoScaling) DescribeLaunchConfigurationsPages(input *DescribeLaunchConfigurationsInput, fn func(*DescribeLaunchConfigurationsOutput, bool) bool) error {
  1967. return c.DescribeLaunchConfigurationsPagesWithContext(aws.BackgroundContext(), input, fn)
  1968. }
  1969. // DescribeLaunchConfigurationsPagesWithContext same as DescribeLaunchConfigurationsPages except
  1970. // it takes a Context and allows setting request options on the pages.
  1971. //
  1972. // The context must be non-nil and will be used for request cancellation. If
  1973. // the context is nil a panic will occur. In the future the SDK may create
  1974. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1975. // for more information on using Contexts.
  1976. func (c *AutoScaling) DescribeLaunchConfigurationsPagesWithContext(ctx aws.Context, input *DescribeLaunchConfigurationsInput, fn func(*DescribeLaunchConfigurationsOutput, bool) bool, opts ...request.Option) error {
  1977. p := request.Pagination{
  1978. NewRequest: func() (*request.Request, error) {
  1979. var inCpy *DescribeLaunchConfigurationsInput
  1980. if input != nil {
  1981. tmp := *input
  1982. inCpy = &tmp
  1983. }
  1984. req, _ := c.DescribeLaunchConfigurationsRequest(inCpy)
  1985. req.SetContext(ctx)
  1986. req.ApplyOptions(opts...)
  1987. return req, nil
  1988. },
  1989. }
  1990. cont := true
  1991. for p.Next() && cont {
  1992. cont = fn(p.Page().(*DescribeLaunchConfigurationsOutput), !p.HasNextPage())
  1993. }
  1994. return p.Err()
  1995. }
  1996. const opDescribeLifecycleHookTypes = "DescribeLifecycleHookTypes"
  1997. // DescribeLifecycleHookTypesRequest generates a "aws/request.Request" representing the
  1998. // client's request for the DescribeLifecycleHookTypes operation. The "output" return
  1999. // value will be populated with the request's response once the request completes
  2000. // successfully.
  2001. //
  2002. // Use "Send" method on the returned Request to send the API call to the service.
  2003. // the "output" return value is not valid until after Send returns without error.
  2004. //
  2005. // See DescribeLifecycleHookTypes for more information on using the DescribeLifecycleHookTypes
  2006. // API call, and error handling.
  2007. //
  2008. // This method is useful when you want to inject custom logic or configuration
  2009. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2010. //
  2011. //
  2012. // // Example sending a request using the DescribeLifecycleHookTypesRequest method.
  2013. // req, resp := client.DescribeLifecycleHookTypesRequest(params)
  2014. //
  2015. // err := req.Send()
  2016. // if err == nil { // resp is now filled
  2017. // fmt.Println(resp)
  2018. // }
  2019. //
  2020. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHookTypes
  2021. func (c *AutoScaling) DescribeLifecycleHookTypesRequest(input *DescribeLifecycleHookTypesInput) (req *request.Request, output *DescribeLifecycleHookTypesOutput) {
  2022. op := &request.Operation{
  2023. Name: opDescribeLifecycleHookTypes,
  2024. HTTPMethod: "POST",
  2025. HTTPPath: "/",
  2026. }
  2027. if input == nil {
  2028. input = &DescribeLifecycleHookTypesInput{}
  2029. }
  2030. output = &DescribeLifecycleHookTypesOutput{}
  2031. req = c.newRequest(op, input, output)
  2032. return
  2033. }
  2034. // DescribeLifecycleHookTypes API operation for Auto Scaling.
  2035. //
  2036. // Describes the available types of lifecycle hooks.
  2037. //
  2038. // The following hook types are supported:
  2039. //
  2040. // * autoscaling:EC2_INSTANCE_LAUNCHING
  2041. //
  2042. // * autoscaling:EC2_INSTANCE_TERMINATING
  2043. //
  2044. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2045. // with awserr.Error's Code and Message methods to get detailed information about
  2046. // the error.
  2047. //
  2048. // See the AWS API reference guide for Auto Scaling's
  2049. // API operation DescribeLifecycleHookTypes for usage and error information.
  2050. //
  2051. // Returned Error Codes:
  2052. // * ErrCodeResourceContentionFault "ResourceContention"
  2053. // You already have a pending update to an Auto Scaling resource (for example,
  2054. // a group, instance, or load balancer).
  2055. //
  2056. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHookTypes
  2057. func (c *AutoScaling) DescribeLifecycleHookTypes(input *DescribeLifecycleHookTypesInput) (*DescribeLifecycleHookTypesOutput, error) {
  2058. req, out := c.DescribeLifecycleHookTypesRequest(input)
  2059. return out, req.Send()
  2060. }
  2061. // DescribeLifecycleHookTypesWithContext is the same as DescribeLifecycleHookTypes with the addition of
  2062. // the ability to pass a context and additional request options.
  2063. //
  2064. // See DescribeLifecycleHookTypes for details on how to use this API operation.
  2065. //
  2066. // The context must be non-nil and will be used for request cancellation. If
  2067. // the context is nil a panic will occur. In the future the SDK may create
  2068. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2069. // for more information on using Contexts.
  2070. func (c *AutoScaling) DescribeLifecycleHookTypesWithContext(ctx aws.Context, input *DescribeLifecycleHookTypesInput, opts ...request.Option) (*DescribeLifecycleHookTypesOutput, error) {
  2071. req, out := c.DescribeLifecycleHookTypesRequest(input)
  2072. req.SetContext(ctx)
  2073. req.ApplyOptions(opts...)
  2074. return out, req.Send()
  2075. }
  2076. const opDescribeLifecycleHooks = "DescribeLifecycleHooks"
  2077. // DescribeLifecycleHooksRequest generates a "aws/request.Request" representing the
  2078. // client's request for the DescribeLifecycleHooks operation. The "output" return
  2079. // value will be populated with the request's response once the request completes
  2080. // successfully.
  2081. //
  2082. // Use "Send" method on the returned Request to send the API call to the service.
  2083. // the "output" return value is not valid until after Send returns without error.
  2084. //
  2085. // See DescribeLifecycleHooks for more information on using the DescribeLifecycleHooks
  2086. // API call, and error handling.
  2087. //
  2088. // This method is useful when you want to inject custom logic or configuration
  2089. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2090. //
  2091. //
  2092. // // Example sending a request using the DescribeLifecycleHooksRequest method.
  2093. // req, resp := client.DescribeLifecycleHooksRequest(params)
  2094. //
  2095. // err := req.Send()
  2096. // if err == nil { // resp is now filled
  2097. // fmt.Println(resp)
  2098. // }
  2099. //
  2100. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHooks
  2101. func (c *AutoScaling) DescribeLifecycleHooksRequest(input *DescribeLifecycleHooksInput) (req *request.Request, output *DescribeLifecycleHooksOutput) {
  2102. op := &request.Operation{
  2103. Name: opDescribeLifecycleHooks,
  2104. HTTPMethod: "POST",
  2105. HTTPPath: "/",
  2106. }
  2107. if input == nil {
  2108. input = &DescribeLifecycleHooksInput{}
  2109. }
  2110. output = &DescribeLifecycleHooksOutput{}
  2111. req = c.newRequest(op, input, output)
  2112. return
  2113. }
  2114. // DescribeLifecycleHooks API operation for Auto Scaling.
  2115. //
  2116. // Describes the lifecycle hooks for the specified Auto Scaling group.
  2117. //
  2118. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2119. // with awserr.Error's Code and Message methods to get detailed information about
  2120. // the error.
  2121. //
  2122. // See the AWS API reference guide for Auto Scaling's
  2123. // API operation DescribeLifecycleHooks for usage and error information.
  2124. //
  2125. // Returned Error Codes:
  2126. // * ErrCodeResourceContentionFault "ResourceContention"
  2127. // You already have a pending update to an Auto Scaling resource (for example,
  2128. // a group, instance, or load balancer).
  2129. //
  2130. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHooks
  2131. func (c *AutoScaling) DescribeLifecycleHooks(input *DescribeLifecycleHooksInput) (*DescribeLifecycleHooksOutput, error) {
  2132. req, out := c.DescribeLifecycleHooksRequest(input)
  2133. return out, req.Send()
  2134. }
  2135. // DescribeLifecycleHooksWithContext is the same as DescribeLifecycleHooks with the addition of
  2136. // the ability to pass a context and additional request options.
  2137. //
  2138. // See DescribeLifecycleHooks for details on how to use this API operation.
  2139. //
  2140. // The context must be non-nil and will be used for request cancellation. If
  2141. // the context is nil a panic will occur. In the future the SDK may create
  2142. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2143. // for more information on using Contexts.
  2144. func (c *AutoScaling) DescribeLifecycleHooksWithContext(ctx aws.Context, input *DescribeLifecycleHooksInput, opts ...request.Option) (*DescribeLifecycleHooksOutput, error) {
  2145. req, out := c.DescribeLifecycleHooksRequest(input)
  2146. req.SetContext(ctx)
  2147. req.ApplyOptions(opts...)
  2148. return out, req.Send()
  2149. }
  2150. const opDescribeLoadBalancerTargetGroups = "DescribeLoadBalancerTargetGroups"
  2151. // DescribeLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the
  2152. // client's request for the DescribeLoadBalancerTargetGroups operation. The "output" return
  2153. // value will be populated with the request's response once the request completes
  2154. // successfully.
  2155. //
  2156. // Use "Send" method on the returned Request to send the API call to the service.
  2157. // the "output" return value is not valid until after Send returns without error.
  2158. //
  2159. // See DescribeLoadBalancerTargetGroups for more information on using the DescribeLoadBalancerTargetGroups
  2160. // API call, and error handling.
  2161. //
  2162. // This method is useful when you want to inject custom logic or configuration
  2163. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2164. //
  2165. //
  2166. // // Example sending a request using the DescribeLoadBalancerTargetGroupsRequest method.
  2167. // req, resp := client.DescribeLoadBalancerTargetGroupsRequest(params)
  2168. //
  2169. // err := req.Send()
  2170. // if err == nil { // resp is now filled
  2171. // fmt.Println(resp)
  2172. // }
  2173. //
  2174. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancerTargetGroups
  2175. func (c *AutoScaling) DescribeLoadBalancerTargetGroupsRequest(input *DescribeLoadBalancerTargetGroupsInput) (req *request.Request, output *DescribeLoadBalancerTargetGroupsOutput) {
  2176. op := &request.Operation{
  2177. Name: opDescribeLoadBalancerTargetGroups,
  2178. HTTPMethod: "POST",
  2179. HTTPPath: "/",
  2180. }
  2181. if input == nil {
  2182. input = &DescribeLoadBalancerTargetGroupsInput{}
  2183. }
  2184. output = &DescribeLoadBalancerTargetGroupsOutput{}
  2185. req = c.newRequest(op, input, output)
  2186. return
  2187. }
  2188. // DescribeLoadBalancerTargetGroups API operation for Auto Scaling.
  2189. //
  2190. // Describes the target groups for the specified Auto Scaling group.
  2191. //
  2192. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2193. // with awserr.Error's Code and Message methods to get detailed information about
  2194. // the error.
  2195. //
  2196. // See the AWS API reference guide for Auto Scaling's
  2197. // API operation DescribeLoadBalancerTargetGroups for usage and error information.
  2198. //
  2199. // Returned Error Codes:
  2200. // * ErrCodeResourceContentionFault "ResourceContention"
  2201. // You already have a pending update to an Auto Scaling resource (for example,
  2202. // a group, instance, or load balancer).
  2203. //
  2204. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancerTargetGroups
  2205. func (c *AutoScaling) DescribeLoadBalancerTargetGroups(input *DescribeLoadBalancerTargetGroupsInput) (*DescribeLoadBalancerTargetGroupsOutput, error) {
  2206. req, out := c.DescribeLoadBalancerTargetGroupsRequest(input)
  2207. return out, req.Send()
  2208. }
  2209. // DescribeLoadBalancerTargetGroupsWithContext is the same as DescribeLoadBalancerTargetGroups with the addition of
  2210. // the ability to pass a context and additional request options.
  2211. //
  2212. // See DescribeLoadBalancerTargetGroups for details on how to use this API operation.
  2213. //
  2214. // The context must be non-nil and will be used for request cancellation. If
  2215. // the context is nil a panic will occur. In the future the SDK may create
  2216. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2217. // for more information on using Contexts.
  2218. func (c *AutoScaling) DescribeLoadBalancerTargetGroupsWithContext(ctx aws.Context, input *DescribeLoadBalancerTargetGroupsInput, opts ...request.Option) (*DescribeLoadBalancerTargetGroupsOutput, error) {
  2219. req, out := c.DescribeLoadBalancerTargetGroupsRequest(input)
  2220. req.SetContext(ctx)
  2221. req.ApplyOptions(opts...)
  2222. return out, req.Send()
  2223. }
  2224. const opDescribeLoadBalancers = "DescribeLoadBalancers"
  2225. // DescribeLoadBalancersRequest generates a "aws/request.Request" representing the
  2226. // client's request for the DescribeLoadBalancers operation. The "output" return
  2227. // value will be populated with the request's response once the request completes
  2228. // successfully.
  2229. //
  2230. // Use "Send" method on the returned Request to send the API call to the service.
  2231. // the "output" return value is not valid until after Send returns without error.
  2232. //
  2233. // See DescribeLoadBalancers for more information on using the DescribeLoadBalancers
  2234. // API call, and error handling.
  2235. //
  2236. // This method is useful when you want to inject custom logic or configuration
  2237. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2238. //
  2239. //
  2240. // // Example sending a request using the DescribeLoadBalancersRequest method.
  2241. // req, resp := client.DescribeLoadBalancersRequest(params)
  2242. //
  2243. // err := req.Send()
  2244. // if err == nil { // resp is now filled
  2245. // fmt.Println(resp)
  2246. // }
  2247. //
  2248. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancers
  2249. func (c *AutoScaling) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) (req *request.Request, output *DescribeLoadBalancersOutput) {
  2250. op := &request.Operation{
  2251. Name: opDescribeLoadBalancers,
  2252. HTTPMethod: "POST",
  2253. HTTPPath: "/",
  2254. }
  2255. if input == nil {
  2256. input = &DescribeLoadBalancersInput{}
  2257. }
  2258. output = &DescribeLoadBalancersOutput{}
  2259. req = c.newRequest(op, input, output)
  2260. return
  2261. }
  2262. // DescribeLoadBalancers API operation for Auto Scaling.
  2263. //
  2264. // Describes the load balancers for the specified Auto Scaling group.
  2265. //
  2266. // This operation describes only Classic Load Balancers. If you have Application
  2267. // Load Balancers, use DescribeLoadBalancerTargetGroups instead.
  2268. //
  2269. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2270. // with awserr.Error's Code and Message methods to get detailed information about
  2271. // the error.
  2272. //
  2273. // See the AWS API reference guide for Auto Scaling's
  2274. // API operation DescribeLoadBalancers for usage and error information.
  2275. //
  2276. // Returned Error Codes:
  2277. // * ErrCodeResourceContentionFault "ResourceContention"
  2278. // You already have a pending update to an Auto Scaling resource (for example,
  2279. // a group, instance, or load balancer).
  2280. //
  2281. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancers
  2282. func (c *AutoScaling) DescribeLoadBalancers(input *DescribeLoadBalancersInput) (*DescribeLoadBalancersOutput, error) {
  2283. req, out := c.DescribeLoadBalancersRequest(input)
  2284. return out, req.Send()
  2285. }
  2286. // DescribeLoadBalancersWithContext is the same as DescribeLoadBalancers with the addition of
  2287. // the ability to pass a context and additional request options.
  2288. //
  2289. // See DescribeLoadBalancers for details on how to use this API operation.
  2290. //
  2291. // The context must be non-nil and will be used for request cancellation. If
  2292. // the context is nil a panic will occur. In the future the SDK may create
  2293. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2294. // for more information on using Contexts.
  2295. func (c *AutoScaling) DescribeLoadBalancersWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, opts ...request.Option) (*DescribeLoadBalancersOutput, error) {
  2296. req, out := c.DescribeLoadBalancersRequest(input)
  2297. req.SetContext(ctx)
  2298. req.ApplyOptions(opts...)
  2299. return out, req.Send()
  2300. }
  2301. const opDescribeMetricCollectionTypes = "DescribeMetricCollectionTypes"
  2302. // DescribeMetricCollectionTypesRequest generates a "aws/request.Request" representing the
  2303. // client's request for the DescribeMetricCollectionTypes operation. The "output" return
  2304. // value will be populated with the request's response once the request completes
  2305. // successfully.
  2306. //
  2307. // Use "Send" method on the returned Request to send the API call to the service.
  2308. // the "output" return value is not valid until after Send returns without error.
  2309. //
  2310. // See DescribeMetricCollectionTypes for more information on using the DescribeMetricCollectionTypes
  2311. // API call, and error handling.
  2312. //
  2313. // This method is useful when you want to inject custom logic or configuration
  2314. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2315. //
  2316. //
  2317. // // Example sending a request using the DescribeMetricCollectionTypesRequest method.
  2318. // req, resp := client.DescribeMetricCollectionTypesRequest(params)
  2319. //
  2320. // err := req.Send()
  2321. // if err == nil { // resp is now filled
  2322. // fmt.Println(resp)
  2323. // }
  2324. //
  2325. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeMetricCollectionTypes
  2326. func (c *AutoScaling) DescribeMetricCollectionTypesRequest(input *DescribeMetricCollectionTypesInput) (req *request.Request, output *DescribeMetricCollectionTypesOutput) {
  2327. op := &request.Operation{
  2328. Name: opDescribeMetricCollectionTypes,
  2329. HTTPMethod: "POST",
  2330. HTTPPath: "/",
  2331. }
  2332. if input == nil {
  2333. input = &DescribeMetricCollectionTypesInput{}
  2334. }
  2335. output = &DescribeMetricCollectionTypesOutput{}
  2336. req = c.newRequest(op, input, output)
  2337. return
  2338. }
  2339. // DescribeMetricCollectionTypes API operation for Auto Scaling.
  2340. //
  2341. // Describes the available CloudWatch metrics for Amazon EC2 Auto Scaling.
  2342. //
  2343. // The GroupStandbyInstances metric is not returned by default. You must explicitly
  2344. // request this metric when calling EnableMetricsCollection.
  2345. //
  2346. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2347. // with awserr.Error's Code and Message methods to get detailed information about
  2348. // the error.
  2349. //
  2350. // See the AWS API reference guide for Auto Scaling's
  2351. // API operation DescribeMetricCollectionTypes for usage and error information.
  2352. //
  2353. // Returned Error Codes:
  2354. // * ErrCodeResourceContentionFault "ResourceContention"
  2355. // You already have a pending update to an Auto Scaling resource (for example,
  2356. // a group, instance, or load balancer).
  2357. //
  2358. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeMetricCollectionTypes
  2359. func (c *AutoScaling) DescribeMetricCollectionTypes(input *DescribeMetricCollectionTypesInput) (*DescribeMetricCollectionTypesOutput, error) {
  2360. req, out := c.DescribeMetricCollectionTypesRequest(input)
  2361. return out, req.Send()
  2362. }
  2363. // DescribeMetricCollectionTypesWithContext is the same as DescribeMetricCollectionTypes with the addition of
  2364. // the ability to pass a context and additional request options.
  2365. //
  2366. // See DescribeMetricCollectionTypes for details on how to use this API operation.
  2367. //
  2368. // The context must be non-nil and will be used for request cancellation. If
  2369. // the context is nil a panic will occur. In the future the SDK may create
  2370. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2371. // for more information on using Contexts.
  2372. func (c *AutoScaling) DescribeMetricCollectionTypesWithContext(ctx aws.Context, input *DescribeMetricCollectionTypesInput, opts ...request.Option) (*DescribeMetricCollectionTypesOutput, error) {
  2373. req, out := c.DescribeMetricCollectionTypesRequest(input)
  2374. req.SetContext(ctx)
  2375. req.ApplyOptions(opts...)
  2376. return out, req.Send()
  2377. }
  2378. const opDescribeNotificationConfigurations = "DescribeNotificationConfigurations"
  2379. // DescribeNotificationConfigurationsRequest generates a "aws/request.Request" representing the
  2380. // client's request for the DescribeNotificationConfigurations operation. The "output" return
  2381. // value will be populated with the request's response once the request completes
  2382. // successfully.
  2383. //
  2384. // Use "Send" method on the returned Request to send the API call to the service.
  2385. // the "output" return value is not valid until after Send returns without error.
  2386. //
  2387. // See DescribeNotificationConfigurations for more information on using the DescribeNotificationConfigurations
  2388. // API call, and error handling.
  2389. //
  2390. // This method is useful when you want to inject custom logic or configuration
  2391. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2392. //
  2393. //
  2394. // // Example sending a request using the DescribeNotificationConfigurationsRequest method.
  2395. // req, resp := client.DescribeNotificationConfigurationsRequest(params)
  2396. //
  2397. // err := req.Send()
  2398. // if err == nil { // resp is now filled
  2399. // fmt.Println(resp)
  2400. // }
  2401. //
  2402. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeNotificationConfigurations
  2403. func (c *AutoScaling) DescribeNotificationConfigurationsRequest(input *DescribeNotificationConfigurationsInput) (req *request.Request, output *DescribeNotificationConfigurationsOutput) {
  2404. op := &request.Operation{
  2405. Name: opDescribeNotificationConfigurations,
  2406. HTTPMethod: "POST",
  2407. HTTPPath: "/",
  2408. Paginator: &request.Paginator{
  2409. InputTokens: []string{"NextToken"},
  2410. OutputTokens: []string{"NextToken"},
  2411. LimitToken: "MaxRecords",
  2412. TruncationToken: "",
  2413. },
  2414. }
  2415. if input == nil {
  2416. input = &DescribeNotificationConfigurationsInput{}
  2417. }
  2418. output = &DescribeNotificationConfigurationsOutput{}
  2419. req = c.newRequest(op, input, output)
  2420. return
  2421. }
  2422. // DescribeNotificationConfigurations API operation for Auto Scaling.
  2423. //
  2424. // Describes the notification actions associated with the specified Auto Scaling
  2425. // group.
  2426. //
  2427. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2428. // with awserr.Error's Code and Message methods to get detailed information about
  2429. // the error.
  2430. //
  2431. // See the AWS API reference guide for Auto Scaling's
  2432. // API operation DescribeNotificationConfigurations for usage and error information.
  2433. //
  2434. // Returned Error Codes:
  2435. // * ErrCodeInvalidNextToken "InvalidNextToken"
  2436. // The NextToken value is not valid.
  2437. //
  2438. // * ErrCodeResourceContentionFault "ResourceContention"
  2439. // You already have a pending update to an Auto Scaling resource (for example,
  2440. // a group, instance, or load balancer).
  2441. //
  2442. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeNotificationConfigurations
  2443. func (c *AutoScaling) DescribeNotificationConfigurations(input *DescribeNotificationConfigurationsInput) (*DescribeNotificationConfigurationsOutput, error) {
  2444. req, out := c.DescribeNotificationConfigurationsRequest(input)
  2445. return out, req.Send()
  2446. }
  2447. // DescribeNotificationConfigurationsWithContext is the same as DescribeNotificationConfigurations with the addition of
  2448. // the ability to pass a context and additional request options.
  2449. //
  2450. // See DescribeNotificationConfigurations for details on how to use this API operation.
  2451. //
  2452. // The context must be non-nil and will be used for request cancellation. If
  2453. // the context is nil a panic will occur. In the future the SDK may create
  2454. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2455. // for more information on using Contexts.
  2456. func (c *AutoScaling) DescribeNotificationConfigurationsWithContext(ctx aws.Context, input *DescribeNotificationConfigurationsInput, opts ...request.Option) (*DescribeNotificationConfigurationsOutput, error) {
  2457. req, out := c.DescribeNotificationConfigurationsRequest(input)
  2458. req.SetContext(ctx)
  2459. req.ApplyOptions(opts...)
  2460. return out, req.Send()
  2461. }
  2462. // DescribeNotificationConfigurationsPages iterates over the pages of a DescribeNotificationConfigurations operation,
  2463. // calling the "fn" function with the response data for each page. To stop
  2464. // iterating, return false from the fn function.
  2465. //
  2466. // See DescribeNotificationConfigurations method for more information on how to use this operation.
  2467. //
  2468. // Note: This operation can generate multiple requests to a service.
  2469. //
  2470. // // Example iterating over at most 3 pages of a DescribeNotificationConfigurations operation.
  2471. // pageNum := 0
  2472. // err := client.DescribeNotificationConfigurationsPages(params,
  2473. // func(page *DescribeNotificationConfigurationsOutput, lastPage bool) bool {
  2474. // pageNum++
  2475. // fmt.Println(page)
  2476. // return pageNum <= 3
  2477. // })
  2478. //
  2479. func (c *AutoScaling) DescribeNotificationConfigurationsPages(input *DescribeNotificationConfigurationsInput, fn func(*DescribeNotificationConfigurationsOutput, bool) bool) error {
  2480. return c.DescribeNotificationConfigurationsPagesWithContext(aws.BackgroundContext(), input, fn)
  2481. }
  2482. // DescribeNotificationConfigurationsPagesWithContext same as DescribeNotificationConfigurationsPages except
  2483. // it takes a Context and allows setting request options on the pages.
  2484. //
  2485. // The context must be non-nil and will be used for request cancellation. If
  2486. // the context is nil a panic will occur. In the future the SDK may create
  2487. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2488. // for more information on using Contexts.
  2489. func (c *AutoScaling) DescribeNotificationConfigurationsPagesWithContext(ctx aws.Context, input *DescribeNotificationConfigurationsInput, fn func(*DescribeNotificationConfigurationsOutput, bool) bool, opts ...request.Option) error {
  2490. p := request.Pagination{
  2491. NewRequest: func() (*request.Request, error) {
  2492. var inCpy *DescribeNotificationConfigurationsInput
  2493. if input != nil {
  2494. tmp := *input
  2495. inCpy = &tmp
  2496. }
  2497. req, _ := c.DescribeNotificationConfigurationsRequest(inCpy)
  2498. req.SetContext(ctx)
  2499. req.ApplyOptions(opts...)
  2500. return req, nil
  2501. },
  2502. }
  2503. cont := true
  2504. for p.Next() && cont {
  2505. cont = fn(p.Page().(*DescribeNotificationConfigurationsOutput), !p.HasNextPage())
  2506. }
  2507. return p.Err()
  2508. }
  2509. const opDescribePolicies = "DescribePolicies"
  2510. // DescribePoliciesRequest generates a "aws/request.Request" representing the
  2511. // client's request for the DescribePolicies operation. The "output" return
  2512. // value will be populated with the request's response once the request completes
  2513. // successfully.
  2514. //
  2515. // Use "Send" method on the returned Request to send the API call to the service.
  2516. // the "output" return value is not valid until after Send returns without error.
  2517. //
  2518. // See DescribePolicies for more information on using the DescribePolicies
  2519. // API call, and error handling.
  2520. //
  2521. // This method is useful when you want to inject custom logic or configuration
  2522. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2523. //
  2524. //
  2525. // // Example sending a request using the DescribePoliciesRequest method.
  2526. // req, resp := client.DescribePoliciesRequest(params)
  2527. //
  2528. // err := req.Send()
  2529. // if err == nil { // resp is now filled
  2530. // fmt.Println(resp)
  2531. // }
  2532. //
  2533. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribePolicies
  2534. func (c *AutoScaling) DescribePoliciesRequest(input *DescribePoliciesInput) (req *request.Request, output *DescribePoliciesOutput) {
  2535. op := &request.Operation{
  2536. Name: opDescribePolicies,
  2537. HTTPMethod: "POST",
  2538. HTTPPath: "/",
  2539. Paginator: &request.Paginator{
  2540. InputTokens: []string{"NextToken"},
  2541. OutputTokens: []string{"NextToken"},
  2542. LimitToken: "MaxRecords",
  2543. TruncationToken: "",
  2544. },
  2545. }
  2546. if input == nil {
  2547. input = &DescribePoliciesInput{}
  2548. }
  2549. output = &DescribePoliciesOutput{}
  2550. req = c.newRequest(op, input, output)
  2551. return
  2552. }
  2553. // DescribePolicies API operation for Auto Scaling.
  2554. //
  2555. // Describes the policies for the specified Auto Scaling group.
  2556. //
  2557. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2558. // with awserr.Error's Code and Message methods to get detailed information about
  2559. // the error.
  2560. //
  2561. // See the AWS API reference guide for Auto Scaling's
  2562. // API operation DescribePolicies for usage and error information.
  2563. //
  2564. // Returned Error Codes:
  2565. // * ErrCodeInvalidNextToken "InvalidNextToken"
  2566. // The NextToken value is not valid.
  2567. //
  2568. // * ErrCodeResourceContentionFault "ResourceContention"
  2569. // You already have a pending update to an Auto Scaling resource (for example,
  2570. // a group, instance, or load balancer).
  2571. //
  2572. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  2573. // The service-linked role is not yet ready for use.
  2574. //
  2575. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribePolicies
  2576. func (c *AutoScaling) DescribePolicies(input *DescribePoliciesInput) (*DescribePoliciesOutput, error) {
  2577. req, out := c.DescribePoliciesRequest(input)
  2578. return out, req.Send()
  2579. }
  2580. // DescribePoliciesWithContext is the same as DescribePolicies with the addition of
  2581. // the ability to pass a context and additional request options.
  2582. //
  2583. // See DescribePolicies for details on how to use this API operation.
  2584. //
  2585. // The context must be non-nil and will be used for request cancellation. If
  2586. // the context is nil a panic will occur. In the future the SDK may create
  2587. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2588. // for more information on using Contexts.
  2589. func (c *AutoScaling) DescribePoliciesWithContext(ctx aws.Context, input *DescribePoliciesInput, opts ...request.Option) (*DescribePoliciesOutput, error) {
  2590. req, out := c.DescribePoliciesRequest(input)
  2591. req.SetContext(ctx)
  2592. req.ApplyOptions(opts...)
  2593. return out, req.Send()
  2594. }
  2595. // DescribePoliciesPages iterates over the pages of a DescribePolicies operation,
  2596. // calling the "fn" function with the response data for each page. To stop
  2597. // iterating, return false from the fn function.
  2598. //
  2599. // See DescribePolicies method for more information on how to use this operation.
  2600. //
  2601. // Note: This operation can generate multiple requests to a service.
  2602. //
  2603. // // Example iterating over at most 3 pages of a DescribePolicies operation.
  2604. // pageNum := 0
  2605. // err := client.DescribePoliciesPages(params,
  2606. // func(page *DescribePoliciesOutput, lastPage bool) bool {
  2607. // pageNum++
  2608. // fmt.Println(page)
  2609. // return pageNum <= 3
  2610. // })
  2611. //
  2612. func (c *AutoScaling) DescribePoliciesPages(input *DescribePoliciesInput, fn func(*DescribePoliciesOutput, bool) bool) error {
  2613. return c.DescribePoliciesPagesWithContext(aws.BackgroundContext(), input, fn)
  2614. }
  2615. // DescribePoliciesPagesWithContext same as DescribePoliciesPages except
  2616. // it takes a Context and allows setting request options on the pages.
  2617. //
  2618. // The context must be non-nil and will be used for request cancellation. If
  2619. // the context is nil a panic will occur. In the future the SDK may create
  2620. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2621. // for more information on using Contexts.
  2622. func (c *AutoScaling) DescribePoliciesPagesWithContext(ctx aws.Context, input *DescribePoliciesInput, fn func(*DescribePoliciesOutput, bool) bool, opts ...request.Option) error {
  2623. p := request.Pagination{
  2624. NewRequest: func() (*request.Request, error) {
  2625. var inCpy *DescribePoliciesInput
  2626. if input != nil {
  2627. tmp := *input
  2628. inCpy = &tmp
  2629. }
  2630. req, _ := c.DescribePoliciesRequest(inCpy)
  2631. req.SetContext(ctx)
  2632. req.ApplyOptions(opts...)
  2633. return req, nil
  2634. },
  2635. }
  2636. cont := true
  2637. for p.Next() && cont {
  2638. cont = fn(p.Page().(*DescribePoliciesOutput), !p.HasNextPage())
  2639. }
  2640. return p.Err()
  2641. }
  2642. const opDescribeScalingActivities = "DescribeScalingActivities"
  2643. // DescribeScalingActivitiesRequest generates a "aws/request.Request" representing the
  2644. // client's request for the DescribeScalingActivities operation. The "output" return
  2645. // value will be populated with the request's response once the request completes
  2646. // successfully.
  2647. //
  2648. // Use "Send" method on the returned Request to send the API call to the service.
  2649. // the "output" return value is not valid until after Send returns without error.
  2650. //
  2651. // See DescribeScalingActivities for more information on using the DescribeScalingActivities
  2652. // API call, and error handling.
  2653. //
  2654. // This method is useful when you want to inject custom logic or configuration
  2655. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2656. //
  2657. //
  2658. // // Example sending a request using the DescribeScalingActivitiesRequest method.
  2659. // req, resp := client.DescribeScalingActivitiesRequest(params)
  2660. //
  2661. // err := req.Send()
  2662. // if err == nil { // resp is now filled
  2663. // fmt.Println(resp)
  2664. // }
  2665. //
  2666. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingActivities
  2667. func (c *AutoScaling) DescribeScalingActivitiesRequest(input *DescribeScalingActivitiesInput) (req *request.Request, output *DescribeScalingActivitiesOutput) {
  2668. op := &request.Operation{
  2669. Name: opDescribeScalingActivities,
  2670. HTTPMethod: "POST",
  2671. HTTPPath: "/",
  2672. Paginator: &request.Paginator{
  2673. InputTokens: []string{"NextToken"},
  2674. OutputTokens: []string{"NextToken"},
  2675. LimitToken: "MaxRecords",
  2676. TruncationToken: "",
  2677. },
  2678. }
  2679. if input == nil {
  2680. input = &DescribeScalingActivitiesInput{}
  2681. }
  2682. output = &DescribeScalingActivitiesOutput{}
  2683. req = c.newRequest(op, input, output)
  2684. return
  2685. }
  2686. // DescribeScalingActivities API operation for Auto Scaling.
  2687. //
  2688. // Describes one or more scaling activities for the specified Auto Scaling group.
  2689. //
  2690. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2691. // with awserr.Error's Code and Message methods to get detailed information about
  2692. // the error.
  2693. //
  2694. // See the AWS API reference guide for Auto Scaling's
  2695. // API operation DescribeScalingActivities for usage and error information.
  2696. //
  2697. // Returned Error Codes:
  2698. // * ErrCodeInvalidNextToken "InvalidNextToken"
  2699. // The NextToken value is not valid.
  2700. //
  2701. // * ErrCodeResourceContentionFault "ResourceContention"
  2702. // You already have a pending update to an Auto Scaling resource (for example,
  2703. // a group, instance, or load balancer).
  2704. //
  2705. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingActivities
  2706. func (c *AutoScaling) DescribeScalingActivities(input *DescribeScalingActivitiesInput) (*DescribeScalingActivitiesOutput, error) {
  2707. req, out := c.DescribeScalingActivitiesRequest(input)
  2708. return out, req.Send()
  2709. }
  2710. // DescribeScalingActivitiesWithContext is the same as DescribeScalingActivities with the addition of
  2711. // the ability to pass a context and additional request options.
  2712. //
  2713. // See DescribeScalingActivities for details on how to use this API operation.
  2714. //
  2715. // The context must be non-nil and will be used for request cancellation. If
  2716. // the context is nil a panic will occur. In the future the SDK may create
  2717. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2718. // for more information on using Contexts.
  2719. func (c *AutoScaling) DescribeScalingActivitiesWithContext(ctx aws.Context, input *DescribeScalingActivitiesInput, opts ...request.Option) (*DescribeScalingActivitiesOutput, error) {
  2720. req, out := c.DescribeScalingActivitiesRequest(input)
  2721. req.SetContext(ctx)
  2722. req.ApplyOptions(opts...)
  2723. return out, req.Send()
  2724. }
  2725. // DescribeScalingActivitiesPages iterates over the pages of a DescribeScalingActivities operation,
  2726. // calling the "fn" function with the response data for each page. To stop
  2727. // iterating, return false from the fn function.
  2728. //
  2729. // See DescribeScalingActivities method for more information on how to use this operation.
  2730. //
  2731. // Note: This operation can generate multiple requests to a service.
  2732. //
  2733. // // Example iterating over at most 3 pages of a DescribeScalingActivities operation.
  2734. // pageNum := 0
  2735. // err := client.DescribeScalingActivitiesPages(params,
  2736. // func(page *DescribeScalingActivitiesOutput, lastPage bool) bool {
  2737. // pageNum++
  2738. // fmt.Println(page)
  2739. // return pageNum <= 3
  2740. // })
  2741. //
  2742. func (c *AutoScaling) DescribeScalingActivitiesPages(input *DescribeScalingActivitiesInput, fn func(*DescribeScalingActivitiesOutput, bool) bool) error {
  2743. return c.DescribeScalingActivitiesPagesWithContext(aws.BackgroundContext(), input, fn)
  2744. }
  2745. // DescribeScalingActivitiesPagesWithContext same as DescribeScalingActivitiesPages except
  2746. // it takes a Context and allows setting request options on the pages.
  2747. //
  2748. // The context must be non-nil and will be used for request cancellation. If
  2749. // the context is nil a panic will occur. In the future the SDK may create
  2750. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2751. // for more information on using Contexts.
  2752. func (c *AutoScaling) DescribeScalingActivitiesPagesWithContext(ctx aws.Context, input *DescribeScalingActivitiesInput, fn func(*DescribeScalingActivitiesOutput, bool) bool, opts ...request.Option) error {
  2753. p := request.Pagination{
  2754. NewRequest: func() (*request.Request, error) {
  2755. var inCpy *DescribeScalingActivitiesInput
  2756. if input != nil {
  2757. tmp := *input
  2758. inCpy = &tmp
  2759. }
  2760. req, _ := c.DescribeScalingActivitiesRequest(inCpy)
  2761. req.SetContext(ctx)
  2762. req.ApplyOptions(opts...)
  2763. return req, nil
  2764. },
  2765. }
  2766. cont := true
  2767. for p.Next() && cont {
  2768. cont = fn(p.Page().(*DescribeScalingActivitiesOutput), !p.HasNextPage())
  2769. }
  2770. return p.Err()
  2771. }
  2772. const opDescribeScalingProcessTypes = "DescribeScalingProcessTypes"
  2773. // DescribeScalingProcessTypesRequest generates a "aws/request.Request" representing the
  2774. // client's request for the DescribeScalingProcessTypes operation. The "output" return
  2775. // value will be populated with the request's response once the request completes
  2776. // successfully.
  2777. //
  2778. // Use "Send" method on the returned Request to send the API call to the service.
  2779. // the "output" return value is not valid until after Send returns without error.
  2780. //
  2781. // See DescribeScalingProcessTypes for more information on using the DescribeScalingProcessTypes
  2782. // API call, and error handling.
  2783. //
  2784. // This method is useful when you want to inject custom logic or configuration
  2785. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2786. //
  2787. //
  2788. // // Example sending a request using the DescribeScalingProcessTypesRequest method.
  2789. // req, resp := client.DescribeScalingProcessTypesRequest(params)
  2790. //
  2791. // err := req.Send()
  2792. // if err == nil { // resp is now filled
  2793. // fmt.Println(resp)
  2794. // }
  2795. //
  2796. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingProcessTypes
  2797. func (c *AutoScaling) DescribeScalingProcessTypesRequest(input *DescribeScalingProcessTypesInput) (req *request.Request, output *DescribeScalingProcessTypesOutput) {
  2798. op := &request.Operation{
  2799. Name: opDescribeScalingProcessTypes,
  2800. HTTPMethod: "POST",
  2801. HTTPPath: "/",
  2802. }
  2803. if input == nil {
  2804. input = &DescribeScalingProcessTypesInput{}
  2805. }
  2806. output = &DescribeScalingProcessTypesOutput{}
  2807. req = c.newRequest(op, input, output)
  2808. return
  2809. }
  2810. // DescribeScalingProcessTypes API operation for Auto Scaling.
  2811. //
  2812. // Describes the scaling process types for use with ResumeProcesses and SuspendProcesses.
  2813. //
  2814. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2815. // with awserr.Error's Code and Message methods to get detailed information about
  2816. // the error.
  2817. //
  2818. // See the AWS API reference guide for Auto Scaling's
  2819. // API operation DescribeScalingProcessTypes for usage and error information.
  2820. //
  2821. // Returned Error Codes:
  2822. // * ErrCodeResourceContentionFault "ResourceContention"
  2823. // You already have a pending update to an Auto Scaling resource (for example,
  2824. // a group, instance, or load balancer).
  2825. //
  2826. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingProcessTypes
  2827. func (c *AutoScaling) DescribeScalingProcessTypes(input *DescribeScalingProcessTypesInput) (*DescribeScalingProcessTypesOutput, error) {
  2828. req, out := c.DescribeScalingProcessTypesRequest(input)
  2829. return out, req.Send()
  2830. }
  2831. // DescribeScalingProcessTypesWithContext is the same as DescribeScalingProcessTypes with the addition of
  2832. // the ability to pass a context and additional request options.
  2833. //
  2834. // See DescribeScalingProcessTypes for details on how to use this API operation.
  2835. //
  2836. // The context must be non-nil and will be used for request cancellation. If
  2837. // the context is nil a panic will occur. In the future the SDK may create
  2838. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2839. // for more information on using Contexts.
  2840. func (c *AutoScaling) DescribeScalingProcessTypesWithContext(ctx aws.Context, input *DescribeScalingProcessTypesInput, opts ...request.Option) (*DescribeScalingProcessTypesOutput, error) {
  2841. req, out := c.DescribeScalingProcessTypesRequest(input)
  2842. req.SetContext(ctx)
  2843. req.ApplyOptions(opts...)
  2844. return out, req.Send()
  2845. }
  2846. const opDescribeScheduledActions = "DescribeScheduledActions"
  2847. // DescribeScheduledActionsRequest generates a "aws/request.Request" representing the
  2848. // client's request for the DescribeScheduledActions operation. The "output" return
  2849. // value will be populated with the request's response once the request completes
  2850. // successfully.
  2851. //
  2852. // Use "Send" method on the returned Request to send the API call to the service.
  2853. // the "output" return value is not valid until after Send returns without error.
  2854. //
  2855. // See DescribeScheduledActions for more information on using the DescribeScheduledActions
  2856. // API call, and error handling.
  2857. //
  2858. // This method is useful when you want to inject custom logic or configuration
  2859. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2860. //
  2861. //
  2862. // // Example sending a request using the DescribeScheduledActionsRequest method.
  2863. // req, resp := client.DescribeScheduledActionsRequest(params)
  2864. //
  2865. // err := req.Send()
  2866. // if err == nil { // resp is now filled
  2867. // fmt.Println(resp)
  2868. // }
  2869. //
  2870. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScheduledActions
  2871. func (c *AutoScaling) DescribeScheduledActionsRequest(input *DescribeScheduledActionsInput) (req *request.Request, output *DescribeScheduledActionsOutput) {
  2872. op := &request.Operation{
  2873. Name: opDescribeScheduledActions,
  2874. HTTPMethod: "POST",
  2875. HTTPPath: "/",
  2876. Paginator: &request.Paginator{
  2877. InputTokens: []string{"NextToken"},
  2878. OutputTokens: []string{"NextToken"},
  2879. LimitToken: "MaxRecords",
  2880. TruncationToken: "",
  2881. },
  2882. }
  2883. if input == nil {
  2884. input = &DescribeScheduledActionsInput{}
  2885. }
  2886. output = &DescribeScheduledActionsOutput{}
  2887. req = c.newRequest(op, input, output)
  2888. return
  2889. }
  2890. // DescribeScheduledActions API operation for Auto Scaling.
  2891. //
  2892. // Describes the actions scheduled for your Auto Scaling group that haven't
  2893. // run. To describe the actions that have already run, use DescribeScalingActivities.
  2894. //
  2895. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2896. // with awserr.Error's Code and Message methods to get detailed information about
  2897. // the error.
  2898. //
  2899. // See the AWS API reference guide for Auto Scaling's
  2900. // API operation DescribeScheduledActions for usage and error information.
  2901. //
  2902. // Returned Error Codes:
  2903. // * ErrCodeInvalidNextToken "InvalidNextToken"
  2904. // The NextToken value is not valid.
  2905. //
  2906. // * ErrCodeResourceContentionFault "ResourceContention"
  2907. // You already have a pending update to an Auto Scaling resource (for example,
  2908. // a group, instance, or load balancer).
  2909. //
  2910. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScheduledActions
  2911. func (c *AutoScaling) DescribeScheduledActions(input *DescribeScheduledActionsInput) (*DescribeScheduledActionsOutput, error) {
  2912. req, out := c.DescribeScheduledActionsRequest(input)
  2913. return out, req.Send()
  2914. }
  2915. // DescribeScheduledActionsWithContext is the same as DescribeScheduledActions with the addition of
  2916. // the ability to pass a context and additional request options.
  2917. //
  2918. // See DescribeScheduledActions for details on how to use this API operation.
  2919. //
  2920. // The context must be non-nil and will be used for request cancellation. If
  2921. // the context is nil a panic will occur. In the future the SDK may create
  2922. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2923. // for more information on using Contexts.
  2924. func (c *AutoScaling) DescribeScheduledActionsWithContext(ctx aws.Context, input *DescribeScheduledActionsInput, opts ...request.Option) (*DescribeScheduledActionsOutput, error) {
  2925. req, out := c.DescribeScheduledActionsRequest(input)
  2926. req.SetContext(ctx)
  2927. req.ApplyOptions(opts...)
  2928. return out, req.Send()
  2929. }
  2930. // DescribeScheduledActionsPages iterates over the pages of a DescribeScheduledActions operation,
  2931. // calling the "fn" function with the response data for each page. To stop
  2932. // iterating, return false from the fn function.
  2933. //
  2934. // See DescribeScheduledActions method for more information on how to use this operation.
  2935. //
  2936. // Note: This operation can generate multiple requests to a service.
  2937. //
  2938. // // Example iterating over at most 3 pages of a DescribeScheduledActions operation.
  2939. // pageNum := 0
  2940. // err := client.DescribeScheduledActionsPages(params,
  2941. // func(page *DescribeScheduledActionsOutput, lastPage bool) bool {
  2942. // pageNum++
  2943. // fmt.Println(page)
  2944. // return pageNum <= 3
  2945. // })
  2946. //
  2947. func (c *AutoScaling) DescribeScheduledActionsPages(input *DescribeScheduledActionsInput, fn func(*DescribeScheduledActionsOutput, bool) bool) error {
  2948. return c.DescribeScheduledActionsPagesWithContext(aws.BackgroundContext(), input, fn)
  2949. }
  2950. // DescribeScheduledActionsPagesWithContext same as DescribeScheduledActionsPages except
  2951. // it takes a Context and allows setting request options on the pages.
  2952. //
  2953. // The context must be non-nil and will be used for request cancellation. If
  2954. // the context is nil a panic will occur. In the future the SDK may create
  2955. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2956. // for more information on using Contexts.
  2957. func (c *AutoScaling) DescribeScheduledActionsPagesWithContext(ctx aws.Context, input *DescribeScheduledActionsInput, fn func(*DescribeScheduledActionsOutput, bool) bool, opts ...request.Option) error {
  2958. p := request.Pagination{
  2959. NewRequest: func() (*request.Request, error) {
  2960. var inCpy *DescribeScheduledActionsInput
  2961. if input != nil {
  2962. tmp := *input
  2963. inCpy = &tmp
  2964. }
  2965. req, _ := c.DescribeScheduledActionsRequest(inCpy)
  2966. req.SetContext(ctx)
  2967. req.ApplyOptions(opts...)
  2968. return req, nil
  2969. },
  2970. }
  2971. cont := true
  2972. for p.Next() && cont {
  2973. cont = fn(p.Page().(*DescribeScheduledActionsOutput), !p.HasNextPage())
  2974. }
  2975. return p.Err()
  2976. }
  2977. const opDescribeTags = "DescribeTags"
  2978. // DescribeTagsRequest generates a "aws/request.Request" representing the
  2979. // client's request for the DescribeTags operation. The "output" return
  2980. // value will be populated with the request's response once the request completes
  2981. // successfully.
  2982. //
  2983. // Use "Send" method on the returned Request to send the API call to the service.
  2984. // the "output" return value is not valid until after Send returns without error.
  2985. //
  2986. // See DescribeTags for more information on using the DescribeTags
  2987. // API call, and error handling.
  2988. //
  2989. // This method is useful when you want to inject custom logic or configuration
  2990. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2991. //
  2992. //
  2993. // // Example sending a request using the DescribeTagsRequest method.
  2994. // req, resp := client.DescribeTagsRequest(params)
  2995. //
  2996. // err := req.Send()
  2997. // if err == nil { // resp is now filled
  2998. // fmt.Println(resp)
  2999. // }
  3000. //
  3001. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTags
  3002. func (c *AutoScaling) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) {
  3003. op := &request.Operation{
  3004. Name: opDescribeTags,
  3005. HTTPMethod: "POST",
  3006. HTTPPath: "/",
  3007. Paginator: &request.Paginator{
  3008. InputTokens: []string{"NextToken"},
  3009. OutputTokens: []string{"NextToken"},
  3010. LimitToken: "MaxRecords",
  3011. TruncationToken: "",
  3012. },
  3013. }
  3014. if input == nil {
  3015. input = &DescribeTagsInput{}
  3016. }
  3017. output = &DescribeTagsOutput{}
  3018. req = c.newRequest(op, input, output)
  3019. return
  3020. }
  3021. // DescribeTags API operation for Auto Scaling.
  3022. //
  3023. // Describes the specified tags.
  3024. //
  3025. // You can use filters to limit the results. For example, you can query for
  3026. // the tags for a specific Auto Scaling group. You can specify multiple values
  3027. // for a filter. A tag must match at least one of the specified values for it
  3028. // to be included in the results.
  3029. //
  3030. // You can also specify multiple filters. The result includes information for
  3031. // a particular tag only if it matches all the filters. If there's no match,
  3032. // no special message is returned.
  3033. //
  3034. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3035. // with awserr.Error's Code and Message methods to get detailed information about
  3036. // the error.
  3037. //
  3038. // See the AWS API reference guide for Auto Scaling's
  3039. // API operation DescribeTags for usage and error information.
  3040. //
  3041. // Returned Error Codes:
  3042. // * ErrCodeInvalidNextToken "InvalidNextToken"
  3043. // The NextToken value is not valid.
  3044. //
  3045. // * ErrCodeResourceContentionFault "ResourceContention"
  3046. // You already have a pending update to an Auto Scaling resource (for example,
  3047. // a group, instance, or load balancer).
  3048. //
  3049. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTags
  3050. func (c *AutoScaling) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
  3051. req, out := c.DescribeTagsRequest(input)
  3052. return out, req.Send()
  3053. }
  3054. // DescribeTagsWithContext is the same as DescribeTags with the addition of
  3055. // the ability to pass a context and additional request options.
  3056. //
  3057. // See DescribeTags for details on how to use this API operation.
  3058. //
  3059. // The context must be non-nil and will be used for request cancellation. If
  3060. // the context is nil a panic will occur. In the future the SDK may create
  3061. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3062. // for more information on using Contexts.
  3063. func (c *AutoScaling) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) {
  3064. req, out := c.DescribeTagsRequest(input)
  3065. req.SetContext(ctx)
  3066. req.ApplyOptions(opts...)
  3067. return out, req.Send()
  3068. }
  3069. // DescribeTagsPages iterates over the pages of a DescribeTags operation,
  3070. // calling the "fn" function with the response data for each page. To stop
  3071. // iterating, return false from the fn function.
  3072. //
  3073. // See DescribeTags method for more information on how to use this operation.
  3074. //
  3075. // Note: This operation can generate multiple requests to a service.
  3076. //
  3077. // // Example iterating over at most 3 pages of a DescribeTags operation.
  3078. // pageNum := 0
  3079. // err := client.DescribeTagsPages(params,
  3080. // func(page *DescribeTagsOutput, lastPage bool) bool {
  3081. // pageNum++
  3082. // fmt.Println(page)
  3083. // return pageNum <= 3
  3084. // })
  3085. //
  3086. func (c *AutoScaling) DescribeTagsPages(input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool) error {
  3087. return c.DescribeTagsPagesWithContext(aws.BackgroundContext(), input, fn)
  3088. }
  3089. // DescribeTagsPagesWithContext same as DescribeTagsPages except
  3090. // it takes a Context and allows setting request options on the pages.
  3091. //
  3092. // The context must be non-nil and will be used for request cancellation. If
  3093. // the context is nil a panic will occur. In the future the SDK may create
  3094. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3095. // for more information on using Contexts.
  3096. func (c *AutoScaling) DescribeTagsPagesWithContext(ctx aws.Context, input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool, opts ...request.Option) error {
  3097. p := request.Pagination{
  3098. NewRequest: func() (*request.Request, error) {
  3099. var inCpy *DescribeTagsInput
  3100. if input != nil {
  3101. tmp := *input
  3102. inCpy = &tmp
  3103. }
  3104. req, _ := c.DescribeTagsRequest(inCpy)
  3105. req.SetContext(ctx)
  3106. req.ApplyOptions(opts...)
  3107. return req, nil
  3108. },
  3109. }
  3110. cont := true
  3111. for p.Next() && cont {
  3112. cont = fn(p.Page().(*DescribeTagsOutput), !p.HasNextPage())
  3113. }
  3114. return p.Err()
  3115. }
  3116. const opDescribeTerminationPolicyTypes = "DescribeTerminationPolicyTypes"
  3117. // DescribeTerminationPolicyTypesRequest generates a "aws/request.Request" representing the
  3118. // client's request for the DescribeTerminationPolicyTypes operation. The "output" return
  3119. // value will be populated with the request's response once the request completes
  3120. // successfully.
  3121. //
  3122. // Use "Send" method on the returned Request to send the API call to the service.
  3123. // the "output" return value is not valid until after Send returns without error.
  3124. //
  3125. // See DescribeTerminationPolicyTypes for more information on using the DescribeTerminationPolicyTypes
  3126. // API call, and error handling.
  3127. //
  3128. // This method is useful when you want to inject custom logic or configuration
  3129. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3130. //
  3131. //
  3132. // // Example sending a request using the DescribeTerminationPolicyTypesRequest method.
  3133. // req, resp := client.DescribeTerminationPolicyTypesRequest(params)
  3134. //
  3135. // err := req.Send()
  3136. // if err == nil { // resp is now filled
  3137. // fmt.Println(resp)
  3138. // }
  3139. //
  3140. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTerminationPolicyTypes
  3141. func (c *AutoScaling) DescribeTerminationPolicyTypesRequest(input *DescribeTerminationPolicyTypesInput) (req *request.Request, output *DescribeTerminationPolicyTypesOutput) {
  3142. op := &request.Operation{
  3143. Name: opDescribeTerminationPolicyTypes,
  3144. HTTPMethod: "POST",
  3145. HTTPPath: "/",
  3146. }
  3147. if input == nil {
  3148. input = &DescribeTerminationPolicyTypesInput{}
  3149. }
  3150. output = &DescribeTerminationPolicyTypesOutput{}
  3151. req = c.newRequest(op, input, output)
  3152. return
  3153. }
  3154. // DescribeTerminationPolicyTypes API operation for Auto Scaling.
  3155. //
  3156. // Describes the termination policies supported by Amazon EC2 Auto Scaling.
  3157. //
  3158. // For more information, see Controlling Which Auto Scaling Instances Terminate
  3159. // During Scale In (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html)
  3160. // in the Amazon EC2 Auto Scaling User Guide.
  3161. //
  3162. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3163. // with awserr.Error's Code and Message methods to get detailed information about
  3164. // the error.
  3165. //
  3166. // See the AWS API reference guide for Auto Scaling's
  3167. // API operation DescribeTerminationPolicyTypes for usage and error information.
  3168. //
  3169. // Returned Error Codes:
  3170. // * ErrCodeResourceContentionFault "ResourceContention"
  3171. // You already have a pending update to an Auto Scaling resource (for example,
  3172. // a group, instance, or load balancer).
  3173. //
  3174. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTerminationPolicyTypes
  3175. func (c *AutoScaling) DescribeTerminationPolicyTypes(input *DescribeTerminationPolicyTypesInput) (*DescribeTerminationPolicyTypesOutput, error) {
  3176. req, out := c.DescribeTerminationPolicyTypesRequest(input)
  3177. return out, req.Send()
  3178. }
  3179. // DescribeTerminationPolicyTypesWithContext is the same as DescribeTerminationPolicyTypes with the addition of
  3180. // the ability to pass a context and additional request options.
  3181. //
  3182. // See DescribeTerminationPolicyTypes for details on how to use this API operation.
  3183. //
  3184. // The context must be non-nil and will be used for request cancellation. If
  3185. // the context is nil a panic will occur. In the future the SDK may create
  3186. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3187. // for more information on using Contexts.
  3188. func (c *AutoScaling) DescribeTerminationPolicyTypesWithContext(ctx aws.Context, input *DescribeTerminationPolicyTypesInput, opts ...request.Option) (*DescribeTerminationPolicyTypesOutput, error) {
  3189. req, out := c.DescribeTerminationPolicyTypesRequest(input)
  3190. req.SetContext(ctx)
  3191. req.ApplyOptions(opts...)
  3192. return out, req.Send()
  3193. }
  3194. const opDetachInstances = "DetachInstances"
  3195. // DetachInstancesRequest generates a "aws/request.Request" representing the
  3196. // client's request for the DetachInstances operation. The "output" return
  3197. // value will be populated with the request's response once the request completes
  3198. // successfully.
  3199. //
  3200. // Use "Send" method on the returned Request to send the API call to the service.
  3201. // the "output" return value is not valid until after Send returns without error.
  3202. //
  3203. // See DetachInstances for more information on using the DetachInstances
  3204. // API call, and error handling.
  3205. //
  3206. // This method is useful when you want to inject custom logic or configuration
  3207. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3208. //
  3209. //
  3210. // // Example sending a request using the DetachInstancesRequest method.
  3211. // req, resp := client.DetachInstancesRequest(params)
  3212. //
  3213. // err := req.Send()
  3214. // if err == nil { // resp is now filled
  3215. // fmt.Println(resp)
  3216. // }
  3217. //
  3218. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachInstances
  3219. func (c *AutoScaling) DetachInstancesRequest(input *DetachInstancesInput) (req *request.Request, output *DetachInstancesOutput) {
  3220. op := &request.Operation{
  3221. Name: opDetachInstances,
  3222. HTTPMethod: "POST",
  3223. HTTPPath: "/",
  3224. }
  3225. if input == nil {
  3226. input = &DetachInstancesInput{}
  3227. }
  3228. output = &DetachInstancesOutput{}
  3229. req = c.newRequest(op, input, output)
  3230. return
  3231. }
  3232. // DetachInstances API operation for Auto Scaling.
  3233. //
  3234. // Removes one or more instances from the specified Auto Scaling group.
  3235. //
  3236. // After the instances are detached, you can manage them independent of the
  3237. // Auto Scaling group.
  3238. //
  3239. // If you do not specify the option to decrement the desired capacity, Amazon
  3240. // EC2 Auto Scaling launches instances to replace the ones that are detached.
  3241. //
  3242. // If there is a Classic Load Balancer attached to the Auto Scaling group, the
  3243. // instances are deregistered from the load balancer. If there are target groups
  3244. // attached to the Auto Scaling group, the instances are deregistered from the
  3245. // target groups.
  3246. //
  3247. // For more information, see Detach EC2 Instances from Your Auto Scaling Group
  3248. // (http://docs.aws.amazon.com/autoscaling/ec2/userguide/detach-instance-asg.html)
  3249. // in the Amazon EC2 Auto Scaling User Guide.
  3250. //
  3251. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3252. // with awserr.Error's Code and Message methods to get detailed information about
  3253. // the error.
  3254. //
  3255. // See the AWS API reference guide for Auto Scaling's
  3256. // API operation DetachInstances for usage and error information.
  3257. //
  3258. // Returned Error Codes:
  3259. // * ErrCodeResourceContentionFault "ResourceContention"
  3260. // You already have a pending update to an Auto Scaling resource (for example,
  3261. // a group, instance, or load balancer).
  3262. //
  3263. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachInstances
  3264. func (c *AutoScaling) DetachInstances(input *DetachInstancesInput) (*DetachInstancesOutput, error) {
  3265. req, out := c.DetachInstancesRequest(input)
  3266. return out, req.Send()
  3267. }
  3268. // DetachInstancesWithContext is the same as DetachInstances with the addition of
  3269. // the ability to pass a context and additional request options.
  3270. //
  3271. // See DetachInstances for details on how to use this API operation.
  3272. //
  3273. // The context must be non-nil and will be used for request cancellation. If
  3274. // the context is nil a panic will occur. In the future the SDK may create
  3275. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3276. // for more information on using Contexts.
  3277. func (c *AutoScaling) DetachInstancesWithContext(ctx aws.Context, input *DetachInstancesInput, opts ...request.Option) (*DetachInstancesOutput, error) {
  3278. req, out := c.DetachInstancesRequest(input)
  3279. req.SetContext(ctx)
  3280. req.ApplyOptions(opts...)
  3281. return out, req.Send()
  3282. }
  3283. const opDetachLoadBalancerTargetGroups = "DetachLoadBalancerTargetGroups"
  3284. // DetachLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the
  3285. // client's request for the DetachLoadBalancerTargetGroups operation. The "output" return
  3286. // value will be populated with the request's response once the request completes
  3287. // successfully.
  3288. //
  3289. // Use "Send" method on the returned Request to send the API call to the service.
  3290. // the "output" return value is not valid until after Send returns without error.
  3291. //
  3292. // See DetachLoadBalancerTargetGroups for more information on using the DetachLoadBalancerTargetGroups
  3293. // API call, and error handling.
  3294. //
  3295. // This method is useful when you want to inject custom logic or configuration
  3296. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3297. //
  3298. //
  3299. // // Example sending a request using the DetachLoadBalancerTargetGroupsRequest method.
  3300. // req, resp := client.DetachLoadBalancerTargetGroupsRequest(params)
  3301. //
  3302. // err := req.Send()
  3303. // if err == nil { // resp is now filled
  3304. // fmt.Println(resp)
  3305. // }
  3306. //
  3307. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachLoadBalancerTargetGroups
  3308. func (c *AutoScaling) DetachLoadBalancerTargetGroupsRequest(input *DetachLoadBalancerTargetGroupsInput) (req *request.Request, output *DetachLoadBalancerTargetGroupsOutput) {
  3309. op := &request.Operation{
  3310. Name: opDetachLoadBalancerTargetGroups,
  3311. HTTPMethod: "POST",
  3312. HTTPPath: "/",
  3313. }
  3314. if input == nil {
  3315. input = &DetachLoadBalancerTargetGroupsInput{}
  3316. }
  3317. output = &DetachLoadBalancerTargetGroupsOutput{}
  3318. req = c.newRequest(op, input, output)
  3319. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3320. return
  3321. }
  3322. // DetachLoadBalancerTargetGroups API operation for Auto Scaling.
  3323. //
  3324. // Detaches one or more target groups from the specified Auto Scaling group.
  3325. //
  3326. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3327. // with awserr.Error's Code and Message methods to get detailed information about
  3328. // the error.
  3329. //
  3330. // See the AWS API reference guide for Auto Scaling's
  3331. // API operation DetachLoadBalancerTargetGroups for usage and error information.
  3332. //
  3333. // Returned Error Codes:
  3334. // * ErrCodeResourceContentionFault "ResourceContention"
  3335. // You already have a pending update to an Auto Scaling resource (for example,
  3336. // a group, instance, or load balancer).
  3337. //
  3338. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachLoadBalancerTargetGroups
  3339. func (c *AutoScaling) DetachLoadBalancerTargetGroups(input *DetachLoadBalancerTargetGroupsInput) (*DetachLoadBalancerTargetGroupsOutput, error) {
  3340. req, out := c.DetachLoadBalancerTargetGroupsRequest(input)
  3341. return out, req.Send()
  3342. }
  3343. // DetachLoadBalancerTargetGroupsWithContext is the same as DetachLoadBalancerTargetGroups with the addition of
  3344. // the ability to pass a context and additional request options.
  3345. //
  3346. // See DetachLoadBalancerTargetGroups for details on how to use this API operation.
  3347. //
  3348. // The context must be non-nil and will be used for request cancellation. If
  3349. // the context is nil a panic will occur. In the future the SDK may create
  3350. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3351. // for more information on using Contexts.
  3352. func (c *AutoScaling) DetachLoadBalancerTargetGroupsWithContext(ctx aws.Context, input *DetachLoadBalancerTargetGroupsInput, opts ...request.Option) (*DetachLoadBalancerTargetGroupsOutput, error) {
  3353. req, out := c.DetachLoadBalancerTargetGroupsRequest(input)
  3354. req.SetContext(ctx)
  3355. req.ApplyOptions(opts...)
  3356. return out, req.Send()
  3357. }
  3358. const opDetachLoadBalancers = "DetachLoadBalancers"
  3359. // DetachLoadBalancersRequest generates a "aws/request.Request" representing the
  3360. // client's request for the DetachLoadBalancers operation. The "output" return
  3361. // value will be populated with the request's response once the request completes
  3362. // successfully.
  3363. //
  3364. // Use "Send" method on the returned Request to send the API call to the service.
  3365. // the "output" return value is not valid until after Send returns without error.
  3366. //
  3367. // See DetachLoadBalancers for more information on using the DetachLoadBalancers
  3368. // API call, and error handling.
  3369. //
  3370. // This method is useful when you want to inject custom logic or configuration
  3371. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3372. //
  3373. //
  3374. // // Example sending a request using the DetachLoadBalancersRequest method.
  3375. // req, resp := client.DetachLoadBalancersRequest(params)
  3376. //
  3377. // err := req.Send()
  3378. // if err == nil { // resp is now filled
  3379. // fmt.Println(resp)
  3380. // }
  3381. //
  3382. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachLoadBalancers
  3383. func (c *AutoScaling) DetachLoadBalancersRequest(input *DetachLoadBalancersInput) (req *request.Request, output *DetachLoadBalancersOutput) {
  3384. op := &request.Operation{
  3385. Name: opDetachLoadBalancers,
  3386. HTTPMethod: "POST",
  3387. HTTPPath: "/",
  3388. }
  3389. if input == nil {
  3390. input = &DetachLoadBalancersInput{}
  3391. }
  3392. output = &DetachLoadBalancersOutput{}
  3393. req = c.newRequest(op, input, output)
  3394. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3395. return
  3396. }
  3397. // DetachLoadBalancers API operation for Auto Scaling.
  3398. //
  3399. // Detaches one or more Classic Load Balancers from the specified Auto Scaling
  3400. // group.
  3401. //
  3402. // This operation detaches only Classic Load Balancers. If you have Application
  3403. // Load Balancers, use DetachLoadBalancerTargetGroups instead.
  3404. //
  3405. // When you detach a load balancer, it enters the Removing state while deregistering
  3406. // the instances in the group. When all instances are deregistered, then you
  3407. // can no longer describe the load balancer using DescribeLoadBalancers. The
  3408. // instances remain running.
  3409. //
  3410. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3411. // with awserr.Error's Code and Message methods to get detailed information about
  3412. // the error.
  3413. //
  3414. // See the AWS API reference guide for Auto Scaling's
  3415. // API operation DetachLoadBalancers for usage and error information.
  3416. //
  3417. // Returned Error Codes:
  3418. // * ErrCodeResourceContentionFault "ResourceContention"
  3419. // You already have a pending update to an Auto Scaling resource (for example,
  3420. // a group, instance, or load balancer).
  3421. //
  3422. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachLoadBalancers
  3423. func (c *AutoScaling) DetachLoadBalancers(input *DetachLoadBalancersInput) (*DetachLoadBalancersOutput, error) {
  3424. req, out := c.DetachLoadBalancersRequest(input)
  3425. return out, req.Send()
  3426. }
  3427. // DetachLoadBalancersWithContext is the same as DetachLoadBalancers with the addition of
  3428. // the ability to pass a context and additional request options.
  3429. //
  3430. // See DetachLoadBalancers for details on how to use this API operation.
  3431. //
  3432. // The context must be non-nil and will be used for request cancellation. If
  3433. // the context is nil a panic will occur. In the future the SDK may create
  3434. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3435. // for more information on using Contexts.
  3436. func (c *AutoScaling) DetachLoadBalancersWithContext(ctx aws.Context, input *DetachLoadBalancersInput, opts ...request.Option) (*DetachLoadBalancersOutput, error) {
  3437. req, out := c.DetachLoadBalancersRequest(input)
  3438. req.SetContext(ctx)
  3439. req.ApplyOptions(opts...)
  3440. return out, req.Send()
  3441. }
  3442. const opDisableMetricsCollection = "DisableMetricsCollection"
  3443. // DisableMetricsCollectionRequest generates a "aws/request.Request" representing the
  3444. // client's request for the DisableMetricsCollection operation. The "output" return
  3445. // value will be populated with the request's response once the request completes
  3446. // successfully.
  3447. //
  3448. // Use "Send" method on the returned Request to send the API call to the service.
  3449. // the "output" return value is not valid until after Send returns without error.
  3450. //
  3451. // See DisableMetricsCollection for more information on using the DisableMetricsCollection
  3452. // API call, and error handling.
  3453. //
  3454. // This method is useful when you want to inject custom logic or configuration
  3455. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3456. //
  3457. //
  3458. // // Example sending a request using the DisableMetricsCollectionRequest method.
  3459. // req, resp := client.DisableMetricsCollectionRequest(params)
  3460. //
  3461. // err := req.Send()
  3462. // if err == nil { // resp is now filled
  3463. // fmt.Println(resp)
  3464. // }
  3465. //
  3466. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DisableMetricsCollection
  3467. func (c *AutoScaling) DisableMetricsCollectionRequest(input *DisableMetricsCollectionInput) (req *request.Request, output *DisableMetricsCollectionOutput) {
  3468. op := &request.Operation{
  3469. Name: opDisableMetricsCollection,
  3470. HTTPMethod: "POST",
  3471. HTTPPath: "/",
  3472. }
  3473. if input == nil {
  3474. input = &DisableMetricsCollectionInput{}
  3475. }
  3476. output = &DisableMetricsCollectionOutput{}
  3477. req = c.newRequest(op, input, output)
  3478. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3479. return
  3480. }
  3481. // DisableMetricsCollection API operation for Auto Scaling.
  3482. //
  3483. // Disables group metrics for the specified Auto Scaling group.
  3484. //
  3485. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3486. // with awserr.Error's Code and Message methods to get detailed information about
  3487. // the error.
  3488. //
  3489. // See the AWS API reference guide for Auto Scaling's
  3490. // API operation DisableMetricsCollection for usage and error information.
  3491. //
  3492. // Returned Error Codes:
  3493. // * ErrCodeResourceContentionFault "ResourceContention"
  3494. // You already have a pending update to an Auto Scaling resource (for example,
  3495. // a group, instance, or load balancer).
  3496. //
  3497. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DisableMetricsCollection
  3498. func (c *AutoScaling) DisableMetricsCollection(input *DisableMetricsCollectionInput) (*DisableMetricsCollectionOutput, error) {
  3499. req, out := c.DisableMetricsCollectionRequest(input)
  3500. return out, req.Send()
  3501. }
  3502. // DisableMetricsCollectionWithContext is the same as DisableMetricsCollection with the addition of
  3503. // the ability to pass a context and additional request options.
  3504. //
  3505. // See DisableMetricsCollection for details on how to use this API operation.
  3506. //
  3507. // The context must be non-nil and will be used for request cancellation. If
  3508. // the context is nil a panic will occur. In the future the SDK may create
  3509. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3510. // for more information on using Contexts.
  3511. func (c *AutoScaling) DisableMetricsCollectionWithContext(ctx aws.Context, input *DisableMetricsCollectionInput, opts ...request.Option) (*DisableMetricsCollectionOutput, error) {
  3512. req, out := c.DisableMetricsCollectionRequest(input)
  3513. req.SetContext(ctx)
  3514. req.ApplyOptions(opts...)
  3515. return out, req.Send()
  3516. }
  3517. const opEnableMetricsCollection = "EnableMetricsCollection"
  3518. // EnableMetricsCollectionRequest generates a "aws/request.Request" representing the
  3519. // client's request for the EnableMetricsCollection operation. The "output" return
  3520. // value will be populated with the request's response once the request completes
  3521. // successfully.
  3522. //
  3523. // Use "Send" method on the returned Request to send the API call to the service.
  3524. // the "output" return value is not valid until after Send returns without error.
  3525. //
  3526. // See EnableMetricsCollection for more information on using the EnableMetricsCollection
  3527. // API call, and error handling.
  3528. //
  3529. // This method is useful when you want to inject custom logic or configuration
  3530. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3531. //
  3532. //
  3533. // // Example sending a request using the EnableMetricsCollectionRequest method.
  3534. // req, resp := client.EnableMetricsCollectionRequest(params)
  3535. //
  3536. // err := req.Send()
  3537. // if err == nil { // resp is now filled
  3538. // fmt.Println(resp)
  3539. // }
  3540. //
  3541. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/EnableMetricsCollection
  3542. func (c *AutoScaling) EnableMetricsCollectionRequest(input *EnableMetricsCollectionInput) (req *request.Request, output *EnableMetricsCollectionOutput) {
  3543. op := &request.Operation{
  3544. Name: opEnableMetricsCollection,
  3545. HTTPMethod: "POST",
  3546. HTTPPath: "/",
  3547. }
  3548. if input == nil {
  3549. input = &EnableMetricsCollectionInput{}
  3550. }
  3551. output = &EnableMetricsCollectionOutput{}
  3552. req = c.newRequest(op, input, output)
  3553. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3554. return
  3555. }
  3556. // EnableMetricsCollection API operation for Auto Scaling.
  3557. //
  3558. // Enables group metrics for the specified Auto Scaling group. For more information,
  3559. // see Monitoring Your Auto Scaling Groups and Instances (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-monitoring.html)
  3560. // in the Amazon EC2 Auto Scaling User Guide.
  3561. //
  3562. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3563. // with awserr.Error's Code and Message methods to get detailed information about
  3564. // the error.
  3565. //
  3566. // See the AWS API reference guide for Auto Scaling's
  3567. // API operation EnableMetricsCollection for usage and error information.
  3568. //
  3569. // Returned Error Codes:
  3570. // * ErrCodeResourceContentionFault "ResourceContention"
  3571. // You already have a pending update to an Auto Scaling resource (for example,
  3572. // a group, instance, or load balancer).
  3573. //
  3574. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/EnableMetricsCollection
  3575. func (c *AutoScaling) EnableMetricsCollection(input *EnableMetricsCollectionInput) (*EnableMetricsCollectionOutput, error) {
  3576. req, out := c.EnableMetricsCollectionRequest(input)
  3577. return out, req.Send()
  3578. }
  3579. // EnableMetricsCollectionWithContext is the same as EnableMetricsCollection with the addition of
  3580. // the ability to pass a context and additional request options.
  3581. //
  3582. // See EnableMetricsCollection for details on how to use this API operation.
  3583. //
  3584. // The context must be non-nil and will be used for request cancellation. If
  3585. // the context is nil a panic will occur. In the future the SDK may create
  3586. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3587. // for more information on using Contexts.
  3588. func (c *AutoScaling) EnableMetricsCollectionWithContext(ctx aws.Context, input *EnableMetricsCollectionInput, opts ...request.Option) (*EnableMetricsCollectionOutput, error) {
  3589. req, out := c.EnableMetricsCollectionRequest(input)
  3590. req.SetContext(ctx)
  3591. req.ApplyOptions(opts...)
  3592. return out, req.Send()
  3593. }
  3594. const opEnterStandby = "EnterStandby"
  3595. // EnterStandbyRequest generates a "aws/request.Request" representing the
  3596. // client's request for the EnterStandby operation. The "output" return
  3597. // value will be populated with the request's response once the request completes
  3598. // successfully.
  3599. //
  3600. // Use "Send" method on the returned Request to send the API call to the service.
  3601. // the "output" return value is not valid until after Send returns without error.
  3602. //
  3603. // See EnterStandby for more information on using the EnterStandby
  3604. // API call, and error handling.
  3605. //
  3606. // This method is useful when you want to inject custom logic or configuration
  3607. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3608. //
  3609. //
  3610. // // Example sending a request using the EnterStandbyRequest method.
  3611. // req, resp := client.EnterStandbyRequest(params)
  3612. //
  3613. // err := req.Send()
  3614. // if err == nil { // resp is now filled
  3615. // fmt.Println(resp)
  3616. // }
  3617. //
  3618. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/EnterStandby
  3619. func (c *AutoScaling) EnterStandbyRequest(input *EnterStandbyInput) (req *request.Request, output *EnterStandbyOutput) {
  3620. op := &request.Operation{
  3621. Name: opEnterStandby,
  3622. HTTPMethod: "POST",
  3623. HTTPPath: "/",
  3624. }
  3625. if input == nil {
  3626. input = &EnterStandbyInput{}
  3627. }
  3628. output = &EnterStandbyOutput{}
  3629. req = c.newRequest(op, input, output)
  3630. return
  3631. }
  3632. // EnterStandby API operation for Auto Scaling.
  3633. //
  3634. // Moves the specified instances into the standby state.
  3635. //
  3636. // For more information, see Temporarily Removing Instances from Your Auto Scaling
  3637. // Group (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enter-exit-standby.html)
  3638. // in the Amazon EC2 Auto Scaling User Guide.
  3639. //
  3640. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3641. // with awserr.Error's Code and Message methods to get detailed information about
  3642. // the error.
  3643. //
  3644. // See the AWS API reference guide for Auto Scaling's
  3645. // API operation EnterStandby for usage and error information.
  3646. //
  3647. // Returned Error Codes:
  3648. // * ErrCodeResourceContentionFault "ResourceContention"
  3649. // You already have a pending update to an Auto Scaling resource (for example,
  3650. // a group, instance, or load balancer).
  3651. //
  3652. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/EnterStandby
  3653. func (c *AutoScaling) EnterStandby(input *EnterStandbyInput) (*EnterStandbyOutput, error) {
  3654. req, out := c.EnterStandbyRequest(input)
  3655. return out, req.Send()
  3656. }
  3657. // EnterStandbyWithContext is the same as EnterStandby with the addition of
  3658. // the ability to pass a context and additional request options.
  3659. //
  3660. // See EnterStandby for details on how to use this API operation.
  3661. //
  3662. // The context must be non-nil and will be used for request cancellation. If
  3663. // the context is nil a panic will occur. In the future the SDK may create
  3664. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3665. // for more information on using Contexts.
  3666. func (c *AutoScaling) EnterStandbyWithContext(ctx aws.Context, input *EnterStandbyInput, opts ...request.Option) (*EnterStandbyOutput, error) {
  3667. req, out := c.EnterStandbyRequest(input)
  3668. req.SetContext(ctx)
  3669. req.ApplyOptions(opts...)
  3670. return out, req.Send()
  3671. }
  3672. const opExecutePolicy = "ExecutePolicy"
  3673. // ExecutePolicyRequest generates a "aws/request.Request" representing the
  3674. // client's request for the ExecutePolicy operation. The "output" return
  3675. // value will be populated with the request's response once the request completes
  3676. // successfully.
  3677. //
  3678. // Use "Send" method on the returned Request to send the API call to the service.
  3679. // the "output" return value is not valid until after Send returns without error.
  3680. //
  3681. // See ExecutePolicy for more information on using the ExecutePolicy
  3682. // API call, and error handling.
  3683. //
  3684. // This method is useful when you want to inject custom logic or configuration
  3685. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3686. //
  3687. //
  3688. // // Example sending a request using the ExecutePolicyRequest method.
  3689. // req, resp := client.ExecutePolicyRequest(params)
  3690. //
  3691. // err := req.Send()
  3692. // if err == nil { // resp is now filled
  3693. // fmt.Println(resp)
  3694. // }
  3695. //
  3696. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ExecutePolicy
  3697. func (c *AutoScaling) ExecutePolicyRequest(input *ExecutePolicyInput) (req *request.Request, output *ExecutePolicyOutput) {
  3698. op := &request.Operation{
  3699. Name: opExecutePolicy,
  3700. HTTPMethod: "POST",
  3701. HTTPPath: "/",
  3702. }
  3703. if input == nil {
  3704. input = &ExecutePolicyInput{}
  3705. }
  3706. output = &ExecutePolicyOutput{}
  3707. req = c.newRequest(op, input, output)
  3708. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3709. return
  3710. }
  3711. // ExecutePolicy API operation for Auto Scaling.
  3712. //
  3713. // Executes the specified policy.
  3714. //
  3715. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3716. // with awserr.Error's Code and Message methods to get detailed information about
  3717. // the error.
  3718. //
  3719. // See the AWS API reference guide for Auto Scaling's
  3720. // API operation ExecutePolicy for usage and error information.
  3721. //
  3722. // Returned Error Codes:
  3723. // * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress"
  3724. // The operation can't be performed because there are scaling activities in
  3725. // progress.
  3726. //
  3727. // * ErrCodeResourceContentionFault "ResourceContention"
  3728. // You already have a pending update to an Auto Scaling resource (for example,
  3729. // a group, instance, or load balancer).
  3730. //
  3731. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ExecutePolicy
  3732. func (c *AutoScaling) ExecutePolicy(input *ExecutePolicyInput) (*ExecutePolicyOutput, error) {
  3733. req, out := c.ExecutePolicyRequest(input)
  3734. return out, req.Send()
  3735. }
  3736. // ExecutePolicyWithContext is the same as ExecutePolicy with the addition of
  3737. // the ability to pass a context and additional request options.
  3738. //
  3739. // See ExecutePolicy for details on how to use this API operation.
  3740. //
  3741. // The context must be non-nil and will be used for request cancellation. If
  3742. // the context is nil a panic will occur. In the future the SDK may create
  3743. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3744. // for more information on using Contexts.
  3745. func (c *AutoScaling) ExecutePolicyWithContext(ctx aws.Context, input *ExecutePolicyInput, opts ...request.Option) (*ExecutePolicyOutput, error) {
  3746. req, out := c.ExecutePolicyRequest(input)
  3747. req.SetContext(ctx)
  3748. req.ApplyOptions(opts...)
  3749. return out, req.Send()
  3750. }
  3751. const opExitStandby = "ExitStandby"
  3752. // ExitStandbyRequest generates a "aws/request.Request" representing the
  3753. // client's request for the ExitStandby operation. The "output" return
  3754. // value will be populated with the request's response once the request completes
  3755. // successfully.
  3756. //
  3757. // Use "Send" method on the returned Request to send the API call to the service.
  3758. // the "output" return value is not valid until after Send returns without error.
  3759. //
  3760. // See ExitStandby for more information on using the ExitStandby
  3761. // API call, and error handling.
  3762. //
  3763. // This method is useful when you want to inject custom logic or configuration
  3764. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3765. //
  3766. //
  3767. // // Example sending a request using the ExitStandbyRequest method.
  3768. // req, resp := client.ExitStandbyRequest(params)
  3769. //
  3770. // err := req.Send()
  3771. // if err == nil { // resp is now filled
  3772. // fmt.Println(resp)
  3773. // }
  3774. //
  3775. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ExitStandby
  3776. func (c *AutoScaling) ExitStandbyRequest(input *ExitStandbyInput) (req *request.Request, output *ExitStandbyOutput) {
  3777. op := &request.Operation{
  3778. Name: opExitStandby,
  3779. HTTPMethod: "POST",
  3780. HTTPPath: "/",
  3781. }
  3782. if input == nil {
  3783. input = &ExitStandbyInput{}
  3784. }
  3785. output = &ExitStandbyOutput{}
  3786. req = c.newRequest(op, input, output)
  3787. return
  3788. }
  3789. // ExitStandby API operation for Auto Scaling.
  3790. //
  3791. // Moves the specified instances out of the standby state.
  3792. //
  3793. // For more information, see Temporarily Removing Instances from Your Auto Scaling
  3794. // Group (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enter-exit-standby.html)
  3795. // in the Amazon EC2 Auto Scaling User Guide.
  3796. //
  3797. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3798. // with awserr.Error's Code and Message methods to get detailed information about
  3799. // the error.
  3800. //
  3801. // See the AWS API reference guide for Auto Scaling's
  3802. // API operation ExitStandby for usage and error information.
  3803. //
  3804. // Returned Error Codes:
  3805. // * ErrCodeResourceContentionFault "ResourceContention"
  3806. // You already have a pending update to an Auto Scaling resource (for example,
  3807. // a group, instance, or load balancer).
  3808. //
  3809. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ExitStandby
  3810. func (c *AutoScaling) ExitStandby(input *ExitStandbyInput) (*ExitStandbyOutput, error) {
  3811. req, out := c.ExitStandbyRequest(input)
  3812. return out, req.Send()
  3813. }
  3814. // ExitStandbyWithContext is the same as ExitStandby with the addition of
  3815. // the ability to pass a context and additional request options.
  3816. //
  3817. // See ExitStandby for details on how to use this API operation.
  3818. //
  3819. // The context must be non-nil and will be used for request cancellation. If
  3820. // the context is nil a panic will occur. In the future the SDK may create
  3821. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3822. // for more information on using Contexts.
  3823. func (c *AutoScaling) ExitStandbyWithContext(ctx aws.Context, input *ExitStandbyInput, opts ...request.Option) (*ExitStandbyOutput, error) {
  3824. req, out := c.ExitStandbyRequest(input)
  3825. req.SetContext(ctx)
  3826. req.ApplyOptions(opts...)
  3827. return out, req.Send()
  3828. }
  3829. const opPutLifecycleHook = "PutLifecycleHook"
  3830. // PutLifecycleHookRequest generates a "aws/request.Request" representing the
  3831. // client's request for the PutLifecycleHook operation. The "output" return
  3832. // value will be populated with the request's response once the request completes
  3833. // successfully.
  3834. //
  3835. // Use "Send" method on the returned Request to send the API call to the service.
  3836. // the "output" return value is not valid until after Send returns without error.
  3837. //
  3838. // See PutLifecycleHook for more information on using the PutLifecycleHook
  3839. // API call, and error handling.
  3840. //
  3841. // This method is useful when you want to inject custom logic or configuration
  3842. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3843. //
  3844. //
  3845. // // Example sending a request using the PutLifecycleHookRequest method.
  3846. // req, resp := client.PutLifecycleHookRequest(params)
  3847. //
  3848. // err := req.Send()
  3849. // if err == nil { // resp is now filled
  3850. // fmt.Println(resp)
  3851. // }
  3852. //
  3853. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutLifecycleHook
  3854. func (c *AutoScaling) PutLifecycleHookRequest(input *PutLifecycleHookInput) (req *request.Request, output *PutLifecycleHookOutput) {
  3855. op := &request.Operation{
  3856. Name: opPutLifecycleHook,
  3857. HTTPMethod: "POST",
  3858. HTTPPath: "/",
  3859. }
  3860. if input == nil {
  3861. input = &PutLifecycleHookInput{}
  3862. }
  3863. output = &PutLifecycleHookOutput{}
  3864. req = c.newRequest(op, input, output)
  3865. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3866. return
  3867. }
  3868. // PutLifecycleHook API operation for Auto Scaling.
  3869. //
  3870. // Creates or updates a lifecycle hook for the specified Auto Scaling group.
  3871. //
  3872. // A lifecycle hook tells Amazon EC2 Auto Scaling to perform an action on an
  3873. // instance that is not actively in service; for example, either when the instance
  3874. // launches or before the instance terminates.
  3875. //
  3876. // This step is a part of the procedure for adding a lifecycle hook to an Auto
  3877. // Scaling group:
  3878. //
  3879. // (Optional) Create a Lambda function and a rule that allows CloudWatch Events
  3880. // to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates
  3881. // instances.
  3882. //
  3883. // (Optional) Create a notification target and an IAM role. The target can be
  3884. // either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon
  3885. // EC2 Auto Scaling to publish lifecycle notifications to the target.
  3886. //
  3887. // Create the lifecycle hook. Specify whether the hook is used when the instances
  3888. // launch or terminate.
  3889. //
  3890. // If you need more time, record the lifecycle action heartbeat to keep the
  3891. // instance in a pending state.
  3892. //
  3893. // If you finish before the timeout period ends, complete the lifecycle action.
  3894. //
  3895. // For more information, see Auto Scaling Lifecycle Hooks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html)
  3896. // in the Amazon EC2 Auto Scaling User Guide.
  3897. //
  3898. // If you exceed your maximum limit of lifecycle hooks, which by default is
  3899. // 50 per Auto Scaling group, the call fails. For information about updating
  3900. // this limit, see AWS Service Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html)
  3901. // in the Amazon Web Services General Reference.
  3902. //
  3903. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3904. // with awserr.Error's Code and Message methods to get detailed information about
  3905. // the error.
  3906. //
  3907. // See the AWS API reference guide for Auto Scaling's
  3908. // API operation PutLifecycleHook for usage and error information.
  3909. //
  3910. // Returned Error Codes:
  3911. // * ErrCodeLimitExceededFault "LimitExceeded"
  3912. // You have already reached a limit for your Auto Scaling resources (for example,
  3913. // groups, launch configurations, or lifecycle hooks). For more information,
  3914. // see DescribeAccountLimits.
  3915. //
  3916. // * ErrCodeResourceContentionFault "ResourceContention"
  3917. // You already have a pending update to an Auto Scaling resource (for example,
  3918. // a group, instance, or load balancer).
  3919. //
  3920. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutLifecycleHook
  3921. func (c *AutoScaling) PutLifecycleHook(input *PutLifecycleHookInput) (*PutLifecycleHookOutput, error) {
  3922. req, out := c.PutLifecycleHookRequest(input)
  3923. return out, req.Send()
  3924. }
  3925. // PutLifecycleHookWithContext is the same as PutLifecycleHook with the addition of
  3926. // the ability to pass a context and additional request options.
  3927. //
  3928. // See PutLifecycleHook for details on how to use this API operation.
  3929. //
  3930. // The context must be non-nil and will be used for request cancellation. If
  3931. // the context is nil a panic will occur. In the future the SDK may create
  3932. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3933. // for more information on using Contexts.
  3934. func (c *AutoScaling) PutLifecycleHookWithContext(ctx aws.Context, input *PutLifecycleHookInput, opts ...request.Option) (*PutLifecycleHookOutput, error) {
  3935. req, out := c.PutLifecycleHookRequest(input)
  3936. req.SetContext(ctx)
  3937. req.ApplyOptions(opts...)
  3938. return out, req.Send()
  3939. }
  3940. const opPutNotificationConfiguration = "PutNotificationConfiguration"
  3941. // PutNotificationConfigurationRequest generates a "aws/request.Request" representing the
  3942. // client's request for the PutNotificationConfiguration operation. The "output" return
  3943. // value will be populated with the request's response once the request completes
  3944. // successfully.
  3945. //
  3946. // Use "Send" method on the returned Request to send the API call to the service.
  3947. // the "output" return value is not valid until after Send returns without error.
  3948. //
  3949. // See PutNotificationConfiguration for more information on using the PutNotificationConfiguration
  3950. // API call, and error handling.
  3951. //
  3952. // This method is useful when you want to inject custom logic or configuration
  3953. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3954. //
  3955. //
  3956. // // Example sending a request using the PutNotificationConfigurationRequest method.
  3957. // req, resp := client.PutNotificationConfigurationRequest(params)
  3958. //
  3959. // err := req.Send()
  3960. // if err == nil { // resp is now filled
  3961. // fmt.Println(resp)
  3962. // }
  3963. //
  3964. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutNotificationConfiguration
  3965. func (c *AutoScaling) PutNotificationConfigurationRequest(input *PutNotificationConfigurationInput) (req *request.Request, output *PutNotificationConfigurationOutput) {
  3966. op := &request.Operation{
  3967. Name: opPutNotificationConfiguration,
  3968. HTTPMethod: "POST",
  3969. HTTPPath: "/",
  3970. }
  3971. if input == nil {
  3972. input = &PutNotificationConfigurationInput{}
  3973. }
  3974. output = &PutNotificationConfigurationOutput{}
  3975. req = c.newRequest(op, input, output)
  3976. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3977. return
  3978. }
  3979. // PutNotificationConfiguration API operation for Auto Scaling.
  3980. //
  3981. // Configures an Auto Scaling group to send notifications when specified events
  3982. // take place. Subscribers to the specified topic can have messages delivered
  3983. // to an endpoint such as a web server or an email address.
  3984. //
  3985. // This configuration overwrites any existing configuration.
  3986. //
  3987. // For more information, see Getting SNS Notifications When Your Auto Scaling
  3988. // Group Scales (http://docs.aws.amazon.com/autoscaling/ec2/userguide/ASGettingNotifications.html)
  3989. // in the Auto Scaling User Guide.
  3990. //
  3991. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3992. // with awserr.Error's Code and Message methods to get detailed information about
  3993. // the error.
  3994. //
  3995. // See the AWS API reference guide for Auto Scaling's
  3996. // API operation PutNotificationConfiguration for usage and error information.
  3997. //
  3998. // Returned Error Codes:
  3999. // * ErrCodeLimitExceededFault "LimitExceeded"
  4000. // You have already reached a limit for your Auto Scaling resources (for example,
  4001. // groups, launch configurations, or lifecycle hooks). For more information,
  4002. // see DescribeAccountLimits.
  4003. //
  4004. // * ErrCodeResourceContentionFault "ResourceContention"
  4005. // You already have a pending update to an Auto Scaling resource (for example,
  4006. // a group, instance, or load balancer).
  4007. //
  4008. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  4009. // The service-linked role is not yet ready for use.
  4010. //
  4011. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutNotificationConfiguration
  4012. func (c *AutoScaling) PutNotificationConfiguration(input *PutNotificationConfigurationInput) (*PutNotificationConfigurationOutput, error) {
  4013. req, out := c.PutNotificationConfigurationRequest(input)
  4014. return out, req.Send()
  4015. }
  4016. // PutNotificationConfigurationWithContext is the same as PutNotificationConfiguration with the addition of
  4017. // the ability to pass a context and additional request options.
  4018. //
  4019. // See PutNotificationConfiguration for details on how to use this API operation.
  4020. //
  4021. // The context must be non-nil and will be used for request cancellation. If
  4022. // the context is nil a panic will occur. In the future the SDK may create
  4023. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4024. // for more information on using Contexts.
  4025. func (c *AutoScaling) PutNotificationConfigurationWithContext(ctx aws.Context, input *PutNotificationConfigurationInput, opts ...request.Option) (*PutNotificationConfigurationOutput, error) {
  4026. req, out := c.PutNotificationConfigurationRequest(input)
  4027. req.SetContext(ctx)
  4028. req.ApplyOptions(opts...)
  4029. return out, req.Send()
  4030. }
  4031. const opPutScalingPolicy = "PutScalingPolicy"
  4032. // PutScalingPolicyRequest generates a "aws/request.Request" representing the
  4033. // client's request for the PutScalingPolicy operation. The "output" return
  4034. // value will be populated with the request's response once the request completes
  4035. // successfully.
  4036. //
  4037. // Use "Send" method on the returned Request to send the API call to the service.
  4038. // the "output" return value is not valid until after Send returns without error.
  4039. //
  4040. // See PutScalingPolicy for more information on using the PutScalingPolicy
  4041. // API call, and error handling.
  4042. //
  4043. // This method is useful when you want to inject custom logic or configuration
  4044. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4045. //
  4046. //
  4047. // // Example sending a request using the PutScalingPolicyRequest method.
  4048. // req, resp := client.PutScalingPolicyRequest(params)
  4049. //
  4050. // err := req.Send()
  4051. // if err == nil { // resp is now filled
  4052. // fmt.Println(resp)
  4053. // }
  4054. //
  4055. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutScalingPolicy
  4056. func (c *AutoScaling) PutScalingPolicyRequest(input *PutScalingPolicyInput) (req *request.Request, output *PutScalingPolicyOutput) {
  4057. op := &request.Operation{
  4058. Name: opPutScalingPolicy,
  4059. HTTPMethod: "POST",
  4060. HTTPPath: "/",
  4061. }
  4062. if input == nil {
  4063. input = &PutScalingPolicyInput{}
  4064. }
  4065. output = &PutScalingPolicyOutput{}
  4066. req = c.newRequest(op, input, output)
  4067. return
  4068. }
  4069. // PutScalingPolicy API operation for Auto Scaling.
  4070. //
  4071. // Creates or updates a policy for an Auto Scaling group. To update an existing
  4072. // policy, use the existing policy name and set the parameters to change. Any
  4073. // existing parameter not changed in an update to an existing policy is not
  4074. // changed in this update request.
  4075. //
  4076. // If you exceed your maximum limit of step adjustments, which by default is
  4077. // 20 per region, the call fails. For information about updating this limit,
  4078. // see AWS Service Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html)
  4079. // in the Amazon Web Services General Reference.
  4080. //
  4081. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4082. // with awserr.Error's Code and Message methods to get detailed information about
  4083. // the error.
  4084. //
  4085. // See the AWS API reference guide for Auto Scaling's
  4086. // API operation PutScalingPolicy for usage and error information.
  4087. //
  4088. // Returned Error Codes:
  4089. // * ErrCodeLimitExceededFault "LimitExceeded"
  4090. // You have already reached a limit for your Auto Scaling resources (for example,
  4091. // groups, launch configurations, or lifecycle hooks). For more information,
  4092. // see DescribeAccountLimits.
  4093. //
  4094. // * ErrCodeResourceContentionFault "ResourceContention"
  4095. // You already have a pending update to an Auto Scaling resource (for example,
  4096. // a group, instance, or load balancer).
  4097. //
  4098. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  4099. // The service-linked role is not yet ready for use.
  4100. //
  4101. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutScalingPolicy
  4102. func (c *AutoScaling) PutScalingPolicy(input *PutScalingPolicyInput) (*PutScalingPolicyOutput, error) {
  4103. req, out := c.PutScalingPolicyRequest(input)
  4104. return out, req.Send()
  4105. }
  4106. // PutScalingPolicyWithContext is the same as PutScalingPolicy with the addition of
  4107. // the ability to pass a context and additional request options.
  4108. //
  4109. // See PutScalingPolicy for details on how to use this API operation.
  4110. //
  4111. // The context must be non-nil and will be used for request cancellation. If
  4112. // the context is nil a panic will occur. In the future the SDK may create
  4113. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4114. // for more information on using Contexts.
  4115. func (c *AutoScaling) PutScalingPolicyWithContext(ctx aws.Context, input *PutScalingPolicyInput, opts ...request.Option) (*PutScalingPolicyOutput, error) {
  4116. req, out := c.PutScalingPolicyRequest(input)
  4117. req.SetContext(ctx)
  4118. req.ApplyOptions(opts...)
  4119. return out, req.Send()
  4120. }
  4121. const opPutScheduledUpdateGroupAction = "PutScheduledUpdateGroupAction"
  4122. // PutScheduledUpdateGroupActionRequest generates a "aws/request.Request" representing the
  4123. // client's request for the PutScheduledUpdateGroupAction operation. The "output" return
  4124. // value will be populated with the request's response once the request completes
  4125. // successfully.
  4126. //
  4127. // Use "Send" method on the returned Request to send the API call to the service.
  4128. // the "output" return value is not valid until after Send returns without error.
  4129. //
  4130. // See PutScheduledUpdateGroupAction for more information on using the PutScheduledUpdateGroupAction
  4131. // API call, and error handling.
  4132. //
  4133. // This method is useful when you want to inject custom logic or configuration
  4134. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4135. //
  4136. //
  4137. // // Example sending a request using the PutScheduledUpdateGroupActionRequest method.
  4138. // req, resp := client.PutScheduledUpdateGroupActionRequest(params)
  4139. //
  4140. // err := req.Send()
  4141. // if err == nil { // resp is now filled
  4142. // fmt.Println(resp)
  4143. // }
  4144. //
  4145. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutScheduledUpdateGroupAction
  4146. func (c *AutoScaling) PutScheduledUpdateGroupActionRequest(input *PutScheduledUpdateGroupActionInput) (req *request.Request, output *PutScheduledUpdateGroupActionOutput) {
  4147. op := &request.Operation{
  4148. Name: opPutScheduledUpdateGroupAction,
  4149. HTTPMethod: "POST",
  4150. HTTPPath: "/",
  4151. }
  4152. if input == nil {
  4153. input = &PutScheduledUpdateGroupActionInput{}
  4154. }
  4155. output = &PutScheduledUpdateGroupActionOutput{}
  4156. req = c.newRequest(op, input, output)
  4157. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4158. return
  4159. }
  4160. // PutScheduledUpdateGroupAction API operation for Auto Scaling.
  4161. //
  4162. // Creates or updates a scheduled scaling action for an Auto Scaling group.
  4163. // If you leave a parameter unspecified when updating a scheduled scaling action,
  4164. // the corresponding value remains unchanged.
  4165. //
  4166. // For more information, see Scheduled Scaling (http://docs.aws.amazon.com/autoscaling/ec2/userguide/schedule_time.html)
  4167. // in the Amazon EC2 Auto Scaling User Guide.
  4168. //
  4169. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4170. // with awserr.Error's Code and Message methods to get detailed information about
  4171. // the error.
  4172. //
  4173. // See the AWS API reference guide for Auto Scaling's
  4174. // API operation PutScheduledUpdateGroupAction for usage and error information.
  4175. //
  4176. // Returned Error Codes:
  4177. // * ErrCodeAlreadyExistsFault "AlreadyExists"
  4178. // You already have an Auto Scaling group or launch configuration with this
  4179. // name.
  4180. //
  4181. // * ErrCodeLimitExceededFault "LimitExceeded"
  4182. // You have already reached a limit for your Auto Scaling resources (for example,
  4183. // groups, launch configurations, or lifecycle hooks). For more information,
  4184. // see DescribeAccountLimits.
  4185. //
  4186. // * ErrCodeResourceContentionFault "ResourceContention"
  4187. // You already have a pending update to an Auto Scaling resource (for example,
  4188. // a group, instance, or load balancer).
  4189. //
  4190. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutScheduledUpdateGroupAction
  4191. func (c *AutoScaling) PutScheduledUpdateGroupAction(input *PutScheduledUpdateGroupActionInput) (*PutScheduledUpdateGroupActionOutput, error) {
  4192. req, out := c.PutScheduledUpdateGroupActionRequest(input)
  4193. return out, req.Send()
  4194. }
  4195. // PutScheduledUpdateGroupActionWithContext is the same as PutScheduledUpdateGroupAction with the addition of
  4196. // the ability to pass a context and additional request options.
  4197. //
  4198. // See PutScheduledUpdateGroupAction for details on how to use this API operation.
  4199. //
  4200. // The context must be non-nil and will be used for request cancellation. If
  4201. // the context is nil a panic will occur. In the future the SDK may create
  4202. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4203. // for more information on using Contexts.
  4204. func (c *AutoScaling) PutScheduledUpdateGroupActionWithContext(ctx aws.Context, input *PutScheduledUpdateGroupActionInput, opts ...request.Option) (*PutScheduledUpdateGroupActionOutput, error) {
  4205. req, out := c.PutScheduledUpdateGroupActionRequest(input)
  4206. req.SetContext(ctx)
  4207. req.ApplyOptions(opts...)
  4208. return out, req.Send()
  4209. }
  4210. const opRecordLifecycleActionHeartbeat = "RecordLifecycleActionHeartbeat"
  4211. // RecordLifecycleActionHeartbeatRequest generates a "aws/request.Request" representing the
  4212. // client's request for the RecordLifecycleActionHeartbeat operation. The "output" return
  4213. // value will be populated with the request's response once the request completes
  4214. // successfully.
  4215. //
  4216. // Use "Send" method on the returned Request to send the API call to the service.
  4217. // the "output" return value is not valid until after Send returns without error.
  4218. //
  4219. // See RecordLifecycleActionHeartbeat for more information on using the RecordLifecycleActionHeartbeat
  4220. // API call, and error handling.
  4221. //
  4222. // This method is useful when you want to inject custom logic or configuration
  4223. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4224. //
  4225. //
  4226. // // Example sending a request using the RecordLifecycleActionHeartbeatRequest method.
  4227. // req, resp := client.RecordLifecycleActionHeartbeatRequest(params)
  4228. //
  4229. // err := req.Send()
  4230. // if err == nil { // resp is now filled
  4231. // fmt.Println(resp)
  4232. // }
  4233. //
  4234. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/RecordLifecycleActionHeartbeat
  4235. func (c *AutoScaling) RecordLifecycleActionHeartbeatRequest(input *RecordLifecycleActionHeartbeatInput) (req *request.Request, output *RecordLifecycleActionHeartbeatOutput) {
  4236. op := &request.Operation{
  4237. Name: opRecordLifecycleActionHeartbeat,
  4238. HTTPMethod: "POST",
  4239. HTTPPath: "/",
  4240. }
  4241. if input == nil {
  4242. input = &RecordLifecycleActionHeartbeatInput{}
  4243. }
  4244. output = &RecordLifecycleActionHeartbeatOutput{}
  4245. req = c.newRequest(op, input, output)
  4246. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4247. return
  4248. }
  4249. // RecordLifecycleActionHeartbeat API operation for Auto Scaling.
  4250. //
  4251. // Records a heartbeat for the lifecycle action associated with the specified
  4252. // token or instance. This extends the timeout by the length of time defined
  4253. // using PutLifecycleHook.
  4254. //
  4255. // This step is a part of the procedure for adding a lifecycle hook to an Auto
  4256. // Scaling group:
  4257. //
  4258. // (Optional) Create a Lambda function and a rule that allows CloudWatch Events
  4259. // to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates
  4260. // instances.
  4261. //
  4262. // (Optional) Create a notification target and an IAM role. The target can be
  4263. // either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon
  4264. // EC2 Auto Scaling to publish lifecycle notifications to the target.
  4265. //
  4266. // Create the lifecycle hook. Specify whether the hook is used when the instances
  4267. // launch or terminate.
  4268. //
  4269. // If you need more time, record the lifecycle action heartbeat to keep the
  4270. // instance in a pending state.
  4271. //
  4272. // If you finish before the timeout period ends, complete the lifecycle action.
  4273. //
  4274. // For more information, see Auto Scaling Lifecycle (http://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html)
  4275. // in the Amazon EC2 Auto Scaling User Guide.
  4276. //
  4277. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4278. // with awserr.Error's Code and Message methods to get detailed information about
  4279. // the error.
  4280. //
  4281. // See the AWS API reference guide for Auto Scaling's
  4282. // API operation RecordLifecycleActionHeartbeat for usage and error information.
  4283. //
  4284. // Returned Error Codes:
  4285. // * ErrCodeResourceContentionFault "ResourceContention"
  4286. // You already have a pending update to an Auto Scaling resource (for example,
  4287. // a group, instance, or load balancer).
  4288. //
  4289. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/RecordLifecycleActionHeartbeat
  4290. func (c *AutoScaling) RecordLifecycleActionHeartbeat(input *RecordLifecycleActionHeartbeatInput) (*RecordLifecycleActionHeartbeatOutput, error) {
  4291. req, out := c.RecordLifecycleActionHeartbeatRequest(input)
  4292. return out, req.Send()
  4293. }
  4294. // RecordLifecycleActionHeartbeatWithContext is the same as RecordLifecycleActionHeartbeat with the addition of
  4295. // the ability to pass a context and additional request options.
  4296. //
  4297. // See RecordLifecycleActionHeartbeat for details on how to use this API operation.
  4298. //
  4299. // The context must be non-nil and will be used for request cancellation. If
  4300. // the context is nil a panic will occur. In the future the SDK may create
  4301. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4302. // for more information on using Contexts.
  4303. func (c *AutoScaling) RecordLifecycleActionHeartbeatWithContext(ctx aws.Context, input *RecordLifecycleActionHeartbeatInput, opts ...request.Option) (*RecordLifecycleActionHeartbeatOutput, error) {
  4304. req, out := c.RecordLifecycleActionHeartbeatRequest(input)
  4305. req.SetContext(ctx)
  4306. req.ApplyOptions(opts...)
  4307. return out, req.Send()
  4308. }
  4309. const opResumeProcesses = "ResumeProcesses"
  4310. // ResumeProcessesRequest generates a "aws/request.Request" representing the
  4311. // client's request for the ResumeProcesses operation. The "output" return
  4312. // value will be populated with the request's response once the request completes
  4313. // successfully.
  4314. //
  4315. // Use "Send" method on the returned Request to send the API call to the service.
  4316. // the "output" return value is not valid until after Send returns without error.
  4317. //
  4318. // See ResumeProcesses for more information on using the ResumeProcesses
  4319. // API call, and error handling.
  4320. //
  4321. // This method is useful when you want to inject custom logic or configuration
  4322. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4323. //
  4324. //
  4325. // // Example sending a request using the ResumeProcessesRequest method.
  4326. // req, resp := client.ResumeProcessesRequest(params)
  4327. //
  4328. // err := req.Send()
  4329. // if err == nil { // resp is now filled
  4330. // fmt.Println(resp)
  4331. // }
  4332. //
  4333. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ResumeProcesses
  4334. func (c *AutoScaling) ResumeProcessesRequest(input *ScalingProcessQuery) (req *request.Request, output *ResumeProcessesOutput) {
  4335. op := &request.Operation{
  4336. Name: opResumeProcesses,
  4337. HTTPMethod: "POST",
  4338. HTTPPath: "/",
  4339. }
  4340. if input == nil {
  4341. input = &ScalingProcessQuery{}
  4342. }
  4343. output = &ResumeProcessesOutput{}
  4344. req = c.newRequest(op, input, output)
  4345. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4346. return
  4347. }
  4348. // ResumeProcesses API operation for Auto Scaling.
  4349. //
  4350. // Resumes the specified suspended automatic scaling processes, or all suspended
  4351. // process, for the specified Auto Scaling group.
  4352. //
  4353. // For more information, see Suspending and Resuming Scaling Processes (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html)
  4354. // in the Amazon EC2 Auto Scaling User Guide.
  4355. //
  4356. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4357. // with awserr.Error's Code and Message methods to get detailed information about
  4358. // the error.
  4359. //
  4360. // See the AWS API reference guide for Auto Scaling's
  4361. // API operation ResumeProcesses for usage and error information.
  4362. //
  4363. // Returned Error Codes:
  4364. // * ErrCodeResourceInUseFault "ResourceInUse"
  4365. // The operation can't be performed because the resource is in use.
  4366. //
  4367. // * ErrCodeResourceContentionFault "ResourceContention"
  4368. // You already have a pending update to an Auto Scaling resource (for example,
  4369. // a group, instance, or load balancer).
  4370. //
  4371. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ResumeProcesses
  4372. func (c *AutoScaling) ResumeProcesses(input *ScalingProcessQuery) (*ResumeProcessesOutput, error) {
  4373. req, out := c.ResumeProcessesRequest(input)
  4374. return out, req.Send()
  4375. }
  4376. // ResumeProcessesWithContext is the same as ResumeProcesses with the addition of
  4377. // the ability to pass a context and additional request options.
  4378. //
  4379. // See ResumeProcesses for details on how to use this API operation.
  4380. //
  4381. // The context must be non-nil and will be used for request cancellation. If
  4382. // the context is nil a panic will occur. In the future the SDK may create
  4383. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4384. // for more information on using Contexts.
  4385. func (c *AutoScaling) ResumeProcessesWithContext(ctx aws.Context, input *ScalingProcessQuery, opts ...request.Option) (*ResumeProcessesOutput, error) {
  4386. req, out := c.ResumeProcessesRequest(input)
  4387. req.SetContext(ctx)
  4388. req.ApplyOptions(opts...)
  4389. return out, req.Send()
  4390. }
  4391. const opSetDesiredCapacity = "SetDesiredCapacity"
  4392. // SetDesiredCapacityRequest generates a "aws/request.Request" representing the
  4393. // client's request for the SetDesiredCapacity operation. The "output" return
  4394. // value will be populated with the request's response once the request completes
  4395. // successfully.
  4396. //
  4397. // Use "Send" method on the returned Request to send the API call to the service.
  4398. // the "output" return value is not valid until after Send returns without error.
  4399. //
  4400. // See SetDesiredCapacity for more information on using the SetDesiredCapacity
  4401. // API call, and error handling.
  4402. //
  4403. // This method is useful when you want to inject custom logic or configuration
  4404. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4405. //
  4406. //
  4407. // // Example sending a request using the SetDesiredCapacityRequest method.
  4408. // req, resp := client.SetDesiredCapacityRequest(params)
  4409. //
  4410. // err := req.Send()
  4411. // if err == nil { // resp is now filled
  4412. // fmt.Println(resp)
  4413. // }
  4414. //
  4415. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetDesiredCapacity
  4416. func (c *AutoScaling) SetDesiredCapacityRequest(input *SetDesiredCapacityInput) (req *request.Request, output *SetDesiredCapacityOutput) {
  4417. op := &request.Operation{
  4418. Name: opSetDesiredCapacity,
  4419. HTTPMethod: "POST",
  4420. HTTPPath: "/",
  4421. }
  4422. if input == nil {
  4423. input = &SetDesiredCapacityInput{}
  4424. }
  4425. output = &SetDesiredCapacityOutput{}
  4426. req = c.newRequest(op, input, output)
  4427. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4428. return
  4429. }
  4430. // SetDesiredCapacity API operation for Auto Scaling.
  4431. //
  4432. // Sets the size of the specified Auto Scaling group.
  4433. //
  4434. // For more information about desired capacity, see What Is Amazon EC2 Auto
  4435. // Scaling? (http://docs.aws.amazon.com/autoscaling/ec2/userguide/WhatIsAutoScaling.html)
  4436. // in the Amazon EC2 Auto Scaling User Guide.
  4437. //
  4438. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4439. // with awserr.Error's Code and Message methods to get detailed information about
  4440. // the error.
  4441. //
  4442. // See the AWS API reference guide for Auto Scaling's
  4443. // API operation SetDesiredCapacity for usage and error information.
  4444. //
  4445. // Returned Error Codes:
  4446. // * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress"
  4447. // The operation can't be performed because there are scaling activities in
  4448. // progress.
  4449. //
  4450. // * ErrCodeResourceContentionFault "ResourceContention"
  4451. // You already have a pending update to an Auto Scaling resource (for example,
  4452. // a group, instance, or load balancer).
  4453. //
  4454. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetDesiredCapacity
  4455. func (c *AutoScaling) SetDesiredCapacity(input *SetDesiredCapacityInput) (*SetDesiredCapacityOutput, error) {
  4456. req, out := c.SetDesiredCapacityRequest(input)
  4457. return out, req.Send()
  4458. }
  4459. // SetDesiredCapacityWithContext is the same as SetDesiredCapacity with the addition of
  4460. // the ability to pass a context and additional request options.
  4461. //
  4462. // See SetDesiredCapacity for details on how to use this API operation.
  4463. //
  4464. // The context must be non-nil and will be used for request cancellation. If
  4465. // the context is nil a panic will occur. In the future the SDK may create
  4466. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4467. // for more information on using Contexts.
  4468. func (c *AutoScaling) SetDesiredCapacityWithContext(ctx aws.Context, input *SetDesiredCapacityInput, opts ...request.Option) (*SetDesiredCapacityOutput, error) {
  4469. req, out := c.SetDesiredCapacityRequest(input)
  4470. req.SetContext(ctx)
  4471. req.ApplyOptions(opts...)
  4472. return out, req.Send()
  4473. }
  4474. const opSetInstanceHealth = "SetInstanceHealth"
  4475. // SetInstanceHealthRequest generates a "aws/request.Request" representing the
  4476. // client's request for the SetInstanceHealth operation. The "output" return
  4477. // value will be populated with the request's response once the request completes
  4478. // successfully.
  4479. //
  4480. // Use "Send" method on the returned Request to send the API call to the service.
  4481. // the "output" return value is not valid until after Send returns without error.
  4482. //
  4483. // See SetInstanceHealth for more information on using the SetInstanceHealth
  4484. // API call, and error handling.
  4485. //
  4486. // This method is useful when you want to inject custom logic or configuration
  4487. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4488. //
  4489. //
  4490. // // Example sending a request using the SetInstanceHealthRequest method.
  4491. // req, resp := client.SetInstanceHealthRequest(params)
  4492. //
  4493. // err := req.Send()
  4494. // if err == nil { // resp is now filled
  4495. // fmt.Println(resp)
  4496. // }
  4497. //
  4498. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetInstanceHealth
  4499. func (c *AutoScaling) SetInstanceHealthRequest(input *SetInstanceHealthInput) (req *request.Request, output *SetInstanceHealthOutput) {
  4500. op := &request.Operation{
  4501. Name: opSetInstanceHealth,
  4502. HTTPMethod: "POST",
  4503. HTTPPath: "/",
  4504. }
  4505. if input == nil {
  4506. input = &SetInstanceHealthInput{}
  4507. }
  4508. output = &SetInstanceHealthOutput{}
  4509. req = c.newRequest(op, input, output)
  4510. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4511. return
  4512. }
  4513. // SetInstanceHealth API operation for Auto Scaling.
  4514. //
  4515. // Sets the health status of the specified instance.
  4516. //
  4517. // For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html)
  4518. // in the Amazon EC2 Auto Scaling User Guide.
  4519. //
  4520. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4521. // with awserr.Error's Code and Message methods to get detailed information about
  4522. // the error.
  4523. //
  4524. // See the AWS API reference guide for Auto Scaling's
  4525. // API operation SetInstanceHealth for usage and error information.
  4526. //
  4527. // Returned Error Codes:
  4528. // * ErrCodeResourceContentionFault "ResourceContention"
  4529. // You already have a pending update to an Auto Scaling resource (for example,
  4530. // a group, instance, or load balancer).
  4531. //
  4532. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetInstanceHealth
  4533. func (c *AutoScaling) SetInstanceHealth(input *SetInstanceHealthInput) (*SetInstanceHealthOutput, error) {
  4534. req, out := c.SetInstanceHealthRequest(input)
  4535. return out, req.Send()
  4536. }
  4537. // SetInstanceHealthWithContext is the same as SetInstanceHealth with the addition of
  4538. // the ability to pass a context and additional request options.
  4539. //
  4540. // See SetInstanceHealth for details on how to use this API operation.
  4541. //
  4542. // The context must be non-nil and will be used for request cancellation. If
  4543. // the context is nil a panic will occur. In the future the SDK may create
  4544. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4545. // for more information on using Contexts.
  4546. func (c *AutoScaling) SetInstanceHealthWithContext(ctx aws.Context, input *SetInstanceHealthInput, opts ...request.Option) (*SetInstanceHealthOutput, error) {
  4547. req, out := c.SetInstanceHealthRequest(input)
  4548. req.SetContext(ctx)
  4549. req.ApplyOptions(opts...)
  4550. return out, req.Send()
  4551. }
  4552. const opSetInstanceProtection = "SetInstanceProtection"
  4553. // SetInstanceProtectionRequest generates a "aws/request.Request" representing the
  4554. // client's request for the SetInstanceProtection operation. The "output" return
  4555. // value will be populated with the request's response once the request completes
  4556. // successfully.
  4557. //
  4558. // Use "Send" method on the returned Request to send the API call to the service.
  4559. // the "output" return value is not valid until after Send returns without error.
  4560. //
  4561. // See SetInstanceProtection for more information on using the SetInstanceProtection
  4562. // API call, and error handling.
  4563. //
  4564. // This method is useful when you want to inject custom logic or configuration
  4565. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4566. //
  4567. //
  4568. // // Example sending a request using the SetInstanceProtectionRequest method.
  4569. // req, resp := client.SetInstanceProtectionRequest(params)
  4570. //
  4571. // err := req.Send()
  4572. // if err == nil { // resp is now filled
  4573. // fmt.Println(resp)
  4574. // }
  4575. //
  4576. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetInstanceProtection
  4577. func (c *AutoScaling) SetInstanceProtectionRequest(input *SetInstanceProtectionInput) (req *request.Request, output *SetInstanceProtectionOutput) {
  4578. op := &request.Operation{
  4579. Name: opSetInstanceProtection,
  4580. HTTPMethod: "POST",
  4581. HTTPPath: "/",
  4582. }
  4583. if input == nil {
  4584. input = &SetInstanceProtectionInput{}
  4585. }
  4586. output = &SetInstanceProtectionOutput{}
  4587. req = c.newRequest(op, input, output)
  4588. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4589. return
  4590. }
  4591. // SetInstanceProtection API operation for Auto Scaling.
  4592. //
  4593. // Updates the instance protection settings of the specified instances.
  4594. //
  4595. // For more information, see Instance Protection (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection)
  4596. // in the Amazon EC2 Auto Scaling User Guide.
  4597. //
  4598. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4599. // with awserr.Error's Code and Message methods to get detailed information about
  4600. // the error.
  4601. //
  4602. // See the AWS API reference guide for Auto Scaling's
  4603. // API operation SetInstanceProtection for usage and error information.
  4604. //
  4605. // Returned Error Codes:
  4606. // * ErrCodeLimitExceededFault "LimitExceeded"
  4607. // You have already reached a limit for your Auto Scaling resources (for example,
  4608. // groups, launch configurations, or lifecycle hooks). For more information,
  4609. // see DescribeAccountLimits.
  4610. //
  4611. // * ErrCodeResourceContentionFault "ResourceContention"
  4612. // You already have a pending update to an Auto Scaling resource (for example,
  4613. // a group, instance, or load balancer).
  4614. //
  4615. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetInstanceProtection
  4616. func (c *AutoScaling) SetInstanceProtection(input *SetInstanceProtectionInput) (*SetInstanceProtectionOutput, error) {
  4617. req, out := c.SetInstanceProtectionRequest(input)
  4618. return out, req.Send()
  4619. }
  4620. // SetInstanceProtectionWithContext is the same as SetInstanceProtection with the addition of
  4621. // the ability to pass a context and additional request options.
  4622. //
  4623. // See SetInstanceProtection for details on how to use this API operation.
  4624. //
  4625. // The context must be non-nil and will be used for request cancellation. If
  4626. // the context is nil a panic will occur. In the future the SDK may create
  4627. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4628. // for more information on using Contexts.
  4629. func (c *AutoScaling) SetInstanceProtectionWithContext(ctx aws.Context, input *SetInstanceProtectionInput, opts ...request.Option) (*SetInstanceProtectionOutput, error) {
  4630. req, out := c.SetInstanceProtectionRequest(input)
  4631. req.SetContext(ctx)
  4632. req.ApplyOptions(opts...)
  4633. return out, req.Send()
  4634. }
  4635. const opSuspendProcesses = "SuspendProcesses"
  4636. // SuspendProcessesRequest generates a "aws/request.Request" representing the
  4637. // client's request for the SuspendProcesses operation. The "output" return
  4638. // value will be populated with the request's response once the request completes
  4639. // successfully.
  4640. //
  4641. // Use "Send" method on the returned Request to send the API call to the service.
  4642. // the "output" return value is not valid until after Send returns without error.
  4643. //
  4644. // See SuspendProcesses for more information on using the SuspendProcesses
  4645. // API call, and error handling.
  4646. //
  4647. // This method is useful when you want to inject custom logic or configuration
  4648. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4649. //
  4650. //
  4651. // // Example sending a request using the SuspendProcessesRequest method.
  4652. // req, resp := client.SuspendProcessesRequest(params)
  4653. //
  4654. // err := req.Send()
  4655. // if err == nil { // resp is now filled
  4656. // fmt.Println(resp)
  4657. // }
  4658. //
  4659. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SuspendProcesses
  4660. func (c *AutoScaling) SuspendProcessesRequest(input *ScalingProcessQuery) (req *request.Request, output *SuspendProcessesOutput) {
  4661. op := &request.Operation{
  4662. Name: opSuspendProcesses,
  4663. HTTPMethod: "POST",
  4664. HTTPPath: "/",
  4665. }
  4666. if input == nil {
  4667. input = &ScalingProcessQuery{}
  4668. }
  4669. output = &SuspendProcessesOutput{}
  4670. req = c.newRequest(op, input, output)
  4671. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4672. return
  4673. }
  4674. // SuspendProcesses API operation for Auto Scaling.
  4675. //
  4676. // Suspends the specified automatic scaling processes, or all processes, for
  4677. // the specified Auto Scaling group.
  4678. //
  4679. // If you suspend either the Launch or Terminate process types, it can prevent
  4680. // other process types from functioning properly.
  4681. //
  4682. // To resume processes that have been suspended, use ResumeProcesses.
  4683. //
  4684. // For more information, see Suspending and Resuming Scaling Processes (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html)
  4685. // in the Amazon EC2 Auto Scaling User Guide.
  4686. //
  4687. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4688. // with awserr.Error's Code and Message methods to get detailed information about
  4689. // the error.
  4690. //
  4691. // See the AWS API reference guide for Auto Scaling's
  4692. // API operation SuspendProcesses for usage and error information.
  4693. //
  4694. // Returned Error Codes:
  4695. // * ErrCodeResourceInUseFault "ResourceInUse"
  4696. // The operation can't be performed because the resource is in use.
  4697. //
  4698. // * ErrCodeResourceContentionFault "ResourceContention"
  4699. // You already have a pending update to an Auto Scaling resource (for example,
  4700. // a group, instance, or load balancer).
  4701. //
  4702. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SuspendProcesses
  4703. func (c *AutoScaling) SuspendProcesses(input *ScalingProcessQuery) (*SuspendProcessesOutput, error) {
  4704. req, out := c.SuspendProcessesRequest(input)
  4705. return out, req.Send()
  4706. }
  4707. // SuspendProcessesWithContext is the same as SuspendProcesses with the addition of
  4708. // the ability to pass a context and additional request options.
  4709. //
  4710. // See SuspendProcesses for details on how to use this API operation.
  4711. //
  4712. // The context must be non-nil and will be used for request cancellation. If
  4713. // the context is nil a panic will occur. In the future the SDK may create
  4714. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4715. // for more information on using Contexts.
  4716. func (c *AutoScaling) SuspendProcessesWithContext(ctx aws.Context, input *ScalingProcessQuery, opts ...request.Option) (*SuspendProcessesOutput, error) {
  4717. req, out := c.SuspendProcessesRequest(input)
  4718. req.SetContext(ctx)
  4719. req.ApplyOptions(opts...)
  4720. return out, req.Send()
  4721. }
  4722. const opTerminateInstanceInAutoScalingGroup = "TerminateInstanceInAutoScalingGroup"
  4723. // TerminateInstanceInAutoScalingGroupRequest generates a "aws/request.Request" representing the
  4724. // client's request for the TerminateInstanceInAutoScalingGroup operation. The "output" return
  4725. // value will be populated with the request's response once the request completes
  4726. // successfully.
  4727. //
  4728. // Use "Send" method on the returned Request to send the API call to the service.
  4729. // the "output" return value is not valid until after Send returns without error.
  4730. //
  4731. // See TerminateInstanceInAutoScalingGroup for more information on using the TerminateInstanceInAutoScalingGroup
  4732. // API call, and error handling.
  4733. //
  4734. // This method is useful when you want to inject custom logic or configuration
  4735. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4736. //
  4737. //
  4738. // // Example sending a request using the TerminateInstanceInAutoScalingGroupRequest method.
  4739. // req, resp := client.TerminateInstanceInAutoScalingGroupRequest(params)
  4740. //
  4741. // err := req.Send()
  4742. // if err == nil { // resp is now filled
  4743. // fmt.Println(resp)
  4744. // }
  4745. //
  4746. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/TerminateInstanceInAutoScalingGroup
  4747. func (c *AutoScaling) TerminateInstanceInAutoScalingGroupRequest(input *TerminateInstanceInAutoScalingGroupInput) (req *request.Request, output *TerminateInstanceInAutoScalingGroupOutput) {
  4748. op := &request.Operation{
  4749. Name: opTerminateInstanceInAutoScalingGroup,
  4750. HTTPMethod: "POST",
  4751. HTTPPath: "/",
  4752. }
  4753. if input == nil {
  4754. input = &TerminateInstanceInAutoScalingGroupInput{}
  4755. }
  4756. output = &TerminateInstanceInAutoScalingGroupOutput{}
  4757. req = c.newRequest(op, input, output)
  4758. return
  4759. }
  4760. // TerminateInstanceInAutoScalingGroup API operation for Auto Scaling.
  4761. //
  4762. // Terminates the specified instance and optionally adjusts the desired group
  4763. // size.
  4764. //
  4765. // This call simply makes a termination request. The instance is not terminated
  4766. // immediately.
  4767. //
  4768. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4769. // with awserr.Error's Code and Message methods to get detailed information about
  4770. // the error.
  4771. //
  4772. // See the AWS API reference guide for Auto Scaling's
  4773. // API operation TerminateInstanceInAutoScalingGroup for usage and error information.
  4774. //
  4775. // Returned Error Codes:
  4776. // * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress"
  4777. // The operation can't be performed because there are scaling activities in
  4778. // progress.
  4779. //
  4780. // * ErrCodeResourceContentionFault "ResourceContention"
  4781. // You already have a pending update to an Auto Scaling resource (for example,
  4782. // a group, instance, or load balancer).
  4783. //
  4784. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/TerminateInstanceInAutoScalingGroup
  4785. func (c *AutoScaling) TerminateInstanceInAutoScalingGroup(input *TerminateInstanceInAutoScalingGroupInput) (*TerminateInstanceInAutoScalingGroupOutput, error) {
  4786. req, out := c.TerminateInstanceInAutoScalingGroupRequest(input)
  4787. return out, req.Send()
  4788. }
  4789. // TerminateInstanceInAutoScalingGroupWithContext is the same as TerminateInstanceInAutoScalingGroup with the addition of
  4790. // the ability to pass a context and additional request options.
  4791. //
  4792. // See TerminateInstanceInAutoScalingGroup for details on how to use this API operation.
  4793. //
  4794. // The context must be non-nil and will be used for request cancellation. If
  4795. // the context is nil a panic will occur. In the future the SDK may create
  4796. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4797. // for more information on using Contexts.
  4798. func (c *AutoScaling) TerminateInstanceInAutoScalingGroupWithContext(ctx aws.Context, input *TerminateInstanceInAutoScalingGroupInput, opts ...request.Option) (*TerminateInstanceInAutoScalingGroupOutput, error) {
  4799. req, out := c.TerminateInstanceInAutoScalingGroupRequest(input)
  4800. req.SetContext(ctx)
  4801. req.ApplyOptions(opts...)
  4802. return out, req.Send()
  4803. }
  4804. const opUpdateAutoScalingGroup = "UpdateAutoScalingGroup"
  4805. // UpdateAutoScalingGroupRequest generates a "aws/request.Request" representing the
  4806. // client's request for the UpdateAutoScalingGroup operation. The "output" return
  4807. // value will be populated with the request's response once the request completes
  4808. // successfully.
  4809. //
  4810. // Use "Send" method on the returned Request to send the API call to the service.
  4811. // the "output" return value is not valid until after Send returns without error.
  4812. //
  4813. // See UpdateAutoScalingGroup for more information on using the UpdateAutoScalingGroup
  4814. // API call, and error handling.
  4815. //
  4816. // This method is useful when you want to inject custom logic or configuration
  4817. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4818. //
  4819. //
  4820. // // Example sending a request using the UpdateAutoScalingGroupRequest method.
  4821. // req, resp := client.UpdateAutoScalingGroupRequest(params)
  4822. //
  4823. // err := req.Send()
  4824. // if err == nil { // resp is now filled
  4825. // fmt.Println(resp)
  4826. // }
  4827. //
  4828. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/UpdateAutoScalingGroup
  4829. func (c *AutoScaling) UpdateAutoScalingGroupRequest(input *UpdateAutoScalingGroupInput) (req *request.Request, output *UpdateAutoScalingGroupOutput) {
  4830. op := &request.Operation{
  4831. Name: opUpdateAutoScalingGroup,
  4832. HTTPMethod: "POST",
  4833. HTTPPath: "/",
  4834. }
  4835. if input == nil {
  4836. input = &UpdateAutoScalingGroupInput{}
  4837. }
  4838. output = &UpdateAutoScalingGroupOutput{}
  4839. req = c.newRequest(op, input, output)
  4840. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4841. return
  4842. }
  4843. // UpdateAutoScalingGroup API operation for Auto Scaling.
  4844. //
  4845. // Updates the configuration for the specified Auto Scaling group.
  4846. //
  4847. // The new settings take effect on any scaling activities after this call returns.
  4848. // Scaling activities that are currently in progress aren't affected.
  4849. //
  4850. // To update an Auto Scaling group with a launch configuration with InstanceMonitoring
  4851. // set to false, you must first disable the collection of group metrics. Otherwise,
  4852. // you get an error. If you have previously enabled the collection of group
  4853. // metrics, you can disable it using DisableMetricsCollection.
  4854. //
  4855. // Note the following:
  4856. //
  4857. // * If you specify a new value for MinSize without specifying a value for
  4858. // DesiredCapacity, and the new MinSize is larger than the current size of
  4859. // the group, we implicitly call SetDesiredCapacity to set the size of the
  4860. // group to the new value of MinSize.
  4861. //
  4862. // * If you specify a new value for MaxSize without specifying a value for
  4863. // DesiredCapacity, and the new MaxSize is smaller than the current size
  4864. // of the group, we implicitly call SetDesiredCapacity to set the size of
  4865. // the group to the new value of MaxSize.
  4866. //
  4867. // * All other optional parameters are left unchanged if not specified.
  4868. //
  4869. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4870. // with awserr.Error's Code and Message methods to get detailed information about
  4871. // the error.
  4872. //
  4873. // See the AWS API reference guide for Auto Scaling's
  4874. // API operation UpdateAutoScalingGroup for usage and error information.
  4875. //
  4876. // Returned Error Codes:
  4877. // * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress"
  4878. // The operation can't be performed because there are scaling activities in
  4879. // progress.
  4880. //
  4881. // * ErrCodeResourceContentionFault "ResourceContention"
  4882. // You already have a pending update to an Auto Scaling resource (for example,
  4883. // a group, instance, or load balancer).
  4884. //
  4885. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  4886. // The service-linked role is not yet ready for use.
  4887. //
  4888. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/UpdateAutoScalingGroup
  4889. func (c *AutoScaling) UpdateAutoScalingGroup(input *UpdateAutoScalingGroupInput) (*UpdateAutoScalingGroupOutput, error) {
  4890. req, out := c.UpdateAutoScalingGroupRequest(input)
  4891. return out, req.Send()
  4892. }
  4893. // UpdateAutoScalingGroupWithContext is the same as UpdateAutoScalingGroup with the addition of
  4894. // the ability to pass a context and additional request options.
  4895. //
  4896. // See UpdateAutoScalingGroup for details on how to use this API operation.
  4897. //
  4898. // The context must be non-nil and will be used for request cancellation. If
  4899. // the context is nil a panic will occur. In the future the SDK may create
  4900. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4901. // for more information on using Contexts.
  4902. func (c *AutoScaling) UpdateAutoScalingGroupWithContext(ctx aws.Context, input *UpdateAutoScalingGroupInput, opts ...request.Option) (*UpdateAutoScalingGroupOutput, error) {
  4903. req, out := c.UpdateAutoScalingGroupRequest(input)
  4904. req.SetContext(ctx)
  4905. req.ApplyOptions(opts...)
  4906. return out, req.Send()
  4907. }
  4908. // Describes scaling activity, which is a long-running process that represents
  4909. // a change to your Auto Scaling group, such as changing its size or replacing
  4910. // an instance.
  4911. type Activity struct {
  4912. _ struct{} `type:"structure"`
  4913. // The ID of the activity.
  4914. //
  4915. // ActivityId is a required field
  4916. ActivityId *string `type:"string" required:"true"`
  4917. // The name of the Auto Scaling group.
  4918. //
  4919. // AutoScalingGroupName is a required field
  4920. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  4921. // The reason the activity began.
  4922. //
  4923. // Cause is a required field
  4924. Cause *string `min:"1" type:"string" required:"true"`
  4925. // A friendly, more verbose description of the activity.
  4926. Description *string `type:"string"`
  4927. // The details about the activity.
  4928. Details *string `type:"string"`
  4929. // The end time of the activity.
  4930. EndTime *time.Time `type:"timestamp"`
  4931. // A value between 0 and 100 that indicates the progress of the activity.
  4932. Progress *int64 `type:"integer"`
  4933. // The start time of the activity.
  4934. //
  4935. // StartTime is a required field
  4936. StartTime *time.Time `type:"timestamp" required:"true"`
  4937. // The current status of the activity.
  4938. //
  4939. // StatusCode is a required field
  4940. StatusCode *string `type:"string" required:"true" enum:"ScalingActivityStatusCode"`
  4941. // A friendly, more verbose description of the activity status.
  4942. StatusMessage *string `min:"1" type:"string"`
  4943. }
  4944. // String returns the string representation
  4945. func (s Activity) String() string {
  4946. return awsutil.Prettify(s)
  4947. }
  4948. // GoString returns the string representation
  4949. func (s Activity) GoString() string {
  4950. return s.String()
  4951. }
  4952. // SetActivityId sets the ActivityId field's value.
  4953. func (s *Activity) SetActivityId(v string) *Activity {
  4954. s.ActivityId = &v
  4955. return s
  4956. }
  4957. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  4958. func (s *Activity) SetAutoScalingGroupName(v string) *Activity {
  4959. s.AutoScalingGroupName = &v
  4960. return s
  4961. }
  4962. // SetCause sets the Cause field's value.
  4963. func (s *Activity) SetCause(v string) *Activity {
  4964. s.Cause = &v
  4965. return s
  4966. }
  4967. // SetDescription sets the Description field's value.
  4968. func (s *Activity) SetDescription(v string) *Activity {
  4969. s.Description = &v
  4970. return s
  4971. }
  4972. // SetDetails sets the Details field's value.
  4973. func (s *Activity) SetDetails(v string) *Activity {
  4974. s.Details = &v
  4975. return s
  4976. }
  4977. // SetEndTime sets the EndTime field's value.
  4978. func (s *Activity) SetEndTime(v time.Time) *Activity {
  4979. s.EndTime = &v
  4980. return s
  4981. }
  4982. // SetProgress sets the Progress field's value.
  4983. func (s *Activity) SetProgress(v int64) *Activity {
  4984. s.Progress = &v
  4985. return s
  4986. }
  4987. // SetStartTime sets the StartTime field's value.
  4988. func (s *Activity) SetStartTime(v time.Time) *Activity {
  4989. s.StartTime = &v
  4990. return s
  4991. }
  4992. // SetStatusCode sets the StatusCode field's value.
  4993. func (s *Activity) SetStatusCode(v string) *Activity {
  4994. s.StatusCode = &v
  4995. return s
  4996. }
  4997. // SetStatusMessage sets the StatusMessage field's value.
  4998. func (s *Activity) SetStatusMessage(v string) *Activity {
  4999. s.StatusMessage = &v
  5000. return s
  5001. }
  5002. // Describes a policy adjustment type.
  5003. //
  5004. // For more information, see Dynamic Scaling (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scale-based-on-demand.html)
  5005. // in the Amazon EC2 Auto Scaling User Guide.
  5006. type AdjustmentType struct {
  5007. _ struct{} `type:"structure"`
  5008. // The policy adjustment type. The valid values are ChangeInCapacity, ExactCapacity,
  5009. // and PercentChangeInCapacity.
  5010. AdjustmentType *string `min:"1" type:"string"`
  5011. }
  5012. // String returns the string representation
  5013. func (s AdjustmentType) String() string {
  5014. return awsutil.Prettify(s)
  5015. }
  5016. // GoString returns the string representation
  5017. func (s AdjustmentType) GoString() string {
  5018. return s.String()
  5019. }
  5020. // SetAdjustmentType sets the AdjustmentType field's value.
  5021. func (s *AdjustmentType) SetAdjustmentType(v string) *AdjustmentType {
  5022. s.AdjustmentType = &v
  5023. return s
  5024. }
  5025. // Describes an alarm.
  5026. type Alarm struct {
  5027. _ struct{} `type:"structure"`
  5028. // The Amazon Resource Name (ARN) of the alarm.
  5029. AlarmARN *string `min:"1" type:"string"`
  5030. // The name of the alarm.
  5031. AlarmName *string `min:"1" type:"string"`
  5032. }
  5033. // String returns the string representation
  5034. func (s Alarm) String() string {
  5035. return awsutil.Prettify(s)
  5036. }
  5037. // GoString returns the string representation
  5038. func (s Alarm) GoString() string {
  5039. return s.String()
  5040. }
  5041. // SetAlarmARN sets the AlarmARN field's value.
  5042. func (s *Alarm) SetAlarmARN(v string) *Alarm {
  5043. s.AlarmARN = &v
  5044. return s
  5045. }
  5046. // SetAlarmName sets the AlarmName field's value.
  5047. func (s *Alarm) SetAlarmName(v string) *Alarm {
  5048. s.AlarmName = &v
  5049. return s
  5050. }
  5051. type AttachInstancesInput struct {
  5052. _ struct{} `type:"structure"`
  5053. // The name of the Auto Scaling group.
  5054. //
  5055. // AutoScalingGroupName is a required field
  5056. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5057. // The IDs of the instances. You can specify up to 20 instances.
  5058. InstanceIds []*string `type:"list"`
  5059. }
  5060. // String returns the string representation
  5061. func (s AttachInstancesInput) String() string {
  5062. return awsutil.Prettify(s)
  5063. }
  5064. // GoString returns the string representation
  5065. func (s AttachInstancesInput) GoString() string {
  5066. return s.String()
  5067. }
  5068. // Validate inspects the fields of the type to determine if they are valid.
  5069. func (s *AttachInstancesInput) Validate() error {
  5070. invalidParams := request.ErrInvalidParams{Context: "AttachInstancesInput"}
  5071. if s.AutoScalingGroupName == nil {
  5072. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5073. }
  5074. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5075. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5076. }
  5077. if invalidParams.Len() > 0 {
  5078. return invalidParams
  5079. }
  5080. return nil
  5081. }
  5082. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  5083. func (s *AttachInstancesInput) SetAutoScalingGroupName(v string) *AttachInstancesInput {
  5084. s.AutoScalingGroupName = &v
  5085. return s
  5086. }
  5087. // SetInstanceIds sets the InstanceIds field's value.
  5088. func (s *AttachInstancesInput) SetInstanceIds(v []*string) *AttachInstancesInput {
  5089. s.InstanceIds = v
  5090. return s
  5091. }
  5092. type AttachInstancesOutput struct {
  5093. _ struct{} `type:"structure"`
  5094. }
  5095. // String returns the string representation
  5096. func (s AttachInstancesOutput) String() string {
  5097. return awsutil.Prettify(s)
  5098. }
  5099. // GoString returns the string representation
  5100. func (s AttachInstancesOutput) GoString() string {
  5101. return s.String()
  5102. }
  5103. type AttachLoadBalancerTargetGroupsInput struct {
  5104. _ struct{} `type:"structure"`
  5105. // The name of the Auto Scaling group.
  5106. //
  5107. // AutoScalingGroupName is a required field
  5108. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5109. // The Amazon Resource Names (ARN) of the target groups. You can specify up
  5110. // to 10 target groups.
  5111. //
  5112. // TargetGroupARNs is a required field
  5113. TargetGroupARNs []*string `type:"list" required:"true"`
  5114. }
  5115. // String returns the string representation
  5116. func (s AttachLoadBalancerTargetGroupsInput) String() string {
  5117. return awsutil.Prettify(s)
  5118. }
  5119. // GoString returns the string representation
  5120. func (s AttachLoadBalancerTargetGroupsInput) GoString() string {
  5121. return s.String()
  5122. }
  5123. // Validate inspects the fields of the type to determine if they are valid.
  5124. func (s *AttachLoadBalancerTargetGroupsInput) Validate() error {
  5125. invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancerTargetGroupsInput"}
  5126. if s.AutoScalingGroupName == nil {
  5127. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5128. }
  5129. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5130. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5131. }
  5132. if s.TargetGroupARNs == nil {
  5133. invalidParams.Add(request.NewErrParamRequired("TargetGroupARNs"))
  5134. }
  5135. if invalidParams.Len() > 0 {
  5136. return invalidParams
  5137. }
  5138. return nil
  5139. }
  5140. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  5141. func (s *AttachLoadBalancerTargetGroupsInput) SetAutoScalingGroupName(v string) *AttachLoadBalancerTargetGroupsInput {
  5142. s.AutoScalingGroupName = &v
  5143. return s
  5144. }
  5145. // SetTargetGroupARNs sets the TargetGroupARNs field's value.
  5146. func (s *AttachLoadBalancerTargetGroupsInput) SetTargetGroupARNs(v []*string) *AttachLoadBalancerTargetGroupsInput {
  5147. s.TargetGroupARNs = v
  5148. return s
  5149. }
  5150. type AttachLoadBalancerTargetGroupsOutput struct {
  5151. _ struct{} `type:"structure"`
  5152. }
  5153. // String returns the string representation
  5154. func (s AttachLoadBalancerTargetGroupsOutput) String() string {
  5155. return awsutil.Prettify(s)
  5156. }
  5157. // GoString returns the string representation
  5158. func (s AttachLoadBalancerTargetGroupsOutput) GoString() string {
  5159. return s.String()
  5160. }
  5161. type AttachLoadBalancersInput struct {
  5162. _ struct{} `type:"structure"`
  5163. // The name of the Auto Scaling group.
  5164. //
  5165. // AutoScalingGroupName is a required field
  5166. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5167. // The names of the load balancers. You can specify up to 10 load balancers.
  5168. //
  5169. // LoadBalancerNames is a required field
  5170. LoadBalancerNames []*string `type:"list" required:"true"`
  5171. }
  5172. // String returns the string representation
  5173. func (s AttachLoadBalancersInput) String() string {
  5174. return awsutil.Prettify(s)
  5175. }
  5176. // GoString returns the string representation
  5177. func (s AttachLoadBalancersInput) GoString() string {
  5178. return s.String()
  5179. }
  5180. // Validate inspects the fields of the type to determine if they are valid.
  5181. func (s *AttachLoadBalancersInput) Validate() error {
  5182. invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancersInput"}
  5183. if s.AutoScalingGroupName == nil {
  5184. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5185. }
  5186. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5187. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5188. }
  5189. if s.LoadBalancerNames == nil {
  5190. invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames"))
  5191. }
  5192. if invalidParams.Len() > 0 {
  5193. return invalidParams
  5194. }
  5195. return nil
  5196. }
  5197. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  5198. func (s *AttachLoadBalancersInput) SetAutoScalingGroupName(v string) *AttachLoadBalancersInput {
  5199. s.AutoScalingGroupName = &v
  5200. return s
  5201. }
  5202. // SetLoadBalancerNames sets the LoadBalancerNames field's value.
  5203. func (s *AttachLoadBalancersInput) SetLoadBalancerNames(v []*string) *AttachLoadBalancersInput {
  5204. s.LoadBalancerNames = v
  5205. return s
  5206. }
  5207. type AttachLoadBalancersOutput struct {
  5208. _ struct{} `type:"structure"`
  5209. }
  5210. // String returns the string representation
  5211. func (s AttachLoadBalancersOutput) String() string {
  5212. return awsutil.Prettify(s)
  5213. }
  5214. // GoString returns the string representation
  5215. func (s AttachLoadBalancersOutput) GoString() string {
  5216. return s.String()
  5217. }
  5218. type BatchDeleteScheduledActionInput struct {
  5219. _ struct{} `type:"structure"`
  5220. // The name of the Auto Scaling group.
  5221. //
  5222. // AutoScalingGroupName is a required field
  5223. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5224. // The names of the scheduled actions to delete. The maximum number allowed
  5225. // is 50.
  5226. //
  5227. // ScheduledActionNames is a required field
  5228. ScheduledActionNames []*string `type:"list" required:"true"`
  5229. }
  5230. // String returns the string representation
  5231. func (s BatchDeleteScheduledActionInput) String() string {
  5232. return awsutil.Prettify(s)
  5233. }
  5234. // GoString returns the string representation
  5235. func (s BatchDeleteScheduledActionInput) GoString() string {
  5236. return s.String()
  5237. }
  5238. // Validate inspects the fields of the type to determine if they are valid.
  5239. func (s *BatchDeleteScheduledActionInput) Validate() error {
  5240. invalidParams := request.ErrInvalidParams{Context: "BatchDeleteScheduledActionInput"}
  5241. if s.AutoScalingGroupName == nil {
  5242. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5243. }
  5244. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5245. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5246. }
  5247. if s.ScheduledActionNames == nil {
  5248. invalidParams.Add(request.NewErrParamRequired("ScheduledActionNames"))
  5249. }
  5250. if invalidParams.Len() > 0 {
  5251. return invalidParams
  5252. }
  5253. return nil
  5254. }
  5255. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  5256. func (s *BatchDeleteScheduledActionInput) SetAutoScalingGroupName(v string) *BatchDeleteScheduledActionInput {
  5257. s.AutoScalingGroupName = &v
  5258. return s
  5259. }
  5260. // SetScheduledActionNames sets the ScheduledActionNames field's value.
  5261. func (s *BatchDeleteScheduledActionInput) SetScheduledActionNames(v []*string) *BatchDeleteScheduledActionInput {
  5262. s.ScheduledActionNames = v
  5263. return s
  5264. }
  5265. type BatchDeleteScheduledActionOutput struct {
  5266. _ struct{} `type:"structure"`
  5267. // The names of the scheduled actions that could not be deleted, including an
  5268. // error message.
  5269. FailedScheduledActions []*FailedScheduledUpdateGroupActionRequest `type:"list"`
  5270. }
  5271. // String returns the string representation
  5272. func (s BatchDeleteScheduledActionOutput) String() string {
  5273. return awsutil.Prettify(s)
  5274. }
  5275. // GoString returns the string representation
  5276. func (s BatchDeleteScheduledActionOutput) GoString() string {
  5277. return s.String()
  5278. }
  5279. // SetFailedScheduledActions sets the FailedScheduledActions field's value.
  5280. func (s *BatchDeleteScheduledActionOutput) SetFailedScheduledActions(v []*FailedScheduledUpdateGroupActionRequest) *BatchDeleteScheduledActionOutput {
  5281. s.FailedScheduledActions = v
  5282. return s
  5283. }
  5284. type BatchPutScheduledUpdateGroupActionInput struct {
  5285. _ struct{} `type:"structure"`
  5286. // The name of the Auto Scaling group.
  5287. //
  5288. // AutoScalingGroupName is a required field
  5289. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5290. // One or more scheduled actions. The maximum number allowed is 50.
  5291. //
  5292. // ScheduledUpdateGroupActions is a required field
  5293. ScheduledUpdateGroupActions []*ScheduledUpdateGroupActionRequest `type:"list" required:"true"`
  5294. }
  5295. // String returns the string representation
  5296. func (s BatchPutScheduledUpdateGroupActionInput) String() string {
  5297. return awsutil.Prettify(s)
  5298. }
  5299. // GoString returns the string representation
  5300. func (s BatchPutScheduledUpdateGroupActionInput) GoString() string {
  5301. return s.String()
  5302. }
  5303. // Validate inspects the fields of the type to determine if they are valid.
  5304. func (s *BatchPutScheduledUpdateGroupActionInput) Validate() error {
  5305. invalidParams := request.ErrInvalidParams{Context: "BatchPutScheduledUpdateGroupActionInput"}
  5306. if s.AutoScalingGroupName == nil {
  5307. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5308. }
  5309. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5310. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5311. }
  5312. if s.ScheduledUpdateGroupActions == nil {
  5313. invalidParams.Add(request.NewErrParamRequired("ScheduledUpdateGroupActions"))
  5314. }
  5315. if s.ScheduledUpdateGroupActions != nil {
  5316. for i, v := range s.ScheduledUpdateGroupActions {
  5317. if v == nil {
  5318. continue
  5319. }
  5320. if err := v.Validate(); err != nil {
  5321. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ScheduledUpdateGroupActions", i), err.(request.ErrInvalidParams))
  5322. }
  5323. }
  5324. }
  5325. if invalidParams.Len() > 0 {
  5326. return invalidParams
  5327. }
  5328. return nil
  5329. }
  5330. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  5331. func (s *BatchPutScheduledUpdateGroupActionInput) SetAutoScalingGroupName(v string) *BatchPutScheduledUpdateGroupActionInput {
  5332. s.AutoScalingGroupName = &v
  5333. return s
  5334. }
  5335. // SetScheduledUpdateGroupActions sets the ScheduledUpdateGroupActions field's value.
  5336. func (s *BatchPutScheduledUpdateGroupActionInput) SetScheduledUpdateGroupActions(v []*ScheduledUpdateGroupActionRequest) *BatchPutScheduledUpdateGroupActionInput {
  5337. s.ScheduledUpdateGroupActions = v
  5338. return s
  5339. }
  5340. type BatchPutScheduledUpdateGroupActionOutput struct {
  5341. _ struct{} `type:"structure"`
  5342. // The names of the scheduled actions that could not be created or updated,
  5343. // including an error message.
  5344. FailedScheduledUpdateGroupActions []*FailedScheduledUpdateGroupActionRequest `type:"list"`
  5345. }
  5346. // String returns the string representation
  5347. func (s BatchPutScheduledUpdateGroupActionOutput) String() string {
  5348. return awsutil.Prettify(s)
  5349. }
  5350. // GoString returns the string representation
  5351. func (s BatchPutScheduledUpdateGroupActionOutput) GoString() string {
  5352. return s.String()
  5353. }
  5354. // SetFailedScheduledUpdateGroupActions sets the FailedScheduledUpdateGroupActions field's value.
  5355. func (s *BatchPutScheduledUpdateGroupActionOutput) SetFailedScheduledUpdateGroupActions(v []*FailedScheduledUpdateGroupActionRequest) *BatchPutScheduledUpdateGroupActionOutput {
  5356. s.FailedScheduledUpdateGroupActions = v
  5357. return s
  5358. }
  5359. // Describes a block device mapping.
  5360. type BlockDeviceMapping struct {
  5361. _ struct{} `type:"structure"`
  5362. // The device name exposed to the EC2 instance (for example, /dev/sdh or xvdh).
  5363. //
  5364. // DeviceName is a required field
  5365. DeviceName *string `min:"1" type:"string" required:"true"`
  5366. // The information about the Amazon EBS volume.
  5367. Ebs *Ebs `type:"structure"`
  5368. // Suppresses a device mapping.
  5369. //
  5370. // If this parameter is true for the root device, the instance might fail the
  5371. // EC2 health check. In that case, Amazon EC2 Auto Scaling launches a replacement
  5372. // instance.
  5373. NoDevice *bool `type:"boolean"`
  5374. // The name of the virtual device (for example, ephemeral0).
  5375. VirtualName *string `min:"1" type:"string"`
  5376. }
  5377. // String returns the string representation
  5378. func (s BlockDeviceMapping) String() string {
  5379. return awsutil.Prettify(s)
  5380. }
  5381. // GoString returns the string representation
  5382. func (s BlockDeviceMapping) GoString() string {
  5383. return s.String()
  5384. }
  5385. // Validate inspects the fields of the type to determine if they are valid.
  5386. func (s *BlockDeviceMapping) Validate() error {
  5387. invalidParams := request.ErrInvalidParams{Context: "BlockDeviceMapping"}
  5388. if s.DeviceName == nil {
  5389. invalidParams.Add(request.NewErrParamRequired("DeviceName"))
  5390. }
  5391. if s.DeviceName != nil && len(*s.DeviceName) < 1 {
  5392. invalidParams.Add(request.NewErrParamMinLen("DeviceName", 1))
  5393. }
  5394. if s.VirtualName != nil && len(*s.VirtualName) < 1 {
  5395. invalidParams.Add(request.NewErrParamMinLen("VirtualName", 1))
  5396. }
  5397. if s.Ebs != nil {
  5398. if err := s.Ebs.Validate(); err != nil {
  5399. invalidParams.AddNested("Ebs", err.(request.ErrInvalidParams))
  5400. }
  5401. }
  5402. if invalidParams.Len() > 0 {
  5403. return invalidParams
  5404. }
  5405. return nil
  5406. }
  5407. // SetDeviceName sets the DeviceName field's value.
  5408. func (s *BlockDeviceMapping) SetDeviceName(v string) *BlockDeviceMapping {
  5409. s.DeviceName = &v
  5410. return s
  5411. }
  5412. // SetEbs sets the Ebs field's value.
  5413. func (s *BlockDeviceMapping) SetEbs(v *Ebs) *BlockDeviceMapping {
  5414. s.Ebs = v
  5415. return s
  5416. }
  5417. // SetNoDevice sets the NoDevice field's value.
  5418. func (s *BlockDeviceMapping) SetNoDevice(v bool) *BlockDeviceMapping {
  5419. s.NoDevice = &v
  5420. return s
  5421. }
  5422. // SetVirtualName sets the VirtualName field's value.
  5423. func (s *BlockDeviceMapping) SetVirtualName(v string) *BlockDeviceMapping {
  5424. s.VirtualName = &v
  5425. return s
  5426. }
  5427. type CompleteLifecycleActionInput struct {
  5428. _ struct{} `type:"structure"`
  5429. // The name of the Auto Scaling group.
  5430. //
  5431. // AutoScalingGroupName is a required field
  5432. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5433. // The ID of the instance.
  5434. InstanceId *string `min:"1" type:"string"`
  5435. // The action for the group to take. This parameter can be either CONTINUE or
  5436. // ABANDON.
  5437. //
  5438. // LifecycleActionResult is a required field
  5439. LifecycleActionResult *string `type:"string" required:"true"`
  5440. // A universally unique identifier (UUID) that identifies a specific lifecycle
  5441. // action associated with an instance. Amazon EC2 Auto Scaling sends this token
  5442. // to the notification target you specified when you created the lifecycle hook.
  5443. LifecycleActionToken *string `min:"36" type:"string"`
  5444. // The name of the lifecycle hook.
  5445. //
  5446. // LifecycleHookName is a required field
  5447. LifecycleHookName *string `min:"1" type:"string" required:"true"`
  5448. }
  5449. // String returns the string representation
  5450. func (s CompleteLifecycleActionInput) String() string {
  5451. return awsutil.Prettify(s)
  5452. }
  5453. // GoString returns the string representation
  5454. func (s CompleteLifecycleActionInput) GoString() string {
  5455. return s.String()
  5456. }
  5457. // Validate inspects the fields of the type to determine if they are valid.
  5458. func (s *CompleteLifecycleActionInput) Validate() error {
  5459. invalidParams := request.ErrInvalidParams{Context: "CompleteLifecycleActionInput"}
  5460. if s.AutoScalingGroupName == nil {
  5461. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5462. }
  5463. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5464. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5465. }
  5466. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  5467. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  5468. }
  5469. if s.LifecycleActionResult == nil {
  5470. invalidParams.Add(request.NewErrParamRequired("LifecycleActionResult"))
  5471. }
  5472. if s.LifecycleActionToken != nil && len(*s.LifecycleActionToken) < 36 {
  5473. invalidParams.Add(request.NewErrParamMinLen("LifecycleActionToken", 36))
  5474. }
  5475. if s.LifecycleHookName == nil {
  5476. invalidParams.Add(request.NewErrParamRequired("LifecycleHookName"))
  5477. }
  5478. if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 {
  5479. invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1))
  5480. }
  5481. if invalidParams.Len() > 0 {
  5482. return invalidParams
  5483. }
  5484. return nil
  5485. }
  5486. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  5487. func (s *CompleteLifecycleActionInput) SetAutoScalingGroupName(v string) *CompleteLifecycleActionInput {
  5488. s.AutoScalingGroupName = &v
  5489. return s
  5490. }
  5491. // SetInstanceId sets the InstanceId field's value.
  5492. func (s *CompleteLifecycleActionInput) SetInstanceId(v string) *CompleteLifecycleActionInput {
  5493. s.InstanceId = &v
  5494. return s
  5495. }
  5496. // SetLifecycleActionResult sets the LifecycleActionResult field's value.
  5497. func (s *CompleteLifecycleActionInput) SetLifecycleActionResult(v string) *CompleteLifecycleActionInput {
  5498. s.LifecycleActionResult = &v
  5499. return s
  5500. }
  5501. // SetLifecycleActionToken sets the LifecycleActionToken field's value.
  5502. func (s *CompleteLifecycleActionInput) SetLifecycleActionToken(v string) *CompleteLifecycleActionInput {
  5503. s.LifecycleActionToken = &v
  5504. return s
  5505. }
  5506. // SetLifecycleHookName sets the LifecycleHookName field's value.
  5507. func (s *CompleteLifecycleActionInput) SetLifecycleHookName(v string) *CompleteLifecycleActionInput {
  5508. s.LifecycleHookName = &v
  5509. return s
  5510. }
  5511. type CompleteLifecycleActionOutput struct {
  5512. _ struct{} `type:"structure"`
  5513. }
  5514. // String returns the string representation
  5515. func (s CompleteLifecycleActionOutput) String() string {
  5516. return awsutil.Prettify(s)
  5517. }
  5518. // GoString returns the string representation
  5519. func (s CompleteLifecycleActionOutput) GoString() string {
  5520. return s.String()
  5521. }
  5522. type CreateAutoScalingGroupInput struct {
  5523. _ struct{} `type:"structure"`
  5524. // The name of the Auto Scaling group. This name must be unique within the scope
  5525. // of your AWS account.
  5526. //
  5527. // AutoScalingGroupName is a required field
  5528. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5529. // One or more Availability Zones for the group. This parameter is optional
  5530. // if you specify one or more subnets.
  5531. AvailabilityZones []*string `min:"1" type:"list"`
  5532. // The amount of time, in seconds, after a scaling activity completes before
  5533. // another scaling activity can start. The default is 300.
  5534. //
  5535. // For more information, see Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html)
  5536. // in the Amazon EC2 Auto Scaling User Guide.
  5537. DefaultCooldown *int64 `type:"integer"`
  5538. // The number of EC2 instances that should be running in the group. This number
  5539. // must be greater than or equal to the minimum size of the group and less than
  5540. // or equal to the maximum size of the group. If you do not specify a desired
  5541. // capacity, the default is the minimum size of the group.
  5542. DesiredCapacity *int64 `type:"integer"`
  5543. // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before
  5544. // checking the health status of an EC2 instance that has come into service.
  5545. // During this time, any health check failures for the instance are ignored.
  5546. // The default is 0.
  5547. //
  5548. // This parameter is required if you are adding an ELB health check.
  5549. //
  5550. // For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html)
  5551. // in the Amazon EC2 Auto Scaling User Guide.
  5552. HealthCheckGracePeriod *int64 `type:"integer"`
  5553. // The service to use for the health checks. The valid values are EC2 and ELB.
  5554. //
  5555. // By default, health checks use Amazon EC2 instance status checks to determine
  5556. // the health of an instance. For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html)
  5557. // in the Amazon EC2 Auto Scaling User Guide.
  5558. HealthCheckType *string `min:"1" type:"string"`
  5559. // The ID of the instance used to create a launch configuration for the group.
  5560. // This parameter, a launch configuration, a launch template, or a mixed instances
  5561. // policy must be specified.
  5562. //
  5563. // When you specify an ID of an instance, Amazon EC2 Auto Scaling creates a
  5564. // new launch configuration and associates it with the group. This launch configuration
  5565. // derives its attributes from the specified instance, except for the block
  5566. // device mapping.
  5567. //
  5568. // For more information, see Create an Auto Scaling Group Using an EC2 Instance
  5569. // (http://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html)
  5570. // in the Amazon EC2 Auto Scaling User Guide.
  5571. InstanceId *string `min:"1" type:"string"`
  5572. // The name of the launch configuration. This parameter, a launch template,
  5573. // a mixed instances policy, or an EC2 instance must be specified.
  5574. LaunchConfigurationName *string `min:"1" type:"string"`
  5575. // The launch template to use to launch instances. This parameter, a launch
  5576. // configuration, a mixed instances policy, or an EC2 instance must be specified.
  5577. LaunchTemplate *LaunchTemplateSpecification `type:"structure"`
  5578. // One or more lifecycle hooks.
  5579. LifecycleHookSpecificationList []*LifecycleHookSpecification `type:"list"`
  5580. // One or more Classic Load Balancers. To specify an Application Load Balancer,
  5581. // use TargetGroupARNs instead.
  5582. //
  5583. // For more information, see Using a Load Balancer With an Auto Scaling Group
  5584. // (http://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html)
  5585. // in the Amazon EC2 Auto Scaling User Guide.
  5586. LoadBalancerNames []*string `type:"list"`
  5587. // The maximum size of the group.
  5588. //
  5589. // MaxSize is a required field
  5590. MaxSize *int64 `type:"integer" required:"true"`
  5591. // The minimum size of the group.
  5592. //
  5593. // MinSize is a required field
  5594. MinSize *int64 `type:"integer" required:"true"`
  5595. // The mixed instances policy to use to launch instances. This parameter, a
  5596. // launch template, a launch configuration, or an EC2 instance must be specified.
  5597. MixedInstancesPolicy *MixedInstancesPolicy `type:"structure"`
  5598. // Indicates whether newly launched instances are protected from termination
  5599. // by Auto Scaling when scaling in.
  5600. NewInstancesProtectedFromScaleIn *bool `type:"boolean"`
  5601. // The name of the placement group into which to launch your instances, if any.
  5602. // For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html)
  5603. // in the Amazon Elastic Compute Cloud User Guide.
  5604. PlacementGroup *string `min:"1" type:"string"`
  5605. // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling
  5606. // group uses to call other AWS services on your behalf. By default, Amazon
  5607. // EC2 Auto Scaling uses a service-linked role named AWSServiceRoleForAutoScaling,
  5608. // which it creates if it does not exist.
  5609. ServiceLinkedRoleARN *string `min:"1" type:"string"`
  5610. // One or more tags.
  5611. //
  5612. // For more information, see Tagging Auto Scaling Groups and Instances (http://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html)
  5613. // in the Amazon EC2 Auto Scaling User Guide.
  5614. Tags []*Tag `type:"list"`
  5615. // The Amazon Resource Names (ARN) of the target groups.
  5616. TargetGroupARNs []*string `type:"list"`
  5617. // One or more termination policies used to select the instance to terminate.
  5618. // These policies are executed in the order that they are listed.
  5619. //
  5620. // For more information, see Controlling Which Instances Auto Scaling Terminates
  5621. // During Scale In (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html)
  5622. // in the Auto Scaling User Guide.
  5623. TerminationPolicies []*string `type:"list"`
  5624. // A comma-separated list of subnet identifiers for your virtual private cloud
  5625. // (VPC).
  5626. //
  5627. // If you specify subnets and Availability Zones with this call, ensure that
  5628. // the subnets' Availability Zones match the Availability Zones specified.
  5629. //
  5630. // For more information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html)
  5631. // in the Amazon EC2 Auto Scaling User Guide.
  5632. VPCZoneIdentifier *string `min:"1" type:"string"`
  5633. }
  5634. // String returns the string representation
  5635. func (s CreateAutoScalingGroupInput) String() string {
  5636. return awsutil.Prettify(s)
  5637. }
  5638. // GoString returns the string representation
  5639. func (s CreateAutoScalingGroupInput) GoString() string {
  5640. return s.String()
  5641. }
  5642. // Validate inspects the fields of the type to determine if they are valid.
  5643. func (s *CreateAutoScalingGroupInput) Validate() error {
  5644. invalidParams := request.ErrInvalidParams{Context: "CreateAutoScalingGroupInput"}
  5645. if s.AutoScalingGroupName == nil {
  5646. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5647. }
  5648. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5649. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5650. }
  5651. if s.AvailabilityZones != nil && len(s.AvailabilityZones) < 1 {
  5652. invalidParams.Add(request.NewErrParamMinLen("AvailabilityZones", 1))
  5653. }
  5654. if s.HealthCheckType != nil && len(*s.HealthCheckType) < 1 {
  5655. invalidParams.Add(request.NewErrParamMinLen("HealthCheckType", 1))
  5656. }
  5657. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  5658. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  5659. }
  5660. if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 {
  5661. invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1))
  5662. }
  5663. if s.MaxSize == nil {
  5664. invalidParams.Add(request.NewErrParamRequired("MaxSize"))
  5665. }
  5666. if s.MinSize == nil {
  5667. invalidParams.Add(request.NewErrParamRequired("MinSize"))
  5668. }
  5669. if s.PlacementGroup != nil && len(*s.PlacementGroup) < 1 {
  5670. invalidParams.Add(request.NewErrParamMinLen("PlacementGroup", 1))
  5671. }
  5672. if s.ServiceLinkedRoleARN != nil && len(*s.ServiceLinkedRoleARN) < 1 {
  5673. invalidParams.Add(request.NewErrParamMinLen("ServiceLinkedRoleARN", 1))
  5674. }
  5675. if s.VPCZoneIdentifier != nil && len(*s.VPCZoneIdentifier) < 1 {
  5676. invalidParams.Add(request.NewErrParamMinLen("VPCZoneIdentifier", 1))
  5677. }
  5678. if s.LaunchTemplate != nil {
  5679. if err := s.LaunchTemplate.Validate(); err != nil {
  5680. invalidParams.AddNested("LaunchTemplate", err.(request.ErrInvalidParams))
  5681. }
  5682. }
  5683. if s.LifecycleHookSpecificationList != nil {
  5684. for i, v := range s.LifecycleHookSpecificationList {
  5685. if v == nil {
  5686. continue
  5687. }
  5688. if err := v.Validate(); err != nil {
  5689. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LifecycleHookSpecificationList", i), err.(request.ErrInvalidParams))
  5690. }
  5691. }
  5692. }
  5693. if s.MixedInstancesPolicy != nil {
  5694. if err := s.MixedInstancesPolicy.Validate(); err != nil {
  5695. invalidParams.AddNested("MixedInstancesPolicy", err.(request.ErrInvalidParams))
  5696. }
  5697. }
  5698. if s.Tags != nil {
  5699. for i, v := range s.Tags {
  5700. if v == nil {
  5701. continue
  5702. }
  5703. if err := v.Validate(); err != nil {
  5704. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  5705. }
  5706. }
  5707. }
  5708. if invalidParams.Len() > 0 {
  5709. return invalidParams
  5710. }
  5711. return nil
  5712. }
  5713. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  5714. func (s *CreateAutoScalingGroupInput) SetAutoScalingGroupName(v string) *CreateAutoScalingGroupInput {
  5715. s.AutoScalingGroupName = &v
  5716. return s
  5717. }
  5718. // SetAvailabilityZones sets the AvailabilityZones field's value.
  5719. func (s *CreateAutoScalingGroupInput) SetAvailabilityZones(v []*string) *CreateAutoScalingGroupInput {
  5720. s.AvailabilityZones = v
  5721. return s
  5722. }
  5723. // SetDefaultCooldown sets the DefaultCooldown field's value.
  5724. func (s *CreateAutoScalingGroupInput) SetDefaultCooldown(v int64) *CreateAutoScalingGroupInput {
  5725. s.DefaultCooldown = &v
  5726. return s
  5727. }
  5728. // SetDesiredCapacity sets the DesiredCapacity field's value.
  5729. func (s *CreateAutoScalingGroupInput) SetDesiredCapacity(v int64) *CreateAutoScalingGroupInput {
  5730. s.DesiredCapacity = &v
  5731. return s
  5732. }
  5733. // SetHealthCheckGracePeriod sets the HealthCheckGracePeriod field's value.
  5734. func (s *CreateAutoScalingGroupInput) SetHealthCheckGracePeriod(v int64) *CreateAutoScalingGroupInput {
  5735. s.HealthCheckGracePeriod = &v
  5736. return s
  5737. }
  5738. // SetHealthCheckType sets the HealthCheckType field's value.
  5739. func (s *CreateAutoScalingGroupInput) SetHealthCheckType(v string) *CreateAutoScalingGroupInput {
  5740. s.HealthCheckType = &v
  5741. return s
  5742. }
  5743. // SetInstanceId sets the InstanceId field's value.
  5744. func (s *CreateAutoScalingGroupInput) SetInstanceId(v string) *CreateAutoScalingGroupInput {
  5745. s.InstanceId = &v
  5746. return s
  5747. }
  5748. // SetLaunchConfigurationName sets the LaunchConfigurationName field's value.
  5749. func (s *CreateAutoScalingGroupInput) SetLaunchConfigurationName(v string) *CreateAutoScalingGroupInput {
  5750. s.LaunchConfigurationName = &v
  5751. return s
  5752. }
  5753. // SetLaunchTemplate sets the LaunchTemplate field's value.
  5754. func (s *CreateAutoScalingGroupInput) SetLaunchTemplate(v *LaunchTemplateSpecification) *CreateAutoScalingGroupInput {
  5755. s.LaunchTemplate = v
  5756. return s
  5757. }
  5758. // SetLifecycleHookSpecificationList sets the LifecycleHookSpecificationList field's value.
  5759. func (s *CreateAutoScalingGroupInput) SetLifecycleHookSpecificationList(v []*LifecycleHookSpecification) *CreateAutoScalingGroupInput {
  5760. s.LifecycleHookSpecificationList = v
  5761. return s
  5762. }
  5763. // SetLoadBalancerNames sets the LoadBalancerNames field's value.
  5764. func (s *CreateAutoScalingGroupInput) SetLoadBalancerNames(v []*string) *CreateAutoScalingGroupInput {
  5765. s.LoadBalancerNames = v
  5766. return s
  5767. }
  5768. // SetMaxSize sets the MaxSize field's value.
  5769. func (s *CreateAutoScalingGroupInput) SetMaxSize(v int64) *CreateAutoScalingGroupInput {
  5770. s.MaxSize = &v
  5771. return s
  5772. }
  5773. // SetMinSize sets the MinSize field's value.
  5774. func (s *CreateAutoScalingGroupInput) SetMinSize(v int64) *CreateAutoScalingGroupInput {
  5775. s.MinSize = &v
  5776. return s
  5777. }
  5778. // SetMixedInstancesPolicy sets the MixedInstancesPolicy field's value.
  5779. func (s *CreateAutoScalingGroupInput) SetMixedInstancesPolicy(v *MixedInstancesPolicy) *CreateAutoScalingGroupInput {
  5780. s.MixedInstancesPolicy = v
  5781. return s
  5782. }
  5783. // SetNewInstancesProtectedFromScaleIn sets the NewInstancesProtectedFromScaleIn field's value.
  5784. func (s *CreateAutoScalingGroupInput) SetNewInstancesProtectedFromScaleIn(v bool) *CreateAutoScalingGroupInput {
  5785. s.NewInstancesProtectedFromScaleIn = &v
  5786. return s
  5787. }
  5788. // SetPlacementGroup sets the PlacementGroup field's value.
  5789. func (s *CreateAutoScalingGroupInput) SetPlacementGroup(v string) *CreateAutoScalingGroupInput {
  5790. s.PlacementGroup = &v
  5791. return s
  5792. }
  5793. // SetServiceLinkedRoleARN sets the ServiceLinkedRoleARN field's value.
  5794. func (s *CreateAutoScalingGroupInput) SetServiceLinkedRoleARN(v string) *CreateAutoScalingGroupInput {
  5795. s.ServiceLinkedRoleARN = &v
  5796. return s
  5797. }
  5798. // SetTags sets the Tags field's value.
  5799. func (s *CreateAutoScalingGroupInput) SetTags(v []*Tag) *CreateAutoScalingGroupInput {
  5800. s.Tags = v
  5801. return s
  5802. }
  5803. // SetTargetGroupARNs sets the TargetGroupARNs field's value.
  5804. func (s *CreateAutoScalingGroupInput) SetTargetGroupARNs(v []*string) *CreateAutoScalingGroupInput {
  5805. s.TargetGroupARNs = v
  5806. return s
  5807. }
  5808. // SetTerminationPolicies sets the TerminationPolicies field's value.
  5809. func (s *CreateAutoScalingGroupInput) SetTerminationPolicies(v []*string) *CreateAutoScalingGroupInput {
  5810. s.TerminationPolicies = v
  5811. return s
  5812. }
  5813. // SetVPCZoneIdentifier sets the VPCZoneIdentifier field's value.
  5814. func (s *CreateAutoScalingGroupInput) SetVPCZoneIdentifier(v string) *CreateAutoScalingGroupInput {
  5815. s.VPCZoneIdentifier = &v
  5816. return s
  5817. }
  5818. type CreateAutoScalingGroupOutput struct {
  5819. _ struct{} `type:"structure"`
  5820. }
  5821. // String returns the string representation
  5822. func (s CreateAutoScalingGroupOutput) String() string {
  5823. return awsutil.Prettify(s)
  5824. }
  5825. // GoString returns the string representation
  5826. func (s CreateAutoScalingGroupOutput) GoString() string {
  5827. return s.String()
  5828. }
  5829. type CreateLaunchConfigurationInput struct {
  5830. _ struct{} `type:"structure"`
  5831. // Used for groups that launch instances into a virtual private cloud (VPC).
  5832. // Specifies whether to assign a public IP address to each instance. For more
  5833. // information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html)
  5834. // in the Amazon EC2 Auto Scaling User Guide.
  5835. //
  5836. // If you specify this parameter, be sure to specify at least one subnet when
  5837. // you create your group.
  5838. //
  5839. // Default: If the instance is launched into a default subnet, the default is
  5840. // to assign a public IP address. If the instance is launched into a nondefault
  5841. // subnet, the default is not to assign a public IP address.
  5842. AssociatePublicIpAddress *bool `type:"boolean"`
  5843. // One or more mappings that specify how block devices are exposed to the instance.
  5844. // For more information, see Block Device Mapping (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
  5845. // in the Amazon Elastic Compute Cloud User Guide.
  5846. BlockDeviceMappings []*BlockDeviceMapping `type:"list"`
  5847. // The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.
  5848. // This parameter is supported only if you are launching EC2-Classic instances.
  5849. // For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
  5850. // in the Amazon Elastic Compute Cloud User Guide.
  5851. ClassicLinkVPCId *string `min:"1" type:"string"`
  5852. // The IDs of one or more security groups for the specified ClassicLink-enabled
  5853. // VPC. This parameter is required if you specify a ClassicLink-enabled VPC,
  5854. // and is not supported otherwise. For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
  5855. // in the Amazon Elastic Compute Cloud User Guide.
  5856. ClassicLinkVPCSecurityGroups []*string `type:"list"`
  5857. // Indicates whether the instance is optimized for Amazon EBS I/O. By default,
  5858. // the instance is not optimized for EBS I/O. The optimization provides dedicated
  5859. // throughput to Amazon EBS and an optimized configuration stack to provide
  5860. // optimal I/O performance. This optimization is not available with all instance
  5861. // types. Additional usage charges apply. For more information, see Amazon EBS-Optimized
  5862. // Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html)
  5863. // in the Amazon Elastic Compute Cloud User Guide.
  5864. EbsOptimized *bool `type:"boolean"`
  5865. // The name or the Amazon Resource Name (ARN) of the instance profile associated
  5866. // with the IAM role for the instance.
  5867. //
  5868. // EC2 instances launched with an IAM role automatically have AWS security credentials
  5869. // available. You can use IAM roles with Amazon EC2 Auto Scaling to automatically
  5870. // enable applications running on your EC2 instances to securely access other
  5871. // AWS resources. For more information, see Launch Auto Scaling Instances with
  5872. // an IAM Role (http://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html)
  5873. // in the Amazon EC2 Auto Scaling User Guide.
  5874. IamInstanceProfile *string `min:"1" type:"string"`
  5875. // The ID of the Amazon Machine Image (AMI) to use to launch your EC2 instances.
  5876. //
  5877. // If you do not specify InstanceId, you must specify ImageId.
  5878. //
  5879. // For more information, see Finding an AMI (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html)
  5880. // in the Amazon Elastic Compute Cloud User Guide.
  5881. ImageId *string `min:"1" type:"string"`
  5882. // The ID of the instance to use to create the launch configuration. The new
  5883. // launch configuration derives attributes from the instance, except for the
  5884. // block device mapping.
  5885. //
  5886. // If you do not specify InstanceId, you must specify both ImageId and InstanceType.
  5887. //
  5888. // To create a launch configuration with a block device mapping or override
  5889. // any other instance attributes, specify them as part of the same request.
  5890. //
  5891. // For more information, see Create a Launch Configuration Using an EC2 Instance
  5892. // (http://docs.aws.amazon.com/autoscaling/ec2/userguide/create-lc-with-instanceID.html)
  5893. // in the Amazon EC2 Auto Scaling User Guide.
  5894. InstanceId *string `min:"1" type:"string"`
  5895. // Enables detailed monitoring (true) or basic monitoring (false) for the Auto
  5896. // Scaling instances. The default is true.
  5897. InstanceMonitoring *InstanceMonitoring `type:"structure"`
  5898. // The instance type of the EC2 instance.
  5899. //
  5900. // If you do not specify InstanceId, you must specify InstanceType.
  5901. //
  5902. // For information about available instance types, see Available Instance Types
  5903. // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes)
  5904. // in the Amazon Elastic Compute Cloud User Guide.
  5905. InstanceType *string `min:"1" type:"string"`
  5906. // The ID of the kernel associated with the AMI.
  5907. KernelId *string `min:"1" type:"string"`
  5908. // The name of the key pair. For more information, see Amazon EC2 Key Pairs
  5909. // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) in
  5910. // the Amazon Elastic Compute Cloud User Guide.
  5911. KeyName *string `min:"1" type:"string"`
  5912. // The name of the launch configuration. This name must be unique within the
  5913. // scope of your AWS account.
  5914. //
  5915. // LaunchConfigurationName is a required field
  5916. LaunchConfigurationName *string `min:"1" type:"string" required:"true"`
  5917. // The tenancy of the instance. An instance with a tenancy of dedicated runs
  5918. // on single-tenant hardware and can only be launched into a VPC.
  5919. //
  5920. // To launch Dedicated Instances into a shared tenancy VPC (a VPC with the instance
  5921. // placement tenancy attribute set to default), you must set the value of this
  5922. // parameter to dedicated.
  5923. //
  5924. // If you specify this parameter, be sure to specify at least one subnet when
  5925. // you create your group.
  5926. //
  5927. // For more information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html)
  5928. // in the Amazon EC2 Auto Scaling User Guide.
  5929. //
  5930. // Valid values: default | dedicated
  5931. PlacementTenancy *string `min:"1" type:"string"`
  5932. // The ID of the RAM disk associated with the AMI.
  5933. RamdiskId *string `min:"1" type:"string"`
  5934. // One or more security groups with which to associate the instances.
  5935. //
  5936. // If your instances are launched in EC2-Classic, you can either specify security
  5937. // group names or the security group IDs. For more information, see Amazon EC2
  5938. // Security Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html)
  5939. // in the Amazon Elastic Compute Cloud User Guide.
  5940. //
  5941. // If your instances are launched into a VPC, specify security group IDs. For
  5942. // more information, see Security Groups for Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html)
  5943. // in the Amazon Virtual Private Cloud User Guide.
  5944. SecurityGroups []*string `type:"list"`
  5945. // The maximum hourly price to be paid for any Spot Instance launched to fulfill
  5946. // the request. Spot Instances are launched when the price you specify exceeds
  5947. // the current Spot market price. For more information, see Launching Spot Instances
  5948. // in Your Auto Scaling Group (http://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-spot-instances.html)
  5949. // in the Amazon EC2 Auto Scaling User Guide.
  5950. SpotPrice *string `min:"1" type:"string"`
  5951. // The user data to make available to the launched EC2 instances. For more information,
  5952. // see Instance Metadata and User Data (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
  5953. // in the Amazon Elastic Compute Cloud User Guide.
  5954. UserData *string `type:"string"`
  5955. }
  5956. // String returns the string representation
  5957. func (s CreateLaunchConfigurationInput) String() string {
  5958. return awsutil.Prettify(s)
  5959. }
  5960. // GoString returns the string representation
  5961. func (s CreateLaunchConfigurationInput) GoString() string {
  5962. return s.String()
  5963. }
  5964. // Validate inspects the fields of the type to determine if they are valid.
  5965. func (s *CreateLaunchConfigurationInput) Validate() error {
  5966. invalidParams := request.ErrInvalidParams{Context: "CreateLaunchConfigurationInput"}
  5967. if s.ClassicLinkVPCId != nil && len(*s.ClassicLinkVPCId) < 1 {
  5968. invalidParams.Add(request.NewErrParamMinLen("ClassicLinkVPCId", 1))
  5969. }
  5970. if s.IamInstanceProfile != nil && len(*s.IamInstanceProfile) < 1 {
  5971. invalidParams.Add(request.NewErrParamMinLen("IamInstanceProfile", 1))
  5972. }
  5973. if s.ImageId != nil && len(*s.ImageId) < 1 {
  5974. invalidParams.Add(request.NewErrParamMinLen("ImageId", 1))
  5975. }
  5976. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  5977. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  5978. }
  5979. if s.InstanceType != nil && len(*s.InstanceType) < 1 {
  5980. invalidParams.Add(request.NewErrParamMinLen("InstanceType", 1))
  5981. }
  5982. if s.KernelId != nil && len(*s.KernelId) < 1 {
  5983. invalidParams.Add(request.NewErrParamMinLen("KernelId", 1))
  5984. }
  5985. if s.KeyName != nil && len(*s.KeyName) < 1 {
  5986. invalidParams.Add(request.NewErrParamMinLen("KeyName", 1))
  5987. }
  5988. if s.LaunchConfigurationName == nil {
  5989. invalidParams.Add(request.NewErrParamRequired("LaunchConfigurationName"))
  5990. }
  5991. if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 {
  5992. invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1))
  5993. }
  5994. if s.PlacementTenancy != nil && len(*s.PlacementTenancy) < 1 {
  5995. invalidParams.Add(request.NewErrParamMinLen("PlacementTenancy", 1))
  5996. }
  5997. if s.RamdiskId != nil && len(*s.RamdiskId) < 1 {
  5998. invalidParams.Add(request.NewErrParamMinLen("RamdiskId", 1))
  5999. }
  6000. if s.SpotPrice != nil && len(*s.SpotPrice) < 1 {
  6001. invalidParams.Add(request.NewErrParamMinLen("SpotPrice", 1))
  6002. }
  6003. if s.BlockDeviceMappings != nil {
  6004. for i, v := range s.BlockDeviceMappings {
  6005. if v == nil {
  6006. continue
  6007. }
  6008. if err := v.Validate(); err != nil {
  6009. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "BlockDeviceMappings", i), err.(request.ErrInvalidParams))
  6010. }
  6011. }
  6012. }
  6013. if invalidParams.Len() > 0 {
  6014. return invalidParams
  6015. }
  6016. return nil
  6017. }
  6018. // SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value.
  6019. func (s *CreateLaunchConfigurationInput) SetAssociatePublicIpAddress(v bool) *CreateLaunchConfigurationInput {
  6020. s.AssociatePublicIpAddress = &v
  6021. return s
  6022. }
  6023. // SetBlockDeviceMappings sets the BlockDeviceMappings field's value.
  6024. func (s *CreateLaunchConfigurationInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *CreateLaunchConfigurationInput {
  6025. s.BlockDeviceMappings = v
  6026. return s
  6027. }
  6028. // SetClassicLinkVPCId sets the ClassicLinkVPCId field's value.
  6029. func (s *CreateLaunchConfigurationInput) SetClassicLinkVPCId(v string) *CreateLaunchConfigurationInput {
  6030. s.ClassicLinkVPCId = &v
  6031. return s
  6032. }
  6033. // SetClassicLinkVPCSecurityGroups sets the ClassicLinkVPCSecurityGroups field's value.
  6034. func (s *CreateLaunchConfigurationInput) SetClassicLinkVPCSecurityGroups(v []*string) *CreateLaunchConfigurationInput {
  6035. s.ClassicLinkVPCSecurityGroups = v
  6036. return s
  6037. }
  6038. // SetEbsOptimized sets the EbsOptimized field's value.
  6039. func (s *CreateLaunchConfigurationInput) SetEbsOptimized(v bool) *CreateLaunchConfigurationInput {
  6040. s.EbsOptimized = &v
  6041. return s
  6042. }
  6043. // SetIamInstanceProfile sets the IamInstanceProfile field's value.
  6044. func (s *CreateLaunchConfigurationInput) SetIamInstanceProfile(v string) *CreateLaunchConfigurationInput {
  6045. s.IamInstanceProfile = &v
  6046. return s
  6047. }
  6048. // SetImageId sets the ImageId field's value.
  6049. func (s *CreateLaunchConfigurationInput) SetImageId(v string) *CreateLaunchConfigurationInput {
  6050. s.ImageId = &v
  6051. return s
  6052. }
  6053. // SetInstanceId sets the InstanceId field's value.
  6054. func (s *CreateLaunchConfigurationInput) SetInstanceId(v string) *CreateLaunchConfigurationInput {
  6055. s.InstanceId = &v
  6056. return s
  6057. }
  6058. // SetInstanceMonitoring sets the InstanceMonitoring field's value.
  6059. func (s *CreateLaunchConfigurationInput) SetInstanceMonitoring(v *InstanceMonitoring) *CreateLaunchConfigurationInput {
  6060. s.InstanceMonitoring = v
  6061. return s
  6062. }
  6063. // SetInstanceType sets the InstanceType field's value.
  6064. func (s *CreateLaunchConfigurationInput) SetInstanceType(v string) *CreateLaunchConfigurationInput {
  6065. s.InstanceType = &v
  6066. return s
  6067. }
  6068. // SetKernelId sets the KernelId field's value.
  6069. func (s *CreateLaunchConfigurationInput) SetKernelId(v string) *CreateLaunchConfigurationInput {
  6070. s.KernelId = &v
  6071. return s
  6072. }
  6073. // SetKeyName sets the KeyName field's value.
  6074. func (s *CreateLaunchConfigurationInput) SetKeyName(v string) *CreateLaunchConfigurationInput {
  6075. s.KeyName = &v
  6076. return s
  6077. }
  6078. // SetLaunchConfigurationName sets the LaunchConfigurationName field's value.
  6079. func (s *CreateLaunchConfigurationInput) SetLaunchConfigurationName(v string) *CreateLaunchConfigurationInput {
  6080. s.LaunchConfigurationName = &v
  6081. return s
  6082. }
  6083. // SetPlacementTenancy sets the PlacementTenancy field's value.
  6084. func (s *CreateLaunchConfigurationInput) SetPlacementTenancy(v string) *CreateLaunchConfigurationInput {
  6085. s.PlacementTenancy = &v
  6086. return s
  6087. }
  6088. // SetRamdiskId sets the RamdiskId field's value.
  6089. func (s *CreateLaunchConfigurationInput) SetRamdiskId(v string) *CreateLaunchConfigurationInput {
  6090. s.RamdiskId = &v
  6091. return s
  6092. }
  6093. // SetSecurityGroups sets the SecurityGroups field's value.
  6094. func (s *CreateLaunchConfigurationInput) SetSecurityGroups(v []*string) *CreateLaunchConfigurationInput {
  6095. s.SecurityGroups = v
  6096. return s
  6097. }
  6098. // SetSpotPrice sets the SpotPrice field's value.
  6099. func (s *CreateLaunchConfigurationInput) SetSpotPrice(v string) *CreateLaunchConfigurationInput {
  6100. s.SpotPrice = &v
  6101. return s
  6102. }
  6103. // SetUserData sets the UserData field's value.
  6104. func (s *CreateLaunchConfigurationInput) SetUserData(v string) *CreateLaunchConfigurationInput {
  6105. s.UserData = &v
  6106. return s
  6107. }
  6108. type CreateLaunchConfigurationOutput struct {
  6109. _ struct{} `type:"structure"`
  6110. }
  6111. // String returns the string representation
  6112. func (s CreateLaunchConfigurationOutput) String() string {
  6113. return awsutil.Prettify(s)
  6114. }
  6115. // GoString returns the string representation
  6116. func (s CreateLaunchConfigurationOutput) GoString() string {
  6117. return s.String()
  6118. }
  6119. type CreateOrUpdateTagsInput struct {
  6120. _ struct{} `type:"structure"`
  6121. // One or more tags.
  6122. //
  6123. // Tags is a required field
  6124. Tags []*Tag `type:"list" required:"true"`
  6125. }
  6126. // String returns the string representation
  6127. func (s CreateOrUpdateTagsInput) String() string {
  6128. return awsutil.Prettify(s)
  6129. }
  6130. // GoString returns the string representation
  6131. func (s CreateOrUpdateTagsInput) GoString() string {
  6132. return s.String()
  6133. }
  6134. // Validate inspects the fields of the type to determine if they are valid.
  6135. func (s *CreateOrUpdateTagsInput) Validate() error {
  6136. invalidParams := request.ErrInvalidParams{Context: "CreateOrUpdateTagsInput"}
  6137. if s.Tags == nil {
  6138. invalidParams.Add(request.NewErrParamRequired("Tags"))
  6139. }
  6140. if s.Tags != nil {
  6141. for i, v := range s.Tags {
  6142. if v == nil {
  6143. continue
  6144. }
  6145. if err := v.Validate(); err != nil {
  6146. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  6147. }
  6148. }
  6149. }
  6150. if invalidParams.Len() > 0 {
  6151. return invalidParams
  6152. }
  6153. return nil
  6154. }
  6155. // SetTags sets the Tags field's value.
  6156. func (s *CreateOrUpdateTagsInput) SetTags(v []*Tag) *CreateOrUpdateTagsInput {
  6157. s.Tags = v
  6158. return s
  6159. }
  6160. type CreateOrUpdateTagsOutput struct {
  6161. _ struct{} `type:"structure"`
  6162. }
  6163. // String returns the string representation
  6164. func (s CreateOrUpdateTagsOutput) String() string {
  6165. return awsutil.Prettify(s)
  6166. }
  6167. // GoString returns the string representation
  6168. func (s CreateOrUpdateTagsOutput) GoString() string {
  6169. return s.String()
  6170. }
  6171. // Configures a customized metric for a target tracking policy.
  6172. type CustomizedMetricSpecification struct {
  6173. _ struct{} `type:"structure"`
  6174. // The dimensions of the metric.
  6175. Dimensions []*MetricDimension `type:"list"`
  6176. // The name of the metric.
  6177. //
  6178. // MetricName is a required field
  6179. MetricName *string `type:"string" required:"true"`
  6180. // The namespace of the metric.
  6181. //
  6182. // Namespace is a required field
  6183. Namespace *string `type:"string" required:"true"`
  6184. // The statistic of the metric.
  6185. //
  6186. // Statistic is a required field
  6187. Statistic *string `type:"string" required:"true" enum:"MetricStatistic"`
  6188. // The unit of the metric.
  6189. Unit *string `type:"string"`
  6190. }
  6191. // String returns the string representation
  6192. func (s CustomizedMetricSpecification) String() string {
  6193. return awsutil.Prettify(s)
  6194. }
  6195. // GoString returns the string representation
  6196. func (s CustomizedMetricSpecification) GoString() string {
  6197. return s.String()
  6198. }
  6199. // Validate inspects the fields of the type to determine if they are valid.
  6200. func (s *CustomizedMetricSpecification) Validate() error {
  6201. invalidParams := request.ErrInvalidParams{Context: "CustomizedMetricSpecification"}
  6202. if s.MetricName == nil {
  6203. invalidParams.Add(request.NewErrParamRequired("MetricName"))
  6204. }
  6205. if s.Namespace == nil {
  6206. invalidParams.Add(request.NewErrParamRequired("Namespace"))
  6207. }
  6208. if s.Statistic == nil {
  6209. invalidParams.Add(request.NewErrParamRequired("Statistic"))
  6210. }
  6211. if s.Dimensions != nil {
  6212. for i, v := range s.Dimensions {
  6213. if v == nil {
  6214. continue
  6215. }
  6216. if err := v.Validate(); err != nil {
  6217. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams))
  6218. }
  6219. }
  6220. }
  6221. if invalidParams.Len() > 0 {
  6222. return invalidParams
  6223. }
  6224. return nil
  6225. }
  6226. // SetDimensions sets the Dimensions field's value.
  6227. func (s *CustomizedMetricSpecification) SetDimensions(v []*MetricDimension) *CustomizedMetricSpecification {
  6228. s.Dimensions = v
  6229. return s
  6230. }
  6231. // SetMetricName sets the MetricName field's value.
  6232. func (s *CustomizedMetricSpecification) SetMetricName(v string) *CustomizedMetricSpecification {
  6233. s.MetricName = &v
  6234. return s
  6235. }
  6236. // SetNamespace sets the Namespace field's value.
  6237. func (s *CustomizedMetricSpecification) SetNamespace(v string) *CustomizedMetricSpecification {
  6238. s.Namespace = &v
  6239. return s
  6240. }
  6241. // SetStatistic sets the Statistic field's value.
  6242. func (s *CustomizedMetricSpecification) SetStatistic(v string) *CustomizedMetricSpecification {
  6243. s.Statistic = &v
  6244. return s
  6245. }
  6246. // SetUnit sets the Unit field's value.
  6247. func (s *CustomizedMetricSpecification) SetUnit(v string) *CustomizedMetricSpecification {
  6248. s.Unit = &v
  6249. return s
  6250. }
  6251. type DeleteAutoScalingGroupInput struct {
  6252. _ struct{} `type:"structure"`
  6253. // The name of the Auto Scaling group.
  6254. //
  6255. // AutoScalingGroupName is a required field
  6256. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  6257. // Specifies that the group is to be deleted along with all instances associated
  6258. // with the group, without waiting for all instances to be terminated. This
  6259. // parameter also deletes any lifecycle actions associated with the group.
  6260. ForceDelete *bool `type:"boolean"`
  6261. }
  6262. // String returns the string representation
  6263. func (s DeleteAutoScalingGroupInput) String() string {
  6264. return awsutil.Prettify(s)
  6265. }
  6266. // GoString returns the string representation
  6267. func (s DeleteAutoScalingGroupInput) GoString() string {
  6268. return s.String()
  6269. }
  6270. // Validate inspects the fields of the type to determine if they are valid.
  6271. func (s *DeleteAutoScalingGroupInput) Validate() error {
  6272. invalidParams := request.ErrInvalidParams{Context: "DeleteAutoScalingGroupInput"}
  6273. if s.AutoScalingGroupName == nil {
  6274. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  6275. }
  6276. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6277. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6278. }
  6279. if invalidParams.Len() > 0 {
  6280. return invalidParams
  6281. }
  6282. return nil
  6283. }
  6284. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  6285. func (s *DeleteAutoScalingGroupInput) SetAutoScalingGroupName(v string) *DeleteAutoScalingGroupInput {
  6286. s.AutoScalingGroupName = &v
  6287. return s
  6288. }
  6289. // SetForceDelete sets the ForceDelete field's value.
  6290. func (s *DeleteAutoScalingGroupInput) SetForceDelete(v bool) *DeleteAutoScalingGroupInput {
  6291. s.ForceDelete = &v
  6292. return s
  6293. }
  6294. type DeleteAutoScalingGroupOutput struct {
  6295. _ struct{} `type:"structure"`
  6296. }
  6297. // String returns the string representation
  6298. func (s DeleteAutoScalingGroupOutput) String() string {
  6299. return awsutil.Prettify(s)
  6300. }
  6301. // GoString returns the string representation
  6302. func (s DeleteAutoScalingGroupOutput) GoString() string {
  6303. return s.String()
  6304. }
  6305. type DeleteLaunchConfigurationInput struct {
  6306. _ struct{} `type:"structure"`
  6307. // The name of the launch configuration.
  6308. //
  6309. // LaunchConfigurationName is a required field
  6310. LaunchConfigurationName *string `min:"1" type:"string" required:"true"`
  6311. }
  6312. // String returns the string representation
  6313. func (s DeleteLaunchConfigurationInput) String() string {
  6314. return awsutil.Prettify(s)
  6315. }
  6316. // GoString returns the string representation
  6317. func (s DeleteLaunchConfigurationInput) GoString() string {
  6318. return s.String()
  6319. }
  6320. // Validate inspects the fields of the type to determine if they are valid.
  6321. func (s *DeleteLaunchConfigurationInput) Validate() error {
  6322. invalidParams := request.ErrInvalidParams{Context: "DeleteLaunchConfigurationInput"}
  6323. if s.LaunchConfigurationName == nil {
  6324. invalidParams.Add(request.NewErrParamRequired("LaunchConfigurationName"))
  6325. }
  6326. if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 {
  6327. invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1))
  6328. }
  6329. if invalidParams.Len() > 0 {
  6330. return invalidParams
  6331. }
  6332. return nil
  6333. }
  6334. // SetLaunchConfigurationName sets the LaunchConfigurationName field's value.
  6335. func (s *DeleteLaunchConfigurationInput) SetLaunchConfigurationName(v string) *DeleteLaunchConfigurationInput {
  6336. s.LaunchConfigurationName = &v
  6337. return s
  6338. }
  6339. type DeleteLaunchConfigurationOutput struct {
  6340. _ struct{} `type:"structure"`
  6341. }
  6342. // String returns the string representation
  6343. func (s DeleteLaunchConfigurationOutput) String() string {
  6344. return awsutil.Prettify(s)
  6345. }
  6346. // GoString returns the string representation
  6347. func (s DeleteLaunchConfigurationOutput) GoString() string {
  6348. return s.String()
  6349. }
  6350. type DeleteLifecycleHookInput struct {
  6351. _ struct{} `type:"structure"`
  6352. // The name of the Auto Scaling group.
  6353. //
  6354. // AutoScalingGroupName is a required field
  6355. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  6356. // The name of the lifecycle hook.
  6357. //
  6358. // LifecycleHookName is a required field
  6359. LifecycleHookName *string `min:"1" type:"string" required:"true"`
  6360. }
  6361. // String returns the string representation
  6362. func (s DeleteLifecycleHookInput) String() string {
  6363. return awsutil.Prettify(s)
  6364. }
  6365. // GoString returns the string representation
  6366. func (s DeleteLifecycleHookInput) GoString() string {
  6367. return s.String()
  6368. }
  6369. // Validate inspects the fields of the type to determine if they are valid.
  6370. func (s *DeleteLifecycleHookInput) Validate() error {
  6371. invalidParams := request.ErrInvalidParams{Context: "DeleteLifecycleHookInput"}
  6372. if s.AutoScalingGroupName == nil {
  6373. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  6374. }
  6375. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6376. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6377. }
  6378. if s.LifecycleHookName == nil {
  6379. invalidParams.Add(request.NewErrParamRequired("LifecycleHookName"))
  6380. }
  6381. if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 {
  6382. invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1))
  6383. }
  6384. if invalidParams.Len() > 0 {
  6385. return invalidParams
  6386. }
  6387. return nil
  6388. }
  6389. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  6390. func (s *DeleteLifecycleHookInput) SetAutoScalingGroupName(v string) *DeleteLifecycleHookInput {
  6391. s.AutoScalingGroupName = &v
  6392. return s
  6393. }
  6394. // SetLifecycleHookName sets the LifecycleHookName field's value.
  6395. func (s *DeleteLifecycleHookInput) SetLifecycleHookName(v string) *DeleteLifecycleHookInput {
  6396. s.LifecycleHookName = &v
  6397. return s
  6398. }
  6399. type DeleteLifecycleHookOutput struct {
  6400. _ struct{} `type:"structure"`
  6401. }
  6402. // String returns the string representation
  6403. func (s DeleteLifecycleHookOutput) String() string {
  6404. return awsutil.Prettify(s)
  6405. }
  6406. // GoString returns the string representation
  6407. func (s DeleteLifecycleHookOutput) GoString() string {
  6408. return s.String()
  6409. }
  6410. type DeleteNotificationConfigurationInput struct {
  6411. _ struct{} `type:"structure"`
  6412. // The name of the Auto Scaling group.
  6413. //
  6414. // AutoScalingGroupName is a required field
  6415. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  6416. // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service
  6417. // (Amazon SNS) topic.
  6418. //
  6419. // TopicARN is a required field
  6420. TopicARN *string `min:"1" type:"string" required:"true"`
  6421. }
  6422. // String returns the string representation
  6423. func (s DeleteNotificationConfigurationInput) String() string {
  6424. return awsutil.Prettify(s)
  6425. }
  6426. // GoString returns the string representation
  6427. func (s DeleteNotificationConfigurationInput) GoString() string {
  6428. return s.String()
  6429. }
  6430. // Validate inspects the fields of the type to determine if they are valid.
  6431. func (s *DeleteNotificationConfigurationInput) Validate() error {
  6432. invalidParams := request.ErrInvalidParams{Context: "DeleteNotificationConfigurationInput"}
  6433. if s.AutoScalingGroupName == nil {
  6434. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  6435. }
  6436. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6437. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6438. }
  6439. if s.TopicARN == nil {
  6440. invalidParams.Add(request.NewErrParamRequired("TopicARN"))
  6441. }
  6442. if s.TopicARN != nil && len(*s.TopicARN) < 1 {
  6443. invalidParams.Add(request.NewErrParamMinLen("TopicARN", 1))
  6444. }
  6445. if invalidParams.Len() > 0 {
  6446. return invalidParams
  6447. }
  6448. return nil
  6449. }
  6450. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  6451. func (s *DeleteNotificationConfigurationInput) SetAutoScalingGroupName(v string) *DeleteNotificationConfigurationInput {
  6452. s.AutoScalingGroupName = &v
  6453. return s
  6454. }
  6455. // SetTopicARN sets the TopicARN field's value.
  6456. func (s *DeleteNotificationConfigurationInput) SetTopicARN(v string) *DeleteNotificationConfigurationInput {
  6457. s.TopicARN = &v
  6458. return s
  6459. }
  6460. type DeleteNotificationConfigurationOutput struct {
  6461. _ struct{} `type:"structure"`
  6462. }
  6463. // String returns the string representation
  6464. func (s DeleteNotificationConfigurationOutput) String() string {
  6465. return awsutil.Prettify(s)
  6466. }
  6467. // GoString returns the string representation
  6468. func (s DeleteNotificationConfigurationOutput) GoString() string {
  6469. return s.String()
  6470. }
  6471. type DeletePolicyInput struct {
  6472. _ struct{} `type:"structure"`
  6473. // The name of the Auto Scaling group.
  6474. AutoScalingGroupName *string `min:"1" type:"string"`
  6475. // The name or Amazon Resource Name (ARN) of the policy.
  6476. //
  6477. // PolicyName is a required field
  6478. PolicyName *string `min:"1" type:"string" required:"true"`
  6479. }
  6480. // String returns the string representation
  6481. func (s DeletePolicyInput) String() string {
  6482. return awsutil.Prettify(s)
  6483. }
  6484. // GoString returns the string representation
  6485. func (s DeletePolicyInput) GoString() string {
  6486. return s.String()
  6487. }
  6488. // Validate inspects the fields of the type to determine if they are valid.
  6489. func (s *DeletePolicyInput) Validate() error {
  6490. invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"}
  6491. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6492. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6493. }
  6494. if s.PolicyName == nil {
  6495. invalidParams.Add(request.NewErrParamRequired("PolicyName"))
  6496. }
  6497. if s.PolicyName != nil && len(*s.PolicyName) < 1 {
  6498. invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
  6499. }
  6500. if invalidParams.Len() > 0 {
  6501. return invalidParams
  6502. }
  6503. return nil
  6504. }
  6505. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  6506. func (s *DeletePolicyInput) SetAutoScalingGroupName(v string) *DeletePolicyInput {
  6507. s.AutoScalingGroupName = &v
  6508. return s
  6509. }
  6510. // SetPolicyName sets the PolicyName field's value.
  6511. func (s *DeletePolicyInput) SetPolicyName(v string) *DeletePolicyInput {
  6512. s.PolicyName = &v
  6513. return s
  6514. }
  6515. type DeletePolicyOutput struct {
  6516. _ struct{} `type:"structure"`
  6517. }
  6518. // String returns the string representation
  6519. func (s DeletePolicyOutput) String() string {
  6520. return awsutil.Prettify(s)
  6521. }
  6522. // GoString returns the string representation
  6523. func (s DeletePolicyOutput) GoString() string {
  6524. return s.String()
  6525. }
  6526. type DeleteScheduledActionInput struct {
  6527. _ struct{} `type:"structure"`
  6528. // The name of the Auto Scaling group.
  6529. //
  6530. // AutoScalingGroupName is a required field
  6531. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  6532. // The name of the action to delete.
  6533. //
  6534. // ScheduledActionName is a required field
  6535. ScheduledActionName *string `min:"1" type:"string" required:"true"`
  6536. }
  6537. // String returns the string representation
  6538. func (s DeleteScheduledActionInput) String() string {
  6539. return awsutil.Prettify(s)
  6540. }
  6541. // GoString returns the string representation
  6542. func (s DeleteScheduledActionInput) GoString() string {
  6543. return s.String()
  6544. }
  6545. // Validate inspects the fields of the type to determine if they are valid.
  6546. func (s *DeleteScheduledActionInput) Validate() error {
  6547. invalidParams := request.ErrInvalidParams{Context: "DeleteScheduledActionInput"}
  6548. if s.AutoScalingGroupName == nil {
  6549. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  6550. }
  6551. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6552. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6553. }
  6554. if s.ScheduledActionName == nil {
  6555. invalidParams.Add(request.NewErrParamRequired("ScheduledActionName"))
  6556. }
  6557. if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 {
  6558. invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1))
  6559. }
  6560. if invalidParams.Len() > 0 {
  6561. return invalidParams
  6562. }
  6563. return nil
  6564. }
  6565. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  6566. func (s *DeleteScheduledActionInput) SetAutoScalingGroupName(v string) *DeleteScheduledActionInput {
  6567. s.AutoScalingGroupName = &v
  6568. return s
  6569. }
  6570. // SetScheduledActionName sets the ScheduledActionName field's value.
  6571. func (s *DeleteScheduledActionInput) SetScheduledActionName(v string) *DeleteScheduledActionInput {
  6572. s.ScheduledActionName = &v
  6573. return s
  6574. }
  6575. type DeleteScheduledActionOutput struct {
  6576. _ struct{} `type:"structure"`
  6577. }
  6578. // String returns the string representation
  6579. func (s DeleteScheduledActionOutput) String() string {
  6580. return awsutil.Prettify(s)
  6581. }
  6582. // GoString returns the string representation
  6583. func (s DeleteScheduledActionOutput) GoString() string {
  6584. return s.String()
  6585. }
  6586. type DeleteTagsInput struct {
  6587. _ struct{} `type:"structure"`
  6588. // One or more tags.
  6589. //
  6590. // Tags is a required field
  6591. Tags []*Tag `type:"list" required:"true"`
  6592. }
  6593. // String returns the string representation
  6594. func (s DeleteTagsInput) String() string {
  6595. return awsutil.Prettify(s)
  6596. }
  6597. // GoString returns the string representation
  6598. func (s DeleteTagsInput) GoString() string {
  6599. return s.String()
  6600. }
  6601. // Validate inspects the fields of the type to determine if they are valid.
  6602. func (s *DeleteTagsInput) Validate() error {
  6603. invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"}
  6604. if s.Tags == nil {
  6605. invalidParams.Add(request.NewErrParamRequired("Tags"))
  6606. }
  6607. if s.Tags != nil {
  6608. for i, v := range s.Tags {
  6609. if v == nil {
  6610. continue
  6611. }
  6612. if err := v.Validate(); err != nil {
  6613. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  6614. }
  6615. }
  6616. }
  6617. if invalidParams.Len() > 0 {
  6618. return invalidParams
  6619. }
  6620. return nil
  6621. }
  6622. // SetTags sets the Tags field's value.
  6623. func (s *DeleteTagsInput) SetTags(v []*Tag) *DeleteTagsInput {
  6624. s.Tags = v
  6625. return s
  6626. }
  6627. type DeleteTagsOutput struct {
  6628. _ struct{} `type:"structure"`
  6629. }
  6630. // String returns the string representation
  6631. func (s DeleteTagsOutput) String() string {
  6632. return awsutil.Prettify(s)
  6633. }
  6634. // GoString returns the string representation
  6635. func (s DeleteTagsOutput) GoString() string {
  6636. return s.String()
  6637. }
  6638. type DescribeAccountLimitsInput struct {
  6639. _ struct{} `type:"structure"`
  6640. }
  6641. // String returns the string representation
  6642. func (s DescribeAccountLimitsInput) String() string {
  6643. return awsutil.Prettify(s)
  6644. }
  6645. // GoString returns the string representation
  6646. func (s DescribeAccountLimitsInput) GoString() string {
  6647. return s.String()
  6648. }
  6649. type DescribeAccountLimitsOutput struct {
  6650. _ struct{} `type:"structure"`
  6651. // The maximum number of groups allowed for your AWS account. The default limit
  6652. // is 20 per region.
  6653. MaxNumberOfAutoScalingGroups *int64 `type:"integer"`
  6654. // The maximum number of launch configurations allowed for your AWS account.
  6655. // The default limit is 100 per region.
  6656. MaxNumberOfLaunchConfigurations *int64 `type:"integer"`
  6657. // The current number of groups for your AWS account.
  6658. NumberOfAutoScalingGroups *int64 `type:"integer"`
  6659. // The current number of launch configurations for your AWS account.
  6660. NumberOfLaunchConfigurations *int64 `type:"integer"`
  6661. }
  6662. // String returns the string representation
  6663. func (s DescribeAccountLimitsOutput) String() string {
  6664. return awsutil.Prettify(s)
  6665. }
  6666. // GoString returns the string representation
  6667. func (s DescribeAccountLimitsOutput) GoString() string {
  6668. return s.String()
  6669. }
  6670. // SetMaxNumberOfAutoScalingGroups sets the MaxNumberOfAutoScalingGroups field's value.
  6671. func (s *DescribeAccountLimitsOutput) SetMaxNumberOfAutoScalingGroups(v int64) *DescribeAccountLimitsOutput {
  6672. s.MaxNumberOfAutoScalingGroups = &v
  6673. return s
  6674. }
  6675. // SetMaxNumberOfLaunchConfigurations sets the MaxNumberOfLaunchConfigurations field's value.
  6676. func (s *DescribeAccountLimitsOutput) SetMaxNumberOfLaunchConfigurations(v int64) *DescribeAccountLimitsOutput {
  6677. s.MaxNumberOfLaunchConfigurations = &v
  6678. return s
  6679. }
  6680. // SetNumberOfAutoScalingGroups sets the NumberOfAutoScalingGroups field's value.
  6681. func (s *DescribeAccountLimitsOutput) SetNumberOfAutoScalingGroups(v int64) *DescribeAccountLimitsOutput {
  6682. s.NumberOfAutoScalingGroups = &v
  6683. return s
  6684. }
  6685. // SetNumberOfLaunchConfigurations sets the NumberOfLaunchConfigurations field's value.
  6686. func (s *DescribeAccountLimitsOutput) SetNumberOfLaunchConfigurations(v int64) *DescribeAccountLimitsOutput {
  6687. s.NumberOfLaunchConfigurations = &v
  6688. return s
  6689. }
  6690. type DescribeAdjustmentTypesInput struct {
  6691. _ struct{} `type:"structure"`
  6692. }
  6693. // String returns the string representation
  6694. func (s DescribeAdjustmentTypesInput) String() string {
  6695. return awsutil.Prettify(s)
  6696. }
  6697. // GoString returns the string representation
  6698. func (s DescribeAdjustmentTypesInput) GoString() string {
  6699. return s.String()
  6700. }
  6701. type DescribeAdjustmentTypesOutput struct {
  6702. _ struct{} `type:"structure"`
  6703. // The policy adjustment types.
  6704. AdjustmentTypes []*AdjustmentType `type:"list"`
  6705. }
  6706. // String returns the string representation
  6707. func (s DescribeAdjustmentTypesOutput) String() string {
  6708. return awsutil.Prettify(s)
  6709. }
  6710. // GoString returns the string representation
  6711. func (s DescribeAdjustmentTypesOutput) GoString() string {
  6712. return s.String()
  6713. }
  6714. // SetAdjustmentTypes sets the AdjustmentTypes field's value.
  6715. func (s *DescribeAdjustmentTypesOutput) SetAdjustmentTypes(v []*AdjustmentType) *DescribeAdjustmentTypesOutput {
  6716. s.AdjustmentTypes = v
  6717. return s
  6718. }
  6719. type DescribeAutoScalingGroupsInput struct {
  6720. _ struct{} `type:"structure"`
  6721. // The names of the Auto Scaling groups. You can specify up to MaxRecords names.
  6722. // If you omit this parameter, all Auto Scaling groups are described.
  6723. AutoScalingGroupNames []*string `type:"list"`
  6724. // The maximum number of items to return with this call. The default value is
  6725. // 50 and the maximum value is 100.
  6726. MaxRecords *int64 `type:"integer"`
  6727. // The token for the next set of items to return. (You received this token from
  6728. // a previous call.)
  6729. NextToken *string `type:"string"`
  6730. }
  6731. // String returns the string representation
  6732. func (s DescribeAutoScalingGroupsInput) String() string {
  6733. return awsutil.Prettify(s)
  6734. }
  6735. // GoString returns the string representation
  6736. func (s DescribeAutoScalingGroupsInput) GoString() string {
  6737. return s.String()
  6738. }
  6739. // SetAutoScalingGroupNames sets the AutoScalingGroupNames field's value.
  6740. func (s *DescribeAutoScalingGroupsInput) SetAutoScalingGroupNames(v []*string) *DescribeAutoScalingGroupsInput {
  6741. s.AutoScalingGroupNames = v
  6742. return s
  6743. }
  6744. // SetMaxRecords sets the MaxRecords field's value.
  6745. func (s *DescribeAutoScalingGroupsInput) SetMaxRecords(v int64) *DescribeAutoScalingGroupsInput {
  6746. s.MaxRecords = &v
  6747. return s
  6748. }
  6749. // SetNextToken sets the NextToken field's value.
  6750. func (s *DescribeAutoScalingGroupsInput) SetNextToken(v string) *DescribeAutoScalingGroupsInput {
  6751. s.NextToken = &v
  6752. return s
  6753. }
  6754. type DescribeAutoScalingGroupsOutput struct {
  6755. _ struct{} `type:"structure"`
  6756. // The groups.
  6757. //
  6758. // AutoScalingGroups is a required field
  6759. AutoScalingGroups []*Group `type:"list" required:"true"`
  6760. // The token to use when requesting the next set of items. If there are no additional
  6761. // items to return, the string is empty.
  6762. NextToken *string `type:"string"`
  6763. }
  6764. // String returns the string representation
  6765. func (s DescribeAutoScalingGroupsOutput) String() string {
  6766. return awsutil.Prettify(s)
  6767. }
  6768. // GoString returns the string representation
  6769. func (s DescribeAutoScalingGroupsOutput) GoString() string {
  6770. return s.String()
  6771. }
  6772. // SetAutoScalingGroups sets the AutoScalingGroups field's value.
  6773. func (s *DescribeAutoScalingGroupsOutput) SetAutoScalingGroups(v []*Group) *DescribeAutoScalingGroupsOutput {
  6774. s.AutoScalingGroups = v
  6775. return s
  6776. }
  6777. // SetNextToken sets the NextToken field's value.
  6778. func (s *DescribeAutoScalingGroupsOutput) SetNextToken(v string) *DescribeAutoScalingGroupsOutput {
  6779. s.NextToken = &v
  6780. return s
  6781. }
  6782. type DescribeAutoScalingInstancesInput struct {
  6783. _ struct{} `type:"structure"`
  6784. // The IDs of the instances. You can specify up to MaxRecords IDs. If you omit
  6785. // this parameter, all Auto Scaling instances are described. If you specify
  6786. // an ID that does not exist, it is ignored with no error.
  6787. InstanceIds []*string `type:"list"`
  6788. // The maximum number of items to return with this call. The default value is
  6789. // 50 and the maximum value is 50.
  6790. MaxRecords *int64 `type:"integer"`
  6791. // The token for the next set of items to return. (You received this token from
  6792. // a previous call.)
  6793. NextToken *string `type:"string"`
  6794. }
  6795. // String returns the string representation
  6796. func (s DescribeAutoScalingInstancesInput) String() string {
  6797. return awsutil.Prettify(s)
  6798. }
  6799. // GoString returns the string representation
  6800. func (s DescribeAutoScalingInstancesInput) GoString() string {
  6801. return s.String()
  6802. }
  6803. // SetInstanceIds sets the InstanceIds field's value.
  6804. func (s *DescribeAutoScalingInstancesInput) SetInstanceIds(v []*string) *DescribeAutoScalingInstancesInput {
  6805. s.InstanceIds = v
  6806. return s
  6807. }
  6808. // SetMaxRecords sets the MaxRecords field's value.
  6809. func (s *DescribeAutoScalingInstancesInput) SetMaxRecords(v int64) *DescribeAutoScalingInstancesInput {
  6810. s.MaxRecords = &v
  6811. return s
  6812. }
  6813. // SetNextToken sets the NextToken field's value.
  6814. func (s *DescribeAutoScalingInstancesInput) SetNextToken(v string) *DescribeAutoScalingInstancesInput {
  6815. s.NextToken = &v
  6816. return s
  6817. }
  6818. type DescribeAutoScalingInstancesOutput struct {
  6819. _ struct{} `type:"structure"`
  6820. // The instances.
  6821. AutoScalingInstances []*InstanceDetails `type:"list"`
  6822. // The token to use when requesting the next set of items. If there are no additional
  6823. // items to return, the string is empty.
  6824. NextToken *string `type:"string"`
  6825. }
  6826. // String returns the string representation
  6827. func (s DescribeAutoScalingInstancesOutput) String() string {
  6828. return awsutil.Prettify(s)
  6829. }
  6830. // GoString returns the string representation
  6831. func (s DescribeAutoScalingInstancesOutput) GoString() string {
  6832. return s.String()
  6833. }
  6834. // SetAutoScalingInstances sets the AutoScalingInstances field's value.
  6835. func (s *DescribeAutoScalingInstancesOutput) SetAutoScalingInstances(v []*InstanceDetails) *DescribeAutoScalingInstancesOutput {
  6836. s.AutoScalingInstances = v
  6837. return s
  6838. }
  6839. // SetNextToken sets the NextToken field's value.
  6840. func (s *DescribeAutoScalingInstancesOutput) SetNextToken(v string) *DescribeAutoScalingInstancesOutput {
  6841. s.NextToken = &v
  6842. return s
  6843. }
  6844. type DescribeAutoScalingNotificationTypesInput struct {
  6845. _ struct{} `type:"structure"`
  6846. }
  6847. // String returns the string representation
  6848. func (s DescribeAutoScalingNotificationTypesInput) String() string {
  6849. return awsutil.Prettify(s)
  6850. }
  6851. // GoString returns the string representation
  6852. func (s DescribeAutoScalingNotificationTypesInput) GoString() string {
  6853. return s.String()
  6854. }
  6855. type DescribeAutoScalingNotificationTypesOutput struct {
  6856. _ struct{} `type:"structure"`
  6857. // The notification types.
  6858. AutoScalingNotificationTypes []*string `type:"list"`
  6859. }
  6860. // String returns the string representation
  6861. func (s DescribeAutoScalingNotificationTypesOutput) String() string {
  6862. return awsutil.Prettify(s)
  6863. }
  6864. // GoString returns the string representation
  6865. func (s DescribeAutoScalingNotificationTypesOutput) GoString() string {
  6866. return s.String()
  6867. }
  6868. // SetAutoScalingNotificationTypes sets the AutoScalingNotificationTypes field's value.
  6869. func (s *DescribeAutoScalingNotificationTypesOutput) SetAutoScalingNotificationTypes(v []*string) *DescribeAutoScalingNotificationTypesOutput {
  6870. s.AutoScalingNotificationTypes = v
  6871. return s
  6872. }
  6873. type DescribeLaunchConfigurationsInput struct {
  6874. _ struct{} `type:"structure"`
  6875. // The launch configuration names. If you omit this parameter, all launch configurations
  6876. // are described.
  6877. LaunchConfigurationNames []*string `type:"list"`
  6878. // The maximum number of items to return with this call. The default value is
  6879. // 50 and the maximum value is 100.
  6880. MaxRecords *int64 `type:"integer"`
  6881. // The token for the next set of items to return. (You received this token from
  6882. // a previous call.)
  6883. NextToken *string `type:"string"`
  6884. }
  6885. // String returns the string representation
  6886. func (s DescribeLaunchConfigurationsInput) String() string {
  6887. return awsutil.Prettify(s)
  6888. }
  6889. // GoString returns the string representation
  6890. func (s DescribeLaunchConfigurationsInput) GoString() string {
  6891. return s.String()
  6892. }
  6893. // SetLaunchConfigurationNames sets the LaunchConfigurationNames field's value.
  6894. func (s *DescribeLaunchConfigurationsInput) SetLaunchConfigurationNames(v []*string) *DescribeLaunchConfigurationsInput {
  6895. s.LaunchConfigurationNames = v
  6896. return s
  6897. }
  6898. // SetMaxRecords sets the MaxRecords field's value.
  6899. func (s *DescribeLaunchConfigurationsInput) SetMaxRecords(v int64) *DescribeLaunchConfigurationsInput {
  6900. s.MaxRecords = &v
  6901. return s
  6902. }
  6903. // SetNextToken sets the NextToken field's value.
  6904. func (s *DescribeLaunchConfigurationsInput) SetNextToken(v string) *DescribeLaunchConfigurationsInput {
  6905. s.NextToken = &v
  6906. return s
  6907. }
  6908. type DescribeLaunchConfigurationsOutput struct {
  6909. _ struct{} `type:"structure"`
  6910. // The launch configurations.
  6911. //
  6912. // LaunchConfigurations is a required field
  6913. LaunchConfigurations []*LaunchConfiguration `type:"list" required:"true"`
  6914. // The token to use when requesting the next set of items. If there are no additional
  6915. // items to return, the string is empty.
  6916. NextToken *string `type:"string"`
  6917. }
  6918. // String returns the string representation
  6919. func (s DescribeLaunchConfigurationsOutput) String() string {
  6920. return awsutil.Prettify(s)
  6921. }
  6922. // GoString returns the string representation
  6923. func (s DescribeLaunchConfigurationsOutput) GoString() string {
  6924. return s.String()
  6925. }
  6926. // SetLaunchConfigurations sets the LaunchConfigurations field's value.
  6927. func (s *DescribeLaunchConfigurationsOutput) SetLaunchConfigurations(v []*LaunchConfiguration) *DescribeLaunchConfigurationsOutput {
  6928. s.LaunchConfigurations = v
  6929. return s
  6930. }
  6931. // SetNextToken sets the NextToken field's value.
  6932. func (s *DescribeLaunchConfigurationsOutput) SetNextToken(v string) *DescribeLaunchConfigurationsOutput {
  6933. s.NextToken = &v
  6934. return s
  6935. }
  6936. type DescribeLifecycleHookTypesInput struct {
  6937. _ struct{} `type:"structure"`
  6938. }
  6939. // String returns the string representation
  6940. func (s DescribeLifecycleHookTypesInput) String() string {
  6941. return awsutil.Prettify(s)
  6942. }
  6943. // GoString returns the string representation
  6944. func (s DescribeLifecycleHookTypesInput) GoString() string {
  6945. return s.String()
  6946. }
  6947. type DescribeLifecycleHookTypesOutput struct {
  6948. _ struct{} `type:"structure"`
  6949. // The lifecycle hook types.
  6950. LifecycleHookTypes []*string `type:"list"`
  6951. }
  6952. // String returns the string representation
  6953. func (s DescribeLifecycleHookTypesOutput) String() string {
  6954. return awsutil.Prettify(s)
  6955. }
  6956. // GoString returns the string representation
  6957. func (s DescribeLifecycleHookTypesOutput) GoString() string {
  6958. return s.String()
  6959. }
  6960. // SetLifecycleHookTypes sets the LifecycleHookTypes field's value.
  6961. func (s *DescribeLifecycleHookTypesOutput) SetLifecycleHookTypes(v []*string) *DescribeLifecycleHookTypesOutput {
  6962. s.LifecycleHookTypes = v
  6963. return s
  6964. }
  6965. type DescribeLifecycleHooksInput struct {
  6966. _ struct{} `type:"structure"`
  6967. // The name of the Auto Scaling group.
  6968. //
  6969. // AutoScalingGroupName is a required field
  6970. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  6971. // The names of one or more lifecycle hooks. If you omit this parameter, all
  6972. // lifecycle hooks are described.
  6973. LifecycleHookNames []*string `type:"list"`
  6974. }
  6975. // String returns the string representation
  6976. func (s DescribeLifecycleHooksInput) String() string {
  6977. return awsutil.Prettify(s)
  6978. }
  6979. // GoString returns the string representation
  6980. func (s DescribeLifecycleHooksInput) GoString() string {
  6981. return s.String()
  6982. }
  6983. // Validate inspects the fields of the type to determine if they are valid.
  6984. func (s *DescribeLifecycleHooksInput) Validate() error {
  6985. invalidParams := request.ErrInvalidParams{Context: "DescribeLifecycleHooksInput"}
  6986. if s.AutoScalingGroupName == nil {
  6987. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  6988. }
  6989. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6990. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6991. }
  6992. if invalidParams.Len() > 0 {
  6993. return invalidParams
  6994. }
  6995. return nil
  6996. }
  6997. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  6998. func (s *DescribeLifecycleHooksInput) SetAutoScalingGroupName(v string) *DescribeLifecycleHooksInput {
  6999. s.AutoScalingGroupName = &v
  7000. return s
  7001. }
  7002. // SetLifecycleHookNames sets the LifecycleHookNames field's value.
  7003. func (s *DescribeLifecycleHooksInput) SetLifecycleHookNames(v []*string) *DescribeLifecycleHooksInput {
  7004. s.LifecycleHookNames = v
  7005. return s
  7006. }
  7007. type DescribeLifecycleHooksOutput struct {
  7008. _ struct{} `type:"structure"`
  7009. // The lifecycle hooks for the specified group.
  7010. LifecycleHooks []*LifecycleHook `type:"list"`
  7011. }
  7012. // String returns the string representation
  7013. func (s DescribeLifecycleHooksOutput) String() string {
  7014. return awsutil.Prettify(s)
  7015. }
  7016. // GoString returns the string representation
  7017. func (s DescribeLifecycleHooksOutput) GoString() string {
  7018. return s.String()
  7019. }
  7020. // SetLifecycleHooks sets the LifecycleHooks field's value.
  7021. func (s *DescribeLifecycleHooksOutput) SetLifecycleHooks(v []*LifecycleHook) *DescribeLifecycleHooksOutput {
  7022. s.LifecycleHooks = v
  7023. return s
  7024. }
  7025. type DescribeLoadBalancerTargetGroupsInput struct {
  7026. _ struct{} `type:"structure"`
  7027. // The name of the Auto Scaling group.
  7028. //
  7029. // AutoScalingGroupName is a required field
  7030. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7031. // The maximum number of items to return with this call. The default value is
  7032. // 100 and the maximum value is 100.
  7033. MaxRecords *int64 `type:"integer"`
  7034. // The token for the next set of items to return. (You received this token from
  7035. // a previous call.)
  7036. NextToken *string `type:"string"`
  7037. }
  7038. // String returns the string representation
  7039. func (s DescribeLoadBalancerTargetGroupsInput) String() string {
  7040. return awsutil.Prettify(s)
  7041. }
  7042. // GoString returns the string representation
  7043. func (s DescribeLoadBalancerTargetGroupsInput) GoString() string {
  7044. return s.String()
  7045. }
  7046. // Validate inspects the fields of the type to determine if they are valid.
  7047. func (s *DescribeLoadBalancerTargetGroupsInput) Validate() error {
  7048. invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancerTargetGroupsInput"}
  7049. if s.AutoScalingGroupName == nil {
  7050. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7051. }
  7052. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7053. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7054. }
  7055. if invalidParams.Len() > 0 {
  7056. return invalidParams
  7057. }
  7058. return nil
  7059. }
  7060. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7061. func (s *DescribeLoadBalancerTargetGroupsInput) SetAutoScalingGroupName(v string) *DescribeLoadBalancerTargetGroupsInput {
  7062. s.AutoScalingGroupName = &v
  7063. return s
  7064. }
  7065. // SetMaxRecords sets the MaxRecords field's value.
  7066. func (s *DescribeLoadBalancerTargetGroupsInput) SetMaxRecords(v int64) *DescribeLoadBalancerTargetGroupsInput {
  7067. s.MaxRecords = &v
  7068. return s
  7069. }
  7070. // SetNextToken sets the NextToken field's value.
  7071. func (s *DescribeLoadBalancerTargetGroupsInput) SetNextToken(v string) *DescribeLoadBalancerTargetGroupsInput {
  7072. s.NextToken = &v
  7073. return s
  7074. }
  7075. type DescribeLoadBalancerTargetGroupsOutput struct {
  7076. _ struct{} `type:"structure"`
  7077. // Information about the target groups.
  7078. LoadBalancerTargetGroups []*LoadBalancerTargetGroupState `type:"list"`
  7079. // The token to use when requesting the next set of items. If there are no additional
  7080. // items to return, the string is empty.
  7081. NextToken *string `type:"string"`
  7082. }
  7083. // String returns the string representation
  7084. func (s DescribeLoadBalancerTargetGroupsOutput) String() string {
  7085. return awsutil.Prettify(s)
  7086. }
  7087. // GoString returns the string representation
  7088. func (s DescribeLoadBalancerTargetGroupsOutput) GoString() string {
  7089. return s.String()
  7090. }
  7091. // SetLoadBalancerTargetGroups sets the LoadBalancerTargetGroups field's value.
  7092. func (s *DescribeLoadBalancerTargetGroupsOutput) SetLoadBalancerTargetGroups(v []*LoadBalancerTargetGroupState) *DescribeLoadBalancerTargetGroupsOutput {
  7093. s.LoadBalancerTargetGroups = v
  7094. return s
  7095. }
  7096. // SetNextToken sets the NextToken field's value.
  7097. func (s *DescribeLoadBalancerTargetGroupsOutput) SetNextToken(v string) *DescribeLoadBalancerTargetGroupsOutput {
  7098. s.NextToken = &v
  7099. return s
  7100. }
  7101. type DescribeLoadBalancersInput struct {
  7102. _ struct{} `type:"structure"`
  7103. // The name of the Auto Scaling group.
  7104. //
  7105. // AutoScalingGroupName is a required field
  7106. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7107. // The maximum number of items to return with this call. The default value is
  7108. // 100 and the maximum value is 100.
  7109. MaxRecords *int64 `type:"integer"`
  7110. // The token for the next set of items to return. (You received this token from
  7111. // a previous call.)
  7112. NextToken *string `type:"string"`
  7113. }
  7114. // String returns the string representation
  7115. func (s DescribeLoadBalancersInput) String() string {
  7116. return awsutil.Prettify(s)
  7117. }
  7118. // GoString returns the string representation
  7119. func (s DescribeLoadBalancersInput) GoString() string {
  7120. return s.String()
  7121. }
  7122. // Validate inspects the fields of the type to determine if they are valid.
  7123. func (s *DescribeLoadBalancersInput) Validate() error {
  7124. invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancersInput"}
  7125. if s.AutoScalingGroupName == nil {
  7126. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7127. }
  7128. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7129. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7130. }
  7131. if invalidParams.Len() > 0 {
  7132. return invalidParams
  7133. }
  7134. return nil
  7135. }
  7136. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7137. func (s *DescribeLoadBalancersInput) SetAutoScalingGroupName(v string) *DescribeLoadBalancersInput {
  7138. s.AutoScalingGroupName = &v
  7139. return s
  7140. }
  7141. // SetMaxRecords sets the MaxRecords field's value.
  7142. func (s *DescribeLoadBalancersInput) SetMaxRecords(v int64) *DescribeLoadBalancersInput {
  7143. s.MaxRecords = &v
  7144. return s
  7145. }
  7146. // SetNextToken sets the NextToken field's value.
  7147. func (s *DescribeLoadBalancersInput) SetNextToken(v string) *DescribeLoadBalancersInput {
  7148. s.NextToken = &v
  7149. return s
  7150. }
  7151. type DescribeLoadBalancersOutput struct {
  7152. _ struct{} `type:"structure"`
  7153. // The load balancers.
  7154. LoadBalancers []*LoadBalancerState `type:"list"`
  7155. // The token to use when requesting the next set of items. If there are no additional
  7156. // items to return, the string is empty.
  7157. NextToken *string `type:"string"`
  7158. }
  7159. // String returns the string representation
  7160. func (s DescribeLoadBalancersOutput) String() string {
  7161. return awsutil.Prettify(s)
  7162. }
  7163. // GoString returns the string representation
  7164. func (s DescribeLoadBalancersOutput) GoString() string {
  7165. return s.String()
  7166. }
  7167. // SetLoadBalancers sets the LoadBalancers field's value.
  7168. func (s *DescribeLoadBalancersOutput) SetLoadBalancers(v []*LoadBalancerState) *DescribeLoadBalancersOutput {
  7169. s.LoadBalancers = v
  7170. return s
  7171. }
  7172. // SetNextToken sets the NextToken field's value.
  7173. func (s *DescribeLoadBalancersOutput) SetNextToken(v string) *DescribeLoadBalancersOutput {
  7174. s.NextToken = &v
  7175. return s
  7176. }
  7177. type DescribeMetricCollectionTypesInput struct {
  7178. _ struct{} `type:"structure"`
  7179. }
  7180. // String returns the string representation
  7181. func (s DescribeMetricCollectionTypesInput) String() string {
  7182. return awsutil.Prettify(s)
  7183. }
  7184. // GoString returns the string representation
  7185. func (s DescribeMetricCollectionTypesInput) GoString() string {
  7186. return s.String()
  7187. }
  7188. type DescribeMetricCollectionTypesOutput struct {
  7189. _ struct{} `type:"structure"`
  7190. // The granularities for the metrics.
  7191. Granularities []*MetricGranularityType `type:"list"`
  7192. // One or more metrics.
  7193. Metrics []*MetricCollectionType `type:"list"`
  7194. }
  7195. // String returns the string representation
  7196. func (s DescribeMetricCollectionTypesOutput) String() string {
  7197. return awsutil.Prettify(s)
  7198. }
  7199. // GoString returns the string representation
  7200. func (s DescribeMetricCollectionTypesOutput) GoString() string {
  7201. return s.String()
  7202. }
  7203. // SetGranularities sets the Granularities field's value.
  7204. func (s *DescribeMetricCollectionTypesOutput) SetGranularities(v []*MetricGranularityType) *DescribeMetricCollectionTypesOutput {
  7205. s.Granularities = v
  7206. return s
  7207. }
  7208. // SetMetrics sets the Metrics field's value.
  7209. func (s *DescribeMetricCollectionTypesOutput) SetMetrics(v []*MetricCollectionType) *DescribeMetricCollectionTypesOutput {
  7210. s.Metrics = v
  7211. return s
  7212. }
  7213. type DescribeNotificationConfigurationsInput struct {
  7214. _ struct{} `type:"structure"`
  7215. // The name of the Auto Scaling group.
  7216. AutoScalingGroupNames []*string `type:"list"`
  7217. // The maximum number of items to return with this call. The default value is
  7218. // 50 and the maximum value is 100.
  7219. MaxRecords *int64 `type:"integer"`
  7220. // The token for the next set of items to return. (You received this token from
  7221. // a previous call.)
  7222. NextToken *string `type:"string"`
  7223. }
  7224. // String returns the string representation
  7225. func (s DescribeNotificationConfigurationsInput) String() string {
  7226. return awsutil.Prettify(s)
  7227. }
  7228. // GoString returns the string representation
  7229. func (s DescribeNotificationConfigurationsInput) GoString() string {
  7230. return s.String()
  7231. }
  7232. // SetAutoScalingGroupNames sets the AutoScalingGroupNames field's value.
  7233. func (s *DescribeNotificationConfigurationsInput) SetAutoScalingGroupNames(v []*string) *DescribeNotificationConfigurationsInput {
  7234. s.AutoScalingGroupNames = v
  7235. return s
  7236. }
  7237. // SetMaxRecords sets the MaxRecords field's value.
  7238. func (s *DescribeNotificationConfigurationsInput) SetMaxRecords(v int64) *DescribeNotificationConfigurationsInput {
  7239. s.MaxRecords = &v
  7240. return s
  7241. }
  7242. // SetNextToken sets the NextToken field's value.
  7243. func (s *DescribeNotificationConfigurationsInput) SetNextToken(v string) *DescribeNotificationConfigurationsInput {
  7244. s.NextToken = &v
  7245. return s
  7246. }
  7247. type DescribeNotificationConfigurationsOutput struct {
  7248. _ struct{} `type:"structure"`
  7249. // The token to use when requesting the next set of items. If there are no additional
  7250. // items to return, the string is empty.
  7251. NextToken *string `type:"string"`
  7252. // The notification configurations.
  7253. //
  7254. // NotificationConfigurations is a required field
  7255. NotificationConfigurations []*NotificationConfiguration `type:"list" required:"true"`
  7256. }
  7257. // String returns the string representation
  7258. func (s DescribeNotificationConfigurationsOutput) String() string {
  7259. return awsutil.Prettify(s)
  7260. }
  7261. // GoString returns the string representation
  7262. func (s DescribeNotificationConfigurationsOutput) GoString() string {
  7263. return s.String()
  7264. }
  7265. // SetNextToken sets the NextToken field's value.
  7266. func (s *DescribeNotificationConfigurationsOutput) SetNextToken(v string) *DescribeNotificationConfigurationsOutput {
  7267. s.NextToken = &v
  7268. return s
  7269. }
  7270. // SetNotificationConfigurations sets the NotificationConfigurations field's value.
  7271. func (s *DescribeNotificationConfigurationsOutput) SetNotificationConfigurations(v []*NotificationConfiguration) *DescribeNotificationConfigurationsOutput {
  7272. s.NotificationConfigurations = v
  7273. return s
  7274. }
  7275. type DescribePoliciesInput struct {
  7276. _ struct{} `type:"structure"`
  7277. // The name of the Auto Scaling group.
  7278. AutoScalingGroupName *string `min:"1" type:"string"`
  7279. // The maximum number of items to be returned with each call. The default value
  7280. // is 50 and the maximum value is 100.
  7281. MaxRecords *int64 `type:"integer"`
  7282. // The token for the next set of items to return. (You received this token from
  7283. // a previous call.)
  7284. NextToken *string `type:"string"`
  7285. // The names of one or more policies. If you omit this parameter, all policies
  7286. // are described. If a group name is provided, the results are limited to that
  7287. // group. This list is limited to 50 items. If you specify an unknown policy
  7288. // name, it is ignored with no error.
  7289. PolicyNames []*string `type:"list"`
  7290. // One or more policy types. Valid values are SimpleScaling and StepScaling.
  7291. PolicyTypes []*string `type:"list"`
  7292. }
  7293. // String returns the string representation
  7294. func (s DescribePoliciesInput) String() string {
  7295. return awsutil.Prettify(s)
  7296. }
  7297. // GoString returns the string representation
  7298. func (s DescribePoliciesInput) GoString() string {
  7299. return s.String()
  7300. }
  7301. // Validate inspects the fields of the type to determine if they are valid.
  7302. func (s *DescribePoliciesInput) Validate() error {
  7303. invalidParams := request.ErrInvalidParams{Context: "DescribePoliciesInput"}
  7304. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7305. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7306. }
  7307. if invalidParams.Len() > 0 {
  7308. return invalidParams
  7309. }
  7310. return nil
  7311. }
  7312. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7313. func (s *DescribePoliciesInput) SetAutoScalingGroupName(v string) *DescribePoliciesInput {
  7314. s.AutoScalingGroupName = &v
  7315. return s
  7316. }
  7317. // SetMaxRecords sets the MaxRecords field's value.
  7318. func (s *DescribePoliciesInput) SetMaxRecords(v int64) *DescribePoliciesInput {
  7319. s.MaxRecords = &v
  7320. return s
  7321. }
  7322. // SetNextToken sets the NextToken field's value.
  7323. func (s *DescribePoliciesInput) SetNextToken(v string) *DescribePoliciesInput {
  7324. s.NextToken = &v
  7325. return s
  7326. }
  7327. // SetPolicyNames sets the PolicyNames field's value.
  7328. func (s *DescribePoliciesInput) SetPolicyNames(v []*string) *DescribePoliciesInput {
  7329. s.PolicyNames = v
  7330. return s
  7331. }
  7332. // SetPolicyTypes sets the PolicyTypes field's value.
  7333. func (s *DescribePoliciesInput) SetPolicyTypes(v []*string) *DescribePoliciesInput {
  7334. s.PolicyTypes = v
  7335. return s
  7336. }
  7337. type DescribePoliciesOutput struct {
  7338. _ struct{} `type:"structure"`
  7339. // The token to use when requesting the next set of items. If there are no additional
  7340. // items to return, the string is empty.
  7341. NextToken *string `type:"string"`
  7342. // The scaling policies.
  7343. ScalingPolicies []*ScalingPolicy `type:"list"`
  7344. }
  7345. // String returns the string representation
  7346. func (s DescribePoliciesOutput) String() string {
  7347. return awsutil.Prettify(s)
  7348. }
  7349. // GoString returns the string representation
  7350. func (s DescribePoliciesOutput) GoString() string {
  7351. return s.String()
  7352. }
  7353. // SetNextToken sets the NextToken field's value.
  7354. func (s *DescribePoliciesOutput) SetNextToken(v string) *DescribePoliciesOutput {
  7355. s.NextToken = &v
  7356. return s
  7357. }
  7358. // SetScalingPolicies sets the ScalingPolicies field's value.
  7359. func (s *DescribePoliciesOutput) SetScalingPolicies(v []*ScalingPolicy) *DescribePoliciesOutput {
  7360. s.ScalingPolicies = v
  7361. return s
  7362. }
  7363. type DescribeScalingActivitiesInput struct {
  7364. _ struct{} `type:"structure"`
  7365. // The activity IDs of the desired scaling activities. You can specify up to
  7366. // 50 IDs. If you omit this parameter, all activities for the past six weeks
  7367. // are described. If unknown activities are requested, they are ignored with
  7368. // no error. If you specify an Auto Scaling group, the results are limited to
  7369. // that group.
  7370. ActivityIds []*string `type:"list"`
  7371. // The name of the Auto Scaling group.
  7372. AutoScalingGroupName *string `min:"1" type:"string"`
  7373. // The maximum number of items to return with this call. The default value is
  7374. // 100 and the maximum value is 100.
  7375. MaxRecords *int64 `type:"integer"`
  7376. // The token for the next set of items to return. (You received this token from
  7377. // a previous call.)
  7378. NextToken *string `type:"string"`
  7379. }
  7380. // String returns the string representation
  7381. func (s DescribeScalingActivitiesInput) String() string {
  7382. return awsutil.Prettify(s)
  7383. }
  7384. // GoString returns the string representation
  7385. func (s DescribeScalingActivitiesInput) GoString() string {
  7386. return s.String()
  7387. }
  7388. // Validate inspects the fields of the type to determine if they are valid.
  7389. func (s *DescribeScalingActivitiesInput) Validate() error {
  7390. invalidParams := request.ErrInvalidParams{Context: "DescribeScalingActivitiesInput"}
  7391. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7392. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7393. }
  7394. if invalidParams.Len() > 0 {
  7395. return invalidParams
  7396. }
  7397. return nil
  7398. }
  7399. // SetActivityIds sets the ActivityIds field's value.
  7400. func (s *DescribeScalingActivitiesInput) SetActivityIds(v []*string) *DescribeScalingActivitiesInput {
  7401. s.ActivityIds = v
  7402. return s
  7403. }
  7404. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7405. func (s *DescribeScalingActivitiesInput) SetAutoScalingGroupName(v string) *DescribeScalingActivitiesInput {
  7406. s.AutoScalingGroupName = &v
  7407. return s
  7408. }
  7409. // SetMaxRecords sets the MaxRecords field's value.
  7410. func (s *DescribeScalingActivitiesInput) SetMaxRecords(v int64) *DescribeScalingActivitiesInput {
  7411. s.MaxRecords = &v
  7412. return s
  7413. }
  7414. // SetNextToken sets the NextToken field's value.
  7415. func (s *DescribeScalingActivitiesInput) SetNextToken(v string) *DescribeScalingActivitiesInput {
  7416. s.NextToken = &v
  7417. return s
  7418. }
  7419. type DescribeScalingActivitiesOutput struct {
  7420. _ struct{} `type:"structure"`
  7421. // The scaling activities. Activities are sorted by start time. Activities still
  7422. // in progress are described first.
  7423. //
  7424. // Activities is a required field
  7425. Activities []*Activity `type:"list" required:"true"`
  7426. // The token to use when requesting the next set of items. If there are no additional
  7427. // items to return, the string is empty.
  7428. NextToken *string `type:"string"`
  7429. }
  7430. // String returns the string representation
  7431. func (s DescribeScalingActivitiesOutput) String() string {
  7432. return awsutil.Prettify(s)
  7433. }
  7434. // GoString returns the string representation
  7435. func (s DescribeScalingActivitiesOutput) GoString() string {
  7436. return s.String()
  7437. }
  7438. // SetActivities sets the Activities field's value.
  7439. func (s *DescribeScalingActivitiesOutput) SetActivities(v []*Activity) *DescribeScalingActivitiesOutput {
  7440. s.Activities = v
  7441. return s
  7442. }
  7443. // SetNextToken sets the NextToken field's value.
  7444. func (s *DescribeScalingActivitiesOutput) SetNextToken(v string) *DescribeScalingActivitiesOutput {
  7445. s.NextToken = &v
  7446. return s
  7447. }
  7448. type DescribeScalingProcessTypesInput struct {
  7449. _ struct{} `type:"structure"`
  7450. }
  7451. // String returns the string representation
  7452. func (s DescribeScalingProcessTypesInput) String() string {
  7453. return awsutil.Prettify(s)
  7454. }
  7455. // GoString returns the string representation
  7456. func (s DescribeScalingProcessTypesInput) GoString() string {
  7457. return s.String()
  7458. }
  7459. type DescribeScalingProcessTypesOutput struct {
  7460. _ struct{} `type:"structure"`
  7461. // The names of the process types.
  7462. Processes []*ProcessType `type:"list"`
  7463. }
  7464. // String returns the string representation
  7465. func (s DescribeScalingProcessTypesOutput) String() string {
  7466. return awsutil.Prettify(s)
  7467. }
  7468. // GoString returns the string representation
  7469. func (s DescribeScalingProcessTypesOutput) GoString() string {
  7470. return s.String()
  7471. }
  7472. // SetProcesses sets the Processes field's value.
  7473. func (s *DescribeScalingProcessTypesOutput) SetProcesses(v []*ProcessType) *DescribeScalingProcessTypesOutput {
  7474. s.Processes = v
  7475. return s
  7476. }
  7477. type DescribeScheduledActionsInput struct {
  7478. _ struct{} `type:"structure"`
  7479. // The name of the Auto Scaling group.
  7480. AutoScalingGroupName *string `min:"1" type:"string"`
  7481. // The latest scheduled start time to return. If scheduled action names are
  7482. // provided, this parameter is ignored.
  7483. EndTime *time.Time `type:"timestamp"`
  7484. // The maximum number of items to return with this call. The default value is
  7485. // 50 and the maximum value is 100.
  7486. MaxRecords *int64 `type:"integer"`
  7487. // The token for the next set of items to return. (You received this token from
  7488. // a previous call.)
  7489. NextToken *string `type:"string"`
  7490. // The names of one or more scheduled actions. You can specify up to 50 actions.
  7491. // If you omit this parameter, all scheduled actions are described. If you specify
  7492. // an unknown scheduled action, it is ignored with no error.
  7493. ScheduledActionNames []*string `type:"list"`
  7494. // The earliest scheduled start time to return. If scheduled action names are
  7495. // provided, this parameter is ignored.
  7496. StartTime *time.Time `type:"timestamp"`
  7497. }
  7498. // String returns the string representation
  7499. func (s DescribeScheduledActionsInput) String() string {
  7500. return awsutil.Prettify(s)
  7501. }
  7502. // GoString returns the string representation
  7503. func (s DescribeScheduledActionsInput) GoString() string {
  7504. return s.String()
  7505. }
  7506. // Validate inspects the fields of the type to determine if they are valid.
  7507. func (s *DescribeScheduledActionsInput) Validate() error {
  7508. invalidParams := request.ErrInvalidParams{Context: "DescribeScheduledActionsInput"}
  7509. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7510. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7511. }
  7512. if invalidParams.Len() > 0 {
  7513. return invalidParams
  7514. }
  7515. return nil
  7516. }
  7517. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7518. func (s *DescribeScheduledActionsInput) SetAutoScalingGroupName(v string) *DescribeScheduledActionsInput {
  7519. s.AutoScalingGroupName = &v
  7520. return s
  7521. }
  7522. // SetEndTime sets the EndTime field's value.
  7523. func (s *DescribeScheduledActionsInput) SetEndTime(v time.Time) *DescribeScheduledActionsInput {
  7524. s.EndTime = &v
  7525. return s
  7526. }
  7527. // SetMaxRecords sets the MaxRecords field's value.
  7528. func (s *DescribeScheduledActionsInput) SetMaxRecords(v int64) *DescribeScheduledActionsInput {
  7529. s.MaxRecords = &v
  7530. return s
  7531. }
  7532. // SetNextToken sets the NextToken field's value.
  7533. func (s *DescribeScheduledActionsInput) SetNextToken(v string) *DescribeScheduledActionsInput {
  7534. s.NextToken = &v
  7535. return s
  7536. }
  7537. // SetScheduledActionNames sets the ScheduledActionNames field's value.
  7538. func (s *DescribeScheduledActionsInput) SetScheduledActionNames(v []*string) *DescribeScheduledActionsInput {
  7539. s.ScheduledActionNames = v
  7540. return s
  7541. }
  7542. // SetStartTime sets the StartTime field's value.
  7543. func (s *DescribeScheduledActionsInput) SetStartTime(v time.Time) *DescribeScheduledActionsInput {
  7544. s.StartTime = &v
  7545. return s
  7546. }
  7547. type DescribeScheduledActionsOutput struct {
  7548. _ struct{} `type:"structure"`
  7549. // The token to use when requesting the next set of items. If there are no additional
  7550. // items to return, the string is empty.
  7551. NextToken *string `type:"string"`
  7552. // The scheduled actions.
  7553. ScheduledUpdateGroupActions []*ScheduledUpdateGroupAction `type:"list"`
  7554. }
  7555. // String returns the string representation
  7556. func (s DescribeScheduledActionsOutput) String() string {
  7557. return awsutil.Prettify(s)
  7558. }
  7559. // GoString returns the string representation
  7560. func (s DescribeScheduledActionsOutput) GoString() string {
  7561. return s.String()
  7562. }
  7563. // SetNextToken sets the NextToken field's value.
  7564. func (s *DescribeScheduledActionsOutput) SetNextToken(v string) *DescribeScheduledActionsOutput {
  7565. s.NextToken = &v
  7566. return s
  7567. }
  7568. // SetScheduledUpdateGroupActions sets the ScheduledUpdateGroupActions field's value.
  7569. func (s *DescribeScheduledActionsOutput) SetScheduledUpdateGroupActions(v []*ScheduledUpdateGroupAction) *DescribeScheduledActionsOutput {
  7570. s.ScheduledUpdateGroupActions = v
  7571. return s
  7572. }
  7573. type DescribeTagsInput struct {
  7574. _ struct{} `type:"structure"`
  7575. // One or more filters to scope the tags to return. The maximum number of filters
  7576. // per filter type (for example, auto-scaling-group) is 1000.
  7577. Filters []*Filter `type:"list"`
  7578. // The maximum number of items to return with this call. The default value is
  7579. // 50 and the maximum value is 100.
  7580. MaxRecords *int64 `type:"integer"`
  7581. // The token for the next set of items to return. (You received this token from
  7582. // a previous call.)
  7583. NextToken *string `type:"string"`
  7584. }
  7585. // String returns the string representation
  7586. func (s DescribeTagsInput) String() string {
  7587. return awsutil.Prettify(s)
  7588. }
  7589. // GoString returns the string representation
  7590. func (s DescribeTagsInput) GoString() string {
  7591. return s.String()
  7592. }
  7593. // SetFilters sets the Filters field's value.
  7594. func (s *DescribeTagsInput) SetFilters(v []*Filter) *DescribeTagsInput {
  7595. s.Filters = v
  7596. return s
  7597. }
  7598. // SetMaxRecords sets the MaxRecords field's value.
  7599. func (s *DescribeTagsInput) SetMaxRecords(v int64) *DescribeTagsInput {
  7600. s.MaxRecords = &v
  7601. return s
  7602. }
  7603. // SetNextToken sets the NextToken field's value.
  7604. func (s *DescribeTagsInput) SetNextToken(v string) *DescribeTagsInput {
  7605. s.NextToken = &v
  7606. return s
  7607. }
  7608. type DescribeTagsOutput struct {
  7609. _ struct{} `type:"structure"`
  7610. // The token to use when requesting the next set of items. If there are no additional
  7611. // items to return, the string is empty.
  7612. NextToken *string `type:"string"`
  7613. // One or more tags.
  7614. Tags []*TagDescription `type:"list"`
  7615. }
  7616. // String returns the string representation
  7617. func (s DescribeTagsOutput) String() string {
  7618. return awsutil.Prettify(s)
  7619. }
  7620. // GoString returns the string representation
  7621. func (s DescribeTagsOutput) GoString() string {
  7622. return s.String()
  7623. }
  7624. // SetNextToken sets the NextToken field's value.
  7625. func (s *DescribeTagsOutput) SetNextToken(v string) *DescribeTagsOutput {
  7626. s.NextToken = &v
  7627. return s
  7628. }
  7629. // SetTags sets the Tags field's value.
  7630. func (s *DescribeTagsOutput) SetTags(v []*TagDescription) *DescribeTagsOutput {
  7631. s.Tags = v
  7632. return s
  7633. }
  7634. type DescribeTerminationPolicyTypesInput struct {
  7635. _ struct{} `type:"structure"`
  7636. }
  7637. // String returns the string representation
  7638. func (s DescribeTerminationPolicyTypesInput) String() string {
  7639. return awsutil.Prettify(s)
  7640. }
  7641. // GoString returns the string representation
  7642. func (s DescribeTerminationPolicyTypesInput) GoString() string {
  7643. return s.String()
  7644. }
  7645. type DescribeTerminationPolicyTypesOutput struct {
  7646. _ struct{} `type:"structure"`
  7647. // The termination policies supported by Amazon EC2 Auto Scaling: OldestInstance,
  7648. // OldestLaunchConfiguration, NewestInstance, ClosestToNextInstanceHour, Default,
  7649. // OldestLaunchTemplate, and AllocationStrategy. Currently, the OldestLaunchTemplate
  7650. // and AllocationStrategy policies are only supported for Auto Scaling groups
  7651. // with MixedInstancesPolicy.
  7652. TerminationPolicyTypes []*string `type:"list"`
  7653. }
  7654. // String returns the string representation
  7655. func (s DescribeTerminationPolicyTypesOutput) String() string {
  7656. return awsutil.Prettify(s)
  7657. }
  7658. // GoString returns the string representation
  7659. func (s DescribeTerminationPolicyTypesOutput) GoString() string {
  7660. return s.String()
  7661. }
  7662. // SetTerminationPolicyTypes sets the TerminationPolicyTypes field's value.
  7663. func (s *DescribeTerminationPolicyTypesOutput) SetTerminationPolicyTypes(v []*string) *DescribeTerminationPolicyTypesOutput {
  7664. s.TerminationPolicyTypes = v
  7665. return s
  7666. }
  7667. type DetachInstancesInput struct {
  7668. _ struct{} `type:"structure"`
  7669. // The name of the Auto Scaling group.
  7670. //
  7671. // AutoScalingGroupName is a required field
  7672. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7673. // The IDs of the instances. You can specify up to 20 instances.
  7674. InstanceIds []*string `type:"list"`
  7675. // Indicates whether the Auto Scaling group decrements the desired capacity
  7676. // value by the number of instances detached.
  7677. //
  7678. // ShouldDecrementDesiredCapacity is a required field
  7679. ShouldDecrementDesiredCapacity *bool `type:"boolean" required:"true"`
  7680. }
  7681. // String returns the string representation
  7682. func (s DetachInstancesInput) String() string {
  7683. return awsutil.Prettify(s)
  7684. }
  7685. // GoString returns the string representation
  7686. func (s DetachInstancesInput) GoString() string {
  7687. return s.String()
  7688. }
  7689. // Validate inspects the fields of the type to determine if they are valid.
  7690. func (s *DetachInstancesInput) Validate() error {
  7691. invalidParams := request.ErrInvalidParams{Context: "DetachInstancesInput"}
  7692. if s.AutoScalingGroupName == nil {
  7693. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7694. }
  7695. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7696. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7697. }
  7698. if s.ShouldDecrementDesiredCapacity == nil {
  7699. invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity"))
  7700. }
  7701. if invalidParams.Len() > 0 {
  7702. return invalidParams
  7703. }
  7704. return nil
  7705. }
  7706. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7707. func (s *DetachInstancesInput) SetAutoScalingGroupName(v string) *DetachInstancesInput {
  7708. s.AutoScalingGroupName = &v
  7709. return s
  7710. }
  7711. // SetInstanceIds sets the InstanceIds field's value.
  7712. func (s *DetachInstancesInput) SetInstanceIds(v []*string) *DetachInstancesInput {
  7713. s.InstanceIds = v
  7714. return s
  7715. }
  7716. // SetShouldDecrementDesiredCapacity sets the ShouldDecrementDesiredCapacity field's value.
  7717. func (s *DetachInstancesInput) SetShouldDecrementDesiredCapacity(v bool) *DetachInstancesInput {
  7718. s.ShouldDecrementDesiredCapacity = &v
  7719. return s
  7720. }
  7721. type DetachInstancesOutput struct {
  7722. _ struct{} `type:"structure"`
  7723. // The activities related to detaching the instances from the Auto Scaling group.
  7724. Activities []*Activity `type:"list"`
  7725. }
  7726. // String returns the string representation
  7727. func (s DetachInstancesOutput) String() string {
  7728. return awsutil.Prettify(s)
  7729. }
  7730. // GoString returns the string representation
  7731. func (s DetachInstancesOutput) GoString() string {
  7732. return s.String()
  7733. }
  7734. // SetActivities sets the Activities field's value.
  7735. func (s *DetachInstancesOutput) SetActivities(v []*Activity) *DetachInstancesOutput {
  7736. s.Activities = v
  7737. return s
  7738. }
  7739. type DetachLoadBalancerTargetGroupsInput struct {
  7740. _ struct{} `type:"structure"`
  7741. // The name of the Auto Scaling group.
  7742. //
  7743. // AutoScalingGroupName is a required field
  7744. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7745. // The Amazon Resource Names (ARN) of the target groups. You can specify up
  7746. // to 10 target groups.
  7747. //
  7748. // TargetGroupARNs is a required field
  7749. TargetGroupARNs []*string `type:"list" required:"true"`
  7750. }
  7751. // String returns the string representation
  7752. func (s DetachLoadBalancerTargetGroupsInput) String() string {
  7753. return awsutil.Prettify(s)
  7754. }
  7755. // GoString returns the string representation
  7756. func (s DetachLoadBalancerTargetGroupsInput) GoString() string {
  7757. return s.String()
  7758. }
  7759. // Validate inspects the fields of the type to determine if they are valid.
  7760. func (s *DetachLoadBalancerTargetGroupsInput) Validate() error {
  7761. invalidParams := request.ErrInvalidParams{Context: "DetachLoadBalancerTargetGroupsInput"}
  7762. if s.AutoScalingGroupName == nil {
  7763. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7764. }
  7765. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7766. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7767. }
  7768. if s.TargetGroupARNs == nil {
  7769. invalidParams.Add(request.NewErrParamRequired("TargetGroupARNs"))
  7770. }
  7771. if invalidParams.Len() > 0 {
  7772. return invalidParams
  7773. }
  7774. return nil
  7775. }
  7776. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7777. func (s *DetachLoadBalancerTargetGroupsInput) SetAutoScalingGroupName(v string) *DetachLoadBalancerTargetGroupsInput {
  7778. s.AutoScalingGroupName = &v
  7779. return s
  7780. }
  7781. // SetTargetGroupARNs sets the TargetGroupARNs field's value.
  7782. func (s *DetachLoadBalancerTargetGroupsInput) SetTargetGroupARNs(v []*string) *DetachLoadBalancerTargetGroupsInput {
  7783. s.TargetGroupARNs = v
  7784. return s
  7785. }
  7786. type DetachLoadBalancerTargetGroupsOutput struct {
  7787. _ struct{} `type:"structure"`
  7788. }
  7789. // String returns the string representation
  7790. func (s DetachLoadBalancerTargetGroupsOutput) String() string {
  7791. return awsutil.Prettify(s)
  7792. }
  7793. // GoString returns the string representation
  7794. func (s DetachLoadBalancerTargetGroupsOutput) GoString() string {
  7795. return s.String()
  7796. }
  7797. type DetachLoadBalancersInput struct {
  7798. _ struct{} `type:"structure"`
  7799. // The name of the Auto Scaling group.
  7800. //
  7801. // AutoScalingGroupName is a required field
  7802. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7803. // The names of the load balancers. You can specify up to 10 load balancers.
  7804. //
  7805. // LoadBalancerNames is a required field
  7806. LoadBalancerNames []*string `type:"list" required:"true"`
  7807. }
  7808. // String returns the string representation
  7809. func (s DetachLoadBalancersInput) String() string {
  7810. return awsutil.Prettify(s)
  7811. }
  7812. // GoString returns the string representation
  7813. func (s DetachLoadBalancersInput) GoString() string {
  7814. return s.String()
  7815. }
  7816. // Validate inspects the fields of the type to determine if they are valid.
  7817. func (s *DetachLoadBalancersInput) Validate() error {
  7818. invalidParams := request.ErrInvalidParams{Context: "DetachLoadBalancersInput"}
  7819. if s.AutoScalingGroupName == nil {
  7820. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7821. }
  7822. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7823. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7824. }
  7825. if s.LoadBalancerNames == nil {
  7826. invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames"))
  7827. }
  7828. if invalidParams.Len() > 0 {
  7829. return invalidParams
  7830. }
  7831. return nil
  7832. }
  7833. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7834. func (s *DetachLoadBalancersInput) SetAutoScalingGroupName(v string) *DetachLoadBalancersInput {
  7835. s.AutoScalingGroupName = &v
  7836. return s
  7837. }
  7838. // SetLoadBalancerNames sets the LoadBalancerNames field's value.
  7839. func (s *DetachLoadBalancersInput) SetLoadBalancerNames(v []*string) *DetachLoadBalancersInput {
  7840. s.LoadBalancerNames = v
  7841. return s
  7842. }
  7843. type DetachLoadBalancersOutput struct {
  7844. _ struct{} `type:"structure"`
  7845. }
  7846. // String returns the string representation
  7847. func (s DetachLoadBalancersOutput) String() string {
  7848. return awsutil.Prettify(s)
  7849. }
  7850. // GoString returns the string representation
  7851. func (s DetachLoadBalancersOutput) GoString() string {
  7852. return s.String()
  7853. }
  7854. type DisableMetricsCollectionInput struct {
  7855. _ struct{} `type:"structure"`
  7856. // The name of the Auto Scaling group.
  7857. //
  7858. // AutoScalingGroupName is a required field
  7859. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7860. // One or more of the following metrics. If you omit this parameter, all metrics
  7861. // are disabled.
  7862. //
  7863. // * GroupMinSize
  7864. //
  7865. // * GroupMaxSize
  7866. //
  7867. // * GroupDesiredCapacity
  7868. //
  7869. // * GroupInServiceInstances
  7870. //
  7871. // * GroupPendingInstances
  7872. //
  7873. // * GroupStandbyInstances
  7874. //
  7875. // * GroupTerminatingInstances
  7876. //
  7877. // * GroupTotalInstances
  7878. Metrics []*string `type:"list"`
  7879. }
  7880. // String returns the string representation
  7881. func (s DisableMetricsCollectionInput) String() string {
  7882. return awsutil.Prettify(s)
  7883. }
  7884. // GoString returns the string representation
  7885. func (s DisableMetricsCollectionInput) GoString() string {
  7886. return s.String()
  7887. }
  7888. // Validate inspects the fields of the type to determine if they are valid.
  7889. func (s *DisableMetricsCollectionInput) Validate() error {
  7890. invalidParams := request.ErrInvalidParams{Context: "DisableMetricsCollectionInput"}
  7891. if s.AutoScalingGroupName == nil {
  7892. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7893. }
  7894. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7895. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7896. }
  7897. if invalidParams.Len() > 0 {
  7898. return invalidParams
  7899. }
  7900. return nil
  7901. }
  7902. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7903. func (s *DisableMetricsCollectionInput) SetAutoScalingGroupName(v string) *DisableMetricsCollectionInput {
  7904. s.AutoScalingGroupName = &v
  7905. return s
  7906. }
  7907. // SetMetrics sets the Metrics field's value.
  7908. func (s *DisableMetricsCollectionInput) SetMetrics(v []*string) *DisableMetricsCollectionInput {
  7909. s.Metrics = v
  7910. return s
  7911. }
  7912. type DisableMetricsCollectionOutput struct {
  7913. _ struct{} `type:"structure"`
  7914. }
  7915. // String returns the string representation
  7916. func (s DisableMetricsCollectionOutput) String() string {
  7917. return awsutil.Prettify(s)
  7918. }
  7919. // GoString returns the string representation
  7920. func (s DisableMetricsCollectionOutput) GoString() string {
  7921. return s.String()
  7922. }
  7923. // Describes an Amazon EBS volume.
  7924. type Ebs struct {
  7925. _ struct{} `type:"structure"`
  7926. // Indicates whether the volume is deleted on instance termination. The default
  7927. // is true.
  7928. DeleteOnTermination *bool `type:"boolean"`
  7929. // Indicates whether the volume should be encrypted. Encrypted EBS volumes must
  7930. // be attached to instances that support Amazon EBS encryption. Volumes that
  7931. // are created from encrypted snapshots are automatically encrypted. There is
  7932. // no way to create an encrypted volume from an unencrypted snapshot or an unencrypted
  7933. // volume from an encrypted snapshot. For more information, see Amazon EBS Encryption
  7934. // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in
  7935. // the Amazon Elastic Compute Cloud User Guide.
  7936. Encrypted *bool `type:"boolean"`
  7937. // The number of I/O operations per second (IOPS) to provision for the volume.
  7938. //
  7939. // Constraint: Required when the volume type is io1.
  7940. Iops *int64 `min:"100" type:"integer"`
  7941. // The ID of the snapshot.
  7942. SnapshotId *string `min:"1" type:"string"`
  7943. // The volume size, in GiB. For standard volumes, specify a value from 1 to
  7944. // 1,024. For io1 volumes, specify a value from 4 to 16,384. For gp2 volumes,
  7945. // specify a value from 1 to 16,384. If you specify a snapshot, the volume size
  7946. // must be equal to or larger than the snapshot size.
  7947. //
  7948. // Default: If you create a volume from a snapshot and you don't specify a volume
  7949. // size, the default is the snapshot size.
  7950. VolumeSize *int64 `min:"1" type:"integer"`
  7951. // The volume type. For more information, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html)
  7952. // in the Amazon Elastic Compute Cloud User Guide.
  7953. //
  7954. // Valid values: standard | io1 | gp2
  7955. VolumeType *string `min:"1" type:"string"`
  7956. }
  7957. // String returns the string representation
  7958. func (s Ebs) String() string {
  7959. return awsutil.Prettify(s)
  7960. }
  7961. // GoString returns the string representation
  7962. func (s Ebs) GoString() string {
  7963. return s.String()
  7964. }
  7965. // Validate inspects the fields of the type to determine if they are valid.
  7966. func (s *Ebs) Validate() error {
  7967. invalidParams := request.ErrInvalidParams{Context: "Ebs"}
  7968. if s.Iops != nil && *s.Iops < 100 {
  7969. invalidParams.Add(request.NewErrParamMinValue("Iops", 100))
  7970. }
  7971. if s.SnapshotId != nil && len(*s.SnapshotId) < 1 {
  7972. invalidParams.Add(request.NewErrParamMinLen("SnapshotId", 1))
  7973. }
  7974. if s.VolumeSize != nil && *s.VolumeSize < 1 {
  7975. invalidParams.Add(request.NewErrParamMinValue("VolumeSize", 1))
  7976. }
  7977. if s.VolumeType != nil && len(*s.VolumeType) < 1 {
  7978. invalidParams.Add(request.NewErrParamMinLen("VolumeType", 1))
  7979. }
  7980. if invalidParams.Len() > 0 {
  7981. return invalidParams
  7982. }
  7983. return nil
  7984. }
  7985. // SetDeleteOnTermination sets the DeleteOnTermination field's value.
  7986. func (s *Ebs) SetDeleteOnTermination(v bool) *Ebs {
  7987. s.DeleteOnTermination = &v
  7988. return s
  7989. }
  7990. // SetEncrypted sets the Encrypted field's value.
  7991. func (s *Ebs) SetEncrypted(v bool) *Ebs {
  7992. s.Encrypted = &v
  7993. return s
  7994. }
  7995. // SetIops sets the Iops field's value.
  7996. func (s *Ebs) SetIops(v int64) *Ebs {
  7997. s.Iops = &v
  7998. return s
  7999. }
  8000. // SetSnapshotId sets the SnapshotId field's value.
  8001. func (s *Ebs) SetSnapshotId(v string) *Ebs {
  8002. s.SnapshotId = &v
  8003. return s
  8004. }
  8005. // SetVolumeSize sets the VolumeSize field's value.
  8006. func (s *Ebs) SetVolumeSize(v int64) *Ebs {
  8007. s.VolumeSize = &v
  8008. return s
  8009. }
  8010. // SetVolumeType sets the VolumeType field's value.
  8011. func (s *Ebs) SetVolumeType(v string) *Ebs {
  8012. s.VolumeType = &v
  8013. return s
  8014. }
  8015. type EnableMetricsCollectionInput struct {
  8016. _ struct{} `type:"structure"`
  8017. // The name of the Auto Scaling group.
  8018. //
  8019. // AutoScalingGroupName is a required field
  8020. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  8021. // The granularity to associate with the metrics to collect. The only valid
  8022. // value is 1Minute.
  8023. //
  8024. // Granularity is a required field
  8025. Granularity *string `min:"1" type:"string" required:"true"`
  8026. // One or more of the following metrics. If you omit this parameter, all metrics
  8027. // are enabled.
  8028. //
  8029. // * GroupMinSize
  8030. //
  8031. // * GroupMaxSize
  8032. //
  8033. // * GroupDesiredCapacity
  8034. //
  8035. // * GroupInServiceInstances
  8036. //
  8037. // * GroupPendingInstances
  8038. //
  8039. // * GroupStandbyInstances
  8040. //
  8041. // * GroupTerminatingInstances
  8042. //
  8043. // * GroupTotalInstances
  8044. Metrics []*string `type:"list"`
  8045. }
  8046. // String returns the string representation
  8047. func (s EnableMetricsCollectionInput) String() string {
  8048. return awsutil.Prettify(s)
  8049. }
  8050. // GoString returns the string representation
  8051. func (s EnableMetricsCollectionInput) GoString() string {
  8052. return s.String()
  8053. }
  8054. // Validate inspects the fields of the type to determine if they are valid.
  8055. func (s *EnableMetricsCollectionInput) Validate() error {
  8056. invalidParams := request.ErrInvalidParams{Context: "EnableMetricsCollectionInput"}
  8057. if s.AutoScalingGroupName == nil {
  8058. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  8059. }
  8060. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  8061. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  8062. }
  8063. if s.Granularity == nil {
  8064. invalidParams.Add(request.NewErrParamRequired("Granularity"))
  8065. }
  8066. if s.Granularity != nil && len(*s.Granularity) < 1 {
  8067. invalidParams.Add(request.NewErrParamMinLen("Granularity", 1))
  8068. }
  8069. if invalidParams.Len() > 0 {
  8070. return invalidParams
  8071. }
  8072. return nil
  8073. }
  8074. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  8075. func (s *EnableMetricsCollectionInput) SetAutoScalingGroupName(v string) *EnableMetricsCollectionInput {
  8076. s.AutoScalingGroupName = &v
  8077. return s
  8078. }
  8079. // SetGranularity sets the Granularity field's value.
  8080. func (s *EnableMetricsCollectionInput) SetGranularity(v string) *EnableMetricsCollectionInput {
  8081. s.Granularity = &v
  8082. return s
  8083. }
  8084. // SetMetrics sets the Metrics field's value.
  8085. func (s *EnableMetricsCollectionInput) SetMetrics(v []*string) *EnableMetricsCollectionInput {
  8086. s.Metrics = v
  8087. return s
  8088. }
  8089. type EnableMetricsCollectionOutput struct {
  8090. _ struct{} `type:"structure"`
  8091. }
  8092. // String returns the string representation
  8093. func (s EnableMetricsCollectionOutput) String() string {
  8094. return awsutil.Prettify(s)
  8095. }
  8096. // GoString returns the string representation
  8097. func (s EnableMetricsCollectionOutput) GoString() string {
  8098. return s.String()
  8099. }
  8100. // Describes an enabled metric.
  8101. type EnabledMetric struct {
  8102. _ struct{} `type:"structure"`
  8103. // The granularity of the metric. The only valid value is 1Minute.
  8104. Granularity *string `min:"1" type:"string"`
  8105. // One of the following metrics:
  8106. //
  8107. // * GroupMinSize
  8108. //
  8109. // * GroupMaxSize
  8110. //
  8111. // * GroupDesiredCapacity
  8112. //
  8113. // * GroupInServiceInstances
  8114. //
  8115. // * GroupPendingInstances
  8116. //
  8117. // * GroupStandbyInstances
  8118. //
  8119. // * GroupTerminatingInstances
  8120. //
  8121. // * GroupTotalInstances
  8122. Metric *string `min:"1" type:"string"`
  8123. }
  8124. // String returns the string representation
  8125. func (s EnabledMetric) String() string {
  8126. return awsutil.Prettify(s)
  8127. }
  8128. // GoString returns the string representation
  8129. func (s EnabledMetric) GoString() string {
  8130. return s.String()
  8131. }
  8132. // SetGranularity sets the Granularity field's value.
  8133. func (s *EnabledMetric) SetGranularity(v string) *EnabledMetric {
  8134. s.Granularity = &v
  8135. return s
  8136. }
  8137. // SetMetric sets the Metric field's value.
  8138. func (s *EnabledMetric) SetMetric(v string) *EnabledMetric {
  8139. s.Metric = &v
  8140. return s
  8141. }
  8142. type EnterStandbyInput struct {
  8143. _ struct{} `type:"structure"`
  8144. // The name of the Auto Scaling group.
  8145. //
  8146. // AutoScalingGroupName is a required field
  8147. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  8148. // The IDs of the instances. You can specify up to 20 instances.
  8149. InstanceIds []*string `type:"list"`
  8150. // Indicates whether to decrement the desired capacity of the Auto Scaling group
  8151. // by the number of instances moved to Standby mode.
  8152. //
  8153. // ShouldDecrementDesiredCapacity is a required field
  8154. ShouldDecrementDesiredCapacity *bool `type:"boolean" required:"true"`
  8155. }
  8156. // String returns the string representation
  8157. func (s EnterStandbyInput) String() string {
  8158. return awsutil.Prettify(s)
  8159. }
  8160. // GoString returns the string representation
  8161. func (s EnterStandbyInput) GoString() string {
  8162. return s.String()
  8163. }
  8164. // Validate inspects the fields of the type to determine if they are valid.
  8165. func (s *EnterStandbyInput) Validate() error {
  8166. invalidParams := request.ErrInvalidParams{Context: "EnterStandbyInput"}
  8167. if s.AutoScalingGroupName == nil {
  8168. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  8169. }
  8170. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  8171. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  8172. }
  8173. if s.ShouldDecrementDesiredCapacity == nil {
  8174. invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity"))
  8175. }
  8176. if invalidParams.Len() > 0 {
  8177. return invalidParams
  8178. }
  8179. return nil
  8180. }
  8181. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  8182. func (s *EnterStandbyInput) SetAutoScalingGroupName(v string) *EnterStandbyInput {
  8183. s.AutoScalingGroupName = &v
  8184. return s
  8185. }
  8186. // SetInstanceIds sets the InstanceIds field's value.
  8187. func (s *EnterStandbyInput) SetInstanceIds(v []*string) *EnterStandbyInput {
  8188. s.InstanceIds = v
  8189. return s
  8190. }
  8191. // SetShouldDecrementDesiredCapacity sets the ShouldDecrementDesiredCapacity field's value.
  8192. func (s *EnterStandbyInput) SetShouldDecrementDesiredCapacity(v bool) *EnterStandbyInput {
  8193. s.ShouldDecrementDesiredCapacity = &v
  8194. return s
  8195. }
  8196. type EnterStandbyOutput struct {
  8197. _ struct{} `type:"structure"`
  8198. // The activities related to moving instances into Standby mode.
  8199. Activities []*Activity `type:"list"`
  8200. }
  8201. // String returns the string representation
  8202. func (s EnterStandbyOutput) String() string {
  8203. return awsutil.Prettify(s)
  8204. }
  8205. // GoString returns the string representation
  8206. func (s EnterStandbyOutput) GoString() string {
  8207. return s.String()
  8208. }
  8209. // SetActivities sets the Activities field's value.
  8210. func (s *EnterStandbyOutput) SetActivities(v []*Activity) *EnterStandbyOutput {
  8211. s.Activities = v
  8212. return s
  8213. }
  8214. type ExecutePolicyInput struct {
  8215. _ struct{} `type:"structure"`
  8216. // The name of the Auto Scaling group.
  8217. AutoScalingGroupName *string `min:"1" type:"string"`
  8218. // The breach threshold for the alarm.
  8219. //
  8220. // This parameter is required if the policy type is StepScaling and not supported
  8221. // otherwise.
  8222. BreachThreshold *float64 `type:"double"`
  8223. // Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to
  8224. // complete before executing the policy.
  8225. //
  8226. // This parameter is not supported if the policy type is StepScaling.
  8227. //
  8228. // For more information, see Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html)
  8229. // in the Amazon EC2 Auto Scaling User Guide.
  8230. HonorCooldown *bool `type:"boolean"`
  8231. // The metric value to compare to BreachThreshold. This enables you to execute
  8232. // a policy of type StepScaling and determine which step adjustment to use.
  8233. // For example, if the breach threshold is 50 and you want to use a step adjustment
  8234. // with a lower bound of 0 and an upper bound of 10, you can set the metric
  8235. // value to 59.
  8236. //
  8237. // If you specify a metric value that doesn't correspond to a step adjustment
  8238. // for the policy, the call returns an error.
  8239. //
  8240. // This parameter is required if the policy type is StepScaling and not supported
  8241. // otherwise.
  8242. MetricValue *float64 `type:"double"`
  8243. // The name or ARN of the policy.
  8244. //
  8245. // PolicyName is a required field
  8246. PolicyName *string `min:"1" type:"string" required:"true"`
  8247. }
  8248. // String returns the string representation
  8249. func (s ExecutePolicyInput) String() string {
  8250. return awsutil.Prettify(s)
  8251. }
  8252. // GoString returns the string representation
  8253. func (s ExecutePolicyInput) GoString() string {
  8254. return s.String()
  8255. }
  8256. // Validate inspects the fields of the type to determine if they are valid.
  8257. func (s *ExecutePolicyInput) Validate() error {
  8258. invalidParams := request.ErrInvalidParams{Context: "ExecutePolicyInput"}
  8259. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  8260. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  8261. }
  8262. if s.PolicyName == nil {
  8263. invalidParams.Add(request.NewErrParamRequired("PolicyName"))
  8264. }
  8265. if s.PolicyName != nil && len(*s.PolicyName) < 1 {
  8266. invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
  8267. }
  8268. if invalidParams.Len() > 0 {
  8269. return invalidParams
  8270. }
  8271. return nil
  8272. }
  8273. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  8274. func (s *ExecutePolicyInput) SetAutoScalingGroupName(v string) *ExecutePolicyInput {
  8275. s.AutoScalingGroupName = &v
  8276. return s
  8277. }
  8278. // SetBreachThreshold sets the BreachThreshold field's value.
  8279. func (s *ExecutePolicyInput) SetBreachThreshold(v float64) *ExecutePolicyInput {
  8280. s.BreachThreshold = &v
  8281. return s
  8282. }
  8283. // SetHonorCooldown sets the HonorCooldown field's value.
  8284. func (s *ExecutePolicyInput) SetHonorCooldown(v bool) *ExecutePolicyInput {
  8285. s.HonorCooldown = &v
  8286. return s
  8287. }
  8288. // SetMetricValue sets the MetricValue field's value.
  8289. func (s *ExecutePolicyInput) SetMetricValue(v float64) *ExecutePolicyInput {
  8290. s.MetricValue = &v
  8291. return s
  8292. }
  8293. // SetPolicyName sets the PolicyName field's value.
  8294. func (s *ExecutePolicyInput) SetPolicyName(v string) *ExecutePolicyInput {
  8295. s.PolicyName = &v
  8296. return s
  8297. }
  8298. type ExecutePolicyOutput struct {
  8299. _ struct{} `type:"structure"`
  8300. }
  8301. // String returns the string representation
  8302. func (s ExecutePolicyOutput) String() string {
  8303. return awsutil.Prettify(s)
  8304. }
  8305. // GoString returns the string representation
  8306. func (s ExecutePolicyOutput) GoString() string {
  8307. return s.String()
  8308. }
  8309. type ExitStandbyInput struct {
  8310. _ struct{} `type:"structure"`
  8311. // The name of the Auto Scaling group.
  8312. //
  8313. // AutoScalingGroupName is a required field
  8314. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  8315. // The IDs of the instances. You can specify up to 20 instances.
  8316. InstanceIds []*string `type:"list"`
  8317. }
  8318. // String returns the string representation
  8319. func (s ExitStandbyInput) String() string {
  8320. return awsutil.Prettify(s)
  8321. }
  8322. // GoString returns the string representation
  8323. func (s ExitStandbyInput) GoString() string {
  8324. return s.String()
  8325. }
  8326. // Validate inspects the fields of the type to determine if they are valid.
  8327. func (s *ExitStandbyInput) Validate() error {
  8328. invalidParams := request.ErrInvalidParams{Context: "ExitStandbyInput"}
  8329. if s.AutoScalingGroupName == nil {
  8330. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  8331. }
  8332. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  8333. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  8334. }
  8335. if invalidParams.Len() > 0 {
  8336. return invalidParams
  8337. }
  8338. return nil
  8339. }
  8340. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  8341. func (s *ExitStandbyInput) SetAutoScalingGroupName(v string) *ExitStandbyInput {
  8342. s.AutoScalingGroupName = &v
  8343. return s
  8344. }
  8345. // SetInstanceIds sets the InstanceIds field's value.
  8346. func (s *ExitStandbyInput) SetInstanceIds(v []*string) *ExitStandbyInput {
  8347. s.InstanceIds = v
  8348. return s
  8349. }
  8350. type ExitStandbyOutput struct {
  8351. _ struct{} `type:"structure"`
  8352. // The activities related to moving instances out of Standby mode.
  8353. Activities []*Activity `type:"list"`
  8354. }
  8355. // String returns the string representation
  8356. func (s ExitStandbyOutput) String() string {
  8357. return awsutil.Prettify(s)
  8358. }
  8359. // GoString returns the string representation
  8360. func (s ExitStandbyOutput) GoString() string {
  8361. return s.String()
  8362. }
  8363. // SetActivities sets the Activities field's value.
  8364. func (s *ExitStandbyOutput) SetActivities(v []*Activity) *ExitStandbyOutput {
  8365. s.Activities = v
  8366. return s
  8367. }
  8368. // Describes a scheduled action that could not be created, updated, or deleted.
  8369. type FailedScheduledUpdateGroupActionRequest struct {
  8370. _ struct{} `type:"structure"`
  8371. // The error code.
  8372. ErrorCode *string `min:"1" type:"string"`
  8373. // The error message accompanying the error code.
  8374. ErrorMessage *string `type:"string"`
  8375. // The name of the scheduled action.
  8376. //
  8377. // ScheduledActionName is a required field
  8378. ScheduledActionName *string `min:"1" type:"string" required:"true"`
  8379. }
  8380. // String returns the string representation
  8381. func (s FailedScheduledUpdateGroupActionRequest) String() string {
  8382. return awsutil.Prettify(s)
  8383. }
  8384. // GoString returns the string representation
  8385. func (s FailedScheduledUpdateGroupActionRequest) GoString() string {
  8386. return s.String()
  8387. }
  8388. // SetErrorCode sets the ErrorCode field's value.
  8389. func (s *FailedScheduledUpdateGroupActionRequest) SetErrorCode(v string) *FailedScheduledUpdateGroupActionRequest {
  8390. s.ErrorCode = &v
  8391. return s
  8392. }
  8393. // SetErrorMessage sets the ErrorMessage field's value.
  8394. func (s *FailedScheduledUpdateGroupActionRequest) SetErrorMessage(v string) *FailedScheduledUpdateGroupActionRequest {
  8395. s.ErrorMessage = &v
  8396. return s
  8397. }
  8398. // SetScheduledActionName sets the ScheduledActionName field's value.
  8399. func (s *FailedScheduledUpdateGroupActionRequest) SetScheduledActionName(v string) *FailedScheduledUpdateGroupActionRequest {
  8400. s.ScheduledActionName = &v
  8401. return s
  8402. }
  8403. // Describes a filter.
  8404. type Filter struct {
  8405. _ struct{} `type:"structure"`
  8406. // The name of the filter. The valid values are: "auto-scaling-group", "key",
  8407. // "value", and "propagate-at-launch".
  8408. Name *string `type:"string"`
  8409. // The value of the filter.
  8410. Values []*string `type:"list"`
  8411. }
  8412. // String returns the string representation
  8413. func (s Filter) String() string {
  8414. return awsutil.Prettify(s)
  8415. }
  8416. // GoString returns the string representation
  8417. func (s Filter) GoString() string {
  8418. return s.String()
  8419. }
  8420. // SetName sets the Name field's value.
  8421. func (s *Filter) SetName(v string) *Filter {
  8422. s.Name = &v
  8423. return s
  8424. }
  8425. // SetValues sets the Values field's value.
  8426. func (s *Filter) SetValues(v []*string) *Filter {
  8427. s.Values = v
  8428. return s
  8429. }
  8430. // Describes an Auto Scaling group.
  8431. type Group struct {
  8432. _ struct{} `type:"structure"`
  8433. // The Amazon Resource Name (ARN) of the Auto Scaling group.
  8434. AutoScalingGroupARN *string `min:"1" type:"string"`
  8435. // The name of the Auto Scaling group.
  8436. //
  8437. // AutoScalingGroupName is a required field
  8438. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  8439. // One or more Availability Zones for the group.
  8440. //
  8441. // AvailabilityZones is a required field
  8442. AvailabilityZones []*string `min:"1" type:"list" required:"true"`
  8443. // The date and time the group was created.
  8444. //
  8445. // CreatedTime is a required field
  8446. CreatedTime *time.Time `type:"timestamp" required:"true"`
  8447. // The amount of time, in seconds, after a scaling activity completes before
  8448. // another scaling activity can start.
  8449. //
  8450. // DefaultCooldown is a required field
  8451. DefaultCooldown *int64 `type:"integer" required:"true"`
  8452. // The desired size of the group.
  8453. //
  8454. // DesiredCapacity is a required field
  8455. DesiredCapacity *int64 `type:"integer" required:"true"`
  8456. // The metrics enabled for the group.
  8457. EnabledMetrics []*EnabledMetric `type:"list"`
  8458. // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before
  8459. // checking the health status of an EC2 instance that has come into service.
  8460. HealthCheckGracePeriod *int64 `type:"integer"`
  8461. // The service to use for the health checks. The valid values are EC2 and ELB.
  8462. //
  8463. // HealthCheckType is a required field
  8464. HealthCheckType *string `min:"1" type:"string" required:"true"`
  8465. // The EC2 instances associated with the group.
  8466. Instances []*Instance `type:"list"`
  8467. // The name of the associated launch configuration.
  8468. LaunchConfigurationName *string `min:"1" type:"string"`
  8469. // The launch template for the group.
  8470. LaunchTemplate *LaunchTemplateSpecification `type:"structure"`
  8471. // One or more load balancers associated with the group.
  8472. LoadBalancerNames []*string `type:"list"`
  8473. // The maximum size of the group.
  8474. //
  8475. // MaxSize is a required field
  8476. MaxSize *int64 `type:"integer" required:"true"`
  8477. // The minimum size of the group.
  8478. //
  8479. // MinSize is a required field
  8480. MinSize *int64 `type:"integer" required:"true"`
  8481. // The mixed instances policy for the group.
  8482. MixedInstancesPolicy *MixedInstancesPolicy `type:"structure"`
  8483. // Indicates whether newly launched instances are protected from termination
  8484. // by Auto Scaling when scaling in.
  8485. NewInstancesProtectedFromScaleIn *bool `type:"boolean"`
  8486. // The name of the placement group into which to launch your instances, if any.
  8487. // For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html)
  8488. // in the Amazon Elastic Compute Cloud User Guide.
  8489. PlacementGroup *string `min:"1" type:"string"`
  8490. // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling
  8491. // group uses to call other AWS services on your behalf.
  8492. ServiceLinkedRoleARN *string `min:"1" type:"string"`
  8493. // The current state of the group when DeleteAutoScalingGroup is in progress.
  8494. Status *string `min:"1" type:"string"`
  8495. // The suspended processes associated with the group.
  8496. SuspendedProcesses []*SuspendedProcess `type:"list"`
  8497. // The tags for the group.
  8498. Tags []*TagDescription `type:"list"`
  8499. // The Amazon Resource Names (ARN) of the target groups for your load balancer.
  8500. TargetGroupARNs []*string `type:"list"`
  8501. // The termination policies for the group.
  8502. TerminationPolicies []*string `type:"list"`
  8503. // One or more subnet IDs, if applicable, separated by commas.
  8504. //
  8505. // If you specify VPCZoneIdentifier and AvailabilityZones, ensure that the Availability
  8506. // Zones of the subnets match the values for AvailabilityZones.
  8507. VPCZoneIdentifier *string `min:"1" type:"string"`
  8508. }
  8509. // String returns the string representation
  8510. func (s Group) String() string {
  8511. return awsutil.Prettify(s)
  8512. }
  8513. // GoString returns the string representation
  8514. func (s Group) GoString() string {
  8515. return s.String()
  8516. }
  8517. // SetAutoScalingGroupARN sets the AutoScalingGroupARN field's value.
  8518. func (s *Group) SetAutoScalingGroupARN(v string) *Group {
  8519. s.AutoScalingGroupARN = &v
  8520. return s
  8521. }
  8522. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  8523. func (s *Group) SetAutoScalingGroupName(v string) *Group {
  8524. s.AutoScalingGroupName = &v
  8525. return s
  8526. }
  8527. // SetAvailabilityZones sets the AvailabilityZones field's value.
  8528. func (s *Group) SetAvailabilityZones(v []*string) *Group {
  8529. s.AvailabilityZones = v
  8530. return s
  8531. }
  8532. // SetCreatedTime sets the CreatedTime field's value.
  8533. func (s *Group) SetCreatedTime(v time.Time) *Group {
  8534. s.CreatedTime = &v
  8535. return s
  8536. }
  8537. // SetDefaultCooldown sets the DefaultCooldown field's value.
  8538. func (s *Group) SetDefaultCooldown(v int64) *Group {
  8539. s.DefaultCooldown = &v
  8540. return s
  8541. }
  8542. // SetDesiredCapacity sets the DesiredCapacity field's value.
  8543. func (s *Group) SetDesiredCapacity(v int64) *Group {
  8544. s.DesiredCapacity = &v
  8545. return s
  8546. }
  8547. // SetEnabledMetrics sets the EnabledMetrics field's value.
  8548. func (s *Group) SetEnabledMetrics(v []*EnabledMetric) *Group {
  8549. s.EnabledMetrics = v
  8550. return s
  8551. }
  8552. // SetHealthCheckGracePeriod sets the HealthCheckGracePeriod field's value.
  8553. func (s *Group) SetHealthCheckGracePeriod(v int64) *Group {
  8554. s.HealthCheckGracePeriod = &v
  8555. return s
  8556. }
  8557. // SetHealthCheckType sets the HealthCheckType field's value.
  8558. func (s *Group) SetHealthCheckType(v string) *Group {
  8559. s.HealthCheckType = &v
  8560. return s
  8561. }
  8562. // SetInstances sets the Instances field's value.
  8563. func (s *Group) SetInstances(v []*Instance) *Group {
  8564. s.Instances = v
  8565. return s
  8566. }
  8567. // SetLaunchConfigurationName sets the LaunchConfigurationName field's value.
  8568. func (s *Group) SetLaunchConfigurationName(v string) *Group {
  8569. s.LaunchConfigurationName = &v
  8570. return s
  8571. }
  8572. // SetLaunchTemplate sets the LaunchTemplate field's value.
  8573. func (s *Group) SetLaunchTemplate(v *LaunchTemplateSpecification) *Group {
  8574. s.LaunchTemplate = v
  8575. return s
  8576. }
  8577. // SetLoadBalancerNames sets the LoadBalancerNames field's value.
  8578. func (s *Group) SetLoadBalancerNames(v []*string) *Group {
  8579. s.LoadBalancerNames = v
  8580. return s
  8581. }
  8582. // SetMaxSize sets the MaxSize field's value.
  8583. func (s *Group) SetMaxSize(v int64) *Group {
  8584. s.MaxSize = &v
  8585. return s
  8586. }
  8587. // SetMinSize sets the MinSize field's value.
  8588. func (s *Group) SetMinSize(v int64) *Group {
  8589. s.MinSize = &v
  8590. return s
  8591. }
  8592. // SetMixedInstancesPolicy sets the MixedInstancesPolicy field's value.
  8593. func (s *Group) SetMixedInstancesPolicy(v *MixedInstancesPolicy) *Group {
  8594. s.MixedInstancesPolicy = v
  8595. return s
  8596. }
  8597. // SetNewInstancesProtectedFromScaleIn sets the NewInstancesProtectedFromScaleIn field's value.
  8598. func (s *Group) SetNewInstancesProtectedFromScaleIn(v bool) *Group {
  8599. s.NewInstancesProtectedFromScaleIn = &v
  8600. return s
  8601. }
  8602. // SetPlacementGroup sets the PlacementGroup field's value.
  8603. func (s *Group) SetPlacementGroup(v string) *Group {
  8604. s.PlacementGroup = &v
  8605. return s
  8606. }
  8607. // SetServiceLinkedRoleARN sets the ServiceLinkedRoleARN field's value.
  8608. func (s *Group) SetServiceLinkedRoleARN(v string) *Group {
  8609. s.ServiceLinkedRoleARN = &v
  8610. return s
  8611. }
  8612. // SetStatus sets the Status field's value.
  8613. func (s *Group) SetStatus(v string) *Group {
  8614. s.Status = &v
  8615. return s
  8616. }
  8617. // SetSuspendedProcesses sets the SuspendedProcesses field's value.
  8618. func (s *Group) SetSuspendedProcesses(v []*SuspendedProcess) *Group {
  8619. s.SuspendedProcesses = v
  8620. return s
  8621. }
  8622. // SetTags sets the Tags field's value.
  8623. func (s *Group) SetTags(v []*TagDescription) *Group {
  8624. s.Tags = v
  8625. return s
  8626. }
  8627. // SetTargetGroupARNs sets the TargetGroupARNs field's value.
  8628. func (s *Group) SetTargetGroupARNs(v []*string) *Group {
  8629. s.TargetGroupARNs = v
  8630. return s
  8631. }
  8632. // SetTerminationPolicies sets the TerminationPolicies field's value.
  8633. func (s *Group) SetTerminationPolicies(v []*string) *Group {
  8634. s.TerminationPolicies = v
  8635. return s
  8636. }
  8637. // SetVPCZoneIdentifier sets the VPCZoneIdentifier field's value.
  8638. func (s *Group) SetVPCZoneIdentifier(v string) *Group {
  8639. s.VPCZoneIdentifier = &v
  8640. return s
  8641. }
  8642. // Describes an EC2 instance.
  8643. type Instance struct {
  8644. _ struct{} `type:"structure"`
  8645. // The Availability Zone in which the instance is running.
  8646. //
  8647. // AvailabilityZone is a required field
  8648. AvailabilityZone *string `min:"1" type:"string" required:"true"`
  8649. // The last reported health status of the instance. "Healthy" means that the
  8650. // instance is healthy and should remain in service. "Unhealthy" means that
  8651. // the instance is unhealthy and that Amazon EC2 Auto Scaling should terminate
  8652. // and replace it.
  8653. //
  8654. // HealthStatus is a required field
  8655. HealthStatus *string `min:"1" type:"string" required:"true"`
  8656. // The ID of the instance.
  8657. //
  8658. // InstanceId is a required field
  8659. InstanceId *string `min:"1" type:"string" required:"true"`
  8660. // The launch configuration associated with the instance.
  8661. LaunchConfigurationName *string `min:"1" type:"string"`
  8662. // The launch template for the instance.
  8663. LaunchTemplate *LaunchTemplateSpecification `type:"structure"`
  8664. // A description of the current lifecycle state. The Quarantined state is not
  8665. // used.
  8666. //
  8667. // LifecycleState is a required field
  8668. LifecycleState *string `type:"string" required:"true" enum:"LifecycleState"`
  8669. // Indicates whether the instance is protected from termination by Amazon EC2
  8670. // Auto Scaling when scaling in.
  8671. //
  8672. // ProtectedFromScaleIn is a required field
  8673. ProtectedFromScaleIn *bool `type:"boolean" required:"true"`
  8674. }
  8675. // String returns the string representation
  8676. func (s Instance) String() string {
  8677. return awsutil.Prettify(s)
  8678. }
  8679. // GoString returns the string representation
  8680. func (s Instance) GoString() string {
  8681. return s.String()
  8682. }
  8683. // SetAvailabilityZone sets the AvailabilityZone field's value.
  8684. func (s *Instance) SetAvailabilityZone(v string) *Instance {
  8685. s.AvailabilityZone = &v
  8686. return s
  8687. }
  8688. // SetHealthStatus sets the HealthStatus field's value.
  8689. func (s *Instance) SetHealthStatus(v string) *Instance {
  8690. s.HealthStatus = &v
  8691. return s
  8692. }
  8693. // SetInstanceId sets the InstanceId field's value.
  8694. func (s *Instance) SetInstanceId(v string) *Instance {
  8695. s.InstanceId = &v
  8696. return s
  8697. }
  8698. // SetLaunchConfigurationName sets the LaunchConfigurationName field's value.
  8699. func (s *Instance) SetLaunchConfigurationName(v string) *Instance {
  8700. s.LaunchConfigurationName = &v
  8701. return s
  8702. }
  8703. // SetLaunchTemplate sets the LaunchTemplate field's value.
  8704. func (s *Instance) SetLaunchTemplate(v *LaunchTemplateSpecification) *Instance {
  8705. s.LaunchTemplate = v
  8706. return s
  8707. }
  8708. // SetLifecycleState sets the LifecycleState field's value.
  8709. func (s *Instance) SetLifecycleState(v string) *Instance {
  8710. s.LifecycleState = &v
  8711. return s
  8712. }
  8713. // SetProtectedFromScaleIn sets the ProtectedFromScaleIn field's value.
  8714. func (s *Instance) SetProtectedFromScaleIn(v bool) *Instance {
  8715. s.ProtectedFromScaleIn = &v
  8716. return s
  8717. }
  8718. // Describes an EC2 instance associated with an Auto Scaling group.
  8719. type InstanceDetails struct {
  8720. _ struct{} `type:"structure"`
  8721. // The name of the Auto Scaling group for the instance.
  8722. //
  8723. // AutoScalingGroupName is a required field
  8724. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  8725. // The Availability Zone for the instance.
  8726. //
  8727. // AvailabilityZone is a required field
  8728. AvailabilityZone *string `min:"1" type:"string" required:"true"`
  8729. // The last reported health status of this instance. "Healthy" means that the
  8730. // instance is healthy and should remain in service. "Unhealthy" means that
  8731. // the instance is unhealthy and Amazon EC2 Auto Scaling should terminate and
  8732. // replace it.
  8733. //
  8734. // HealthStatus is a required field
  8735. HealthStatus *string `min:"1" type:"string" required:"true"`
  8736. // The ID of the instance.
  8737. //
  8738. // InstanceId is a required field
  8739. InstanceId *string `min:"1" type:"string" required:"true"`
  8740. // The launch configuration used to launch the instance. This value is not available
  8741. // if you attached the instance to the Auto Scaling group.
  8742. LaunchConfigurationName *string `min:"1" type:"string"`
  8743. // The launch template for the instance.
  8744. LaunchTemplate *LaunchTemplateSpecification `type:"structure"`
  8745. // The lifecycle state for the instance. For more information, see Auto Scaling
  8746. // Lifecycle (http://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html)
  8747. // in the Amazon EC2 Auto Scaling User Guide.
  8748. //
  8749. // LifecycleState is a required field
  8750. LifecycleState *string `min:"1" type:"string" required:"true"`
  8751. // Indicates whether the instance is protected from termination by Amazon EC2
  8752. // Auto Scaling when scaling in.
  8753. //
  8754. // ProtectedFromScaleIn is a required field
  8755. ProtectedFromScaleIn *bool `type:"boolean" required:"true"`
  8756. }
  8757. // String returns the string representation
  8758. func (s InstanceDetails) String() string {
  8759. return awsutil.Prettify(s)
  8760. }
  8761. // GoString returns the string representation
  8762. func (s InstanceDetails) GoString() string {
  8763. return s.String()
  8764. }
  8765. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  8766. func (s *InstanceDetails) SetAutoScalingGroupName(v string) *InstanceDetails {
  8767. s.AutoScalingGroupName = &v
  8768. return s
  8769. }
  8770. // SetAvailabilityZone sets the AvailabilityZone field's value.
  8771. func (s *InstanceDetails) SetAvailabilityZone(v string) *InstanceDetails {
  8772. s.AvailabilityZone = &v
  8773. return s
  8774. }
  8775. // SetHealthStatus sets the HealthStatus field's value.
  8776. func (s *InstanceDetails) SetHealthStatus(v string) *InstanceDetails {
  8777. s.HealthStatus = &v
  8778. return s
  8779. }
  8780. // SetInstanceId sets the InstanceId field's value.
  8781. func (s *InstanceDetails) SetInstanceId(v string) *InstanceDetails {
  8782. s.InstanceId = &v
  8783. return s
  8784. }
  8785. // SetLaunchConfigurationName sets the LaunchConfigurationName field's value.
  8786. func (s *InstanceDetails) SetLaunchConfigurationName(v string) *InstanceDetails {
  8787. s.LaunchConfigurationName = &v
  8788. return s
  8789. }
  8790. // SetLaunchTemplate sets the LaunchTemplate field's value.
  8791. func (s *InstanceDetails) SetLaunchTemplate(v *LaunchTemplateSpecification) *InstanceDetails {
  8792. s.LaunchTemplate = v
  8793. return s
  8794. }
  8795. // SetLifecycleState sets the LifecycleState field's value.
  8796. func (s *InstanceDetails) SetLifecycleState(v string) *InstanceDetails {
  8797. s.LifecycleState = &v
  8798. return s
  8799. }
  8800. // SetProtectedFromScaleIn sets the ProtectedFromScaleIn field's value.
  8801. func (s *InstanceDetails) SetProtectedFromScaleIn(v bool) *InstanceDetails {
  8802. s.ProtectedFromScaleIn = &v
  8803. return s
  8804. }
  8805. // Describes whether detailed monitoring is enabled for the Auto Scaling instances.
  8806. type InstanceMonitoring struct {
  8807. _ struct{} `type:"structure"`
  8808. // If true, detailed monitoring is enabled. Otherwise, basic monitoring is enabled.
  8809. Enabled *bool `type:"boolean"`
  8810. }
  8811. // String returns the string representation
  8812. func (s InstanceMonitoring) String() string {
  8813. return awsutil.Prettify(s)
  8814. }
  8815. // GoString returns the string representation
  8816. func (s InstanceMonitoring) GoString() string {
  8817. return s.String()
  8818. }
  8819. // SetEnabled sets the Enabled field's value.
  8820. func (s *InstanceMonitoring) SetEnabled(v bool) *InstanceMonitoring {
  8821. s.Enabled = &v
  8822. return s
  8823. }
  8824. // Describes an instances distribution for an Auto Scaling group with MixedInstancesPolicy.
  8825. //
  8826. // The instances distribution specifies the distribution of On-Demand Instances
  8827. // and Spot Instances, the maximum price to pay for Spot Instances, and how
  8828. // the Auto Scaling group allocates instance types.
  8829. type InstancesDistribution struct {
  8830. _ struct{} `type:"structure"`
  8831. // Indicates how to allocate instance types to fulfill On-Demand capacity.
  8832. //
  8833. // The only valid value is prioritized, which is also the default value. This
  8834. // strategy uses the order of instance types in the Overrides array of LaunchTemplate
  8835. // to define the launch priority of each instance type. The first instance type
  8836. // in the array is prioritized higher than the last. If all your On-Demand capacity
  8837. // cannot be fulfilled using your highest priority instance, then the Auto Scaling
  8838. // groups launches the remaining capacity using the second priority instance
  8839. // type, and so on.
  8840. OnDemandAllocationStrategy *string `type:"string"`
  8841. // The minimum amount of the Auto Scaling group's capacity that must be fulfilled
  8842. // by On-Demand Instances. This base portion is provisioned first as your group
  8843. // scales.
  8844. //
  8845. // The default value is 0. If you leave this parameter set to 0, On-Demand Instances
  8846. // are launched as a percentage of the Auto Scaling group's desired capacity,
  8847. // per the OnDemandPercentageAboveBaseCapacity setting.
  8848. OnDemandBaseCapacity *int64 `type:"integer"`
  8849. // Controls the percentages of On-Demand Instances and Spot Instances for your
  8850. // additional capacity beyond OnDemandBaseCapacity.
  8851. //
  8852. // The range is 0–100. The default value is 100. If you leave this parameter
  8853. // set to 100, the percentages are 100% for On-Demand Instances and 0% for Spot
  8854. // Instances.
  8855. OnDemandPercentageAboveBaseCapacity *int64 `type:"integer"`
  8856. // Indicates how to allocate Spot capacity across Spot pools.
  8857. //
  8858. // The only valid value is lowest-price, which is also the default value. The
  8859. // Auto Scaling group selects the cheapest Spot pools and evenly allocates your
  8860. // Spot capacity across the number of Spot pools that you specify.
  8861. SpotAllocationStrategy *string `type:"string"`
  8862. // The number of Spot pools to use to allocate your Spot capacity. The Spot
  8863. // pools are determined from the different instance types in the Overrides array
  8864. // of LaunchTemplate.
  8865. //
  8866. // The range is 1–20 and the default is 2.
  8867. SpotInstancePools *int64 `type:"integer"`
  8868. // The maximum price per unit hour that you are willing to pay for a Spot Instance.
  8869. // If you leave this value blank (which is the default), the maximum Spot price
  8870. // is set at the On-Demand price.
  8871. SpotMaxPrice *string `min:"1" type:"string"`
  8872. }
  8873. // String returns the string representation
  8874. func (s InstancesDistribution) String() string {
  8875. return awsutil.Prettify(s)
  8876. }
  8877. // GoString returns the string representation
  8878. func (s InstancesDistribution) GoString() string {
  8879. return s.String()
  8880. }
  8881. // Validate inspects the fields of the type to determine if they are valid.
  8882. func (s *InstancesDistribution) Validate() error {
  8883. invalidParams := request.ErrInvalidParams{Context: "InstancesDistribution"}
  8884. if s.SpotMaxPrice != nil && len(*s.SpotMaxPrice) < 1 {
  8885. invalidParams.Add(request.NewErrParamMinLen("SpotMaxPrice", 1))
  8886. }
  8887. if invalidParams.Len() > 0 {
  8888. return invalidParams
  8889. }
  8890. return nil
  8891. }
  8892. // SetOnDemandAllocationStrategy sets the OnDemandAllocationStrategy field's value.
  8893. func (s *InstancesDistribution) SetOnDemandAllocationStrategy(v string) *InstancesDistribution {
  8894. s.OnDemandAllocationStrategy = &v
  8895. return s
  8896. }
  8897. // SetOnDemandBaseCapacity sets the OnDemandBaseCapacity field's value.
  8898. func (s *InstancesDistribution) SetOnDemandBaseCapacity(v int64) *InstancesDistribution {
  8899. s.OnDemandBaseCapacity = &v
  8900. return s
  8901. }
  8902. // SetOnDemandPercentageAboveBaseCapacity sets the OnDemandPercentageAboveBaseCapacity field's value.
  8903. func (s *InstancesDistribution) SetOnDemandPercentageAboveBaseCapacity(v int64) *InstancesDistribution {
  8904. s.OnDemandPercentageAboveBaseCapacity = &v
  8905. return s
  8906. }
  8907. // SetSpotAllocationStrategy sets the SpotAllocationStrategy field's value.
  8908. func (s *InstancesDistribution) SetSpotAllocationStrategy(v string) *InstancesDistribution {
  8909. s.SpotAllocationStrategy = &v
  8910. return s
  8911. }
  8912. // SetSpotInstancePools sets the SpotInstancePools field's value.
  8913. func (s *InstancesDistribution) SetSpotInstancePools(v int64) *InstancesDistribution {
  8914. s.SpotInstancePools = &v
  8915. return s
  8916. }
  8917. // SetSpotMaxPrice sets the SpotMaxPrice field's value.
  8918. func (s *InstancesDistribution) SetSpotMaxPrice(v string) *InstancesDistribution {
  8919. s.SpotMaxPrice = &v
  8920. return s
  8921. }
  8922. // Describes a launch configuration.
  8923. type LaunchConfiguration struct {
  8924. _ struct{} `type:"structure"`
  8925. // [EC2-VPC] Indicates whether to assign a public IP address to each instance.
  8926. AssociatePublicIpAddress *bool `type:"boolean"`
  8927. // A block device mapping, which specifies the block devices for the instance.
  8928. BlockDeviceMappings []*BlockDeviceMapping `type:"list"`
  8929. // The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.
  8930. // This parameter can only be used if you are launching EC2-Classic instances.
  8931. // For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
  8932. // in the Amazon Elastic Compute Cloud User Guide.
  8933. ClassicLinkVPCId *string `min:"1" type:"string"`
  8934. // The IDs of one or more security groups for the VPC specified in ClassicLinkVPCId.
  8935. // This parameter is required if you specify a ClassicLink-enabled VPC, and
  8936. // cannot be used otherwise. For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
  8937. // in the Amazon Elastic Compute Cloud User Guide.
  8938. ClassicLinkVPCSecurityGroups []*string `type:"list"`
  8939. // The creation date and time for the launch configuration.
  8940. //
  8941. // CreatedTime is a required field
  8942. CreatedTime *time.Time `type:"timestamp" required:"true"`
  8943. // Controls whether the instance is optimized for EBS I/O (true) or not (false).
  8944. EbsOptimized *bool `type:"boolean"`
  8945. // The name or Amazon Resource Name (ARN) of the instance profile associated
  8946. // with the IAM role for the instance.
  8947. IamInstanceProfile *string `min:"1" type:"string"`
  8948. // The ID of the Amazon Machine Image (AMI).
  8949. //
  8950. // ImageId is a required field
  8951. ImageId *string `min:"1" type:"string" required:"true"`
  8952. // Controls whether instances in this group are launched with detailed (true)
  8953. // or basic (false) monitoring.
  8954. InstanceMonitoring *InstanceMonitoring `type:"structure"`
  8955. // The instance type for the instances.
  8956. //
  8957. // InstanceType is a required field
  8958. InstanceType *string `min:"1" type:"string" required:"true"`
  8959. // The ID of the kernel associated with the AMI.
  8960. KernelId *string `min:"1" type:"string"`
  8961. // The name of the key pair.
  8962. KeyName *string `min:"1" type:"string"`
  8963. // The Amazon Resource Name (ARN) of the launch configuration.
  8964. LaunchConfigurationARN *string `min:"1" type:"string"`
  8965. // The name of the launch configuration.
  8966. //
  8967. // LaunchConfigurationName is a required field
  8968. LaunchConfigurationName *string `min:"1" type:"string" required:"true"`
  8969. // The tenancy of the instance, either default or dedicated. An instance with
  8970. // dedicated tenancy runs in an isolated, single-tenant hardware and can only
  8971. // be launched into a VPC.
  8972. PlacementTenancy *string `min:"1" type:"string"`
  8973. // The ID of the RAM disk associated with the AMI.
  8974. RamdiskId *string `min:"1" type:"string"`
  8975. // The security groups to associate with the instances.
  8976. SecurityGroups []*string `type:"list"`
  8977. // The price to bid when launching Spot Instances.
  8978. SpotPrice *string `min:"1" type:"string"`
  8979. // The user data available to the instances.
  8980. UserData *string `type:"string"`
  8981. }
  8982. // String returns the string representation
  8983. func (s LaunchConfiguration) String() string {
  8984. return awsutil.Prettify(s)
  8985. }
  8986. // GoString returns the string representation
  8987. func (s LaunchConfiguration) GoString() string {
  8988. return s.String()
  8989. }
  8990. // SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value.
  8991. func (s *LaunchConfiguration) SetAssociatePublicIpAddress(v bool) *LaunchConfiguration {
  8992. s.AssociatePublicIpAddress = &v
  8993. return s
  8994. }
  8995. // SetBlockDeviceMappings sets the BlockDeviceMappings field's value.
  8996. func (s *LaunchConfiguration) SetBlockDeviceMappings(v []*BlockDeviceMapping) *LaunchConfiguration {
  8997. s.BlockDeviceMappings = v
  8998. return s
  8999. }
  9000. // SetClassicLinkVPCId sets the ClassicLinkVPCId field's value.
  9001. func (s *LaunchConfiguration) SetClassicLinkVPCId(v string) *LaunchConfiguration {
  9002. s.ClassicLinkVPCId = &v
  9003. return s
  9004. }
  9005. // SetClassicLinkVPCSecurityGroups sets the ClassicLinkVPCSecurityGroups field's value.
  9006. func (s *LaunchConfiguration) SetClassicLinkVPCSecurityGroups(v []*string) *LaunchConfiguration {
  9007. s.ClassicLinkVPCSecurityGroups = v
  9008. return s
  9009. }
  9010. // SetCreatedTime sets the CreatedTime field's value.
  9011. func (s *LaunchConfiguration) SetCreatedTime(v time.Time) *LaunchConfiguration {
  9012. s.CreatedTime = &v
  9013. return s
  9014. }
  9015. // SetEbsOptimized sets the EbsOptimized field's value.
  9016. func (s *LaunchConfiguration) SetEbsOptimized(v bool) *LaunchConfiguration {
  9017. s.EbsOptimized = &v
  9018. return s
  9019. }
  9020. // SetIamInstanceProfile sets the IamInstanceProfile field's value.
  9021. func (s *LaunchConfiguration) SetIamInstanceProfile(v string) *LaunchConfiguration {
  9022. s.IamInstanceProfile = &v
  9023. return s
  9024. }
  9025. // SetImageId sets the ImageId field's value.
  9026. func (s *LaunchConfiguration) SetImageId(v string) *LaunchConfiguration {
  9027. s.ImageId = &v
  9028. return s
  9029. }
  9030. // SetInstanceMonitoring sets the InstanceMonitoring field's value.
  9031. func (s *LaunchConfiguration) SetInstanceMonitoring(v *InstanceMonitoring) *LaunchConfiguration {
  9032. s.InstanceMonitoring = v
  9033. return s
  9034. }
  9035. // SetInstanceType sets the InstanceType field's value.
  9036. func (s *LaunchConfiguration) SetInstanceType(v string) *LaunchConfiguration {
  9037. s.InstanceType = &v
  9038. return s
  9039. }
  9040. // SetKernelId sets the KernelId field's value.
  9041. func (s *LaunchConfiguration) SetKernelId(v string) *LaunchConfiguration {
  9042. s.KernelId = &v
  9043. return s
  9044. }
  9045. // SetKeyName sets the KeyName field's value.
  9046. func (s *LaunchConfiguration) SetKeyName(v string) *LaunchConfiguration {
  9047. s.KeyName = &v
  9048. return s
  9049. }
  9050. // SetLaunchConfigurationARN sets the LaunchConfigurationARN field's value.
  9051. func (s *LaunchConfiguration) SetLaunchConfigurationARN(v string) *LaunchConfiguration {
  9052. s.LaunchConfigurationARN = &v
  9053. return s
  9054. }
  9055. // SetLaunchConfigurationName sets the LaunchConfigurationName field's value.
  9056. func (s *LaunchConfiguration) SetLaunchConfigurationName(v string) *LaunchConfiguration {
  9057. s.LaunchConfigurationName = &v
  9058. return s
  9059. }
  9060. // SetPlacementTenancy sets the PlacementTenancy field's value.
  9061. func (s *LaunchConfiguration) SetPlacementTenancy(v string) *LaunchConfiguration {
  9062. s.PlacementTenancy = &v
  9063. return s
  9064. }
  9065. // SetRamdiskId sets the RamdiskId field's value.
  9066. func (s *LaunchConfiguration) SetRamdiskId(v string) *LaunchConfiguration {
  9067. s.RamdiskId = &v
  9068. return s
  9069. }
  9070. // SetSecurityGroups sets the SecurityGroups field's value.
  9071. func (s *LaunchConfiguration) SetSecurityGroups(v []*string) *LaunchConfiguration {
  9072. s.SecurityGroups = v
  9073. return s
  9074. }
  9075. // SetSpotPrice sets the SpotPrice field's value.
  9076. func (s *LaunchConfiguration) SetSpotPrice(v string) *LaunchConfiguration {
  9077. s.SpotPrice = &v
  9078. return s
  9079. }
  9080. // SetUserData sets the UserData field's value.
  9081. func (s *LaunchConfiguration) SetUserData(v string) *LaunchConfiguration {
  9082. s.UserData = &v
  9083. return s
  9084. }
  9085. // Describes a launch template and overrides.
  9086. //
  9087. // The overrides are used to override the instance type specified by the launch
  9088. // template with multiple instance types that can be used to launch On-Demand
  9089. // Instances and Spot Instances.
  9090. type LaunchTemplate struct {
  9091. _ struct{} `type:"structure"`
  9092. // The launch template to use. You must specify either the launch template ID
  9093. // or launch template name in the request.
  9094. LaunchTemplateSpecification *LaunchTemplateSpecification `type:"structure"`
  9095. // Any parameters that you specify override the same parameters in the launch
  9096. // template. Currently, the only supported override is instance type.
  9097. //
  9098. // You must specify between 2 and 20 overrides.
  9099. Overrides []*LaunchTemplateOverrides `type:"list"`
  9100. }
  9101. // String returns the string representation
  9102. func (s LaunchTemplate) String() string {
  9103. return awsutil.Prettify(s)
  9104. }
  9105. // GoString returns the string representation
  9106. func (s LaunchTemplate) GoString() string {
  9107. return s.String()
  9108. }
  9109. // Validate inspects the fields of the type to determine if they are valid.
  9110. func (s *LaunchTemplate) Validate() error {
  9111. invalidParams := request.ErrInvalidParams{Context: "LaunchTemplate"}
  9112. if s.LaunchTemplateSpecification != nil {
  9113. if err := s.LaunchTemplateSpecification.Validate(); err != nil {
  9114. invalidParams.AddNested("LaunchTemplateSpecification", err.(request.ErrInvalidParams))
  9115. }
  9116. }
  9117. if s.Overrides != nil {
  9118. for i, v := range s.Overrides {
  9119. if v == nil {
  9120. continue
  9121. }
  9122. if err := v.Validate(); err != nil {
  9123. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Overrides", i), err.(request.ErrInvalidParams))
  9124. }
  9125. }
  9126. }
  9127. if invalidParams.Len() > 0 {
  9128. return invalidParams
  9129. }
  9130. return nil
  9131. }
  9132. // SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value.
  9133. func (s *LaunchTemplate) SetLaunchTemplateSpecification(v *LaunchTemplateSpecification) *LaunchTemplate {
  9134. s.LaunchTemplateSpecification = v
  9135. return s
  9136. }
  9137. // SetOverrides sets the Overrides field's value.
  9138. func (s *LaunchTemplate) SetOverrides(v []*LaunchTemplateOverrides) *LaunchTemplate {
  9139. s.Overrides = v
  9140. return s
  9141. }
  9142. // Describes an override for a launch template.
  9143. type LaunchTemplateOverrides struct {
  9144. _ struct{} `type:"structure"`
  9145. // The instance type.
  9146. //
  9147. // For information about available instance types, see Available Instance Types
  9148. // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes)
  9149. // in the Amazon Elastic Compute Cloud User Guide.
  9150. InstanceType *string `min:"1" type:"string"`
  9151. }
  9152. // String returns the string representation
  9153. func (s LaunchTemplateOverrides) String() string {
  9154. return awsutil.Prettify(s)
  9155. }
  9156. // GoString returns the string representation
  9157. func (s LaunchTemplateOverrides) GoString() string {
  9158. return s.String()
  9159. }
  9160. // Validate inspects the fields of the type to determine if they are valid.
  9161. func (s *LaunchTemplateOverrides) Validate() error {
  9162. invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateOverrides"}
  9163. if s.InstanceType != nil && len(*s.InstanceType) < 1 {
  9164. invalidParams.Add(request.NewErrParamMinLen("InstanceType", 1))
  9165. }
  9166. if invalidParams.Len() > 0 {
  9167. return invalidParams
  9168. }
  9169. return nil
  9170. }
  9171. // SetInstanceType sets the InstanceType field's value.
  9172. func (s *LaunchTemplateOverrides) SetInstanceType(v string) *LaunchTemplateOverrides {
  9173. s.InstanceType = &v
  9174. return s
  9175. }
  9176. // Describes a launch template and the launch template version.
  9177. //
  9178. // The launch template that is specified must be configured for use with an
  9179. // Auto Scaling group. For more information, see Creating a Launch Template
  9180. // for an Auto Scaling group (http://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html)
  9181. // in the Amazon EC2 Auto Scaling User Guide.
  9182. type LaunchTemplateSpecification struct {
  9183. _ struct{} `type:"structure"`
  9184. // The ID of the launch template. You must specify either a template ID or a
  9185. // template name.
  9186. LaunchTemplateId *string `min:"1" type:"string"`
  9187. // The name of the launch template. You must specify either a template name
  9188. // or a template ID.
  9189. LaunchTemplateName *string `min:"3" type:"string"`
  9190. // The version number, $Latest, or $Default. If the value is $Latest, Amazon
  9191. // EC2 Auto Scaling selects the latest version of the launch template when launching
  9192. // instances. If the value is $Default, Amazon EC2 Auto Scaling selects the
  9193. // default version of the launch template when launching instances. The default
  9194. // value is $Default.
  9195. Version *string `min:"1" type:"string"`
  9196. }
  9197. // String returns the string representation
  9198. func (s LaunchTemplateSpecification) String() string {
  9199. return awsutil.Prettify(s)
  9200. }
  9201. // GoString returns the string representation
  9202. func (s LaunchTemplateSpecification) GoString() string {
  9203. return s.String()
  9204. }
  9205. // Validate inspects the fields of the type to determine if they are valid.
  9206. func (s *LaunchTemplateSpecification) Validate() error {
  9207. invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateSpecification"}
  9208. if s.LaunchTemplateId != nil && len(*s.LaunchTemplateId) < 1 {
  9209. invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateId", 1))
  9210. }
  9211. if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 {
  9212. invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3))
  9213. }
  9214. if s.Version != nil && len(*s.Version) < 1 {
  9215. invalidParams.Add(request.NewErrParamMinLen("Version", 1))
  9216. }
  9217. if invalidParams.Len() > 0 {
  9218. return invalidParams
  9219. }
  9220. return nil
  9221. }
  9222. // SetLaunchTemplateId sets the LaunchTemplateId field's value.
  9223. func (s *LaunchTemplateSpecification) SetLaunchTemplateId(v string) *LaunchTemplateSpecification {
  9224. s.LaunchTemplateId = &v
  9225. return s
  9226. }
  9227. // SetLaunchTemplateName sets the LaunchTemplateName field's value.
  9228. func (s *LaunchTemplateSpecification) SetLaunchTemplateName(v string) *LaunchTemplateSpecification {
  9229. s.LaunchTemplateName = &v
  9230. return s
  9231. }
  9232. // SetVersion sets the Version field's value.
  9233. func (s *LaunchTemplateSpecification) SetVersion(v string) *LaunchTemplateSpecification {
  9234. s.Version = &v
  9235. return s
  9236. }
  9237. // Describes a lifecycle hook, which tells Amazon EC2 Auto Scaling that you
  9238. // want to perform an action whenever it launches instances or whenever it terminates
  9239. // instances.
  9240. //
  9241. // For more information, see Lifecycle Hooks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html)
  9242. // in the Amazon EC2 Auto Scaling User Guide.
  9243. type LifecycleHook struct {
  9244. _ struct{} `type:"structure"`
  9245. // The name of the Auto Scaling group for the lifecycle hook.
  9246. AutoScalingGroupName *string `min:"1" type:"string"`
  9247. // Defines the action the Auto Scaling group should take when the lifecycle
  9248. // hook timeout elapses or if an unexpected failure occurs. The valid values
  9249. // are CONTINUE and ABANDON. The default value is CONTINUE.
  9250. DefaultResult *string `type:"string"`
  9251. // The maximum time, in seconds, that an instance can remain in a Pending:Wait
  9252. // or Terminating:Wait state. The maximum is 172800 seconds (48 hours) or 100
  9253. // times HeartbeatTimeout, whichever is smaller.
  9254. GlobalTimeout *int64 `type:"integer"`
  9255. // The maximum time, in seconds, that can elapse before the lifecycle hook times
  9256. // out. If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the
  9257. // default action. You can prevent the lifecycle hook from timing out by calling
  9258. // RecordLifecycleActionHeartbeat.
  9259. HeartbeatTimeout *int64 `type:"integer"`
  9260. // The name of the lifecycle hook.
  9261. LifecycleHookName *string `min:"1" type:"string"`
  9262. // The state of the EC2 instance to which to attach the lifecycle hook. The
  9263. // following are possible values:
  9264. //
  9265. // * autoscaling:EC2_INSTANCE_LAUNCHING
  9266. //
  9267. // * autoscaling:EC2_INSTANCE_TERMINATING
  9268. LifecycleTransition *string `type:"string"`
  9269. // Additional information that you want to include any time Amazon EC2 Auto
  9270. // Scaling sends a message to the notification target.
  9271. NotificationMetadata *string `min:"1" type:"string"`
  9272. // The ARN of the target that Amazon EC2 Auto Scaling sends notifications to
  9273. // when an instance is in the transition state for the lifecycle hook. The notification
  9274. // target can be either an SQS queue or an SNS topic.
  9275. NotificationTargetARN *string `min:"1" type:"string"`
  9276. // The ARN of the IAM role that allows the Auto Scaling group to publish to
  9277. // the specified notification target.
  9278. RoleARN *string `min:"1" type:"string"`
  9279. }
  9280. // String returns the string representation
  9281. func (s LifecycleHook) String() string {
  9282. return awsutil.Prettify(s)
  9283. }
  9284. // GoString returns the string representation
  9285. func (s LifecycleHook) GoString() string {
  9286. return s.String()
  9287. }
  9288. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  9289. func (s *LifecycleHook) SetAutoScalingGroupName(v string) *LifecycleHook {
  9290. s.AutoScalingGroupName = &v
  9291. return s
  9292. }
  9293. // SetDefaultResult sets the DefaultResult field's value.
  9294. func (s *LifecycleHook) SetDefaultResult(v string) *LifecycleHook {
  9295. s.DefaultResult = &v
  9296. return s
  9297. }
  9298. // SetGlobalTimeout sets the GlobalTimeout field's value.
  9299. func (s *LifecycleHook) SetGlobalTimeout(v int64) *LifecycleHook {
  9300. s.GlobalTimeout = &v
  9301. return s
  9302. }
  9303. // SetHeartbeatTimeout sets the HeartbeatTimeout field's value.
  9304. func (s *LifecycleHook) SetHeartbeatTimeout(v int64) *LifecycleHook {
  9305. s.HeartbeatTimeout = &v
  9306. return s
  9307. }
  9308. // SetLifecycleHookName sets the LifecycleHookName field's value.
  9309. func (s *LifecycleHook) SetLifecycleHookName(v string) *LifecycleHook {
  9310. s.LifecycleHookName = &v
  9311. return s
  9312. }
  9313. // SetLifecycleTransition sets the LifecycleTransition field's value.
  9314. func (s *LifecycleHook) SetLifecycleTransition(v string) *LifecycleHook {
  9315. s.LifecycleTransition = &v
  9316. return s
  9317. }
  9318. // SetNotificationMetadata sets the NotificationMetadata field's value.
  9319. func (s *LifecycleHook) SetNotificationMetadata(v string) *LifecycleHook {
  9320. s.NotificationMetadata = &v
  9321. return s
  9322. }
  9323. // SetNotificationTargetARN sets the NotificationTargetARN field's value.
  9324. func (s *LifecycleHook) SetNotificationTargetARN(v string) *LifecycleHook {
  9325. s.NotificationTargetARN = &v
  9326. return s
  9327. }
  9328. // SetRoleARN sets the RoleARN field's value.
  9329. func (s *LifecycleHook) SetRoleARN(v string) *LifecycleHook {
  9330. s.RoleARN = &v
  9331. return s
  9332. }
  9333. // Describes a lifecycle hook, which tells Amazon EC2 Auto Scaling that you
  9334. // want to perform an action whenever it launches instances or whenever it terminates
  9335. // instances.
  9336. //
  9337. // For more information, see Lifecycle Hooks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html)
  9338. // in the Amazon EC2 Auto Scaling User Guide.
  9339. type LifecycleHookSpecification struct {
  9340. _ struct{} `type:"structure"`
  9341. // Defines the action the Auto Scaling group should take when the lifecycle
  9342. // hook timeout elapses or if an unexpected failure occurs. The valid values
  9343. // are CONTINUE and ABANDON.
  9344. DefaultResult *string `type:"string"`
  9345. // The maximum time, in seconds, that can elapse before the lifecycle hook times
  9346. // out. If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the
  9347. // default action. You can prevent the lifecycle hook from timing out by calling
  9348. // RecordLifecycleActionHeartbeat.
  9349. HeartbeatTimeout *int64 `type:"integer"`
  9350. // The name of the lifecycle hook.
  9351. //
  9352. // LifecycleHookName is a required field
  9353. LifecycleHookName *string `min:"1" type:"string" required:"true"`
  9354. // The state of the EC2 instance to which you want to attach the lifecycle hook.
  9355. // The possible values are:
  9356. //
  9357. // * autoscaling:EC2_INSTANCE_LAUNCHING
  9358. //
  9359. // * autoscaling:EC2_INSTANCE_TERMINATING
  9360. //
  9361. // LifecycleTransition is a required field
  9362. LifecycleTransition *string `type:"string" required:"true"`
  9363. // Additional information that you want to include any time Amazon EC2 Auto
  9364. // Scaling sends a message to the notification target.
  9365. NotificationMetadata *string `min:"1" type:"string"`
  9366. // The ARN of the target that Amazon EC2 Auto Scaling sends notifications to
  9367. // when an instance is in the transition state for the lifecycle hook. The notification
  9368. // target can be either an SQS queue or an SNS topic.
  9369. NotificationTargetARN *string `type:"string"`
  9370. // The ARN of the IAM role that allows the Auto Scaling group to publish to
  9371. // the specified notification target.
  9372. RoleARN *string `min:"1" type:"string"`
  9373. }
  9374. // String returns the string representation
  9375. func (s LifecycleHookSpecification) String() string {
  9376. return awsutil.Prettify(s)
  9377. }
  9378. // GoString returns the string representation
  9379. func (s LifecycleHookSpecification) GoString() string {
  9380. return s.String()
  9381. }
  9382. // Validate inspects the fields of the type to determine if they are valid.
  9383. func (s *LifecycleHookSpecification) Validate() error {
  9384. invalidParams := request.ErrInvalidParams{Context: "LifecycleHookSpecification"}
  9385. if s.LifecycleHookName == nil {
  9386. invalidParams.Add(request.NewErrParamRequired("LifecycleHookName"))
  9387. }
  9388. if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 {
  9389. invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1))
  9390. }
  9391. if s.LifecycleTransition == nil {
  9392. invalidParams.Add(request.NewErrParamRequired("LifecycleTransition"))
  9393. }
  9394. if s.NotificationMetadata != nil && len(*s.NotificationMetadata) < 1 {
  9395. invalidParams.Add(request.NewErrParamMinLen("NotificationMetadata", 1))
  9396. }
  9397. if s.RoleARN != nil && len(*s.RoleARN) < 1 {
  9398. invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1))
  9399. }
  9400. if invalidParams.Len() > 0 {
  9401. return invalidParams
  9402. }
  9403. return nil
  9404. }
  9405. // SetDefaultResult sets the DefaultResult field's value.
  9406. func (s *LifecycleHookSpecification) SetDefaultResult(v string) *LifecycleHookSpecification {
  9407. s.DefaultResult = &v
  9408. return s
  9409. }
  9410. // SetHeartbeatTimeout sets the HeartbeatTimeout field's value.
  9411. func (s *LifecycleHookSpecification) SetHeartbeatTimeout(v int64) *LifecycleHookSpecification {
  9412. s.HeartbeatTimeout = &v
  9413. return s
  9414. }
  9415. // SetLifecycleHookName sets the LifecycleHookName field's value.
  9416. func (s *LifecycleHookSpecification) SetLifecycleHookName(v string) *LifecycleHookSpecification {
  9417. s.LifecycleHookName = &v
  9418. return s
  9419. }
  9420. // SetLifecycleTransition sets the LifecycleTransition field's value.
  9421. func (s *LifecycleHookSpecification) SetLifecycleTransition(v string) *LifecycleHookSpecification {
  9422. s.LifecycleTransition = &v
  9423. return s
  9424. }
  9425. // SetNotificationMetadata sets the NotificationMetadata field's value.
  9426. func (s *LifecycleHookSpecification) SetNotificationMetadata(v string) *LifecycleHookSpecification {
  9427. s.NotificationMetadata = &v
  9428. return s
  9429. }
  9430. // SetNotificationTargetARN sets the NotificationTargetARN field's value.
  9431. func (s *LifecycleHookSpecification) SetNotificationTargetARN(v string) *LifecycleHookSpecification {
  9432. s.NotificationTargetARN = &v
  9433. return s
  9434. }
  9435. // SetRoleARN sets the RoleARN field's value.
  9436. func (s *LifecycleHookSpecification) SetRoleARN(v string) *LifecycleHookSpecification {
  9437. s.RoleARN = &v
  9438. return s
  9439. }
  9440. // Describes the state of a Classic Load Balancer.
  9441. //
  9442. // If you specify a load balancer when creating the Auto Scaling group, the
  9443. // state of the load balancer is InService.
  9444. //
  9445. // If you attach a load balancer to an existing Auto Scaling group, the initial
  9446. // state is Adding. The state transitions to Added after all instances in the
  9447. // group are registered with the load balancer. If Elastic Load Balancing health
  9448. // checks are enabled for the load balancer, the state transitions to InService
  9449. // after at least one instance in the group passes the health check. If EC2
  9450. // health checks are enabled instead, the load balancer remains in the Added
  9451. // state.
  9452. type LoadBalancerState struct {
  9453. _ struct{} `type:"structure"`
  9454. // The name of the load balancer.
  9455. LoadBalancerName *string `min:"1" type:"string"`
  9456. // One of the following load balancer states:
  9457. //
  9458. // * Adding - The instances in the group are being registered with the load
  9459. // balancer.
  9460. //
  9461. // * Added - All instances in the group are registered with the load balancer.
  9462. //
  9463. // * InService - At least one instance in the group passed an ELB health
  9464. // check.
  9465. //
  9466. // * Removing - The instances in the group are being deregistered from the
  9467. // load balancer. If connection draining is enabled, Elastic Load Balancing
  9468. // waits for in-flight requests to complete before deregistering the instances.
  9469. //
  9470. // * Removed - All instances in the group are deregistered from the load
  9471. // balancer.
  9472. State *string `min:"1" type:"string"`
  9473. }
  9474. // String returns the string representation
  9475. func (s LoadBalancerState) String() string {
  9476. return awsutil.Prettify(s)
  9477. }
  9478. // GoString returns the string representation
  9479. func (s LoadBalancerState) GoString() string {
  9480. return s.String()
  9481. }
  9482. // SetLoadBalancerName sets the LoadBalancerName field's value.
  9483. func (s *LoadBalancerState) SetLoadBalancerName(v string) *LoadBalancerState {
  9484. s.LoadBalancerName = &v
  9485. return s
  9486. }
  9487. // SetState sets the State field's value.
  9488. func (s *LoadBalancerState) SetState(v string) *LoadBalancerState {
  9489. s.State = &v
  9490. return s
  9491. }
  9492. // Describes the state of a target group.
  9493. //
  9494. // If you attach a target group to an existing Auto Scaling group, the initial
  9495. // state is Adding. The state transitions to Added after all Auto Scaling instances
  9496. // are registered with the target group. If Elastic Load Balancing health checks
  9497. // are enabled, the state transitions to InService after at least one Auto Scaling
  9498. // instance passes the health check. If EC2 health checks are enabled instead,
  9499. // the target group remains in the Added state.
  9500. type LoadBalancerTargetGroupState struct {
  9501. _ struct{} `type:"structure"`
  9502. // The Amazon Resource Name (ARN) of the target group.
  9503. LoadBalancerTargetGroupARN *string `min:"1" type:"string"`
  9504. // The state of the target group.
  9505. //
  9506. // * Adding - The Auto Scaling instances are being registered with the target
  9507. // group.
  9508. //
  9509. // * Added - All Auto Scaling instances are registered with the target group.
  9510. //
  9511. // * InService - At least one Auto Scaling instance passed an ELB health
  9512. // check.
  9513. //
  9514. // * Removing - The Auto Scaling instances are being deregistered from the
  9515. // target group. If connection draining is enabled, Elastic Load Balancing
  9516. // waits for in-flight requests to complete before deregistering the instances.
  9517. //
  9518. // * Removed - All Auto Scaling instances are deregistered from the target
  9519. // group.
  9520. State *string `min:"1" type:"string"`
  9521. }
  9522. // String returns the string representation
  9523. func (s LoadBalancerTargetGroupState) String() string {
  9524. return awsutil.Prettify(s)
  9525. }
  9526. // GoString returns the string representation
  9527. func (s LoadBalancerTargetGroupState) GoString() string {
  9528. return s.String()
  9529. }
  9530. // SetLoadBalancerTargetGroupARN sets the LoadBalancerTargetGroupARN field's value.
  9531. func (s *LoadBalancerTargetGroupState) SetLoadBalancerTargetGroupARN(v string) *LoadBalancerTargetGroupState {
  9532. s.LoadBalancerTargetGroupARN = &v
  9533. return s
  9534. }
  9535. // SetState sets the State field's value.
  9536. func (s *LoadBalancerTargetGroupState) SetState(v string) *LoadBalancerTargetGroupState {
  9537. s.State = &v
  9538. return s
  9539. }
  9540. // Describes a metric.
  9541. type MetricCollectionType struct {
  9542. _ struct{} `type:"structure"`
  9543. // One of the following metrics:
  9544. //
  9545. // * GroupMinSize
  9546. //
  9547. // * GroupMaxSize
  9548. //
  9549. // * GroupDesiredCapacity
  9550. //
  9551. // * GroupInServiceInstances
  9552. //
  9553. // * GroupPendingInstances
  9554. //
  9555. // * GroupStandbyInstances
  9556. //
  9557. // * GroupTerminatingInstances
  9558. //
  9559. // * GroupTotalInstances
  9560. Metric *string `min:"1" type:"string"`
  9561. }
  9562. // String returns the string representation
  9563. func (s MetricCollectionType) String() string {
  9564. return awsutil.Prettify(s)
  9565. }
  9566. // GoString returns the string representation
  9567. func (s MetricCollectionType) GoString() string {
  9568. return s.String()
  9569. }
  9570. // SetMetric sets the Metric field's value.
  9571. func (s *MetricCollectionType) SetMetric(v string) *MetricCollectionType {
  9572. s.Metric = &v
  9573. return s
  9574. }
  9575. // Describes the dimension of a metric.
  9576. type MetricDimension struct {
  9577. _ struct{} `type:"structure"`
  9578. // The name of the dimension.
  9579. //
  9580. // Name is a required field
  9581. Name *string `type:"string" required:"true"`
  9582. // The value of the dimension.
  9583. //
  9584. // Value is a required field
  9585. Value *string `type:"string" required:"true"`
  9586. }
  9587. // String returns the string representation
  9588. func (s MetricDimension) String() string {
  9589. return awsutil.Prettify(s)
  9590. }
  9591. // GoString returns the string representation
  9592. func (s MetricDimension) GoString() string {
  9593. return s.String()
  9594. }
  9595. // Validate inspects the fields of the type to determine if they are valid.
  9596. func (s *MetricDimension) Validate() error {
  9597. invalidParams := request.ErrInvalidParams{Context: "MetricDimension"}
  9598. if s.Name == nil {
  9599. invalidParams.Add(request.NewErrParamRequired("Name"))
  9600. }
  9601. if s.Value == nil {
  9602. invalidParams.Add(request.NewErrParamRequired("Value"))
  9603. }
  9604. if invalidParams.Len() > 0 {
  9605. return invalidParams
  9606. }
  9607. return nil
  9608. }
  9609. // SetName sets the Name field's value.
  9610. func (s *MetricDimension) SetName(v string) *MetricDimension {
  9611. s.Name = &v
  9612. return s
  9613. }
  9614. // SetValue sets the Value field's value.
  9615. func (s *MetricDimension) SetValue(v string) *MetricDimension {
  9616. s.Value = &v
  9617. return s
  9618. }
  9619. // Describes a granularity of a metric.
  9620. type MetricGranularityType struct {
  9621. _ struct{} `type:"structure"`
  9622. // The granularity. The only valid value is 1Minute.
  9623. Granularity *string `min:"1" type:"string"`
  9624. }
  9625. // String returns the string representation
  9626. func (s MetricGranularityType) String() string {
  9627. return awsutil.Prettify(s)
  9628. }
  9629. // GoString returns the string representation
  9630. func (s MetricGranularityType) GoString() string {
  9631. return s.String()
  9632. }
  9633. // SetGranularity sets the Granularity field's value.
  9634. func (s *MetricGranularityType) SetGranularity(v string) *MetricGranularityType {
  9635. s.Granularity = &v
  9636. return s
  9637. }
  9638. // Describes a mixed instances policy for an Auto Scaling group. With mixed
  9639. // instances, your Auto Scaling group can provision a combination of On-Demand
  9640. // Instances and Spot Instances across multiple instance types. For more information,
  9641. // see Using Multiple Instance Types and Purchase Options (http://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroup.html#asg-purchase-options)
  9642. // in the Amazon EC2 Auto Scaling User Guide.
  9643. //
  9644. // When you create your Auto Scaling group, you can specify a launch configuration
  9645. // or template as a parameter for the top-level object, or you can specify a
  9646. // mixed instances policy, but not both at the same time.
  9647. type MixedInstancesPolicy struct {
  9648. _ struct{} `type:"structure"`
  9649. // The instances distribution to use.
  9650. //
  9651. // If you leave this parameter unspecified when creating the group, the default
  9652. // values are used.
  9653. InstancesDistribution *InstancesDistribution `type:"structure"`
  9654. // The launch template and overrides.
  9655. //
  9656. // This parameter is required when creating an Auto Scaling group with a mixed
  9657. // instances policy, but is not required when updating the group.
  9658. LaunchTemplate *LaunchTemplate `type:"structure"`
  9659. }
  9660. // String returns the string representation
  9661. func (s MixedInstancesPolicy) String() string {
  9662. return awsutil.Prettify(s)
  9663. }
  9664. // GoString returns the string representation
  9665. func (s MixedInstancesPolicy) GoString() string {
  9666. return s.String()
  9667. }
  9668. // Validate inspects the fields of the type to determine if they are valid.
  9669. func (s *MixedInstancesPolicy) Validate() error {
  9670. invalidParams := request.ErrInvalidParams{Context: "MixedInstancesPolicy"}
  9671. if s.InstancesDistribution != nil {
  9672. if err := s.InstancesDistribution.Validate(); err != nil {
  9673. invalidParams.AddNested("InstancesDistribution", err.(request.ErrInvalidParams))
  9674. }
  9675. }
  9676. if s.LaunchTemplate != nil {
  9677. if err := s.LaunchTemplate.Validate(); err != nil {
  9678. invalidParams.AddNested("LaunchTemplate", err.(request.ErrInvalidParams))
  9679. }
  9680. }
  9681. if invalidParams.Len() > 0 {
  9682. return invalidParams
  9683. }
  9684. return nil
  9685. }
  9686. // SetInstancesDistribution sets the InstancesDistribution field's value.
  9687. func (s *MixedInstancesPolicy) SetInstancesDistribution(v *InstancesDistribution) *MixedInstancesPolicy {
  9688. s.InstancesDistribution = v
  9689. return s
  9690. }
  9691. // SetLaunchTemplate sets the LaunchTemplate field's value.
  9692. func (s *MixedInstancesPolicy) SetLaunchTemplate(v *LaunchTemplate) *MixedInstancesPolicy {
  9693. s.LaunchTemplate = v
  9694. return s
  9695. }
  9696. // Describes a notification.
  9697. type NotificationConfiguration struct {
  9698. _ struct{} `type:"structure"`
  9699. // The name of the Auto Scaling group.
  9700. AutoScalingGroupName *string `min:"1" type:"string"`
  9701. // One of the following event notification types:
  9702. //
  9703. // * autoscaling:EC2_INSTANCE_LAUNCH
  9704. //
  9705. // * autoscaling:EC2_INSTANCE_LAUNCH_ERROR
  9706. //
  9707. // * autoscaling:EC2_INSTANCE_TERMINATE
  9708. //
  9709. // * autoscaling:EC2_INSTANCE_TERMINATE_ERROR
  9710. //
  9711. // * autoscaling:TEST_NOTIFICATION
  9712. NotificationType *string `min:"1" type:"string"`
  9713. // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service
  9714. // (Amazon SNS) topic.
  9715. TopicARN *string `min:"1" type:"string"`
  9716. }
  9717. // String returns the string representation
  9718. func (s NotificationConfiguration) String() string {
  9719. return awsutil.Prettify(s)
  9720. }
  9721. // GoString returns the string representation
  9722. func (s NotificationConfiguration) GoString() string {
  9723. return s.String()
  9724. }
  9725. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  9726. func (s *NotificationConfiguration) SetAutoScalingGroupName(v string) *NotificationConfiguration {
  9727. s.AutoScalingGroupName = &v
  9728. return s
  9729. }
  9730. // SetNotificationType sets the NotificationType field's value.
  9731. func (s *NotificationConfiguration) SetNotificationType(v string) *NotificationConfiguration {
  9732. s.NotificationType = &v
  9733. return s
  9734. }
  9735. // SetTopicARN sets the TopicARN field's value.
  9736. func (s *NotificationConfiguration) SetTopicARN(v string) *NotificationConfiguration {
  9737. s.TopicARN = &v
  9738. return s
  9739. }
  9740. // Configures a predefined metric for a target tracking policy.
  9741. type PredefinedMetricSpecification struct {
  9742. _ struct{} `type:"structure"`
  9743. // The metric type.
  9744. //
  9745. // PredefinedMetricType is a required field
  9746. PredefinedMetricType *string `type:"string" required:"true" enum:"MetricType"`
  9747. // Identifies the resource associated with the metric type. The following predefined
  9748. // metrics are available:
  9749. //
  9750. // * ASGAverageCPUUtilization - Average CPU utilization of the Auto Scaling
  9751. // group.
  9752. //
  9753. // * ASGAverageNetworkIn - Average number of bytes received on all network
  9754. // interfaces by the Auto Scaling group.
  9755. //
  9756. // * ASGAverageNetworkOut - Average number of bytes sent out on all network
  9757. // interfaces by the Auto Scaling group.
  9758. //
  9759. // * ALBRequestCountPerTarget - Number of requests completed per target in
  9760. // an Application Load Balancer target group.
  9761. //
  9762. // For predefined metric types ASGAverageCPUUtilization, ASGAverageNetworkIn,
  9763. // and ASGAverageNetworkOut, the parameter must not be specified as the resource
  9764. // associated with the metric type is the Auto Scaling group. For predefined
  9765. // metric type ALBRequestCountPerTarget, the parameter must be specified in
  9766. // the format: app/load-balancer-name/load-balancer-id/targetgroup/target-group-name/target-group-id,
  9767. // where app/load-balancer-name/load-balancer-id is the final portion of the
  9768. // load balancer ARN, and targetgroup/target-group-name/target-group-id is the
  9769. // final portion of the target group ARN. The target group must be attached
  9770. // to the Auto Scaling group.
  9771. ResourceLabel *string `min:"1" type:"string"`
  9772. }
  9773. // String returns the string representation
  9774. func (s PredefinedMetricSpecification) String() string {
  9775. return awsutil.Prettify(s)
  9776. }
  9777. // GoString returns the string representation
  9778. func (s PredefinedMetricSpecification) GoString() string {
  9779. return s.String()
  9780. }
  9781. // Validate inspects the fields of the type to determine if they are valid.
  9782. func (s *PredefinedMetricSpecification) Validate() error {
  9783. invalidParams := request.ErrInvalidParams{Context: "PredefinedMetricSpecification"}
  9784. if s.PredefinedMetricType == nil {
  9785. invalidParams.Add(request.NewErrParamRequired("PredefinedMetricType"))
  9786. }
  9787. if s.ResourceLabel != nil && len(*s.ResourceLabel) < 1 {
  9788. invalidParams.Add(request.NewErrParamMinLen("ResourceLabel", 1))
  9789. }
  9790. if invalidParams.Len() > 0 {
  9791. return invalidParams
  9792. }
  9793. return nil
  9794. }
  9795. // SetPredefinedMetricType sets the PredefinedMetricType field's value.
  9796. func (s *PredefinedMetricSpecification) SetPredefinedMetricType(v string) *PredefinedMetricSpecification {
  9797. s.PredefinedMetricType = &v
  9798. return s
  9799. }
  9800. // SetResourceLabel sets the ResourceLabel field's value.
  9801. func (s *PredefinedMetricSpecification) SetResourceLabel(v string) *PredefinedMetricSpecification {
  9802. s.ResourceLabel = &v
  9803. return s
  9804. }
  9805. // Describes a process type.
  9806. //
  9807. // For more information, see Scaling Processes (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html#process-types)
  9808. // in the Amazon EC2 Auto Scaling User Guide.
  9809. type ProcessType struct {
  9810. _ struct{} `type:"structure"`
  9811. // One of the following processes:
  9812. //
  9813. // * Launch
  9814. //
  9815. // * Terminate
  9816. //
  9817. // * AddToLoadBalancer
  9818. //
  9819. // * AlarmNotification
  9820. //
  9821. // * AZRebalance
  9822. //
  9823. // * HealthCheck
  9824. //
  9825. // * ReplaceUnhealthy
  9826. //
  9827. // * ScheduledActions
  9828. //
  9829. // ProcessName is a required field
  9830. ProcessName *string `min:"1" type:"string" required:"true"`
  9831. }
  9832. // String returns the string representation
  9833. func (s ProcessType) String() string {
  9834. return awsutil.Prettify(s)
  9835. }
  9836. // GoString returns the string representation
  9837. func (s ProcessType) GoString() string {
  9838. return s.String()
  9839. }
  9840. // SetProcessName sets the ProcessName field's value.
  9841. func (s *ProcessType) SetProcessName(v string) *ProcessType {
  9842. s.ProcessName = &v
  9843. return s
  9844. }
  9845. type PutLifecycleHookInput struct {
  9846. _ struct{} `type:"structure"`
  9847. // The name of the Auto Scaling group.
  9848. //
  9849. // AutoScalingGroupName is a required field
  9850. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  9851. // Defines the action the Auto Scaling group should take when the lifecycle
  9852. // hook timeout elapses or if an unexpected failure occurs. This parameter can
  9853. // be either CONTINUE or ABANDON. The default value is ABANDON.
  9854. DefaultResult *string `type:"string"`
  9855. // The maximum time, in seconds, that can elapse before the lifecycle hook times
  9856. // out. The range is from 30 to 7200 seconds. The default is 3600 seconds (1
  9857. // hour).
  9858. //
  9859. // If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the default
  9860. // action. You can prevent the lifecycle hook from timing out by calling RecordLifecycleActionHeartbeat.
  9861. HeartbeatTimeout *int64 `type:"integer"`
  9862. // The name of the lifecycle hook.
  9863. //
  9864. // LifecycleHookName is a required field
  9865. LifecycleHookName *string `min:"1" type:"string" required:"true"`
  9866. // The instance state to which you want to attach the lifecycle hook. The possible
  9867. // values are:
  9868. //
  9869. // * autoscaling:EC2_INSTANCE_LAUNCHING
  9870. //
  9871. // * autoscaling:EC2_INSTANCE_TERMINATING
  9872. //
  9873. // This parameter is required for new lifecycle hooks, but optional when updating
  9874. // existing hooks.
  9875. LifecycleTransition *string `type:"string"`
  9876. // Contains additional information that you want to include any time Amazon
  9877. // EC2 Auto Scaling sends a message to the notification target.
  9878. NotificationMetadata *string `min:"1" type:"string"`
  9879. // The ARN of the notification target that Amazon EC2 Auto Scaling uses to notify
  9880. // you when an instance is in the transition state for the lifecycle hook. This
  9881. // target can be either an SQS queue or an SNS topic. If you specify an empty
  9882. // string, this overrides the current ARN.
  9883. //
  9884. // This operation uses the JSON format when sending notifications to an Amazon
  9885. // SQS queue, and an email key-value pair format when sending notifications
  9886. // to an Amazon SNS topic.
  9887. //
  9888. // When you specify a notification target, Amazon EC2 Auto Scaling sends it
  9889. // a test message. Test messages contain the following additional key-value
  9890. // pair: "Event": "autoscaling:TEST_NOTIFICATION".
  9891. NotificationTargetARN *string `type:"string"`
  9892. // The ARN of the IAM role that allows the Auto Scaling group to publish to
  9893. // the specified notification target.
  9894. //
  9895. // This parameter is required for new lifecycle hooks, but optional when updating
  9896. // existing hooks.
  9897. RoleARN *string `min:"1" type:"string"`
  9898. }
  9899. // String returns the string representation
  9900. func (s PutLifecycleHookInput) String() string {
  9901. return awsutil.Prettify(s)
  9902. }
  9903. // GoString returns the string representation
  9904. func (s PutLifecycleHookInput) GoString() string {
  9905. return s.String()
  9906. }
  9907. // Validate inspects the fields of the type to determine if they are valid.
  9908. func (s *PutLifecycleHookInput) Validate() error {
  9909. invalidParams := request.ErrInvalidParams{Context: "PutLifecycleHookInput"}
  9910. if s.AutoScalingGroupName == nil {
  9911. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  9912. }
  9913. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  9914. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  9915. }
  9916. if s.LifecycleHookName == nil {
  9917. invalidParams.Add(request.NewErrParamRequired("LifecycleHookName"))
  9918. }
  9919. if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 {
  9920. invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1))
  9921. }
  9922. if s.NotificationMetadata != nil && len(*s.NotificationMetadata) < 1 {
  9923. invalidParams.Add(request.NewErrParamMinLen("NotificationMetadata", 1))
  9924. }
  9925. if s.RoleARN != nil && len(*s.RoleARN) < 1 {
  9926. invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1))
  9927. }
  9928. if invalidParams.Len() > 0 {
  9929. return invalidParams
  9930. }
  9931. return nil
  9932. }
  9933. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  9934. func (s *PutLifecycleHookInput) SetAutoScalingGroupName(v string) *PutLifecycleHookInput {
  9935. s.AutoScalingGroupName = &v
  9936. return s
  9937. }
  9938. // SetDefaultResult sets the DefaultResult field's value.
  9939. func (s *PutLifecycleHookInput) SetDefaultResult(v string) *PutLifecycleHookInput {
  9940. s.DefaultResult = &v
  9941. return s
  9942. }
  9943. // SetHeartbeatTimeout sets the HeartbeatTimeout field's value.
  9944. func (s *PutLifecycleHookInput) SetHeartbeatTimeout(v int64) *PutLifecycleHookInput {
  9945. s.HeartbeatTimeout = &v
  9946. return s
  9947. }
  9948. // SetLifecycleHookName sets the LifecycleHookName field's value.
  9949. func (s *PutLifecycleHookInput) SetLifecycleHookName(v string) *PutLifecycleHookInput {
  9950. s.LifecycleHookName = &v
  9951. return s
  9952. }
  9953. // SetLifecycleTransition sets the LifecycleTransition field's value.
  9954. func (s *PutLifecycleHookInput) SetLifecycleTransition(v string) *PutLifecycleHookInput {
  9955. s.LifecycleTransition = &v
  9956. return s
  9957. }
  9958. // SetNotificationMetadata sets the NotificationMetadata field's value.
  9959. func (s *PutLifecycleHookInput) SetNotificationMetadata(v string) *PutLifecycleHookInput {
  9960. s.NotificationMetadata = &v
  9961. return s
  9962. }
  9963. // SetNotificationTargetARN sets the NotificationTargetARN field's value.
  9964. func (s *PutLifecycleHookInput) SetNotificationTargetARN(v string) *PutLifecycleHookInput {
  9965. s.NotificationTargetARN = &v
  9966. return s
  9967. }
  9968. // SetRoleARN sets the RoleARN field's value.
  9969. func (s *PutLifecycleHookInput) SetRoleARN(v string) *PutLifecycleHookInput {
  9970. s.RoleARN = &v
  9971. return s
  9972. }
  9973. type PutLifecycleHookOutput struct {
  9974. _ struct{} `type:"structure"`
  9975. }
  9976. // String returns the string representation
  9977. func (s PutLifecycleHookOutput) String() string {
  9978. return awsutil.Prettify(s)
  9979. }
  9980. // GoString returns the string representation
  9981. func (s PutLifecycleHookOutput) GoString() string {
  9982. return s.String()
  9983. }
  9984. type PutNotificationConfigurationInput struct {
  9985. _ struct{} `type:"structure"`
  9986. // The name of the Auto Scaling group.
  9987. //
  9988. // AutoScalingGroupName is a required field
  9989. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  9990. // The type of event that causes the notification to be sent. For more information
  9991. // about notification types supported by Amazon EC2 Auto Scaling, see DescribeAutoScalingNotificationTypes.
  9992. //
  9993. // NotificationTypes is a required field
  9994. NotificationTypes []*string `type:"list" required:"true"`
  9995. // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service
  9996. // (Amazon SNS) topic.
  9997. //
  9998. // TopicARN is a required field
  9999. TopicARN *string `min:"1" type:"string" required:"true"`
  10000. }
  10001. // String returns the string representation
  10002. func (s PutNotificationConfigurationInput) String() string {
  10003. return awsutil.Prettify(s)
  10004. }
  10005. // GoString returns the string representation
  10006. func (s PutNotificationConfigurationInput) GoString() string {
  10007. return s.String()
  10008. }
  10009. // Validate inspects the fields of the type to determine if they are valid.
  10010. func (s *PutNotificationConfigurationInput) Validate() error {
  10011. invalidParams := request.ErrInvalidParams{Context: "PutNotificationConfigurationInput"}
  10012. if s.AutoScalingGroupName == nil {
  10013. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  10014. }
  10015. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  10016. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  10017. }
  10018. if s.NotificationTypes == nil {
  10019. invalidParams.Add(request.NewErrParamRequired("NotificationTypes"))
  10020. }
  10021. if s.TopicARN == nil {
  10022. invalidParams.Add(request.NewErrParamRequired("TopicARN"))
  10023. }
  10024. if s.TopicARN != nil && len(*s.TopicARN) < 1 {
  10025. invalidParams.Add(request.NewErrParamMinLen("TopicARN", 1))
  10026. }
  10027. if invalidParams.Len() > 0 {
  10028. return invalidParams
  10029. }
  10030. return nil
  10031. }
  10032. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  10033. func (s *PutNotificationConfigurationInput) SetAutoScalingGroupName(v string) *PutNotificationConfigurationInput {
  10034. s.AutoScalingGroupName = &v
  10035. return s
  10036. }
  10037. // SetNotificationTypes sets the NotificationTypes field's value.
  10038. func (s *PutNotificationConfigurationInput) SetNotificationTypes(v []*string) *PutNotificationConfigurationInput {
  10039. s.NotificationTypes = v
  10040. return s
  10041. }
  10042. // SetTopicARN sets the TopicARN field's value.
  10043. func (s *PutNotificationConfigurationInput) SetTopicARN(v string) *PutNotificationConfigurationInput {
  10044. s.TopicARN = &v
  10045. return s
  10046. }
  10047. type PutNotificationConfigurationOutput struct {
  10048. _ struct{} `type:"structure"`
  10049. }
  10050. // String returns the string representation
  10051. func (s PutNotificationConfigurationOutput) String() string {
  10052. return awsutil.Prettify(s)
  10053. }
  10054. // GoString returns the string representation
  10055. func (s PutNotificationConfigurationOutput) GoString() string {
  10056. return s.String()
  10057. }
  10058. type PutScalingPolicyInput struct {
  10059. _ struct{} `type:"structure"`
  10060. // The adjustment type. The valid values are ChangeInCapacity, ExactCapacity,
  10061. // and PercentChangeInCapacity.
  10062. //
  10063. // This parameter is supported if the policy type is SimpleScaling or StepScaling.
  10064. //
  10065. // For more information, see Dynamic Scaling (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scale-based-on-demand.html)
  10066. // in the Amazon EC2 Auto Scaling User Guide.
  10067. AdjustmentType *string `min:"1" type:"string"`
  10068. // The name of the Auto Scaling group.
  10069. //
  10070. // AutoScalingGroupName is a required field
  10071. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  10072. // The amount of time, in seconds, after a scaling activity completes and before
  10073. // the next scaling activity can start. If this parameter is not specified,
  10074. // the default cooldown period for the group applies.
  10075. //
  10076. // This parameter is supported if the policy type is SimpleScaling.
  10077. //
  10078. // For more information, see Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html)
  10079. // in the Amazon EC2 Auto Scaling User Guide.
  10080. Cooldown *int64 `type:"integer"`
  10081. // The estimated time, in seconds, until a newly launched instance can contribute
  10082. // to the CloudWatch metrics. The default is to use the value specified for
  10083. // the default cooldown period for the group.
  10084. //
  10085. // This parameter is supported if the policy type is StepScaling or TargetTrackingScaling.
  10086. EstimatedInstanceWarmup *int64 `type:"integer"`
  10087. // The aggregation type for the CloudWatch metrics. The valid values are Minimum,
  10088. // Maximum, and Average. If the aggregation type is null, the value is treated
  10089. // as Average.
  10090. //
  10091. // This parameter is supported if the policy type is StepScaling.
  10092. MetricAggregationType *string `min:"1" type:"string"`
  10093. // The minimum number of instances to scale. If the value of AdjustmentType
  10094. // is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity
  10095. // of the Auto Scaling group by at least this many instances. Otherwise, the
  10096. // error is ValidationError.
  10097. //
  10098. // This parameter is supported if the policy type is SimpleScaling or StepScaling.
  10099. MinAdjustmentMagnitude *int64 `type:"integer"`
  10100. // Available for backward compatibility. Use MinAdjustmentMagnitude instead.
  10101. MinAdjustmentStep *int64 `deprecated:"true" type:"integer"`
  10102. // The name of the policy.
  10103. //
  10104. // PolicyName is a required field
  10105. PolicyName *string `min:"1" type:"string" required:"true"`
  10106. // The policy type. The valid values are SimpleScaling, StepScaling, and TargetTrackingScaling.
  10107. // If the policy type is null, the value is treated as SimpleScaling.
  10108. PolicyType *string `min:"1" type:"string"`
  10109. // The amount by which to scale, based on the specified adjustment type. A positive
  10110. // value adds to the current capacity while a negative number removes from the
  10111. // current capacity.
  10112. //
  10113. // This parameter is required if the policy type is SimpleScaling and not supported
  10114. // otherwise.
  10115. ScalingAdjustment *int64 `type:"integer"`
  10116. // A set of adjustments that enable you to scale based on the size of the alarm
  10117. // breach.
  10118. //
  10119. // This parameter is required if the policy type is StepScaling and not supported
  10120. // otherwise.
  10121. StepAdjustments []*StepAdjustment `type:"list"`
  10122. // A target tracking policy.
  10123. //
  10124. // This parameter is required if the policy type is TargetTrackingScaling and
  10125. // not supported otherwise.
  10126. TargetTrackingConfiguration *TargetTrackingConfiguration `type:"structure"`
  10127. }
  10128. // String returns the string representation
  10129. func (s PutScalingPolicyInput) String() string {
  10130. return awsutil.Prettify(s)
  10131. }
  10132. // GoString returns the string representation
  10133. func (s PutScalingPolicyInput) GoString() string {
  10134. return s.String()
  10135. }
  10136. // Validate inspects the fields of the type to determine if they are valid.
  10137. func (s *PutScalingPolicyInput) Validate() error {
  10138. invalidParams := request.ErrInvalidParams{Context: "PutScalingPolicyInput"}
  10139. if s.AdjustmentType != nil && len(*s.AdjustmentType) < 1 {
  10140. invalidParams.Add(request.NewErrParamMinLen("AdjustmentType", 1))
  10141. }
  10142. if s.AutoScalingGroupName == nil {
  10143. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  10144. }
  10145. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  10146. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  10147. }
  10148. if s.MetricAggregationType != nil && len(*s.MetricAggregationType) < 1 {
  10149. invalidParams.Add(request.NewErrParamMinLen("MetricAggregationType", 1))
  10150. }
  10151. if s.PolicyName == nil {
  10152. invalidParams.Add(request.NewErrParamRequired("PolicyName"))
  10153. }
  10154. if s.PolicyName != nil && len(*s.PolicyName) < 1 {
  10155. invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
  10156. }
  10157. if s.PolicyType != nil && len(*s.PolicyType) < 1 {
  10158. invalidParams.Add(request.NewErrParamMinLen("PolicyType", 1))
  10159. }
  10160. if s.StepAdjustments != nil {
  10161. for i, v := range s.StepAdjustments {
  10162. if v == nil {
  10163. continue
  10164. }
  10165. if err := v.Validate(); err != nil {
  10166. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "StepAdjustments", i), err.(request.ErrInvalidParams))
  10167. }
  10168. }
  10169. }
  10170. if s.TargetTrackingConfiguration != nil {
  10171. if err := s.TargetTrackingConfiguration.Validate(); err != nil {
  10172. invalidParams.AddNested("TargetTrackingConfiguration", err.(request.ErrInvalidParams))
  10173. }
  10174. }
  10175. if invalidParams.Len() > 0 {
  10176. return invalidParams
  10177. }
  10178. return nil
  10179. }
  10180. // SetAdjustmentType sets the AdjustmentType field's value.
  10181. func (s *PutScalingPolicyInput) SetAdjustmentType(v string) *PutScalingPolicyInput {
  10182. s.AdjustmentType = &v
  10183. return s
  10184. }
  10185. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  10186. func (s *PutScalingPolicyInput) SetAutoScalingGroupName(v string) *PutScalingPolicyInput {
  10187. s.AutoScalingGroupName = &v
  10188. return s
  10189. }
  10190. // SetCooldown sets the Cooldown field's value.
  10191. func (s *PutScalingPolicyInput) SetCooldown(v int64) *PutScalingPolicyInput {
  10192. s.Cooldown = &v
  10193. return s
  10194. }
  10195. // SetEstimatedInstanceWarmup sets the EstimatedInstanceWarmup field's value.
  10196. func (s *PutScalingPolicyInput) SetEstimatedInstanceWarmup(v int64) *PutScalingPolicyInput {
  10197. s.EstimatedInstanceWarmup = &v
  10198. return s
  10199. }
  10200. // SetMetricAggregationType sets the MetricAggregationType field's value.
  10201. func (s *PutScalingPolicyInput) SetMetricAggregationType(v string) *PutScalingPolicyInput {
  10202. s.MetricAggregationType = &v
  10203. return s
  10204. }
  10205. // SetMinAdjustmentMagnitude sets the MinAdjustmentMagnitude field's value.
  10206. func (s *PutScalingPolicyInput) SetMinAdjustmentMagnitude(v int64) *PutScalingPolicyInput {
  10207. s.MinAdjustmentMagnitude = &v
  10208. return s
  10209. }
  10210. // SetMinAdjustmentStep sets the MinAdjustmentStep field's value.
  10211. func (s *PutScalingPolicyInput) SetMinAdjustmentStep(v int64) *PutScalingPolicyInput {
  10212. s.MinAdjustmentStep = &v
  10213. return s
  10214. }
  10215. // SetPolicyName sets the PolicyName field's value.
  10216. func (s *PutScalingPolicyInput) SetPolicyName(v string) *PutScalingPolicyInput {
  10217. s.PolicyName = &v
  10218. return s
  10219. }
  10220. // SetPolicyType sets the PolicyType field's value.
  10221. func (s *PutScalingPolicyInput) SetPolicyType(v string) *PutScalingPolicyInput {
  10222. s.PolicyType = &v
  10223. return s
  10224. }
  10225. // SetScalingAdjustment sets the ScalingAdjustment field's value.
  10226. func (s *PutScalingPolicyInput) SetScalingAdjustment(v int64) *PutScalingPolicyInput {
  10227. s.ScalingAdjustment = &v
  10228. return s
  10229. }
  10230. // SetStepAdjustments sets the StepAdjustments field's value.
  10231. func (s *PutScalingPolicyInput) SetStepAdjustments(v []*StepAdjustment) *PutScalingPolicyInput {
  10232. s.StepAdjustments = v
  10233. return s
  10234. }
  10235. // SetTargetTrackingConfiguration sets the TargetTrackingConfiguration field's value.
  10236. func (s *PutScalingPolicyInput) SetTargetTrackingConfiguration(v *TargetTrackingConfiguration) *PutScalingPolicyInput {
  10237. s.TargetTrackingConfiguration = v
  10238. return s
  10239. }
  10240. // Contains the output of PutScalingPolicy.
  10241. type PutScalingPolicyOutput struct {
  10242. _ struct{} `type:"structure"`
  10243. // The CloudWatch alarms created for the target tracking policy.
  10244. Alarms []*Alarm `type:"list"`
  10245. // The Amazon Resource Name (ARN) of the policy.
  10246. PolicyARN *string `min:"1" type:"string"`
  10247. }
  10248. // String returns the string representation
  10249. func (s PutScalingPolicyOutput) String() string {
  10250. return awsutil.Prettify(s)
  10251. }
  10252. // GoString returns the string representation
  10253. func (s PutScalingPolicyOutput) GoString() string {
  10254. return s.String()
  10255. }
  10256. // SetAlarms sets the Alarms field's value.
  10257. func (s *PutScalingPolicyOutput) SetAlarms(v []*Alarm) *PutScalingPolicyOutput {
  10258. s.Alarms = v
  10259. return s
  10260. }
  10261. // SetPolicyARN sets the PolicyARN field's value.
  10262. func (s *PutScalingPolicyOutput) SetPolicyARN(v string) *PutScalingPolicyOutput {
  10263. s.PolicyARN = &v
  10264. return s
  10265. }
  10266. type PutScheduledUpdateGroupActionInput struct {
  10267. _ struct{} `type:"structure"`
  10268. // The name of the Auto Scaling group.
  10269. //
  10270. // AutoScalingGroupName is a required field
  10271. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  10272. // The number of EC2 instances that should be running in the group.
  10273. DesiredCapacity *int64 `type:"integer"`
  10274. // The time for the recurring schedule to end. Amazon EC2 Auto Scaling does
  10275. // not perform the action after this time.
  10276. EndTime *time.Time `type:"timestamp"`
  10277. // The maximum size for the Auto Scaling group.
  10278. MaxSize *int64 `type:"integer"`
  10279. // The minimum size for the Auto Scaling group.
  10280. MinSize *int64 `type:"integer"`
  10281. // The recurring schedule for this action, in Unix cron syntax format. For more
  10282. // information about this format, see Crontab (http://crontab.org).
  10283. Recurrence *string `min:"1" type:"string"`
  10284. // The name of this scaling action.
  10285. //
  10286. // ScheduledActionName is a required field
  10287. ScheduledActionName *string `min:"1" type:"string" required:"true"`
  10288. // The time for this action to start, in "YYYY-MM-DDThh:mm:ssZ" format in UTC/GMT
  10289. // only (for example, 2014-06-01T00:00:00Z).
  10290. //
  10291. // If you specify Recurrence and StartTime, Amazon EC2 Auto Scaling performs
  10292. // the action at this time, and then performs the action based on the specified
  10293. // recurrence.
  10294. //
  10295. // If you try to schedule your action in the past, Amazon EC2 Auto Scaling returns
  10296. // an error message.
  10297. StartTime *time.Time `type:"timestamp"`
  10298. // This parameter is deprecated.
  10299. Time *time.Time `type:"timestamp"`
  10300. }
  10301. // String returns the string representation
  10302. func (s PutScheduledUpdateGroupActionInput) String() string {
  10303. return awsutil.Prettify(s)
  10304. }
  10305. // GoString returns the string representation
  10306. func (s PutScheduledUpdateGroupActionInput) GoString() string {
  10307. return s.String()
  10308. }
  10309. // Validate inspects the fields of the type to determine if they are valid.
  10310. func (s *PutScheduledUpdateGroupActionInput) Validate() error {
  10311. invalidParams := request.ErrInvalidParams{Context: "PutScheduledUpdateGroupActionInput"}
  10312. if s.AutoScalingGroupName == nil {
  10313. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  10314. }
  10315. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  10316. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  10317. }
  10318. if s.Recurrence != nil && len(*s.Recurrence) < 1 {
  10319. invalidParams.Add(request.NewErrParamMinLen("Recurrence", 1))
  10320. }
  10321. if s.ScheduledActionName == nil {
  10322. invalidParams.Add(request.NewErrParamRequired("ScheduledActionName"))
  10323. }
  10324. if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 {
  10325. invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1))
  10326. }
  10327. if invalidParams.Len() > 0 {
  10328. return invalidParams
  10329. }
  10330. return nil
  10331. }
  10332. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  10333. func (s *PutScheduledUpdateGroupActionInput) SetAutoScalingGroupName(v string) *PutScheduledUpdateGroupActionInput {
  10334. s.AutoScalingGroupName = &v
  10335. return s
  10336. }
  10337. // SetDesiredCapacity sets the DesiredCapacity field's value.
  10338. func (s *PutScheduledUpdateGroupActionInput) SetDesiredCapacity(v int64) *PutScheduledUpdateGroupActionInput {
  10339. s.DesiredCapacity = &v
  10340. return s
  10341. }
  10342. // SetEndTime sets the EndTime field's value.
  10343. func (s *PutScheduledUpdateGroupActionInput) SetEndTime(v time.Time) *PutScheduledUpdateGroupActionInput {
  10344. s.EndTime = &v
  10345. return s
  10346. }
  10347. // SetMaxSize sets the MaxSize field's value.
  10348. func (s *PutScheduledUpdateGroupActionInput) SetMaxSize(v int64) *PutScheduledUpdateGroupActionInput {
  10349. s.MaxSize = &v
  10350. return s
  10351. }
  10352. // SetMinSize sets the MinSize field's value.
  10353. func (s *PutScheduledUpdateGroupActionInput) SetMinSize(v int64) *PutScheduledUpdateGroupActionInput {
  10354. s.MinSize = &v
  10355. return s
  10356. }
  10357. // SetRecurrence sets the Recurrence field's value.
  10358. func (s *PutScheduledUpdateGroupActionInput) SetRecurrence(v string) *PutScheduledUpdateGroupActionInput {
  10359. s.Recurrence = &v
  10360. return s
  10361. }
  10362. // SetScheduledActionName sets the ScheduledActionName field's value.
  10363. func (s *PutScheduledUpdateGroupActionInput) SetScheduledActionName(v string) *PutScheduledUpdateGroupActionInput {
  10364. s.ScheduledActionName = &v
  10365. return s
  10366. }
  10367. // SetStartTime sets the StartTime field's value.
  10368. func (s *PutScheduledUpdateGroupActionInput) SetStartTime(v time.Time) *PutScheduledUpdateGroupActionInput {
  10369. s.StartTime = &v
  10370. return s
  10371. }
  10372. // SetTime sets the Time field's value.
  10373. func (s *PutScheduledUpdateGroupActionInput) SetTime(v time.Time) *PutScheduledUpdateGroupActionInput {
  10374. s.Time = &v
  10375. return s
  10376. }
  10377. type PutScheduledUpdateGroupActionOutput struct {
  10378. _ struct{} `type:"structure"`
  10379. }
  10380. // String returns the string representation
  10381. func (s PutScheduledUpdateGroupActionOutput) String() string {
  10382. return awsutil.Prettify(s)
  10383. }
  10384. // GoString returns the string representation
  10385. func (s PutScheduledUpdateGroupActionOutput) GoString() string {
  10386. return s.String()
  10387. }
  10388. type RecordLifecycleActionHeartbeatInput struct {
  10389. _ struct{} `type:"structure"`
  10390. // The name of the Auto Scaling group.
  10391. //
  10392. // AutoScalingGroupName is a required field
  10393. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  10394. // The ID of the instance.
  10395. InstanceId *string `min:"1" type:"string"`
  10396. // A token that uniquely identifies a specific lifecycle action associated with
  10397. // an instance. Amazon EC2 Auto Scaling sends this token to the notification
  10398. // target that you specified when you created the lifecycle hook.
  10399. LifecycleActionToken *string `min:"36" type:"string"`
  10400. // The name of the lifecycle hook.
  10401. //
  10402. // LifecycleHookName is a required field
  10403. LifecycleHookName *string `min:"1" type:"string" required:"true"`
  10404. }
  10405. // String returns the string representation
  10406. func (s RecordLifecycleActionHeartbeatInput) String() string {
  10407. return awsutil.Prettify(s)
  10408. }
  10409. // GoString returns the string representation
  10410. func (s RecordLifecycleActionHeartbeatInput) GoString() string {
  10411. return s.String()
  10412. }
  10413. // Validate inspects the fields of the type to determine if they are valid.
  10414. func (s *RecordLifecycleActionHeartbeatInput) Validate() error {
  10415. invalidParams := request.ErrInvalidParams{Context: "RecordLifecycleActionHeartbeatInput"}
  10416. if s.AutoScalingGroupName == nil {
  10417. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  10418. }
  10419. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  10420. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  10421. }
  10422. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  10423. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  10424. }
  10425. if s.LifecycleActionToken != nil && len(*s.LifecycleActionToken) < 36 {
  10426. invalidParams.Add(request.NewErrParamMinLen("LifecycleActionToken", 36))
  10427. }
  10428. if s.LifecycleHookName == nil {
  10429. invalidParams.Add(request.NewErrParamRequired("LifecycleHookName"))
  10430. }
  10431. if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 {
  10432. invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1))
  10433. }
  10434. if invalidParams.Len() > 0 {
  10435. return invalidParams
  10436. }
  10437. return nil
  10438. }
  10439. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  10440. func (s *RecordLifecycleActionHeartbeatInput) SetAutoScalingGroupName(v string) *RecordLifecycleActionHeartbeatInput {
  10441. s.AutoScalingGroupName = &v
  10442. return s
  10443. }
  10444. // SetInstanceId sets the InstanceId field's value.
  10445. func (s *RecordLifecycleActionHeartbeatInput) SetInstanceId(v string) *RecordLifecycleActionHeartbeatInput {
  10446. s.InstanceId = &v
  10447. return s
  10448. }
  10449. // SetLifecycleActionToken sets the LifecycleActionToken field's value.
  10450. func (s *RecordLifecycleActionHeartbeatInput) SetLifecycleActionToken(v string) *RecordLifecycleActionHeartbeatInput {
  10451. s.LifecycleActionToken = &v
  10452. return s
  10453. }
  10454. // SetLifecycleHookName sets the LifecycleHookName field's value.
  10455. func (s *RecordLifecycleActionHeartbeatInput) SetLifecycleHookName(v string) *RecordLifecycleActionHeartbeatInput {
  10456. s.LifecycleHookName = &v
  10457. return s
  10458. }
  10459. type RecordLifecycleActionHeartbeatOutput struct {
  10460. _ struct{} `type:"structure"`
  10461. }
  10462. // String returns the string representation
  10463. func (s RecordLifecycleActionHeartbeatOutput) String() string {
  10464. return awsutil.Prettify(s)
  10465. }
  10466. // GoString returns the string representation
  10467. func (s RecordLifecycleActionHeartbeatOutput) GoString() string {
  10468. return s.String()
  10469. }
  10470. type ResumeProcessesOutput struct {
  10471. _ struct{} `type:"structure"`
  10472. }
  10473. // String returns the string representation
  10474. func (s ResumeProcessesOutput) String() string {
  10475. return awsutil.Prettify(s)
  10476. }
  10477. // GoString returns the string representation
  10478. func (s ResumeProcessesOutput) GoString() string {
  10479. return s.String()
  10480. }
  10481. // Describes a scaling policy.
  10482. type ScalingPolicy struct {
  10483. _ struct{} `type:"structure"`
  10484. // The adjustment type, which specifies how ScalingAdjustment is interpreted.
  10485. // Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
  10486. AdjustmentType *string `min:"1" type:"string"`
  10487. // The CloudWatch alarms related to the policy.
  10488. Alarms []*Alarm `type:"list"`
  10489. // The name of the Auto Scaling group.
  10490. AutoScalingGroupName *string `min:"1" type:"string"`
  10491. // The amount of time, in seconds, after a scaling activity completes before
  10492. // any further dynamic scaling activities can start.
  10493. Cooldown *int64 `type:"integer"`
  10494. // The estimated time, in seconds, until a newly launched instance can contribute
  10495. // to the CloudWatch metrics.
  10496. EstimatedInstanceWarmup *int64 `type:"integer"`
  10497. // The aggregation type for the CloudWatch metrics. Valid values are Minimum,
  10498. // Maximum, and Average.
  10499. MetricAggregationType *string `min:"1" type:"string"`
  10500. // The minimum number of instances to scale. If the value of AdjustmentType
  10501. // is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity
  10502. // of the Auto Scaling group by at least this many instances. Otherwise, the
  10503. // error is ValidationError.
  10504. MinAdjustmentMagnitude *int64 `type:"integer"`
  10505. // Available for backward compatibility. Use MinAdjustmentMagnitude instead.
  10506. MinAdjustmentStep *int64 `deprecated:"true" type:"integer"`
  10507. // The Amazon Resource Name (ARN) of the policy.
  10508. PolicyARN *string `min:"1" type:"string"`
  10509. // The name of the scaling policy.
  10510. PolicyName *string `min:"1" type:"string"`
  10511. // The policy type. Valid values are SimpleScaling and StepScaling.
  10512. PolicyType *string `min:"1" type:"string"`
  10513. // The amount by which to scale, based on the specified adjustment type. A positive
  10514. // value adds to the current capacity while a negative number removes from the
  10515. // current capacity.
  10516. ScalingAdjustment *int64 `type:"integer"`
  10517. // A set of adjustments that enable you to scale based on the size of the alarm
  10518. // breach.
  10519. StepAdjustments []*StepAdjustment `type:"list"`
  10520. // A target tracking policy.
  10521. TargetTrackingConfiguration *TargetTrackingConfiguration `type:"structure"`
  10522. }
  10523. // String returns the string representation
  10524. func (s ScalingPolicy) String() string {
  10525. return awsutil.Prettify(s)
  10526. }
  10527. // GoString returns the string representation
  10528. func (s ScalingPolicy) GoString() string {
  10529. return s.String()
  10530. }
  10531. // SetAdjustmentType sets the AdjustmentType field's value.
  10532. func (s *ScalingPolicy) SetAdjustmentType(v string) *ScalingPolicy {
  10533. s.AdjustmentType = &v
  10534. return s
  10535. }
  10536. // SetAlarms sets the Alarms field's value.
  10537. func (s *ScalingPolicy) SetAlarms(v []*Alarm) *ScalingPolicy {
  10538. s.Alarms = v
  10539. return s
  10540. }
  10541. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  10542. func (s *ScalingPolicy) SetAutoScalingGroupName(v string) *ScalingPolicy {
  10543. s.AutoScalingGroupName = &v
  10544. return s
  10545. }
  10546. // SetCooldown sets the Cooldown field's value.
  10547. func (s *ScalingPolicy) SetCooldown(v int64) *ScalingPolicy {
  10548. s.Cooldown = &v
  10549. return s
  10550. }
  10551. // SetEstimatedInstanceWarmup sets the EstimatedInstanceWarmup field's value.
  10552. func (s *ScalingPolicy) SetEstimatedInstanceWarmup(v int64) *ScalingPolicy {
  10553. s.EstimatedInstanceWarmup = &v
  10554. return s
  10555. }
  10556. // SetMetricAggregationType sets the MetricAggregationType field's value.
  10557. func (s *ScalingPolicy) SetMetricAggregationType(v string) *ScalingPolicy {
  10558. s.MetricAggregationType = &v
  10559. return s
  10560. }
  10561. // SetMinAdjustmentMagnitude sets the MinAdjustmentMagnitude field's value.
  10562. func (s *ScalingPolicy) SetMinAdjustmentMagnitude(v int64) *ScalingPolicy {
  10563. s.MinAdjustmentMagnitude = &v
  10564. return s
  10565. }
  10566. // SetMinAdjustmentStep sets the MinAdjustmentStep field's value.
  10567. func (s *ScalingPolicy) SetMinAdjustmentStep(v int64) *ScalingPolicy {
  10568. s.MinAdjustmentStep = &v
  10569. return s
  10570. }
  10571. // SetPolicyARN sets the PolicyARN field's value.
  10572. func (s *ScalingPolicy) SetPolicyARN(v string) *ScalingPolicy {
  10573. s.PolicyARN = &v
  10574. return s
  10575. }
  10576. // SetPolicyName sets the PolicyName field's value.
  10577. func (s *ScalingPolicy) SetPolicyName(v string) *ScalingPolicy {
  10578. s.PolicyName = &v
  10579. return s
  10580. }
  10581. // SetPolicyType sets the PolicyType field's value.
  10582. func (s *ScalingPolicy) SetPolicyType(v string) *ScalingPolicy {
  10583. s.PolicyType = &v
  10584. return s
  10585. }
  10586. // SetScalingAdjustment sets the ScalingAdjustment field's value.
  10587. func (s *ScalingPolicy) SetScalingAdjustment(v int64) *ScalingPolicy {
  10588. s.ScalingAdjustment = &v
  10589. return s
  10590. }
  10591. // SetStepAdjustments sets the StepAdjustments field's value.
  10592. func (s *ScalingPolicy) SetStepAdjustments(v []*StepAdjustment) *ScalingPolicy {
  10593. s.StepAdjustments = v
  10594. return s
  10595. }
  10596. // SetTargetTrackingConfiguration sets the TargetTrackingConfiguration field's value.
  10597. func (s *ScalingPolicy) SetTargetTrackingConfiguration(v *TargetTrackingConfiguration) *ScalingPolicy {
  10598. s.TargetTrackingConfiguration = v
  10599. return s
  10600. }
  10601. type ScalingProcessQuery struct {
  10602. _ struct{} `type:"structure"`
  10603. // The name of the Auto Scaling group.
  10604. //
  10605. // AutoScalingGroupName is a required field
  10606. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  10607. // One or more of the following processes. If you omit this parameter, all processes
  10608. // are specified.
  10609. //
  10610. // * Launch
  10611. //
  10612. // * Terminate
  10613. //
  10614. // * HealthCheck
  10615. //
  10616. // * ReplaceUnhealthy
  10617. //
  10618. // * AZRebalance
  10619. //
  10620. // * AlarmNotification
  10621. //
  10622. // * ScheduledActions
  10623. //
  10624. // * AddToLoadBalancer
  10625. ScalingProcesses []*string `type:"list"`
  10626. }
  10627. // String returns the string representation
  10628. func (s ScalingProcessQuery) String() string {
  10629. return awsutil.Prettify(s)
  10630. }
  10631. // GoString returns the string representation
  10632. func (s ScalingProcessQuery) GoString() string {
  10633. return s.String()
  10634. }
  10635. // Validate inspects the fields of the type to determine if they are valid.
  10636. func (s *ScalingProcessQuery) Validate() error {
  10637. invalidParams := request.ErrInvalidParams{Context: "ScalingProcessQuery"}
  10638. if s.AutoScalingGroupName == nil {
  10639. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  10640. }
  10641. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  10642. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  10643. }
  10644. if invalidParams.Len() > 0 {
  10645. return invalidParams
  10646. }
  10647. return nil
  10648. }
  10649. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  10650. func (s *ScalingProcessQuery) SetAutoScalingGroupName(v string) *ScalingProcessQuery {
  10651. s.AutoScalingGroupName = &v
  10652. return s
  10653. }
  10654. // SetScalingProcesses sets the ScalingProcesses field's value.
  10655. func (s *ScalingProcessQuery) SetScalingProcesses(v []*string) *ScalingProcessQuery {
  10656. s.ScalingProcesses = v
  10657. return s
  10658. }
  10659. // Describes a scheduled scaling action. Used in response to DescribeScheduledActions.
  10660. type ScheduledUpdateGroupAction struct {
  10661. _ struct{} `type:"structure"`
  10662. // The name of the Auto Scaling group.
  10663. AutoScalingGroupName *string `min:"1" type:"string"`
  10664. // The number of instances you prefer to maintain in the group.
  10665. DesiredCapacity *int64 `type:"integer"`
  10666. // The date and time that the action is scheduled to end. This date and time
  10667. // can be up to one month in the future.
  10668. EndTime *time.Time `type:"timestamp"`
  10669. // The maximum size of the group.
  10670. MaxSize *int64 `type:"integer"`
  10671. // The minimum size of the group.
  10672. MinSize *int64 `type:"integer"`
  10673. // The recurring schedule for the action.
  10674. Recurrence *string `min:"1" type:"string"`
  10675. // The Amazon Resource Name (ARN) of the scheduled action.
  10676. ScheduledActionARN *string `min:"1" type:"string"`
  10677. // The name of the scheduled action.
  10678. ScheduledActionName *string `min:"1" type:"string"`
  10679. // The date and time that the action is scheduled to begin. This date and time
  10680. // can be up to one month in the future.
  10681. //
  10682. // When StartTime and EndTime are specified with Recurrence, they form the boundaries
  10683. // of when the recurring action starts and stops.
  10684. StartTime *time.Time `type:"timestamp"`
  10685. // This parameter is deprecated.
  10686. Time *time.Time `type:"timestamp"`
  10687. }
  10688. // String returns the string representation
  10689. func (s ScheduledUpdateGroupAction) String() string {
  10690. return awsutil.Prettify(s)
  10691. }
  10692. // GoString returns the string representation
  10693. func (s ScheduledUpdateGroupAction) GoString() string {
  10694. return s.String()
  10695. }
  10696. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  10697. func (s *ScheduledUpdateGroupAction) SetAutoScalingGroupName(v string) *ScheduledUpdateGroupAction {
  10698. s.AutoScalingGroupName = &v
  10699. return s
  10700. }
  10701. // SetDesiredCapacity sets the DesiredCapacity field's value.
  10702. func (s *ScheduledUpdateGroupAction) SetDesiredCapacity(v int64) *ScheduledUpdateGroupAction {
  10703. s.DesiredCapacity = &v
  10704. return s
  10705. }
  10706. // SetEndTime sets the EndTime field's value.
  10707. func (s *ScheduledUpdateGroupAction) SetEndTime(v time.Time) *ScheduledUpdateGroupAction {
  10708. s.EndTime = &v
  10709. return s
  10710. }
  10711. // SetMaxSize sets the MaxSize field's value.
  10712. func (s *ScheduledUpdateGroupAction) SetMaxSize(v int64) *ScheduledUpdateGroupAction {
  10713. s.MaxSize = &v
  10714. return s
  10715. }
  10716. // SetMinSize sets the MinSize field's value.
  10717. func (s *ScheduledUpdateGroupAction) SetMinSize(v int64) *ScheduledUpdateGroupAction {
  10718. s.MinSize = &v
  10719. return s
  10720. }
  10721. // SetRecurrence sets the Recurrence field's value.
  10722. func (s *ScheduledUpdateGroupAction) SetRecurrence(v string) *ScheduledUpdateGroupAction {
  10723. s.Recurrence = &v
  10724. return s
  10725. }
  10726. // SetScheduledActionARN sets the ScheduledActionARN field's value.
  10727. func (s *ScheduledUpdateGroupAction) SetScheduledActionARN(v string) *ScheduledUpdateGroupAction {
  10728. s.ScheduledActionARN = &v
  10729. return s
  10730. }
  10731. // SetScheduledActionName sets the ScheduledActionName field's value.
  10732. func (s *ScheduledUpdateGroupAction) SetScheduledActionName(v string) *ScheduledUpdateGroupAction {
  10733. s.ScheduledActionName = &v
  10734. return s
  10735. }
  10736. // SetStartTime sets the StartTime field's value.
  10737. func (s *ScheduledUpdateGroupAction) SetStartTime(v time.Time) *ScheduledUpdateGroupAction {
  10738. s.StartTime = &v
  10739. return s
  10740. }
  10741. // SetTime sets the Time field's value.
  10742. func (s *ScheduledUpdateGroupAction) SetTime(v time.Time) *ScheduledUpdateGroupAction {
  10743. s.Time = &v
  10744. return s
  10745. }
  10746. // Describes one or more scheduled scaling action updates for a specified Auto
  10747. // Scaling group. Used in combination with BatchPutScheduledUpdateGroupAction.
  10748. //
  10749. // When updating a scheduled scaling action, all optional parameters are left
  10750. // unchanged if not specified.
  10751. type ScheduledUpdateGroupActionRequest struct {
  10752. _ struct{} `type:"structure"`
  10753. // The number of EC2 instances that should be running in the group.
  10754. DesiredCapacity *int64 `type:"integer"`
  10755. // The time for the recurring schedule to end. Amazon EC2 Auto Scaling does
  10756. // not perform the action after this time.
  10757. EndTime *time.Time `type:"timestamp"`
  10758. // The maximum size of the group.
  10759. MaxSize *int64 `type:"integer"`
  10760. // The minimum size of the group.
  10761. MinSize *int64 `type:"integer"`
  10762. // The recurring schedule for the action, in Unix cron syntax format. For more
  10763. // information about this format, see Crontab (http://crontab.org).
  10764. Recurrence *string `min:"1" type:"string"`
  10765. // The name of the scaling action.
  10766. //
  10767. // ScheduledActionName is a required field
  10768. ScheduledActionName *string `min:"1" type:"string" required:"true"`
  10769. // The time for the action to start, in "YYYY-MM-DDThh:mm:ssZ" format in UTC/GMT
  10770. // only (for example, 2014-06-01T00:00:00Z).
  10771. //
  10772. // If you specify Recurrence and StartTime, Amazon EC2 Auto Scaling performs
  10773. // the action at this time, and then performs the action based on the specified
  10774. // recurrence.
  10775. //
  10776. // If you try to schedule the action in the past, Amazon EC2 Auto Scaling returns
  10777. // an error message.
  10778. StartTime *time.Time `type:"timestamp"`
  10779. }
  10780. // String returns the string representation
  10781. func (s ScheduledUpdateGroupActionRequest) String() string {
  10782. return awsutil.Prettify(s)
  10783. }
  10784. // GoString returns the string representation
  10785. func (s ScheduledUpdateGroupActionRequest) GoString() string {
  10786. return s.String()
  10787. }
  10788. // Validate inspects the fields of the type to determine if they are valid.
  10789. func (s *ScheduledUpdateGroupActionRequest) Validate() error {
  10790. invalidParams := request.ErrInvalidParams{Context: "ScheduledUpdateGroupActionRequest"}
  10791. if s.Recurrence != nil && len(*s.Recurrence) < 1 {
  10792. invalidParams.Add(request.NewErrParamMinLen("Recurrence", 1))
  10793. }
  10794. if s.ScheduledActionName == nil {
  10795. invalidParams.Add(request.NewErrParamRequired("ScheduledActionName"))
  10796. }
  10797. if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 {
  10798. invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1))
  10799. }
  10800. if invalidParams.Len() > 0 {
  10801. return invalidParams
  10802. }
  10803. return nil
  10804. }
  10805. // SetDesiredCapacity sets the DesiredCapacity field's value.
  10806. func (s *ScheduledUpdateGroupActionRequest) SetDesiredCapacity(v int64) *ScheduledUpdateGroupActionRequest {
  10807. s.DesiredCapacity = &v
  10808. return s
  10809. }
  10810. // SetEndTime sets the EndTime field's value.
  10811. func (s *ScheduledUpdateGroupActionRequest) SetEndTime(v time.Time) *ScheduledUpdateGroupActionRequest {
  10812. s.EndTime = &v
  10813. return s
  10814. }
  10815. // SetMaxSize sets the MaxSize field's value.
  10816. func (s *ScheduledUpdateGroupActionRequest) SetMaxSize(v int64) *ScheduledUpdateGroupActionRequest {
  10817. s.MaxSize = &v
  10818. return s
  10819. }
  10820. // SetMinSize sets the MinSize field's value.
  10821. func (s *ScheduledUpdateGroupActionRequest) SetMinSize(v int64) *ScheduledUpdateGroupActionRequest {
  10822. s.MinSize = &v
  10823. return s
  10824. }
  10825. // SetRecurrence sets the Recurrence field's value.
  10826. func (s *ScheduledUpdateGroupActionRequest) SetRecurrence(v string) *ScheduledUpdateGroupActionRequest {
  10827. s.Recurrence = &v
  10828. return s
  10829. }
  10830. // SetScheduledActionName sets the ScheduledActionName field's value.
  10831. func (s *ScheduledUpdateGroupActionRequest) SetScheduledActionName(v string) *ScheduledUpdateGroupActionRequest {
  10832. s.ScheduledActionName = &v
  10833. return s
  10834. }
  10835. // SetStartTime sets the StartTime field's value.
  10836. func (s *ScheduledUpdateGroupActionRequest) SetStartTime(v time.Time) *ScheduledUpdateGroupActionRequest {
  10837. s.StartTime = &v
  10838. return s
  10839. }
  10840. type SetDesiredCapacityInput struct {
  10841. _ struct{} `type:"structure"`
  10842. // The name of the Auto Scaling group.
  10843. //
  10844. // AutoScalingGroupName is a required field
  10845. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  10846. // The number of EC2 instances that should be running in the Auto Scaling group.
  10847. //
  10848. // DesiredCapacity is a required field
  10849. DesiredCapacity *int64 `type:"integer" required:"true"`
  10850. // Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to
  10851. // complete before initiating a scaling activity to set your Auto Scaling group
  10852. // to its new capacity. By default, Amazon EC2 Auto Scaling does not honor the
  10853. // cooldown period during manual scaling activities.
  10854. HonorCooldown *bool `type:"boolean"`
  10855. }
  10856. // String returns the string representation
  10857. func (s SetDesiredCapacityInput) String() string {
  10858. return awsutil.Prettify(s)
  10859. }
  10860. // GoString returns the string representation
  10861. func (s SetDesiredCapacityInput) GoString() string {
  10862. return s.String()
  10863. }
  10864. // Validate inspects the fields of the type to determine if they are valid.
  10865. func (s *SetDesiredCapacityInput) Validate() error {
  10866. invalidParams := request.ErrInvalidParams{Context: "SetDesiredCapacityInput"}
  10867. if s.AutoScalingGroupName == nil {
  10868. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  10869. }
  10870. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  10871. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  10872. }
  10873. if s.DesiredCapacity == nil {
  10874. invalidParams.Add(request.NewErrParamRequired("DesiredCapacity"))
  10875. }
  10876. if invalidParams.Len() > 0 {
  10877. return invalidParams
  10878. }
  10879. return nil
  10880. }
  10881. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  10882. func (s *SetDesiredCapacityInput) SetAutoScalingGroupName(v string) *SetDesiredCapacityInput {
  10883. s.AutoScalingGroupName = &v
  10884. return s
  10885. }
  10886. // SetDesiredCapacity sets the DesiredCapacity field's value.
  10887. func (s *SetDesiredCapacityInput) SetDesiredCapacity(v int64) *SetDesiredCapacityInput {
  10888. s.DesiredCapacity = &v
  10889. return s
  10890. }
  10891. // SetHonorCooldown sets the HonorCooldown field's value.
  10892. func (s *SetDesiredCapacityInput) SetHonorCooldown(v bool) *SetDesiredCapacityInput {
  10893. s.HonorCooldown = &v
  10894. return s
  10895. }
  10896. type SetDesiredCapacityOutput struct {
  10897. _ struct{} `type:"structure"`
  10898. }
  10899. // String returns the string representation
  10900. func (s SetDesiredCapacityOutput) String() string {
  10901. return awsutil.Prettify(s)
  10902. }
  10903. // GoString returns the string representation
  10904. func (s SetDesiredCapacityOutput) GoString() string {
  10905. return s.String()
  10906. }
  10907. type SetInstanceHealthInput struct {
  10908. _ struct{} `type:"structure"`
  10909. // The health status of the instance. Set to Healthy to have the instance remain
  10910. // in service. Set to Unhealthy to have the instance be out of service. Amazon
  10911. // EC2 Auto Scaling terminates and replaces the unhealthy instance.
  10912. //
  10913. // HealthStatus is a required field
  10914. HealthStatus *string `min:"1" type:"string" required:"true"`
  10915. // The ID of the instance.
  10916. //
  10917. // InstanceId is a required field
  10918. InstanceId *string `min:"1" type:"string" required:"true"`
  10919. // If the Auto Scaling group of the specified instance has a HealthCheckGracePeriod
  10920. // specified for the group, by default, this call respects the grace period.
  10921. // Set this to False, to have the call not respect the grace period associated
  10922. // with the group.
  10923. //
  10924. // For more information about the health check grace period, see CreateAutoScalingGroup.
  10925. ShouldRespectGracePeriod *bool `type:"boolean"`
  10926. }
  10927. // String returns the string representation
  10928. func (s SetInstanceHealthInput) String() string {
  10929. return awsutil.Prettify(s)
  10930. }
  10931. // GoString returns the string representation
  10932. func (s SetInstanceHealthInput) GoString() string {
  10933. return s.String()
  10934. }
  10935. // Validate inspects the fields of the type to determine if they are valid.
  10936. func (s *SetInstanceHealthInput) Validate() error {
  10937. invalidParams := request.ErrInvalidParams{Context: "SetInstanceHealthInput"}
  10938. if s.HealthStatus == nil {
  10939. invalidParams.Add(request.NewErrParamRequired("HealthStatus"))
  10940. }
  10941. if s.HealthStatus != nil && len(*s.HealthStatus) < 1 {
  10942. invalidParams.Add(request.NewErrParamMinLen("HealthStatus", 1))
  10943. }
  10944. if s.InstanceId == nil {
  10945. invalidParams.Add(request.NewErrParamRequired("InstanceId"))
  10946. }
  10947. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  10948. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  10949. }
  10950. if invalidParams.Len() > 0 {
  10951. return invalidParams
  10952. }
  10953. return nil
  10954. }
  10955. // SetHealthStatus sets the HealthStatus field's value.
  10956. func (s *SetInstanceHealthInput) SetHealthStatus(v string) *SetInstanceHealthInput {
  10957. s.HealthStatus = &v
  10958. return s
  10959. }
  10960. // SetInstanceId sets the InstanceId field's value.
  10961. func (s *SetInstanceHealthInput) SetInstanceId(v string) *SetInstanceHealthInput {
  10962. s.InstanceId = &v
  10963. return s
  10964. }
  10965. // SetShouldRespectGracePeriod sets the ShouldRespectGracePeriod field's value.
  10966. func (s *SetInstanceHealthInput) SetShouldRespectGracePeriod(v bool) *SetInstanceHealthInput {
  10967. s.ShouldRespectGracePeriod = &v
  10968. return s
  10969. }
  10970. type SetInstanceHealthOutput struct {
  10971. _ struct{} `type:"structure"`
  10972. }
  10973. // String returns the string representation
  10974. func (s SetInstanceHealthOutput) String() string {
  10975. return awsutil.Prettify(s)
  10976. }
  10977. // GoString returns the string representation
  10978. func (s SetInstanceHealthOutput) GoString() string {
  10979. return s.String()
  10980. }
  10981. type SetInstanceProtectionInput struct {
  10982. _ struct{} `type:"structure"`
  10983. // The name of the Auto Scaling group.
  10984. //
  10985. // AutoScalingGroupName is a required field
  10986. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  10987. // One or more instance IDs.
  10988. //
  10989. // InstanceIds is a required field
  10990. InstanceIds []*string `type:"list" required:"true"`
  10991. // Indicates whether the instance is protected from termination by Amazon EC2
  10992. // Auto Scaling when scaling in.
  10993. //
  10994. // ProtectedFromScaleIn is a required field
  10995. ProtectedFromScaleIn *bool `type:"boolean" required:"true"`
  10996. }
  10997. // String returns the string representation
  10998. func (s SetInstanceProtectionInput) String() string {
  10999. return awsutil.Prettify(s)
  11000. }
  11001. // GoString returns the string representation
  11002. func (s SetInstanceProtectionInput) GoString() string {
  11003. return s.String()
  11004. }
  11005. // Validate inspects the fields of the type to determine if they are valid.
  11006. func (s *SetInstanceProtectionInput) Validate() error {
  11007. invalidParams := request.ErrInvalidParams{Context: "SetInstanceProtectionInput"}
  11008. if s.AutoScalingGroupName == nil {
  11009. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  11010. }
  11011. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  11012. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  11013. }
  11014. if s.InstanceIds == nil {
  11015. invalidParams.Add(request.NewErrParamRequired("InstanceIds"))
  11016. }
  11017. if s.ProtectedFromScaleIn == nil {
  11018. invalidParams.Add(request.NewErrParamRequired("ProtectedFromScaleIn"))
  11019. }
  11020. if invalidParams.Len() > 0 {
  11021. return invalidParams
  11022. }
  11023. return nil
  11024. }
  11025. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  11026. func (s *SetInstanceProtectionInput) SetAutoScalingGroupName(v string) *SetInstanceProtectionInput {
  11027. s.AutoScalingGroupName = &v
  11028. return s
  11029. }
  11030. // SetInstanceIds sets the InstanceIds field's value.
  11031. func (s *SetInstanceProtectionInput) SetInstanceIds(v []*string) *SetInstanceProtectionInput {
  11032. s.InstanceIds = v
  11033. return s
  11034. }
  11035. // SetProtectedFromScaleIn sets the ProtectedFromScaleIn field's value.
  11036. func (s *SetInstanceProtectionInput) SetProtectedFromScaleIn(v bool) *SetInstanceProtectionInput {
  11037. s.ProtectedFromScaleIn = &v
  11038. return s
  11039. }
  11040. type SetInstanceProtectionOutput struct {
  11041. _ struct{} `type:"structure"`
  11042. }
  11043. // String returns the string representation
  11044. func (s SetInstanceProtectionOutput) String() string {
  11045. return awsutil.Prettify(s)
  11046. }
  11047. // GoString returns the string representation
  11048. func (s SetInstanceProtectionOutput) GoString() string {
  11049. return s.String()
  11050. }
  11051. // Describes an adjustment based on the difference between the value of the
  11052. // aggregated CloudWatch metric and the breach threshold that you've defined
  11053. // for the alarm.
  11054. //
  11055. // For the following examples, suppose that you have an alarm with a breach
  11056. // threshold of 50:
  11057. //
  11058. // * To trigger the adjustment when the metric is greater than or equal to
  11059. // 50 and less than 60, specify a lower bound of 0 and an upper bound of
  11060. // 10.
  11061. //
  11062. // * To trigger the adjustment when the metric is greater than 40 and less
  11063. // than or equal to 50, specify a lower bound of -10 and an upper bound of
  11064. // 0.
  11065. //
  11066. // There are a few rules for the step adjustments for your step policy:
  11067. //
  11068. // * The ranges of your step adjustments can't overlap or have a gap.
  11069. //
  11070. // * At most, one step adjustment can have a null lower bound. If one step
  11071. // adjustment has a negative lower bound, then there must be a step adjustment
  11072. // with a null lower bound.
  11073. //
  11074. // * At most, one step adjustment can have a null upper bound. If one step
  11075. // adjustment has a positive upper bound, then there must be a step adjustment
  11076. // with a null upper bound.
  11077. //
  11078. // * The upper and lower bound can't be null in the same step adjustment.
  11079. type StepAdjustment struct {
  11080. _ struct{} `type:"structure"`
  11081. // The lower bound for the difference between the alarm threshold and the CloudWatch
  11082. // metric. If the metric value is above the breach threshold, the lower bound
  11083. // is inclusive (the metric must be greater than or equal to the threshold plus
  11084. // the lower bound). Otherwise, it is exclusive (the metric must be greater
  11085. // than the threshold plus the lower bound). A null value indicates negative
  11086. // infinity.
  11087. MetricIntervalLowerBound *float64 `type:"double"`
  11088. // The upper bound for the difference between the alarm threshold and the CloudWatch
  11089. // metric. If the metric value is above the breach threshold, the upper bound
  11090. // is exclusive (the metric must be less than the threshold plus the upper bound).
  11091. // Otherwise, it is inclusive (the metric must be less than or equal to the
  11092. // threshold plus the upper bound). A null value indicates positive infinity.
  11093. //
  11094. // The upper bound must be greater than the lower bound.
  11095. MetricIntervalUpperBound *float64 `type:"double"`
  11096. // The amount by which to scale, based on the specified adjustment type. A positive
  11097. // value adds to the current capacity while a negative number removes from the
  11098. // current capacity.
  11099. //
  11100. // ScalingAdjustment is a required field
  11101. ScalingAdjustment *int64 `type:"integer" required:"true"`
  11102. }
  11103. // String returns the string representation
  11104. func (s StepAdjustment) String() string {
  11105. return awsutil.Prettify(s)
  11106. }
  11107. // GoString returns the string representation
  11108. func (s StepAdjustment) GoString() string {
  11109. return s.String()
  11110. }
  11111. // Validate inspects the fields of the type to determine if they are valid.
  11112. func (s *StepAdjustment) Validate() error {
  11113. invalidParams := request.ErrInvalidParams{Context: "StepAdjustment"}
  11114. if s.ScalingAdjustment == nil {
  11115. invalidParams.Add(request.NewErrParamRequired("ScalingAdjustment"))
  11116. }
  11117. if invalidParams.Len() > 0 {
  11118. return invalidParams
  11119. }
  11120. return nil
  11121. }
  11122. // SetMetricIntervalLowerBound sets the MetricIntervalLowerBound field's value.
  11123. func (s *StepAdjustment) SetMetricIntervalLowerBound(v float64) *StepAdjustment {
  11124. s.MetricIntervalLowerBound = &v
  11125. return s
  11126. }
  11127. // SetMetricIntervalUpperBound sets the MetricIntervalUpperBound field's value.
  11128. func (s *StepAdjustment) SetMetricIntervalUpperBound(v float64) *StepAdjustment {
  11129. s.MetricIntervalUpperBound = &v
  11130. return s
  11131. }
  11132. // SetScalingAdjustment sets the ScalingAdjustment field's value.
  11133. func (s *StepAdjustment) SetScalingAdjustment(v int64) *StepAdjustment {
  11134. s.ScalingAdjustment = &v
  11135. return s
  11136. }
  11137. type SuspendProcessesOutput struct {
  11138. _ struct{} `type:"structure"`
  11139. }
  11140. // String returns the string representation
  11141. func (s SuspendProcessesOutput) String() string {
  11142. return awsutil.Prettify(s)
  11143. }
  11144. // GoString returns the string representation
  11145. func (s SuspendProcessesOutput) GoString() string {
  11146. return s.String()
  11147. }
  11148. // Describes an automatic scaling process that has been suspended. For more
  11149. // information, see ProcessType.
  11150. type SuspendedProcess struct {
  11151. _ struct{} `type:"structure"`
  11152. // The name of the suspended process.
  11153. ProcessName *string `min:"1" type:"string"`
  11154. // The reason that the process was suspended.
  11155. SuspensionReason *string `min:"1" type:"string"`
  11156. }
  11157. // String returns the string representation
  11158. func (s SuspendedProcess) String() string {
  11159. return awsutil.Prettify(s)
  11160. }
  11161. // GoString returns the string representation
  11162. func (s SuspendedProcess) GoString() string {
  11163. return s.String()
  11164. }
  11165. // SetProcessName sets the ProcessName field's value.
  11166. func (s *SuspendedProcess) SetProcessName(v string) *SuspendedProcess {
  11167. s.ProcessName = &v
  11168. return s
  11169. }
  11170. // SetSuspensionReason sets the SuspensionReason field's value.
  11171. func (s *SuspendedProcess) SetSuspensionReason(v string) *SuspendedProcess {
  11172. s.SuspensionReason = &v
  11173. return s
  11174. }
  11175. // Describes a tag for an Auto Scaling group.
  11176. type Tag struct {
  11177. _ struct{} `type:"structure"`
  11178. // The tag key.
  11179. //
  11180. // Key is a required field
  11181. Key *string `min:"1" type:"string" required:"true"`
  11182. // Determines whether the tag is added to new instances as they are launched
  11183. // in the group.
  11184. PropagateAtLaunch *bool `type:"boolean"`
  11185. // The name of the group.
  11186. ResourceId *string `type:"string"`
  11187. // The type of resource. The only supported value is auto-scaling-group.
  11188. ResourceType *string `type:"string"`
  11189. // The tag value.
  11190. Value *string `type:"string"`
  11191. }
  11192. // String returns the string representation
  11193. func (s Tag) String() string {
  11194. return awsutil.Prettify(s)
  11195. }
  11196. // GoString returns the string representation
  11197. func (s Tag) GoString() string {
  11198. return s.String()
  11199. }
  11200. // Validate inspects the fields of the type to determine if they are valid.
  11201. func (s *Tag) Validate() error {
  11202. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  11203. if s.Key == nil {
  11204. invalidParams.Add(request.NewErrParamRequired("Key"))
  11205. }
  11206. if s.Key != nil && len(*s.Key) < 1 {
  11207. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11208. }
  11209. if invalidParams.Len() > 0 {
  11210. return invalidParams
  11211. }
  11212. return nil
  11213. }
  11214. // SetKey sets the Key field's value.
  11215. func (s *Tag) SetKey(v string) *Tag {
  11216. s.Key = &v
  11217. return s
  11218. }
  11219. // SetPropagateAtLaunch sets the PropagateAtLaunch field's value.
  11220. func (s *Tag) SetPropagateAtLaunch(v bool) *Tag {
  11221. s.PropagateAtLaunch = &v
  11222. return s
  11223. }
  11224. // SetResourceId sets the ResourceId field's value.
  11225. func (s *Tag) SetResourceId(v string) *Tag {
  11226. s.ResourceId = &v
  11227. return s
  11228. }
  11229. // SetResourceType sets the ResourceType field's value.
  11230. func (s *Tag) SetResourceType(v string) *Tag {
  11231. s.ResourceType = &v
  11232. return s
  11233. }
  11234. // SetValue sets the Value field's value.
  11235. func (s *Tag) SetValue(v string) *Tag {
  11236. s.Value = &v
  11237. return s
  11238. }
  11239. // Describes a tag for an Auto Scaling group.
  11240. type TagDescription struct {
  11241. _ struct{} `type:"structure"`
  11242. // The tag key.
  11243. Key *string `min:"1" type:"string"`
  11244. // Determines whether the tag is added to new instances as they are launched
  11245. // in the group.
  11246. PropagateAtLaunch *bool `type:"boolean"`
  11247. // The name of the group.
  11248. ResourceId *string `type:"string"`
  11249. // The type of resource. The only supported value is auto-scaling-group.
  11250. ResourceType *string `type:"string"`
  11251. // The tag value.
  11252. Value *string `type:"string"`
  11253. }
  11254. // String returns the string representation
  11255. func (s TagDescription) String() string {
  11256. return awsutil.Prettify(s)
  11257. }
  11258. // GoString returns the string representation
  11259. func (s TagDescription) GoString() string {
  11260. return s.String()
  11261. }
  11262. // SetKey sets the Key field's value.
  11263. func (s *TagDescription) SetKey(v string) *TagDescription {
  11264. s.Key = &v
  11265. return s
  11266. }
  11267. // SetPropagateAtLaunch sets the PropagateAtLaunch field's value.
  11268. func (s *TagDescription) SetPropagateAtLaunch(v bool) *TagDescription {
  11269. s.PropagateAtLaunch = &v
  11270. return s
  11271. }
  11272. // SetResourceId sets the ResourceId field's value.
  11273. func (s *TagDescription) SetResourceId(v string) *TagDescription {
  11274. s.ResourceId = &v
  11275. return s
  11276. }
  11277. // SetResourceType sets the ResourceType field's value.
  11278. func (s *TagDescription) SetResourceType(v string) *TagDescription {
  11279. s.ResourceType = &v
  11280. return s
  11281. }
  11282. // SetValue sets the Value field's value.
  11283. func (s *TagDescription) SetValue(v string) *TagDescription {
  11284. s.Value = &v
  11285. return s
  11286. }
  11287. // Represents a target tracking policy configuration.
  11288. type TargetTrackingConfiguration struct {
  11289. _ struct{} `type:"structure"`
  11290. // A customized metric.
  11291. CustomizedMetricSpecification *CustomizedMetricSpecification `type:"structure"`
  11292. // Indicates whether scaling in by the target tracking policy is disabled. If
  11293. // scaling in is disabled, the target tracking policy doesn't remove instances
  11294. // from the Auto Scaling group. Otherwise, the target tracking policy can remove
  11295. // instances from the Auto Scaling group. The default is disabled.
  11296. DisableScaleIn *bool `type:"boolean"`
  11297. // A predefined metric. You can specify either a predefined metric or a customized
  11298. // metric.
  11299. PredefinedMetricSpecification *PredefinedMetricSpecification `type:"structure"`
  11300. // The target value for the metric.
  11301. //
  11302. // TargetValue is a required field
  11303. TargetValue *float64 `type:"double" required:"true"`
  11304. }
  11305. // String returns the string representation
  11306. func (s TargetTrackingConfiguration) String() string {
  11307. return awsutil.Prettify(s)
  11308. }
  11309. // GoString returns the string representation
  11310. func (s TargetTrackingConfiguration) GoString() string {
  11311. return s.String()
  11312. }
  11313. // Validate inspects the fields of the type to determine if they are valid.
  11314. func (s *TargetTrackingConfiguration) Validate() error {
  11315. invalidParams := request.ErrInvalidParams{Context: "TargetTrackingConfiguration"}
  11316. if s.TargetValue == nil {
  11317. invalidParams.Add(request.NewErrParamRequired("TargetValue"))
  11318. }
  11319. if s.CustomizedMetricSpecification != nil {
  11320. if err := s.CustomizedMetricSpecification.Validate(); err != nil {
  11321. invalidParams.AddNested("CustomizedMetricSpecification", err.(request.ErrInvalidParams))
  11322. }
  11323. }
  11324. if s.PredefinedMetricSpecification != nil {
  11325. if err := s.PredefinedMetricSpecification.Validate(); err != nil {
  11326. invalidParams.AddNested("PredefinedMetricSpecification", err.(request.ErrInvalidParams))
  11327. }
  11328. }
  11329. if invalidParams.Len() > 0 {
  11330. return invalidParams
  11331. }
  11332. return nil
  11333. }
  11334. // SetCustomizedMetricSpecification sets the CustomizedMetricSpecification field's value.
  11335. func (s *TargetTrackingConfiguration) SetCustomizedMetricSpecification(v *CustomizedMetricSpecification) *TargetTrackingConfiguration {
  11336. s.CustomizedMetricSpecification = v
  11337. return s
  11338. }
  11339. // SetDisableScaleIn sets the DisableScaleIn field's value.
  11340. func (s *TargetTrackingConfiguration) SetDisableScaleIn(v bool) *TargetTrackingConfiguration {
  11341. s.DisableScaleIn = &v
  11342. return s
  11343. }
  11344. // SetPredefinedMetricSpecification sets the PredefinedMetricSpecification field's value.
  11345. func (s *TargetTrackingConfiguration) SetPredefinedMetricSpecification(v *PredefinedMetricSpecification) *TargetTrackingConfiguration {
  11346. s.PredefinedMetricSpecification = v
  11347. return s
  11348. }
  11349. // SetTargetValue sets the TargetValue field's value.
  11350. func (s *TargetTrackingConfiguration) SetTargetValue(v float64) *TargetTrackingConfiguration {
  11351. s.TargetValue = &v
  11352. return s
  11353. }
  11354. type TerminateInstanceInAutoScalingGroupInput struct {
  11355. _ struct{} `type:"structure"`
  11356. // The ID of the instance.
  11357. //
  11358. // InstanceId is a required field
  11359. InstanceId *string `min:"1" type:"string" required:"true"`
  11360. // Indicates whether terminating the instance also decrements the size of the
  11361. // Auto Scaling group.
  11362. //
  11363. // ShouldDecrementDesiredCapacity is a required field
  11364. ShouldDecrementDesiredCapacity *bool `type:"boolean" required:"true"`
  11365. }
  11366. // String returns the string representation
  11367. func (s TerminateInstanceInAutoScalingGroupInput) String() string {
  11368. return awsutil.Prettify(s)
  11369. }
  11370. // GoString returns the string representation
  11371. func (s TerminateInstanceInAutoScalingGroupInput) GoString() string {
  11372. return s.String()
  11373. }
  11374. // Validate inspects the fields of the type to determine if they are valid.
  11375. func (s *TerminateInstanceInAutoScalingGroupInput) Validate() error {
  11376. invalidParams := request.ErrInvalidParams{Context: "TerminateInstanceInAutoScalingGroupInput"}
  11377. if s.InstanceId == nil {
  11378. invalidParams.Add(request.NewErrParamRequired("InstanceId"))
  11379. }
  11380. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  11381. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  11382. }
  11383. if s.ShouldDecrementDesiredCapacity == nil {
  11384. invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity"))
  11385. }
  11386. if invalidParams.Len() > 0 {
  11387. return invalidParams
  11388. }
  11389. return nil
  11390. }
  11391. // SetInstanceId sets the InstanceId field's value.
  11392. func (s *TerminateInstanceInAutoScalingGroupInput) SetInstanceId(v string) *TerminateInstanceInAutoScalingGroupInput {
  11393. s.InstanceId = &v
  11394. return s
  11395. }
  11396. // SetShouldDecrementDesiredCapacity sets the ShouldDecrementDesiredCapacity field's value.
  11397. func (s *TerminateInstanceInAutoScalingGroupInput) SetShouldDecrementDesiredCapacity(v bool) *TerminateInstanceInAutoScalingGroupInput {
  11398. s.ShouldDecrementDesiredCapacity = &v
  11399. return s
  11400. }
  11401. type TerminateInstanceInAutoScalingGroupOutput struct {
  11402. _ struct{} `type:"structure"`
  11403. // A scaling activity.
  11404. Activity *Activity `type:"structure"`
  11405. }
  11406. // String returns the string representation
  11407. func (s TerminateInstanceInAutoScalingGroupOutput) String() string {
  11408. return awsutil.Prettify(s)
  11409. }
  11410. // GoString returns the string representation
  11411. func (s TerminateInstanceInAutoScalingGroupOutput) GoString() string {
  11412. return s.String()
  11413. }
  11414. // SetActivity sets the Activity field's value.
  11415. func (s *TerminateInstanceInAutoScalingGroupOutput) SetActivity(v *Activity) *TerminateInstanceInAutoScalingGroupOutput {
  11416. s.Activity = v
  11417. return s
  11418. }
  11419. type UpdateAutoScalingGroupInput struct {
  11420. _ struct{} `type:"structure"`
  11421. // The name of the Auto Scaling group.
  11422. //
  11423. // AutoScalingGroupName is a required field
  11424. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  11425. // One or more Availability Zones for the group.
  11426. AvailabilityZones []*string `min:"1" type:"list"`
  11427. // The amount of time, in seconds, after a scaling activity completes before
  11428. // another scaling activity can start. The default is 300.
  11429. //
  11430. // For more information, see Scaling Cooldowns (http://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html)
  11431. // in the Amazon EC2 Auto Scaling User Guide.
  11432. DefaultCooldown *int64 `type:"integer"`
  11433. // The number of EC2 instances that should be running in the Auto Scaling group.
  11434. // This number must be greater than or equal to the minimum size of the group
  11435. // and less than or equal to the maximum size of the group.
  11436. DesiredCapacity *int64 `type:"integer"`
  11437. // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before
  11438. // checking the health status of an EC2 instance that has come into service.
  11439. // The default is 0.
  11440. //
  11441. // For more information, see Health Checks (http://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html)
  11442. // in the Amazon EC2 Auto Scaling User Guide.
  11443. HealthCheckGracePeriod *int64 `type:"integer"`
  11444. // The service to use for the health checks. The valid values are EC2 and ELB.
  11445. HealthCheckType *string `min:"1" type:"string"`
  11446. // The name of the launch configuration. If you specify this parameter, you
  11447. // can't specify a launch template or a mixed instances policy.
  11448. LaunchConfigurationName *string `min:"1" type:"string"`
  11449. // The launch template and version to use to specify the updates. If you specify
  11450. // this parameter, you can't specify a launch configuration or a mixed instances
  11451. // policy.
  11452. LaunchTemplate *LaunchTemplateSpecification `type:"structure"`
  11453. // The maximum size of the Auto Scaling group.
  11454. MaxSize *int64 `type:"integer"`
  11455. // The minimum size of the Auto Scaling group.
  11456. MinSize *int64 `type:"integer"`
  11457. // The mixed instances policy to use to specify the updates. If you specify
  11458. // this parameter, you can't specify a launch configuration or a launch template.
  11459. MixedInstancesPolicy *MixedInstancesPolicy `type:"structure"`
  11460. // Indicates whether newly launched instances are protected from termination
  11461. // by Auto Scaling when scaling in.
  11462. NewInstancesProtectedFromScaleIn *bool `type:"boolean"`
  11463. // The name of the placement group into which to launch your instances, if any.
  11464. // For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html)
  11465. // in the Amazon Elastic Compute Cloud User Guide.
  11466. PlacementGroup *string `min:"1" type:"string"`
  11467. // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling
  11468. // group uses to call other AWS services on your behalf.
  11469. ServiceLinkedRoleARN *string `min:"1" type:"string"`
  11470. // A standalone termination policy or a list of termination policies used to
  11471. // select the instance to terminate. The policies are executed in the order
  11472. // that they are listed.
  11473. //
  11474. // For more information, see Controlling Which Instances Auto Scaling Terminates
  11475. // During Scale In (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html)
  11476. // in the Auto Scaling User Guide.
  11477. TerminationPolicies []*string `type:"list"`
  11478. // The ID of the subnet, if you are launching into a VPC. You can specify several
  11479. // subnets in a comma-separated list.
  11480. //
  11481. // When you specify VPCZoneIdentifier with AvailabilityZones, ensure that the
  11482. // subnets' Availability Zones match the values you specify for AvailabilityZones.
  11483. //
  11484. // For more information, see Launching Auto Scaling Instances in a VPC (http://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html)
  11485. // in the Amazon EC2 Auto Scaling User Guide.
  11486. VPCZoneIdentifier *string `min:"1" type:"string"`
  11487. }
  11488. // String returns the string representation
  11489. func (s UpdateAutoScalingGroupInput) String() string {
  11490. return awsutil.Prettify(s)
  11491. }
  11492. // GoString returns the string representation
  11493. func (s UpdateAutoScalingGroupInput) GoString() string {
  11494. return s.String()
  11495. }
  11496. // Validate inspects the fields of the type to determine if they are valid.
  11497. func (s *UpdateAutoScalingGroupInput) Validate() error {
  11498. invalidParams := request.ErrInvalidParams{Context: "UpdateAutoScalingGroupInput"}
  11499. if s.AutoScalingGroupName == nil {
  11500. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  11501. }
  11502. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  11503. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  11504. }
  11505. if s.AvailabilityZones != nil && len(s.AvailabilityZones) < 1 {
  11506. invalidParams.Add(request.NewErrParamMinLen("AvailabilityZones", 1))
  11507. }
  11508. if s.HealthCheckType != nil && len(*s.HealthCheckType) < 1 {
  11509. invalidParams.Add(request.NewErrParamMinLen("HealthCheckType", 1))
  11510. }
  11511. if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 {
  11512. invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1))
  11513. }
  11514. if s.PlacementGroup != nil && len(*s.PlacementGroup) < 1 {
  11515. invalidParams.Add(request.NewErrParamMinLen("PlacementGroup", 1))
  11516. }
  11517. if s.ServiceLinkedRoleARN != nil && len(*s.ServiceLinkedRoleARN) < 1 {
  11518. invalidParams.Add(request.NewErrParamMinLen("ServiceLinkedRoleARN", 1))
  11519. }
  11520. if s.VPCZoneIdentifier != nil && len(*s.VPCZoneIdentifier) < 1 {
  11521. invalidParams.Add(request.NewErrParamMinLen("VPCZoneIdentifier", 1))
  11522. }
  11523. if s.LaunchTemplate != nil {
  11524. if err := s.LaunchTemplate.Validate(); err != nil {
  11525. invalidParams.AddNested("LaunchTemplate", err.(request.ErrInvalidParams))
  11526. }
  11527. }
  11528. if s.MixedInstancesPolicy != nil {
  11529. if err := s.MixedInstancesPolicy.Validate(); err != nil {
  11530. invalidParams.AddNested("MixedInstancesPolicy", err.(request.ErrInvalidParams))
  11531. }
  11532. }
  11533. if invalidParams.Len() > 0 {
  11534. return invalidParams
  11535. }
  11536. return nil
  11537. }
  11538. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  11539. func (s *UpdateAutoScalingGroupInput) SetAutoScalingGroupName(v string) *UpdateAutoScalingGroupInput {
  11540. s.AutoScalingGroupName = &v
  11541. return s
  11542. }
  11543. // SetAvailabilityZones sets the AvailabilityZones field's value.
  11544. func (s *UpdateAutoScalingGroupInput) SetAvailabilityZones(v []*string) *UpdateAutoScalingGroupInput {
  11545. s.AvailabilityZones = v
  11546. return s
  11547. }
  11548. // SetDefaultCooldown sets the DefaultCooldown field's value.
  11549. func (s *UpdateAutoScalingGroupInput) SetDefaultCooldown(v int64) *UpdateAutoScalingGroupInput {
  11550. s.DefaultCooldown = &v
  11551. return s
  11552. }
  11553. // SetDesiredCapacity sets the DesiredCapacity field's value.
  11554. func (s *UpdateAutoScalingGroupInput) SetDesiredCapacity(v int64) *UpdateAutoScalingGroupInput {
  11555. s.DesiredCapacity = &v
  11556. return s
  11557. }
  11558. // SetHealthCheckGracePeriod sets the HealthCheckGracePeriod field's value.
  11559. func (s *UpdateAutoScalingGroupInput) SetHealthCheckGracePeriod(v int64) *UpdateAutoScalingGroupInput {
  11560. s.HealthCheckGracePeriod = &v
  11561. return s
  11562. }
  11563. // SetHealthCheckType sets the HealthCheckType field's value.
  11564. func (s *UpdateAutoScalingGroupInput) SetHealthCheckType(v string) *UpdateAutoScalingGroupInput {
  11565. s.HealthCheckType = &v
  11566. return s
  11567. }
  11568. // SetLaunchConfigurationName sets the LaunchConfigurationName field's value.
  11569. func (s *UpdateAutoScalingGroupInput) SetLaunchConfigurationName(v string) *UpdateAutoScalingGroupInput {
  11570. s.LaunchConfigurationName = &v
  11571. return s
  11572. }
  11573. // SetLaunchTemplate sets the LaunchTemplate field's value.
  11574. func (s *UpdateAutoScalingGroupInput) SetLaunchTemplate(v *LaunchTemplateSpecification) *UpdateAutoScalingGroupInput {
  11575. s.LaunchTemplate = v
  11576. return s
  11577. }
  11578. // SetMaxSize sets the MaxSize field's value.
  11579. func (s *UpdateAutoScalingGroupInput) SetMaxSize(v int64) *UpdateAutoScalingGroupInput {
  11580. s.MaxSize = &v
  11581. return s
  11582. }
  11583. // SetMinSize sets the MinSize field's value.
  11584. func (s *UpdateAutoScalingGroupInput) SetMinSize(v int64) *UpdateAutoScalingGroupInput {
  11585. s.MinSize = &v
  11586. return s
  11587. }
  11588. // SetMixedInstancesPolicy sets the MixedInstancesPolicy field's value.
  11589. func (s *UpdateAutoScalingGroupInput) SetMixedInstancesPolicy(v *MixedInstancesPolicy) *UpdateAutoScalingGroupInput {
  11590. s.MixedInstancesPolicy = v
  11591. return s
  11592. }
  11593. // SetNewInstancesProtectedFromScaleIn sets the NewInstancesProtectedFromScaleIn field's value.
  11594. func (s *UpdateAutoScalingGroupInput) SetNewInstancesProtectedFromScaleIn(v bool) *UpdateAutoScalingGroupInput {
  11595. s.NewInstancesProtectedFromScaleIn = &v
  11596. return s
  11597. }
  11598. // SetPlacementGroup sets the PlacementGroup field's value.
  11599. func (s *UpdateAutoScalingGroupInput) SetPlacementGroup(v string) *UpdateAutoScalingGroupInput {
  11600. s.PlacementGroup = &v
  11601. return s
  11602. }
  11603. // SetServiceLinkedRoleARN sets the ServiceLinkedRoleARN field's value.
  11604. func (s *UpdateAutoScalingGroupInput) SetServiceLinkedRoleARN(v string) *UpdateAutoScalingGroupInput {
  11605. s.ServiceLinkedRoleARN = &v
  11606. return s
  11607. }
  11608. // SetTerminationPolicies sets the TerminationPolicies field's value.
  11609. func (s *UpdateAutoScalingGroupInput) SetTerminationPolicies(v []*string) *UpdateAutoScalingGroupInput {
  11610. s.TerminationPolicies = v
  11611. return s
  11612. }
  11613. // SetVPCZoneIdentifier sets the VPCZoneIdentifier field's value.
  11614. func (s *UpdateAutoScalingGroupInput) SetVPCZoneIdentifier(v string) *UpdateAutoScalingGroupInput {
  11615. s.VPCZoneIdentifier = &v
  11616. return s
  11617. }
  11618. type UpdateAutoScalingGroupOutput struct {
  11619. _ struct{} `type:"structure"`
  11620. }
  11621. // String returns the string representation
  11622. func (s UpdateAutoScalingGroupOutput) String() string {
  11623. return awsutil.Prettify(s)
  11624. }
  11625. // GoString returns the string representation
  11626. func (s UpdateAutoScalingGroupOutput) GoString() string {
  11627. return s.String()
  11628. }
  11629. const (
  11630. // LifecycleStatePending is a LifecycleState enum value
  11631. LifecycleStatePending = "Pending"
  11632. // LifecycleStatePendingWait is a LifecycleState enum value
  11633. LifecycleStatePendingWait = "Pending:Wait"
  11634. // LifecycleStatePendingProceed is a LifecycleState enum value
  11635. LifecycleStatePendingProceed = "Pending:Proceed"
  11636. // LifecycleStateQuarantined is a LifecycleState enum value
  11637. LifecycleStateQuarantined = "Quarantined"
  11638. // LifecycleStateInService is a LifecycleState enum value
  11639. LifecycleStateInService = "InService"
  11640. // LifecycleStateTerminating is a LifecycleState enum value
  11641. LifecycleStateTerminating = "Terminating"
  11642. // LifecycleStateTerminatingWait is a LifecycleState enum value
  11643. LifecycleStateTerminatingWait = "Terminating:Wait"
  11644. // LifecycleStateTerminatingProceed is a LifecycleState enum value
  11645. LifecycleStateTerminatingProceed = "Terminating:Proceed"
  11646. // LifecycleStateTerminated is a LifecycleState enum value
  11647. LifecycleStateTerminated = "Terminated"
  11648. // LifecycleStateDetaching is a LifecycleState enum value
  11649. LifecycleStateDetaching = "Detaching"
  11650. // LifecycleStateDetached is a LifecycleState enum value
  11651. LifecycleStateDetached = "Detached"
  11652. // LifecycleStateEnteringStandby is a LifecycleState enum value
  11653. LifecycleStateEnteringStandby = "EnteringStandby"
  11654. // LifecycleStateStandby is a LifecycleState enum value
  11655. LifecycleStateStandby = "Standby"
  11656. )
  11657. const (
  11658. // MetricStatisticAverage is a MetricStatistic enum value
  11659. MetricStatisticAverage = "Average"
  11660. // MetricStatisticMinimum is a MetricStatistic enum value
  11661. MetricStatisticMinimum = "Minimum"
  11662. // MetricStatisticMaximum is a MetricStatistic enum value
  11663. MetricStatisticMaximum = "Maximum"
  11664. // MetricStatisticSampleCount is a MetricStatistic enum value
  11665. MetricStatisticSampleCount = "SampleCount"
  11666. // MetricStatisticSum is a MetricStatistic enum value
  11667. MetricStatisticSum = "Sum"
  11668. )
  11669. const (
  11670. // MetricTypeAsgaverageCpuutilization is a MetricType enum value
  11671. MetricTypeAsgaverageCpuutilization = "ASGAverageCPUUtilization"
  11672. // MetricTypeAsgaverageNetworkIn is a MetricType enum value
  11673. MetricTypeAsgaverageNetworkIn = "ASGAverageNetworkIn"
  11674. // MetricTypeAsgaverageNetworkOut is a MetricType enum value
  11675. MetricTypeAsgaverageNetworkOut = "ASGAverageNetworkOut"
  11676. // MetricTypeAlbrequestCountPerTarget is a MetricType enum value
  11677. MetricTypeAlbrequestCountPerTarget = "ALBRequestCountPerTarget"
  11678. )
  11679. const (
  11680. // ScalingActivityStatusCodePendingSpotBidPlacement is a ScalingActivityStatusCode enum value
  11681. ScalingActivityStatusCodePendingSpotBidPlacement = "PendingSpotBidPlacement"
  11682. // ScalingActivityStatusCodeWaitingForSpotInstanceRequestId is a ScalingActivityStatusCode enum value
  11683. ScalingActivityStatusCodeWaitingForSpotInstanceRequestId = "WaitingForSpotInstanceRequestId"
  11684. // ScalingActivityStatusCodeWaitingForSpotInstanceId is a ScalingActivityStatusCode enum value
  11685. ScalingActivityStatusCodeWaitingForSpotInstanceId = "WaitingForSpotInstanceId"
  11686. // ScalingActivityStatusCodeWaitingForInstanceId is a ScalingActivityStatusCode enum value
  11687. ScalingActivityStatusCodeWaitingForInstanceId = "WaitingForInstanceId"
  11688. // ScalingActivityStatusCodePreInService is a ScalingActivityStatusCode enum value
  11689. ScalingActivityStatusCodePreInService = "PreInService"
  11690. // ScalingActivityStatusCodeInProgress is a ScalingActivityStatusCode enum value
  11691. ScalingActivityStatusCodeInProgress = "InProgress"
  11692. // ScalingActivityStatusCodeWaitingForElbconnectionDraining is a ScalingActivityStatusCode enum value
  11693. ScalingActivityStatusCodeWaitingForElbconnectionDraining = "WaitingForELBConnectionDraining"
  11694. // ScalingActivityStatusCodeMidLifecycleAction is a ScalingActivityStatusCode enum value
  11695. ScalingActivityStatusCodeMidLifecycleAction = "MidLifecycleAction"
  11696. // ScalingActivityStatusCodeWaitingForInstanceWarmup is a ScalingActivityStatusCode enum value
  11697. ScalingActivityStatusCodeWaitingForInstanceWarmup = "WaitingForInstanceWarmup"
  11698. // ScalingActivityStatusCodeSuccessful is a ScalingActivityStatusCode enum value
  11699. ScalingActivityStatusCodeSuccessful = "Successful"
  11700. // ScalingActivityStatusCodeFailed is a ScalingActivityStatusCode enum value
  11701. ScalingActivityStatusCodeFailed = "Failed"
  11702. // ScalingActivityStatusCodeCancelled is a ScalingActivityStatusCode enum value
  11703. ScalingActivityStatusCodeCancelled = "Cancelled"
  11704. )