api.go 501 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901
  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. // (https://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 Amazon EC2 Auto Scaling resource
  79. // (for example, an Auto Scaling 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. // With Application Load Balancers and Network Load Balancers, instances are
  151. // registered as targets with a target group. With Classic Load Balancers, instances
  152. // are registered with the load balancer. For more information, see Attaching
  153. // a Load Balancer to Your Auto Scaling Group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-load-balancer-asg.html)
  154. // in the Amazon EC2 Auto Scaling User Guide.
  155. //
  156. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  157. // with awserr.Error's Code and Message methods to get detailed information about
  158. // the error.
  159. //
  160. // See the AWS API reference guide for Auto Scaling's
  161. // API operation AttachLoadBalancerTargetGroups for usage and error information.
  162. //
  163. // Returned Error Codes:
  164. // * ErrCodeResourceContentionFault "ResourceContention"
  165. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  166. // (for example, an Auto Scaling group, instance, or load balancer).
  167. //
  168. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  169. // The service-linked role is not yet ready for use.
  170. //
  171. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancerTargetGroups
  172. func (c *AutoScaling) AttachLoadBalancerTargetGroups(input *AttachLoadBalancerTargetGroupsInput) (*AttachLoadBalancerTargetGroupsOutput, error) {
  173. req, out := c.AttachLoadBalancerTargetGroupsRequest(input)
  174. return out, req.Send()
  175. }
  176. // AttachLoadBalancerTargetGroupsWithContext is the same as AttachLoadBalancerTargetGroups with the addition of
  177. // the ability to pass a context and additional request options.
  178. //
  179. // See AttachLoadBalancerTargetGroups for details on how to use this API operation.
  180. //
  181. // The context must be non-nil and will be used for request cancellation. If
  182. // the context is nil a panic will occur. In the future the SDK may create
  183. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  184. // for more information on using Contexts.
  185. func (c *AutoScaling) AttachLoadBalancerTargetGroupsWithContext(ctx aws.Context, input *AttachLoadBalancerTargetGroupsInput, opts ...request.Option) (*AttachLoadBalancerTargetGroupsOutput, error) {
  186. req, out := c.AttachLoadBalancerTargetGroupsRequest(input)
  187. req.SetContext(ctx)
  188. req.ApplyOptions(opts...)
  189. return out, req.Send()
  190. }
  191. const opAttachLoadBalancers = "AttachLoadBalancers"
  192. // AttachLoadBalancersRequest generates a "aws/request.Request" representing the
  193. // client's request for the AttachLoadBalancers operation. The "output" return
  194. // value will be populated with the request's response once the request completes
  195. // successfully.
  196. //
  197. // Use "Send" method on the returned Request to send the API call to the service.
  198. // the "output" return value is not valid until after Send returns without error.
  199. //
  200. // See AttachLoadBalancers for more information on using the AttachLoadBalancers
  201. // API call, and error handling.
  202. //
  203. // This method is useful when you want to inject custom logic or configuration
  204. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  205. //
  206. //
  207. // // Example sending a request using the AttachLoadBalancersRequest method.
  208. // req, resp := client.AttachLoadBalancersRequest(params)
  209. //
  210. // err := req.Send()
  211. // if err == nil { // resp is now filled
  212. // fmt.Println(resp)
  213. // }
  214. //
  215. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancers
  216. func (c *AutoScaling) AttachLoadBalancersRequest(input *AttachLoadBalancersInput) (req *request.Request, output *AttachLoadBalancersOutput) {
  217. op := &request.Operation{
  218. Name: opAttachLoadBalancers,
  219. HTTPMethod: "POST",
  220. HTTPPath: "/",
  221. }
  222. if input == nil {
  223. input = &AttachLoadBalancersInput{}
  224. }
  225. output = &AttachLoadBalancersOutput{}
  226. req = c.newRequest(op, input, output)
  227. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  228. return
  229. }
  230. // AttachLoadBalancers API operation for Auto Scaling.
  231. //
  232. // Attaches one or more Classic Load Balancers to the specified Auto Scaling
  233. // group.
  234. //
  235. // To attach an Application Load Balancer or a Network Load Balancer instead,
  236. // see AttachLoadBalancerTargetGroups.
  237. //
  238. // To describe the load balancers for an Auto Scaling group, use DescribeLoadBalancers.
  239. // To detach the load balancer from the Auto Scaling group, use DetachLoadBalancers.
  240. //
  241. // For more information, see Attaching a Load Balancer to Your Auto Scaling
  242. // Group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/attach-load-balancer-asg.html)
  243. // in the Amazon EC2 Auto Scaling User Guide.
  244. //
  245. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  246. // with awserr.Error's Code and Message methods to get detailed information about
  247. // the error.
  248. //
  249. // See the AWS API reference guide for Auto Scaling's
  250. // API operation AttachLoadBalancers for usage and error information.
  251. //
  252. // Returned Error Codes:
  253. // * ErrCodeResourceContentionFault "ResourceContention"
  254. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  255. // (for example, an Auto Scaling group, instance, or load balancer).
  256. //
  257. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  258. // The service-linked role is not yet ready for use.
  259. //
  260. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/AttachLoadBalancers
  261. func (c *AutoScaling) AttachLoadBalancers(input *AttachLoadBalancersInput) (*AttachLoadBalancersOutput, error) {
  262. req, out := c.AttachLoadBalancersRequest(input)
  263. return out, req.Send()
  264. }
  265. // AttachLoadBalancersWithContext is the same as AttachLoadBalancers with the addition of
  266. // the ability to pass a context and additional request options.
  267. //
  268. // See AttachLoadBalancers for details on how to use this API operation.
  269. //
  270. // The context must be non-nil and will be used for request cancellation. If
  271. // the context is nil a panic will occur. In the future the SDK may create
  272. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  273. // for more information on using Contexts.
  274. func (c *AutoScaling) AttachLoadBalancersWithContext(ctx aws.Context, input *AttachLoadBalancersInput, opts ...request.Option) (*AttachLoadBalancersOutput, error) {
  275. req, out := c.AttachLoadBalancersRequest(input)
  276. req.SetContext(ctx)
  277. req.ApplyOptions(opts...)
  278. return out, req.Send()
  279. }
  280. const opBatchDeleteScheduledAction = "BatchDeleteScheduledAction"
  281. // BatchDeleteScheduledActionRequest generates a "aws/request.Request" representing the
  282. // client's request for the BatchDeleteScheduledAction operation. The "output" return
  283. // value will be populated with the request's response once the request completes
  284. // successfully.
  285. //
  286. // Use "Send" method on the returned Request to send the API call to the service.
  287. // the "output" return value is not valid until after Send returns without error.
  288. //
  289. // See BatchDeleteScheduledAction for more information on using the BatchDeleteScheduledAction
  290. // API call, and error handling.
  291. //
  292. // This method is useful when you want to inject custom logic or configuration
  293. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  294. //
  295. //
  296. // // Example sending a request using the BatchDeleteScheduledActionRequest method.
  297. // req, resp := client.BatchDeleteScheduledActionRequest(params)
  298. //
  299. // err := req.Send()
  300. // if err == nil { // resp is now filled
  301. // fmt.Println(resp)
  302. // }
  303. //
  304. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchDeleteScheduledAction
  305. func (c *AutoScaling) BatchDeleteScheduledActionRequest(input *BatchDeleteScheduledActionInput) (req *request.Request, output *BatchDeleteScheduledActionOutput) {
  306. op := &request.Operation{
  307. Name: opBatchDeleteScheduledAction,
  308. HTTPMethod: "POST",
  309. HTTPPath: "/",
  310. }
  311. if input == nil {
  312. input = &BatchDeleteScheduledActionInput{}
  313. }
  314. output = &BatchDeleteScheduledActionOutput{}
  315. req = c.newRequest(op, input, output)
  316. return
  317. }
  318. // BatchDeleteScheduledAction API operation for Auto Scaling.
  319. //
  320. // Deletes one or more scheduled actions for the specified Auto Scaling group.
  321. //
  322. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  323. // with awserr.Error's Code and Message methods to get detailed information about
  324. // the error.
  325. //
  326. // See the AWS API reference guide for Auto Scaling's
  327. // API operation BatchDeleteScheduledAction for usage and error information.
  328. //
  329. // Returned Error Codes:
  330. // * ErrCodeResourceContentionFault "ResourceContention"
  331. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  332. // (for example, an Auto Scaling group, instance, or load balancer).
  333. //
  334. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchDeleteScheduledAction
  335. func (c *AutoScaling) BatchDeleteScheduledAction(input *BatchDeleteScheduledActionInput) (*BatchDeleteScheduledActionOutput, error) {
  336. req, out := c.BatchDeleteScheduledActionRequest(input)
  337. return out, req.Send()
  338. }
  339. // BatchDeleteScheduledActionWithContext is the same as BatchDeleteScheduledAction with the addition of
  340. // the ability to pass a context and additional request options.
  341. //
  342. // See BatchDeleteScheduledAction for details on how to use this API operation.
  343. //
  344. // The context must be non-nil and will be used for request cancellation. If
  345. // the context is nil a panic will occur. In the future the SDK may create
  346. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  347. // for more information on using Contexts.
  348. func (c *AutoScaling) BatchDeleteScheduledActionWithContext(ctx aws.Context, input *BatchDeleteScheduledActionInput, opts ...request.Option) (*BatchDeleteScheduledActionOutput, error) {
  349. req, out := c.BatchDeleteScheduledActionRequest(input)
  350. req.SetContext(ctx)
  351. req.ApplyOptions(opts...)
  352. return out, req.Send()
  353. }
  354. const opBatchPutScheduledUpdateGroupAction = "BatchPutScheduledUpdateGroupAction"
  355. // BatchPutScheduledUpdateGroupActionRequest generates a "aws/request.Request" representing the
  356. // client's request for the BatchPutScheduledUpdateGroupAction operation. The "output" return
  357. // value will be populated with the request's response once the request completes
  358. // successfully.
  359. //
  360. // Use "Send" method on the returned Request to send the API call to the service.
  361. // the "output" return value is not valid until after Send returns without error.
  362. //
  363. // See BatchPutScheduledUpdateGroupAction for more information on using the BatchPutScheduledUpdateGroupAction
  364. // API call, and error handling.
  365. //
  366. // This method is useful when you want to inject custom logic or configuration
  367. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  368. //
  369. //
  370. // // Example sending a request using the BatchPutScheduledUpdateGroupActionRequest method.
  371. // req, resp := client.BatchPutScheduledUpdateGroupActionRequest(params)
  372. //
  373. // err := req.Send()
  374. // if err == nil { // resp is now filled
  375. // fmt.Println(resp)
  376. // }
  377. //
  378. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchPutScheduledUpdateGroupAction
  379. func (c *AutoScaling) BatchPutScheduledUpdateGroupActionRequest(input *BatchPutScheduledUpdateGroupActionInput) (req *request.Request, output *BatchPutScheduledUpdateGroupActionOutput) {
  380. op := &request.Operation{
  381. Name: opBatchPutScheduledUpdateGroupAction,
  382. HTTPMethod: "POST",
  383. HTTPPath: "/",
  384. }
  385. if input == nil {
  386. input = &BatchPutScheduledUpdateGroupActionInput{}
  387. }
  388. output = &BatchPutScheduledUpdateGroupActionOutput{}
  389. req = c.newRequest(op, input, output)
  390. return
  391. }
  392. // BatchPutScheduledUpdateGroupAction API operation for Auto Scaling.
  393. //
  394. // Creates or updates one or more scheduled scaling actions for an Auto Scaling
  395. // group. If you leave a parameter unspecified when updating a scheduled scaling
  396. // action, the corresponding value remains unchanged.
  397. //
  398. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  399. // with awserr.Error's Code and Message methods to get detailed information about
  400. // the error.
  401. //
  402. // See the AWS API reference guide for Auto Scaling's
  403. // API operation BatchPutScheduledUpdateGroupAction for usage and error information.
  404. //
  405. // Returned Error Codes:
  406. // * ErrCodeAlreadyExistsFault "AlreadyExists"
  407. // You already have an Auto Scaling group or launch configuration with this
  408. // name.
  409. //
  410. // * ErrCodeLimitExceededFault "LimitExceeded"
  411. // You have already reached a limit for your Amazon EC2 Auto Scaling resources
  412. // (for example, Auto Scaling groups, launch configurations, or lifecycle hooks).
  413. // For more information, see DescribeAccountLimits.
  414. //
  415. // * ErrCodeResourceContentionFault "ResourceContention"
  416. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  417. // (for example, an Auto Scaling group, instance, or load balancer).
  418. //
  419. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/BatchPutScheduledUpdateGroupAction
  420. func (c *AutoScaling) BatchPutScheduledUpdateGroupAction(input *BatchPutScheduledUpdateGroupActionInput) (*BatchPutScheduledUpdateGroupActionOutput, error) {
  421. req, out := c.BatchPutScheduledUpdateGroupActionRequest(input)
  422. return out, req.Send()
  423. }
  424. // BatchPutScheduledUpdateGroupActionWithContext is the same as BatchPutScheduledUpdateGroupAction with the addition of
  425. // the ability to pass a context and additional request options.
  426. //
  427. // See BatchPutScheduledUpdateGroupAction for details on how to use this API operation.
  428. //
  429. // The context must be non-nil and will be used for request cancellation. If
  430. // the context is nil a panic will occur. In the future the SDK may create
  431. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  432. // for more information on using Contexts.
  433. func (c *AutoScaling) BatchPutScheduledUpdateGroupActionWithContext(ctx aws.Context, input *BatchPutScheduledUpdateGroupActionInput, opts ...request.Option) (*BatchPutScheduledUpdateGroupActionOutput, error) {
  434. req, out := c.BatchPutScheduledUpdateGroupActionRequest(input)
  435. req.SetContext(ctx)
  436. req.ApplyOptions(opts...)
  437. return out, req.Send()
  438. }
  439. const opCompleteLifecycleAction = "CompleteLifecycleAction"
  440. // CompleteLifecycleActionRequest generates a "aws/request.Request" representing the
  441. // client's request for the CompleteLifecycleAction operation. The "output" return
  442. // value will be populated with the request's response once the request completes
  443. // successfully.
  444. //
  445. // Use "Send" method on the returned Request to send the API call to the service.
  446. // the "output" return value is not valid until after Send returns without error.
  447. //
  448. // See CompleteLifecycleAction for more information on using the CompleteLifecycleAction
  449. // API call, and error handling.
  450. //
  451. // This method is useful when you want to inject custom logic or configuration
  452. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  453. //
  454. //
  455. // // Example sending a request using the CompleteLifecycleActionRequest method.
  456. // req, resp := client.CompleteLifecycleActionRequest(params)
  457. //
  458. // err := req.Send()
  459. // if err == nil { // resp is now filled
  460. // fmt.Println(resp)
  461. // }
  462. //
  463. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CompleteLifecycleAction
  464. func (c *AutoScaling) CompleteLifecycleActionRequest(input *CompleteLifecycleActionInput) (req *request.Request, output *CompleteLifecycleActionOutput) {
  465. op := &request.Operation{
  466. Name: opCompleteLifecycleAction,
  467. HTTPMethod: "POST",
  468. HTTPPath: "/",
  469. }
  470. if input == nil {
  471. input = &CompleteLifecycleActionInput{}
  472. }
  473. output = &CompleteLifecycleActionOutput{}
  474. req = c.newRequest(op, input, output)
  475. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  476. return
  477. }
  478. // CompleteLifecycleAction API operation for Auto Scaling.
  479. //
  480. // Completes the lifecycle action for the specified token or instance with the
  481. // specified result.
  482. //
  483. // This step is a part of the procedure for adding a lifecycle hook to an Auto
  484. // Scaling group:
  485. //
  486. // (Optional) Create a Lambda function and a rule that allows CloudWatch Events
  487. // to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates
  488. // instances.
  489. //
  490. // (Optional) Create a notification target and an IAM role. The target can be
  491. // either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon
  492. // EC2 Auto Scaling to publish lifecycle notifications to the target.
  493. //
  494. // Create the lifecycle hook. Specify whether the hook is used when the instances
  495. // launch or terminate.
  496. //
  497. // If you need more time, record the lifecycle action heartbeat to keep the
  498. // instance in a pending state.
  499. //
  500. // If you finish before the timeout period ends, complete the lifecycle action.
  501. //
  502. // For more information, see Amazon EC2 Auto Scaling Lifecycle Hooks (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html)
  503. // in the Amazon EC2 Auto Scaling User Guide.
  504. //
  505. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  506. // with awserr.Error's Code and Message methods to get detailed information about
  507. // the error.
  508. //
  509. // See the AWS API reference guide for Auto Scaling's
  510. // API operation CompleteLifecycleAction for usage and error information.
  511. //
  512. // Returned Error Codes:
  513. // * ErrCodeResourceContentionFault "ResourceContention"
  514. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  515. // (for example, an Auto Scaling group, instance, or load balancer).
  516. //
  517. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CompleteLifecycleAction
  518. func (c *AutoScaling) CompleteLifecycleAction(input *CompleteLifecycleActionInput) (*CompleteLifecycleActionOutput, error) {
  519. req, out := c.CompleteLifecycleActionRequest(input)
  520. return out, req.Send()
  521. }
  522. // CompleteLifecycleActionWithContext is the same as CompleteLifecycleAction with the addition of
  523. // the ability to pass a context and additional request options.
  524. //
  525. // See CompleteLifecycleAction for details on how to use this API operation.
  526. //
  527. // The context must be non-nil and will be used for request cancellation. If
  528. // the context is nil a panic will occur. In the future the SDK may create
  529. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  530. // for more information on using Contexts.
  531. func (c *AutoScaling) CompleteLifecycleActionWithContext(ctx aws.Context, input *CompleteLifecycleActionInput, opts ...request.Option) (*CompleteLifecycleActionOutput, error) {
  532. req, out := c.CompleteLifecycleActionRequest(input)
  533. req.SetContext(ctx)
  534. req.ApplyOptions(opts...)
  535. return out, req.Send()
  536. }
  537. const opCreateAutoScalingGroup = "CreateAutoScalingGroup"
  538. // CreateAutoScalingGroupRequest generates a "aws/request.Request" representing the
  539. // client's request for the CreateAutoScalingGroup operation. The "output" return
  540. // value will be populated with the request's response once the request completes
  541. // successfully.
  542. //
  543. // Use "Send" method on the returned Request to send the API call to the service.
  544. // the "output" return value is not valid until after Send returns without error.
  545. //
  546. // See CreateAutoScalingGroup for more information on using the CreateAutoScalingGroup
  547. // API call, and error handling.
  548. //
  549. // This method is useful when you want to inject custom logic or configuration
  550. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  551. //
  552. //
  553. // // Example sending a request using the CreateAutoScalingGroupRequest method.
  554. // req, resp := client.CreateAutoScalingGroupRequest(params)
  555. //
  556. // err := req.Send()
  557. // if err == nil { // resp is now filled
  558. // fmt.Println(resp)
  559. // }
  560. //
  561. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateAutoScalingGroup
  562. func (c *AutoScaling) CreateAutoScalingGroupRequest(input *CreateAutoScalingGroupInput) (req *request.Request, output *CreateAutoScalingGroupOutput) {
  563. op := &request.Operation{
  564. Name: opCreateAutoScalingGroup,
  565. HTTPMethod: "POST",
  566. HTTPPath: "/",
  567. }
  568. if input == nil {
  569. input = &CreateAutoScalingGroupInput{}
  570. }
  571. output = &CreateAutoScalingGroupOutput{}
  572. req = c.newRequest(op, input, output)
  573. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  574. return
  575. }
  576. // CreateAutoScalingGroup API operation for Auto Scaling.
  577. //
  578. // Creates an Auto Scaling group with the specified name and attributes.
  579. //
  580. // If you exceed your maximum limit of Auto Scaling groups, the call fails.
  581. // For information about viewing this limit, see DescribeAccountLimits. For
  582. // information about updating this limit, see Amazon EC2 Auto Scaling Limits
  583. // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html)
  584. // in the Amazon EC2 Auto Scaling User Guide.
  585. //
  586. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  587. // with awserr.Error's Code and Message methods to get detailed information about
  588. // the error.
  589. //
  590. // See the AWS API reference guide for Auto Scaling's
  591. // API operation CreateAutoScalingGroup for usage and error information.
  592. //
  593. // Returned Error Codes:
  594. // * ErrCodeAlreadyExistsFault "AlreadyExists"
  595. // You already have an Auto Scaling group or launch configuration with this
  596. // name.
  597. //
  598. // * ErrCodeLimitExceededFault "LimitExceeded"
  599. // You have already reached a limit for your Amazon EC2 Auto Scaling resources
  600. // (for example, Auto Scaling groups, launch configurations, or lifecycle hooks).
  601. // For more information, see DescribeAccountLimits.
  602. //
  603. // * ErrCodeResourceContentionFault "ResourceContention"
  604. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  605. // (for example, an Auto Scaling group, instance, or load balancer).
  606. //
  607. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  608. // The service-linked role is not yet ready for use.
  609. //
  610. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateAutoScalingGroup
  611. func (c *AutoScaling) CreateAutoScalingGroup(input *CreateAutoScalingGroupInput) (*CreateAutoScalingGroupOutput, error) {
  612. req, out := c.CreateAutoScalingGroupRequest(input)
  613. return out, req.Send()
  614. }
  615. // CreateAutoScalingGroupWithContext is the same as CreateAutoScalingGroup with the addition of
  616. // the ability to pass a context and additional request options.
  617. //
  618. // See CreateAutoScalingGroup for details on how to use this API operation.
  619. //
  620. // The context must be non-nil and will be used for request cancellation. If
  621. // the context is nil a panic will occur. In the future the SDK may create
  622. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  623. // for more information on using Contexts.
  624. func (c *AutoScaling) CreateAutoScalingGroupWithContext(ctx aws.Context, input *CreateAutoScalingGroupInput, opts ...request.Option) (*CreateAutoScalingGroupOutput, error) {
  625. req, out := c.CreateAutoScalingGroupRequest(input)
  626. req.SetContext(ctx)
  627. req.ApplyOptions(opts...)
  628. return out, req.Send()
  629. }
  630. const opCreateLaunchConfiguration = "CreateLaunchConfiguration"
  631. // CreateLaunchConfigurationRequest generates a "aws/request.Request" representing the
  632. // client's request for the CreateLaunchConfiguration operation. The "output" return
  633. // value will be populated with the request's response once the request completes
  634. // successfully.
  635. //
  636. // Use "Send" method on the returned Request to send the API call to the service.
  637. // the "output" return value is not valid until after Send returns without error.
  638. //
  639. // See CreateLaunchConfiguration for more information on using the CreateLaunchConfiguration
  640. // API call, and error handling.
  641. //
  642. // This method is useful when you want to inject custom logic or configuration
  643. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  644. //
  645. //
  646. // // Example sending a request using the CreateLaunchConfigurationRequest method.
  647. // req, resp := client.CreateLaunchConfigurationRequest(params)
  648. //
  649. // err := req.Send()
  650. // if err == nil { // resp is now filled
  651. // fmt.Println(resp)
  652. // }
  653. //
  654. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateLaunchConfiguration
  655. func (c *AutoScaling) CreateLaunchConfigurationRequest(input *CreateLaunchConfigurationInput) (req *request.Request, output *CreateLaunchConfigurationOutput) {
  656. op := &request.Operation{
  657. Name: opCreateLaunchConfiguration,
  658. HTTPMethod: "POST",
  659. HTTPPath: "/",
  660. }
  661. if input == nil {
  662. input = &CreateLaunchConfigurationInput{}
  663. }
  664. output = &CreateLaunchConfigurationOutput{}
  665. req = c.newRequest(op, input, output)
  666. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  667. return
  668. }
  669. // CreateLaunchConfiguration API operation for Auto Scaling.
  670. //
  671. // Creates a launch configuration.
  672. //
  673. // If you exceed your maximum limit of launch configurations, the call fails.
  674. // For information about viewing this limit, see DescribeAccountLimits. For
  675. // information about updating this limit, see Amazon EC2 Auto Scaling Limits
  676. // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html)
  677. // in the Amazon EC2 Auto Scaling User Guide.
  678. //
  679. // For more information, see Launch Configurations (https://docs.aws.amazon.com/autoscaling/ec2/userguide/LaunchConfiguration.html)
  680. // in the Amazon EC2 Auto Scaling User Guide.
  681. //
  682. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  683. // with awserr.Error's Code and Message methods to get detailed information about
  684. // the error.
  685. //
  686. // See the AWS API reference guide for Auto Scaling's
  687. // API operation CreateLaunchConfiguration for usage and error information.
  688. //
  689. // Returned Error Codes:
  690. // * ErrCodeAlreadyExistsFault "AlreadyExists"
  691. // You already have an Auto Scaling group or launch configuration with this
  692. // name.
  693. //
  694. // * ErrCodeLimitExceededFault "LimitExceeded"
  695. // You have already reached a limit for your Amazon EC2 Auto Scaling resources
  696. // (for example, Auto Scaling groups, launch configurations, or lifecycle hooks).
  697. // For more information, see DescribeAccountLimits.
  698. //
  699. // * ErrCodeResourceContentionFault "ResourceContention"
  700. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  701. // (for example, an Auto Scaling group, instance, or load balancer).
  702. //
  703. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateLaunchConfiguration
  704. func (c *AutoScaling) CreateLaunchConfiguration(input *CreateLaunchConfigurationInput) (*CreateLaunchConfigurationOutput, error) {
  705. req, out := c.CreateLaunchConfigurationRequest(input)
  706. return out, req.Send()
  707. }
  708. // CreateLaunchConfigurationWithContext is the same as CreateLaunchConfiguration with the addition of
  709. // the ability to pass a context and additional request options.
  710. //
  711. // See CreateLaunchConfiguration for details on how to use this API operation.
  712. //
  713. // The context must be non-nil and will be used for request cancellation. If
  714. // the context is nil a panic will occur. In the future the SDK may create
  715. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  716. // for more information on using Contexts.
  717. func (c *AutoScaling) CreateLaunchConfigurationWithContext(ctx aws.Context, input *CreateLaunchConfigurationInput, opts ...request.Option) (*CreateLaunchConfigurationOutput, error) {
  718. req, out := c.CreateLaunchConfigurationRequest(input)
  719. req.SetContext(ctx)
  720. req.ApplyOptions(opts...)
  721. return out, req.Send()
  722. }
  723. const opCreateOrUpdateTags = "CreateOrUpdateTags"
  724. // CreateOrUpdateTagsRequest generates a "aws/request.Request" representing the
  725. // client's request for the CreateOrUpdateTags operation. The "output" return
  726. // value will be populated with the request's response once the request completes
  727. // successfully.
  728. //
  729. // Use "Send" method on the returned Request to send the API call to the service.
  730. // the "output" return value is not valid until after Send returns without error.
  731. //
  732. // See CreateOrUpdateTags for more information on using the CreateOrUpdateTags
  733. // API call, and error handling.
  734. //
  735. // This method is useful when you want to inject custom logic or configuration
  736. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  737. //
  738. //
  739. // // Example sending a request using the CreateOrUpdateTagsRequest method.
  740. // req, resp := client.CreateOrUpdateTagsRequest(params)
  741. //
  742. // err := req.Send()
  743. // if err == nil { // resp is now filled
  744. // fmt.Println(resp)
  745. // }
  746. //
  747. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateOrUpdateTags
  748. func (c *AutoScaling) CreateOrUpdateTagsRequest(input *CreateOrUpdateTagsInput) (req *request.Request, output *CreateOrUpdateTagsOutput) {
  749. op := &request.Operation{
  750. Name: opCreateOrUpdateTags,
  751. HTTPMethod: "POST",
  752. HTTPPath: "/",
  753. }
  754. if input == nil {
  755. input = &CreateOrUpdateTagsInput{}
  756. }
  757. output = &CreateOrUpdateTagsOutput{}
  758. req = c.newRequest(op, input, output)
  759. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  760. return
  761. }
  762. // CreateOrUpdateTags API operation for Auto Scaling.
  763. //
  764. // Creates or updates tags for the specified Auto Scaling group.
  765. //
  766. // When you specify a tag with a key that already exists, the operation overwrites
  767. // the previous tag definition, and you do not get an error message.
  768. //
  769. // For more information, see Tagging Auto Scaling Groups and Instances (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html)
  770. // in the Amazon EC2 Auto Scaling User Guide.
  771. //
  772. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  773. // with awserr.Error's Code and Message methods to get detailed information about
  774. // the error.
  775. //
  776. // See the AWS API reference guide for Auto Scaling's
  777. // API operation CreateOrUpdateTags for usage and error information.
  778. //
  779. // Returned Error Codes:
  780. // * ErrCodeLimitExceededFault "LimitExceeded"
  781. // You have already reached a limit for your Amazon EC2 Auto Scaling resources
  782. // (for example, Auto Scaling groups, launch configurations, or lifecycle hooks).
  783. // For more information, see DescribeAccountLimits.
  784. //
  785. // * ErrCodeAlreadyExistsFault "AlreadyExists"
  786. // You already have an Auto Scaling group or launch configuration with this
  787. // name.
  788. //
  789. // * ErrCodeResourceContentionFault "ResourceContention"
  790. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  791. // (for example, an Auto Scaling group, instance, or load balancer).
  792. //
  793. // * ErrCodeResourceInUseFault "ResourceInUse"
  794. // The operation can't be performed because the resource is in use.
  795. //
  796. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateOrUpdateTags
  797. func (c *AutoScaling) CreateOrUpdateTags(input *CreateOrUpdateTagsInput) (*CreateOrUpdateTagsOutput, error) {
  798. req, out := c.CreateOrUpdateTagsRequest(input)
  799. return out, req.Send()
  800. }
  801. // CreateOrUpdateTagsWithContext is the same as CreateOrUpdateTags with the addition of
  802. // the ability to pass a context and additional request options.
  803. //
  804. // See CreateOrUpdateTags for details on how to use this API operation.
  805. //
  806. // The context must be non-nil and will be used for request cancellation. If
  807. // the context is nil a panic will occur. In the future the SDK may create
  808. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  809. // for more information on using Contexts.
  810. func (c *AutoScaling) CreateOrUpdateTagsWithContext(ctx aws.Context, input *CreateOrUpdateTagsInput, opts ...request.Option) (*CreateOrUpdateTagsOutput, error) {
  811. req, out := c.CreateOrUpdateTagsRequest(input)
  812. req.SetContext(ctx)
  813. req.ApplyOptions(opts...)
  814. return out, req.Send()
  815. }
  816. const opDeleteAutoScalingGroup = "DeleteAutoScalingGroup"
  817. // DeleteAutoScalingGroupRequest generates a "aws/request.Request" representing the
  818. // client's request for the DeleteAutoScalingGroup operation. The "output" return
  819. // value will be populated with the request's response once the request completes
  820. // successfully.
  821. //
  822. // Use "Send" method on the returned Request to send the API call to the service.
  823. // the "output" return value is not valid until after Send returns without error.
  824. //
  825. // See DeleteAutoScalingGroup for more information on using the DeleteAutoScalingGroup
  826. // API call, and error handling.
  827. //
  828. // This method is useful when you want to inject custom logic or configuration
  829. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  830. //
  831. //
  832. // // Example sending a request using the DeleteAutoScalingGroupRequest method.
  833. // req, resp := client.DeleteAutoScalingGroupRequest(params)
  834. //
  835. // err := req.Send()
  836. // if err == nil { // resp is now filled
  837. // fmt.Println(resp)
  838. // }
  839. //
  840. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteAutoScalingGroup
  841. func (c *AutoScaling) DeleteAutoScalingGroupRequest(input *DeleteAutoScalingGroupInput) (req *request.Request, output *DeleteAutoScalingGroupOutput) {
  842. op := &request.Operation{
  843. Name: opDeleteAutoScalingGroup,
  844. HTTPMethod: "POST",
  845. HTTPPath: "/",
  846. }
  847. if input == nil {
  848. input = &DeleteAutoScalingGroupInput{}
  849. }
  850. output = &DeleteAutoScalingGroupOutput{}
  851. req = c.newRequest(op, input, output)
  852. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  853. return
  854. }
  855. // DeleteAutoScalingGroup API operation for Auto Scaling.
  856. //
  857. // Deletes the specified Auto Scaling group.
  858. //
  859. // If the group has instances or scaling activities in progress, you must specify
  860. // the option to force the deletion in order for it to succeed.
  861. //
  862. // If the group has policies, deleting the group deletes the policies, the underlying
  863. // alarm actions, and any alarm that no longer has an associated action.
  864. //
  865. // To remove instances from the Auto Scaling group before deleting it, call
  866. // DetachInstances with the list of instances and the option to decrement the
  867. // desired capacity. This ensures that Amazon EC2 Auto Scaling does not launch
  868. // replacement instances.
  869. //
  870. // To terminate all instances before deleting the Auto Scaling group, call UpdateAutoScalingGroup
  871. // and set the minimum size and desired capacity of the Auto Scaling group to
  872. // zero.
  873. //
  874. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  875. // with awserr.Error's Code and Message methods to get detailed information about
  876. // the error.
  877. //
  878. // See the AWS API reference guide for Auto Scaling's
  879. // API operation DeleteAutoScalingGroup for usage and error information.
  880. //
  881. // Returned Error Codes:
  882. // * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress"
  883. // The operation can't be performed because there are scaling activities in
  884. // progress.
  885. //
  886. // * ErrCodeResourceInUseFault "ResourceInUse"
  887. // The operation can't be performed because the resource is in use.
  888. //
  889. // * ErrCodeResourceContentionFault "ResourceContention"
  890. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  891. // (for example, an Auto Scaling group, instance, or load balancer).
  892. //
  893. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteAutoScalingGroup
  894. func (c *AutoScaling) DeleteAutoScalingGroup(input *DeleteAutoScalingGroupInput) (*DeleteAutoScalingGroupOutput, error) {
  895. req, out := c.DeleteAutoScalingGroupRequest(input)
  896. return out, req.Send()
  897. }
  898. // DeleteAutoScalingGroupWithContext is the same as DeleteAutoScalingGroup with the addition of
  899. // the ability to pass a context and additional request options.
  900. //
  901. // See DeleteAutoScalingGroup for details on how to use this API operation.
  902. //
  903. // The context must be non-nil and will be used for request cancellation. If
  904. // the context is nil a panic will occur. In the future the SDK may create
  905. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  906. // for more information on using Contexts.
  907. func (c *AutoScaling) DeleteAutoScalingGroupWithContext(ctx aws.Context, input *DeleteAutoScalingGroupInput, opts ...request.Option) (*DeleteAutoScalingGroupOutput, error) {
  908. req, out := c.DeleteAutoScalingGroupRequest(input)
  909. req.SetContext(ctx)
  910. req.ApplyOptions(opts...)
  911. return out, req.Send()
  912. }
  913. const opDeleteLaunchConfiguration = "DeleteLaunchConfiguration"
  914. // DeleteLaunchConfigurationRequest generates a "aws/request.Request" representing the
  915. // client's request for the DeleteLaunchConfiguration operation. The "output" return
  916. // value will be populated with the request's response once the request completes
  917. // successfully.
  918. //
  919. // Use "Send" method on the returned Request to send the API call to the service.
  920. // the "output" return value is not valid until after Send returns without error.
  921. //
  922. // See DeleteLaunchConfiguration for more information on using the DeleteLaunchConfiguration
  923. // API call, and error handling.
  924. //
  925. // This method is useful when you want to inject custom logic or configuration
  926. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  927. //
  928. //
  929. // // Example sending a request using the DeleteLaunchConfigurationRequest method.
  930. // req, resp := client.DeleteLaunchConfigurationRequest(params)
  931. //
  932. // err := req.Send()
  933. // if err == nil { // resp is now filled
  934. // fmt.Println(resp)
  935. // }
  936. //
  937. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLaunchConfiguration
  938. func (c *AutoScaling) DeleteLaunchConfigurationRequest(input *DeleteLaunchConfigurationInput) (req *request.Request, output *DeleteLaunchConfigurationOutput) {
  939. op := &request.Operation{
  940. Name: opDeleteLaunchConfiguration,
  941. HTTPMethod: "POST",
  942. HTTPPath: "/",
  943. }
  944. if input == nil {
  945. input = &DeleteLaunchConfigurationInput{}
  946. }
  947. output = &DeleteLaunchConfigurationOutput{}
  948. req = c.newRequest(op, input, output)
  949. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  950. return
  951. }
  952. // DeleteLaunchConfiguration API operation for Auto Scaling.
  953. //
  954. // Deletes the specified launch configuration.
  955. //
  956. // The launch configuration must not be attached to an Auto Scaling group. When
  957. // this call completes, the launch configuration is no longer available for
  958. // use.
  959. //
  960. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  961. // with awserr.Error's Code and Message methods to get detailed information about
  962. // the error.
  963. //
  964. // See the AWS API reference guide for Auto Scaling's
  965. // API operation DeleteLaunchConfiguration for usage and error information.
  966. //
  967. // Returned Error Codes:
  968. // * ErrCodeResourceInUseFault "ResourceInUse"
  969. // The operation can't be performed because the resource is in use.
  970. //
  971. // * ErrCodeResourceContentionFault "ResourceContention"
  972. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  973. // (for example, an Auto Scaling group, instance, or load balancer).
  974. //
  975. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLaunchConfiguration
  976. func (c *AutoScaling) DeleteLaunchConfiguration(input *DeleteLaunchConfigurationInput) (*DeleteLaunchConfigurationOutput, error) {
  977. req, out := c.DeleteLaunchConfigurationRequest(input)
  978. return out, req.Send()
  979. }
  980. // DeleteLaunchConfigurationWithContext is the same as DeleteLaunchConfiguration with the addition of
  981. // the ability to pass a context and additional request options.
  982. //
  983. // See DeleteLaunchConfiguration for details on how to use this API operation.
  984. //
  985. // The context must be non-nil and will be used for request cancellation. If
  986. // the context is nil a panic will occur. In the future the SDK may create
  987. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  988. // for more information on using Contexts.
  989. func (c *AutoScaling) DeleteLaunchConfigurationWithContext(ctx aws.Context, input *DeleteLaunchConfigurationInput, opts ...request.Option) (*DeleteLaunchConfigurationOutput, error) {
  990. req, out := c.DeleteLaunchConfigurationRequest(input)
  991. req.SetContext(ctx)
  992. req.ApplyOptions(opts...)
  993. return out, req.Send()
  994. }
  995. const opDeleteLifecycleHook = "DeleteLifecycleHook"
  996. // DeleteLifecycleHookRequest generates a "aws/request.Request" representing the
  997. // client's request for the DeleteLifecycleHook operation. The "output" return
  998. // value will be populated with the request's response once the request completes
  999. // successfully.
  1000. //
  1001. // Use "Send" method on the returned Request to send the API call to the service.
  1002. // the "output" return value is not valid until after Send returns without error.
  1003. //
  1004. // See DeleteLifecycleHook for more information on using the DeleteLifecycleHook
  1005. // API call, and error handling.
  1006. //
  1007. // This method is useful when you want to inject custom logic or configuration
  1008. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1009. //
  1010. //
  1011. // // Example sending a request using the DeleteLifecycleHookRequest method.
  1012. // req, resp := client.DeleteLifecycleHookRequest(params)
  1013. //
  1014. // err := req.Send()
  1015. // if err == nil { // resp is now filled
  1016. // fmt.Println(resp)
  1017. // }
  1018. //
  1019. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLifecycleHook
  1020. func (c *AutoScaling) DeleteLifecycleHookRequest(input *DeleteLifecycleHookInput) (req *request.Request, output *DeleteLifecycleHookOutput) {
  1021. op := &request.Operation{
  1022. Name: opDeleteLifecycleHook,
  1023. HTTPMethod: "POST",
  1024. HTTPPath: "/",
  1025. }
  1026. if input == nil {
  1027. input = &DeleteLifecycleHookInput{}
  1028. }
  1029. output = &DeleteLifecycleHookOutput{}
  1030. req = c.newRequest(op, input, output)
  1031. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1032. return
  1033. }
  1034. // DeleteLifecycleHook API operation for Auto Scaling.
  1035. //
  1036. // Deletes the specified lifecycle hook.
  1037. //
  1038. // If there are any outstanding lifecycle actions, they are completed first
  1039. // (ABANDON for launching instances, CONTINUE for terminating instances).
  1040. //
  1041. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1042. // with awserr.Error's Code and Message methods to get detailed information about
  1043. // the error.
  1044. //
  1045. // See the AWS API reference guide for Auto Scaling's
  1046. // API operation DeleteLifecycleHook for usage and error information.
  1047. //
  1048. // Returned Error Codes:
  1049. // * ErrCodeResourceContentionFault "ResourceContention"
  1050. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  1051. // (for example, an Auto Scaling group, instance, or load balancer).
  1052. //
  1053. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteLifecycleHook
  1054. func (c *AutoScaling) DeleteLifecycleHook(input *DeleteLifecycleHookInput) (*DeleteLifecycleHookOutput, error) {
  1055. req, out := c.DeleteLifecycleHookRequest(input)
  1056. return out, req.Send()
  1057. }
  1058. // DeleteLifecycleHookWithContext is the same as DeleteLifecycleHook with the addition of
  1059. // the ability to pass a context and additional request options.
  1060. //
  1061. // See DeleteLifecycleHook for details on how to use this API operation.
  1062. //
  1063. // The context must be non-nil and will be used for request cancellation. If
  1064. // the context is nil a panic will occur. In the future the SDK may create
  1065. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1066. // for more information on using Contexts.
  1067. func (c *AutoScaling) DeleteLifecycleHookWithContext(ctx aws.Context, input *DeleteLifecycleHookInput, opts ...request.Option) (*DeleteLifecycleHookOutput, error) {
  1068. req, out := c.DeleteLifecycleHookRequest(input)
  1069. req.SetContext(ctx)
  1070. req.ApplyOptions(opts...)
  1071. return out, req.Send()
  1072. }
  1073. const opDeleteNotificationConfiguration = "DeleteNotificationConfiguration"
  1074. // DeleteNotificationConfigurationRequest generates a "aws/request.Request" representing the
  1075. // client's request for the DeleteNotificationConfiguration operation. The "output" return
  1076. // value will be populated with the request's response once the request completes
  1077. // successfully.
  1078. //
  1079. // Use "Send" method on the returned Request to send the API call to the service.
  1080. // the "output" return value is not valid until after Send returns without error.
  1081. //
  1082. // See DeleteNotificationConfiguration for more information on using the DeleteNotificationConfiguration
  1083. // API call, and error handling.
  1084. //
  1085. // This method is useful when you want to inject custom logic or configuration
  1086. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1087. //
  1088. //
  1089. // // Example sending a request using the DeleteNotificationConfigurationRequest method.
  1090. // req, resp := client.DeleteNotificationConfigurationRequest(params)
  1091. //
  1092. // err := req.Send()
  1093. // if err == nil { // resp is now filled
  1094. // fmt.Println(resp)
  1095. // }
  1096. //
  1097. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteNotificationConfiguration
  1098. func (c *AutoScaling) DeleteNotificationConfigurationRequest(input *DeleteNotificationConfigurationInput) (req *request.Request, output *DeleteNotificationConfigurationOutput) {
  1099. op := &request.Operation{
  1100. Name: opDeleteNotificationConfiguration,
  1101. HTTPMethod: "POST",
  1102. HTTPPath: "/",
  1103. }
  1104. if input == nil {
  1105. input = &DeleteNotificationConfigurationInput{}
  1106. }
  1107. output = &DeleteNotificationConfigurationOutput{}
  1108. req = c.newRequest(op, input, output)
  1109. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1110. return
  1111. }
  1112. // DeleteNotificationConfiguration API operation for Auto Scaling.
  1113. //
  1114. // Deletes the specified notification.
  1115. //
  1116. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1117. // with awserr.Error's Code and Message methods to get detailed information about
  1118. // the error.
  1119. //
  1120. // See the AWS API reference guide for Auto Scaling's
  1121. // API operation DeleteNotificationConfiguration for usage and error information.
  1122. //
  1123. // Returned Error Codes:
  1124. // * ErrCodeResourceContentionFault "ResourceContention"
  1125. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  1126. // (for example, an Auto Scaling group, instance, or load balancer).
  1127. //
  1128. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteNotificationConfiguration
  1129. func (c *AutoScaling) DeleteNotificationConfiguration(input *DeleteNotificationConfigurationInput) (*DeleteNotificationConfigurationOutput, error) {
  1130. req, out := c.DeleteNotificationConfigurationRequest(input)
  1131. return out, req.Send()
  1132. }
  1133. // DeleteNotificationConfigurationWithContext is the same as DeleteNotificationConfiguration with the addition of
  1134. // the ability to pass a context and additional request options.
  1135. //
  1136. // See DeleteNotificationConfiguration for details on how to use this API operation.
  1137. //
  1138. // The context must be non-nil and will be used for request cancellation. If
  1139. // the context is nil a panic will occur. In the future the SDK may create
  1140. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1141. // for more information on using Contexts.
  1142. func (c *AutoScaling) DeleteNotificationConfigurationWithContext(ctx aws.Context, input *DeleteNotificationConfigurationInput, opts ...request.Option) (*DeleteNotificationConfigurationOutput, error) {
  1143. req, out := c.DeleteNotificationConfigurationRequest(input)
  1144. req.SetContext(ctx)
  1145. req.ApplyOptions(opts...)
  1146. return out, req.Send()
  1147. }
  1148. const opDeletePolicy = "DeletePolicy"
  1149. // DeletePolicyRequest generates a "aws/request.Request" representing the
  1150. // client's request for the DeletePolicy operation. The "output" return
  1151. // value will be populated with the request's response once the request completes
  1152. // successfully.
  1153. //
  1154. // Use "Send" method on the returned Request to send the API call to the service.
  1155. // the "output" return value is not valid until after Send returns without error.
  1156. //
  1157. // See DeletePolicy for more information on using the DeletePolicy
  1158. // API call, and error handling.
  1159. //
  1160. // This method is useful when you want to inject custom logic or configuration
  1161. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1162. //
  1163. //
  1164. // // Example sending a request using the DeletePolicyRequest method.
  1165. // req, resp := client.DeletePolicyRequest(params)
  1166. //
  1167. // err := req.Send()
  1168. // if err == nil { // resp is now filled
  1169. // fmt.Println(resp)
  1170. // }
  1171. //
  1172. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeletePolicy
  1173. func (c *AutoScaling) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) {
  1174. op := &request.Operation{
  1175. Name: opDeletePolicy,
  1176. HTTPMethod: "POST",
  1177. HTTPPath: "/",
  1178. }
  1179. if input == nil {
  1180. input = &DeletePolicyInput{}
  1181. }
  1182. output = &DeletePolicyOutput{}
  1183. req = c.newRequest(op, input, output)
  1184. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1185. return
  1186. }
  1187. // DeletePolicy API operation for Auto Scaling.
  1188. //
  1189. // Deletes the specified scaling policy.
  1190. //
  1191. // Deleting either a step scaling policy or a simple scaling policy deletes
  1192. // the underlying alarm action, but does not delete the alarm, even if it no
  1193. // longer has an associated action.
  1194. //
  1195. // For more information, see Deleting a Scaling Policy (https://docs.aws.amazon.com/autoscaling/ec2/userguide/deleting-scaling-policy.html)
  1196. // in the Amazon EC2 Auto Scaling User Guide.
  1197. //
  1198. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1199. // with awserr.Error's Code and Message methods to get detailed information about
  1200. // the error.
  1201. //
  1202. // See the AWS API reference guide for Auto Scaling's
  1203. // API operation DeletePolicy for usage and error information.
  1204. //
  1205. // Returned Error Codes:
  1206. // * ErrCodeResourceContentionFault "ResourceContention"
  1207. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  1208. // (for example, an Auto Scaling group, instance, or load balancer).
  1209. //
  1210. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  1211. // The service-linked role is not yet ready for use.
  1212. //
  1213. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeletePolicy
  1214. func (c *AutoScaling) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutput, error) {
  1215. req, out := c.DeletePolicyRequest(input)
  1216. return out, req.Send()
  1217. }
  1218. // DeletePolicyWithContext is the same as DeletePolicy with the addition of
  1219. // the ability to pass a context and additional request options.
  1220. //
  1221. // See DeletePolicy for details on how to use this API operation.
  1222. //
  1223. // The context must be non-nil and will be used for request cancellation. If
  1224. // the context is nil a panic will occur. In the future the SDK may create
  1225. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1226. // for more information on using Contexts.
  1227. func (c *AutoScaling) DeletePolicyWithContext(ctx aws.Context, input *DeletePolicyInput, opts ...request.Option) (*DeletePolicyOutput, error) {
  1228. req, out := c.DeletePolicyRequest(input)
  1229. req.SetContext(ctx)
  1230. req.ApplyOptions(opts...)
  1231. return out, req.Send()
  1232. }
  1233. const opDeleteScheduledAction = "DeleteScheduledAction"
  1234. // DeleteScheduledActionRequest generates a "aws/request.Request" representing the
  1235. // client's request for the DeleteScheduledAction operation. The "output" return
  1236. // value will be populated with the request's response once the request completes
  1237. // successfully.
  1238. //
  1239. // Use "Send" method on the returned Request to send the API call to the service.
  1240. // the "output" return value is not valid until after Send returns without error.
  1241. //
  1242. // See DeleteScheduledAction for more information on using the DeleteScheduledAction
  1243. // API call, and error handling.
  1244. //
  1245. // This method is useful when you want to inject custom logic or configuration
  1246. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1247. //
  1248. //
  1249. // // Example sending a request using the DeleteScheduledActionRequest method.
  1250. // req, resp := client.DeleteScheduledActionRequest(params)
  1251. //
  1252. // err := req.Send()
  1253. // if err == nil { // resp is now filled
  1254. // fmt.Println(resp)
  1255. // }
  1256. //
  1257. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteScheduledAction
  1258. func (c *AutoScaling) DeleteScheduledActionRequest(input *DeleteScheduledActionInput) (req *request.Request, output *DeleteScheduledActionOutput) {
  1259. op := &request.Operation{
  1260. Name: opDeleteScheduledAction,
  1261. HTTPMethod: "POST",
  1262. HTTPPath: "/",
  1263. }
  1264. if input == nil {
  1265. input = &DeleteScheduledActionInput{}
  1266. }
  1267. output = &DeleteScheduledActionOutput{}
  1268. req = c.newRequest(op, input, output)
  1269. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1270. return
  1271. }
  1272. // DeleteScheduledAction API operation for Auto Scaling.
  1273. //
  1274. // Deletes the specified scheduled action.
  1275. //
  1276. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1277. // with awserr.Error's Code and Message methods to get detailed information about
  1278. // the error.
  1279. //
  1280. // See the AWS API reference guide for Auto Scaling's
  1281. // API operation DeleteScheduledAction for usage and error information.
  1282. //
  1283. // Returned Error Codes:
  1284. // * ErrCodeResourceContentionFault "ResourceContention"
  1285. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  1286. // (for example, an Auto Scaling group, instance, or load balancer).
  1287. //
  1288. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteScheduledAction
  1289. func (c *AutoScaling) DeleteScheduledAction(input *DeleteScheduledActionInput) (*DeleteScheduledActionOutput, error) {
  1290. req, out := c.DeleteScheduledActionRequest(input)
  1291. return out, req.Send()
  1292. }
  1293. // DeleteScheduledActionWithContext is the same as DeleteScheduledAction with the addition of
  1294. // the ability to pass a context and additional request options.
  1295. //
  1296. // See DeleteScheduledAction for details on how to use this API operation.
  1297. //
  1298. // The context must be non-nil and will be used for request cancellation. If
  1299. // the context is nil a panic will occur. In the future the SDK may create
  1300. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1301. // for more information on using Contexts.
  1302. func (c *AutoScaling) DeleteScheduledActionWithContext(ctx aws.Context, input *DeleteScheduledActionInput, opts ...request.Option) (*DeleteScheduledActionOutput, error) {
  1303. req, out := c.DeleteScheduledActionRequest(input)
  1304. req.SetContext(ctx)
  1305. req.ApplyOptions(opts...)
  1306. return out, req.Send()
  1307. }
  1308. const opDeleteTags = "DeleteTags"
  1309. // DeleteTagsRequest generates a "aws/request.Request" representing the
  1310. // client's request for the DeleteTags operation. The "output" return
  1311. // value will be populated with the request's response once the request completes
  1312. // successfully.
  1313. //
  1314. // Use "Send" method on the returned Request to send the API call to the service.
  1315. // the "output" return value is not valid until after Send returns without error.
  1316. //
  1317. // See DeleteTags for more information on using the DeleteTags
  1318. // API call, and error handling.
  1319. //
  1320. // This method is useful when you want to inject custom logic or configuration
  1321. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1322. //
  1323. //
  1324. // // Example sending a request using the DeleteTagsRequest method.
  1325. // req, resp := client.DeleteTagsRequest(params)
  1326. //
  1327. // err := req.Send()
  1328. // if err == nil { // resp is now filled
  1329. // fmt.Println(resp)
  1330. // }
  1331. //
  1332. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteTags
  1333. func (c *AutoScaling) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) {
  1334. op := &request.Operation{
  1335. Name: opDeleteTags,
  1336. HTTPMethod: "POST",
  1337. HTTPPath: "/",
  1338. }
  1339. if input == nil {
  1340. input = &DeleteTagsInput{}
  1341. }
  1342. output = &DeleteTagsOutput{}
  1343. req = c.newRequest(op, input, output)
  1344. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1345. return
  1346. }
  1347. // DeleteTags API operation for Auto Scaling.
  1348. //
  1349. // Deletes the specified tags.
  1350. //
  1351. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1352. // with awserr.Error's Code and Message methods to get detailed information about
  1353. // the error.
  1354. //
  1355. // See the AWS API reference guide for Auto Scaling's
  1356. // API operation DeleteTags for usage and error information.
  1357. //
  1358. // Returned Error Codes:
  1359. // * ErrCodeResourceContentionFault "ResourceContention"
  1360. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  1361. // (for example, an Auto Scaling group, instance, or load balancer).
  1362. //
  1363. // * ErrCodeResourceInUseFault "ResourceInUse"
  1364. // The operation can't be performed because the resource is in use.
  1365. //
  1366. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteTags
  1367. func (c *AutoScaling) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
  1368. req, out := c.DeleteTagsRequest(input)
  1369. return out, req.Send()
  1370. }
  1371. // DeleteTagsWithContext is the same as DeleteTags with the addition of
  1372. // the ability to pass a context and additional request options.
  1373. //
  1374. // See DeleteTags for details on how to use this API operation.
  1375. //
  1376. // The context must be non-nil and will be used for request cancellation. If
  1377. // the context is nil a panic will occur. In the future the SDK may create
  1378. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1379. // for more information on using Contexts.
  1380. func (c *AutoScaling) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) {
  1381. req, out := c.DeleteTagsRequest(input)
  1382. req.SetContext(ctx)
  1383. req.ApplyOptions(opts...)
  1384. return out, req.Send()
  1385. }
  1386. const opDescribeAccountLimits = "DescribeAccountLimits"
  1387. // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the
  1388. // client's request for the DescribeAccountLimits operation. The "output" return
  1389. // value will be populated with the request's response once the request completes
  1390. // successfully.
  1391. //
  1392. // Use "Send" method on the returned Request to send the API call to the service.
  1393. // the "output" return value is not valid until after Send returns without error.
  1394. //
  1395. // See DescribeAccountLimits for more information on using the DescribeAccountLimits
  1396. // API call, and error handling.
  1397. //
  1398. // This method is useful when you want to inject custom logic or configuration
  1399. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1400. //
  1401. //
  1402. // // Example sending a request using the DescribeAccountLimitsRequest method.
  1403. // req, resp := client.DescribeAccountLimitsRequest(params)
  1404. //
  1405. // err := req.Send()
  1406. // if err == nil { // resp is now filled
  1407. // fmt.Println(resp)
  1408. // }
  1409. //
  1410. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAccountLimits
  1411. func (c *AutoScaling) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) (req *request.Request, output *DescribeAccountLimitsOutput) {
  1412. op := &request.Operation{
  1413. Name: opDescribeAccountLimits,
  1414. HTTPMethod: "POST",
  1415. HTTPPath: "/",
  1416. }
  1417. if input == nil {
  1418. input = &DescribeAccountLimitsInput{}
  1419. }
  1420. output = &DescribeAccountLimitsOutput{}
  1421. req = c.newRequest(op, input, output)
  1422. return
  1423. }
  1424. // DescribeAccountLimits API operation for Auto Scaling.
  1425. //
  1426. // Describes the current Amazon EC2 Auto Scaling resource limits for your AWS
  1427. // account.
  1428. //
  1429. // For information about requesting an increase in these limits, see Amazon
  1430. // EC2 Auto Scaling Limits (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html)
  1431. // in the Amazon EC2 Auto Scaling User Guide.
  1432. //
  1433. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1434. // with awserr.Error's Code and Message methods to get detailed information about
  1435. // the error.
  1436. //
  1437. // See the AWS API reference guide for Auto Scaling's
  1438. // API operation DescribeAccountLimits for usage and error information.
  1439. //
  1440. // Returned Error Codes:
  1441. // * ErrCodeResourceContentionFault "ResourceContention"
  1442. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  1443. // (for example, an Auto Scaling group, instance, or load balancer).
  1444. //
  1445. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAccountLimits
  1446. func (c *AutoScaling) DescribeAccountLimits(input *DescribeAccountLimitsInput) (*DescribeAccountLimitsOutput, error) {
  1447. req, out := c.DescribeAccountLimitsRequest(input)
  1448. return out, req.Send()
  1449. }
  1450. // DescribeAccountLimitsWithContext is the same as DescribeAccountLimits with the addition of
  1451. // the ability to pass a context and additional request options.
  1452. //
  1453. // See DescribeAccountLimits for details on how to use this API operation.
  1454. //
  1455. // The context must be non-nil and will be used for request cancellation. If
  1456. // the context is nil a panic will occur. In the future the SDK may create
  1457. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1458. // for more information on using Contexts.
  1459. func (c *AutoScaling) DescribeAccountLimitsWithContext(ctx aws.Context, input *DescribeAccountLimitsInput, opts ...request.Option) (*DescribeAccountLimitsOutput, error) {
  1460. req, out := c.DescribeAccountLimitsRequest(input)
  1461. req.SetContext(ctx)
  1462. req.ApplyOptions(opts...)
  1463. return out, req.Send()
  1464. }
  1465. const opDescribeAdjustmentTypes = "DescribeAdjustmentTypes"
  1466. // DescribeAdjustmentTypesRequest generates a "aws/request.Request" representing the
  1467. // client's request for the DescribeAdjustmentTypes operation. The "output" return
  1468. // value will be populated with the request's response once the request completes
  1469. // successfully.
  1470. //
  1471. // Use "Send" method on the returned Request to send the API call to the service.
  1472. // the "output" return value is not valid until after Send returns without error.
  1473. //
  1474. // See DescribeAdjustmentTypes for more information on using the DescribeAdjustmentTypes
  1475. // API call, and error handling.
  1476. //
  1477. // This method is useful when you want to inject custom logic or configuration
  1478. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1479. //
  1480. //
  1481. // // Example sending a request using the DescribeAdjustmentTypesRequest method.
  1482. // req, resp := client.DescribeAdjustmentTypesRequest(params)
  1483. //
  1484. // err := req.Send()
  1485. // if err == nil { // resp is now filled
  1486. // fmt.Println(resp)
  1487. // }
  1488. //
  1489. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAdjustmentTypes
  1490. func (c *AutoScaling) DescribeAdjustmentTypesRequest(input *DescribeAdjustmentTypesInput) (req *request.Request, output *DescribeAdjustmentTypesOutput) {
  1491. op := &request.Operation{
  1492. Name: opDescribeAdjustmentTypes,
  1493. HTTPMethod: "POST",
  1494. HTTPPath: "/",
  1495. }
  1496. if input == nil {
  1497. input = &DescribeAdjustmentTypesInput{}
  1498. }
  1499. output = &DescribeAdjustmentTypesOutput{}
  1500. req = c.newRequest(op, input, output)
  1501. return
  1502. }
  1503. // DescribeAdjustmentTypes API operation for Auto Scaling.
  1504. //
  1505. // Describes the policy adjustment types for use with PutScalingPolicy.
  1506. //
  1507. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1508. // with awserr.Error's Code and Message methods to get detailed information about
  1509. // the error.
  1510. //
  1511. // See the AWS API reference guide for Auto Scaling's
  1512. // API operation DescribeAdjustmentTypes for usage and error information.
  1513. //
  1514. // Returned Error Codes:
  1515. // * ErrCodeResourceContentionFault "ResourceContention"
  1516. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  1517. // (for example, an Auto Scaling group, instance, or load balancer).
  1518. //
  1519. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAdjustmentTypes
  1520. func (c *AutoScaling) DescribeAdjustmentTypes(input *DescribeAdjustmentTypesInput) (*DescribeAdjustmentTypesOutput, error) {
  1521. req, out := c.DescribeAdjustmentTypesRequest(input)
  1522. return out, req.Send()
  1523. }
  1524. // DescribeAdjustmentTypesWithContext is the same as DescribeAdjustmentTypes with the addition of
  1525. // the ability to pass a context and additional request options.
  1526. //
  1527. // See DescribeAdjustmentTypes for details on how to use this API operation.
  1528. //
  1529. // The context must be non-nil and will be used for request cancellation. If
  1530. // the context is nil a panic will occur. In the future the SDK may create
  1531. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1532. // for more information on using Contexts.
  1533. func (c *AutoScaling) DescribeAdjustmentTypesWithContext(ctx aws.Context, input *DescribeAdjustmentTypesInput, opts ...request.Option) (*DescribeAdjustmentTypesOutput, error) {
  1534. req, out := c.DescribeAdjustmentTypesRequest(input)
  1535. req.SetContext(ctx)
  1536. req.ApplyOptions(opts...)
  1537. return out, req.Send()
  1538. }
  1539. const opDescribeAutoScalingGroups = "DescribeAutoScalingGroups"
  1540. // DescribeAutoScalingGroupsRequest generates a "aws/request.Request" representing the
  1541. // client's request for the DescribeAutoScalingGroups operation. The "output" return
  1542. // value will be populated with the request's response once the request completes
  1543. // successfully.
  1544. //
  1545. // Use "Send" method on the returned Request to send the API call to the service.
  1546. // the "output" return value is not valid until after Send returns without error.
  1547. //
  1548. // See DescribeAutoScalingGroups for more information on using the DescribeAutoScalingGroups
  1549. // API call, and error handling.
  1550. //
  1551. // This method is useful when you want to inject custom logic or configuration
  1552. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1553. //
  1554. //
  1555. // // Example sending a request using the DescribeAutoScalingGroupsRequest method.
  1556. // req, resp := client.DescribeAutoScalingGroupsRequest(params)
  1557. //
  1558. // err := req.Send()
  1559. // if err == nil { // resp is now filled
  1560. // fmt.Println(resp)
  1561. // }
  1562. //
  1563. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingGroups
  1564. func (c *AutoScaling) DescribeAutoScalingGroupsRequest(input *DescribeAutoScalingGroupsInput) (req *request.Request, output *DescribeAutoScalingGroupsOutput) {
  1565. op := &request.Operation{
  1566. Name: opDescribeAutoScalingGroups,
  1567. HTTPMethod: "POST",
  1568. HTTPPath: "/",
  1569. Paginator: &request.Paginator{
  1570. InputTokens: []string{"NextToken"},
  1571. OutputTokens: []string{"NextToken"},
  1572. LimitToken: "MaxRecords",
  1573. TruncationToken: "",
  1574. },
  1575. }
  1576. if input == nil {
  1577. input = &DescribeAutoScalingGroupsInput{}
  1578. }
  1579. output = &DescribeAutoScalingGroupsOutput{}
  1580. req = c.newRequest(op, input, output)
  1581. return
  1582. }
  1583. // DescribeAutoScalingGroups API operation for Auto Scaling.
  1584. //
  1585. // Describes one or more Auto Scaling groups.
  1586. //
  1587. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1588. // with awserr.Error's Code and Message methods to get detailed information about
  1589. // the error.
  1590. //
  1591. // See the AWS API reference guide for Auto Scaling's
  1592. // API operation DescribeAutoScalingGroups for usage and error information.
  1593. //
  1594. // Returned Error Codes:
  1595. // * ErrCodeInvalidNextToken "InvalidNextToken"
  1596. // The NextToken value is not valid.
  1597. //
  1598. // * ErrCodeResourceContentionFault "ResourceContention"
  1599. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  1600. // (for example, an Auto Scaling group, instance, or load balancer).
  1601. //
  1602. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingGroups
  1603. func (c *AutoScaling) DescribeAutoScalingGroups(input *DescribeAutoScalingGroupsInput) (*DescribeAutoScalingGroupsOutput, error) {
  1604. req, out := c.DescribeAutoScalingGroupsRequest(input)
  1605. return out, req.Send()
  1606. }
  1607. // DescribeAutoScalingGroupsWithContext is the same as DescribeAutoScalingGroups with the addition of
  1608. // the ability to pass a context and additional request options.
  1609. //
  1610. // See DescribeAutoScalingGroups for details on how to use this API operation.
  1611. //
  1612. // The context must be non-nil and will be used for request cancellation. If
  1613. // the context is nil a panic will occur. In the future the SDK may create
  1614. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1615. // for more information on using Contexts.
  1616. func (c *AutoScaling) DescribeAutoScalingGroupsWithContext(ctx aws.Context, input *DescribeAutoScalingGroupsInput, opts ...request.Option) (*DescribeAutoScalingGroupsOutput, error) {
  1617. req, out := c.DescribeAutoScalingGroupsRequest(input)
  1618. req.SetContext(ctx)
  1619. req.ApplyOptions(opts...)
  1620. return out, req.Send()
  1621. }
  1622. // DescribeAutoScalingGroupsPages iterates over the pages of a DescribeAutoScalingGroups operation,
  1623. // calling the "fn" function with the response data for each page. To stop
  1624. // iterating, return false from the fn function.
  1625. //
  1626. // See DescribeAutoScalingGroups method for more information on how to use this operation.
  1627. //
  1628. // Note: This operation can generate multiple requests to a service.
  1629. //
  1630. // // Example iterating over at most 3 pages of a DescribeAutoScalingGroups operation.
  1631. // pageNum := 0
  1632. // err := client.DescribeAutoScalingGroupsPages(params,
  1633. // func(page *autoscaling.DescribeAutoScalingGroupsOutput, lastPage bool) bool {
  1634. // pageNum++
  1635. // fmt.Println(page)
  1636. // return pageNum <= 3
  1637. // })
  1638. //
  1639. func (c *AutoScaling) DescribeAutoScalingGroupsPages(input *DescribeAutoScalingGroupsInput, fn func(*DescribeAutoScalingGroupsOutput, bool) bool) error {
  1640. return c.DescribeAutoScalingGroupsPagesWithContext(aws.BackgroundContext(), input, fn)
  1641. }
  1642. // DescribeAutoScalingGroupsPagesWithContext same as DescribeAutoScalingGroupsPages except
  1643. // it takes a Context and allows setting request options on the pages.
  1644. //
  1645. // The context must be non-nil and will be used for request cancellation. If
  1646. // the context is nil a panic will occur. In the future the SDK may create
  1647. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1648. // for more information on using Contexts.
  1649. func (c *AutoScaling) DescribeAutoScalingGroupsPagesWithContext(ctx aws.Context, input *DescribeAutoScalingGroupsInput, fn func(*DescribeAutoScalingGroupsOutput, bool) bool, opts ...request.Option) error {
  1650. p := request.Pagination{
  1651. NewRequest: func() (*request.Request, error) {
  1652. var inCpy *DescribeAutoScalingGroupsInput
  1653. if input != nil {
  1654. tmp := *input
  1655. inCpy = &tmp
  1656. }
  1657. req, _ := c.DescribeAutoScalingGroupsRequest(inCpy)
  1658. req.SetContext(ctx)
  1659. req.ApplyOptions(opts...)
  1660. return req, nil
  1661. },
  1662. }
  1663. for p.Next() {
  1664. if !fn(p.Page().(*DescribeAutoScalingGroupsOutput), !p.HasNextPage()) {
  1665. break
  1666. }
  1667. }
  1668. return p.Err()
  1669. }
  1670. const opDescribeAutoScalingInstances = "DescribeAutoScalingInstances"
  1671. // DescribeAutoScalingInstancesRequest generates a "aws/request.Request" representing the
  1672. // client's request for the DescribeAutoScalingInstances operation. The "output" return
  1673. // value will be populated with the request's response once the request completes
  1674. // successfully.
  1675. //
  1676. // Use "Send" method on the returned Request to send the API call to the service.
  1677. // the "output" return value is not valid until after Send returns without error.
  1678. //
  1679. // See DescribeAutoScalingInstances for more information on using the DescribeAutoScalingInstances
  1680. // API call, and error handling.
  1681. //
  1682. // This method is useful when you want to inject custom logic or configuration
  1683. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1684. //
  1685. //
  1686. // // Example sending a request using the DescribeAutoScalingInstancesRequest method.
  1687. // req, resp := client.DescribeAutoScalingInstancesRequest(params)
  1688. //
  1689. // err := req.Send()
  1690. // if err == nil { // resp is now filled
  1691. // fmt.Println(resp)
  1692. // }
  1693. //
  1694. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingInstances
  1695. func (c *AutoScaling) DescribeAutoScalingInstancesRequest(input *DescribeAutoScalingInstancesInput) (req *request.Request, output *DescribeAutoScalingInstancesOutput) {
  1696. op := &request.Operation{
  1697. Name: opDescribeAutoScalingInstances,
  1698. HTTPMethod: "POST",
  1699. HTTPPath: "/",
  1700. Paginator: &request.Paginator{
  1701. InputTokens: []string{"NextToken"},
  1702. OutputTokens: []string{"NextToken"},
  1703. LimitToken: "MaxRecords",
  1704. TruncationToken: "",
  1705. },
  1706. }
  1707. if input == nil {
  1708. input = &DescribeAutoScalingInstancesInput{}
  1709. }
  1710. output = &DescribeAutoScalingInstancesOutput{}
  1711. req = c.newRequest(op, input, output)
  1712. return
  1713. }
  1714. // DescribeAutoScalingInstances API operation for Auto Scaling.
  1715. //
  1716. // Describes one or more Auto Scaling instances.
  1717. //
  1718. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1719. // with awserr.Error's Code and Message methods to get detailed information about
  1720. // the error.
  1721. //
  1722. // See the AWS API reference guide for Auto Scaling's
  1723. // API operation DescribeAutoScalingInstances for usage and error information.
  1724. //
  1725. // Returned Error Codes:
  1726. // * ErrCodeInvalidNextToken "InvalidNextToken"
  1727. // The NextToken value is not valid.
  1728. //
  1729. // * ErrCodeResourceContentionFault "ResourceContention"
  1730. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  1731. // (for example, an Auto Scaling group, instance, or load balancer).
  1732. //
  1733. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingInstances
  1734. func (c *AutoScaling) DescribeAutoScalingInstances(input *DescribeAutoScalingInstancesInput) (*DescribeAutoScalingInstancesOutput, error) {
  1735. req, out := c.DescribeAutoScalingInstancesRequest(input)
  1736. return out, req.Send()
  1737. }
  1738. // DescribeAutoScalingInstancesWithContext is the same as DescribeAutoScalingInstances with the addition of
  1739. // the ability to pass a context and additional request options.
  1740. //
  1741. // See DescribeAutoScalingInstances for details on how to use this API operation.
  1742. //
  1743. // The context must be non-nil and will be used for request cancellation. If
  1744. // the context is nil a panic will occur. In the future the SDK may create
  1745. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1746. // for more information on using Contexts.
  1747. func (c *AutoScaling) DescribeAutoScalingInstancesWithContext(ctx aws.Context, input *DescribeAutoScalingInstancesInput, opts ...request.Option) (*DescribeAutoScalingInstancesOutput, error) {
  1748. req, out := c.DescribeAutoScalingInstancesRequest(input)
  1749. req.SetContext(ctx)
  1750. req.ApplyOptions(opts...)
  1751. return out, req.Send()
  1752. }
  1753. // DescribeAutoScalingInstancesPages iterates over the pages of a DescribeAutoScalingInstances operation,
  1754. // calling the "fn" function with the response data for each page. To stop
  1755. // iterating, return false from the fn function.
  1756. //
  1757. // See DescribeAutoScalingInstances method for more information on how to use this operation.
  1758. //
  1759. // Note: This operation can generate multiple requests to a service.
  1760. //
  1761. // // Example iterating over at most 3 pages of a DescribeAutoScalingInstances operation.
  1762. // pageNum := 0
  1763. // err := client.DescribeAutoScalingInstancesPages(params,
  1764. // func(page *autoscaling.DescribeAutoScalingInstancesOutput, lastPage bool) bool {
  1765. // pageNum++
  1766. // fmt.Println(page)
  1767. // return pageNum <= 3
  1768. // })
  1769. //
  1770. func (c *AutoScaling) DescribeAutoScalingInstancesPages(input *DescribeAutoScalingInstancesInput, fn func(*DescribeAutoScalingInstancesOutput, bool) bool) error {
  1771. return c.DescribeAutoScalingInstancesPagesWithContext(aws.BackgroundContext(), input, fn)
  1772. }
  1773. // DescribeAutoScalingInstancesPagesWithContext same as DescribeAutoScalingInstancesPages except
  1774. // it takes a Context and allows setting request options on the pages.
  1775. //
  1776. // The context must be non-nil and will be used for request cancellation. If
  1777. // the context is nil a panic will occur. In the future the SDK may create
  1778. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1779. // for more information on using Contexts.
  1780. func (c *AutoScaling) DescribeAutoScalingInstancesPagesWithContext(ctx aws.Context, input *DescribeAutoScalingInstancesInput, fn func(*DescribeAutoScalingInstancesOutput, bool) bool, opts ...request.Option) error {
  1781. p := request.Pagination{
  1782. NewRequest: func() (*request.Request, error) {
  1783. var inCpy *DescribeAutoScalingInstancesInput
  1784. if input != nil {
  1785. tmp := *input
  1786. inCpy = &tmp
  1787. }
  1788. req, _ := c.DescribeAutoScalingInstancesRequest(inCpy)
  1789. req.SetContext(ctx)
  1790. req.ApplyOptions(opts...)
  1791. return req, nil
  1792. },
  1793. }
  1794. for p.Next() {
  1795. if !fn(p.Page().(*DescribeAutoScalingInstancesOutput), !p.HasNextPage()) {
  1796. break
  1797. }
  1798. }
  1799. return p.Err()
  1800. }
  1801. const opDescribeAutoScalingNotificationTypes = "DescribeAutoScalingNotificationTypes"
  1802. // DescribeAutoScalingNotificationTypesRequest generates a "aws/request.Request" representing the
  1803. // client's request for the DescribeAutoScalingNotificationTypes operation. The "output" return
  1804. // value will be populated with the request's response once the request completes
  1805. // successfully.
  1806. //
  1807. // Use "Send" method on the returned Request to send the API call to the service.
  1808. // the "output" return value is not valid until after Send returns without error.
  1809. //
  1810. // See DescribeAutoScalingNotificationTypes for more information on using the DescribeAutoScalingNotificationTypes
  1811. // API call, and error handling.
  1812. //
  1813. // This method is useful when you want to inject custom logic or configuration
  1814. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1815. //
  1816. //
  1817. // // Example sending a request using the DescribeAutoScalingNotificationTypesRequest method.
  1818. // req, resp := client.DescribeAutoScalingNotificationTypesRequest(params)
  1819. //
  1820. // err := req.Send()
  1821. // if err == nil { // resp is now filled
  1822. // fmt.Println(resp)
  1823. // }
  1824. //
  1825. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingNotificationTypes
  1826. func (c *AutoScaling) DescribeAutoScalingNotificationTypesRequest(input *DescribeAutoScalingNotificationTypesInput) (req *request.Request, output *DescribeAutoScalingNotificationTypesOutput) {
  1827. op := &request.Operation{
  1828. Name: opDescribeAutoScalingNotificationTypes,
  1829. HTTPMethod: "POST",
  1830. HTTPPath: "/",
  1831. }
  1832. if input == nil {
  1833. input = &DescribeAutoScalingNotificationTypesInput{}
  1834. }
  1835. output = &DescribeAutoScalingNotificationTypesOutput{}
  1836. req = c.newRequest(op, input, output)
  1837. return
  1838. }
  1839. // DescribeAutoScalingNotificationTypes API operation for Auto Scaling.
  1840. //
  1841. // Describes the notification types that are supported by Amazon EC2 Auto Scaling.
  1842. //
  1843. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1844. // with awserr.Error's Code and Message methods to get detailed information about
  1845. // the error.
  1846. //
  1847. // See the AWS API reference guide for Auto Scaling's
  1848. // API operation DescribeAutoScalingNotificationTypes for usage and error information.
  1849. //
  1850. // Returned Error Codes:
  1851. // * ErrCodeResourceContentionFault "ResourceContention"
  1852. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  1853. // (for example, an Auto Scaling group, instance, or load balancer).
  1854. //
  1855. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingNotificationTypes
  1856. func (c *AutoScaling) DescribeAutoScalingNotificationTypes(input *DescribeAutoScalingNotificationTypesInput) (*DescribeAutoScalingNotificationTypesOutput, error) {
  1857. req, out := c.DescribeAutoScalingNotificationTypesRequest(input)
  1858. return out, req.Send()
  1859. }
  1860. // DescribeAutoScalingNotificationTypesWithContext is the same as DescribeAutoScalingNotificationTypes with the addition of
  1861. // the ability to pass a context and additional request options.
  1862. //
  1863. // See DescribeAutoScalingNotificationTypes for details on how to use this API operation.
  1864. //
  1865. // The context must be non-nil and will be used for request cancellation. If
  1866. // the context is nil a panic will occur. In the future the SDK may create
  1867. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1868. // for more information on using Contexts.
  1869. func (c *AutoScaling) DescribeAutoScalingNotificationTypesWithContext(ctx aws.Context, input *DescribeAutoScalingNotificationTypesInput, opts ...request.Option) (*DescribeAutoScalingNotificationTypesOutput, error) {
  1870. req, out := c.DescribeAutoScalingNotificationTypesRequest(input)
  1871. req.SetContext(ctx)
  1872. req.ApplyOptions(opts...)
  1873. return out, req.Send()
  1874. }
  1875. const opDescribeLaunchConfigurations = "DescribeLaunchConfigurations"
  1876. // DescribeLaunchConfigurationsRequest generates a "aws/request.Request" representing the
  1877. // client's request for the DescribeLaunchConfigurations operation. The "output" return
  1878. // value will be populated with the request's response once the request completes
  1879. // successfully.
  1880. //
  1881. // Use "Send" method on the returned Request to send the API call to the service.
  1882. // the "output" return value is not valid until after Send returns without error.
  1883. //
  1884. // See DescribeLaunchConfigurations for more information on using the DescribeLaunchConfigurations
  1885. // API call, and error handling.
  1886. //
  1887. // This method is useful when you want to inject custom logic or configuration
  1888. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1889. //
  1890. //
  1891. // // Example sending a request using the DescribeLaunchConfigurationsRequest method.
  1892. // req, resp := client.DescribeLaunchConfigurationsRequest(params)
  1893. //
  1894. // err := req.Send()
  1895. // if err == nil { // resp is now filled
  1896. // fmt.Println(resp)
  1897. // }
  1898. //
  1899. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLaunchConfigurations
  1900. func (c *AutoScaling) DescribeLaunchConfigurationsRequest(input *DescribeLaunchConfigurationsInput) (req *request.Request, output *DescribeLaunchConfigurationsOutput) {
  1901. op := &request.Operation{
  1902. Name: opDescribeLaunchConfigurations,
  1903. HTTPMethod: "POST",
  1904. HTTPPath: "/",
  1905. Paginator: &request.Paginator{
  1906. InputTokens: []string{"NextToken"},
  1907. OutputTokens: []string{"NextToken"},
  1908. LimitToken: "MaxRecords",
  1909. TruncationToken: "",
  1910. },
  1911. }
  1912. if input == nil {
  1913. input = &DescribeLaunchConfigurationsInput{}
  1914. }
  1915. output = &DescribeLaunchConfigurationsOutput{}
  1916. req = c.newRequest(op, input, output)
  1917. return
  1918. }
  1919. // DescribeLaunchConfigurations API operation for Auto Scaling.
  1920. //
  1921. // Describes one or more launch configurations.
  1922. //
  1923. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1924. // with awserr.Error's Code and Message methods to get detailed information about
  1925. // the error.
  1926. //
  1927. // See the AWS API reference guide for Auto Scaling's
  1928. // API operation DescribeLaunchConfigurations for usage and error information.
  1929. //
  1930. // Returned Error Codes:
  1931. // * ErrCodeInvalidNextToken "InvalidNextToken"
  1932. // The NextToken value is not valid.
  1933. //
  1934. // * ErrCodeResourceContentionFault "ResourceContention"
  1935. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  1936. // (for example, an Auto Scaling group, instance, or load balancer).
  1937. //
  1938. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLaunchConfigurations
  1939. func (c *AutoScaling) DescribeLaunchConfigurations(input *DescribeLaunchConfigurationsInput) (*DescribeLaunchConfigurationsOutput, error) {
  1940. req, out := c.DescribeLaunchConfigurationsRequest(input)
  1941. return out, req.Send()
  1942. }
  1943. // DescribeLaunchConfigurationsWithContext is the same as DescribeLaunchConfigurations with the addition of
  1944. // the ability to pass a context and additional request options.
  1945. //
  1946. // See DescribeLaunchConfigurations for details on how to use this API operation.
  1947. //
  1948. // The context must be non-nil and will be used for request cancellation. If
  1949. // the context is nil a panic will occur. In the future the SDK may create
  1950. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1951. // for more information on using Contexts.
  1952. func (c *AutoScaling) DescribeLaunchConfigurationsWithContext(ctx aws.Context, input *DescribeLaunchConfigurationsInput, opts ...request.Option) (*DescribeLaunchConfigurationsOutput, error) {
  1953. req, out := c.DescribeLaunchConfigurationsRequest(input)
  1954. req.SetContext(ctx)
  1955. req.ApplyOptions(opts...)
  1956. return out, req.Send()
  1957. }
  1958. // DescribeLaunchConfigurationsPages iterates over the pages of a DescribeLaunchConfigurations operation,
  1959. // calling the "fn" function with the response data for each page. To stop
  1960. // iterating, return false from the fn function.
  1961. //
  1962. // See DescribeLaunchConfigurations method for more information on how to use this operation.
  1963. //
  1964. // Note: This operation can generate multiple requests to a service.
  1965. //
  1966. // // Example iterating over at most 3 pages of a DescribeLaunchConfigurations operation.
  1967. // pageNum := 0
  1968. // err := client.DescribeLaunchConfigurationsPages(params,
  1969. // func(page *autoscaling.DescribeLaunchConfigurationsOutput, lastPage bool) bool {
  1970. // pageNum++
  1971. // fmt.Println(page)
  1972. // return pageNum <= 3
  1973. // })
  1974. //
  1975. func (c *AutoScaling) DescribeLaunchConfigurationsPages(input *DescribeLaunchConfigurationsInput, fn func(*DescribeLaunchConfigurationsOutput, bool) bool) error {
  1976. return c.DescribeLaunchConfigurationsPagesWithContext(aws.BackgroundContext(), input, fn)
  1977. }
  1978. // DescribeLaunchConfigurationsPagesWithContext same as DescribeLaunchConfigurationsPages except
  1979. // it takes a Context and allows setting request options on the pages.
  1980. //
  1981. // The context must be non-nil and will be used for request cancellation. If
  1982. // the context is nil a panic will occur. In the future the SDK may create
  1983. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1984. // for more information on using Contexts.
  1985. func (c *AutoScaling) DescribeLaunchConfigurationsPagesWithContext(ctx aws.Context, input *DescribeLaunchConfigurationsInput, fn func(*DescribeLaunchConfigurationsOutput, bool) bool, opts ...request.Option) error {
  1986. p := request.Pagination{
  1987. NewRequest: func() (*request.Request, error) {
  1988. var inCpy *DescribeLaunchConfigurationsInput
  1989. if input != nil {
  1990. tmp := *input
  1991. inCpy = &tmp
  1992. }
  1993. req, _ := c.DescribeLaunchConfigurationsRequest(inCpy)
  1994. req.SetContext(ctx)
  1995. req.ApplyOptions(opts...)
  1996. return req, nil
  1997. },
  1998. }
  1999. for p.Next() {
  2000. if !fn(p.Page().(*DescribeLaunchConfigurationsOutput), !p.HasNextPage()) {
  2001. break
  2002. }
  2003. }
  2004. return p.Err()
  2005. }
  2006. const opDescribeLifecycleHookTypes = "DescribeLifecycleHookTypes"
  2007. // DescribeLifecycleHookTypesRequest generates a "aws/request.Request" representing the
  2008. // client's request for the DescribeLifecycleHookTypes operation. The "output" return
  2009. // value will be populated with the request's response once the request completes
  2010. // successfully.
  2011. //
  2012. // Use "Send" method on the returned Request to send the API call to the service.
  2013. // the "output" return value is not valid until after Send returns without error.
  2014. //
  2015. // See DescribeLifecycleHookTypes for more information on using the DescribeLifecycleHookTypes
  2016. // API call, and error handling.
  2017. //
  2018. // This method is useful when you want to inject custom logic or configuration
  2019. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2020. //
  2021. //
  2022. // // Example sending a request using the DescribeLifecycleHookTypesRequest method.
  2023. // req, resp := client.DescribeLifecycleHookTypesRequest(params)
  2024. //
  2025. // err := req.Send()
  2026. // if err == nil { // resp is now filled
  2027. // fmt.Println(resp)
  2028. // }
  2029. //
  2030. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHookTypes
  2031. func (c *AutoScaling) DescribeLifecycleHookTypesRequest(input *DescribeLifecycleHookTypesInput) (req *request.Request, output *DescribeLifecycleHookTypesOutput) {
  2032. op := &request.Operation{
  2033. Name: opDescribeLifecycleHookTypes,
  2034. HTTPMethod: "POST",
  2035. HTTPPath: "/",
  2036. }
  2037. if input == nil {
  2038. input = &DescribeLifecycleHookTypesInput{}
  2039. }
  2040. output = &DescribeLifecycleHookTypesOutput{}
  2041. req = c.newRequest(op, input, output)
  2042. return
  2043. }
  2044. // DescribeLifecycleHookTypes API operation for Auto Scaling.
  2045. //
  2046. // Describes the available types of lifecycle hooks.
  2047. //
  2048. // The following hook types are supported:
  2049. //
  2050. // * autoscaling:EC2_INSTANCE_LAUNCHING
  2051. //
  2052. // * autoscaling:EC2_INSTANCE_TERMINATING
  2053. //
  2054. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2055. // with awserr.Error's Code and Message methods to get detailed information about
  2056. // the error.
  2057. //
  2058. // See the AWS API reference guide for Auto Scaling's
  2059. // API operation DescribeLifecycleHookTypes for usage and error information.
  2060. //
  2061. // Returned Error Codes:
  2062. // * ErrCodeResourceContentionFault "ResourceContention"
  2063. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  2064. // (for example, an Auto Scaling group, instance, or load balancer).
  2065. //
  2066. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHookTypes
  2067. func (c *AutoScaling) DescribeLifecycleHookTypes(input *DescribeLifecycleHookTypesInput) (*DescribeLifecycleHookTypesOutput, error) {
  2068. req, out := c.DescribeLifecycleHookTypesRequest(input)
  2069. return out, req.Send()
  2070. }
  2071. // DescribeLifecycleHookTypesWithContext is the same as DescribeLifecycleHookTypes with the addition of
  2072. // the ability to pass a context and additional request options.
  2073. //
  2074. // See DescribeLifecycleHookTypes for details on how to use this API operation.
  2075. //
  2076. // The context must be non-nil and will be used for request cancellation. If
  2077. // the context is nil a panic will occur. In the future the SDK may create
  2078. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2079. // for more information on using Contexts.
  2080. func (c *AutoScaling) DescribeLifecycleHookTypesWithContext(ctx aws.Context, input *DescribeLifecycleHookTypesInput, opts ...request.Option) (*DescribeLifecycleHookTypesOutput, error) {
  2081. req, out := c.DescribeLifecycleHookTypesRequest(input)
  2082. req.SetContext(ctx)
  2083. req.ApplyOptions(opts...)
  2084. return out, req.Send()
  2085. }
  2086. const opDescribeLifecycleHooks = "DescribeLifecycleHooks"
  2087. // DescribeLifecycleHooksRequest generates a "aws/request.Request" representing the
  2088. // client's request for the DescribeLifecycleHooks operation. The "output" return
  2089. // value will be populated with the request's response once the request completes
  2090. // successfully.
  2091. //
  2092. // Use "Send" method on the returned Request to send the API call to the service.
  2093. // the "output" return value is not valid until after Send returns without error.
  2094. //
  2095. // See DescribeLifecycleHooks for more information on using the DescribeLifecycleHooks
  2096. // API call, and error handling.
  2097. //
  2098. // This method is useful when you want to inject custom logic or configuration
  2099. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2100. //
  2101. //
  2102. // // Example sending a request using the DescribeLifecycleHooksRequest method.
  2103. // req, resp := client.DescribeLifecycleHooksRequest(params)
  2104. //
  2105. // err := req.Send()
  2106. // if err == nil { // resp is now filled
  2107. // fmt.Println(resp)
  2108. // }
  2109. //
  2110. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHooks
  2111. func (c *AutoScaling) DescribeLifecycleHooksRequest(input *DescribeLifecycleHooksInput) (req *request.Request, output *DescribeLifecycleHooksOutput) {
  2112. op := &request.Operation{
  2113. Name: opDescribeLifecycleHooks,
  2114. HTTPMethod: "POST",
  2115. HTTPPath: "/",
  2116. }
  2117. if input == nil {
  2118. input = &DescribeLifecycleHooksInput{}
  2119. }
  2120. output = &DescribeLifecycleHooksOutput{}
  2121. req = c.newRequest(op, input, output)
  2122. return
  2123. }
  2124. // DescribeLifecycleHooks API operation for Auto Scaling.
  2125. //
  2126. // Describes the lifecycle hooks for the specified Auto Scaling group.
  2127. //
  2128. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2129. // with awserr.Error's Code and Message methods to get detailed information about
  2130. // the error.
  2131. //
  2132. // See the AWS API reference guide for Auto Scaling's
  2133. // API operation DescribeLifecycleHooks for usage and error information.
  2134. //
  2135. // Returned Error Codes:
  2136. // * ErrCodeResourceContentionFault "ResourceContention"
  2137. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  2138. // (for example, an Auto Scaling group, instance, or load balancer).
  2139. //
  2140. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLifecycleHooks
  2141. func (c *AutoScaling) DescribeLifecycleHooks(input *DescribeLifecycleHooksInput) (*DescribeLifecycleHooksOutput, error) {
  2142. req, out := c.DescribeLifecycleHooksRequest(input)
  2143. return out, req.Send()
  2144. }
  2145. // DescribeLifecycleHooksWithContext is the same as DescribeLifecycleHooks with the addition of
  2146. // the ability to pass a context and additional request options.
  2147. //
  2148. // See DescribeLifecycleHooks for details on how to use this API operation.
  2149. //
  2150. // The context must be non-nil and will be used for request cancellation. If
  2151. // the context is nil a panic will occur. In the future the SDK may create
  2152. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2153. // for more information on using Contexts.
  2154. func (c *AutoScaling) DescribeLifecycleHooksWithContext(ctx aws.Context, input *DescribeLifecycleHooksInput, opts ...request.Option) (*DescribeLifecycleHooksOutput, error) {
  2155. req, out := c.DescribeLifecycleHooksRequest(input)
  2156. req.SetContext(ctx)
  2157. req.ApplyOptions(opts...)
  2158. return out, req.Send()
  2159. }
  2160. const opDescribeLoadBalancerTargetGroups = "DescribeLoadBalancerTargetGroups"
  2161. // DescribeLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the
  2162. // client's request for the DescribeLoadBalancerTargetGroups operation. The "output" return
  2163. // value will be populated with the request's response once the request completes
  2164. // successfully.
  2165. //
  2166. // Use "Send" method on the returned Request to send the API call to the service.
  2167. // the "output" return value is not valid until after Send returns without error.
  2168. //
  2169. // See DescribeLoadBalancerTargetGroups for more information on using the DescribeLoadBalancerTargetGroups
  2170. // API call, and error handling.
  2171. //
  2172. // This method is useful when you want to inject custom logic or configuration
  2173. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2174. //
  2175. //
  2176. // // Example sending a request using the DescribeLoadBalancerTargetGroupsRequest method.
  2177. // req, resp := client.DescribeLoadBalancerTargetGroupsRequest(params)
  2178. //
  2179. // err := req.Send()
  2180. // if err == nil { // resp is now filled
  2181. // fmt.Println(resp)
  2182. // }
  2183. //
  2184. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancerTargetGroups
  2185. func (c *AutoScaling) DescribeLoadBalancerTargetGroupsRequest(input *DescribeLoadBalancerTargetGroupsInput) (req *request.Request, output *DescribeLoadBalancerTargetGroupsOutput) {
  2186. op := &request.Operation{
  2187. Name: opDescribeLoadBalancerTargetGroups,
  2188. HTTPMethod: "POST",
  2189. HTTPPath: "/",
  2190. }
  2191. if input == nil {
  2192. input = &DescribeLoadBalancerTargetGroupsInput{}
  2193. }
  2194. output = &DescribeLoadBalancerTargetGroupsOutput{}
  2195. req = c.newRequest(op, input, output)
  2196. return
  2197. }
  2198. // DescribeLoadBalancerTargetGroups API operation for Auto Scaling.
  2199. //
  2200. // Describes the target groups for the specified Auto Scaling group.
  2201. //
  2202. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2203. // with awserr.Error's Code and Message methods to get detailed information about
  2204. // the error.
  2205. //
  2206. // See the AWS API reference guide for Auto Scaling's
  2207. // API operation DescribeLoadBalancerTargetGroups for usage and error information.
  2208. //
  2209. // Returned Error Codes:
  2210. // * ErrCodeResourceContentionFault "ResourceContention"
  2211. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  2212. // (for example, an Auto Scaling group, instance, or load balancer).
  2213. //
  2214. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancerTargetGroups
  2215. func (c *AutoScaling) DescribeLoadBalancerTargetGroups(input *DescribeLoadBalancerTargetGroupsInput) (*DescribeLoadBalancerTargetGroupsOutput, error) {
  2216. req, out := c.DescribeLoadBalancerTargetGroupsRequest(input)
  2217. return out, req.Send()
  2218. }
  2219. // DescribeLoadBalancerTargetGroupsWithContext is the same as DescribeLoadBalancerTargetGroups with the addition of
  2220. // the ability to pass a context and additional request options.
  2221. //
  2222. // See DescribeLoadBalancerTargetGroups for details on how to use this API operation.
  2223. //
  2224. // The context must be non-nil and will be used for request cancellation. If
  2225. // the context is nil a panic will occur. In the future the SDK may create
  2226. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2227. // for more information on using Contexts.
  2228. func (c *AutoScaling) DescribeLoadBalancerTargetGroupsWithContext(ctx aws.Context, input *DescribeLoadBalancerTargetGroupsInput, opts ...request.Option) (*DescribeLoadBalancerTargetGroupsOutput, error) {
  2229. req, out := c.DescribeLoadBalancerTargetGroupsRequest(input)
  2230. req.SetContext(ctx)
  2231. req.ApplyOptions(opts...)
  2232. return out, req.Send()
  2233. }
  2234. const opDescribeLoadBalancers = "DescribeLoadBalancers"
  2235. // DescribeLoadBalancersRequest generates a "aws/request.Request" representing the
  2236. // client's request for the DescribeLoadBalancers operation. The "output" return
  2237. // value will be populated with the request's response once the request completes
  2238. // successfully.
  2239. //
  2240. // Use "Send" method on the returned Request to send the API call to the service.
  2241. // the "output" return value is not valid until after Send returns without error.
  2242. //
  2243. // See DescribeLoadBalancers for more information on using the DescribeLoadBalancers
  2244. // API call, and error handling.
  2245. //
  2246. // This method is useful when you want to inject custom logic or configuration
  2247. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2248. //
  2249. //
  2250. // // Example sending a request using the DescribeLoadBalancersRequest method.
  2251. // req, resp := client.DescribeLoadBalancersRequest(params)
  2252. //
  2253. // err := req.Send()
  2254. // if err == nil { // resp is now filled
  2255. // fmt.Println(resp)
  2256. // }
  2257. //
  2258. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancers
  2259. func (c *AutoScaling) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) (req *request.Request, output *DescribeLoadBalancersOutput) {
  2260. op := &request.Operation{
  2261. Name: opDescribeLoadBalancers,
  2262. HTTPMethod: "POST",
  2263. HTTPPath: "/",
  2264. }
  2265. if input == nil {
  2266. input = &DescribeLoadBalancersInput{}
  2267. }
  2268. output = &DescribeLoadBalancersOutput{}
  2269. req = c.newRequest(op, input, output)
  2270. return
  2271. }
  2272. // DescribeLoadBalancers API operation for Auto Scaling.
  2273. //
  2274. // Describes the load balancers for the specified Auto Scaling group.
  2275. //
  2276. // This operation describes only Classic Load Balancers. If you have Application
  2277. // Load Balancers or Network Load Balancers, use DescribeLoadBalancerTargetGroups
  2278. // instead.
  2279. //
  2280. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2281. // with awserr.Error's Code and Message methods to get detailed information about
  2282. // the error.
  2283. //
  2284. // See the AWS API reference guide for Auto Scaling's
  2285. // API operation DescribeLoadBalancers for usage and error information.
  2286. //
  2287. // Returned Error Codes:
  2288. // * ErrCodeResourceContentionFault "ResourceContention"
  2289. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  2290. // (for example, an Auto Scaling group, instance, or load balancer).
  2291. //
  2292. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeLoadBalancers
  2293. func (c *AutoScaling) DescribeLoadBalancers(input *DescribeLoadBalancersInput) (*DescribeLoadBalancersOutput, error) {
  2294. req, out := c.DescribeLoadBalancersRequest(input)
  2295. return out, req.Send()
  2296. }
  2297. // DescribeLoadBalancersWithContext is the same as DescribeLoadBalancers with the addition of
  2298. // the ability to pass a context and additional request options.
  2299. //
  2300. // See DescribeLoadBalancers for details on how to use this API operation.
  2301. //
  2302. // The context must be non-nil and will be used for request cancellation. If
  2303. // the context is nil a panic will occur. In the future the SDK may create
  2304. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2305. // for more information on using Contexts.
  2306. func (c *AutoScaling) DescribeLoadBalancersWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, opts ...request.Option) (*DescribeLoadBalancersOutput, error) {
  2307. req, out := c.DescribeLoadBalancersRequest(input)
  2308. req.SetContext(ctx)
  2309. req.ApplyOptions(opts...)
  2310. return out, req.Send()
  2311. }
  2312. const opDescribeMetricCollectionTypes = "DescribeMetricCollectionTypes"
  2313. // DescribeMetricCollectionTypesRequest generates a "aws/request.Request" representing the
  2314. // client's request for the DescribeMetricCollectionTypes operation. The "output" return
  2315. // value will be populated with the request's response once the request completes
  2316. // successfully.
  2317. //
  2318. // Use "Send" method on the returned Request to send the API call to the service.
  2319. // the "output" return value is not valid until after Send returns without error.
  2320. //
  2321. // See DescribeMetricCollectionTypes for more information on using the DescribeMetricCollectionTypes
  2322. // API call, and error handling.
  2323. //
  2324. // This method is useful when you want to inject custom logic or configuration
  2325. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2326. //
  2327. //
  2328. // // Example sending a request using the DescribeMetricCollectionTypesRequest method.
  2329. // req, resp := client.DescribeMetricCollectionTypesRequest(params)
  2330. //
  2331. // err := req.Send()
  2332. // if err == nil { // resp is now filled
  2333. // fmt.Println(resp)
  2334. // }
  2335. //
  2336. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeMetricCollectionTypes
  2337. func (c *AutoScaling) DescribeMetricCollectionTypesRequest(input *DescribeMetricCollectionTypesInput) (req *request.Request, output *DescribeMetricCollectionTypesOutput) {
  2338. op := &request.Operation{
  2339. Name: opDescribeMetricCollectionTypes,
  2340. HTTPMethod: "POST",
  2341. HTTPPath: "/",
  2342. }
  2343. if input == nil {
  2344. input = &DescribeMetricCollectionTypesInput{}
  2345. }
  2346. output = &DescribeMetricCollectionTypesOutput{}
  2347. req = c.newRequest(op, input, output)
  2348. return
  2349. }
  2350. // DescribeMetricCollectionTypes API operation for Auto Scaling.
  2351. //
  2352. // Describes the available CloudWatch metrics for Amazon EC2 Auto Scaling.
  2353. //
  2354. // The GroupStandbyInstances metric is not returned by default. You must explicitly
  2355. // request this metric when calling EnableMetricsCollection.
  2356. //
  2357. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2358. // with awserr.Error's Code and Message methods to get detailed information about
  2359. // the error.
  2360. //
  2361. // See the AWS API reference guide for Auto Scaling's
  2362. // API operation DescribeMetricCollectionTypes for usage and error information.
  2363. //
  2364. // Returned Error Codes:
  2365. // * ErrCodeResourceContentionFault "ResourceContention"
  2366. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  2367. // (for example, an Auto Scaling group, instance, or load balancer).
  2368. //
  2369. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeMetricCollectionTypes
  2370. func (c *AutoScaling) DescribeMetricCollectionTypes(input *DescribeMetricCollectionTypesInput) (*DescribeMetricCollectionTypesOutput, error) {
  2371. req, out := c.DescribeMetricCollectionTypesRequest(input)
  2372. return out, req.Send()
  2373. }
  2374. // DescribeMetricCollectionTypesWithContext is the same as DescribeMetricCollectionTypes with the addition of
  2375. // the ability to pass a context and additional request options.
  2376. //
  2377. // See DescribeMetricCollectionTypes for details on how to use this API operation.
  2378. //
  2379. // The context must be non-nil and will be used for request cancellation. If
  2380. // the context is nil a panic will occur. In the future the SDK may create
  2381. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2382. // for more information on using Contexts.
  2383. func (c *AutoScaling) DescribeMetricCollectionTypesWithContext(ctx aws.Context, input *DescribeMetricCollectionTypesInput, opts ...request.Option) (*DescribeMetricCollectionTypesOutput, error) {
  2384. req, out := c.DescribeMetricCollectionTypesRequest(input)
  2385. req.SetContext(ctx)
  2386. req.ApplyOptions(opts...)
  2387. return out, req.Send()
  2388. }
  2389. const opDescribeNotificationConfigurations = "DescribeNotificationConfigurations"
  2390. // DescribeNotificationConfigurationsRequest generates a "aws/request.Request" representing the
  2391. // client's request for the DescribeNotificationConfigurations operation. The "output" return
  2392. // value will be populated with the request's response once the request completes
  2393. // successfully.
  2394. //
  2395. // Use "Send" method on the returned Request to send the API call to the service.
  2396. // the "output" return value is not valid until after Send returns without error.
  2397. //
  2398. // See DescribeNotificationConfigurations for more information on using the DescribeNotificationConfigurations
  2399. // API call, and error handling.
  2400. //
  2401. // This method is useful when you want to inject custom logic or configuration
  2402. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2403. //
  2404. //
  2405. // // Example sending a request using the DescribeNotificationConfigurationsRequest method.
  2406. // req, resp := client.DescribeNotificationConfigurationsRequest(params)
  2407. //
  2408. // err := req.Send()
  2409. // if err == nil { // resp is now filled
  2410. // fmt.Println(resp)
  2411. // }
  2412. //
  2413. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeNotificationConfigurations
  2414. func (c *AutoScaling) DescribeNotificationConfigurationsRequest(input *DescribeNotificationConfigurationsInput) (req *request.Request, output *DescribeNotificationConfigurationsOutput) {
  2415. op := &request.Operation{
  2416. Name: opDescribeNotificationConfigurations,
  2417. HTTPMethod: "POST",
  2418. HTTPPath: "/",
  2419. Paginator: &request.Paginator{
  2420. InputTokens: []string{"NextToken"},
  2421. OutputTokens: []string{"NextToken"},
  2422. LimitToken: "MaxRecords",
  2423. TruncationToken: "",
  2424. },
  2425. }
  2426. if input == nil {
  2427. input = &DescribeNotificationConfigurationsInput{}
  2428. }
  2429. output = &DescribeNotificationConfigurationsOutput{}
  2430. req = c.newRequest(op, input, output)
  2431. return
  2432. }
  2433. // DescribeNotificationConfigurations API operation for Auto Scaling.
  2434. //
  2435. // Describes the notification actions associated with the specified Auto Scaling
  2436. // group.
  2437. //
  2438. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2439. // with awserr.Error's Code and Message methods to get detailed information about
  2440. // the error.
  2441. //
  2442. // See the AWS API reference guide for Auto Scaling's
  2443. // API operation DescribeNotificationConfigurations for usage and error information.
  2444. //
  2445. // Returned Error Codes:
  2446. // * ErrCodeInvalidNextToken "InvalidNextToken"
  2447. // The NextToken value is not valid.
  2448. //
  2449. // * ErrCodeResourceContentionFault "ResourceContention"
  2450. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  2451. // (for example, an Auto Scaling group, instance, or load balancer).
  2452. //
  2453. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeNotificationConfigurations
  2454. func (c *AutoScaling) DescribeNotificationConfigurations(input *DescribeNotificationConfigurationsInput) (*DescribeNotificationConfigurationsOutput, error) {
  2455. req, out := c.DescribeNotificationConfigurationsRequest(input)
  2456. return out, req.Send()
  2457. }
  2458. // DescribeNotificationConfigurationsWithContext is the same as DescribeNotificationConfigurations with the addition of
  2459. // the ability to pass a context and additional request options.
  2460. //
  2461. // See DescribeNotificationConfigurations for details on how to use this API operation.
  2462. //
  2463. // The context must be non-nil and will be used for request cancellation. If
  2464. // the context is nil a panic will occur. In the future the SDK may create
  2465. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2466. // for more information on using Contexts.
  2467. func (c *AutoScaling) DescribeNotificationConfigurationsWithContext(ctx aws.Context, input *DescribeNotificationConfigurationsInput, opts ...request.Option) (*DescribeNotificationConfigurationsOutput, error) {
  2468. req, out := c.DescribeNotificationConfigurationsRequest(input)
  2469. req.SetContext(ctx)
  2470. req.ApplyOptions(opts...)
  2471. return out, req.Send()
  2472. }
  2473. // DescribeNotificationConfigurationsPages iterates over the pages of a DescribeNotificationConfigurations operation,
  2474. // calling the "fn" function with the response data for each page. To stop
  2475. // iterating, return false from the fn function.
  2476. //
  2477. // See DescribeNotificationConfigurations method for more information on how to use this operation.
  2478. //
  2479. // Note: This operation can generate multiple requests to a service.
  2480. //
  2481. // // Example iterating over at most 3 pages of a DescribeNotificationConfigurations operation.
  2482. // pageNum := 0
  2483. // err := client.DescribeNotificationConfigurationsPages(params,
  2484. // func(page *autoscaling.DescribeNotificationConfigurationsOutput, lastPage bool) bool {
  2485. // pageNum++
  2486. // fmt.Println(page)
  2487. // return pageNum <= 3
  2488. // })
  2489. //
  2490. func (c *AutoScaling) DescribeNotificationConfigurationsPages(input *DescribeNotificationConfigurationsInput, fn func(*DescribeNotificationConfigurationsOutput, bool) bool) error {
  2491. return c.DescribeNotificationConfigurationsPagesWithContext(aws.BackgroundContext(), input, fn)
  2492. }
  2493. // DescribeNotificationConfigurationsPagesWithContext same as DescribeNotificationConfigurationsPages except
  2494. // it takes a Context and allows setting request options on the pages.
  2495. //
  2496. // The context must be non-nil and will be used for request cancellation. If
  2497. // the context is nil a panic will occur. In the future the SDK may create
  2498. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2499. // for more information on using Contexts.
  2500. func (c *AutoScaling) DescribeNotificationConfigurationsPagesWithContext(ctx aws.Context, input *DescribeNotificationConfigurationsInput, fn func(*DescribeNotificationConfigurationsOutput, bool) bool, opts ...request.Option) error {
  2501. p := request.Pagination{
  2502. NewRequest: func() (*request.Request, error) {
  2503. var inCpy *DescribeNotificationConfigurationsInput
  2504. if input != nil {
  2505. tmp := *input
  2506. inCpy = &tmp
  2507. }
  2508. req, _ := c.DescribeNotificationConfigurationsRequest(inCpy)
  2509. req.SetContext(ctx)
  2510. req.ApplyOptions(opts...)
  2511. return req, nil
  2512. },
  2513. }
  2514. for p.Next() {
  2515. if !fn(p.Page().(*DescribeNotificationConfigurationsOutput), !p.HasNextPage()) {
  2516. break
  2517. }
  2518. }
  2519. return p.Err()
  2520. }
  2521. const opDescribePolicies = "DescribePolicies"
  2522. // DescribePoliciesRequest generates a "aws/request.Request" representing the
  2523. // client's request for the DescribePolicies operation. The "output" return
  2524. // value will be populated with the request's response once the request completes
  2525. // successfully.
  2526. //
  2527. // Use "Send" method on the returned Request to send the API call to the service.
  2528. // the "output" return value is not valid until after Send returns without error.
  2529. //
  2530. // See DescribePolicies for more information on using the DescribePolicies
  2531. // API call, and error handling.
  2532. //
  2533. // This method is useful when you want to inject custom logic or configuration
  2534. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2535. //
  2536. //
  2537. // // Example sending a request using the DescribePoliciesRequest method.
  2538. // req, resp := client.DescribePoliciesRequest(params)
  2539. //
  2540. // err := req.Send()
  2541. // if err == nil { // resp is now filled
  2542. // fmt.Println(resp)
  2543. // }
  2544. //
  2545. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribePolicies
  2546. func (c *AutoScaling) DescribePoliciesRequest(input *DescribePoliciesInput) (req *request.Request, output *DescribePoliciesOutput) {
  2547. op := &request.Operation{
  2548. Name: opDescribePolicies,
  2549. HTTPMethod: "POST",
  2550. HTTPPath: "/",
  2551. Paginator: &request.Paginator{
  2552. InputTokens: []string{"NextToken"},
  2553. OutputTokens: []string{"NextToken"},
  2554. LimitToken: "MaxRecords",
  2555. TruncationToken: "",
  2556. },
  2557. }
  2558. if input == nil {
  2559. input = &DescribePoliciesInput{}
  2560. }
  2561. output = &DescribePoliciesOutput{}
  2562. req = c.newRequest(op, input, output)
  2563. return
  2564. }
  2565. // DescribePolicies API operation for Auto Scaling.
  2566. //
  2567. // Describes the policies for the specified Auto Scaling group.
  2568. //
  2569. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2570. // with awserr.Error's Code and Message methods to get detailed information about
  2571. // the error.
  2572. //
  2573. // See the AWS API reference guide for Auto Scaling's
  2574. // API operation DescribePolicies for usage and error information.
  2575. //
  2576. // Returned Error Codes:
  2577. // * ErrCodeInvalidNextToken "InvalidNextToken"
  2578. // The NextToken value is not valid.
  2579. //
  2580. // * ErrCodeResourceContentionFault "ResourceContention"
  2581. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  2582. // (for example, an Auto Scaling group, instance, or load balancer).
  2583. //
  2584. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  2585. // The service-linked role is not yet ready for use.
  2586. //
  2587. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribePolicies
  2588. func (c *AutoScaling) DescribePolicies(input *DescribePoliciesInput) (*DescribePoliciesOutput, error) {
  2589. req, out := c.DescribePoliciesRequest(input)
  2590. return out, req.Send()
  2591. }
  2592. // DescribePoliciesWithContext is the same as DescribePolicies with the addition of
  2593. // the ability to pass a context and additional request options.
  2594. //
  2595. // See DescribePolicies for details on how to use this API operation.
  2596. //
  2597. // The context must be non-nil and will be used for request cancellation. If
  2598. // the context is nil a panic will occur. In the future the SDK may create
  2599. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2600. // for more information on using Contexts.
  2601. func (c *AutoScaling) DescribePoliciesWithContext(ctx aws.Context, input *DescribePoliciesInput, opts ...request.Option) (*DescribePoliciesOutput, error) {
  2602. req, out := c.DescribePoliciesRequest(input)
  2603. req.SetContext(ctx)
  2604. req.ApplyOptions(opts...)
  2605. return out, req.Send()
  2606. }
  2607. // DescribePoliciesPages iterates over the pages of a DescribePolicies operation,
  2608. // calling the "fn" function with the response data for each page. To stop
  2609. // iterating, return false from the fn function.
  2610. //
  2611. // See DescribePolicies method for more information on how to use this operation.
  2612. //
  2613. // Note: This operation can generate multiple requests to a service.
  2614. //
  2615. // // Example iterating over at most 3 pages of a DescribePolicies operation.
  2616. // pageNum := 0
  2617. // err := client.DescribePoliciesPages(params,
  2618. // func(page *autoscaling.DescribePoliciesOutput, lastPage bool) bool {
  2619. // pageNum++
  2620. // fmt.Println(page)
  2621. // return pageNum <= 3
  2622. // })
  2623. //
  2624. func (c *AutoScaling) DescribePoliciesPages(input *DescribePoliciesInput, fn func(*DescribePoliciesOutput, bool) bool) error {
  2625. return c.DescribePoliciesPagesWithContext(aws.BackgroundContext(), input, fn)
  2626. }
  2627. // DescribePoliciesPagesWithContext same as DescribePoliciesPages except
  2628. // it takes a Context and allows setting request options on the pages.
  2629. //
  2630. // The context must be non-nil and will be used for request cancellation. If
  2631. // the context is nil a panic will occur. In the future the SDK may create
  2632. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2633. // for more information on using Contexts.
  2634. func (c *AutoScaling) DescribePoliciesPagesWithContext(ctx aws.Context, input *DescribePoliciesInput, fn func(*DescribePoliciesOutput, bool) bool, opts ...request.Option) error {
  2635. p := request.Pagination{
  2636. NewRequest: func() (*request.Request, error) {
  2637. var inCpy *DescribePoliciesInput
  2638. if input != nil {
  2639. tmp := *input
  2640. inCpy = &tmp
  2641. }
  2642. req, _ := c.DescribePoliciesRequest(inCpy)
  2643. req.SetContext(ctx)
  2644. req.ApplyOptions(opts...)
  2645. return req, nil
  2646. },
  2647. }
  2648. for p.Next() {
  2649. if !fn(p.Page().(*DescribePoliciesOutput), !p.HasNextPage()) {
  2650. break
  2651. }
  2652. }
  2653. return p.Err()
  2654. }
  2655. const opDescribeScalingActivities = "DescribeScalingActivities"
  2656. // DescribeScalingActivitiesRequest generates a "aws/request.Request" representing the
  2657. // client's request for the DescribeScalingActivities operation. The "output" return
  2658. // value will be populated with the request's response once the request completes
  2659. // successfully.
  2660. //
  2661. // Use "Send" method on the returned Request to send the API call to the service.
  2662. // the "output" return value is not valid until after Send returns without error.
  2663. //
  2664. // See DescribeScalingActivities for more information on using the DescribeScalingActivities
  2665. // API call, and error handling.
  2666. //
  2667. // This method is useful when you want to inject custom logic or configuration
  2668. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2669. //
  2670. //
  2671. // // Example sending a request using the DescribeScalingActivitiesRequest method.
  2672. // req, resp := client.DescribeScalingActivitiesRequest(params)
  2673. //
  2674. // err := req.Send()
  2675. // if err == nil { // resp is now filled
  2676. // fmt.Println(resp)
  2677. // }
  2678. //
  2679. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingActivities
  2680. func (c *AutoScaling) DescribeScalingActivitiesRequest(input *DescribeScalingActivitiesInput) (req *request.Request, output *DescribeScalingActivitiesOutput) {
  2681. op := &request.Operation{
  2682. Name: opDescribeScalingActivities,
  2683. HTTPMethod: "POST",
  2684. HTTPPath: "/",
  2685. Paginator: &request.Paginator{
  2686. InputTokens: []string{"NextToken"},
  2687. OutputTokens: []string{"NextToken"},
  2688. LimitToken: "MaxRecords",
  2689. TruncationToken: "",
  2690. },
  2691. }
  2692. if input == nil {
  2693. input = &DescribeScalingActivitiesInput{}
  2694. }
  2695. output = &DescribeScalingActivitiesOutput{}
  2696. req = c.newRequest(op, input, output)
  2697. return
  2698. }
  2699. // DescribeScalingActivities API operation for Auto Scaling.
  2700. //
  2701. // Describes one or more scaling activities for the specified Auto Scaling group.
  2702. //
  2703. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2704. // with awserr.Error's Code and Message methods to get detailed information about
  2705. // the error.
  2706. //
  2707. // See the AWS API reference guide for Auto Scaling's
  2708. // API operation DescribeScalingActivities for usage and error information.
  2709. //
  2710. // Returned Error Codes:
  2711. // * ErrCodeInvalidNextToken "InvalidNextToken"
  2712. // The NextToken value is not valid.
  2713. //
  2714. // * ErrCodeResourceContentionFault "ResourceContention"
  2715. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  2716. // (for example, an Auto Scaling group, instance, or load balancer).
  2717. //
  2718. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingActivities
  2719. func (c *AutoScaling) DescribeScalingActivities(input *DescribeScalingActivitiesInput) (*DescribeScalingActivitiesOutput, error) {
  2720. req, out := c.DescribeScalingActivitiesRequest(input)
  2721. return out, req.Send()
  2722. }
  2723. // DescribeScalingActivitiesWithContext is the same as DescribeScalingActivities with the addition of
  2724. // the ability to pass a context and additional request options.
  2725. //
  2726. // See DescribeScalingActivities for details on how to use this API operation.
  2727. //
  2728. // The context must be non-nil and will be used for request cancellation. If
  2729. // the context is nil a panic will occur. In the future the SDK may create
  2730. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2731. // for more information on using Contexts.
  2732. func (c *AutoScaling) DescribeScalingActivitiesWithContext(ctx aws.Context, input *DescribeScalingActivitiesInput, opts ...request.Option) (*DescribeScalingActivitiesOutput, error) {
  2733. req, out := c.DescribeScalingActivitiesRequest(input)
  2734. req.SetContext(ctx)
  2735. req.ApplyOptions(opts...)
  2736. return out, req.Send()
  2737. }
  2738. // DescribeScalingActivitiesPages iterates over the pages of a DescribeScalingActivities operation,
  2739. // calling the "fn" function with the response data for each page. To stop
  2740. // iterating, return false from the fn function.
  2741. //
  2742. // See DescribeScalingActivities method for more information on how to use this operation.
  2743. //
  2744. // Note: This operation can generate multiple requests to a service.
  2745. //
  2746. // // Example iterating over at most 3 pages of a DescribeScalingActivities operation.
  2747. // pageNum := 0
  2748. // err := client.DescribeScalingActivitiesPages(params,
  2749. // func(page *autoscaling.DescribeScalingActivitiesOutput, lastPage bool) bool {
  2750. // pageNum++
  2751. // fmt.Println(page)
  2752. // return pageNum <= 3
  2753. // })
  2754. //
  2755. func (c *AutoScaling) DescribeScalingActivitiesPages(input *DescribeScalingActivitiesInput, fn func(*DescribeScalingActivitiesOutput, bool) bool) error {
  2756. return c.DescribeScalingActivitiesPagesWithContext(aws.BackgroundContext(), input, fn)
  2757. }
  2758. // DescribeScalingActivitiesPagesWithContext same as DescribeScalingActivitiesPages except
  2759. // it takes a Context and allows setting request options on the pages.
  2760. //
  2761. // The context must be non-nil and will be used for request cancellation. If
  2762. // the context is nil a panic will occur. In the future the SDK may create
  2763. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2764. // for more information on using Contexts.
  2765. func (c *AutoScaling) DescribeScalingActivitiesPagesWithContext(ctx aws.Context, input *DescribeScalingActivitiesInput, fn func(*DescribeScalingActivitiesOutput, bool) bool, opts ...request.Option) error {
  2766. p := request.Pagination{
  2767. NewRequest: func() (*request.Request, error) {
  2768. var inCpy *DescribeScalingActivitiesInput
  2769. if input != nil {
  2770. tmp := *input
  2771. inCpy = &tmp
  2772. }
  2773. req, _ := c.DescribeScalingActivitiesRequest(inCpy)
  2774. req.SetContext(ctx)
  2775. req.ApplyOptions(opts...)
  2776. return req, nil
  2777. },
  2778. }
  2779. for p.Next() {
  2780. if !fn(p.Page().(*DescribeScalingActivitiesOutput), !p.HasNextPage()) {
  2781. break
  2782. }
  2783. }
  2784. return p.Err()
  2785. }
  2786. const opDescribeScalingProcessTypes = "DescribeScalingProcessTypes"
  2787. // DescribeScalingProcessTypesRequest generates a "aws/request.Request" representing the
  2788. // client's request for the DescribeScalingProcessTypes operation. The "output" return
  2789. // value will be populated with the request's response once the request completes
  2790. // successfully.
  2791. //
  2792. // Use "Send" method on the returned Request to send the API call to the service.
  2793. // the "output" return value is not valid until after Send returns without error.
  2794. //
  2795. // See DescribeScalingProcessTypes for more information on using the DescribeScalingProcessTypes
  2796. // API call, and error handling.
  2797. //
  2798. // This method is useful when you want to inject custom logic or configuration
  2799. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2800. //
  2801. //
  2802. // // Example sending a request using the DescribeScalingProcessTypesRequest method.
  2803. // req, resp := client.DescribeScalingProcessTypesRequest(params)
  2804. //
  2805. // err := req.Send()
  2806. // if err == nil { // resp is now filled
  2807. // fmt.Println(resp)
  2808. // }
  2809. //
  2810. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingProcessTypes
  2811. func (c *AutoScaling) DescribeScalingProcessTypesRequest(input *DescribeScalingProcessTypesInput) (req *request.Request, output *DescribeScalingProcessTypesOutput) {
  2812. op := &request.Operation{
  2813. Name: opDescribeScalingProcessTypes,
  2814. HTTPMethod: "POST",
  2815. HTTPPath: "/",
  2816. }
  2817. if input == nil {
  2818. input = &DescribeScalingProcessTypesInput{}
  2819. }
  2820. output = &DescribeScalingProcessTypesOutput{}
  2821. req = c.newRequest(op, input, output)
  2822. return
  2823. }
  2824. // DescribeScalingProcessTypes API operation for Auto Scaling.
  2825. //
  2826. // Describes the scaling process types for use with ResumeProcesses and SuspendProcesses.
  2827. //
  2828. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2829. // with awserr.Error's Code and Message methods to get detailed information about
  2830. // the error.
  2831. //
  2832. // See the AWS API reference guide for Auto Scaling's
  2833. // API operation DescribeScalingProcessTypes for usage and error information.
  2834. //
  2835. // Returned Error Codes:
  2836. // * ErrCodeResourceContentionFault "ResourceContention"
  2837. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  2838. // (for example, an Auto Scaling group, instance, or load balancer).
  2839. //
  2840. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScalingProcessTypes
  2841. func (c *AutoScaling) DescribeScalingProcessTypes(input *DescribeScalingProcessTypesInput) (*DescribeScalingProcessTypesOutput, error) {
  2842. req, out := c.DescribeScalingProcessTypesRequest(input)
  2843. return out, req.Send()
  2844. }
  2845. // DescribeScalingProcessTypesWithContext is the same as DescribeScalingProcessTypes with the addition of
  2846. // the ability to pass a context and additional request options.
  2847. //
  2848. // See DescribeScalingProcessTypes for details on how to use this API operation.
  2849. //
  2850. // The context must be non-nil and will be used for request cancellation. If
  2851. // the context is nil a panic will occur. In the future the SDK may create
  2852. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2853. // for more information on using Contexts.
  2854. func (c *AutoScaling) DescribeScalingProcessTypesWithContext(ctx aws.Context, input *DescribeScalingProcessTypesInput, opts ...request.Option) (*DescribeScalingProcessTypesOutput, error) {
  2855. req, out := c.DescribeScalingProcessTypesRequest(input)
  2856. req.SetContext(ctx)
  2857. req.ApplyOptions(opts...)
  2858. return out, req.Send()
  2859. }
  2860. const opDescribeScheduledActions = "DescribeScheduledActions"
  2861. // DescribeScheduledActionsRequest generates a "aws/request.Request" representing the
  2862. // client's request for the DescribeScheduledActions operation. The "output" return
  2863. // value will be populated with the request's response once the request completes
  2864. // successfully.
  2865. //
  2866. // Use "Send" method on the returned Request to send the API call to the service.
  2867. // the "output" return value is not valid until after Send returns without error.
  2868. //
  2869. // See DescribeScheduledActions for more information on using the DescribeScheduledActions
  2870. // API call, and error handling.
  2871. //
  2872. // This method is useful when you want to inject custom logic or configuration
  2873. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2874. //
  2875. //
  2876. // // Example sending a request using the DescribeScheduledActionsRequest method.
  2877. // req, resp := client.DescribeScheduledActionsRequest(params)
  2878. //
  2879. // err := req.Send()
  2880. // if err == nil { // resp is now filled
  2881. // fmt.Println(resp)
  2882. // }
  2883. //
  2884. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScheduledActions
  2885. func (c *AutoScaling) DescribeScheduledActionsRequest(input *DescribeScheduledActionsInput) (req *request.Request, output *DescribeScheduledActionsOutput) {
  2886. op := &request.Operation{
  2887. Name: opDescribeScheduledActions,
  2888. HTTPMethod: "POST",
  2889. HTTPPath: "/",
  2890. Paginator: &request.Paginator{
  2891. InputTokens: []string{"NextToken"},
  2892. OutputTokens: []string{"NextToken"},
  2893. LimitToken: "MaxRecords",
  2894. TruncationToken: "",
  2895. },
  2896. }
  2897. if input == nil {
  2898. input = &DescribeScheduledActionsInput{}
  2899. }
  2900. output = &DescribeScheduledActionsOutput{}
  2901. req = c.newRequest(op, input, output)
  2902. return
  2903. }
  2904. // DescribeScheduledActions API operation for Auto Scaling.
  2905. //
  2906. // Describes the actions scheduled for your Auto Scaling group that haven't
  2907. // run or that have not reached their end time. To describe the actions that
  2908. // have already run, use DescribeScalingActivities.
  2909. //
  2910. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2911. // with awserr.Error's Code and Message methods to get detailed information about
  2912. // the error.
  2913. //
  2914. // See the AWS API reference guide for Auto Scaling's
  2915. // API operation DescribeScheduledActions for usage and error information.
  2916. //
  2917. // Returned Error Codes:
  2918. // * ErrCodeInvalidNextToken "InvalidNextToken"
  2919. // The NextToken value is not valid.
  2920. //
  2921. // * ErrCodeResourceContentionFault "ResourceContention"
  2922. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  2923. // (for example, an Auto Scaling group, instance, or load balancer).
  2924. //
  2925. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeScheduledActions
  2926. func (c *AutoScaling) DescribeScheduledActions(input *DescribeScheduledActionsInput) (*DescribeScheduledActionsOutput, error) {
  2927. req, out := c.DescribeScheduledActionsRequest(input)
  2928. return out, req.Send()
  2929. }
  2930. // DescribeScheduledActionsWithContext is the same as DescribeScheduledActions with the addition of
  2931. // the ability to pass a context and additional request options.
  2932. //
  2933. // See DescribeScheduledActions for details on how to use this API operation.
  2934. //
  2935. // The context must be non-nil and will be used for request cancellation. If
  2936. // the context is nil a panic will occur. In the future the SDK may create
  2937. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2938. // for more information on using Contexts.
  2939. func (c *AutoScaling) DescribeScheduledActionsWithContext(ctx aws.Context, input *DescribeScheduledActionsInput, opts ...request.Option) (*DescribeScheduledActionsOutput, error) {
  2940. req, out := c.DescribeScheduledActionsRequest(input)
  2941. req.SetContext(ctx)
  2942. req.ApplyOptions(opts...)
  2943. return out, req.Send()
  2944. }
  2945. // DescribeScheduledActionsPages iterates over the pages of a DescribeScheduledActions operation,
  2946. // calling the "fn" function with the response data for each page. To stop
  2947. // iterating, return false from the fn function.
  2948. //
  2949. // See DescribeScheduledActions method for more information on how to use this operation.
  2950. //
  2951. // Note: This operation can generate multiple requests to a service.
  2952. //
  2953. // // Example iterating over at most 3 pages of a DescribeScheduledActions operation.
  2954. // pageNum := 0
  2955. // err := client.DescribeScheduledActionsPages(params,
  2956. // func(page *autoscaling.DescribeScheduledActionsOutput, lastPage bool) bool {
  2957. // pageNum++
  2958. // fmt.Println(page)
  2959. // return pageNum <= 3
  2960. // })
  2961. //
  2962. func (c *AutoScaling) DescribeScheduledActionsPages(input *DescribeScheduledActionsInput, fn func(*DescribeScheduledActionsOutput, bool) bool) error {
  2963. return c.DescribeScheduledActionsPagesWithContext(aws.BackgroundContext(), input, fn)
  2964. }
  2965. // DescribeScheduledActionsPagesWithContext same as DescribeScheduledActionsPages except
  2966. // it takes a Context and allows setting request options on the pages.
  2967. //
  2968. // The context must be non-nil and will be used for request cancellation. If
  2969. // the context is nil a panic will occur. In the future the SDK may create
  2970. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2971. // for more information on using Contexts.
  2972. func (c *AutoScaling) DescribeScheduledActionsPagesWithContext(ctx aws.Context, input *DescribeScheduledActionsInput, fn func(*DescribeScheduledActionsOutput, bool) bool, opts ...request.Option) error {
  2973. p := request.Pagination{
  2974. NewRequest: func() (*request.Request, error) {
  2975. var inCpy *DescribeScheduledActionsInput
  2976. if input != nil {
  2977. tmp := *input
  2978. inCpy = &tmp
  2979. }
  2980. req, _ := c.DescribeScheduledActionsRequest(inCpy)
  2981. req.SetContext(ctx)
  2982. req.ApplyOptions(opts...)
  2983. return req, nil
  2984. },
  2985. }
  2986. for p.Next() {
  2987. if !fn(p.Page().(*DescribeScheduledActionsOutput), !p.HasNextPage()) {
  2988. break
  2989. }
  2990. }
  2991. return p.Err()
  2992. }
  2993. const opDescribeTags = "DescribeTags"
  2994. // DescribeTagsRequest generates a "aws/request.Request" representing the
  2995. // client's request for the DescribeTags operation. The "output" return
  2996. // value will be populated with the request's response once the request completes
  2997. // successfully.
  2998. //
  2999. // Use "Send" method on the returned Request to send the API call to the service.
  3000. // the "output" return value is not valid until after Send returns without error.
  3001. //
  3002. // See DescribeTags for more information on using the DescribeTags
  3003. // API call, and error handling.
  3004. //
  3005. // This method is useful when you want to inject custom logic or configuration
  3006. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3007. //
  3008. //
  3009. // // Example sending a request using the DescribeTagsRequest method.
  3010. // req, resp := client.DescribeTagsRequest(params)
  3011. //
  3012. // err := req.Send()
  3013. // if err == nil { // resp is now filled
  3014. // fmt.Println(resp)
  3015. // }
  3016. //
  3017. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTags
  3018. func (c *AutoScaling) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) {
  3019. op := &request.Operation{
  3020. Name: opDescribeTags,
  3021. HTTPMethod: "POST",
  3022. HTTPPath: "/",
  3023. Paginator: &request.Paginator{
  3024. InputTokens: []string{"NextToken"},
  3025. OutputTokens: []string{"NextToken"},
  3026. LimitToken: "MaxRecords",
  3027. TruncationToken: "",
  3028. },
  3029. }
  3030. if input == nil {
  3031. input = &DescribeTagsInput{}
  3032. }
  3033. output = &DescribeTagsOutput{}
  3034. req = c.newRequest(op, input, output)
  3035. return
  3036. }
  3037. // DescribeTags API operation for Auto Scaling.
  3038. //
  3039. // Describes the specified tags.
  3040. //
  3041. // You can use filters to limit the results. For example, you can query for
  3042. // the tags for a specific Auto Scaling group. You can specify multiple values
  3043. // for a filter. A tag must match at least one of the specified values for it
  3044. // to be included in the results.
  3045. //
  3046. // You can also specify multiple filters. The result includes information for
  3047. // a particular tag only if it matches all the filters. If there's no match,
  3048. // no special message is returned.
  3049. //
  3050. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3051. // with awserr.Error's Code and Message methods to get detailed information about
  3052. // the error.
  3053. //
  3054. // See the AWS API reference guide for Auto Scaling's
  3055. // API operation DescribeTags for usage and error information.
  3056. //
  3057. // Returned Error Codes:
  3058. // * ErrCodeInvalidNextToken "InvalidNextToken"
  3059. // The NextToken value is not valid.
  3060. //
  3061. // * ErrCodeResourceContentionFault "ResourceContention"
  3062. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  3063. // (for example, an Auto Scaling group, instance, or load balancer).
  3064. //
  3065. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTags
  3066. func (c *AutoScaling) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
  3067. req, out := c.DescribeTagsRequest(input)
  3068. return out, req.Send()
  3069. }
  3070. // DescribeTagsWithContext is the same as DescribeTags with the addition of
  3071. // the ability to pass a context and additional request options.
  3072. //
  3073. // See DescribeTags for details on how to use this API operation.
  3074. //
  3075. // The context must be non-nil and will be used for request cancellation. If
  3076. // the context is nil a panic will occur. In the future the SDK may create
  3077. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3078. // for more information on using Contexts.
  3079. func (c *AutoScaling) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) {
  3080. req, out := c.DescribeTagsRequest(input)
  3081. req.SetContext(ctx)
  3082. req.ApplyOptions(opts...)
  3083. return out, req.Send()
  3084. }
  3085. // DescribeTagsPages iterates over the pages of a DescribeTags operation,
  3086. // calling the "fn" function with the response data for each page. To stop
  3087. // iterating, return false from the fn function.
  3088. //
  3089. // See DescribeTags method for more information on how to use this operation.
  3090. //
  3091. // Note: This operation can generate multiple requests to a service.
  3092. //
  3093. // // Example iterating over at most 3 pages of a DescribeTags operation.
  3094. // pageNum := 0
  3095. // err := client.DescribeTagsPages(params,
  3096. // func(page *autoscaling.DescribeTagsOutput, lastPage bool) bool {
  3097. // pageNum++
  3098. // fmt.Println(page)
  3099. // return pageNum <= 3
  3100. // })
  3101. //
  3102. func (c *AutoScaling) DescribeTagsPages(input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool) error {
  3103. return c.DescribeTagsPagesWithContext(aws.BackgroundContext(), input, fn)
  3104. }
  3105. // DescribeTagsPagesWithContext same as DescribeTagsPages except
  3106. // it takes a Context and allows setting request options on the pages.
  3107. //
  3108. // The context must be non-nil and will be used for request cancellation. If
  3109. // the context is nil a panic will occur. In the future the SDK may create
  3110. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3111. // for more information on using Contexts.
  3112. func (c *AutoScaling) DescribeTagsPagesWithContext(ctx aws.Context, input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool, opts ...request.Option) error {
  3113. p := request.Pagination{
  3114. NewRequest: func() (*request.Request, error) {
  3115. var inCpy *DescribeTagsInput
  3116. if input != nil {
  3117. tmp := *input
  3118. inCpy = &tmp
  3119. }
  3120. req, _ := c.DescribeTagsRequest(inCpy)
  3121. req.SetContext(ctx)
  3122. req.ApplyOptions(opts...)
  3123. return req, nil
  3124. },
  3125. }
  3126. for p.Next() {
  3127. if !fn(p.Page().(*DescribeTagsOutput), !p.HasNextPage()) {
  3128. break
  3129. }
  3130. }
  3131. return p.Err()
  3132. }
  3133. const opDescribeTerminationPolicyTypes = "DescribeTerminationPolicyTypes"
  3134. // DescribeTerminationPolicyTypesRequest generates a "aws/request.Request" representing the
  3135. // client's request for the DescribeTerminationPolicyTypes operation. The "output" return
  3136. // value will be populated with the request's response once the request completes
  3137. // successfully.
  3138. //
  3139. // Use "Send" method on the returned Request to send the API call to the service.
  3140. // the "output" return value is not valid until after Send returns without error.
  3141. //
  3142. // See DescribeTerminationPolicyTypes for more information on using the DescribeTerminationPolicyTypes
  3143. // API call, and error handling.
  3144. //
  3145. // This method is useful when you want to inject custom logic or configuration
  3146. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3147. //
  3148. //
  3149. // // Example sending a request using the DescribeTerminationPolicyTypesRequest method.
  3150. // req, resp := client.DescribeTerminationPolicyTypesRequest(params)
  3151. //
  3152. // err := req.Send()
  3153. // if err == nil { // resp is now filled
  3154. // fmt.Println(resp)
  3155. // }
  3156. //
  3157. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTerminationPolicyTypes
  3158. func (c *AutoScaling) DescribeTerminationPolicyTypesRequest(input *DescribeTerminationPolicyTypesInput) (req *request.Request, output *DescribeTerminationPolicyTypesOutput) {
  3159. op := &request.Operation{
  3160. Name: opDescribeTerminationPolicyTypes,
  3161. HTTPMethod: "POST",
  3162. HTTPPath: "/",
  3163. }
  3164. if input == nil {
  3165. input = &DescribeTerminationPolicyTypesInput{}
  3166. }
  3167. output = &DescribeTerminationPolicyTypesOutput{}
  3168. req = c.newRequest(op, input, output)
  3169. return
  3170. }
  3171. // DescribeTerminationPolicyTypes API operation for Auto Scaling.
  3172. //
  3173. // Describes the termination policies supported by Amazon EC2 Auto Scaling.
  3174. //
  3175. // For more information, see Controlling Which Auto Scaling Instances Terminate
  3176. // During Scale In (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html)
  3177. // in the Amazon EC2 Auto Scaling User Guide.
  3178. //
  3179. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3180. // with awserr.Error's Code and Message methods to get detailed information about
  3181. // the error.
  3182. //
  3183. // See the AWS API reference guide for Auto Scaling's
  3184. // API operation DescribeTerminationPolicyTypes for usage and error information.
  3185. //
  3186. // Returned Error Codes:
  3187. // * ErrCodeResourceContentionFault "ResourceContention"
  3188. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  3189. // (for example, an Auto Scaling group, instance, or load balancer).
  3190. //
  3191. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeTerminationPolicyTypes
  3192. func (c *AutoScaling) DescribeTerminationPolicyTypes(input *DescribeTerminationPolicyTypesInput) (*DescribeTerminationPolicyTypesOutput, error) {
  3193. req, out := c.DescribeTerminationPolicyTypesRequest(input)
  3194. return out, req.Send()
  3195. }
  3196. // DescribeTerminationPolicyTypesWithContext is the same as DescribeTerminationPolicyTypes with the addition of
  3197. // the ability to pass a context and additional request options.
  3198. //
  3199. // See DescribeTerminationPolicyTypes for details on how to use this API operation.
  3200. //
  3201. // The context must be non-nil and will be used for request cancellation. If
  3202. // the context is nil a panic will occur. In the future the SDK may create
  3203. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3204. // for more information on using Contexts.
  3205. func (c *AutoScaling) DescribeTerminationPolicyTypesWithContext(ctx aws.Context, input *DescribeTerminationPolicyTypesInput, opts ...request.Option) (*DescribeTerminationPolicyTypesOutput, error) {
  3206. req, out := c.DescribeTerminationPolicyTypesRequest(input)
  3207. req.SetContext(ctx)
  3208. req.ApplyOptions(opts...)
  3209. return out, req.Send()
  3210. }
  3211. const opDetachInstances = "DetachInstances"
  3212. // DetachInstancesRequest generates a "aws/request.Request" representing the
  3213. // client's request for the DetachInstances operation. The "output" return
  3214. // value will be populated with the request's response once the request completes
  3215. // successfully.
  3216. //
  3217. // Use "Send" method on the returned Request to send the API call to the service.
  3218. // the "output" return value is not valid until after Send returns without error.
  3219. //
  3220. // See DetachInstances for more information on using the DetachInstances
  3221. // API call, and error handling.
  3222. //
  3223. // This method is useful when you want to inject custom logic or configuration
  3224. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3225. //
  3226. //
  3227. // // Example sending a request using the DetachInstancesRequest method.
  3228. // req, resp := client.DetachInstancesRequest(params)
  3229. //
  3230. // err := req.Send()
  3231. // if err == nil { // resp is now filled
  3232. // fmt.Println(resp)
  3233. // }
  3234. //
  3235. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachInstances
  3236. func (c *AutoScaling) DetachInstancesRequest(input *DetachInstancesInput) (req *request.Request, output *DetachInstancesOutput) {
  3237. op := &request.Operation{
  3238. Name: opDetachInstances,
  3239. HTTPMethod: "POST",
  3240. HTTPPath: "/",
  3241. }
  3242. if input == nil {
  3243. input = &DetachInstancesInput{}
  3244. }
  3245. output = &DetachInstancesOutput{}
  3246. req = c.newRequest(op, input, output)
  3247. return
  3248. }
  3249. // DetachInstances API operation for Auto Scaling.
  3250. //
  3251. // Removes one or more instances from the specified Auto Scaling group.
  3252. //
  3253. // After the instances are detached, you can manage them independent of the
  3254. // Auto Scaling group.
  3255. //
  3256. // If you do not specify the option to decrement the desired capacity, Amazon
  3257. // EC2 Auto Scaling launches instances to replace the ones that are detached.
  3258. //
  3259. // If there is a Classic Load Balancer attached to the Auto Scaling group, the
  3260. // instances are deregistered from the load balancer. If there are target groups
  3261. // attached to the Auto Scaling group, the instances are deregistered from the
  3262. // target groups.
  3263. //
  3264. // For more information, see Detach EC2 Instances from Your Auto Scaling Group
  3265. // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/detach-instance-asg.html)
  3266. // in the Amazon EC2 Auto Scaling User Guide.
  3267. //
  3268. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3269. // with awserr.Error's Code and Message methods to get detailed information about
  3270. // the error.
  3271. //
  3272. // See the AWS API reference guide for Auto Scaling's
  3273. // API operation DetachInstances for usage and error information.
  3274. //
  3275. // Returned Error Codes:
  3276. // * ErrCodeResourceContentionFault "ResourceContention"
  3277. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  3278. // (for example, an Auto Scaling group, instance, or load balancer).
  3279. //
  3280. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachInstances
  3281. func (c *AutoScaling) DetachInstances(input *DetachInstancesInput) (*DetachInstancesOutput, error) {
  3282. req, out := c.DetachInstancesRequest(input)
  3283. return out, req.Send()
  3284. }
  3285. // DetachInstancesWithContext is the same as DetachInstances with the addition of
  3286. // the ability to pass a context and additional request options.
  3287. //
  3288. // See DetachInstances for details on how to use this API operation.
  3289. //
  3290. // The context must be non-nil and will be used for request cancellation. If
  3291. // the context is nil a panic will occur. In the future the SDK may create
  3292. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3293. // for more information on using Contexts.
  3294. func (c *AutoScaling) DetachInstancesWithContext(ctx aws.Context, input *DetachInstancesInput, opts ...request.Option) (*DetachInstancesOutput, error) {
  3295. req, out := c.DetachInstancesRequest(input)
  3296. req.SetContext(ctx)
  3297. req.ApplyOptions(opts...)
  3298. return out, req.Send()
  3299. }
  3300. const opDetachLoadBalancerTargetGroups = "DetachLoadBalancerTargetGroups"
  3301. // DetachLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the
  3302. // client's request for the DetachLoadBalancerTargetGroups operation. The "output" return
  3303. // value will be populated with the request's response once the request completes
  3304. // successfully.
  3305. //
  3306. // Use "Send" method on the returned Request to send the API call to the service.
  3307. // the "output" return value is not valid until after Send returns without error.
  3308. //
  3309. // See DetachLoadBalancerTargetGroups for more information on using the DetachLoadBalancerTargetGroups
  3310. // API call, and error handling.
  3311. //
  3312. // This method is useful when you want to inject custom logic or configuration
  3313. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3314. //
  3315. //
  3316. // // Example sending a request using the DetachLoadBalancerTargetGroupsRequest method.
  3317. // req, resp := client.DetachLoadBalancerTargetGroupsRequest(params)
  3318. //
  3319. // err := req.Send()
  3320. // if err == nil { // resp is now filled
  3321. // fmt.Println(resp)
  3322. // }
  3323. //
  3324. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachLoadBalancerTargetGroups
  3325. func (c *AutoScaling) DetachLoadBalancerTargetGroupsRequest(input *DetachLoadBalancerTargetGroupsInput) (req *request.Request, output *DetachLoadBalancerTargetGroupsOutput) {
  3326. op := &request.Operation{
  3327. Name: opDetachLoadBalancerTargetGroups,
  3328. HTTPMethod: "POST",
  3329. HTTPPath: "/",
  3330. }
  3331. if input == nil {
  3332. input = &DetachLoadBalancerTargetGroupsInput{}
  3333. }
  3334. output = &DetachLoadBalancerTargetGroupsOutput{}
  3335. req = c.newRequest(op, input, output)
  3336. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3337. return
  3338. }
  3339. // DetachLoadBalancerTargetGroups API operation for Auto Scaling.
  3340. //
  3341. // Detaches one or more target groups from the specified Auto Scaling group.
  3342. //
  3343. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3344. // with awserr.Error's Code and Message methods to get detailed information about
  3345. // the error.
  3346. //
  3347. // See the AWS API reference guide for Auto Scaling's
  3348. // API operation DetachLoadBalancerTargetGroups for usage and error information.
  3349. //
  3350. // Returned Error Codes:
  3351. // * ErrCodeResourceContentionFault "ResourceContention"
  3352. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  3353. // (for example, an Auto Scaling group, instance, or load balancer).
  3354. //
  3355. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachLoadBalancerTargetGroups
  3356. func (c *AutoScaling) DetachLoadBalancerTargetGroups(input *DetachLoadBalancerTargetGroupsInput) (*DetachLoadBalancerTargetGroupsOutput, error) {
  3357. req, out := c.DetachLoadBalancerTargetGroupsRequest(input)
  3358. return out, req.Send()
  3359. }
  3360. // DetachLoadBalancerTargetGroupsWithContext is the same as DetachLoadBalancerTargetGroups with the addition of
  3361. // the ability to pass a context and additional request options.
  3362. //
  3363. // See DetachLoadBalancerTargetGroups for details on how to use this API operation.
  3364. //
  3365. // The context must be non-nil and will be used for request cancellation. If
  3366. // the context is nil a panic will occur. In the future the SDK may create
  3367. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3368. // for more information on using Contexts.
  3369. func (c *AutoScaling) DetachLoadBalancerTargetGroupsWithContext(ctx aws.Context, input *DetachLoadBalancerTargetGroupsInput, opts ...request.Option) (*DetachLoadBalancerTargetGroupsOutput, error) {
  3370. req, out := c.DetachLoadBalancerTargetGroupsRequest(input)
  3371. req.SetContext(ctx)
  3372. req.ApplyOptions(opts...)
  3373. return out, req.Send()
  3374. }
  3375. const opDetachLoadBalancers = "DetachLoadBalancers"
  3376. // DetachLoadBalancersRequest generates a "aws/request.Request" representing the
  3377. // client's request for the DetachLoadBalancers operation. The "output" return
  3378. // value will be populated with the request's response once the request completes
  3379. // successfully.
  3380. //
  3381. // Use "Send" method on the returned Request to send the API call to the service.
  3382. // the "output" return value is not valid until after Send returns without error.
  3383. //
  3384. // See DetachLoadBalancers for more information on using the DetachLoadBalancers
  3385. // API call, and error handling.
  3386. //
  3387. // This method is useful when you want to inject custom logic or configuration
  3388. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3389. //
  3390. //
  3391. // // Example sending a request using the DetachLoadBalancersRequest method.
  3392. // req, resp := client.DetachLoadBalancersRequest(params)
  3393. //
  3394. // err := req.Send()
  3395. // if err == nil { // resp is now filled
  3396. // fmt.Println(resp)
  3397. // }
  3398. //
  3399. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachLoadBalancers
  3400. func (c *AutoScaling) DetachLoadBalancersRequest(input *DetachLoadBalancersInput) (req *request.Request, output *DetachLoadBalancersOutput) {
  3401. op := &request.Operation{
  3402. Name: opDetachLoadBalancers,
  3403. HTTPMethod: "POST",
  3404. HTTPPath: "/",
  3405. }
  3406. if input == nil {
  3407. input = &DetachLoadBalancersInput{}
  3408. }
  3409. output = &DetachLoadBalancersOutput{}
  3410. req = c.newRequest(op, input, output)
  3411. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3412. return
  3413. }
  3414. // DetachLoadBalancers API operation for Auto Scaling.
  3415. //
  3416. // Detaches one or more Classic Load Balancers from the specified Auto Scaling
  3417. // group.
  3418. //
  3419. // This operation detaches only Classic Load Balancers. If you have Application
  3420. // Load Balancers or Network Load Balancers, use DetachLoadBalancerTargetGroups
  3421. // instead.
  3422. //
  3423. // When you detach a load balancer, it enters the Removing state while deregistering
  3424. // the instances in the group. When all instances are deregistered, then you
  3425. // can no longer describe the load balancer using DescribeLoadBalancers. The
  3426. // instances remain running.
  3427. //
  3428. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3429. // with awserr.Error's Code and Message methods to get detailed information about
  3430. // the error.
  3431. //
  3432. // See the AWS API reference guide for Auto Scaling's
  3433. // API operation DetachLoadBalancers for usage and error information.
  3434. //
  3435. // Returned Error Codes:
  3436. // * ErrCodeResourceContentionFault "ResourceContention"
  3437. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  3438. // (for example, an Auto Scaling group, instance, or load balancer).
  3439. //
  3440. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DetachLoadBalancers
  3441. func (c *AutoScaling) DetachLoadBalancers(input *DetachLoadBalancersInput) (*DetachLoadBalancersOutput, error) {
  3442. req, out := c.DetachLoadBalancersRequest(input)
  3443. return out, req.Send()
  3444. }
  3445. // DetachLoadBalancersWithContext is the same as DetachLoadBalancers with the addition of
  3446. // the ability to pass a context and additional request options.
  3447. //
  3448. // See DetachLoadBalancers for details on how to use this API operation.
  3449. //
  3450. // The context must be non-nil and will be used for request cancellation. If
  3451. // the context is nil a panic will occur. In the future the SDK may create
  3452. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3453. // for more information on using Contexts.
  3454. func (c *AutoScaling) DetachLoadBalancersWithContext(ctx aws.Context, input *DetachLoadBalancersInput, opts ...request.Option) (*DetachLoadBalancersOutput, error) {
  3455. req, out := c.DetachLoadBalancersRequest(input)
  3456. req.SetContext(ctx)
  3457. req.ApplyOptions(opts...)
  3458. return out, req.Send()
  3459. }
  3460. const opDisableMetricsCollection = "DisableMetricsCollection"
  3461. // DisableMetricsCollectionRequest generates a "aws/request.Request" representing the
  3462. // client's request for the DisableMetricsCollection operation. The "output" return
  3463. // value will be populated with the request's response once the request completes
  3464. // successfully.
  3465. //
  3466. // Use "Send" method on the returned Request to send the API call to the service.
  3467. // the "output" return value is not valid until after Send returns without error.
  3468. //
  3469. // See DisableMetricsCollection for more information on using the DisableMetricsCollection
  3470. // API call, and error handling.
  3471. //
  3472. // This method is useful when you want to inject custom logic or configuration
  3473. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3474. //
  3475. //
  3476. // // Example sending a request using the DisableMetricsCollectionRequest method.
  3477. // req, resp := client.DisableMetricsCollectionRequest(params)
  3478. //
  3479. // err := req.Send()
  3480. // if err == nil { // resp is now filled
  3481. // fmt.Println(resp)
  3482. // }
  3483. //
  3484. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DisableMetricsCollection
  3485. func (c *AutoScaling) DisableMetricsCollectionRequest(input *DisableMetricsCollectionInput) (req *request.Request, output *DisableMetricsCollectionOutput) {
  3486. op := &request.Operation{
  3487. Name: opDisableMetricsCollection,
  3488. HTTPMethod: "POST",
  3489. HTTPPath: "/",
  3490. }
  3491. if input == nil {
  3492. input = &DisableMetricsCollectionInput{}
  3493. }
  3494. output = &DisableMetricsCollectionOutput{}
  3495. req = c.newRequest(op, input, output)
  3496. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3497. return
  3498. }
  3499. // DisableMetricsCollection API operation for Auto Scaling.
  3500. //
  3501. // Disables group metrics for the specified Auto Scaling group.
  3502. //
  3503. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3504. // with awserr.Error's Code and Message methods to get detailed information about
  3505. // the error.
  3506. //
  3507. // See the AWS API reference guide for Auto Scaling's
  3508. // API operation DisableMetricsCollection for usage and error information.
  3509. //
  3510. // Returned Error Codes:
  3511. // * ErrCodeResourceContentionFault "ResourceContention"
  3512. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  3513. // (for example, an Auto Scaling group, instance, or load balancer).
  3514. //
  3515. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DisableMetricsCollection
  3516. func (c *AutoScaling) DisableMetricsCollection(input *DisableMetricsCollectionInput) (*DisableMetricsCollectionOutput, error) {
  3517. req, out := c.DisableMetricsCollectionRequest(input)
  3518. return out, req.Send()
  3519. }
  3520. // DisableMetricsCollectionWithContext is the same as DisableMetricsCollection with the addition of
  3521. // the ability to pass a context and additional request options.
  3522. //
  3523. // See DisableMetricsCollection for details on how to use this API operation.
  3524. //
  3525. // The context must be non-nil and will be used for request cancellation. If
  3526. // the context is nil a panic will occur. In the future the SDK may create
  3527. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3528. // for more information on using Contexts.
  3529. func (c *AutoScaling) DisableMetricsCollectionWithContext(ctx aws.Context, input *DisableMetricsCollectionInput, opts ...request.Option) (*DisableMetricsCollectionOutput, error) {
  3530. req, out := c.DisableMetricsCollectionRequest(input)
  3531. req.SetContext(ctx)
  3532. req.ApplyOptions(opts...)
  3533. return out, req.Send()
  3534. }
  3535. const opEnableMetricsCollection = "EnableMetricsCollection"
  3536. // EnableMetricsCollectionRequest generates a "aws/request.Request" representing the
  3537. // client's request for the EnableMetricsCollection operation. The "output" return
  3538. // value will be populated with the request's response once the request completes
  3539. // successfully.
  3540. //
  3541. // Use "Send" method on the returned Request to send the API call to the service.
  3542. // the "output" return value is not valid until after Send returns without error.
  3543. //
  3544. // See EnableMetricsCollection for more information on using the EnableMetricsCollection
  3545. // API call, and error handling.
  3546. //
  3547. // This method is useful when you want to inject custom logic or configuration
  3548. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3549. //
  3550. //
  3551. // // Example sending a request using the EnableMetricsCollectionRequest method.
  3552. // req, resp := client.EnableMetricsCollectionRequest(params)
  3553. //
  3554. // err := req.Send()
  3555. // if err == nil { // resp is now filled
  3556. // fmt.Println(resp)
  3557. // }
  3558. //
  3559. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/EnableMetricsCollection
  3560. func (c *AutoScaling) EnableMetricsCollectionRequest(input *EnableMetricsCollectionInput) (req *request.Request, output *EnableMetricsCollectionOutput) {
  3561. op := &request.Operation{
  3562. Name: opEnableMetricsCollection,
  3563. HTTPMethod: "POST",
  3564. HTTPPath: "/",
  3565. }
  3566. if input == nil {
  3567. input = &EnableMetricsCollectionInput{}
  3568. }
  3569. output = &EnableMetricsCollectionOutput{}
  3570. req = c.newRequest(op, input, output)
  3571. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3572. return
  3573. }
  3574. // EnableMetricsCollection API operation for Auto Scaling.
  3575. //
  3576. // Enables group metrics for the specified Auto Scaling group. For more information,
  3577. // see Monitoring Your Auto Scaling Groups and Instances (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-monitoring.html)
  3578. // in the Amazon EC2 Auto Scaling User Guide.
  3579. //
  3580. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3581. // with awserr.Error's Code and Message methods to get detailed information about
  3582. // the error.
  3583. //
  3584. // See the AWS API reference guide for Auto Scaling's
  3585. // API operation EnableMetricsCollection for usage and error information.
  3586. //
  3587. // Returned Error Codes:
  3588. // * ErrCodeResourceContentionFault "ResourceContention"
  3589. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  3590. // (for example, an Auto Scaling group, instance, or load balancer).
  3591. //
  3592. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/EnableMetricsCollection
  3593. func (c *AutoScaling) EnableMetricsCollection(input *EnableMetricsCollectionInput) (*EnableMetricsCollectionOutput, error) {
  3594. req, out := c.EnableMetricsCollectionRequest(input)
  3595. return out, req.Send()
  3596. }
  3597. // EnableMetricsCollectionWithContext is the same as EnableMetricsCollection with the addition of
  3598. // the ability to pass a context and additional request options.
  3599. //
  3600. // See EnableMetricsCollection for details on how to use this API operation.
  3601. //
  3602. // The context must be non-nil and will be used for request cancellation. If
  3603. // the context is nil a panic will occur. In the future the SDK may create
  3604. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3605. // for more information on using Contexts.
  3606. func (c *AutoScaling) EnableMetricsCollectionWithContext(ctx aws.Context, input *EnableMetricsCollectionInput, opts ...request.Option) (*EnableMetricsCollectionOutput, error) {
  3607. req, out := c.EnableMetricsCollectionRequest(input)
  3608. req.SetContext(ctx)
  3609. req.ApplyOptions(opts...)
  3610. return out, req.Send()
  3611. }
  3612. const opEnterStandby = "EnterStandby"
  3613. // EnterStandbyRequest generates a "aws/request.Request" representing the
  3614. // client's request for the EnterStandby operation. The "output" return
  3615. // value will be populated with the request's response once the request completes
  3616. // successfully.
  3617. //
  3618. // Use "Send" method on the returned Request to send the API call to the service.
  3619. // the "output" return value is not valid until after Send returns without error.
  3620. //
  3621. // See EnterStandby for more information on using the EnterStandby
  3622. // API call, and error handling.
  3623. //
  3624. // This method is useful when you want to inject custom logic or configuration
  3625. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3626. //
  3627. //
  3628. // // Example sending a request using the EnterStandbyRequest method.
  3629. // req, resp := client.EnterStandbyRequest(params)
  3630. //
  3631. // err := req.Send()
  3632. // if err == nil { // resp is now filled
  3633. // fmt.Println(resp)
  3634. // }
  3635. //
  3636. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/EnterStandby
  3637. func (c *AutoScaling) EnterStandbyRequest(input *EnterStandbyInput) (req *request.Request, output *EnterStandbyOutput) {
  3638. op := &request.Operation{
  3639. Name: opEnterStandby,
  3640. HTTPMethod: "POST",
  3641. HTTPPath: "/",
  3642. }
  3643. if input == nil {
  3644. input = &EnterStandbyInput{}
  3645. }
  3646. output = &EnterStandbyOutput{}
  3647. req = c.newRequest(op, input, output)
  3648. return
  3649. }
  3650. // EnterStandby API operation for Auto Scaling.
  3651. //
  3652. // Moves the specified instances into the standby state.
  3653. //
  3654. // If you choose to decrement the desired capacity of the Auto Scaling group,
  3655. // the instances can enter standby as long as the desired capacity of the Auto
  3656. // Scaling group after the instances are placed into standby is equal to or
  3657. // greater than the minimum capacity of the group.
  3658. //
  3659. // If you choose not to decrement the desired capacity of the Auto Scaling group,
  3660. // the Auto Scaling group launches new instances to replace the instances on
  3661. // standby.
  3662. //
  3663. // For more information, see Temporarily Removing Instances from Your Auto Scaling
  3664. // Group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enter-exit-standby.html)
  3665. // in the Amazon EC2 Auto Scaling User Guide.
  3666. //
  3667. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3668. // with awserr.Error's Code and Message methods to get detailed information about
  3669. // the error.
  3670. //
  3671. // See the AWS API reference guide for Auto Scaling's
  3672. // API operation EnterStandby for usage and error information.
  3673. //
  3674. // Returned Error Codes:
  3675. // * ErrCodeResourceContentionFault "ResourceContention"
  3676. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  3677. // (for example, an Auto Scaling group, instance, or load balancer).
  3678. //
  3679. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/EnterStandby
  3680. func (c *AutoScaling) EnterStandby(input *EnterStandbyInput) (*EnterStandbyOutput, error) {
  3681. req, out := c.EnterStandbyRequest(input)
  3682. return out, req.Send()
  3683. }
  3684. // EnterStandbyWithContext is the same as EnterStandby with the addition of
  3685. // the ability to pass a context and additional request options.
  3686. //
  3687. // See EnterStandby for details on how to use this API operation.
  3688. //
  3689. // The context must be non-nil and will be used for request cancellation. If
  3690. // the context is nil a panic will occur. In the future the SDK may create
  3691. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3692. // for more information on using Contexts.
  3693. func (c *AutoScaling) EnterStandbyWithContext(ctx aws.Context, input *EnterStandbyInput, opts ...request.Option) (*EnterStandbyOutput, error) {
  3694. req, out := c.EnterStandbyRequest(input)
  3695. req.SetContext(ctx)
  3696. req.ApplyOptions(opts...)
  3697. return out, req.Send()
  3698. }
  3699. const opExecutePolicy = "ExecutePolicy"
  3700. // ExecutePolicyRequest generates a "aws/request.Request" representing the
  3701. // client's request for the ExecutePolicy operation. The "output" return
  3702. // value will be populated with the request's response once the request completes
  3703. // successfully.
  3704. //
  3705. // Use "Send" method on the returned Request to send the API call to the service.
  3706. // the "output" return value is not valid until after Send returns without error.
  3707. //
  3708. // See ExecutePolicy for more information on using the ExecutePolicy
  3709. // API call, and error handling.
  3710. //
  3711. // This method is useful when you want to inject custom logic or configuration
  3712. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3713. //
  3714. //
  3715. // // Example sending a request using the ExecutePolicyRequest method.
  3716. // req, resp := client.ExecutePolicyRequest(params)
  3717. //
  3718. // err := req.Send()
  3719. // if err == nil { // resp is now filled
  3720. // fmt.Println(resp)
  3721. // }
  3722. //
  3723. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ExecutePolicy
  3724. func (c *AutoScaling) ExecutePolicyRequest(input *ExecutePolicyInput) (req *request.Request, output *ExecutePolicyOutput) {
  3725. op := &request.Operation{
  3726. Name: opExecutePolicy,
  3727. HTTPMethod: "POST",
  3728. HTTPPath: "/",
  3729. }
  3730. if input == nil {
  3731. input = &ExecutePolicyInput{}
  3732. }
  3733. output = &ExecutePolicyOutput{}
  3734. req = c.newRequest(op, input, output)
  3735. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3736. return
  3737. }
  3738. // ExecutePolicy API operation for Auto Scaling.
  3739. //
  3740. // Executes the specified policy.
  3741. //
  3742. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3743. // with awserr.Error's Code and Message methods to get detailed information about
  3744. // the error.
  3745. //
  3746. // See the AWS API reference guide for Auto Scaling's
  3747. // API operation ExecutePolicy for usage and error information.
  3748. //
  3749. // Returned Error Codes:
  3750. // * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress"
  3751. // The operation can't be performed because there are scaling activities in
  3752. // progress.
  3753. //
  3754. // * ErrCodeResourceContentionFault "ResourceContention"
  3755. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  3756. // (for example, an Auto Scaling group, instance, or load balancer).
  3757. //
  3758. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ExecutePolicy
  3759. func (c *AutoScaling) ExecutePolicy(input *ExecutePolicyInput) (*ExecutePolicyOutput, error) {
  3760. req, out := c.ExecutePolicyRequest(input)
  3761. return out, req.Send()
  3762. }
  3763. // ExecutePolicyWithContext is the same as ExecutePolicy with the addition of
  3764. // the ability to pass a context and additional request options.
  3765. //
  3766. // See ExecutePolicy for details on how to use this API operation.
  3767. //
  3768. // The context must be non-nil and will be used for request cancellation. If
  3769. // the context is nil a panic will occur. In the future the SDK may create
  3770. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3771. // for more information on using Contexts.
  3772. func (c *AutoScaling) ExecutePolicyWithContext(ctx aws.Context, input *ExecutePolicyInput, opts ...request.Option) (*ExecutePolicyOutput, error) {
  3773. req, out := c.ExecutePolicyRequest(input)
  3774. req.SetContext(ctx)
  3775. req.ApplyOptions(opts...)
  3776. return out, req.Send()
  3777. }
  3778. const opExitStandby = "ExitStandby"
  3779. // ExitStandbyRequest generates a "aws/request.Request" representing the
  3780. // client's request for the ExitStandby operation. The "output" return
  3781. // value will be populated with the request's response once the request completes
  3782. // successfully.
  3783. //
  3784. // Use "Send" method on the returned Request to send the API call to the service.
  3785. // the "output" return value is not valid until after Send returns without error.
  3786. //
  3787. // See ExitStandby for more information on using the ExitStandby
  3788. // API call, and error handling.
  3789. //
  3790. // This method is useful when you want to inject custom logic or configuration
  3791. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3792. //
  3793. //
  3794. // // Example sending a request using the ExitStandbyRequest method.
  3795. // req, resp := client.ExitStandbyRequest(params)
  3796. //
  3797. // err := req.Send()
  3798. // if err == nil { // resp is now filled
  3799. // fmt.Println(resp)
  3800. // }
  3801. //
  3802. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ExitStandby
  3803. func (c *AutoScaling) ExitStandbyRequest(input *ExitStandbyInput) (req *request.Request, output *ExitStandbyOutput) {
  3804. op := &request.Operation{
  3805. Name: opExitStandby,
  3806. HTTPMethod: "POST",
  3807. HTTPPath: "/",
  3808. }
  3809. if input == nil {
  3810. input = &ExitStandbyInput{}
  3811. }
  3812. output = &ExitStandbyOutput{}
  3813. req = c.newRequest(op, input, output)
  3814. return
  3815. }
  3816. // ExitStandby API operation for Auto Scaling.
  3817. //
  3818. // Moves the specified instances out of the standby state.
  3819. //
  3820. // After you put the instances back in service, the desired capacity is incremented.
  3821. //
  3822. // For more information, see Temporarily Removing Instances from Your Auto Scaling
  3823. // Group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enter-exit-standby.html)
  3824. // in the Amazon EC2 Auto Scaling User Guide.
  3825. //
  3826. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3827. // with awserr.Error's Code and Message methods to get detailed information about
  3828. // the error.
  3829. //
  3830. // See the AWS API reference guide for Auto Scaling's
  3831. // API operation ExitStandby for usage and error information.
  3832. //
  3833. // Returned Error Codes:
  3834. // * ErrCodeResourceContentionFault "ResourceContention"
  3835. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  3836. // (for example, an Auto Scaling group, instance, or load balancer).
  3837. //
  3838. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ExitStandby
  3839. func (c *AutoScaling) ExitStandby(input *ExitStandbyInput) (*ExitStandbyOutput, error) {
  3840. req, out := c.ExitStandbyRequest(input)
  3841. return out, req.Send()
  3842. }
  3843. // ExitStandbyWithContext is the same as ExitStandby with the addition of
  3844. // the ability to pass a context and additional request options.
  3845. //
  3846. // See ExitStandby for details on how to use this API operation.
  3847. //
  3848. // The context must be non-nil and will be used for request cancellation. If
  3849. // the context is nil a panic will occur. In the future the SDK may create
  3850. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3851. // for more information on using Contexts.
  3852. func (c *AutoScaling) ExitStandbyWithContext(ctx aws.Context, input *ExitStandbyInput, opts ...request.Option) (*ExitStandbyOutput, error) {
  3853. req, out := c.ExitStandbyRequest(input)
  3854. req.SetContext(ctx)
  3855. req.ApplyOptions(opts...)
  3856. return out, req.Send()
  3857. }
  3858. const opPutLifecycleHook = "PutLifecycleHook"
  3859. // PutLifecycleHookRequest generates a "aws/request.Request" representing the
  3860. // client's request for the PutLifecycleHook operation. The "output" return
  3861. // value will be populated with the request's response once the request completes
  3862. // successfully.
  3863. //
  3864. // Use "Send" method on the returned Request to send the API call to the service.
  3865. // the "output" return value is not valid until after Send returns without error.
  3866. //
  3867. // See PutLifecycleHook for more information on using the PutLifecycleHook
  3868. // API call, and error handling.
  3869. //
  3870. // This method is useful when you want to inject custom logic or configuration
  3871. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3872. //
  3873. //
  3874. // // Example sending a request using the PutLifecycleHookRequest method.
  3875. // req, resp := client.PutLifecycleHookRequest(params)
  3876. //
  3877. // err := req.Send()
  3878. // if err == nil { // resp is now filled
  3879. // fmt.Println(resp)
  3880. // }
  3881. //
  3882. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutLifecycleHook
  3883. func (c *AutoScaling) PutLifecycleHookRequest(input *PutLifecycleHookInput) (req *request.Request, output *PutLifecycleHookOutput) {
  3884. op := &request.Operation{
  3885. Name: opPutLifecycleHook,
  3886. HTTPMethod: "POST",
  3887. HTTPPath: "/",
  3888. }
  3889. if input == nil {
  3890. input = &PutLifecycleHookInput{}
  3891. }
  3892. output = &PutLifecycleHookOutput{}
  3893. req = c.newRequest(op, input, output)
  3894. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3895. return
  3896. }
  3897. // PutLifecycleHook API operation for Auto Scaling.
  3898. //
  3899. // Creates or updates a lifecycle hook for the specified Auto Scaling group.
  3900. //
  3901. // A lifecycle hook tells Amazon EC2 Auto Scaling to perform an action on an
  3902. // instance when the instance launches (before it is put into service) or as
  3903. // the instance terminates (before it is fully terminated).
  3904. //
  3905. // This step is a part of the procedure for adding a lifecycle hook to an Auto
  3906. // Scaling group:
  3907. //
  3908. // (Optional) Create a Lambda function and a rule that allows CloudWatch Events
  3909. // to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates
  3910. // instances.
  3911. //
  3912. // (Optional) Create a notification target and an IAM role. The target can be
  3913. // either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon
  3914. // EC2 Auto Scaling to publish lifecycle notifications to the target.
  3915. //
  3916. // Create the lifecycle hook. Specify whether the hook is used when the instances
  3917. // launch or terminate.
  3918. //
  3919. // If you need more time, record the lifecycle action heartbeat to keep the
  3920. // instance in a pending state using RecordLifecycleActionHeartbeat.
  3921. //
  3922. // If you finish before the timeout period ends, complete the lifecycle action
  3923. // using CompleteLifecycleAction.
  3924. //
  3925. // For more information, see Amazon EC2 Auto Scaling Lifecycle Hooks (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html)
  3926. // in the Amazon EC2 Auto Scaling User Guide.
  3927. //
  3928. // If you exceed your maximum limit of lifecycle hooks, which by default is
  3929. // 50 per Auto Scaling group, the call fails.
  3930. //
  3931. // You can view the lifecycle hooks for an Auto Scaling group using DescribeLifecycleHooks.
  3932. // If you are no longer using a lifecycle hook, you can delete it using DeleteLifecycleHook.
  3933. //
  3934. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3935. // with awserr.Error's Code and Message methods to get detailed information about
  3936. // the error.
  3937. //
  3938. // See the AWS API reference guide for Auto Scaling's
  3939. // API operation PutLifecycleHook for usage and error information.
  3940. //
  3941. // Returned Error Codes:
  3942. // * ErrCodeLimitExceededFault "LimitExceeded"
  3943. // You have already reached a limit for your Amazon EC2 Auto Scaling resources
  3944. // (for example, Auto Scaling groups, launch configurations, or lifecycle hooks).
  3945. // For more information, see DescribeAccountLimits.
  3946. //
  3947. // * ErrCodeResourceContentionFault "ResourceContention"
  3948. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  3949. // (for example, an Auto Scaling group, instance, or load balancer).
  3950. //
  3951. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutLifecycleHook
  3952. func (c *AutoScaling) PutLifecycleHook(input *PutLifecycleHookInput) (*PutLifecycleHookOutput, error) {
  3953. req, out := c.PutLifecycleHookRequest(input)
  3954. return out, req.Send()
  3955. }
  3956. // PutLifecycleHookWithContext is the same as PutLifecycleHook with the addition of
  3957. // the ability to pass a context and additional request options.
  3958. //
  3959. // See PutLifecycleHook for details on how to use this API operation.
  3960. //
  3961. // The context must be non-nil and will be used for request cancellation. If
  3962. // the context is nil a panic will occur. In the future the SDK may create
  3963. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3964. // for more information on using Contexts.
  3965. func (c *AutoScaling) PutLifecycleHookWithContext(ctx aws.Context, input *PutLifecycleHookInput, opts ...request.Option) (*PutLifecycleHookOutput, error) {
  3966. req, out := c.PutLifecycleHookRequest(input)
  3967. req.SetContext(ctx)
  3968. req.ApplyOptions(opts...)
  3969. return out, req.Send()
  3970. }
  3971. const opPutNotificationConfiguration = "PutNotificationConfiguration"
  3972. // PutNotificationConfigurationRequest generates a "aws/request.Request" representing the
  3973. // client's request for the PutNotificationConfiguration operation. The "output" return
  3974. // value will be populated with the request's response once the request completes
  3975. // successfully.
  3976. //
  3977. // Use "Send" method on the returned Request to send the API call to the service.
  3978. // the "output" return value is not valid until after Send returns without error.
  3979. //
  3980. // See PutNotificationConfiguration for more information on using the PutNotificationConfiguration
  3981. // API call, and error handling.
  3982. //
  3983. // This method is useful when you want to inject custom logic or configuration
  3984. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3985. //
  3986. //
  3987. // // Example sending a request using the PutNotificationConfigurationRequest method.
  3988. // req, resp := client.PutNotificationConfigurationRequest(params)
  3989. //
  3990. // err := req.Send()
  3991. // if err == nil { // resp is now filled
  3992. // fmt.Println(resp)
  3993. // }
  3994. //
  3995. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutNotificationConfiguration
  3996. func (c *AutoScaling) PutNotificationConfigurationRequest(input *PutNotificationConfigurationInput) (req *request.Request, output *PutNotificationConfigurationOutput) {
  3997. op := &request.Operation{
  3998. Name: opPutNotificationConfiguration,
  3999. HTTPMethod: "POST",
  4000. HTTPPath: "/",
  4001. }
  4002. if input == nil {
  4003. input = &PutNotificationConfigurationInput{}
  4004. }
  4005. output = &PutNotificationConfigurationOutput{}
  4006. req = c.newRequest(op, input, output)
  4007. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4008. return
  4009. }
  4010. // PutNotificationConfiguration API operation for Auto Scaling.
  4011. //
  4012. // Configures an Auto Scaling group to send notifications when specified events
  4013. // take place. Subscribers to the specified topic can have messages delivered
  4014. // to an endpoint such as a web server or an email address.
  4015. //
  4016. // This configuration overwrites any existing configuration.
  4017. //
  4018. // For more information, see Getting Amazon SNS Notifications When Your Auto
  4019. // Scaling Group Scales (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ASGettingNotifications.html)
  4020. // in the Amazon EC2 Auto Scaling User Guide.
  4021. //
  4022. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4023. // with awserr.Error's Code and Message methods to get detailed information about
  4024. // the error.
  4025. //
  4026. // See the AWS API reference guide for Auto Scaling's
  4027. // API operation PutNotificationConfiguration for usage and error information.
  4028. //
  4029. // Returned Error Codes:
  4030. // * ErrCodeLimitExceededFault "LimitExceeded"
  4031. // You have already reached a limit for your Amazon EC2 Auto Scaling resources
  4032. // (for example, Auto Scaling groups, launch configurations, or lifecycle hooks).
  4033. // For more information, see DescribeAccountLimits.
  4034. //
  4035. // * ErrCodeResourceContentionFault "ResourceContention"
  4036. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  4037. // (for example, an Auto Scaling group, instance, or load balancer).
  4038. //
  4039. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  4040. // The service-linked role is not yet ready for use.
  4041. //
  4042. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutNotificationConfiguration
  4043. func (c *AutoScaling) PutNotificationConfiguration(input *PutNotificationConfigurationInput) (*PutNotificationConfigurationOutput, error) {
  4044. req, out := c.PutNotificationConfigurationRequest(input)
  4045. return out, req.Send()
  4046. }
  4047. // PutNotificationConfigurationWithContext is the same as PutNotificationConfiguration with the addition of
  4048. // the ability to pass a context and additional request options.
  4049. //
  4050. // See PutNotificationConfiguration for details on how to use this API operation.
  4051. //
  4052. // The context must be non-nil and will be used for request cancellation. If
  4053. // the context is nil a panic will occur. In the future the SDK may create
  4054. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4055. // for more information on using Contexts.
  4056. func (c *AutoScaling) PutNotificationConfigurationWithContext(ctx aws.Context, input *PutNotificationConfigurationInput, opts ...request.Option) (*PutNotificationConfigurationOutput, error) {
  4057. req, out := c.PutNotificationConfigurationRequest(input)
  4058. req.SetContext(ctx)
  4059. req.ApplyOptions(opts...)
  4060. return out, req.Send()
  4061. }
  4062. const opPutScalingPolicy = "PutScalingPolicy"
  4063. // PutScalingPolicyRequest generates a "aws/request.Request" representing the
  4064. // client's request for the PutScalingPolicy operation. The "output" return
  4065. // value will be populated with the request's response once the request completes
  4066. // successfully.
  4067. //
  4068. // Use "Send" method on the returned Request to send the API call to the service.
  4069. // the "output" return value is not valid until after Send returns without error.
  4070. //
  4071. // See PutScalingPolicy for more information on using the PutScalingPolicy
  4072. // API call, and error handling.
  4073. //
  4074. // This method is useful when you want to inject custom logic or configuration
  4075. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4076. //
  4077. //
  4078. // // Example sending a request using the PutScalingPolicyRequest method.
  4079. // req, resp := client.PutScalingPolicyRequest(params)
  4080. //
  4081. // err := req.Send()
  4082. // if err == nil { // resp is now filled
  4083. // fmt.Println(resp)
  4084. // }
  4085. //
  4086. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutScalingPolicy
  4087. func (c *AutoScaling) PutScalingPolicyRequest(input *PutScalingPolicyInput) (req *request.Request, output *PutScalingPolicyOutput) {
  4088. op := &request.Operation{
  4089. Name: opPutScalingPolicy,
  4090. HTTPMethod: "POST",
  4091. HTTPPath: "/",
  4092. }
  4093. if input == nil {
  4094. input = &PutScalingPolicyInput{}
  4095. }
  4096. output = &PutScalingPolicyOutput{}
  4097. req = c.newRequest(op, input, output)
  4098. return
  4099. }
  4100. // PutScalingPolicy API operation for Auto Scaling.
  4101. //
  4102. // Creates or updates a scaling policy for an Auto Scaling group. To update
  4103. // an existing scaling policy, use the existing policy name and set the parameters
  4104. // to change. Any existing parameter not changed in an update to an existing
  4105. // policy is not changed in this update request.
  4106. //
  4107. // For more information about using scaling policies to scale your Auto Scaling
  4108. // group automatically, see Dynamic Scaling (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scale-based-on-demand.html)
  4109. // in the Amazon EC2 Auto Scaling User Guide.
  4110. //
  4111. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4112. // with awserr.Error's Code and Message methods to get detailed information about
  4113. // the error.
  4114. //
  4115. // See the AWS API reference guide for Auto Scaling's
  4116. // API operation PutScalingPolicy for usage and error information.
  4117. //
  4118. // Returned Error Codes:
  4119. // * ErrCodeLimitExceededFault "LimitExceeded"
  4120. // You have already reached a limit for your Amazon EC2 Auto Scaling resources
  4121. // (for example, Auto Scaling groups, launch configurations, or lifecycle hooks).
  4122. // For more information, see DescribeAccountLimits.
  4123. //
  4124. // * ErrCodeResourceContentionFault "ResourceContention"
  4125. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  4126. // (for example, an Auto Scaling group, instance, or load balancer).
  4127. //
  4128. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  4129. // The service-linked role is not yet ready for use.
  4130. //
  4131. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutScalingPolicy
  4132. func (c *AutoScaling) PutScalingPolicy(input *PutScalingPolicyInput) (*PutScalingPolicyOutput, error) {
  4133. req, out := c.PutScalingPolicyRequest(input)
  4134. return out, req.Send()
  4135. }
  4136. // PutScalingPolicyWithContext is the same as PutScalingPolicy with the addition of
  4137. // the ability to pass a context and additional request options.
  4138. //
  4139. // See PutScalingPolicy for details on how to use this API operation.
  4140. //
  4141. // The context must be non-nil and will be used for request cancellation. If
  4142. // the context is nil a panic will occur. In the future the SDK may create
  4143. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4144. // for more information on using Contexts.
  4145. func (c *AutoScaling) PutScalingPolicyWithContext(ctx aws.Context, input *PutScalingPolicyInput, opts ...request.Option) (*PutScalingPolicyOutput, error) {
  4146. req, out := c.PutScalingPolicyRequest(input)
  4147. req.SetContext(ctx)
  4148. req.ApplyOptions(opts...)
  4149. return out, req.Send()
  4150. }
  4151. const opPutScheduledUpdateGroupAction = "PutScheduledUpdateGroupAction"
  4152. // PutScheduledUpdateGroupActionRequest generates a "aws/request.Request" representing the
  4153. // client's request for the PutScheduledUpdateGroupAction operation. The "output" return
  4154. // value will be populated with the request's response once the request completes
  4155. // successfully.
  4156. //
  4157. // Use "Send" method on the returned Request to send the API call to the service.
  4158. // the "output" return value is not valid until after Send returns without error.
  4159. //
  4160. // See PutScheduledUpdateGroupAction for more information on using the PutScheduledUpdateGroupAction
  4161. // API call, and error handling.
  4162. //
  4163. // This method is useful when you want to inject custom logic or configuration
  4164. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4165. //
  4166. //
  4167. // // Example sending a request using the PutScheduledUpdateGroupActionRequest method.
  4168. // req, resp := client.PutScheduledUpdateGroupActionRequest(params)
  4169. //
  4170. // err := req.Send()
  4171. // if err == nil { // resp is now filled
  4172. // fmt.Println(resp)
  4173. // }
  4174. //
  4175. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutScheduledUpdateGroupAction
  4176. func (c *AutoScaling) PutScheduledUpdateGroupActionRequest(input *PutScheduledUpdateGroupActionInput) (req *request.Request, output *PutScheduledUpdateGroupActionOutput) {
  4177. op := &request.Operation{
  4178. Name: opPutScheduledUpdateGroupAction,
  4179. HTTPMethod: "POST",
  4180. HTTPPath: "/",
  4181. }
  4182. if input == nil {
  4183. input = &PutScheduledUpdateGroupActionInput{}
  4184. }
  4185. output = &PutScheduledUpdateGroupActionOutput{}
  4186. req = c.newRequest(op, input, output)
  4187. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4188. return
  4189. }
  4190. // PutScheduledUpdateGroupAction API operation for Auto Scaling.
  4191. //
  4192. // Creates or updates a scheduled scaling action for an Auto Scaling group.
  4193. // If you leave a parameter unspecified when updating a scheduled scaling action,
  4194. // the corresponding value remains unchanged.
  4195. //
  4196. // For more information, see Scheduled Scaling (https://docs.aws.amazon.com/autoscaling/ec2/userguide/schedule_time.html)
  4197. // in the Amazon EC2 Auto Scaling User Guide.
  4198. //
  4199. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4200. // with awserr.Error's Code and Message methods to get detailed information about
  4201. // the error.
  4202. //
  4203. // See the AWS API reference guide for Auto Scaling's
  4204. // API operation PutScheduledUpdateGroupAction for usage and error information.
  4205. //
  4206. // Returned Error Codes:
  4207. // * ErrCodeAlreadyExistsFault "AlreadyExists"
  4208. // You already have an Auto Scaling group or launch configuration with this
  4209. // name.
  4210. //
  4211. // * ErrCodeLimitExceededFault "LimitExceeded"
  4212. // You have already reached a limit for your Amazon EC2 Auto Scaling resources
  4213. // (for example, Auto Scaling groups, launch configurations, or lifecycle hooks).
  4214. // For more information, see DescribeAccountLimits.
  4215. //
  4216. // * ErrCodeResourceContentionFault "ResourceContention"
  4217. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  4218. // (for example, an Auto Scaling group, instance, or load balancer).
  4219. //
  4220. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutScheduledUpdateGroupAction
  4221. func (c *AutoScaling) PutScheduledUpdateGroupAction(input *PutScheduledUpdateGroupActionInput) (*PutScheduledUpdateGroupActionOutput, error) {
  4222. req, out := c.PutScheduledUpdateGroupActionRequest(input)
  4223. return out, req.Send()
  4224. }
  4225. // PutScheduledUpdateGroupActionWithContext is the same as PutScheduledUpdateGroupAction with the addition of
  4226. // the ability to pass a context and additional request options.
  4227. //
  4228. // See PutScheduledUpdateGroupAction for details on how to use this API operation.
  4229. //
  4230. // The context must be non-nil and will be used for request cancellation. If
  4231. // the context is nil a panic will occur. In the future the SDK may create
  4232. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4233. // for more information on using Contexts.
  4234. func (c *AutoScaling) PutScheduledUpdateGroupActionWithContext(ctx aws.Context, input *PutScheduledUpdateGroupActionInput, opts ...request.Option) (*PutScheduledUpdateGroupActionOutput, error) {
  4235. req, out := c.PutScheduledUpdateGroupActionRequest(input)
  4236. req.SetContext(ctx)
  4237. req.ApplyOptions(opts...)
  4238. return out, req.Send()
  4239. }
  4240. const opRecordLifecycleActionHeartbeat = "RecordLifecycleActionHeartbeat"
  4241. // RecordLifecycleActionHeartbeatRequest generates a "aws/request.Request" representing the
  4242. // client's request for the RecordLifecycleActionHeartbeat operation. The "output" return
  4243. // value will be populated with the request's response once the request completes
  4244. // successfully.
  4245. //
  4246. // Use "Send" method on the returned Request to send the API call to the service.
  4247. // the "output" return value is not valid until after Send returns without error.
  4248. //
  4249. // See RecordLifecycleActionHeartbeat for more information on using the RecordLifecycleActionHeartbeat
  4250. // API call, and error handling.
  4251. //
  4252. // This method is useful when you want to inject custom logic or configuration
  4253. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4254. //
  4255. //
  4256. // // Example sending a request using the RecordLifecycleActionHeartbeatRequest method.
  4257. // req, resp := client.RecordLifecycleActionHeartbeatRequest(params)
  4258. //
  4259. // err := req.Send()
  4260. // if err == nil { // resp is now filled
  4261. // fmt.Println(resp)
  4262. // }
  4263. //
  4264. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/RecordLifecycleActionHeartbeat
  4265. func (c *AutoScaling) RecordLifecycleActionHeartbeatRequest(input *RecordLifecycleActionHeartbeatInput) (req *request.Request, output *RecordLifecycleActionHeartbeatOutput) {
  4266. op := &request.Operation{
  4267. Name: opRecordLifecycleActionHeartbeat,
  4268. HTTPMethod: "POST",
  4269. HTTPPath: "/",
  4270. }
  4271. if input == nil {
  4272. input = &RecordLifecycleActionHeartbeatInput{}
  4273. }
  4274. output = &RecordLifecycleActionHeartbeatOutput{}
  4275. req = c.newRequest(op, input, output)
  4276. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4277. return
  4278. }
  4279. // RecordLifecycleActionHeartbeat API operation for Auto Scaling.
  4280. //
  4281. // Records a heartbeat for the lifecycle action associated with the specified
  4282. // token or instance. This extends the timeout by the length of time defined
  4283. // using PutLifecycleHook.
  4284. //
  4285. // This step is a part of the procedure for adding a lifecycle hook to an Auto
  4286. // Scaling group:
  4287. //
  4288. // (Optional) Create a Lambda function and a rule that allows CloudWatch Events
  4289. // to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates
  4290. // instances.
  4291. //
  4292. // (Optional) Create a notification target and an IAM role. The target can be
  4293. // either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon
  4294. // EC2 Auto Scaling to publish lifecycle notifications to the target.
  4295. //
  4296. // Create the lifecycle hook. Specify whether the hook is used when the instances
  4297. // launch or terminate.
  4298. //
  4299. // If you need more time, record the lifecycle action heartbeat to keep the
  4300. // instance in a pending state.
  4301. //
  4302. // If you finish before the timeout period ends, complete the lifecycle action.
  4303. //
  4304. // For more information, see Auto Scaling Lifecycle (https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html)
  4305. // in the Amazon EC2 Auto Scaling User Guide.
  4306. //
  4307. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4308. // with awserr.Error's Code and Message methods to get detailed information about
  4309. // the error.
  4310. //
  4311. // See the AWS API reference guide for Auto Scaling's
  4312. // API operation RecordLifecycleActionHeartbeat for usage and error information.
  4313. //
  4314. // Returned Error Codes:
  4315. // * ErrCodeResourceContentionFault "ResourceContention"
  4316. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  4317. // (for example, an Auto Scaling group, instance, or load balancer).
  4318. //
  4319. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/RecordLifecycleActionHeartbeat
  4320. func (c *AutoScaling) RecordLifecycleActionHeartbeat(input *RecordLifecycleActionHeartbeatInput) (*RecordLifecycleActionHeartbeatOutput, error) {
  4321. req, out := c.RecordLifecycleActionHeartbeatRequest(input)
  4322. return out, req.Send()
  4323. }
  4324. // RecordLifecycleActionHeartbeatWithContext is the same as RecordLifecycleActionHeartbeat with the addition of
  4325. // the ability to pass a context and additional request options.
  4326. //
  4327. // See RecordLifecycleActionHeartbeat for details on how to use this API operation.
  4328. //
  4329. // The context must be non-nil and will be used for request cancellation. If
  4330. // the context is nil a panic will occur. In the future the SDK may create
  4331. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4332. // for more information on using Contexts.
  4333. func (c *AutoScaling) RecordLifecycleActionHeartbeatWithContext(ctx aws.Context, input *RecordLifecycleActionHeartbeatInput, opts ...request.Option) (*RecordLifecycleActionHeartbeatOutput, error) {
  4334. req, out := c.RecordLifecycleActionHeartbeatRequest(input)
  4335. req.SetContext(ctx)
  4336. req.ApplyOptions(opts...)
  4337. return out, req.Send()
  4338. }
  4339. const opResumeProcesses = "ResumeProcesses"
  4340. // ResumeProcessesRequest generates a "aws/request.Request" representing the
  4341. // client's request for the ResumeProcesses operation. The "output" return
  4342. // value will be populated with the request's response once the request completes
  4343. // successfully.
  4344. //
  4345. // Use "Send" method on the returned Request to send the API call to the service.
  4346. // the "output" return value is not valid until after Send returns without error.
  4347. //
  4348. // See ResumeProcesses for more information on using the ResumeProcesses
  4349. // API call, and error handling.
  4350. //
  4351. // This method is useful when you want to inject custom logic or configuration
  4352. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4353. //
  4354. //
  4355. // // Example sending a request using the ResumeProcessesRequest method.
  4356. // req, resp := client.ResumeProcessesRequest(params)
  4357. //
  4358. // err := req.Send()
  4359. // if err == nil { // resp is now filled
  4360. // fmt.Println(resp)
  4361. // }
  4362. //
  4363. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ResumeProcesses
  4364. func (c *AutoScaling) ResumeProcessesRequest(input *ScalingProcessQuery) (req *request.Request, output *ResumeProcessesOutput) {
  4365. op := &request.Operation{
  4366. Name: opResumeProcesses,
  4367. HTTPMethod: "POST",
  4368. HTTPPath: "/",
  4369. }
  4370. if input == nil {
  4371. input = &ScalingProcessQuery{}
  4372. }
  4373. output = &ResumeProcessesOutput{}
  4374. req = c.newRequest(op, input, output)
  4375. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4376. return
  4377. }
  4378. // ResumeProcesses API operation for Auto Scaling.
  4379. //
  4380. // Resumes the specified suspended automatic scaling processes, or all suspended
  4381. // process, for the specified Auto Scaling group.
  4382. //
  4383. // For more information, see Suspending and Resuming Scaling Processes (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html)
  4384. // in the Amazon EC2 Auto Scaling User Guide.
  4385. //
  4386. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4387. // with awserr.Error's Code and Message methods to get detailed information about
  4388. // the error.
  4389. //
  4390. // See the AWS API reference guide for Auto Scaling's
  4391. // API operation ResumeProcesses for usage and error information.
  4392. //
  4393. // Returned Error Codes:
  4394. // * ErrCodeResourceInUseFault "ResourceInUse"
  4395. // The operation can't be performed because the resource is in use.
  4396. //
  4397. // * ErrCodeResourceContentionFault "ResourceContention"
  4398. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  4399. // (for example, an Auto Scaling group, instance, or load balancer).
  4400. //
  4401. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/ResumeProcesses
  4402. func (c *AutoScaling) ResumeProcesses(input *ScalingProcessQuery) (*ResumeProcessesOutput, error) {
  4403. req, out := c.ResumeProcessesRequest(input)
  4404. return out, req.Send()
  4405. }
  4406. // ResumeProcessesWithContext is the same as ResumeProcesses with the addition of
  4407. // the ability to pass a context and additional request options.
  4408. //
  4409. // See ResumeProcesses for details on how to use this API operation.
  4410. //
  4411. // The context must be non-nil and will be used for request cancellation. If
  4412. // the context is nil a panic will occur. In the future the SDK may create
  4413. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4414. // for more information on using Contexts.
  4415. func (c *AutoScaling) ResumeProcessesWithContext(ctx aws.Context, input *ScalingProcessQuery, opts ...request.Option) (*ResumeProcessesOutput, error) {
  4416. req, out := c.ResumeProcessesRequest(input)
  4417. req.SetContext(ctx)
  4418. req.ApplyOptions(opts...)
  4419. return out, req.Send()
  4420. }
  4421. const opSetDesiredCapacity = "SetDesiredCapacity"
  4422. // SetDesiredCapacityRequest generates a "aws/request.Request" representing the
  4423. // client's request for the SetDesiredCapacity operation. The "output" return
  4424. // value will be populated with the request's response once the request completes
  4425. // successfully.
  4426. //
  4427. // Use "Send" method on the returned Request to send the API call to the service.
  4428. // the "output" return value is not valid until after Send returns without error.
  4429. //
  4430. // See SetDesiredCapacity for more information on using the SetDesiredCapacity
  4431. // API call, and error handling.
  4432. //
  4433. // This method is useful when you want to inject custom logic or configuration
  4434. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4435. //
  4436. //
  4437. // // Example sending a request using the SetDesiredCapacityRequest method.
  4438. // req, resp := client.SetDesiredCapacityRequest(params)
  4439. //
  4440. // err := req.Send()
  4441. // if err == nil { // resp is now filled
  4442. // fmt.Println(resp)
  4443. // }
  4444. //
  4445. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetDesiredCapacity
  4446. func (c *AutoScaling) SetDesiredCapacityRequest(input *SetDesiredCapacityInput) (req *request.Request, output *SetDesiredCapacityOutput) {
  4447. op := &request.Operation{
  4448. Name: opSetDesiredCapacity,
  4449. HTTPMethod: "POST",
  4450. HTTPPath: "/",
  4451. }
  4452. if input == nil {
  4453. input = &SetDesiredCapacityInput{}
  4454. }
  4455. output = &SetDesiredCapacityOutput{}
  4456. req = c.newRequest(op, input, output)
  4457. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4458. return
  4459. }
  4460. // SetDesiredCapacity API operation for Auto Scaling.
  4461. //
  4462. // Sets the size of the specified Auto Scaling group.
  4463. //
  4464. // For more information about desired capacity, see What Is Amazon EC2 Auto
  4465. // Scaling? (https://docs.aws.amazon.com/autoscaling/ec2/userguide/what-is-amazon-ec2-auto-scaling.html)
  4466. // in the Amazon EC2 Auto Scaling User Guide.
  4467. //
  4468. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4469. // with awserr.Error's Code and Message methods to get detailed information about
  4470. // the error.
  4471. //
  4472. // See the AWS API reference guide for Auto Scaling's
  4473. // API operation SetDesiredCapacity for usage and error information.
  4474. //
  4475. // Returned Error Codes:
  4476. // * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress"
  4477. // The operation can't be performed because there are scaling activities in
  4478. // progress.
  4479. //
  4480. // * ErrCodeResourceContentionFault "ResourceContention"
  4481. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  4482. // (for example, an Auto Scaling group, instance, or load balancer).
  4483. //
  4484. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetDesiredCapacity
  4485. func (c *AutoScaling) SetDesiredCapacity(input *SetDesiredCapacityInput) (*SetDesiredCapacityOutput, error) {
  4486. req, out := c.SetDesiredCapacityRequest(input)
  4487. return out, req.Send()
  4488. }
  4489. // SetDesiredCapacityWithContext is the same as SetDesiredCapacity with the addition of
  4490. // the ability to pass a context and additional request options.
  4491. //
  4492. // See SetDesiredCapacity for details on how to use this API operation.
  4493. //
  4494. // The context must be non-nil and will be used for request cancellation. If
  4495. // the context is nil a panic will occur. In the future the SDK may create
  4496. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4497. // for more information on using Contexts.
  4498. func (c *AutoScaling) SetDesiredCapacityWithContext(ctx aws.Context, input *SetDesiredCapacityInput, opts ...request.Option) (*SetDesiredCapacityOutput, error) {
  4499. req, out := c.SetDesiredCapacityRequest(input)
  4500. req.SetContext(ctx)
  4501. req.ApplyOptions(opts...)
  4502. return out, req.Send()
  4503. }
  4504. const opSetInstanceHealth = "SetInstanceHealth"
  4505. // SetInstanceHealthRequest generates a "aws/request.Request" representing the
  4506. // client's request for the SetInstanceHealth operation. The "output" return
  4507. // value will be populated with the request's response once the request completes
  4508. // successfully.
  4509. //
  4510. // Use "Send" method on the returned Request to send the API call to the service.
  4511. // the "output" return value is not valid until after Send returns without error.
  4512. //
  4513. // See SetInstanceHealth for more information on using the SetInstanceHealth
  4514. // API call, and error handling.
  4515. //
  4516. // This method is useful when you want to inject custom logic or configuration
  4517. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4518. //
  4519. //
  4520. // // Example sending a request using the SetInstanceHealthRequest method.
  4521. // req, resp := client.SetInstanceHealthRequest(params)
  4522. //
  4523. // err := req.Send()
  4524. // if err == nil { // resp is now filled
  4525. // fmt.Println(resp)
  4526. // }
  4527. //
  4528. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetInstanceHealth
  4529. func (c *AutoScaling) SetInstanceHealthRequest(input *SetInstanceHealthInput) (req *request.Request, output *SetInstanceHealthOutput) {
  4530. op := &request.Operation{
  4531. Name: opSetInstanceHealth,
  4532. HTTPMethod: "POST",
  4533. HTTPPath: "/",
  4534. }
  4535. if input == nil {
  4536. input = &SetInstanceHealthInput{}
  4537. }
  4538. output = &SetInstanceHealthOutput{}
  4539. req = c.newRequest(op, input, output)
  4540. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4541. return
  4542. }
  4543. // SetInstanceHealth API operation for Auto Scaling.
  4544. //
  4545. // Sets the health status of the specified instance.
  4546. //
  4547. // For more information, see Health Checks for Auto Scaling Instances (https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html)
  4548. // in the Amazon EC2 Auto Scaling User Guide.
  4549. //
  4550. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4551. // with awserr.Error's Code and Message methods to get detailed information about
  4552. // the error.
  4553. //
  4554. // See the AWS API reference guide for Auto Scaling's
  4555. // API operation SetInstanceHealth for usage and error information.
  4556. //
  4557. // Returned Error Codes:
  4558. // * ErrCodeResourceContentionFault "ResourceContention"
  4559. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  4560. // (for example, an Auto Scaling group, instance, or load balancer).
  4561. //
  4562. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetInstanceHealth
  4563. func (c *AutoScaling) SetInstanceHealth(input *SetInstanceHealthInput) (*SetInstanceHealthOutput, error) {
  4564. req, out := c.SetInstanceHealthRequest(input)
  4565. return out, req.Send()
  4566. }
  4567. // SetInstanceHealthWithContext is the same as SetInstanceHealth with the addition of
  4568. // the ability to pass a context and additional request options.
  4569. //
  4570. // See SetInstanceHealth for details on how to use this API operation.
  4571. //
  4572. // The context must be non-nil and will be used for request cancellation. If
  4573. // the context is nil a panic will occur. In the future the SDK may create
  4574. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4575. // for more information on using Contexts.
  4576. func (c *AutoScaling) SetInstanceHealthWithContext(ctx aws.Context, input *SetInstanceHealthInput, opts ...request.Option) (*SetInstanceHealthOutput, error) {
  4577. req, out := c.SetInstanceHealthRequest(input)
  4578. req.SetContext(ctx)
  4579. req.ApplyOptions(opts...)
  4580. return out, req.Send()
  4581. }
  4582. const opSetInstanceProtection = "SetInstanceProtection"
  4583. // SetInstanceProtectionRequest generates a "aws/request.Request" representing the
  4584. // client's request for the SetInstanceProtection operation. The "output" return
  4585. // value will be populated with the request's response once the request completes
  4586. // successfully.
  4587. //
  4588. // Use "Send" method on the returned Request to send the API call to the service.
  4589. // the "output" return value is not valid until after Send returns without error.
  4590. //
  4591. // See SetInstanceProtection for more information on using the SetInstanceProtection
  4592. // API call, and error handling.
  4593. //
  4594. // This method is useful when you want to inject custom logic or configuration
  4595. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4596. //
  4597. //
  4598. // // Example sending a request using the SetInstanceProtectionRequest method.
  4599. // req, resp := client.SetInstanceProtectionRequest(params)
  4600. //
  4601. // err := req.Send()
  4602. // if err == nil { // resp is now filled
  4603. // fmt.Println(resp)
  4604. // }
  4605. //
  4606. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetInstanceProtection
  4607. func (c *AutoScaling) SetInstanceProtectionRequest(input *SetInstanceProtectionInput) (req *request.Request, output *SetInstanceProtectionOutput) {
  4608. op := &request.Operation{
  4609. Name: opSetInstanceProtection,
  4610. HTTPMethod: "POST",
  4611. HTTPPath: "/",
  4612. }
  4613. if input == nil {
  4614. input = &SetInstanceProtectionInput{}
  4615. }
  4616. output = &SetInstanceProtectionOutput{}
  4617. req = c.newRequest(op, input, output)
  4618. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4619. return
  4620. }
  4621. // SetInstanceProtection API operation for Auto Scaling.
  4622. //
  4623. // Updates the instance protection settings of the specified instances.
  4624. //
  4625. // For more information about preventing instances that are part of an Auto
  4626. // Scaling group from terminating on scale in, see Instance Protection (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection)
  4627. // in the Amazon EC2 Auto Scaling User Guide.
  4628. //
  4629. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4630. // with awserr.Error's Code and Message methods to get detailed information about
  4631. // the error.
  4632. //
  4633. // See the AWS API reference guide for Auto Scaling's
  4634. // API operation SetInstanceProtection for usage and error information.
  4635. //
  4636. // Returned Error Codes:
  4637. // * ErrCodeLimitExceededFault "LimitExceeded"
  4638. // You have already reached a limit for your Amazon EC2 Auto Scaling resources
  4639. // (for example, Auto Scaling groups, launch configurations, or lifecycle hooks).
  4640. // For more information, see DescribeAccountLimits.
  4641. //
  4642. // * ErrCodeResourceContentionFault "ResourceContention"
  4643. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  4644. // (for example, an Auto Scaling group, instance, or load balancer).
  4645. //
  4646. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SetInstanceProtection
  4647. func (c *AutoScaling) SetInstanceProtection(input *SetInstanceProtectionInput) (*SetInstanceProtectionOutput, error) {
  4648. req, out := c.SetInstanceProtectionRequest(input)
  4649. return out, req.Send()
  4650. }
  4651. // SetInstanceProtectionWithContext is the same as SetInstanceProtection with the addition of
  4652. // the ability to pass a context and additional request options.
  4653. //
  4654. // See SetInstanceProtection for details on how to use this API operation.
  4655. //
  4656. // The context must be non-nil and will be used for request cancellation. If
  4657. // the context is nil a panic will occur. In the future the SDK may create
  4658. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4659. // for more information on using Contexts.
  4660. func (c *AutoScaling) SetInstanceProtectionWithContext(ctx aws.Context, input *SetInstanceProtectionInput, opts ...request.Option) (*SetInstanceProtectionOutput, error) {
  4661. req, out := c.SetInstanceProtectionRequest(input)
  4662. req.SetContext(ctx)
  4663. req.ApplyOptions(opts...)
  4664. return out, req.Send()
  4665. }
  4666. const opSuspendProcesses = "SuspendProcesses"
  4667. // SuspendProcessesRequest generates a "aws/request.Request" representing the
  4668. // client's request for the SuspendProcesses operation. The "output" return
  4669. // value will be populated with the request's response once the request completes
  4670. // successfully.
  4671. //
  4672. // Use "Send" method on the returned Request to send the API call to the service.
  4673. // the "output" return value is not valid until after Send returns without error.
  4674. //
  4675. // See SuspendProcesses for more information on using the SuspendProcesses
  4676. // API call, and error handling.
  4677. //
  4678. // This method is useful when you want to inject custom logic or configuration
  4679. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4680. //
  4681. //
  4682. // // Example sending a request using the SuspendProcessesRequest method.
  4683. // req, resp := client.SuspendProcessesRequest(params)
  4684. //
  4685. // err := req.Send()
  4686. // if err == nil { // resp is now filled
  4687. // fmt.Println(resp)
  4688. // }
  4689. //
  4690. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SuspendProcesses
  4691. func (c *AutoScaling) SuspendProcessesRequest(input *ScalingProcessQuery) (req *request.Request, output *SuspendProcessesOutput) {
  4692. op := &request.Operation{
  4693. Name: opSuspendProcesses,
  4694. HTTPMethod: "POST",
  4695. HTTPPath: "/",
  4696. }
  4697. if input == nil {
  4698. input = &ScalingProcessQuery{}
  4699. }
  4700. output = &SuspendProcessesOutput{}
  4701. req = c.newRequest(op, input, output)
  4702. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4703. return
  4704. }
  4705. // SuspendProcesses API operation for Auto Scaling.
  4706. //
  4707. // Suspends the specified automatic scaling processes, or all processes, for
  4708. // the specified Auto Scaling group.
  4709. //
  4710. // If you suspend either the Launch or Terminate process types, it can prevent
  4711. // other process types from functioning properly.
  4712. //
  4713. // To resume processes that have been suspended, use ResumeProcesses.
  4714. //
  4715. // For more information, see Suspending and Resuming Scaling Processes (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html)
  4716. // in the Amazon EC2 Auto Scaling User Guide.
  4717. //
  4718. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4719. // with awserr.Error's Code and Message methods to get detailed information about
  4720. // the error.
  4721. //
  4722. // See the AWS API reference guide for Auto Scaling's
  4723. // API operation SuspendProcesses for usage and error information.
  4724. //
  4725. // Returned Error Codes:
  4726. // * ErrCodeResourceInUseFault "ResourceInUse"
  4727. // The operation can't be performed because the resource is in use.
  4728. //
  4729. // * ErrCodeResourceContentionFault "ResourceContention"
  4730. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  4731. // (for example, an Auto Scaling group, instance, or load balancer).
  4732. //
  4733. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/SuspendProcesses
  4734. func (c *AutoScaling) SuspendProcesses(input *ScalingProcessQuery) (*SuspendProcessesOutput, error) {
  4735. req, out := c.SuspendProcessesRequest(input)
  4736. return out, req.Send()
  4737. }
  4738. // SuspendProcessesWithContext is the same as SuspendProcesses with the addition of
  4739. // the ability to pass a context and additional request options.
  4740. //
  4741. // See SuspendProcesses for details on how to use this API operation.
  4742. //
  4743. // The context must be non-nil and will be used for request cancellation. If
  4744. // the context is nil a panic will occur. In the future the SDK may create
  4745. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4746. // for more information on using Contexts.
  4747. func (c *AutoScaling) SuspendProcessesWithContext(ctx aws.Context, input *ScalingProcessQuery, opts ...request.Option) (*SuspendProcessesOutput, error) {
  4748. req, out := c.SuspendProcessesRequest(input)
  4749. req.SetContext(ctx)
  4750. req.ApplyOptions(opts...)
  4751. return out, req.Send()
  4752. }
  4753. const opTerminateInstanceInAutoScalingGroup = "TerminateInstanceInAutoScalingGroup"
  4754. // TerminateInstanceInAutoScalingGroupRequest generates a "aws/request.Request" representing the
  4755. // client's request for the TerminateInstanceInAutoScalingGroup operation. The "output" return
  4756. // value will be populated with the request's response once the request completes
  4757. // successfully.
  4758. //
  4759. // Use "Send" method on the returned Request to send the API call to the service.
  4760. // the "output" return value is not valid until after Send returns without error.
  4761. //
  4762. // See TerminateInstanceInAutoScalingGroup for more information on using the TerminateInstanceInAutoScalingGroup
  4763. // API call, and error handling.
  4764. //
  4765. // This method is useful when you want to inject custom logic or configuration
  4766. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4767. //
  4768. //
  4769. // // Example sending a request using the TerminateInstanceInAutoScalingGroupRequest method.
  4770. // req, resp := client.TerminateInstanceInAutoScalingGroupRequest(params)
  4771. //
  4772. // err := req.Send()
  4773. // if err == nil { // resp is now filled
  4774. // fmt.Println(resp)
  4775. // }
  4776. //
  4777. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/TerminateInstanceInAutoScalingGroup
  4778. func (c *AutoScaling) TerminateInstanceInAutoScalingGroupRequest(input *TerminateInstanceInAutoScalingGroupInput) (req *request.Request, output *TerminateInstanceInAutoScalingGroupOutput) {
  4779. op := &request.Operation{
  4780. Name: opTerminateInstanceInAutoScalingGroup,
  4781. HTTPMethod: "POST",
  4782. HTTPPath: "/",
  4783. }
  4784. if input == nil {
  4785. input = &TerminateInstanceInAutoScalingGroupInput{}
  4786. }
  4787. output = &TerminateInstanceInAutoScalingGroupOutput{}
  4788. req = c.newRequest(op, input, output)
  4789. return
  4790. }
  4791. // TerminateInstanceInAutoScalingGroup API operation for Auto Scaling.
  4792. //
  4793. // Terminates the specified instance and optionally adjusts the desired group
  4794. // size.
  4795. //
  4796. // This call simply makes a termination request. The instance is not terminated
  4797. // immediately.
  4798. //
  4799. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4800. // with awserr.Error's Code and Message methods to get detailed information about
  4801. // the error.
  4802. //
  4803. // See the AWS API reference guide for Auto Scaling's
  4804. // API operation TerminateInstanceInAutoScalingGroup for usage and error information.
  4805. //
  4806. // Returned Error Codes:
  4807. // * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress"
  4808. // The operation can't be performed because there are scaling activities in
  4809. // progress.
  4810. //
  4811. // * ErrCodeResourceContentionFault "ResourceContention"
  4812. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  4813. // (for example, an Auto Scaling group, instance, or load balancer).
  4814. //
  4815. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/TerminateInstanceInAutoScalingGroup
  4816. func (c *AutoScaling) TerminateInstanceInAutoScalingGroup(input *TerminateInstanceInAutoScalingGroupInput) (*TerminateInstanceInAutoScalingGroupOutput, error) {
  4817. req, out := c.TerminateInstanceInAutoScalingGroupRequest(input)
  4818. return out, req.Send()
  4819. }
  4820. // TerminateInstanceInAutoScalingGroupWithContext is the same as TerminateInstanceInAutoScalingGroup with the addition of
  4821. // the ability to pass a context and additional request options.
  4822. //
  4823. // See TerminateInstanceInAutoScalingGroup for details on how to use this API operation.
  4824. //
  4825. // The context must be non-nil and will be used for request cancellation. If
  4826. // the context is nil a panic will occur. In the future the SDK may create
  4827. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4828. // for more information on using Contexts.
  4829. func (c *AutoScaling) TerminateInstanceInAutoScalingGroupWithContext(ctx aws.Context, input *TerminateInstanceInAutoScalingGroupInput, opts ...request.Option) (*TerminateInstanceInAutoScalingGroupOutput, error) {
  4830. req, out := c.TerminateInstanceInAutoScalingGroupRequest(input)
  4831. req.SetContext(ctx)
  4832. req.ApplyOptions(opts...)
  4833. return out, req.Send()
  4834. }
  4835. const opUpdateAutoScalingGroup = "UpdateAutoScalingGroup"
  4836. // UpdateAutoScalingGroupRequest generates a "aws/request.Request" representing the
  4837. // client's request for the UpdateAutoScalingGroup operation. The "output" return
  4838. // value will be populated with the request's response once the request completes
  4839. // successfully.
  4840. //
  4841. // Use "Send" method on the returned Request to send the API call to the service.
  4842. // the "output" return value is not valid until after Send returns without error.
  4843. //
  4844. // See UpdateAutoScalingGroup for more information on using the UpdateAutoScalingGroup
  4845. // API call, and error handling.
  4846. //
  4847. // This method is useful when you want to inject custom logic or configuration
  4848. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4849. //
  4850. //
  4851. // // Example sending a request using the UpdateAutoScalingGroupRequest method.
  4852. // req, resp := client.UpdateAutoScalingGroupRequest(params)
  4853. //
  4854. // err := req.Send()
  4855. // if err == nil { // resp is now filled
  4856. // fmt.Println(resp)
  4857. // }
  4858. //
  4859. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/UpdateAutoScalingGroup
  4860. func (c *AutoScaling) UpdateAutoScalingGroupRequest(input *UpdateAutoScalingGroupInput) (req *request.Request, output *UpdateAutoScalingGroupOutput) {
  4861. op := &request.Operation{
  4862. Name: opUpdateAutoScalingGroup,
  4863. HTTPMethod: "POST",
  4864. HTTPPath: "/",
  4865. }
  4866. if input == nil {
  4867. input = &UpdateAutoScalingGroupInput{}
  4868. }
  4869. output = &UpdateAutoScalingGroupOutput{}
  4870. req = c.newRequest(op, input, output)
  4871. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4872. return
  4873. }
  4874. // UpdateAutoScalingGroup API operation for Auto Scaling.
  4875. //
  4876. // Updates the configuration for the specified Auto Scaling group.
  4877. //
  4878. // To update an Auto Scaling group, specify the name of the group and the parameter
  4879. // that you want to change. Any parameters that you don't specify are not changed
  4880. // by this update request. The new settings take effect on any scaling activities
  4881. // after this call returns.
  4882. //
  4883. // If you associate a new launch configuration or template with an Auto Scaling
  4884. // group, all new instances will get the updated configuration. Existing instances
  4885. // continue to run with the configuration that they were originally launched
  4886. // with. When you update a group to specify a mixed instances policy instead
  4887. // of a launch configuration or template, existing instances may be replaced
  4888. // to match the new purchasing options that you specified in the policy. For
  4889. // example, if the group currently has 100% On-Demand capacity and the policy
  4890. // specifies 50% Spot capacity, this means that half of your instances will
  4891. // be gradually terminated and relaunched as Spot Instances. When replacing
  4892. // instances, Amazon EC2 Auto Scaling launches new instances before terminating
  4893. // the old ones, so that updating your group does not compromise the performance
  4894. // or availability of your application.
  4895. //
  4896. // Note the following about changing DesiredCapacity, MaxSize, or MinSize:
  4897. //
  4898. // * If a scale-in event occurs as a result of a new DesiredCapacity value
  4899. // that is lower than the current size of the group, the Auto Scaling group
  4900. // uses its termination policy to determine which instances to terminate.
  4901. //
  4902. // * If you specify a new value for MinSize without specifying a value for
  4903. // DesiredCapacity, and the new MinSize is larger than the current size of
  4904. // the group, this sets the group's DesiredCapacity to the new MinSize value.
  4905. //
  4906. // * If you specify a new value for MaxSize without specifying a value for
  4907. // DesiredCapacity, and the new MaxSize is smaller than the current size
  4908. // of the group, this sets the group's DesiredCapacity to the new MaxSize
  4909. // value.
  4910. //
  4911. // To see which parameters have been set, use DescribeAutoScalingGroups. You
  4912. // can also view the scaling policies for an Auto Scaling group using DescribePolicies.
  4913. // If the group has scaling policies, you can update them using PutScalingPolicy.
  4914. //
  4915. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4916. // with awserr.Error's Code and Message methods to get detailed information about
  4917. // the error.
  4918. //
  4919. // See the AWS API reference guide for Auto Scaling's
  4920. // API operation UpdateAutoScalingGroup for usage and error information.
  4921. //
  4922. // Returned Error Codes:
  4923. // * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress"
  4924. // The operation can't be performed because there are scaling activities in
  4925. // progress.
  4926. //
  4927. // * ErrCodeResourceContentionFault "ResourceContention"
  4928. // You already have a pending update to an Amazon EC2 Auto Scaling resource
  4929. // (for example, an Auto Scaling group, instance, or load balancer).
  4930. //
  4931. // * ErrCodeServiceLinkedRoleFailure "ServiceLinkedRoleFailure"
  4932. // The service-linked role is not yet ready for use.
  4933. //
  4934. // See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/UpdateAutoScalingGroup
  4935. func (c *AutoScaling) UpdateAutoScalingGroup(input *UpdateAutoScalingGroupInput) (*UpdateAutoScalingGroupOutput, error) {
  4936. req, out := c.UpdateAutoScalingGroupRequest(input)
  4937. return out, req.Send()
  4938. }
  4939. // UpdateAutoScalingGroupWithContext is the same as UpdateAutoScalingGroup with the addition of
  4940. // the ability to pass a context and additional request options.
  4941. //
  4942. // See UpdateAutoScalingGroup for details on how to use this API operation.
  4943. //
  4944. // The context must be non-nil and will be used for request cancellation. If
  4945. // the context is nil a panic will occur. In the future the SDK may create
  4946. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4947. // for more information on using Contexts.
  4948. func (c *AutoScaling) UpdateAutoScalingGroupWithContext(ctx aws.Context, input *UpdateAutoScalingGroupInput, opts ...request.Option) (*UpdateAutoScalingGroupOutput, error) {
  4949. req, out := c.UpdateAutoScalingGroupRequest(input)
  4950. req.SetContext(ctx)
  4951. req.ApplyOptions(opts...)
  4952. return out, req.Send()
  4953. }
  4954. // Describes scaling activity, which is a long-running process that represents
  4955. // a change to your Auto Scaling group, such as changing its size or replacing
  4956. // an instance.
  4957. type Activity struct {
  4958. _ struct{} `type:"structure"`
  4959. // The ID of the activity.
  4960. //
  4961. // ActivityId is a required field
  4962. ActivityId *string `type:"string" required:"true"`
  4963. // The name of the Auto Scaling group.
  4964. //
  4965. // AutoScalingGroupName is a required field
  4966. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  4967. // The reason the activity began.
  4968. //
  4969. // Cause is a required field
  4970. Cause *string `min:"1" type:"string" required:"true"`
  4971. // A friendly, more verbose description of the activity.
  4972. Description *string `type:"string"`
  4973. // The details about the activity.
  4974. Details *string `type:"string"`
  4975. // The end time of the activity.
  4976. EndTime *time.Time `type:"timestamp"`
  4977. // A value between 0 and 100 that indicates the progress of the activity.
  4978. Progress *int64 `type:"integer"`
  4979. // The start time of the activity.
  4980. //
  4981. // StartTime is a required field
  4982. StartTime *time.Time `type:"timestamp" required:"true"`
  4983. // The current status of the activity.
  4984. //
  4985. // StatusCode is a required field
  4986. StatusCode *string `type:"string" required:"true" enum:"ScalingActivityStatusCode"`
  4987. // A friendly, more verbose description of the activity status.
  4988. StatusMessage *string `min:"1" type:"string"`
  4989. }
  4990. // String returns the string representation
  4991. func (s Activity) String() string {
  4992. return awsutil.Prettify(s)
  4993. }
  4994. // GoString returns the string representation
  4995. func (s Activity) GoString() string {
  4996. return s.String()
  4997. }
  4998. // SetActivityId sets the ActivityId field's value.
  4999. func (s *Activity) SetActivityId(v string) *Activity {
  5000. s.ActivityId = &v
  5001. return s
  5002. }
  5003. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  5004. func (s *Activity) SetAutoScalingGroupName(v string) *Activity {
  5005. s.AutoScalingGroupName = &v
  5006. return s
  5007. }
  5008. // SetCause sets the Cause field's value.
  5009. func (s *Activity) SetCause(v string) *Activity {
  5010. s.Cause = &v
  5011. return s
  5012. }
  5013. // SetDescription sets the Description field's value.
  5014. func (s *Activity) SetDescription(v string) *Activity {
  5015. s.Description = &v
  5016. return s
  5017. }
  5018. // SetDetails sets the Details field's value.
  5019. func (s *Activity) SetDetails(v string) *Activity {
  5020. s.Details = &v
  5021. return s
  5022. }
  5023. // SetEndTime sets the EndTime field's value.
  5024. func (s *Activity) SetEndTime(v time.Time) *Activity {
  5025. s.EndTime = &v
  5026. return s
  5027. }
  5028. // SetProgress sets the Progress field's value.
  5029. func (s *Activity) SetProgress(v int64) *Activity {
  5030. s.Progress = &v
  5031. return s
  5032. }
  5033. // SetStartTime sets the StartTime field's value.
  5034. func (s *Activity) SetStartTime(v time.Time) *Activity {
  5035. s.StartTime = &v
  5036. return s
  5037. }
  5038. // SetStatusCode sets the StatusCode field's value.
  5039. func (s *Activity) SetStatusCode(v string) *Activity {
  5040. s.StatusCode = &v
  5041. return s
  5042. }
  5043. // SetStatusMessage sets the StatusMessage field's value.
  5044. func (s *Activity) SetStatusMessage(v string) *Activity {
  5045. s.StatusMessage = &v
  5046. return s
  5047. }
  5048. // Describes a policy adjustment type.
  5049. type AdjustmentType struct {
  5050. _ struct{} `type:"structure"`
  5051. // The policy adjustment type. The valid values are ChangeInCapacity, ExactCapacity,
  5052. // and PercentChangeInCapacity.
  5053. AdjustmentType *string `min:"1" type:"string"`
  5054. }
  5055. // String returns the string representation
  5056. func (s AdjustmentType) String() string {
  5057. return awsutil.Prettify(s)
  5058. }
  5059. // GoString returns the string representation
  5060. func (s AdjustmentType) GoString() string {
  5061. return s.String()
  5062. }
  5063. // SetAdjustmentType sets the AdjustmentType field's value.
  5064. func (s *AdjustmentType) SetAdjustmentType(v string) *AdjustmentType {
  5065. s.AdjustmentType = &v
  5066. return s
  5067. }
  5068. // Describes an alarm.
  5069. type Alarm struct {
  5070. _ struct{} `type:"structure"`
  5071. // The Amazon Resource Name (ARN) of the alarm.
  5072. AlarmARN *string `min:"1" type:"string"`
  5073. // The name of the alarm.
  5074. AlarmName *string `min:"1" type:"string"`
  5075. }
  5076. // String returns the string representation
  5077. func (s Alarm) String() string {
  5078. return awsutil.Prettify(s)
  5079. }
  5080. // GoString returns the string representation
  5081. func (s Alarm) GoString() string {
  5082. return s.String()
  5083. }
  5084. // SetAlarmARN sets the AlarmARN field's value.
  5085. func (s *Alarm) SetAlarmARN(v string) *Alarm {
  5086. s.AlarmARN = &v
  5087. return s
  5088. }
  5089. // SetAlarmName sets the AlarmName field's value.
  5090. func (s *Alarm) SetAlarmName(v string) *Alarm {
  5091. s.AlarmName = &v
  5092. return s
  5093. }
  5094. type AttachInstancesInput struct {
  5095. _ struct{} `type:"structure"`
  5096. // The name of the Auto Scaling group.
  5097. //
  5098. // AutoScalingGroupName is a required field
  5099. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5100. // The IDs of the instances. You can specify up to 20 instances.
  5101. InstanceIds []*string `type:"list"`
  5102. }
  5103. // String returns the string representation
  5104. func (s AttachInstancesInput) String() string {
  5105. return awsutil.Prettify(s)
  5106. }
  5107. // GoString returns the string representation
  5108. func (s AttachInstancesInput) GoString() string {
  5109. return s.String()
  5110. }
  5111. // Validate inspects the fields of the type to determine if they are valid.
  5112. func (s *AttachInstancesInput) Validate() error {
  5113. invalidParams := request.ErrInvalidParams{Context: "AttachInstancesInput"}
  5114. if s.AutoScalingGroupName == nil {
  5115. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5116. }
  5117. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5118. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5119. }
  5120. if invalidParams.Len() > 0 {
  5121. return invalidParams
  5122. }
  5123. return nil
  5124. }
  5125. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  5126. func (s *AttachInstancesInput) SetAutoScalingGroupName(v string) *AttachInstancesInput {
  5127. s.AutoScalingGroupName = &v
  5128. return s
  5129. }
  5130. // SetInstanceIds sets the InstanceIds field's value.
  5131. func (s *AttachInstancesInput) SetInstanceIds(v []*string) *AttachInstancesInput {
  5132. s.InstanceIds = v
  5133. return s
  5134. }
  5135. type AttachInstancesOutput struct {
  5136. _ struct{} `type:"structure"`
  5137. }
  5138. // String returns the string representation
  5139. func (s AttachInstancesOutput) String() string {
  5140. return awsutil.Prettify(s)
  5141. }
  5142. // GoString returns the string representation
  5143. func (s AttachInstancesOutput) GoString() string {
  5144. return s.String()
  5145. }
  5146. type AttachLoadBalancerTargetGroupsInput struct {
  5147. _ struct{} `type:"structure"`
  5148. // The name of the Auto Scaling group.
  5149. //
  5150. // AutoScalingGroupName is a required field
  5151. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5152. // The Amazon Resource Names (ARN) of the target groups. You can specify up
  5153. // to 10 target groups.
  5154. //
  5155. // TargetGroupARNs is a required field
  5156. TargetGroupARNs []*string `type:"list" required:"true"`
  5157. }
  5158. // String returns the string representation
  5159. func (s AttachLoadBalancerTargetGroupsInput) String() string {
  5160. return awsutil.Prettify(s)
  5161. }
  5162. // GoString returns the string representation
  5163. func (s AttachLoadBalancerTargetGroupsInput) GoString() string {
  5164. return s.String()
  5165. }
  5166. // Validate inspects the fields of the type to determine if they are valid.
  5167. func (s *AttachLoadBalancerTargetGroupsInput) Validate() error {
  5168. invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancerTargetGroupsInput"}
  5169. if s.AutoScalingGroupName == nil {
  5170. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5171. }
  5172. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5173. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5174. }
  5175. if s.TargetGroupARNs == nil {
  5176. invalidParams.Add(request.NewErrParamRequired("TargetGroupARNs"))
  5177. }
  5178. if invalidParams.Len() > 0 {
  5179. return invalidParams
  5180. }
  5181. return nil
  5182. }
  5183. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  5184. func (s *AttachLoadBalancerTargetGroupsInput) SetAutoScalingGroupName(v string) *AttachLoadBalancerTargetGroupsInput {
  5185. s.AutoScalingGroupName = &v
  5186. return s
  5187. }
  5188. // SetTargetGroupARNs sets the TargetGroupARNs field's value.
  5189. func (s *AttachLoadBalancerTargetGroupsInput) SetTargetGroupARNs(v []*string) *AttachLoadBalancerTargetGroupsInput {
  5190. s.TargetGroupARNs = v
  5191. return s
  5192. }
  5193. type AttachLoadBalancerTargetGroupsOutput struct {
  5194. _ struct{} `type:"structure"`
  5195. }
  5196. // String returns the string representation
  5197. func (s AttachLoadBalancerTargetGroupsOutput) String() string {
  5198. return awsutil.Prettify(s)
  5199. }
  5200. // GoString returns the string representation
  5201. func (s AttachLoadBalancerTargetGroupsOutput) GoString() string {
  5202. return s.String()
  5203. }
  5204. type AttachLoadBalancersInput struct {
  5205. _ struct{} `type:"structure"`
  5206. // The name of the Auto Scaling group.
  5207. //
  5208. // AutoScalingGroupName is a required field
  5209. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5210. // The names of the load balancers. You can specify up to 10 load balancers.
  5211. //
  5212. // LoadBalancerNames is a required field
  5213. LoadBalancerNames []*string `type:"list" required:"true"`
  5214. }
  5215. // String returns the string representation
  5216. func (s AttachLoadBalancersInput) String() string {
  5217. return awsutil.Prettify(s)
  5218. }
  5219. // GoString returns the string representation
  5220. func (s AttachLoadBalancersInput) GoString() string {
  5221. return s.String()
  5222. }
  5223. // Validate inspects the fields of the type to determine if they are valid.
  5224. func (s *AttachLoadBalancersInput) Validate() error {
  5225. invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancersInput"}
  5226. if s.AutoScalingGroupName == nil {
  5227. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5228. }
  5229. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5230. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5231. }
  5232. if s.LoadBalancerNames == nil {
  5233. invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames"))
  5234. }
  5235. if invalidParams.Len() > 0 {
  5236. return invalidParams
  5237. }
  5238. return nil
  5239. }
  5240. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  5241. func (s *AttachLoadBalancersInput) SetAutoScalingGroupName(v string) *AttachLoadBalancersInput {
  5242. s.AutoScalingGroupName = &v
  5243. return s
  5244. }
  5245. // SetLoadBalancerNames sets the LoadBalancerNames field's value.
  5246. func (s *AttachLoadBalancersInput) SetLoadBalancerNames(v []*string) *AttachLoadBalancersInput {
  5247. s.LoadBalancerNames = v
  5248. return s
  5249. }
  5250. type AttachLoadBalancersOutput struct {
  5251. _ struct{} `type:"structure"`
  5252. }
  5253. // String returns the string representation
  5254. func (s AttachLoadBalancersOutput) String() string {
  5255. return awsutil.Prettify(s)
  5256. }
  5257. // GoString returns the string representation
  5258. func (s AttachLoadBalancersOutput) GoString() string {
  5259. return s.String()
  5260. }
  5261. type BatchDeleteScheduledActionInput struct {
  5262. _ struct{} `type:"structure"`
  5263. // The name of the Auto Scaling group.
  5264. //
  5265. // AutoScalingGroupName is a required field
  5266. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5267. // The names of the scheduled actions to delete. The maximum number allowed
  5268. // is 50.
  5269. //
  5270. // ScheduledActionNames is a required field
  5271. ScheduledActionNames []*string `type:"list" required:"true"`
  5272. }
  5273. // String returns the string representation
  5274. func (s BatchDeleteScheduledActionInput) String() string {
  5275. return awsutil.Prettify(s)
  5276. }
  5277. // GoString returns the string representation
  5278. func (s BatchDeleteScheduledActionInput) GoString() string {
  5279. return s.String()
  5280. }
  5281. // Validate inspects the fields of the type to determine if they are valid.
  5282. func (s *BatchDeleteScheduledActionInput) Validate() error {
  5283. invalidParams := request.ErrInvalidParams{Context: "BatchDeleteScheduledActionInput"}
  5284. if s.AutoScalingGroupName == nil {
  5285. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5286. }
  5287. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5288. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5289. }
  5290. if s.ScheduledActionNames == nil {
  5291. invalidParams.Add(request.NewErrParamRequired("ScheduledActionNames"))
  5292. }
  5293. if invalidParams.Len() > 0 {
  5294. return invalidParams
  5295. }
  5296. return nil
  5297. }
  5298. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  5299. func (s *BatchDeleteScheduledActionInput) SetAutoScalingGroupName(v string) *BatchDeleteScheduledActionInput {
  5300. s.AutoScalingGroupName = &v
  5301. return s
  5302. }
  5303. // SetScheduledActionNames sets the ScheduledActionNames field's value.
  5304. func (s *BatchDeleteScheduledActionInput) SetScheduledActionNames(v []*string) *BatchDeleteScheduledActionInput {
  5305. s.ScheduledActionNames = v
  5306. return s
  5307. }
  5308. type BatchDeleteScheduledActionOutput struct {
  5309. _ struct{} `type:"structure"`
  5310. // The names of the scheduled actions that could not be deleted, including an
  5311. // error message.
  5312. FailedScheduledActions []*FailedScheduledUpdateGroupActionRequest `type:"list"`
  5313. }
  5314. // String returns the string representation
  5315. func (s BatchDeleteScheduledActionOutput) String() string {
  5316. return awsutil.Prettify(s)
  5317. }
  5318. // GoString returns the string representation
  5319. func (s BatchDeleteScheduledActionOutput) GoString() string {
  5320. return s.String()
  5321. }
  5322. // SetFailedScheduledActions sets the FailedScheduledActions field's value.
  5323. func (s *BatchDeleteScheduledActionOutput) SetFailedScheduledActions(v []*FailedScheduledUpdateGroupActionRequest) *BatchDeleteScheduledActionOutput {
  5324. s.FailedScheduledActions = v
  5325. return s
  5326. }
  5327. type BatchPutScheduledUpdateGroupActionInput struct {
  5328. _ struct{} `type:"structure"`
  5329. // The name of the Auto Scaling group.
  5330. //
  5331. // AutoScalingGroupName is a required field
  5332. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5333. // One or more scheduled actions. The maximum number allowed is 50.
  5334. //
  5335. // ScheduledUpdateGroupActions is a required field
  5336. ScheduledUpdateGroupActions []*ScheduledUpdateGroupActionRequest `type:"list" required:"true"`
  5337. }
  5338. // String returns the string representation
  5339. func (s BatchPutScheduledUpdateGroupActionInput) String() string {
  5340. return awsutil.Prettify(s)
  5341. }
  5342. // GoString returns the string representation
  5343. func (s BatchPutScheduledUpdateGroupActionInput) GoString() string {
  5344. return s.String()
  5345. }
  5346. // Validate inspects the fields of the type to determine if they are valid.
  5347. func (s *BatchPutScheduledUpdateGroupActionInput) Validate() error {
  5348. invalidParams := request.ErrInvalidParams{Context: "BatchPutScheduledUpdateGroupActionInput"}
  5349. if s.AutoScalingGroupName == nil {
  5350. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5351. }
  5352. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5353. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5354. }
  5355. if s.ScheduledUpdateGroupActions == nil {
  5356. invalidParams.Add(request.NewErrParamRequired("ScheduledUpdateGroupActions"))
  5357. }
  5358. if s.ScheduledUpdateGroupActions != nil {
  5359. for i, v := range s.ScheduledUpdateGroupActions {
  5360. if v == nil {
  5361. continue
  5362. }
  5363. if err := v.Validate(); err != nil {
  5364. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ScheduledUpdateGroupActions", i), err.(request.ErrInvalidParams))
  5365. }
  5366. }
  5367. }
  5368. if invalidParams.Len() > 0 {
  5369. return invalidParams
  5370. }
  5371. return nil
  5372. }
  5373. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  5374. func (s *BatchPutScheduledUpdateGroupActionInput) SetAutoScalingGroupName(v string) *BatchPutScheduledUpdateGroupActionInput {
  5375. s.AutoScalingGroupName = &v
  5376. return s
  5377. }
  5378. // SetScheduledUpdateGroupActions sets the ScheduledUpdateGroupActions field's value.
  5379. func (s *BatchPutScheduledUpdateGroupActionInput) SetScheduledUpdateGroupActions(v []*ScheduledUpdateGroupActionRequest) *BatchPutScheduledUpdateGroupActionInput {
  5380. s.ScheduledUpdateGroupActions = v
  5381. return s
  5382. }
  5383. type BatchPutScheduledUpdateGroupActionOutput struct {
  5384. _ struct{} `type:"structure"`
  5385. // The names of the scheduled actions that could not be created or updated,
  5386. // including an error message.
  5387. FailedScheduledUpdateGroupActions []*FailedScheduledUpdateGroupActionRequest `type:"list"`
  5388. }
  5389. // String returns the string representation
  5390. func (s BatchPutScheduledUpdateGroupActionOutput) String() string {
  5391. return awsutil.Prettify(s)
  5392. }
  5393. // GoString returns the string representation
  5394. func (s BatchPutScheduledUpdateGroupActionOutput) GoString() string {
  5395. return s.String()
  5396. }
  5397. // SetFailedScheduledUpdateGroupActions sets the FailedScheduledUpdateGroupActions field's value.
  5398. func (s *BatchPutScheduledUpdateGroupActionOutput) SetFailedScheduledUpdateGroupActions(v []*FailedScheduledUpdateGroupActionRequest) *BatchPutScheduledUpdateGroupActionOutput {
  5399. s.FailedScheduledUpdateGroupActions = v
  5400. return s
  5401. }
  5402. // Describes a block device mapping.
  5403. type BlockDeviceMapping struct {
  5404. _ struct{} `type:"structure"`
  5405. // The device name exposed to the EC2 instance (for example, /dev/sdh or xvdh).
  5406. // For more information, see Device Naming on Linux Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html)
  5407. // in the Amazon EC2 User Guide for Linux Instances.
  5408. //
  5409. // DeviceName is a required field
  5410. DeviceName *string `min:"1" type:"string" required:"true"`
  5411. // The information about the Amazon EBS volume.
  5412. Ebs *Ebs `type:"structure"`
  5413. // Suppresses a device mapping.
  5414. //
  5415. // If this parameter is true for the root device, the instance might fail the
  5416. // EC2 health check. In that case, Amazon EC2 Auto Scaling launches a replacement
  5417. // instance.
  5418. NoDevice *bool `type:"boolean"`
  5419. // The name of the virtual device (for example, ephemeral0).
  5420. VirtualName *string `min:"1" type:"string"`
  5421. }
  5422. // String returns the string representation
  5423. func (s BlockDeviceMapping) String() string {
  5424. return awsutil.Prettify(s)
  5425. }
  5426. // GoString returns the string representation
  5427. func (s BlockDeviceMapping) GoString() string {
  5428. return s.String()
  5429. }
  5430. // Validate inspects the fields of the type to determine if they are valid.
  5431. func (s *BlockDeviceMapping) Validate() error {
  5432. invalidParams := request.ErrInvalidParams{Context: "BlockDeviceMapping"}
  5433. if s.DeviceName == nil {
  5434. invalidParams.Add(request.NewErrParamRequired("DeviceName"))
  5435. }
  5436. if s.DeviceName != nil && len(*s.DeviceName) < 1 {
  5437. invalidParams.Add(request.NewErrParamMinLen("DeviceName", 1))
  5438. }
  5439. if s.VirtualName != nil && len(*s.VirtualName) < 1 {
  5440. invalidParams.Add(request.NewErrParamMinLen("VirtualName", 1))
  5441. }
  5442. if s.Ebs != nil {
  5443. if err := s.Ebs.Validate(); err != nil {
  5444. invalidParams.AddNested("Ebs", err.(request.ErrInvalidParams))
  5445. }
  5446. }
  5447. if invalidParams.Len() > 0 {
  5448. return invalidParams
  5449. }
  5450. return nil
  5451. }
  5452. // SetDeviceName sets the DeviceName field's value.
  5453. func (s *BlockDeviceMapping) SetDeviceName(v string) *BlockDeviceMapping {
  5454. s.DeviceName = &v
  5455. return s
  5456. }
  5457. // SetEbs sets the Ebs field's value.
  5458. func (s *BlockDeviceMapping) SetEbs(v *Ebs) *BlockDeviceMapping {
  5459. s.Ebs = v
  5460. return s
  5461. }
  5462. // SetNoDevice sets the NoDevice field's value.
  5463. func (s *BlockDeviceMapping) SetNoDevice(v bool) *BlockDeviceMapping {
  5464. s.NoDevice = &v
  5465. return s
  5466. }
  5467. // SetVirtualName sets the VirtualName field's value.
  5468. func (s *BlockDeviceMapping) SetVirtualName(v string) *BlockDeviceMapping {
  5469. s.VirtualName = &v
  5470. return s
  5471. }
  5472. type CompleteLifecycleActionInput struct {
  5473. _ struct{} `type:"structure"`
  5474. // The name of the Auto Scaling group.
  5475. //
  5476. // AutoScalingGroupName is a required field
  5477. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5478. // The ID of the instance.
  5479. InstanceId *string `min:"1" type:"string"`
  5480. // The action for the group to take. This parameter can be either CONTINUE or
  5481. // ABANDON.
  5482. //
  5483. // LifecycleActionResult is a required field
  5484. LifecycleActionResult *string `type:"string" required:"true"`
  5485. // A universally unique identifier (UUID) that identifies a specific lifecycle
  5486. // action associated with an instance. Amazon EC2 Auto Scaling sends this token
  5487. // to the notification target you specified when you created the lifecycle hook.
  5488. LifecycleActionToken *string `min:"36" type:"string"`
  5489. // The name of the lifecycle hook.
  5490. //
  5491. // LifecycleHookName is a required field
  5492. LifecycleHookName *string `min:"1" type:"string" required:"true"`
  5493. }
  5494. // String returns the string representation
  5495. func (s CompleteLifecycleActionInput) String() string {
  5496. return awsutil.Prettify(s)
  5497. }
  5498. // GoString returns the string representation
  5499. func (s CompleteLifecycleActionInput) GoString() string {
  5500. return s.String()
  5501. }
  5502. // Validate inspects the fields of the type to determine if they are valid.
  5503. func (s *CompleteLifecycleActionInput) Validate() error {
  5504. invalidParams := request.ErrInvalidParams{Context: "CompleteLifecycleActionInput"}
  5505. if s.AutoScalingGroupName == nil {
  5506. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5507. }
  5508. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5509. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5510. }
  5511. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  5512. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  5513. }
  5514. if s.LifecycleActionResult == nil {
  5515. invalidParams.Add(request.NewErrParamRequired("LifecycleActionResult"))
  5516. }
  5517. if s.LifecycleActionToken != nil && len(*s.LifecycleActionToken) < 36 {
  5518. invalidParams.Add(request.NewErrParamMinLen("LifecycleActionToken", 36))
  5519. }
  5520. if s.LifecycleHookName == nil {
  5521. invalidParams.Add(request.NewErrParamRequired("LifecycleHookName"))
  5522. }
  5523. if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 {
  5524. invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1))
  5525. }
  5526. if invalidParams.Len() > 0 {
  5527. return invalidParams
  5528. }
  5529. return nil
  5530. }
  5531. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  5532. func (s *CompleteLifecycleActionInput) SetAutoScalingGroupName(v string) *CompleteLifecycleActionInput {
  5533. s.AutoScalingGroupName = &v
  5534. return s
  5535. }
  5536. // SetInstanceId sets the InstanceId field's value.
  5537. func (s *CompleteLifecycleActionInput) SetInstanceId(v string) *CompleteLifecycleActionInput {
  5538. s.InstanceId = &v
  5539. return s
  5540. }
  5541. // SetLifecycleActionResult sets the LifecycleActionResult field's value.
  5542. func (s *CompleteLifecycleActionInput) SetLifecycleActionResult(v string) *CompleteLifecycleActionInput {
  5543. s.LifecycleActionResult = &v
  5544. return s
  5545. }
  5546. // SetLifecycleActionToken sets the LifecycleActionToken field's value.
  5547. func (s *CompleteLifecycleActionInput) SetLifecycleActionToken(v string) *CompleteLifecycleActionInput {
  5548. s.LifecycleActionToken = &v
  5549. return s
  5550. }
  5551. // SetLifecycleHookName sets the LifecycleHookName field's value.
  5552. func (s *CompleteLifecycleActionInput) SetLifecycleHookName(v string) *CompleteLifecycleActionInput {
  5553. s.LifecycleHookName = &v
  5554. return s
  5555. }
  5556. type CompleteLifecycleActionOutput struct {
  5557. _ struct{} `type:"structure"`
  5558. }
  5559. // String returns the string representation
  5560. func (s CompleteLifecycleActionOutput) String() string {
  5561. return awsutil.Prettify(s)
  5562. }
  5563. // GoString returns the string representation
  5564. func (s CompleteLifecycleActionOutput) GoString() string {
  5565. return s.String()
  5566. }
  5567. type CreateAutoScalingGroupInput struct {
  5568. _ struct{} `type:"structure"`
  5569. // The name of the Auto Scaling group. This name must be unique per Region per
  5570. // account.
  5571. //
  5572. // AutoScalingGroupName is a required field
  5573. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  5574. // One or more Availability Zones for the group. This parameter is optional
  5575. // if you specify one or more subnets for VPCZoneIdentifier.
  5576. //
  5577. // Conditional: If your account supports EC2-Classic and VPC, this parameter
  5578. // is required to launch instances into EC2-Classic.
  5579. AvailabilityZones []*string `min:"1" type:"list"`
  5580. // The amount of time, in seconds, after a scaling activity completes before
  5581. // another scaling activity can start. The default value is 300.
  5582. //
  5583. // For more information, see Scaling Cooldowns (https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html)
  5584. // in the Amazon EC2 Auto Scaling User Guide.
  5585. DefaultCooldown *int64 `type:"integer"`
  5586. // The number of Amazon EC2 instances that the Auto Scaling group attempts to
  5587. // maintain. This number must be greater than or equal to the minimum size of
  5588. // the group and less than or equal to the maximum size of the group. If you
  5589. // do not specify a desired capacity, the default is the minimum size of the
  5590. // group.
  5591. DesiredCapacity *int64 `type:"integer"`
  5592. // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before
  5593. // checking the health status of an EC2 instance that has come into service.
  5594. // During this time, any health check failures for the instance are ignored.
  5595. // The default value is 0.
  5596. //
  5597. // For more information, see Health Check Grace Period (https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html#health-check-grace-period)
  5598. // in the Amazon EC2 Auto Scaling User Guide.
  5599. //
  5600. // Conditional: This parameter is required if you are adding an ELB health check.
  5601. HealthCheckGracePeriod *int64 `type:"integer"`
  5602. // The service to use for the health checks. The valid values are EC2 and ELB.
  5603. // The default value is EC2. If you configure an Auto Scaling group to use ELB
  5604. // health checks, it considers the instance unhealthy if it fails either the
  5605. // EC2 status checks or the load balancer health checks.
  5606. //
  5607. // For more information, see Health Checks for Auto Scaling Instances (https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html)
  5608. // in the Amazon EC2 Auto Scaling User Guide.
  5609. HealthCheckType *string `min:"1" type:"string"`
  5610. // The ID of the instance used to create a launch configuration for the group.
  5611. //
  5612. // When you specify an ID of an instance, Amazon EC2 Auto Scaling creates a
  5613. // new launch configuration and associates it with the group. This launch configuration
  5614. // derives its attributes from the specified instance, except for the block
  5615. // device mapping.
  5616. //
  5617. // For more information, see Create an Auto Scaling Group Using an EC2 Instance
  5618. // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html)
  5619. // in the Amazon EC2 Auto Scaling User Guide.
  5620. //
  5621. // You must specify one of the following parameters in your request: LaunchConfigurationName,
  5622. // LaunchTemplate, InstanceId, or MixedInstancesPolicy.
  5623. InstanceId *string `min:"1" type:"string"`
  5624. // The name of the launch configuration.
  5625. //
  5626. // If you do not specify LaunchConfigurationName, you must specify one of the
  5627. // following parameters: InstanceId, LaunchTemplate, or MixedInstancesPolicy.
  5628. LaunchConfigurationName *string `min:"1" type:"string"`
  5629. // The launch template to use to launch instances.
  5630. //
  5631. // For more information, see LaunchTemplateSpecification (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_LaunchTemplateSpecification.html)
  5632. // in the Amazon EC2 Auto Scaling API Reference.
  5633. //
  5634. // If you do not specify LaunchTemplate, you must specify one of the following
  5635. // parameters: InstanceId, LaunchConfigurationName, or MixedInstancesPolicy.
  5636. LaunchTemplate *LaunchTemplateSpecification `type:"structure"`
  5637. // One or more lifecycle hooks.
  5638. LifecycleHookSpecificationList []*LifecycleHookSpecification `type:"list"`
  5639. // A list of Classic Load Balancers associated with this Auto Scaling group.
  5640. // For Application Load Balancers and Network Load Balancers, specify a list
  5641. // of target groups using the TargetGroupARNs property instead.
  5642. //
  5643. // For more information, see Using a Load Balancer with an Auto Scaling Group
  5644. // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html)
  5645. // in the Amazon EC2 Auto Scaling User Guide.
  5646. LoadBalancerNames []*string `type:"list"`
  5647. // The maximum amount of time, in seconds, that an instance can be in service.
  5648. //
  5649. // Valid Range: Minimum value of 604800.
  5650. MaxInstanceLifetime *int64 `type:"integer"`
  5651. // The maximum size of the group.
  5652. //
  5653. // MaxSize is a required field
  5654. MaxSize *int64 `type:"integer" required:"true"`
  5655. // The minimum size of the group.
  5656. //
  5657. // MinSize is a required field
  5658. MinSize *int64 `type:"integer" required:"true"`
  5659. // An embedded object that specifies a mixed instances policy. The required
  5660. // parameters must be specified. If optional parameters are unspecified, their
  5661. // default values are used.
  5662. //
  5663. // The policy includes parameters that not only define the distribution of On-Demand
  5664. // Instances and Spot Instances, the maximum price to pay for Spot Instances,
  5665. // and how the Auto Scaling group allocates instance types to fulfill On-Demand
  5666. // and Spot capacity, but also the parameters that specify the instance configuration
  5667. // information—the launch template and instance types.
  5668. //
  5669. // For more information, see MixedInstancesPolicy (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_MixedInstancesPolicy.html)
  5670. // in the Amazon EC2 Auto Scaling API Reference and Auto Scaling Groups with
  5671. // Multiple Instance Types and Purchase Options (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html)
  5672. // in the Amazon EC2 Auto Scaling User Guide.
  5673. //
  5674. // You must specify one of the following parameters in your request: LaunchConfigurationName,
  5675. // LaunchTemplate, InstanceId, or MixedInstancesPolicy.
  5676. MixedInstancesPolicy *MixedInstancesPolicy `type:"structure"`
  5677. // Indicates whether newly launched instances are protected from termination
  5678. // by Amazon EC2 Auto Scaling when scaling in.
  5679. //
  5680. // For more information about preventing instances from terminating on scale
  5681. // in, see Instance Protection (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection)
  5682. // in the Amazon EC2 Auto Scaling User Guide.
  5683. NewInstancesProtectedFromScaleIn *bool `type:"boolean"`
  5684. // The name of the placement group into which to launch your instances, if any.
  5685. // A placement group is a logical grouping of instances within a single Availability
  5686. // Zone. You cannot specify multiple Availability Zones and a placement group.
  5687. // For more information, see Placement Groups (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html)
  5688. // in the Amazon EC2 User Guide for Linux Instances.
  5689. PlacementGroup *string `min:"1" type:"string"`
  5690. // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling
  5691. // group uses to call other AWS services on your behalf. By default, Amazon
  5692. // EC2 Auto Scaling uses a service-linked role named AWSServiceRoleForAutoScaling,
  5693. // which it creates if it does not exist. For more information, see Service-Linked
  5694. // Roles (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-service-linked-role.html)
  5695. // in the Amazon EC2 Auto Scaling User Guide.
  5696. ServiceLinkedRoleARN *string `min:"1" type:"string"`
  5697. // One or more tags.
  5698. //
  5699. // For more information, see Tagging Auto Scaling Groups and Instances (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html)
  5700. // in the Amazon EC2 Auto Scaling User Guide.
  5701. Tags []*Tag `type:"list"`
  5702. // The Amazon Resource Names (ARN) of the target groups to associate with the
  5703. // Auto Scaling group. Instances are registered as targets in a target group,
  5704. // and traffic is routed to the target group.
  5705. //
  5706. // For more information, see Using a Load Balancer with an Auto Scaling Group
  5707. // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html)
  5708. // in the Amazon EC2 Auto Scaling User Guide.
  5709. TargetGroupARNs []*string `type:"list"`
  5710. // One or more termination policies used to select the instance to terminate.
  5711. // These policies are executed in the order that they are listed.
  5712. //
  5713. // For more information, see Controlling Which Instances Auto Scaling Terminates
  5714. // During Scale In (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html)
  5715. // in the Amazon EC2 Auto Scaling User Guide.
  5716. TerminationPolicies []*string `type:"list"`
  5717. // A comma-separated list of subnet IDs for your virtual private cloud (VPC).
  5718. //
  5719. // If you specify VPCZoneIdentifier with AvailabilityZones, the subnets that
  5720. // you specify for this parameter must reside in those Availability Zones.
  5721. //
  5722. // Conditional: If your account supports EC2-Classic and VPC, this parameter
  5723. // is required to launch instances into a VPC.
  5724. VPCZoneIdentifier *string `min:"1" type:"string"`
  5725. }
  5726. // String returns the string representation
  5727. func (s CreateAutoScalingGroupInput) String() string {
  5728. return awsutil.Prettify(s)
  5729. }
  5730. // GoString returns the string representation
  5731. func (s CreateAutoScalingGroupInput) GoString() string {
  5732. return s.String()
  5733. }
  5734. // Validate inspects the fields of the type to determine if they are valid.
  5735. func (s *CreateAutoScalingGroupInput) Validate() error {
  5736. invalidParams := request.ErrInvalidParams{Context: "CreateAutoScalingGroupInput"}
  5737. if s.AutoScalingGroupName == nil {
  5738. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  5739. }
  5740. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  5741. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  5742. }
  5743. if s.AvailabilityZones != nil && len(s.AvailabilityZones) < 1 {
  5744. invalidParams.Add(request.NewErrParamMinLen("AvailabilityZones", 1))
  5745. }
  5746. if s.HealthCheckType != nil && len(*s.HealthCheckType) < 1 {
  5747. invalidParams.Add(request.NewErrParamMinLen("HealthCheckType", 1))
  5748. }
  5749. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  5750. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  5751. }
  5752. if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 {
  5753. invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1))
  5754. }
  5755. if s.MaxSize == nil {
  5756. invalidParams.Add(request.NewErrParamRequired("MaxSize"))
  5757. }
  5758. if s.MinSize == nil {
  5759. invalidParams.Add(request.NewErrParamRequired("MinSize"))
  5760. }
  5761. if s.PlacementGroup != nil && len(*s.PlacementGroup) < 1 {
  5762. invalidParams.Add(request.NewErrParamMinLen("PlacementGroup", 1))
  5763. }
  5764. if s.ServiceLinkedRoleARN != nil && len(*s.ServiceLinkedRoleARN) < 1 {
  5765. invalidParams.Add(request.NewErrParamMinLen("ServiceLinkedRoleARN", 1))
  5766. }
  5767. if s.VPCZoneIdentifier != nil && len(*s.VPCZoneIdentifier) < 1 {
  5768. invalidParams.Add(request.NewErrParamMinLen("VPCZoneIdentifier", 1))
  5769. }
  5770. if s.LaunchTemplate != nil {
  5771. if err := s.LaunchTemplate.Validate(); err != nil {
  5772. invalidParams.AddNested("LaunchTemplate", err.(request.ErrInvalidParams))
  5773. }
  5774. }
  5775. if s.LifecycleHookSpecificationList != nil {
  5776. for i, v := range s.LifecycleHookSpecificationList {
  5777. if v == nil {
  5778. continue
  5779. }
  5780. if err := v.Validate(); err != nil {
  5781. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LifecycleHookSpecificationList", i), err.(request.ErrInvalidParams))
  5782. }
  5783. }
  5784. }
  5785. if s.MixedInstancesPolicy != nil {
  5786. if err := s.MixedInstancesPolicy.Validate(); err != nil {
  5787. invalidParams.AddNested("MixedInstancesPolicy", err.(request.ErrInvalidParams))
  5788. }
  5789. }
  5790. if s.Tags != nil {
  5791. for i, v := range s.Tags {
  5792. if v == nil {
  5793. continue
  5794. }
  5795. if err := v.Validate(); err != nil {
  5796. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  5797. }
  5798. }
  5799. }
  5800. if invalidParams.Len() > 0 {
  5801. return invalidParams
  5802. }
  5803. return nil
  5804. }
  5805. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  5806. func (s *CreateAutoScalingGroupInput) SetAutoScalingGroupName(v string) *CreateAutoScalingGroupInput {
  5807. s.AutoScalingGroupName = &v
  5808. return s
  5809. }
  5810. // SetAvailabilityZones sets the AvailabilityZones field's value.
  5811. func (s *CreateAutoScalingGroupInput) SetAvailabilityZones(v []*string) *CreateAutoScalingGroupInput {
  5812. s.AvailabilityZones = v
  5813. return s
  5814. }
  5815. // SetDefaultCooldown sets the DefaultCooldown field's value.
  5816. func (s *CreateAutoScalingGroupInput) SetDefaultCooldown(v int64) *CreateAutoScalingGroupInput {
  5817. s.DefaultCooldown = &v
  5818. return s
  5819. }
  5820. // SetDesiredCapacity sets the DesiredCapacity field's value.
  5821. func (s *CreateAutoScalingGroupInput) SetDesiredCapacity(v int64) *CreateAutoScalingGroupInput {
  5822. s.DesiredCapacity = &v
  5823. return s
  5824. }
  5825. // SetHealthCheckGracePeriod sets the HealthCheckGracePeriod field's value.
  5826. func (s *CreateAutoScalingGroupInput) SetHealthCheckGracePeriod(v int64) *CreateAutoScalingGroupInput {
  5827. s.HealthCheckGracePeriod = &v
  5828. return s
  5829. }
  5830. // SetHealthCheckType sets the HealthCheckType field's value.
  5831. func (s *CreateAutoScalingGroupInput) SetHealthCheckType(v string) *CreateAutoScalingGroupInput {
  5832. s.HealthCheckType = &v
  5833. return s
  5834. }
  5835. // SetInstanceId sets the InstanceId field's value.
  5836. func (s *CreateAutoScalingGroupInput) SetInstanceId(v string) *CreateAutoScalingGroupInput {
  5837. s.InstanceId = &v
  5838. return s
  5839. }
  5840. // SetLaunchConfigurationName sets the LaunchConfigurationName field's value.
  5841. func (s *CreateAutoScalingGroupInput) SetLaunchConfigurationName(v string) *CreateAutoScalingGroupInput {
  5842. s.LaunchConfigurationName = &v
  5843. return s
  5844. }
  5845. // SetLaunchTemplate sets the LaunchTemplate field's value.
  5846. func (s *CreateAutoScalingGroupInput) SetLaunchTemplate(v *LaunchTemplateSpecification) *CreateAutoScalingGroupInput {
  5847. s.LaunchTemplate = v
  5848. return s
  5849. }
  5850. // SetLifecycleHookSpecificationList sets the LifecycleHookSpecificationList field's value.
  5851. func (s *CreateAutoScalingGroupInput) SetLifecycleHookSpecificationList(v []*LifecycleHookSpecification) *CreateAutoScalingGroupInput {
  5852. s.LifecycleHookSpecificationList = v
  5853. return s
  5854. }
  5855. // SetLoadBalancerNames sets the LoadBalancerNames field's value.
  5856. func (s *CreateAutoScalingGroupInput) SetLoadBalancerNames(v []*string) *CreateAutoScalingGroupInput {
  5857. s.LoadBalancerNames = v
  5858. return s
  5859. }
  5860. // SetMaxInstanceLifetime sets the MaxInstanceLifetime field's value.
  5861. func (s *CreateAutoScalingGroupInput) SetMaxInstanceLifetime(v int64) *CreateAutoScalingGroupInput {
  5862. s.MaxInstanceLifetime = &v
  5863. return s
  5864. }
  5865. // SetMaxSize sets the MaxSize field's value.
  5866. func (s *CreateAutoScalingGroupInput) SetMaxSize(v int64) *CreateAutoScalingGroupInput {
  5867. s.MaxSize = &v
  5868. return s
  5869. }
  5870. // SetMinSize sets the MinSize field's value.
  5871. func (s *CreateAutoScalingGroupInput) SetMinSize(v int64) *CreateAutoScalingGroupInput {
  5872. s.MinSize = &v
  5873. return s
  5874. }
  5875. // SetMixedInstancesPolicy sets the MixedInstancesPolicy field's value.
  5876. func (s *CreateAutoScalingGroupInput) SetMixedInstancesPolicy(v *MixedInstancesPolicy) *CreateAutoScalingGroupInput {
  5877. s.MixedInstancesPolicy = v
  5878. return s
  5879. }
  5880. // SetNewInstancesProtectedFromScaleIn sets the NewInstancesProtectedFromScaleIn field's value.
  5881. func (s *CreateAutoScalingGroupInput) SetNewInstancesProtectedFromScaleIn(v bool) *CreateAutoScalingGroupInput {
  5882. s.NewInstancesProtectedFromScaleIn = &v
  5883. return s
  5884. }
  5885. // SetPlacementGroup sets the PlacementGroup field's value.
  5886. func (s *CreateAutoScalingGroupInput) SetPlacementGroup(v string) *CreateAutoScalingGroupInput {
  5887. s.PlacementGroup = &v
  5888. return s
  5889. }
  5890. // SetServiceLinkedRoleARN sets the ServiceLinkedRoleARN field's value.
  5891. func (s *CreateAutoScalingGroupInput) SetServiceLinkedRoleARN(v string) *CreateAutoScalingGroupInput {
  5892. s.ServiceLinkedRoleARN = &v
  5893. return s
  5894. }
  5895. // SetTags sets the Tags field's value.
  5896. func (s *CreateAutoScalingGroupInput) SetTags(v []*Tag) *CreateAutoScalingGroupInput {
  5897. s.Tags = v
  5898. return s
  5899. }
  5900. // SetTargetGroupARNs sets the TargetGroupARNs field's value.
  5901. func (s *CreateAutoScalingGroupInput) SetTargetGroupARNs(v []*string) *CreateAutoScalingGroupInput {
  5902. s.TargetGroupARNs = v
  5903. return s
  5904. }
  5905. // SetTerminationPolicies sets the TerminationPolicies field's value.
  5906. func (s *CreateAutoScalingGroupInput) SetTerminationPolicies(v []*string) *CreateAutoScalingGroupInput {
  5907. s.TerminationPolicies = v
  5908. return s
  5909. }
  5910. // SetVPCZoneIdentifier sets the VPCZoneIdentifier field's value.
  5911. func (s *CreateAutoScalingGroupInput) SetVPCZoneIdentifier(v string) *CreateAutoScalingGroupInput {
  5912. s.VPCZoneIdentifier = &v
  5913. return s
  5914. }
  5915. type CreateAutoScalingGroupOutput struct {
  5916. _ struct{} `type:"structure"`
  5917. }
  5918. // String returns the string representation
  5919. func (s CreateAutoScalingGroupOutput) String() string {
  5920. return awsutil.Prettify(s)
  5921. }
  5922. // GoString returns the string representation
  5923. func (s CreateAutoScalingGroupOutput) GoString() string {
  5924. return s.String()
  5925. }
  5926. type CreateLaunchConfigurationInput struct {
  5927. _ struct{} `type:"structure"`
  5928. // For Auto Scaling groups that are running in a virtual private cloud (VPC),
  5929. // specifies whether to assign a public IP address to the group's instances.
  5930. // If you specify true, each instance in the Auto Scaling group receives a unique
  5931. // public IP address. For more information, see Launching Auto Scaling Instances
  5932. // in a VPC (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html)
  5933. // in the Amazon EC2 Auto Scaling User Guide.
  5934. //
  5935. // If you specify this parameter, you must specify at least one subnet for VPCZoneIdentifier
  5936. // when you create your group.
  5937. //
  5938. // If the instance is launched into a default subnet, the default is to assign
  5939. // a public IP address, unless you disabled the option to assign a public IP
  5940. // address on the subnet. If the instance is launched into a nondefault subnet,
  5941. // the default is not to assign a public IP address, unless you enabled the
  5942. // option to assign a public IP address on the subnet.
  5943. AssociatePublicIpAddress *bool `type:"boolean"`
  5944. // A block device mapping, which specifies the block devices for the instance.
  5945. // You can specify virtual devices and EBS volumes. For more information, see
  5946. // Block Device Mapping (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
  5947. // in the Amazon EC2 User Guide for Linux Instances.
  5948. BlockDeviceMappings []*BlockDeviceMapping `type:"list"`
  5949. // The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.
  5950. // For more information, see ClassicLink (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
  5951. // in the Amazon EC2 User Guide for Linux Instances and Linking EC2-Classic
  5952. // Instances to a VPC (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink)
  5953. // in the Amazon EC2 Auto Scaling User Guide.
  5954. //
  5955. // This parameter can only be used if you are launching EC2-Classic instances.
  5956. ClassicLinkVPCId *string `min:"1" type:"string"`
  5957. // The IDs of one or more security groups for the specified ClassicLink-enabled
  5958. // VPC. For more information, see ClassicLink (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
  5959. // in the Amazon EC2 User Guide for Linux Instances and Linking EC2-Classic
  5960. // Instances to a VPC (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink)
  5961. // in the Amazon EC2 Auto Scaling User Guide.
  5962. //
  5963. // If you specify the ClassicLinkVPCId parameter, you must specify this parameter.
  5964. ClassicLinkVPCSecurityGroups []*string `type:"list"`
  5965. // Specifies whether the launch configuration is optimized for EBS I/O (true)
  5966. // or not (false). The optimization provides dedicated throughput to Amazon
  5967. // EBS and an optimized configuration stack to provide optimal I/O performance.
  5968. // This optimization is not available with all instance types. Additional fees
  5969. // are incurred when you enable EBS optimization for an instance type that is
  5970. // not EBS-optimized by default. For more information, see Amazon EBS-Optimized
  5971. // Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html)
  5972. // in the Amazon EC2 User Guide for Linux Instances.
  5973. //
  5974. // The default value is false.
  5975. EbsOptimized *bool `type:"boolean"`
  5976. // The name or the Amazon Resource Name (ARN) of the instance profile associated
  5977. // with the IAM role for the instance. The instance profile contains the IAM
  5978. // role.
  5979. //
  5980. // For more information, see IAM Role for Applications That Run on Amazon EC2
  5981. // Instances (https://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html)
  5982. // in the Amazon EC2 Auto Scaling User Guide.
  5983. IamInstanceProfile *string `min:"1" type:"string"`
  5984. // The ID of the Amazon Machine Image (AMI) that was assigned during registration.
  5985. // For more information, see Finding an AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html)
  5986. // in the Amazon EC2 User Guide for Linux Instances.
  5987. //
  5988. // If you do not specify InstanceId, you must specify ImageId.
  5989. ImageId *string `min:"1" type:"string"`
  5990. // The ID of the instance to use to create the launch configuration. The new
  5991. // launch configuration derives attributes from the instance, except for the
  5992. // block device mapping.
  5993. //
  5994. // To create a launch configuration with a block device mapping or override
  5995. // any other instance attributes, specify them as part of the same request.
  5996. //
  5997. // For more information, see Create a Launch Configuration Using an EC2 Instance
  5998. // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-lc-with-instanceID.html)
  5999. // in the Amazon EC2 Auto Scaling User Guide.
  6000. //
  6001. // If you do not specify InstanceId, you must specify both ImageId and InstanceType.
  6002. InstanceId *string `min:"1" type:"string"`
  6003. // Controls whether instances in this group are launched with detailed (true)
  6004. // or basic (false) monitoring.
  6005. //
  6006. // The default value is true (enabled).
  6007. //
  6008. // When detailed monitoring is enabled, Amazon CloudWatch generates metrics
  6009. // every minute and your account is charged a fee. When you disable detailed
  6010. // monitoring, CloudWatch generates metrics every 5 minutes. For more information,
  6011. // see Configure Monitoring for Auto Scaling Instances (https://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-monitoring.html#enable-as-instance-metrics)
  6012. // in the Amazon EC2 Auto Scaling User Guide.
  6013. InstanceMonitoring *InstanceMonitoring `type:"structure"`
  6014. // Specifies the instance type of the EC2 instance.
  6015. //
  6016. // For information about available instance types, see Available Instance Types
  6017. // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes)
  6018. // in the Amazon EC2 User Guide for Linux Instances.
  6019. //
  6020. // If you do not specify InstanceId, you must specify InstanceType.
  6021. InstanceType *string `min:"1" type:"string"`
  6022. // The ID of the kernel associated with the AMI.
  6023. KernelId *string `min:"1" type:"string"`
  6024. // The name of the key pair. For more information, see Amazon EC2 Key Pairs
  6025. // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
  6026. // in the Amazon EC2 User Guide for Linux Instances.
  6027. KeyName *string `min:"1" type:"string"`
  6028. // The name of the launch configuration. This name must be unique per Region
  6029. // per account.
  6030. //
  6031. // LaunchConfigurationName is a required field
  6032. LaunchConfigurationName *string `min:"1" type:"string" required:"true"`
  6033. // The tenancy of the instance. An instance with dedicated tenancy runs on isolated,
  6034. // single-tenant hardware and can only be launched into a VPC.
  6035. //
  6036. // To launch dedicated instances into a shared tenancy VPC (a VPC with the instance
  6037. // placement tenancy attribute set to default), you must set the value of this
  6038. // parameter to dedicated.
  6039. //
  6040. // If you specify PlacementTenancy, you must specify at least one subnet for
  6041. // VPCZoneIdentifier when you create your group.
  6042. //
  6043. // For more information, see Instance Placement Tenancy (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-vpc-tenancy)
  6044. // in the Amazon EC2 Auto Scaling User Guide.
  6045. //
  6046. // Valid Values: default | dedicated
  6047. PlacementTenancy *string `min:"1" type:"string"`
  6048. // The ID of the RAM disk to select.
  6049. RamdiskId *string `min:"1" type:"string"`
  6050. // A list that contains the security groups to assign to the instances in the
  6051. // Auto Scaling group.
  6052. //
  6053. // [EC2-VPC] Specify the security group IDs. For more information, see Security
  6054. // Groups for Your VPC (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html)
  6055. // in the Amazon Virtual Private Cloud User Guide.
  6056. //
  6057. // [EC2-Classic] Specify either the security group names or the security group
  6058. // IDs. For more information, see Amazon EC2 Security Groups (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html)
  6059. // in the Amazon EC2 User Guide for Linux Instances.
  6060. SecurityGroups []*string `type:"list"`
  6061. // The maximum hourly price to be paid for any Spot Instance launched to fulfill
  6062. // the request. Spot Instances are launched when the price you specify exceeds
  6063. // the current Spot price. For more information, see Launching Spot Instances
  6064. // in Your Auto Scaling Group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-spot-instances.html)
  6065. // in the Amazon EC2 Auto Scaling User Guide.
  6066. //
  6067. // When you change your maximum price by creating a new launch configuration,
  6068. // running instances will continue to run as long as the maximum price for those
  6069. // running instances is higher than the current Spot price.
  6070. SpotPrice *string `min:"1" type:"string"`
  6071. // The Base64-encoded user data to make available to the launched EC2 instances.
  6072. // For more information, see Instance Metadata and User Data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
  6073. // in the Amazon EC2 User Guide for Linux Instances.
  6074. UserData *string `type:"string"`
  6075. }
  6076. // String returns the string representation
  6077. func (s CreateLaunchConfigurationInput) String() string {
  6078. return awsutil.Prettify(s)
  6079. }
  6080. // GoString returns the string representation
  6081. func (s CreateLaunchConfigurationInput) GoString() string {
  6082. return s.String()
  6083. }
  6084. // Validate inspects the fields of the type to determine if they are valid.
  6085. func (s *CreateLaunchConfigurationInput) Validate() error {
  6086. invalidParams := request.ErrInvalidParams{Context: "CreateLaunchConfigurationInput"}
  6087. if s.ClassicLinkVPCId != nil && len(*s.ClassicLinkVPCId) < 1 {
  6088. invalidParams.Add(request.NewErrParamMinLen("ClassicLinkVPCId", 1))
  6089. }
  6090. if s.IamInstanceProfile != nil && len(*s.IamInstanceProfile) < 1 {
  6091. invalidParams.Add(request.NewErrParamMinLen("IamInstanceProfile", 1))
  6092. }
  6093. if s.ImageId != nil && len(*s.ImageId) < 1 {
  6094. invalidParams.Add(request.NewErrParamMinLen("ImageId", 1))
  6095. }
  6096. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  6097. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  6098. }
  6099. if s.InstanceType != nil && len(*s.InstanceType) < 1 {
  6100. invalidParams.Add(request.NewErrParamMinLen("InstanceType", 1))
  6101. }
  6102. if s.KernelId != nil && len(*s.KernelId) < 1 {
  6103. invalidParams.Add(request.NewErrParamMinLen("KernelId", 1))
  6104. }
  6105. if s.KeyName != nil && len(*s.KeyName) < 1 {
  6106. invalidParams.Add(request.NewErrParamMinLen("KeyName", 1))
  6107. }
  6108. if s.LaunchConfigurationName == nil {
  6109. invalidParams.Add(request.NewErrParamRequired("LaunchConfigurationName"))
  6110. }
  6111. if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 {
  6112. invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1))
  6113. }
  6114. if s.PlacementTenancy != nil && len(*s.PlacementTenancy) < 1 {
  6115. invalidParams.Add(request.NewErrParamMinLen("PlacementTenancy", 1))
  6116. }
  6117. if s.RamdiskId != nil && len(*s.RamdiskId) < 1 {
  6118. invalidParams.Add(request.NewErrParamMinLen("RamdiskId", 1))
  6119. }
  6120. if s.SpotPrice != nil && len(*s.SpotPrice) < 1 {
  6121. invalidParams.Add(request.NewErrParamMinLen("SpotPrice", 1))
  6122. }
  6123. if s.BlockDeviceMappings != nil {
  6124. for i, v := range s.BlockDeviceMappings {
  6125. if v == nil {
  6126. continue
  6127. }
  6128. if err := v.Validate(); err != nil {
  6129. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "BlockDeviceMappings", i), err.(request.ErrInvalidParams))
  6130. }
  6131. }
  6132. }
  6133. if invalidParams.Len() > 0 {
  6134. return invalidParams
  6135. }
  6136. return nil
  6137. }
  6138. // SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value.
  6139. func (s *CreateLaunchConfigurationInput) SetAssociatePublicIpAddress(v bool) *CreateLaunchConfigurationInput {
  6140. s.AssociatePublicIpAddress = &v
  6141. return s
  6142. }
  6143. // SetBlockDeviceMappings sets the BlockDeviceMappings field's value.
  6144. func (s *CreateLaunchConfigurationInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *CreateLaunchConfigurationInput {
  6145. s.BlockDeviceMappings = v
  6146. return s
  6147. }
  6148. // SetClassicLinkVPCId sets the ClassicLinkVPCId field's value.
  6149. func (s *CreateLaunchConfigurationInput) SetClassicLinkVPCId(v string) *CreateLaunchConfigurationInput {
  6150. s.ClassicLinkVPCId = &v
  6151. return s
  6152. }
  6153. // SetClassicLinkVPCSecurityGroups sets the ClassicLinkVPCSecurityGroups field's value.
  6154. func (s *CreateLaunchConfigurationInput) SetClassicLinkVPCSecurityGroups(v []*string) *CreateLaunchConfigurationInput {
  6155. s.ClassicLinkVPCSecurityGroups = v
  6156. return s
  6157. }
  6158. // SetEbsOptimized sets the EbsOptimized field's value.
  6159. func (s *CreateLaunchConfigurationInput) SetEbsOptimized(v bool) *CreateLaunchConfigurationInput {
  6160. s.EbsOptimized = &v
  6161. return s
  6162. }
  6163. // SetIamInstanceProfile sets the IamInstanceProfile field's value.
  6164. func (s *CreateLaunchConfigurationInput) SetIamInstanceProfile(v string) *CreateLaunchConfigurationInput {
  6165. s.IamInstanceProfile = &v
  6166. return s
  6167. }
  6168. // SetImageId sets the ImageId field's value.
  6169. func (s *CreateLaunchConfigurationInput) SetImageId(v string) *CreateLaunchConfigurationInput {
  6170. s.ImageId = &v
  6171. return s
  6172. }
  6173. // SetInstanceId sets the InstanceId field's value.
  6174. func (s *CreateLaunchConfigurationInput) SetInstanceId(v string) *CreateLaunchConfigurationInput {
  6175. s.InstanceId = &v
  6176. return s
  6177. }
  6178. // SetInstanceMonitoring sets the InstanceMonitoring field's value.
  6179. func (s *CreateLaunchConfigurationInput) SetInstanceMonitoring(v *InstanceMonitoring) *CreateLaunchConfigurationInput {
  6180. s.InstanceMonitoring = v
  6181. return s
  6182. }
  6183. // SetInstanceType sets the InstanceType field's value.
  6184. func (s *CreateLaunchConfigurationInput) SetInstanceType(v string) *CreateLaunchConfigurationInput {
  6185. s.InstanceType = &v
  6186. return s
  6187. }
  6188. // SetKernelId sets the KernelId field's value.
  6189. func (s *CreateLaunchConfigurationInput) SetKernelId(v string) *CreateLaunchConfigurationInput {
  6190. s.KernelId = &v
  6191. return s
  6192. }
  6193. // SetKeyName sets the KeyName field's value.
  6194. func (s *CreateLaunchConfigurationInput) SetKeyName(v string) *CreateLaunchConfigurationInput {
  6195. s.KeyName = &v
  6196. return s
  6197. }
  6198. // SetLaunchConfigurationName sets the LaunchConfigurationName field's value.
  6199. func (s *CreateLaunchConfigurationInput) SetLaunchConfigurationName(v string) *CreateLaunchConfigurationInput {
  6200. s.LaunchConfigurationName = &v
  6201. return s
  6202. }
  6203. // SetPlacementTenancy sets the PlacementTenancy field's value.
  6204. func (s *CreateLaunchConfigurationInput) SetPlacementTenancy(v string) *CreateLaunchConfigurationInput {
  6205. s.PlacementTenancy = &v
  6206. return s
  6207. }
  6208. // SetRamdiskId sets the RamdiskId field's value.
  6209. func (s *CreateLaunchConfigurationInput) SetRamdiskId(v string) *CreateLaunchConfigurationInput {
  6210. s.RamdiskId = &v
  6211. return s
  6212. }
  6213. // SetSecurityGroups sets the SecurityGroups field's value.
  6214. func (s *CreateLaunchConfigurationInput) SetSecurityGroups(v []*string) *CreateLaunchConfigurationInput {
  6215. s.SecurityGroups = v
  6216. return s
  6217. }
  6218. // SetSpotPrice sets the SpotPrice field's value.
  6219. func (s *CreateLaunchConfigurationInput) SetSpotPrice(v string) *CreateLaunchConfigurationInput {
  6220. s.SpotPrice = &v
  6221. return s
  6222. }
  6223. // SetUserData sets the UserData field's value.
  6224. func (s *CreateLaunchConfigurationInput) SetUserData(v string) *CreateLaunchConfigurationInput {
  6225. s.UserData = &v
  6226. return s
  6227. }
  6228. type CreateLaunchConfigurationOutput struct {
  6229. _ struct{} `type:"structure"`
  6230. }
  6231. // String returns the string representation
  6232. func (s CreateLaunchConfigurationOutput) String() string {
  6233. return awsutil.Prettify(s)
  6234. }
  6235. // GoString returns the string representation
  6236. func (s CreateLaunchConfigurationOutput) GoString() string {
  6237. return s.String()
  6238. }
  6239. type CreateOrUpdateTagsInput struct {
  6240. _ struct{} `type:"structure"`
  6241. // One or more tags.
  6242. //
  6243. // Tags is a required field
  6244. Tags []*Tag `type:"list" required:"true"`
  6245. }
  6246. // String returns the string representation
  6247. func (s CreateOrUpdateTagsInput) String() string {
  6248. return awsutil.Prettify(s)
  6249. }
  6250. // GoString returns the string representation
  6251. func (s CreateOrUpdateTagsInput) GoString() string {
  6252. return s.String()
  6253. }
  6254. // Validate inspects the fields of the type to determine if they are valid.
  6255. func (s *CreateOrUpdateTagsInput) Validate() error {
  6256. invalidParams := request.ErrInvalidParams{Context: "CreateOrUpdateTagsInput"}
  6257. if s.Tags == nil {
  6258. invalidParams.Add(request.NewErrParamRequired("Tags"))
  6259. }
  6260. if s.Tags != nil {
  6261. for i, v := range s.Tags {
  6262. if v == nil {
  6263. continue
  6264. }
  6265. if err := v.Validate(); err != nil {
  6266. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  6267. }
  6268. }
  6269. }
  6270. if invalidParams.Len() > 0 {
  6271. return invalidParams
  6272. }
  6273. return nil
  6274. }
  6275. // SetTags sets the Tags field's value.
  6276. func (s *CreateOrUpdateTagsInput) SetTags(v []*Tag) *CreateOrUpdateTagsInput {
  6277. s.Tags = v
  6278. return s
  6279. }
  6280. type CreateOrUpdateTagsOutput struct {
  6281. _ struct{} `type:"structure"`
  6282. }
  6283. // String returns the string representation
  6284. func (s CreateOrUpdateTagsOutput) String() string {
  6285. return awsutil.Prettify(s)
  6286. }
  6287. // GoString returns the string representation
  6288. func (s CreateOrUpdateTagsOutput) GoString() string {
  6289. return s.String()
  6290. }
  6291. // Represents a CloudWatch metric of your choosing for a target tracking scaling
  6292. // policy to use with Amazon EC2 Auto Scaling.
  6293. //
  6294. // To create your customized metric specification:
  6295. //
  6296. // * Add values for each required parameter from CloudWatch. You can use
  6297. // an existing metric, or a new metric that you create. To use your own metric,
  6298. // you must first publish the metric to CloudWatch. For more information,
  6299. // see Publish Custom Metrics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html)
  6300. // in the Amazon CloudWatch User Guide.
  6301. //
  6302. // * Choose a metric that changes proportionally with capacity. The value
  6303. // of the metric should increase or decrease in inverse proportion to the
  6304. // number of capacity units. That is, the value of the metric should decrease
  6305. // when capacity increases.
  6306. //
  6307. // For more information about CloudWatch, see Amazon CloudWatch Concepts (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html).
  6308. type CustomizedMetricSpecification struct {
  6309. _ struct{} `type:"structure"`
  6310. // The dimensions of the metric.
  6311. //
  6312. // Conditional: If you published your metric with dimensions, you must specify
  6313. // the same dimensions in your scaling policy.
  6314. Dimensions []*MetricDimension `type:"list"`
  6315. // The name of the metric.
  6316. //
  6317. // MetricName is a required field
  6318. MetricName *string `type:"string" required:"true"`
  6319. // The namespace of the metric.
  6320. //
  6321. // Namespace is a required field
  6322. Namespace *string `type:"string" required:"true"`
  6323. // The statistic of the metric.
  6324. //
  6325. // Statistic is a required field
  6326. Statistic *string `type:"string" required:"true" enum:"MetricStatistic"`
  6327. // The unit of the metric.
  6328. Unit *string `type:"string"`
  6329. }
  6330. // String returns the string representation
  6331. func (s CustomizedMetricSpecification) String() string {
  6332. return awsutil.Prettify(s)
  6333. }
  6334. // GoString returns the string representation
  6335. func (s CustomizedMetricSpecification) GoString() string {
  6336. return s.String()
  6337. }
  6338. // Validate inspects the fields of the type to determine if they are valid.
  6339. func (s *CustomizedMetricSpecification) Validate() error {
  6340. invalidParams := request.ErrInvalidParams{Context: "CustomizedMetricSpecification"}
  6341. if s.MetricName == nil {
  6342. invalidParams.Add(request.NewErrParamRequired("MetricName"))
  6343. }
  6344. if s.Namespace == nil {
  6345. invalidParams.Add(request.NewErrParamRequired("Namespace"))
  6346. }
  6347. if s.Statistic == nil {
  6348. invalidParams.Add(request.NewErrParamRequired("Statistic"))
  6349. }
  6350. if s.Dimensions != nil {
  6351. for i, v := range s.Dimensions {
  6352. if v == nil {
  6353. continue
  6354. }
  6355. if err := v.Validate(); err != nil {
  6356. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(request.ErrInvalidParams))
  6357. }
  6358. }
  6359. }
  6360. if invalidParams.Len() > 0 {
  6361. return invalidParams
  6362. }
  6363. return nil
  6364. }
  6365. // SetDimensions sets the Dimensions field's value.
  6366. func (s *CustomizedMetricSpecification) SetDimensions(v []*MetricDimension) *CustomizedMetricSpecification {
  6367. s.Dimensions = v
  6368. return s
  6369. }
  6370. // SetMetricName sets the MetricName field's value.
  6371. func (s *CustomizedMetricSpecification) SetMetricName(v string) *CustomizedMetricSpecification {
  6372. s.MetricName = &v
  6373. return s
  6374. }
  6375. // SetNamespace sets the Namespace field's value.
  6376. func (s *CustomizedMetricSpecification) SetNamespace(v string) *CustomizedMetricSpecification {
  6377. s.Namespace = &v
  6378. return s
  6379. }
  6380. // SetStatistic sets the Statistic field's value.
  6381. func (s *CustomizedMetricSpecification) SetStatistic(v string) *CustomizedMetricSpecification {
  6382. s.Statistic = &v
  6383. return s
  6384. }
  6385. // SetUnit sets the Unit field's value.
  6386. func (s *CustomizedMetricSpecification) SetUnit(v string) *CustomizedMetricSpecification {
  6387. s.Unit = &v
  6388. return s
  6389. }
  6390. type DeleteAutoScalingGroupInput struct {
  6391. _ struct{} `type:"structure"`
  6392. // The name of the Auto Scaling group.
  6393. //
  6394. // AutoScalingGroupName is a required field
  6395. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  6396. // Specifies that the group is to be deleted along with all instances associated
  6397. // with the group, without waiting for all instances to be terminated. This
  6398. // parameter also deletes any lifecycle actions associated with the group.
  6399. ForceDelete *bool `type:"boolean"`
  6400. }
  6401. // String returns the string representation
  6402. func (s DeleteAutoScalingGroupInput) String() string {
  6403. return awsutil.Prettify(s)
  6404. }
  6405. // GoString returns the string representation
  6406. func (s DeleteAutoScalingGroupInput) GoString() string {
  6407. return s.String()
  6408. }
  6409. // Validate inspects the fields of the type to determine if they are valid.
  6410. func (s *DeleteAutoScalingGroupInput) Validate() error {
  6411. invalidParams := request.ErrInvalidParams{Context: "DeleteAutoScalingGroupInput"}
  6412. if s.AutoScalingGroupName == nil {
  6413. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  6414. }
  6415. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6416. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6417. }
  6418. if invalidParams.Len() > 0 {
  6419. return invalidParams
  6420. }
  6421. return nil
  6422. }
  6423. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  6424. func (s *DeleteAutoScalingGroupInput) SetAutoScalingGroupName(v string) *DeleteAutoScalingGroupInput {
  6425. s.AutoScalingGroupName = &v
  6426. return s
  6427. }
  6428. // SetForceDelete sets the ForceDelete field's value.
  6429. func (s *DeleteAutoScalingGroupInput) SetForceDelete(v bool) *DeleteAutoScalingGroupInput {
  6430. s.ForceDelete = &v
  6431. return s
  6432. }
  6433. type DeleteAutoScalingGroupOutput struct {
  6434. _ struct{} `type:"structure"`
  6435. }
  6436. // String returns the string representation
  6437. func (s DeleteAutoScalingGroupOutput) String() string {
  6438. return awsutil.Prettify(s)
  6439. }
  6440. // GoString returns the string representation
  6441. func (s DeleteAutoScalingGroupOutput) GoString() string {
  6442. return s.String()
  6443. }
  6444. type DeleteLaunchConfigurationInput struct {
  6445. _ struct{} `type:"structure"`
  6446. // The name of the launch configuration.
  6447. //
  6448. // LaunchConfigurationName is a required field
  6449. LaunchConfigurationName *string `min:"1" type:"string" required:"true"`
  6450. }
  6451. // String returns the string representation
  6452. func (s DeleteLaunchConfigurationInput) String() string {
  6453. return awsutil.Prettify(s)
  6454. }
  6455. // GoString returns the string representation
  6456. func (s DeleteLaunchConfigurationInput) GoString() string {
  6457. return s.String()
  6458. }
  6459. // Validate inspects the fields of the type to determine if they are valid.
  6460. func (s *DeleteLaunchConfigurationInput) Validate() error {
  6461. invalidParams := request.ErrInvalidParams{Context: "DeleteLaunchConfigurationInput"}
  6462. if s.LaunchConfigurationName == nil {
  6463. invalidParams.Add(request.NewErrParamRequired("LaunchConfigurationName"))
  6464. }
  6465. if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 {
  6466. invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1))
  6467. }
  6468. if invalidParams.Len() > 0 {
  6469. return invalidParams
  6470. }
  6471. return nil
  6472. }
  6473. // SetLaunchConfigurationName sets the LaunchConfigurationName field's value.
  6474. func (s *DeleteLaunchConfigurationInput) SetLaunchConfigurationName(v string) *DeleteLaunchConfigurationInput {
  6475. s.LaunchConfigurationName = &v
  6476. return s
  6477. }
  6478. type DeleteLaunchConfigurationOutput struct {
  6479. _ struct{} `type:"structure"`
  6480. }
  6481. // String returns the string representation
  6482. func (s DeleteLaunchConfigurationOutput) String() string {
  6483. return awsutil.Prettify(s)
  6484. }
  6485. // GoString returns the string representation
  6486. func (s DeleteLaunchConfigurationOutput) GoString() string {
  6487. return s.String()
  6488. }
  6489. type DeleteLifecycleHookInput struct {
  6490. _ struct{} `type:"structure"`
  6491. // The name of the Auto Scaling group.
  6492. //
  6493. // AutoScalingGroupName is a required field
  6494. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  6495. // The name of the lifecycle hook.
  6496. //
  6497. // LifecycleHookName is a required field
  6498. LifecycleHookName *string `min:"1" type:"string" required:"true"`
  6499. }
  6500. // String returns the string representation
  6501. func (s DeleteLifecycleHookInput) String() string {
  6502. return awsutil.Prettify(s)
  6503. }
  6504. // GoString returns the string representation
  6505. func (s DeleteLifecycleHookInput) GoString() string {
  6506. return s.String()
  6507. }
  6508. // Validate inspects the fields of the type to determine if they are valid.
  6509. func (s *DeleteLifecycleHookInput) Validate() error {
  6510. invalidParams := request.ErrInvalidParams{Context: "DeleteLifecycleHookInput"}
  6511. if s.AutoScalingGroupName == nil {
  6512. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  6513. }
  6514. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6515. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6516. }
  6517. if s.LifecycleHookName == nil {
  6518. invalidParams.Add(request.NewErrParamRequired("LifecycleHookName"))
  6519. }
  6520. if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 {
  6521. invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1))
  6522. }
  6523. if invalidParams.Len() > 0 {
  6524. return invalidParams
  6525. }
  6526. return nil
  6527. }
  6528. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  6529. func (s *DeleteLifecycleHookInput) SetAutoScalingGroupName(v string) *DeleteLifecycleHookInput {
  6530. s.AutoScalingGroupName = &v
  6531. return s
  6532. }
  6533. // SetLifecycleHookName sets the LifecycleHookName field's value.
  6534. func (s *DeleteLifecycleHookInput) SetLifecycleHookName(v string) *DeleteLifecycleHookInput {
  6535. s.LifecycleHookName = &v
  6536. return s
  6537. }
  6538. type DeleteLifecycleHookOutput struct {
  6539. _ struct{} `type:"structure"`
  6540. }
  6541. // String returns the string representation
  6542. func (s DeleteLifecycleHookOutput) String() string {
  6543. return awsutil.Prettify(s)
  6544. }
  6545. // GoString returns the string representation
  6546. func (s DeleteLifecycleHookOutput) GoString() string {
  6547. return s.String()
  6548. }
  6549. type DeleteNotificationConfigurationInput struct {
  6550. _ struct{} `type:"structure"`
  6551. // The name of the Auto Scaling group.
  6552. //
  6553. // AutoScalingGroupName is a required field
  6554. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  6555. // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service
  6556. // (Amazon SNS) topic.
  6557. //
  6558. // TopicARN is a required field
  6559. TopicARN *string `min:"1" type:"string" required:"true"`
  6560. }
  6561. // String returns the string representation
  6562. func (s DeleteNotificationConfigurationInput) String() string {
  6563. return awsutil.Prettify(s)
  6564. }
  6565. // GoString returns the string representation
  6566. func (s DeleteNotificationConfigurationInput) GoString() string {
  6567. return s.String()
  6568. }
  6569. // Validate inspects the fields of the type to determine if they are valid.
  6570. func (s *DeleteNotificationConfigurationInput) Validate() error {
  6571. invalidParams := request.ErrInvalidParams{Context: "DeleteNotificationConfigurationInput"}
  6572. if s.AutoScalingGroupName == nil {
  6573. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  6574. }
  6575. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6576. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6577. }
  6578. if s.TopicARN == nil {
  6579. invalidParams.Add(request.NewErrParamRequired("TopicARN"))
  6580. }
  6581. if s.TopicARN != nil && len(*s.TopicARN) < 1 {
  6582. invalidParams.Add(request.NewErrParamMinLen("TopicARN", 1))
  6583. }
  6584. if invalidParams.Len() > 0 {
  6585. return invalidParams
  6586. }
  6587. return nil
  6588. }
  6589. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  6590. func (s *DeleteNotificationConfigurationInput) SetAutoScalingGroupName(v string) *DeleteNotificationConfigurationInput {
  6591. s.AutoScalingGroupName = &v
  6592. return s
  6593. }
  6594. // SetTopicARN sets the TopicARN field's value.
  6595. func (s *DeleteNotificationConfigurationInput) SetTopicARN(v string) *DeleteNotificationConfigurationInput {
  6596. s.TopicARN = &v
  6597. return s
  6598. }
  6599. type DeleteNotificationConfigurationOutput struct {
  6600. _ struct{} `type:"structure"`
  6601. }
  6602. // String returns the string representation
  6603. func (s DeleteNotificationConfigurationOutput) String() string {
  6604. return awsutil.Prettify(s)
  6605. }
  6606. // GoString returns the string representation
  6607. func (s DeleteNotificationConfigurationOutput) GoString() string {
  6608. return s.String()
  6609. }
  6610. type DeletePolicyInput struct {
  6611. _ struct{} `type:"structure"`
  6612. // The name of the Auto Scaling group.
  6613. AutoScalingGroupName *string `min:"1" type:"string"`
  6614. // The name or Amazon Resource Name (ARN) of the policy.
  6615. //
  6616. // PolicyName is a required field
  6617. PolicyName *string `min:"1" type:"string" required:"true"`
  6618. }
  6619. // String returns the string representation
  6620. func (s DeletePolicyInput) String() string {
  6621. return awsutil.Prettify(s)
  6622. }
  6623. // GoString returns the string representation
  6624. func (s DeletePolicyInput) GoString() string {
  6625. return s.String()
  6626. }
  6627. // Validate inspects the fields of the type to determine if they are valid.
  6628. func (s *DeletePolicyInput) Validate() error {
  6629. invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"}
  6630. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6631. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6632. }
  6633. if s.PolicyName == nil {
  6634. invalidParams.Add(request.NewErrParamRequired("PolicyName"))
  6635. }
  6636. if s.PolicyName != nil && len(*s.PolicyName) < 1 {
  6637. invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
  6638. }
  6639. if invalidParams.Len() > 0 {
  6640. return invalidParams
  6641. }
  6642. return nil
  6643. }
  6644. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  6645. func (s *DeletePolicyInput) SetAutoScalingGroupName(v string) *DeletePolicyInput {
  6646. s.AutoScalingGroupName = &v
  6647. return s
  6648. }
  6649. // SetPolicyName sets the PolicyName field's value.
  6650. func (s *DeletePolicyInput) SetPolicyName(v string) *DeletePolicyInput {
  6651. s.PolicyName = &v
  6652. return s
  6653. }
  6654. type DeletePolicyOutput struct {
  6655. _ struct{} `type:"structure"`
  6656. }
  6657. // String returns the string representation
  6658. func (s DeletePolicyOutput) String() string {
  6659. return awsutil.Prettify(s)
  6660. }
  6661. // GoString returns the string representation
  6662. func (s DeletePolicyOutput) GoString() string {
  6663. return s.String()
  6664. }
  6665. type DeleteScheduledActionInput struct {
  6666. _ struct{} `type:"structure"`
  6667. // The name of the Auto Scaling group.
  6668. //
  6669. // AutoScalingGroupName is a required field
  6670. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  6671. // The name of the action to delete.
  6672. //
  6673. // ScheduledActionName is a required field
  6674. ScheduledActionName *string `min:"1" type:"string" required:"true"`
  6675. }
  6676. // String returns the string representation
  6677. func (s DeleteScheduledActionInput) String() string {
  6678. return awsutil.Prettify(s)
  6679. }
  6680. // GoString returns the string representation
  6681. func (s DeleteScheduledActionInput) GoString() string {
  6682. return s.String()
  6683. }
  6684. // Validate inspects the fields of the type to determine if they are valid.
  6685. func (s *DeleteScheduledActionInput) Validate() error {
  6686. invalidParams := request.ErrInvalidParams{Context: "DeleteScheduledActionInput"}
  6687. if s.AutoScalingGroupName == nil {
  6688. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  6689. }
  6690. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  6691. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  6692. }
  6693. if s.ScheduledActionName == nil {
  6694. invalidParams.Add(request.NewErrParamRequired("ScheduledActionName"))
  6695. }
  6696. if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 {
  6697. invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1))
  6698. }
  6699. if invalidParams.Len() > 0 {
  6700. return invalidParams
  6701. }
  6702. return nil
  6703. }
  6704. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  6705. func (s *DeleteScheduledActionInput) SetAutoScalingGroupName(v string) *DeleteScheduledActionInput {
  6706. s.AutoScalingGroupName = &v
  6707. return s
  6708. }
  6709. // SetScheduledActionName sets the ScheduledActionName field's value.
  6710. func (s *DeleteScheduledActionInput) SetScheduledActionName(v string) *DeleteScheduledActionInput {
  6711. s.ScheduledActionName = &v
  6712. return s
  6713. }
  6714. type DeleteScheduledActionOutput struct {
  6715. _ struct{} `type:"structure"`
  6716. }
  6717. // String returns the string representation
  6718. func (s DeleteScheduledActionOutput) String() string {
  6719. return awsutil.Prettify(s)
  6720. }
  6721. // GoString returns the string representation
  6722. func (s DeleteScheduledActionOutput) GoString() string {
  6723. return s.String()
  6724. }
  6725. type DeleteTagsInput struct {
  6726. _ struct{} `type:"structure"`
  6727. // One or more tags.
  6728. //
  6729. // Tags is a required field
  6730. Tags []*Tag `type:"list" required:"true"`
  6731. }
  6732. // String returns the string representation
  6733. func (s DeleteTagsInput) String() string {
  6734. return awsutil.Prettify(s)
  6735. }
  6736. // GoString returns the string representation
  6737. func (s DeleteTagsInput) GoString() string {
  6738. return s.String()
  6739. }
  6740. // Validate inspects the fields of the type to determine if they are valid.
  6741. func (s *DeleteTagsInput) Validate() error {
  6742. invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"}
  6743. if s.Tags == nil {
  6744. invalidParams.Add(request.NewErrParamRequired("Tags"))
  6745. }
  6746. if s.Tags != nil {
  6747. for i, v := range s.Tags {
  6748. if v == nil {
  6749. continue
  6750. }
  6751. if err := v.Validate(); err != nil {
  6752. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  6753. }
  6754. }
  6755. }
  6756. if invalidParams.Len() > 0 {
  6757. return invalidParams
  6758. }
  6759. return nil
  6760. }
  6761. // SetTags sets the Tags field's value.
  6762. func (s *DeleteTagsInput) SetTags(v []*Tag) *DeleteTagsInput {
  6763. s.Tags = v
  6764. return s
  6765. }
  6766. type DeleteTagsOutput struct {
  6767. _ struct{} `type:"structure"`
  6768. }
  6769. // String returns the string representation
  6770. func (s DeleteTagsOutput) String() string {
  6771. return awsutil.Prettify(s)
  6772. }
  6773. // GoString returns the string representation
  6774. func (s DeleteTagsOutput) GoString() string {
  6775. return s.String()
  6776. }
  6777. type DescribeAccountLimitsInput struct {
  6778. _ struct{} `type:"structure"`
  6779. }
  6780. // String returns the string representation
  6781. func (s DescribeAccountLimitsInput) String() string {
  6782. return awsutil.Prettify(s)
  6783. }
  6784. // GoString returns the string representation
  6785. func (s DescribeAccountLimitsInput) GoString() string {
  6786. return s.String()
  6787. }
  6788. type DescribeAccountLimitsOutput struct {
  6789. _ struct{} `type:"structure"`
  6790. // The maximum number of groups allowed for your AWS account. The default limit
  6791. // is 200 per AWS Region.
  6792. MaxNumberOfAutoScalingGroups *int64 `type:"integer"`
  6793. // The maximum number of launch configurations allowed for your AWS account.
  6794. // The default limit is 200 per AWS Region.
  6795. MaxNumberOfLaunchConfigurations *int64 `type:"integer"`
  6796. // The current number of groups for your AWS account.
  6797. NumberOfAutoScalingGroups *int64 `type:"integer"`
  6798. // The current number of launch configurations for your AWS account.
  6799. NumberOfLaunchConfigurations *int64 `type:"integer"`
  6800. }
  6801. // String returns the string representation
  6802. func (s DescribeAccountLimitsOutput) String() string {
  6803. return awsutil.Prettify(s)
  6804. }
  6805. // GoString returns the string representation
  6806. func (s DescribeAccountLimitsOutput) GoString() string {
  6807. return s.String()
  6808. }
  6809. // SetMaxNumberOfAutoScalingGroups sets the MaxNumberOfAutoScalingGroups field's value.
  6810. func (s *DescribeAccountLimitsOutput) SetMaxNumberOfAutoScalingGroups(v int64) *DescribeAccountLimitsOutput {
  6811. s.MaxNumberOfAutoScalingGroups = &v
  6812. return s
  6813. }
  6814. // SetMaxNumberOfLaunchConfigurations sets the MaxNumberOfLaunchConfigurations field's value.
  6815. func (s *DescribeAccountLimitsOutput) SetMaxNumberOfLaunchConfigurations(v int64) *DescribeAccountLimitsOutput {
  6816. s.MaxNumberOfLaunchConfigurations = &v
  6817. return s
  6818. }
  6819. // SetNumberOfAutoScalingGroups sets the NumberOfAutoScalingGroups field's value.
  6820. func (s *DescribeAccountLimitsOutput) SetNumberOfAutoScalingGroups(v int64) *DescribeAccountLimitsOutput {
  6821. s.NumberOfAutoScalingGroups = &v
  6822. return s
  6823. }
  6824. // SetNumberOfLaunchConfigurations sets the NumberOfLaunchConfigurations field's value.
  6825. func (s *DescribeAccountLimitsOutput) SetNumberOfLaunchConfigurations(v int64) *DescribeAccountLimitsOutput {
  6826. s.NumberOfLaunchConfigurations = &v
  6827. return s
  6828. }
  6829. type DescribeAdjustmentTypesInput struct {
  6830. _ struct{} `type:"structure"`
  6831. }
  6832. // String returns the string representation
  6833. func (s DescribeAdjustmentTypesInput) String() string {
  6834. return awsutil.Prettify(s)
  6835. }
  6836. // GoString returns the string representation
  6837. func (s DescribeAdjustmentTypesInput) GoString() string {
  6838. return s.String()
  6839. }
  6840. type DescribeAdjustmentTypesOutput struct {
  6841. _ struct{} `type:"structure"`
  6842. // The policy adjustment types.
  6843. AdjustmentTypes []*AdjustmentType `type:"list"`
  6844. }
  6845. // String returns the string representation
  6846. func (s DescribeAdjustmentTypesOutput) String() string {
  6847. return awsutil.Prettify(s)
  6848. }
  6849. // GoString returns the string representation
  6850. func (s DescribeAdjustmentTypesOutput) GoString() string {
  6851. return s.String()
  6852. }
  6853. // SetAdjustmentTypes sets the AdjustmentTypes field's value.
  6854. func (s *DescribeAdjustmentTypesOutput) SetAdjustmentTypes(v []*AdjustmentType) *DescribeAdjustmentTypesOutput {
  6855. s.AdjustmentTypes = v
  6856. return s
  6857. }
  6858. type DescribeAutoScalingGroupsInput struct {
  6859. _ struct{} `type:"structure"`
  6860. // The names of the Auto Scaling groups. Each name can be a maximum of 1600
  6861. // characters. By default, you can only specify up to 50 names. You can optionally
  6862. // increase this limit using the MaxRecords parameter.
  6863. //
  6864. // If you omit this parameter, all Auto Scaling groups are described.
  6865. AutoScalingGroupNames []*string `type:"list"`
  6866. // The maximum number of items to return with this call. The default value is
  6867. // 50 and the maximum value is 100.
  6868. MaxRecords *int64 `type:"integer"`
  6869. // The token for the next set of items to return. (You received this token from
  6870. // a previous call.)
  6871. NextToken *string `type:"string"`
  6872. }
  6873. // String returns the string representation
  6874. func (s DescribeAutoScalingGroupsInput) String() string {
  6875. return awsutil.Prettify(s)
  6876. }
  6877. // GoString returns the string representation
  6878. func (s DescribeAutoScalingGroupsInput) GoString() string {
  6879. return s.String()
  6880. }
  6881. // SetAutoScalingGroupNames sets the AutoScalingGroupNames field's value.
  6882. func (s *DescribeAutoScalingGroupsInput) SetAutoScalingGroupNames(v []*string) *DescribeAutoScalingGroupsInput {
  6883. s.AutoScalingGroupNames = v
  6884. return s
  6885. }
  6886. // SetMaxRecords sets the MaxRecords field's value.
  6887. func (s *DescribeAutoScalingGroupsInput) SetMaxRecords(v int64) *DescribeAutoScalingGroupsInput {
  6888. s.MaxRecords = &v
  6889. return s
  6890. }
  6891. // SetNextToken sets the NextToken field's value.
  6892. func (s *DescribeAutoScalingGroupsInput) SetNextToken(v string) *DescribeAutoScalingGroupsInput {
  6893. s.NextToken = &v
  6894. return s
  6895. }
  6896. type DescribeAutoScalingGroupsOutput struct {
  6897. _ struct{} `type:"structure"`
  6898. // The groups.
  6899. //
  6900. // AutoScalingGroups is a required field
  6901. AutoScalingGroups []*Group `type:"list" required:"true"`
  6902. // A string that indicates that the response contains more items than can be
  6903. // returned in a single response. To receive additional items, specify this
  6904. // string for the NextToken value when requesting the next set of items. This
  6905. // value is null when there are no more items to return.
  6906. NextToken *string `type:"string"`
  6907. }
  6908. // String returns the string representation
  6909. func (s DescribeAutoScalingGroupsOutput) String() string {
  6910. return awsutil.Prettify(s)
  6911. }
  6912. // GoString returns the string representation
  6913. func (s DescribeAutoScalingGroupsOutput) GoString() string {
  6914. return s.String()
  6915. }
  6916. // SetAutoScalingGroups sets the AutoScalingGroups field's value.
  6917. func (s *DescribeAutoScalingGroupsOutput) SetAutoScalingGroups(v []*Group) *DescribeAutoScalingGroupsOutput {
  6918. s.AutoScalingGroups = v
  6919. return s
  6920. }
  6921. // SetNextToken sets the NextToken field's value.
  6922. func (s *DescribeAutoScalingGroupsOutput) SetNextToken(v string) *DescribeAutoScalingGroupsOutput {
  6923. s.NextToken = &v
  6924. return s
  6925. }
  6926. type DescribeAutoScalingInstancesInput struct {
  6927. _ struct{} `type:"structure"`
  6928. // The IDs of the instances. You can specify up to MaxRecords IDs. If you omit
  6929. // this parameter, all Auto Scaling instances are described. If you specify
  6930. // an ID that does not exist, it is ignored with no error.
  6931. InstanceIds []*string `type:"list"`
  6932. // The maximum number of items to return with this call. The default value is
  6933. // 50 and the maximum value is 50.
  6934. MaxRecords *int64 `type:"integer"`
  6935. // The token for the next set of items to return. (You received this token from
  6936. // a previous call.)
  6937. NextToken *string `type:"string"`
  6938. }
  6939. // String returns the string representation
  6940. func (s DescribeAutoScalingInstancesInput) String() string {
  6941. return awsutil.Prettify(s)
  6942. }
  6943. // GoString returns the string representation
  6944. func (s DescribeAutoScalingInstancesInput) GoString() string {
  6945. return s.String()
  6946. }
  6947. // SetInstanceIds sets the InstanceIds field's value.
  6948. func (s *DescribeAutoScalingInstancesInput) SetInstanceIds(v []*string) *DescribeAutoScalingInstancesInput {
  6949. s.InstanceIds = v
  6950. return s
  6951. }
  6952. // SetMaxRecords sets the MaxRecords field's value.
  6953. func (s *DescribeAutoScalingInstancesInput) SetMaxRecords(v int64) *DescribeAutoScalingInstancesInput {
  6954. s.MaxRecords = &v
  6955. return s
  6956. }
  6957. // SetNextToken sets the NextToken field's value.
  6958. func (s *DescribeAutoScalingInstancesInput) SetNextToken(v string) *DescribeAutoScalingInstancesInput {
  6959. s.NextToken = &v
  6960. return s
  6961. }
  6962. type DescribeAutoScalingInstancesOutput struct {
  6963. _ struct{} `type:"structure"`
  6964. // The instances.
  6965. AutoScalingInstances []*InstanceDetails `type:"list"`
  6966. // A string that indicates that the response contains more items than can be
  6967. // returned in a single response. To receive additional items, specify this
  6968. // string for the NextToken value when requesting the next set of items. This
  6969. // value is null when there are no more items to return.
  6970. NextToken *string `type:"string"`
  6971. }
  6972. // String returns the string representation
  6973. func (s DescribeAutoScalingInstancesOutput) String() string {
  6974. return awsutil.Prettify(s)
  6975. }
  6976. // GoString returns the string representation
  6977. func (s DescribeAutoScalingInstancesOutput) GoString() string {
  6978. return s.String()
  6979. }
  6980. // SetAutoScalingInstances sets the AutoScalingInstances field's value.
  6981. func (s *DescribeAutoScalingInstancesOutput) SetAutoScalingInstances(v []*InstanceDetails) *DescribeAutoScalingInstancesOutput {
  6982. s.AutoScalingInstances = v
  6983. return s
  6984. }
  6985. // SetNextToken sets the NextToken field's value.
  6986. func (s *DescribeAutoScalingInstancesOutput) SetNextToken(v string) *DescribeAutoScalingInstancesOutput {
  6987. s.NextToken = &v
  6988. return s
  6989. }
  6990. type DescribeAutoScalingNotificationTypesInput struct {
  6991. _ struct{} `type:"structure"`
  6992. }
  6993. // String returns the string representation
  6994. func (s DescribeAutoScalingNotificationTypesInput) String() string {
  6995. return awsutil.Prettify(s)
  6996. }
  6997. // GoString returns the string representation
  6998. func (s DescribeAutoScalingNotificationTypesInput) GoString() string {
  6999. return s.String()
  7000. }
  7001. type DescribeAutoScalingNotificationTypesOutput struct {
  7002. _ struct{} `type:"structure"`
  7003. // The notification types.
  7004. AutoScalingNotificationTypes []*string `type:"list"`
  7005. }
  7006. // String returns the string representation
  7007. func (s DescribeAutoScalingNotificationTypesOutput) String() string {
  7008. return awsutil.Prettify(s)
  7009. }
  7010. // GoString returns the string representation
  7011. func (s DescribeAutoScalingNotificationTypesOutput) GoString() string {
  7012. return s.String()
  7013. }
  7014. // SetAutoScalingNotificationTypes sets the AutoScalingNotificationTypes field's value.
  7015. func (s *DescribeAutoScalingNotificationTypesOutput) SetAutoScalingNotificationTypes(v []*string) *DescribeAutoScalingNotificationTypesOutput {
  7016. s.AutoScalingNotificationTypes = v
  7017. return s
  7018. }
  7019. type DescribeLaunchConfigurationsInput struct {
  7020. _ struct{} `type:"structure"`
  7021. // The launch configuration names. If you omit this parameter, all launch configurations
  7022. // are described.
  7023. LaunchConfigurationNames []*string `type:"list"`
  7024. // The maximum number of items to return with this call. The default value is
  7025. // 50 and the maximum value is 100.
  7026. MaxRecords *int64 `type:"integer"`
  7027. // The token for the next set of items to return. (You received this token from
  7028. // a previous call.)
  7029. NextToken *string `type:"string"`
  7030. }
  7031. // String returns the string representation
  7032. func (s DescribeLaunchConfigurationsInput) String() string {
  7033. return awsutil.Prettify(s)
  7034. }
  7035. // GoString returns the string representation
  7036. func (s DescribeLaunchConfigurationsInput) GoString() string {
  7037. return s.String()
  7038. }
  7039. // SetLaunchConfigurationNames sets the LaunchConfigurationNames field's value.
  7040. func (s *DescribeLaunchConfigurationsInput) SetLaunchConfigurationNames(v []*string) *DescribeLaunchConfigurationsInput {
  7041. s.LaunchConfigurationNames = v
  7042. return s
  7043. }
  7044. // SetMaxRecords sets the MaxRecords field's value.
  7045. func (s *DescribeLaunchConfigurationsInput) SetMaxRecords(v int64) *DescribeLaunchConfigurationsInput {
  7046. s.MaxRecords = &v
  7047. return s
  7048. }
  7049. // SetNextToken sets the NextToken field's value.
  7050. func (s *DescribeLaunchConfigurationsInput) SetNextToken(v string) *DescribeLaunchConfigurationsInput {
  7051. s.NextToken = &v
  7052. return s
  7053. }
  7054. type DescribeLaunchConfigurationsOutput struct {
  7055. _ struct{} `type:"structure"`
  7056. // The launch configurations.
  7057. //
  7058. // LaunchConfigurations is a required field
  7059. LaunchConfigurations []*LaunchConfiguration `type:"list" required:"true"`
  7060. // A string that indicates that the response contains more items than can be
  7061. // returned in a single response. To receive additional items, specify this
  7062. // string for the NextToken value when requesting the next set of items. This
  7063. // value is null when there are no more items to return.
  7064. NextToken *string `type:"string"`
  7065. }
  7066. // String returns the string representation
  7067. func (s DescribeLaunchConfigurationsOutput) String() string {
  7068. return awsutil.Prettify(s)
  7069. }
  7070. // GoString returns the string representation
  7071. func (s DescribeLaunchConfigurationsOutput) GoString() string {
  7072. return s.String()
  7073. }
  7074. // SetLaunchConfigurations sets the LaunchConfigurations field's value.
  7075. func (s *DescribeLaunchConfigurationsOutput) SetLaunchConfigurations(v []*LaunchConfiguration) *DescribeLaunchConfigurationsOutput {
  7076. s.LaunchConfigurations = v
  7077. return s
  7078. }
  7079. // SetNextToken sets the NextToken field's value.
  7080. func (s *DescribeLaunchConfigurationsOutput) SetNextToken(v string) *DescribeLaunchConfigurationsOutput {
  7081. s.NextToken = &v
  7082. return s
  7083. }
  7084. type DescribeLifecycleHookTypesInput struct {
  7085. _ struct{} `type:"structure"`
  7086. }
  7087. // String returns the string representation
  7088. func (s DescribeLifecycleHookTypesInput) String() string {
  7089. return awsutil.Prettify(s)
  7090. }
  7091. // GoString returns the string representation
  7092. func (s DescribeLifecycleHookTypesInput) GoString() string {
  7093. return s.String()
  7094. }
  7095. type DescribeLifecycleHookTypesOutput struct {
  7096. _ struct{} `type:"structure"`
  7097. // The lifecycle hook types.
  7098. LifecycleHookTypes []*string `type:"list"`
  7099. }
  7100. // String returns the string representation
  7101. func (s DescribeLifecycleHookTypesOutput) String() string {
  7102. return awsutil.Prettify(s)
  7103. }
  7104. // GoString returns the string representation
  7105. func (s DescribeLifecycleHookTypesOutput) GoString() string {
  7106. return s.String()
  7107. }
  7108. // SetLifecycleHookTypes sets the LifecycleHookTypes field's value.
  7109. func (s *DescribeLifecycleHookTypesOutput) SetLifecycleHookTypes(v []*string) *DescribeLifecycleHookTypesOutput {
  7110. s.LifecycleHookTypes = v
  7111. return s
  7112. }
  7113. type DescribeLifecycleHooksInput struct {
  7114. _ struct{} `type:"structure"`
  7115. // The name of the Auto Scaling group.
  7116. //
  7117. // AutoScalingGroupName is a required field
  7118. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7119. // The names of one or more lifecycle hooks. If you omit this parameter, all
  7120. // lifecycle hooks are described.
  7121. LifecycleHookNames []*string `type:"list"`
  7122. }
  7123. // String returns the string representation
  7124. func (s DescribeLifecycleHooksInput) String() string {
  7125. return awsutil.Prettify(s)
  7126. }
  7127. // GoString returns the string representation
  7128. func (s DescribeLifecycleHooksInput) GoString() string {
  7129. return s.String()
  7130. }
  7131. // Validate inspects the fields of the type to determine if they are valid.
  7132. func (s *DescribeLifecycleHooksInput) Validate() error {
  7133. invalidParams := request.ErrInvalidParams{Context: "DescribeLifecycleHooksInput"}
  7134. if s.AutoScalingGroupName == nil {
  7135. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7136. }
  7137. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7138. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7139. }
  7140. if invalidParams.Len() > 0 {
  7141. return invalidParams
  7142. }
  7143. return nil
  7144. }
  7145. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7146. func (s *DescribeLifecycleHooksInput) SetAutoScalingGroupName(v string) *DescribeLifecycleHooksInput {
  7147. s.AutoScalingGroupName = &v
  7148. return s
  7149. }
  7150. // SetLifecycleHookNames sets the LifecycleHookNames field's value.
  7151. func (s *DescribeLifecycleHooksInput) SetLifecycleHookNames(v []*string) *DescribeLifecycleHooksInput {
  7152. s.LifecycleHookNames = v
  7153. return s
  7154. }
  7155. type DescribeLifecycleHooksOutput struct {
  7156. _ struct{} `type:"structure"`
  7157. // The lifecycle hooks for the specified group.
  7158. LifecycleHooks []*LifecycleHook `type:"list"`
  7159. }
  7160. // String returns the string representation
  7161. func (s DescribeLifecycleHooksOutput) String() string {
  7162. return awsutil.Prettify(s)
  7163. }
  7164. // GoString returns the string representation
  7165. func (s DescribeLifecycleHooksOutput) GoString() string {
  7166. return s.String()
  7167. }
  7168. // SetLifecycleHooks sets the LifecycleHooks field's value.
  7169. func (s *DescribeLifecycleHooksOutput) SetLifecycleHooks(v []*LifecycleHook) *DescribeLifecycleHooksOutput {
  7170. s.LifecycleHooks = v
  7171. return s
  7172. }
  7173. type DescribeLoadBalancerTargetGroupsInput struct {
  7174. _ struct{} `type:"structure"`
  7175. // The name of the Auto Scaling group.
  7176. //
  7177. // AutoScalingGroupName is a required field
  7178. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7179. // The maximum number of items to return with this call. The default value is
  7180. // 100 and the maximum value is 100.
  7181. MaxRecords *int64 `type:"integer"`
  7182. // The token for the next set of items to return. (You received this token from
  7183. // a previous call.)
  7184. NextToken *string `type:"string"`
  7185. }
  7186. // String returns the string representation
  7187. func (s DescribeLoadBalancerTargetGroupsInput) String() string {
  7188. return awsutil.Prettify(s)
  7189. }
  7190. // GoString returns the string representation
  7191. func (s DescribeLoadBalancerTargetGroupsInput) GoString() string {
  7192. return s.String()
  7193. }
  7194. // Validate inspects the fields of the type to determine if they are valid.
  7195. func (s *DescribeLoadBalancerTargetGroupsInput) Validate() error {
  7196. invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancerTargetGroupsInput"}
  7197. if s.AutoScalingGroupName == nil {
  7198. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7199. }
  7200. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7201. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7202. }
  7203. if invalidParams.Len() > 0 {
  7204. return invalidParams
  7205. }
  7206. return nil
  7207. }
  7208. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7209. func (s *DescribeLoadBalancerTargetGroupsInput) SetAutoScalingGroupName(v string) *DescribeLoadBalancerTargetGroupsInput {
  7210. s.AutoScalingGroupName = &v
  7211. return s
  7212. }
  7213. // SetMaxRecords sets the MaxRecords field's value.
  7214. func (s *DescribeLoadBalancerTargetGroupsInput) SetMaxRecords(v int64) *DescribeLoadBalancerTargetGroupsInput {
  7215. s.MaxRecords = &v
  7216. return s
  7217. }
  7218. // SetNextToken sets the NextToken field's value.
  7219. func (s *DescribeLoadBalancerTargetGroupsInput) SetNextToken(v string) *DescribeLoadBalancerTargetGroupsInput {
  7220. s.NextToken = &v
  7221. return s
  7222. }
  7223. type DescribeLoadBalancerTargetGroupsOutput struct {
  7224. _ struct{} `type:"structure"`
  7225. // Information about the target groups.
  7226. LoadBalancerTargetGroups []*LoadBalancerTargetGroupState `type:"list"`
  7227. // A string that indicates that the response contains more items than can be
  7228. // returned in a single response. To receive additional items, specify this
  7229. // string for the NextToken value when requesting the next set of items. This
  7230. // value is null when there are no more items to return.
  7231. NextToken *string `type:"string"`
  7232. }
  7233. // String returns the string representation
  7234. func (s DescribeLoadBalancerTargetGroupsOutput) String() string {
  7235. return awsutil.Prettify(s)
  7236. }
  7237. // GoString returns the string representation
  7238. func (s DescribeLoadBalancerTargetGroupsOutput) GoString() string {
  7239. return s.String()
  7240. }
  7241. // SetLoadBalancerTargetGroups sets the LoadBalancerTargetGroups field's value.
  7242. func (s *DescribeLoadBalancerTargetGroupsOutput) SetLoadBalancerTargetGroups(v []*LoadBalancerTargetGroupState) *DescribeLoadBalancerTargetGroupsOutput {
  7243. s.LoadBalancerTargetGroups = v
  7244. return s
  7245. }
  7246. // SetNextToken sets the NextToken field's value.
  7247. func (s *DescribeLoadBalancerTargetGroupsOutput) SetNextToken(v string) *DescribeLoadBalancerTargetGroupsOutput {
  7248. s.NextToken = &v
  7249. return s
  7250. }
  7251. type DescribeLoadBalancersInput struct {
  7252. _ struct{} `type:"structure"`
  7253. // The name of the Auto Scaling group.
  7254. //
  7255. // AutoScalingGroupName is a required field
  7256. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7257. // The maximum number of items to return with this call. The default value is
  7258. // 100 and the maximum value is 100.
  7259. MaxRecords *int64 `type:"integer"`
  7260. // The token for the next set of items to return. (You received this token from
  7261. // a previous call.)
  7262. NextToken *string `type:"string"`
  7263. }
  7264. // String returns the string representation
  7265. func (s DescribeLoadBalancersInput) String() string {
  7266. return awsutil.Prettify(s)
  7267. }
  7268. // GoString returns the string representation
  7269. func (s DescribeLoadBalancersInput) GoString() string {
  7270. return s.String()
  7271. }
  7272. // Validate inspects the fields of the type to determine if they are valid.
  7273. func (s *DescribeLoadBalancersInput) Validate() error {
  7274. invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancersInput"}
  7275. if s.AutoScalingGroupName == nil {
  7276. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7277. }
  7278. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7279. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7280. }
  7281. if invalidParams.Len() > 0 {
  7282. return invalidParams
  7283. }
  7284. return nil
  7285. }
  7286. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7287. func (s *DescribeLoadBalancersInput) SetAutoScalingGroupName(v string) *DescribeLoadBalancersInput {
  7288. s.AutoScalingGroupName = &v
  7289. return s
  7290. }
  7291. // SetMaxRecords sets the MaxRecords field's value.
  7292. func (s *DescribeLoadBalancersInput) SetMaxRecords(v int64) *DescribeLoadBalancersInput {
  7293. s.MaxRecords = &v
  7294. return s
  7295. }
  7296. // SetNextToken sets the NextToken field's value.
  7297. func (s *DescribeLoadBalancersInput) SetNextToken(v string) *DescribeLoadBalancersInput {
  7298. s.NextToken = &v
  7299. return s
  7300. }
  7301. type DescribeLoadBalancersOutput struct {
  7302. _ struct{} `type:"structure"`
  7303. // The load balancers.
  7304. LoadBalancers []*LoadBalancerState `type:"list"`
  7305. // A string that indicates that the response contains more items than can be
  7306. // returned in a single response. To receive additional items, specify this
  7307. // string for the NextToken value when requesting the next set of items. This
  7308. // value is null when there are no more items to return.
  7309. NextToken *string `type:"string"`
  7310. }
  7311. // String returns the string representation
  7312. func (s DescribeLoadBalancersOutput) String() string {
  7313. return awsutil.Prettify(s)
  7314. }
  7315. // GoString returns the string representation
  7316. func (s DescribeLoadBalancersOutput) GoString() string {
  7317. return s.String()
  7318. }
  7319. // SetLoadBalancers sets the LoadBalancers field's value.
  7320. func (s *DescribeLoadBalancersOutput) SetLoadBalancers(v []*LoadBalancerState) *DescribeLoadBalancersOutput {
  7321. s.LoadBalancers = v
  7322. return s
  7323. }
  7324. // SetNextToken sets the NextToken field's value.
  7325. func (s *DescribeLoadBalancersOutput) SetNextToken(v string) *DescribeLoadBalancersOutput {
  7326. s.NextToken = &v
  7327. return s
  7328. }
  7329. type DescribeMetricCollectionTypesInput struct {
  7330. _ struct{} `type:"structure"`
  7331. }
  7332. // String returns the string representation
  7333. func (s DescribeMetricCollectionTypesInput) String() string {
  7334. return awsutil.Prettify(s)
  7335. }
  7336. // GoString returns the string representation
  7337. func (s DescribeMetricCollectionTypesInput) GoString() string {
  7338. return s.String()
  7339. }
  7340. type DescribeMetricCollectionTypesOutput struct {
  7341. _ struct{} `type:"structure"`
  7342. // The granularities for the metrics.
  7343. Granularities []*MetricGranularityType `type:"list"`
  7344. // One or more metrics.
  7345. Metrics []*MetricCollectionType `type:"list"`
  7346. }
  7347. // String returns the string representation
  7348. func (s DescribeMetricCollectionTypesOutput) String() string {
  7349. return awsutil.Prettify(s)
  7350. }
  7351. // GoString returns the string representation
  7352. func (s DescribeMetricCollectionTypesOutput) GoString() string {
  7353. return s.String()
  7354. }
  7355. // SetGranularities sets the Granularities field's value.
  7356. func (s *DescribeMetricCollectionTypesOutput) SetGranularities(v []*MetricGranularityType) *DescribeMetricCollectionTypesOutput {
  7357. s.Granularities = v
  7358. return s
  7359. }
  7360. // SetMetrics sets the Metrics field's value.
  7361. func (s *DescribeMetricCollectionTypesOutput) SetMetrics(v []*MetricCollectionType) *DescribeMetricCollectionTypesOutput {
  7362. s.Metrics = v
  7363. return s
  7364. }
  7365. type DescribeNotificationConfigurationsInput struct {
  7366. _ struct{} `type:"structure"`
  7367. // The name of the Auto Scaling group.
  7368. AutoScalingGroupNames []*string `type:"list"`
  7369. // The maximum number of items to return with this call. The default value is
  7370. // 50 and the maximum value is 100.
  7371. MaxRecords *int64 `type:"integer"`
  7372. // The token for the next set of items to return. (You received this token from
  7373. // a previous call.)
  7374. NextToken *string `type:"string"`
  7375. }
  7376. // String returns the string representation
  7377. func (s DescribeNotificationConfigurationsInput) String() string {
  7378. return awsutil.Prettify(s)
  7379. }
  7380. // GoString returns the string representation
  7381. func (s DescribeNotificationConfigurationsInput) GoString() string {
  7382. return s.String()
  7383. }
  7384. // SetAutoScalingGroupNames sets the AutoScalingGroupNames field's value.
  7385. func (s *DescribeNotificationConfigurationsInput) SetAutoScalingGroupNames(v []*string) *DescribeNotificationConfigurationsInput {
  7386. s.AutoScalingGroupNames = v
  7387. return s
  7388. }
  7389. // SetMaxRecords sets the MaxRecords field's value.
  7390. func (s *DescribeNotificationConfigurationsInput) SetMaxRecords(v int64) *DescribeNotificationConfigurationsInput {
  7391. s.MaxRecords = &v
  7392. return s
  7393. }
  7394. // SetNextToken sets the NextToken field's value.
  7395. func (s *DescribeNotificationConfigurationsInput) SetNextToken(v string) *DescribeNotificationConfigurationsInput {
  7396. s.NextToken = &v
  7397. return s
  7398. }
  7399. type DescribeNotificationConfigurationsOutput struct {
  7400. _ struct{} `type:"structure"`
  7401. // A string that indicates that the response contains more items than can be
  7402. // returned in a single response. To receive additional items, specify this
  7403. // string for the NextToken value when requesting the next set of items. This
  7404. // value is null when there are no more items to return.
  7405. NextToken *string `type:"string"`
  7406. // The notification configurations.
  7407. //
  7408. // NotificationConfigurations is a required field
  7409. NotificationConfigurations []*NotificationConfiguration `type:"list" required:"true"`
  7410. }
  7411. // String returns the string representation
  7412. func (s DescribeNotificationConfigurationsOutput) String() string {
  7413. return awsutil.Prettify(s)
  7414. }
  7415. // GoString returns the string representation
  7416. func (s DescribeNotificationConfigurationsOutput) GoString() string {
  7417. return s.String()
  7418. }
  7419. // SetNextToken sets the NextToken field's value.
  7420. func (s *DescribeNotificationConfigurationsOutput) SetNextToken(v string) *DescribeNotificationConfigurationsOutput {
  7421. s.NextToken = &v
  7422. return s
  7423. }
  7424. // SetNotificationConfigurations sets the NotificationConfigurations field's value.
  7425. func (s *DescribeNotificationConfigurationsOutput) SetNotificationConfigurations(v []*NotificationConfiguration) *DescribeNotificationConfigurationsOutput {
  7426. s.NotificationConfigurations = v
  7427. return s
  7428. }
  7429. type DescribePoliciesInput struct {
  7430. _ struct{} `type:"structure"`
  7431. // The name of the Auto Scaling group.
  7432. AutoScalingGroupName *string `min:"1" type:"string"`
  7433. // The maximum number of items to be returned with each call. The default value
  7434. // is 50 and the maximum value is 100.
  7435. MaxRecords *int64 `type:"integer"`
  7436. // The token for the next set of items to return. (You received this token from
  7437. // a previous call.)
  7438. NextToken *string `type:"string"`
  7439. // The names of one or more policies. If you omit this parameter, all policies
  7440. // are described. If a group name is provided, the results are limited to that
  7441. // group. This list is limited to 50 items. If you specify an unknown policy
  7442. // name, it is ignored with no error.
  7443. PolicyNames []*string `type:"list"`
  7444. // One or more policy types. The valid values are SimpleScaling, StepScaling,
  7445. // and TargetTrackingScaling.
  7446. PolicyTypes []*string `type:"list"`
  7447. }
  7448. // String returns the string representation
  7449. func (s DescribePoliciesInput) String() string {
  7450. return awsutil.Prettify(s)
  7451. }
  7452. // GoString returns the string representation
  7453. func (s DescribePoliciesInput) GoString() string {
  7454. return s.String()
  7455. }
  7456. // Validate inspects the fields of the type to determine if they are valid.
  7457. func (s *DescribePoliciesInput) Validate() error {
  7458. invalidParams := request.ErrInvalidParams{Context: "DescribePoliciesInput"}
  7459. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7460. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7461. }
  7462. if invalidParams.Len() > 0 {
  7463. return invalidParams
  7464. }
  7465. return nil
  7466. }
  7467. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7468. func (s *DescribePoliciesInput) SetAutoScalingGroupName(v string) *DescribePoliciesInput {
  7469. s.AutoScalingGroupName = &v
  7470. return s
  7471. }
  7472. // SetMaxRecords sets the MaxRecords field's value.
  7473. func (s *DescribePoliciesInput) SetMaxRecords(v int64) *DescribePoliciesInput {
  7474. s.MaxRecords = &v
  7475. return s
  7476. }
  7477. // SetNextToken sets the NextToken field's value.
  7478. func (s *DescribePoliciesInput) SetNextToken(v string) *DescribePoliciesInput {
  7479. s.NextToken = &v
  7480. return s
  7481. }
  7482. // SetPolicyNames sets the PolicyNames field's value.
  7483. func (s *DescribePoliciesInput) SetPolicyNames(v []*string) *DescribePoliciesInput {
  7484. s.PolicyNames = v
  7485. return s
  7486. }
  7487. // SetPolicyTypes sets the PolicyTypes field's value.
  7488. func (s *DescribePoliciesInput) SetPolicyTypes(v []*string) *DescribePoliciesInput {
  7489. s.PolicyTypes = v
  7490. return s
  7491. }
  7492. type DescribePoliciesOutput struct {
  7493. _ struct{} `type:"structure"`
  7494. // A string that indicates that the response contains more items than can be
  7495. // returned in a single response. To receive additional items, specify this
  7496. // string for the NextToken value when requesting the next set of items. This
  7497. // value is null when there are no more items to return.
  7498. NextToken *string `type:"string"`
  7499. // The scaling policies.
  7500. ScalingPolicies []*ScalingPolicy `type:"list"`
  7501. }
  7502. // String returns the string representation
  7503. func (s DescribePoliciesOutput) String() string {
  7504. return awsutil.Prettify(s)
  7505. }
  7506. // GoString returns the string representation
  7507. func (s DescribePoliciesOutput) GoString() string {
  7508. return s.String()
  7509. }
  7510. // SetNextToken sets the NextToken field's value.
  7511. func (s *DescribePoliciesOutput) SetNextToken(v string) *DescribePoliciesOutput {
  7512. s.NextToken = &v
  7513. return s
  7514. }
  7515. // SetScalingPolicies sets the ScalingPolicies field's value.
  7516. func (s *DescribePoliciesOutput) SetScalingPolicies(v []*ScalingPolicy) *DescribePoliciesOutput {
  7517. s.ScalingPolicies = v
  7518. return s
  7519. }
  7520. type DescribeScalingActivitiesInput struct {
  7521. _ struct{} `type:"structure"`
  7522. // The activity IDs of the desired scaling activities. You can specify up to
  7523. // 50 IDs. If you omit this parameter, all activities for the past six weeks
  7524. // are described. If unknown activities are requested, they are ignored with
  7525. // no error. If you specify an Auto Scaling group, the results are limited to
  7526. // that group.
  7527. ActivityIds []*string `type:"list"`
  7528. // The name of the Auto Scaling group.
  7529. AutoScalingGroupName *string `min:"1" type:"string"`
  7530. // The maximum number of items to return with this call. The default value is
  7531. // 100 and the maximum value is 100.
  7532. MaxRecords *int64 `type:"integer"`
  7533. // The token for the next set of items to return. (You received this token from
  7534. // a previous call.)
  7535. NextToken *string `type:"string"`
  7536. }
  7537. // String returns the string representation
  7538. func (s DescribeScalingActivitiesInput) String() string {
  7539. return awsutil.Prettify(s)
  7540. }
  7541. // GoString returns the string representation
  7542. func (s DescribeScalingActivitiesInput) GoString() string {
  7543. return s.String()
  7544. }
  7545. // Validate inspects the fields of the type to determine if they are valid.
  7546. func (s *DescribeScalingActivitiesInput) Validate() error {
  7547. invalidParams := request.ErrInvalidParams{Context: "DescribeScalingActivitiesInput"}
  7548. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7549. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7550. }
  7551. if invalidParams.Len() > 0 {
  7552. return invalidParams
  7553. }
  7554. return nil
  7555. }
  7556. // SetActivityIds sets the ActivityIds field's value.
  7557. func (s *DescribeScalingActivitiesInput) SetActivityIds(v []*string) *DescribeScalingActivitiesInput {
  7558. s.ActivityIds = v
  7559. return s
  7560. }
  7561. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7562. func (s *DescribeScalingActivitiesInput) SetAutoScalingGroupName(v string) *DescribeScalingActivitiesInput {
  7563. s.AutoScalingGroupName = &v
  7564. return s
  7565. }
  7566. // SetMaxRecords sets the MaxRecords field's value.
  7567. func (s *DescribeScalingActivitiesInput) SetMaxRecords(v int64) *DescribeScalingActivitiesInput {
  7568. s.MaxRecords = &v
  7569. return s
  7570. }
  7571. // SetNextToken sets the NextToken field's value.
  7572. func (s *DescribeScalingActivitiesInput) SetNextToken(v string) *DescribeScalingActivitiesInput {
  7573. s.NextToken = &v
  7574. return s
  7575. }
  7576. type DescribeScalingActivitiesOutput struct {
  7577. _ struct{} `type:"structure"`
  7578. // The scaling activities. Activities are sorted by start time. Activities still
  7579. // in progress are described first.
  7580. //
  7581. // Activities is a required field
  7582. Activities []*Activity `type:"list" required:"true"`
  7583. // A string that indicates that the response contains more items than can be
  7584. // returned in a single response. To receive additional items, specify this
  7585. // string for the NextToken value when requesting the next set of items. This
  7586. // value is null when there are no more items to return.
  7587. NextToken *string `type:"string"`
  7588. }
  7589. // String returns the string representation
  7590. func (s DescribeScalingActivitiesOutput) String() string {
  7591. return awsutil.Prettify(s)
  7592. }
  7593. // GoString returns the string representation
  7594. func (s DescribeScalingActivitiesOutput) GoString() string {
  7595. return s.String()
  7596. }
  7597. // SetActivities sets the Activities field's value.
  7598. func (s *DescribeScalingActivitiesOutput) SetActivities(v []*Activity) *DescribeScalingActivitiesOutput {
  7599. s.Activities = v
  7600. return s
  7601. }
  7602. // SetNextToken sets the NextToken field's value.
  7603. func (s *DescribeScalingActivitiesOutput) SetNextToken(v string) *DescribeScalingActivitiesOutput {
  7604. s.NextToken = &v
  7605. return s
  7606. }
  7607. type DescribeScalingProcessTypesInput struct {
  7608. _ struct{} `type:"structure"`
  7609. }
  7610. // String returns the string representation
  7611. func (s DescribeScalingProcessTypesInput) String() string {
  7612. return awsutil.Prettify(s)
  7613. }
  7614. // GoString returns the string representation
  7615. func (s DescribeScalingProcessTypesInput) GoString() string {
  7616. return s.String()
  7617. }
  7618. type DescribeScalingProcessTypesOutput struct {
  7619. _ struct{} `type:"structure"`
  7620. // The names of the process types.
  7621. Processes []*ProcessType `type:"list"`
  7622. }
  7623. // String returns the string representation
  7624. func (s DescribeScalingProcessTypesOutput) String() string {
  7625. return awsutil.Prettify(s)
  7626. }
  7627. // GoString returns the string representation
  7628. func (s DescribeScalingProcessTypesOutput) GoString() string {
  7629. return s.String()
  7630. }
  7631. // SetProcesses sets the Processes field's value.
  7632. func (s *DescribeScalingProcessTypesOutput) SetProcesses(v []*ProcessType) *DescribeScalingProcessTypesOutput {
  7633. s.Processes = v
  7634. return s
  7635. }
  7636. type DescribeScheduledActionsInput struct {
  7637. _ struct{} `type:"structure"`
  7638. // The name of the Auto Scaling group.
  7639. AutoScalingGroupName *string `min:"1" type:"string"`
  7640. // The latest scheduled start time to return. If scheduled action names are
  7641. // provided, this parameter is ignored.
  7642. EndTime *time.Time `type:"timestamp"`
  7643. // The maximum number of items to return with this call. The default value is
  7644. // 50 and the maximum value is 100.
  7645. MaxRecords *int64 `type:"integer"`
  7646. // The token for the next set of items to return. (You received this token from
  7647. // a previous call.)
  7648. NextToken *string `type:"string"`
  7649. // The names of one or more scheduled actions. You can specify up to 50 actions.
  7650. // If you omit this parameter, all scheduled actions are described. If you specify
  7651. // an unknown scheduled action, it is ignored with no error.
  7652. ScheduledActionNames []*string `type:"list"`
  7653. // The earliest scheduled start time to return. If scheduled action names are
  7654. // provided, this parameter is ignored.
  7655. StartTime *time.Time `type:"timestamp"`
  7656. }
  7657. // String returns the string representation
  7658. func (s DescribeScheduledActionsInput) String() string {
  7659. return awsutil.Prettify(s)
  7660. }
  7661. // GoString returns the string representation
  7662. func (s DescribeScheduledActionsInput) GoString() string {
  7663. return s.String()
  7664. }
  7665. // Validate inspects the fields of the type to determine if they are valid.
  7666. func (s *DescribeScheduledActionsInput) Validate() error {
  7667. invalidParams := request.ErrInvalidParams{Context: "DescribeScheduledActionsInput"}
  7668. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7669. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7670. }
  7671. if invalidParams.Len() > 0 {
  7672. return invalidParams
  7673. }
  7674. return nil
  7675. }
  7676. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7677. func (s *DescribeScheduledActionsInput) SetAutoScalingGroupName(v string) *DescribeScheduledActionsInput {
  7678. s.AutoScalingGroupName = &v
  7679. return s
  7680. }
  7681. // SetEndTime sets the EndTime field's value.
  7682. func (s *DescribeScheduledActionsInput) SetEndTime(v time.Time) *DescribeScheduledActionsInput {
  7683. s.EndTime = &v
  7684. return s
  7685. }
  7686. // SetMaxRecords sets the MaxRecords field's value.
  7687. func (s *DescribeScheduledActionsInput) SetMaxRecords(v int64) *DescribeScheduledActionsInput {
  7688. s.MaxRecords = &v
  7689. return s
  7690. }
  7691. // SetNextToken sets the NextToken field's value.
  7692. func (s *DescribeScheduledActionsInput) SetNextToken(v string) *DescribeScheduledActionsInput {
  7693. s.NextToken = &v
  7694. return s
  7695. }
  7696. // SetScheduledActionNames sets the ScheduledActionNames field's value.
  7697. func (s *DescribeScheduledActionsInput) SetScheduledActionNames(v []*string) *DescribeScheduledActionsInput {
  7698. s.ScheduledActionNames = v
  7699. return s
  7700. }
  7701. // SetStartTime sets the StartTime field's value.
  7702. func (s *DescribeScheduledActionsInput) SetStartTime(v time.Time) *DescribeScheduledActionsInput {
  7703. s.StartTime = &v
  7704. return s
  7705. }
  7706. type DescribeScheduledActionsOutput struct {
  7707. _ struct{} `type:"structure"`
  7708. // A string that indicates that the response contains more items than can be
  7709. // returned in a single response. To receive additional items, specify this
  7710. // string for the NextToken value when requesting the next set of items. This
  7711. // value is null when there are no more items to return.
  7712. NextToken *string `type:"string"`
  7713. // The scheduled actions.
  7714. ScheduledUpdateGroupActions []*ScheduledUpdateGroupAction `type:"list"`
  7715. }
  7716. // String returns the string representation
  7717. func (s DescribeScheduledActionsOutput) String() string {
  7718. return awsutil.Prettify(s)
  7719. }
  7720. // GoString returns the string representation
  7721. func (s DescribeScheduledActionsOutput) GoString() string {
  7722. return s.String()
  7723. }
  7724. // SetNextToken sets the NextToken field's value.
  7725. func (s *DescribeScheduledActionsOutput) SetNextToken(v string) *DescribeScheduledActionsOutput {
  7726. s.NextToken = &v
  7727. return s
  7728. }
  7729. // SetScheduledUpdateGroupActions sets the ScheduledUpdateGroupActions field's value.
  7730. func (s *DescribeScheduledActionsOutput) SetScheduledUpdateGroupActions(v []*ScheduledUpdateGroupAction) *DescribeScheduledActionsOutput {
  7731. s.ScheduledUpdateGroupActions = v
  7732. return s
  7733. }
  7734. type DescribeTagsInput struct {
  7735. _ struct{} `type:"structure"`
  7736. // One or more filters to scope the tags to return. The maximum number of filters
  7737. // per filter type (for example, auto-scaling-group) is 1000.
  7738. Filters []*Filter `type:"list"`
  7739. // The maximum number of items to return with this call. The default value is
  7740. // 50 and the maximum value is 100.
  7741. MaxRecords *int64 `type:"integer"`
  7742. // The token for the next set of items to return. (You received this token from
  7743. // a previous call.)
  7744. NextToken *string `type:"string"`
  7745. }
  7746. // String returns the string representation
  7747. func (s DescribeTagsInput) String() string {
  7748. return awsutil.Prettify(s)
  7749. }
  7750. // GoString returns the string representation
  7751. func (s DescribeTagsInput) GoString() string {
  7752. return s.String()
  7753. }
  7754. // SetFilters sets the Filters field's value.
  7755. func (s *DescribeTagsInput) SetFilters(v []*Filter) *DescribeTagsInput {
  7756. s.Filters = v
  7757. return s
  7758. }
  7759. // SetMaxRecords sets the MaxRecords field's value.
  7760. func (s *DescribeTagsInput) SetMaxRecords(v int64) *DescribeTagsInput {
  7761. s.MaxRecords = &v
  7762. return s
  7763. }
  7764. // SetNextToken sets the NextToken field's value.
  7765. func (s *DescribeTagsInput) SetNextToken(v string) *DescribeTagsInput {
  7766. s.NextToken = &v
  7767. return s
  7768. }
  7769. type DescribeTagsOutput struct {
  7770. _ struct{} `type:"structure"`
  7771. // A string that indicates that the response contains more items than can be
  7772. // returned in a single response. To receive additional items, specify this
  7773. // string for the NextToken value when requesting the next set of items. This
  7774. // value is null when there are no more items to return.
  7775. NextToken *string `type:"string"`
  7776. // One or more tags.
  7777. Tags []*TagDescription `type:"list"`
  7778. }
  7779. // String returns the string representation
  7780. func (s DescribeTagsOutput) String() string {
  7781. return awsutil.Prettify(s)
  7782. }
  7783. // GoString returns the string representation
  7784. func (s DescribeTagsOutput) GoString() string {
  7785. return s.String()
  7786. }
  7787. // SetNextToken sets the NextToken field's value.
  7788. func (s *DescribeTagsOutput) SetNextToken(v string) *DescribeTagsOutput {
  7789. s.NextToken = &v
  7790. return s
  7791. }
  7792. // SetTags sets the Tags field's value.
  7793. func (s *DescribeTagsOutput) SetTags(v []*TagDescription) *DescribeTagsOutput {
  7794. s.Tags = v
  7795. return s
  7796. }
  7797. type DescribeTerminationPolicyTypesInput struct {
  7798. _ struct{} `type:"structure"`
  7799. }
  7800. // String returns the string representation
  7801. func (s DescribeTerminationPolicyTypesInput) String() string {
  7802. return awsutil.Prettify(s)
  7803. }
  7804. // GoString returns the string representation
  7805. func (s DescribeTerminationPolicyTypesInput) GoString() string {
  7806. return s.String()
  7807. }
  7808. type DescribeTerminationPolicyTypesOutput struct {
  7809. _ struct{} `type:"structure"`
  7810. // The termination policies supported by Amazon EC2 Auto Scaling: OldestInstance,
  7811. // OldestLaunchConfiguration, NewestInstance, ClosestToNextInstanceHour, Default,
  7812. // OldestLaunchTemplate, and AllocationStrategy.
  7813. TerminationPolicyTypes []*string `type:"list"`
  7814. }
  7815. // String returns the string representation
  7816. func (s DescribeTerminationPolicyTypesOutput) String() string {
  7817. return awsutil.Prettify(s)
  7818. }
  7819. // GoString returns the string representation
  7820. func (s DescribeTerminationPolicyTypesOutput) GoString() string {
  7821. return s.String()
  7822. }
  7823. // SetTerminationPolicyTypes sets the TerminationPolicyTypes field's value.
  7824. func (s *DescribeTerminationPolicyTypesOutput) SetTerminationPolicyTypes(v []*string) *DescribeTerminationPolicyTypesOutput {
  7825. s.TerminationPolicyTypes = v
  7826. return s
  7827. }
  7828. type DetachInstancesInput struct {
  7829. _ struct{} `type:"structure"`
  7830. // The name of the Auto Scaling group.
  7831. //
  7832. // AutoScalingGroupName is a required field
  7833. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7834. // The IDs of the instances. You can specify up to 20 instances.
  7835. InstanceIds []*string `type:"list"`
  7836. // Indicates whether the Auto Scaling group decrements the desired capacity
  7837. // value by the number of instances detached.
  7838. //
  7839. // ShouldDecrementDesiredCapacity is a required field
  7840. ShouldDecrementDesiredCapacity *bool `type:"boolean" required:"true"`
  7841. }
  7842. // String returns the string representation
  7843. func (s DetachInstancesInput) String() string {
  7844. return awsutil.Prettify(s)
  7845. }
  7846. // GoString returns the string representation
  7847. func (s DetachInstancesInput) GoString() string {
  7848. return s.String()
  7849. }
  7850. // Validate inspects the fields of the type to determine if they are valid.
  7851. func (s *DetachInstancesInput) Validate() error {
  7852. invalidParams := request.ErrInvalidParams{Context: "DetachInstancesInput"}
  7853. if s.AutoScalingGroupName == nil {
  7854. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7855. }
  7856. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7857. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7858. }
  7859. if s.ShouldDecrementDesiredCapacity == nil {
  7860. invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity"))
  7861. }
  7862. if invalidParams.Len() > 0 {
  7863. return invalidParams
  7864. }
  7865. return nil
  7866. }
  7867. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7868. func (s *DetachInstancesInput) SetAutoScalingGroupName(v string) *DetachInstancesInput {
  7869. s.AutoScalingGroupName = &v
  7870. return s
  7871. }
  7872. // SetInstanceIds sets the InstanceIds field's value.
  7873. func (s *DetachInstancesInput) SetInstanceIds(v []*string) *DetachInstancesInput {
  7874. s.InstanceIds = v
  7875. return s
  7876. }
  7877. // SetShouldDecrementDesiredCapacity sets the ShouldDecrementDesiredCapacity field's value.
  7878. func (s *DetachInstancesInput) SetShouldDecrementDesiredCapacity(v bool) *DetachInstancesInput {
  7879. s.ShouldDecrementDesiredCapacity = &v
  7880. return s
  7881. }
  7882. type DetachInstancesOutput struct {
  7883. _ struct{} `type:"structure"`
  7884. // The activities related to detaching the instances from the Auto Scaling group.
  7885. Activities []*Activity `type:"list"`
  7886. }
  7887. // String returns the string representation
  7888. func (s DetachInstancesOutput) String() string {
  7889. return awsutil.Prettify(s)
  7890. }
  7891. // GoString returns the string representation
  7892. func (s DetachInstancesOutput) GoString() string {
  7893. return s.String()
  7894. }
  7895. // SetActivities sets the Activities field's value.
  7896. func (s *DetachInstancesOutput) SetActivities(v []*Activity) *DetachInstancesOutput {
  7897. s.Activities = v
  7898. return s
  7899. }
  7900. type DetachLoadBalancerTargetGroupsInput struct {
  7901. _ struct{} `type:"structure"`
  7902. // The name of the Auto Scaling group.
  7903. //
  7904. // AutoScalingGroupName is a required field
  7905. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7906. // The Amazon Resource Names (ARN) of the target groups. You can specify up
  7907. // to 10 target groups.
  7908. //
  7909. // TargetGroupARNs is a required field
  7910. TargetGroupARNs []*string `type:"list" required:"true"`
  7911. }
  7912. // String returns the string representation
  7913. func (s DetachLoadBalancerTargetGroupsInput) String() string {
  7914. return awsutil.Prettify(s)
  7915. }
  7916. // GoString returns the string representation
  7917. func (s DetachLoadBalancerTargetGroupsInput) GoString() string {
  7918. return s.String()
  7919. }
  7920. // Validate inspects the fields of the type to determine if they are valid.
  7921. func (s *DetachLoadBalancerTargetGroupsInput) Validate() error {
  7922. invalidParams := request.ErrInvalidParams{Context: "DetachLoadBalancerTargetGroupsInput"}
  7923. if s.AutoScalingGroupName == nil {
  7924. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7925. }
  7926. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7927. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7928. }
  7929. if s.TargetGroupARNs == nil {
  7930. invalidParams.Add(request.NewErrParamRequired("TargetGroupARNs"))
  7931. }
  7932. if invalidParams.Len() > 0 {
  7933. return invalidParams
  7934. }
  7935. return nil
  7936. }
  7937. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7938. func (s *DetachLoadBalancerTargetGroupsInput) SetAutoScalingGroupName(v string) *DetachLoadBalancerTargetGroupsInput {
  7939. s.AutoScalingGroupName = &v
  7940. return s
  7941. }
  7942. // SetTargetGroupARNs sets the TargetGroupARNs field's value.
  7943. func (s *DetachLoadBalancerTargetGroupsInput) SetTargetGroupARNs(v []*string) *DetachLoadBalancerTargetGroupsInput {
  7944. s.TargetGroupARNs = v
  7945. return s
  7946. }
  7947. type DetachLoadBalancerTargetGroupsOutput struct {
  7948. _ struct{} `type:"structure"`
  7949. }
  7950. // String returns the string representation
  7951. func (s DetachLoadBalancerTargetGroupsOutput) String() string {
  7952. return awsutil.Prettify(s)
  7953. }
  7954. // GoString returns the string representation
  7955. func (s DetachLoadBalancerTargetGroupsOutput) GoString() string {
  7956. return s.String()
  7957. }
  7958. type DetachLoadBalancersInput struct {
  7959. _ struct{} `type:"structure"`
  7960. // The name of the Auto Scaling group.
  7961. //
  7962. // AutoScalingGroupName is a required field
  7963. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  7964. // The names of the load balancers. You can specify up to 10 load balancers.
  7965. //
  7966. // LoadBalancerNames is a required field
  7967. LoadBalancerNames []*string `type:"list" required:"true"`
  7968. }
  7969. // String returns the string representation
  7970. func (s DetachLoadBalancersInput) String() string {
  7971. return awsutil.Prettify(s)
  7972. }
  7973. // GoString returns the string representation
  7974. func (s DetachLoadBalancersInput) GoString() string {
  7975. return s.String()
  7976. }
  7977. // Validate inspects the fields of the type to determine if they are valid.
  7978. func (s *DetachLoadBalancersInput) Validate() error {
  7979. invalidParams := request.ErrInvalidParams{Context: "DetachLoadBalancersInput"}
  7980. if s.AutoScalingGroupName == nil {
  7981. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  7982. }
  7983. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  7984. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  7985. }
  7986. if s.LoadBalancerNames == nil {
  7987. invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames"))
  7988. }
  7989. if invalidParams.Len() > 0 {
  7990. return invalidParams
  7991. }
  7992. return nil
  7993. }
  7994. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  7995. func (s *DetachLoadBalancersInput) SetAutoScalingGroupName(v string) *DetachLoadBalancersInput {
  7996. s.AutoScalingGroupName = &v
  7997. return s
  7998. }
  7999. // SetLoadBalancerNames sets the LoadBalancerNames field's value.
  8000. func (s *DetachLoadBalancersInput) SetLoadBalancerNames(v []*string) *DetachLoadBalancersInput {
  8001. s.LoadBalancerNames = v
  8002. return s
  8003. }
  8004. type DetachLoadBalancersOutput struct {
  8005. _ struct{} `type:"structure"`
  8006. }
  8007. // String returns the string representation
  8008. func (s DetachLoadBalancersOutput) String() string {
  8009. return awsutil.Prettify(s)
  8010. }
  8011. // GoString returns the string representation
  8012. func (s DetachLoadBalancersOutput) GoString() string {
  8013. return s.String()
  8014. }
  8015. type DisableMetricsCollectionInput 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. // One or more of the following metrics. If you omit this parameter, all metrics
  8022. // are disabled.
  8023. //
  8024. // * GroupMinSize
  8025. //
  8026. // * GroupMaxSize
  8027. //
  8028. // * GroupDesiredCapacity
  8029. //
  8030. // * GroupInServiceInstances
  8031. //
  8032. // * GroupPendingInstances
  8033. //
  8034. // * GroupStandbyInstances
  8035. //
  8036. // * GroupTerminatingInstances
  8037. //
  8038. // * GroupTotalInstances
  8039. Metrics []*string `type:"list"`
  8040. }
  8041. // String returns the string representation
  8042. func (s DisableMetricsCollectionInput) String() string {
  8043. return awsutil.Prettify(s)
  8044. }
  8045. // GoString returns the string representation
  8046. func (s DisableMetricsCollectionInput) GoString() string {
  8047. return s.String()
  8048. }
  8049. // Validate inspects the fields of the type to determine if they are valid.
  8050. func (s *DisableMetricsCollectionInput) Validate() error {
  8051. invalidParams := request.ErrInvalidParams{Context: "DisableMetricsCollectionInput"}
  8052. if s.AutoScalingGroupName == nil {
  8053. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  8054. }
  8055. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  8056. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  8057. }
  8058. if invalidParams.Len() > 0 {
  8059. return invalidParams
  8060. }
  8061. return nil
  8062. }
  8063. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  8064. func (s *DisableMetricsCollectionInput) SetAutoScalingGroupName(v string) *DisableMetricsCollectionInput {
  8065. s.AutoScalingGroupName = &v
  8066. return s
  8067. }
  8068. // SetMetrics sets the Metrics field's value.
  8069. func (s *DisableMetricsCollectionInput) SetMetrics(v []*string) *DisableMetricsCollectionInput {
  8070. s.Metrics = v
  8071. return s
  8072. }
  8073. type DisableMetricsCollectionOutput struct {
  8074. _ struct{} `type:"structure"`
  8075. }
  8076. // String returns the string representation
  8077. func (s DisableMetricsCollectionOutput) String() string {
  8078. return awsutil.Prettify(s)
  8079. }
  8080. // GoString returns the string representation
  8081. func (s DisableMetricsCollectionOutput) GoString() string {
  8082. return s.String()
  8083. }
  8084. // Describes an Amazon EBS volume. Used in combination with BlockDeviceMapping.
  8085. type Ebs struct {
  8086. _ struct{} `type:"structure"`
  8087. // Indicates whether the volume is deleted on instance termination. For Amazon
  8088. // EC2 Auto Scaling, the default value is true.
  8089. DeleteOnTermination *bool `type:"boolean"`
  8090. // Specifies whether the volume should be encrypted. Encrypted EBS volumes can
  8091. // only be attached to instances that support Amazon EBS encryption. For more
  8092. // information, see Supported Instance Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances).
  8093. // If your AMI uses encrypted volumes, you can also only launch it on supported
  8094. // instance types.
  8095. //
  8096. // If you are creating a volume from a snapshot, you cannot specify an encryption
  8097. // value. Volumes that are created from encrypted snapshots are automatically
  8098. // encrypted, and volumes that are created from unencrypted snapshots are automatically
  8099. // unencrypted. By default, encrypted snapshots use the AWS managed CMK that
  8100. // is used for EBS encryption, but you can specify a custom CMK when you create
  8101. // the snapshot. The ability to encrypt a snapshot during copying also allows
  8102. // you to apply a new CMK to an already-encrypted snapshot. Volumes restored
  8103. // from the resulting copy are only accessible using the new CMK.
  8104. //
  8105. // Enabling encryption by default (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-by-default)
  8106. // results in all EBS volumes being encrypted with the AWS managed CMK or a
  8107. // customer managed CMK, whether or not the snapshot was encrypted.
  8108. //
  8109. // For more information, see Using Encryption with EBS-Backed AMIs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIEncryption.html)
  8110. // in the Amazon EC2 User Guide for Linux Instances and Required CMK Key Policy
  8111. // for Use with Encrypted Volumes (https://docs.aws.amazon.com/autoscaling/ec2/userguide/key-policy-requirements-EBS-encryption.html)
  8112. // in the Amazon EC2 Auto Scaling User Guide.
  8113. Encrypted *bool `type:"boolean"`
  8114. // The number of I/O operations per second (IOPS) to provision for the volume.
  8115. // The maximum ratio of IOPS to volume size (in GiB) is 50:1. For more information,
  8116. // see Amazon EBS Volume Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html)
  8117. // in the Amazon EC2 User Guide for Linux Instances.
  8118. //
  8119. // Conditional: This parameter is required when the volume type is io1. (Not
  8120. // used with standard, gp2, st1, or sc1 volumes.)
  8121. Iops *int64 `min:"100" type:"integer"`
  8122. // The snapshot ID of the volume to use.
  8123. //
  8124. // Conditional: This parameter is optional if you specify a volume size. If
  8125. // you specify both SnapshotId and VolumeSize, VolumeSize must be equal or greater
  8126. // than the size of the snapshot.
  8127. SnapshotId *string `min:"1" type:"string"`
  8128. // The volume size, in Gibibytes (GiB).
  8129. //
  8130. // This can be a number from 1-1,024 for standard, 4-16,384 for io1, 1-16,384
  8131. // for gp2, and 500-16,384 for st1 and sc1. If you specify a snapshot, the volume
  8132. // size must be equal to or larger than the snapshot size.
  8133. //
  8134. // Default: If you create a volume from a snapshot and you don't specify a volume
  8135. // size, the default is the snapshot size.
  8136. //
  8137. // At least one of VolumeSize or SnapshotId is required.
  8138. VolumeSize *int64 `min:"1" type:"integer"`
  8139. // The volume type, which can be standard for Magnetic, io1 for Provisioned
  8140. // IOPS SSD, gp2 for General Purpose SSD, st1 for Throughput Optimized HDD,
  8141. // or sc1 for Cold HDD. For more information, see Amazon EBS Volume Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html)
  8142. // in the Amazon EC2 User Guide for Linux Instances.
  8143. //
  8144. // Valid Values: standard | io1 | gp2 | st1 | sc1
  8145. VolumeType *string `min:"1" type:"string"`
  8146. }
  8147. // String returns the string representation
  8148. func (s Ebs) String() string {
  8149. return awsutil.Prettify(s)
  8150. }
  8151. // GoString returns the string representation
  8152. func (s Ebs) GoString() string {
  8153. return s.String()
  8154. }
  8155. // Validate inspects the fields of the type to determine if they are valid.
  8156. func (s *Ebs) Validate() error {
  8157. invalidParams := request.ErrInvalidParams{Context: "Ebs"}
  8158. if s.Iops != nil && *s.Iops < 100 {
  8159. invalidParams.Add(request.NewErrParamMinValue("Iops", 100))
  8160. }
  8161. if s.SnapshotId != nil && len(*s.SnapshotId) < 1 {
  8162. invalidParams.Add(request.NewErrParamMinLen("SnapshotId", 1))
  8163. }
  8164. if s.VolumeSize != nil && *s.VolumeSize < 1 {
  8165. invalidParams.Add(request.NewErrParamMinValue("VolumeSize", 1))
  8166. }
  8167. if s.VolumeType != nil && len(*s.VolumeType) < 1 {
  8168. invalidParams.Add(request.NewErrParamMinLen("VolumeType", 1))
  8169. }
  8170. if invalidParams.Len() > 0 {
  8171. return invalidParams
  8172. }
  8173. return nil
  8174. }
  8175. // SetDeleteOnTermination sets the DeleteOnTermination field's value.
  8176. func (s *Ebs) SetDeleteOnTermination(v bool) *Ebs {
  8177. s.DeleteOnTermination = &v
  8178. return s
  8179. }
  8180. // SetEncrypted sets the Encrypted field's value.
  8181. func (s *Ebs) SetEncrypted(v bool) *Ebs {
  8182. s.Encrypted = &v
  8183. return s
  8184. }
  8185. // SetIops sets the Iops field's value.
  8186. func (s *Ebs) SetIops(v int64) *Ebs {
  8187. s.Iops = &v
  8188. return s
  8189. }
  8190. // SetSnapshotId sets the SnapshotId field's value.
  8191. func (s *Ebs) SetSnapshotId(v string) *Ebs {
  8192. s.SnapshotId = &v
  8193. return s
  8194. }
  8195. // SetVolumeSize sets the VolumeSize field's value.
  8196. func (s *Ebs) SetVolumeSize(v int64) *Ebs {
  8197. s.VolumeSize = &v
  8198. return s
  8199. }
  8200. // SetVolumeType sets the VolumeType field's value.
  8201. func (s *Ebs) SetVolumeType(v string) *Ebs {
  8202. s.VolumeType = &v
  8203. return s
  8204. }
  8205. type EnableMetricsCollectionInput struct {
  8206. _ struct{} `type:"structure"`
  8207. // The name of the Auto Scaling group.
  8208. //
  8209. // AutoScalingGroupName is a required field
  8210. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  8211. // The granularity to associate with the metrics to collect. The only valid
  8212. // value is 1Minute.
  8213. //
  8214. // Granularity is a required field
  8215. Granularity *string `min:"1" type:"string" required:"true"`
  8216. // One or more of the following metrics. If you omit this parameter, all metrics
  8217. // are enabled.
  8218. //
  8219. // * GroupMinSize
  8220. //
  8221. // * GroupMaxSize
  8222. //
  8223. // * GroupDesiredCapacity
  8224. //
  8225. // * GroupInServiceInstances
  8226. //
  8227. // * GroupPendingInstances
  8228. //
  8229. // * GroupStandbyInstances
  8230. //
  8231. // * GroupTerminatingInstances
  8232. //
  8233. // * GroupTotalInstances
  8234. Metrics []*string `type:"list"`
  8235. }
  8236. // String returns the string representation
  8237. func (s EnableMetricsCollectionInput) String() string {
  8238. return awsutil.Prettify(s)
  8239. }
  8240. // GoString returns the string representation
  8241. func (s EnableMetricsCollectionInput) GoString() string {
  8242. return s.String()
  8243. }
  8244. // Validate inspects the fields of the type to determine if they are valid.
  8245. func (s *EnableMetricsCollectionInput) Validate() error {
  8246. invalidParams := request.ErrInvalidParams{Context: "EnableMetricsCollectionInput"}
  8247. if s.AutoScalingGroupName == nil {
  8248. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  8249. }
  8250. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  8251. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  8252. }
  8253. if s.Granularity == nil {
  8254. invalidParams.Add(request.NewErrParamRequired("Granularity"))
  8255. }
  8256. if s.Granularity != nil && len(*s.Granularity) < 1 {
  8257. invalidParams.Add(request.NewErrParamMinLen("Granularity", 1))
  8258. }
  8259. if invalidParams.Len() > 0 {
  8260. return invalidParams
  8261. }
  8262. return nil
  8263. }
  8264. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  8265. func (s *EnableMetricsCollectionInput) SetAutoScalingGroupName(v string) *EnableMetricsCollectionInput {
  8266. s.AutoScalingGroupName = &v
  8267. return s
  8268. }
  8269. // SetGranularity sets the Granularity field's value.
  8270. func (s *EnableMetricsCollectionInput) SetGranularity(v string) *EnableMetricsCollectionInput {
  8271. s.Granularity = &v
  8272. return s
  8273. }
  8274. // SetMetrics sets the Metrics field's value.
  8275. func (s *EnableMetricsCollectionInput) SetMetrics(v []*string) *EnableMetricsCollectionInput {
  8276. s.Metrics = v
  8277. return s
  8278. }
  8279. type EnableMetricsCollectionOutput struct {
  8280. _ struct{} `type:"structure"`
  8281. }
  8282. // String returns the string representation
  8283. func (s EnableMetricsCollectionOutput) String() string {
  8284. return awsutil.Prettify(s)
  8285. }
  8286. // GoString returns the string representation
  8287. func (s EnableMetricsCollectionOutput) GoString() string {
  8288. return s.String()
  8289. }
  8290. // Describes an enabled metric.
  8291. type EnabledMetric struct {
  8292. _ struct{} `type:"structure"`
  8293. // The granularity of the metric. The only valid value is 1Minute.
  8294. Granularity *string `min:"1" type:"string"`
  8295. // One of the following metrics:
  8296. //
  8297. // * GroupMinSize
  8298. //
  8299. // * GroupMaxSize
  8300. //
  8301. // * GroupDesiredCapacity
  8302. //
  8303. // * GroupInServiceInstances
  8304. //
  8305. // * GroupPendingInstances
  8306. //
  8307. // * GroupStandbyInstances
  8308. //
  8309. // * GroupTerminatingInstances
  8310. //
  8311. // * GroupTotalInstances
  8312. Metric *string `min:"1" type:"string"`
  8313. }
  8314. // String returns the string representation
  8315. func (s EnabledMetric) String() string {
  8316. return awsutil.Prettify(s)
  8317. }
  8318. // GoString returns the string representation
  8319. func (s EnabledMetric) GoString() string {
  8320. return s.String()
  8321. }
  8322. // SetGranularity sets the Granularity field's value.
  8323. func (s *EnabledMetric) SetGranularity(v string) *EnabledMetric {
  8324. s.Granularity = &v
  8325. return s
  8326. }
  8327. // SetMetric sets the Metric field's value.
  8328. func (s *EnabledMetric) SetMetric(v string) *EnabledMetric {
  8329. s.Metric = &v
  8330. return s
  8331. }
  8332. type EnterStandbyInput struct {
  8333. _ struct{} `type:"structure"`
  8334. // The name of the Auto Scaling group.
  8335. //
  8336. // AutoScalingGroupName is a required field
  8337. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  8338. // The IDs of the instances. You can specify up to 20 instances.
  8339. InstanceIds []*string `type:"list"`
  8340. // Indicates whether to decrement the desired capacity of the Auto Scaling group
  8341. // by the number of instances moved to Standby mode.
  8342. //
  8343. // ShouldDecrementDesiredCapacity is a required field
  8344. ShouldDecrementDesiredCapacity *bool `type:"boolean" required:"true"`
  8345. }
  8346. // String returns the string representation
  8347. func (s EnterStandbyInput) String() string {
  8348. return awsutil.Prettify(s)
  8349. }
  8350. // GoString returns the string representation
  8351. func (s EnterStandbyInput) GoString() string {
  8352. return s.String()
  8353. }
  8354. // Validate inspects the fields of the type to determine if they are valid.
  8355. func (s *EnterStandbyInput) Validate() error {
  8356. invalidParams := request.ErrInvalidParams{Context: "EnterStandbyInput"}
  8357. if s.AutoScalingGroupName == nil {
  8358. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  8359. }
  8360. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  8361. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  8362. }
  8363. if s.ShouldDecrementDesiredCapacity == nil {
  8364. invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity"))
  8365. }
  8366. if invalidParams.Len() > 0 {
  8367. return invalidParams
  8368. }
  8369. return nil
  8370. }
  8371. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  8372. func (s *EnterStandbyInput) SetAutoScalingGroupName(v string) *EnterStandbyInput {
  8373. s.AutoScalingGroupName = &v
  8374. return s
  8375. }
  8376. // SetInstanceIds sets the InstanceIds field's value.
  8377. func (s *EnterStandbyInput) SetInstanceIds(v []*string) *EnterStandbyInput {
  8378. s.InstanceIds = v
  8379. return s
  8380. }
  8381. // SetShouldDecrementDesiredCapacity sets the ShouldDecrementDesiredCapacity field's value.
  8382. func (s *EnterStandbyInput) SetShouldDecrementDesiredCapacity(v bool) *EnterStandbyInput {
  8383. s.ShouldDecrementDesiredCapacity = &v
  8384. return s
  8385. }
  8386. type EnterStandbyOutput struct {
  8387. _ struct{} `type:"structure"`
  8388. // The activities related to moving instances into Standby mode.
  8389. Activities []*Activity `type:"list"`
  8390. }
  8391. // String returns the string representation
  8392. func (s EnterStandbyOutput) String() string {
  8393. return awsutil.Prettify(s)
  8394. }
  8395. // GoString returns the string representation
  8396. func (s EnterStandbyOutput) GoString() string {
  8397. return s.String()
  8398. }
  8399. // SetActivities sets the Activities field's value.
  8400. func (s *EnterStandbyOutput) SetActivities(v []*Activity) *EnterStandbyOutput {
  8401. s.Activities = v
  8402. return s
  8403. }
  8404. type ExecutePolicyInput struct {
  8405. _ struct{} `type:"structure"`
  8406. // The name of the Auto Scaling group.
  8407. AutoScalingGroupName *string `min:"1" type:"string"`
  8408. // The breach threshold for the alarm.
  8409. //
  8410. // Conditional: This parameter is required if the policy type is StepScaling
  8411. // and not supported otherwise.
  8412. BreachThreshold *float64 `type:"double"`
  8413. // Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to
  8414. // complete before executing the policy.
  8415. //
  8416. // This parameter is not supported if the policy type is StepScaling or TargetTrackingScaling.
  8417. //
  8418. // For more information, see Scaling Cooldowns (https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html)
  8419. // in the Amazon EC2 Auto Scaling User Guide.
  8420. HonorCooldown *bool `type:"boolean"`
  8421. // The metric value to compare to BreachThreshold. This enables you to execute
  8422. // a policy of type StepScaling and determine which step adjustment to use.
  8423. // For example, if the breach threshold is 50 and you want to use a step adjustment
  8424. // with a lower bound of 0 and an upper bound of 10, you can set the metric
  8425. // value to 59.
  8426. //
  8427. // If you specify a metric value that doesn't correspond to a step adjustment
  8428. // for the policy, the call returns an error.
  8429. //
  8430. // Conditional: This parameter is required if the policy type is StepScaling
  8431. // and not supported otherwise.
  8432. MetricValue *float64 `type:"double"`
  8433. // The name or ARN of the policy.
  8434. //
  8435. // PolicyName is a required field
  8436. PolicyName *string `min:"1" type:"string" required:"true"`
  8437. }
  8438. // String returns the string representation
  8439. func (s ExecutePolicyInput) String() string {
  8440. return awsutil.Prettify(s)
  8441. }
  8442. // GoString returns the string representation
  8443. func (s ExecutePolicyInput) GoString() string {
  8444. return s.String()
  8445. }
  8446. // Validate inspects the fields of the type to determine if they are valid.
  8447. func (s *ExecutePolicyInput) Validate() error {
  8448. invalidParams := request.ErrInvalidParams{Context: "ExecutePolicyInput"}
  8449. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  8450. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  8451. }
  8452. if s.PolicyName == nil {
  8453. invalidParams.Add(request.NewErrParamRequired("PolicyName"))
  8454. }
  8455. if s.PolicyName != nil && len(*s.PolicyName) < 1 {
  8456. invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
  8457. }
  8458. if invalidParams.Len() > 0 {
  8459. return invalidParams
  8460. }
  8461. return nil
  8462. }
  8463. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  8464. func (s *ExecutePolicyInput) SetAutoScalingGroupName(v string) *ExecutePolicyInput {
  8465. s.AutoScalingGroupName = &v
  8466. return s
  8467. }
  8468. // SetBreachThreshold sets the BreachThreshold field's value.
  8469. func (s *ExecutePolicyInput) SetBreachThreshold(v float64) *ExecutePolicyInput {
  8470. s.BreachThreshold = &v
  8471. return s
  8472. }
  8473. // SetHonorCooldown sets the HonorCooldown field's value.
  8474. func (s *ExecutePolicyInput) SetHonorCooldown(v bool) *ExecutePolicyInput {
  8475. s.HonorCooldown = &v
  8476. return s
  8477. }
  8478. // SetMetricValue sets the MetricValue field's value.
  8479. func (s *ExecutePolicyInput) SetMetricValue(v float64) *ExecutePolicyInput {
  8480. s.MetricValue = &v
  8481. return s
  8482. }
  8483. // SetPolicyName sets the PolicyName field's value.
  8484. func (s *ExecutePolicyInput) SetPolicyName(v string) *ExecutePolicyInput {
  8485. s.PolicyName = &v
  8486. return s
  8487. }
  8488. type ExecutePolicyOutput struct {
  8489. _ struct{} `type:"structure"`
  8490. }
  8491. // String returns the string representation
  8492. func (s ExecutePolicyOutput) String() string {
  8493. return awsutil.Prettify(s)
  8494. }
  8495. // GoString returns the string representation
  8496. func (s ExecutePolicyOutput) GoString() string {
  8497. return s.String()
  8498. }
  8499. type ExitStandbyInput struct {
  8500. _ struct{} `type:"structure"`
  8501. // The name of the Auto Scaling group.
  8502. //
  8503. // AutoScalingGroupName is a required field
  8504. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  8505. // The IDs of the instances. You can specify up to 20 instances.
  8506. InstanceIds []*string `type:"list"`
  8507. }
  8508. // String returns the string representation
  8509. func (s ExitStandbyInput) String() string {
  8510. return awsutil.Prettify(s)
  8511. }
  8512. // GoString returns the string representation
  8513. func (s ExitStandbyInput) GoString() string {
  8514. return s.String()
  8515. }
  8516. // Validate inspects the fields of the type to determine if they are valid.
  8517. func (s *ExitStandbyInput) Validate() error {
  8518. invalidParams := request.ErrInvalidParams{Context: "ExitStandbyInput"}
  8519. if s.AutoScalingGroupName == nil {
  8520. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  8521. }
  8522. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  8523. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  8524. }
  8525. if invalidParams.Len() > 0 {
  8526. return invalidParams
  8527. }
  8528. return nil
  8529. }
  8530. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  8531. func (s *ExitStandbyInput) SetAutoScalingGroupName(v string) *ExitStandbyInput {
  8532. s.AutoScalingGroupName = &v
  8533. return s
  8534. }
  8535. // SetInstanceIds sets the InstanceIds field's value.
  8536. func (s *ExitStandbyInput) SetInstanceIds(v []*string) *ExitStandbyInput {
  8537. s.InstanceIds = v
  8538. return s
  8539. }
  8540. type ExitStandbyOutput struct {
  8541. _ struct{} `type:"structure"`
  8542. // The activities related to moving instances out of Standby mode.
  8543. Activities []*Activity `type:"list"`
  8544. }
  8545. // String returns the string representation
  8546. func (s ExitStandbyOutput) String() string {
  8547. return awsutil.Prettify(s)
  8548. }
  8549. // GoString returns the string representation
  8550. func (s ExitStandbyOutput) GoString() string {
  8551. return s.String()
  8552. }
  8553. // SetActivities sets the Activities field's value.
  8554. func (s *ExitStandbyOutput) SetActivities(v []*Activity) *ExitStandbyOutput {
  8555. s.Activities = v
  8556. return s
  8557. }
  8558. // Describes a scheduled action that could not be created, updated, or deleted.
  8559. type FailedScheduledUpdateGroupActionRequest struct {
  8560. _ struct{} `type:"structure"`
  8561. // The error code.
  8562. ErrorCode *string `min:"1" type:"string"`
  8563. // The error message accompanying the error code.
  8564. ErrorMessage *string `type:"string"`
  8565. // The name of the scheduled action.
  8566. //
  8567. // ScheduledActionName is a required field
  8568. ScheduledActionName *string `min:"1" type:"string" required:"true"`
  8569. }
  8570. // String returns the string representation
  8571. func (s FailedScheduledUpdateGroupActionRequest) String() string {
  8572. return awsutil.Prettify(s)
  8573. }
  8574. // GoString returns the string representation
  8575. func (s FailedScheduledUpdateGroupActionRequest) GoString() string {
  8576. return s.String()
  8577. }
  8578. // SetErrorCode sets the ErrorCode field's value.
  8579. func (s *FailedScheduledUpdateGroupActionRequest) SetErrorCode(v string) *FailedScheduledUpdateGroupActionRequest {
  8580. s.ErrorCode = &v
  8581. return s
  8582. }
  8583. // SetErrorMessage sets the ErrorMessage field's value.
  8584. func (s *FailedScheduledUpdateGroupActionRequest) SetErrorMessage(v string) *FailedScheduledUpdateGroupActionRequest {
  8585. s.ErrorMessage = &v
  8586. return s
  8587. }
  8588. // SetScheduledActionName sets the ScheduledActionName field's value.
  8589. func (s *FailedScheduledUpdateGroupActionRequest) SetScheduledActionName(v string) *FailedScheduledUpdateGroupActionRequest {
  8590. s.ScheduledActionName = &v
  8591. return s
  8592. }
  8593. // Describes a filter.
  8594. type Filter struct {
  8595. _ struct{} `type:"structure"`
  8596. // The name of the filter. The valid values are: "auto-scaling-group", "key",
  8597. // "value", and "propagate-at-launch".
  8598. Name *string `type:"string"`
  8599. // The value of the filter.
  8600. Values []*string `type:"list"`
  8601. }
  8602. // String returns the string representation
  8603. func (s Filter) String() string {
  8604. return awsutil.Prettify(s)
  8605. }
  8606. // GoString returns the string representation
  8607. func (s Filter) GoString() string {
  8608. return s.String()
  8609. }
  8610. // SetName sets the Name field's value.
  8611. func (s *Filter) SetName(v string) *Filter {
  8612. s.Name = &v
  8613. return s
  8614. }
  8615. // SetValues sets the Values field's value.
  8616. func (s *Filter) SetValues(v []*string) *Filter {
  8617. s.Values = v
  8618. return s
  8619. }
  8620. // Describes an Auto Scaling group.
  8621. type Group struct {
  8622. _ struct{} `type:"structure"`
  8623. // The Amazon Resource Name (ARN) of the Auto Scaling group.
  8624. AutoScalingGroupARN *string `min:"1" type:"string"`
  8625. // The name of the Auto Scaling group.
  8626. //
  8627. // AutoScalingGroupName is a required field
  8628. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  8629. // One or more Availability Zones for the group.
  8630. //
  8631. // AvailabilityZones is a required field
  8632. AvailabilityZones []*string `min:"1" type:"list" required:"true"`
  8633. // The date and time the group was created.
  8634. //
  8635. // CreatedTime is a required field
  8636. CreatedTime *time.Time `type:"timestamp" required:"true"`
  8637. // The amount of time, in seconds, after a scaling activity completes before
  8638. // another scaling activity can start.
  8639. //
  8640. // DefaultCooldown is a required field
  8641. DefaultCooldown *int64 `type:"integer" required:"true"`
  8642. // The desired size of the group.
  8643. //
  8644. // DesiredCapacity is a required field
  8645. DesiredCapacity *int64 `type:"integer" required:"true"`
  8646. // The metrics enabled for the group.
  8647. EnabledMetrics []*EnabledMetric `type:"list"`
  8648. // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before
  8649. // checking the health status of an EC2 instance that has come into service.
  8650. HealthCheckGracePeriod *int64 `type:"integer"`
  8651. // The service to use for the health checks. The valid values are EC2 and ELB.
  8652. // If you configure an Auto Scaling group to use ELB health checks, it considers
  8653. // the instance unhealthy if it fails either the EC2 status checks or the load
  8654. // balancer health checks.
  8655. //
  8656. // HealthCheckType is a required field
  8657. HealthCheckType *string `min:"1" type:"string" required:"true"`
  8658. // The EC2 instances associated with the group.
  8659. Instances []*Instance `type:"list"`
  8660. // The name of the associated launch configuration.
  8661. LaunchConfigurationName *string `min:"1" type:"string"`
  8662. // The launch template for the group.
  8663. LaunchTemplate *LaunchTemplateSpecification `type:"structure"`
  8664. // One or more load balancers associated with the group.
  8665. LoadBalancerNames []*string `type:"list"`
  8666. // The maximum amount of time, in seconds, that an instance can be in service.
  8667. //
  8668. // Valid Range: Minimum value of 604800.
  8669. MaxInstanceLifetime *int64 `type:"integer"`
  8670. // The maximum size of the group.
  8671. //
  8672. // MaxSize is a required field
  8673. MaxSize *int64 `type:"integer" required:"true"`
  8674. // The minimum size of the group.
  8675. //
  8676. // MinSize is a required field
  8677. MinSize *int64 `type:"integer" required:"true"`
  8678. // The mixed instances policy for the group.
  8679. MixedInstancesPolicy *MixedInstancesPolicy `type:"structure"`
  8680. // Indicates whether newly launched instances are protected from termination
  8681. // by Amazon EC2 Auto Scaling when scaling in.
  8682. NewInstancesProtectedFromScaleIn *bool `type:"boolean"`
  8683. // The name of the placement group into which to launch your instances, if any.
  8684. PlacementGroup *string `min:"1" type:"string"`
  8685. // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling
  8686. // group uses to call other AWS services on your behalf.
  8687. ServiceLinkedRoleARN *string `min:"1" type:"string"`
  8688. // The current state of the group when DeleteAutoScalingGroup is in progress.
  8689. Status *string `min:"1" type:"string"`
  8690. // The suspended processes associated with the group.
  8691. SuspendedProcesses []*SuspendedProcess `type:"list"`
  8692. // The tags for the group.
  8693. Tags []*TagDescription `type:"list"`
  8694. // The Amazon Resource Names (ARN) of the target groups for your load balancer.
  8695. TargetGroupARNs []*string `type:"list"`
  8696. // The termination policies for the group.
  8697. TerminationPolicies []*string `type:"list"`
  8698. // One or more subnet IDs, if applicable, separated by commas.
  8699. VPCZoneIdentifier *string `min:"1" type:"string"`
  8700. }
  8701. // String returns the string representation
  8702. func (s Group) String() string {
  8703. return awsutil.Prettify(s)
  8704. }
  8705. // GoString returns the string representation
  8706. func (s Group) GoString() string {
  8707. return s.String()
  8708. }
  8709. // SetAutoScalingGroupARN sets the AutoScalingGroupARN field's value.
  8710. func (s *Group) SetAutoScalingGroupARN(v string) *Group {
  8711. s.AutoScalingGroupARN = &v
  8712. return s
  8713. }
  8714. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  8715. func (s *Group) SetAutoScalingGroupName(v string) *Group {
  8716. s.AutoScalingGroupName = &v
  8717. return s
  8718. }
  8719. // SetAvailabilityZones sets the AvailabilityZones field's value.
  8720. func (s *Group) SetAvailabilityZones(v []*string) *Group {
  8721. s.AvailabilityZones = v
  8722. return s
  8723. }
  8724. // SetCreatedTime sets the CreatedTime field's value.
  8725. func (s *Group) SetCreatedTime(v time.Time) *Group {
  8726. s.CreatedTime = &v
  8727. return s
  8728. }
  8729. // SetDefaultCooldown sets the DefaultCooldown field's value.
  8730. func (s *Group) SetDefaultCooldown(v int64) *Group {
  8731. s.DefaultCooldown = &v
  8732. return s
  8733. }
  8734. // SetDesiredCapacity sets the DesiredCapacity field's value.
  8735. func (s *Group) SetDesiredCapacity(v int64) *Group {
  8736. s.DesiredCapacity = &v
  8737. return s
  8738. }
  8739. // SetEnabledMetrics sets the EnabledMetrics field's value.
  8740. func (s *Group) SetEnabledMetrics(v []*EnabledMetric) *Group {
  8741. s.EnabledMetrics = v
  8742. return s
  8743. }
  8744. // SetHealthCheckGracePeriod sets the HealthCheckGracePeriod field's value.
  8745. func (s *Group) SetHealthCheckGracePeriod(v int64) *Group {
  8746. s.HealthCheckGracePeriod = &v
  8747. return s
  8748. }
  8749. // SetHealthCheckType sets the HealthCheckType field's value.
  8750. func (s *Group) SetHealthCheckType(v string) *Group {
  8751. s.HealthCheckType = &v
  8752. return s
  8753. }
  8754. // SetInstances sets the Instances field's value.
  8755. func (s *Group) SetInstances(v []*Instance) *Group {
  8756. s.Instances = v
  8757. return s
  8758. }
  8759. // SetLaunchConfigurationName sets the LaunchConfigurationName field's value.
  8760. func (s *Group) SetLaunchConfigurationName(v string) *Group {
  8761. s.LaunchConfigurationName = &v
  8762. return s
  8763. }
  8764. // SetLaunchTemplate sets the LaunchTemplate field's value.
  8765. func (s *Group) SetLaunchTemplate(v *LaunchTemplateSpecification) *Group {
  8766. s.LaunchTemplate = v
  8767. return s
  8768. }
  8769. // SetLoadBalancerNames sets the LoadBalancerNames field's value.
  8770. func (s *Group) SetLoadBalancerNames(v []*string) *Group {
  8771. s.LoadBalancerNames = v
  8772. return s
  8773. }
  8774. // SetMaxInstanceLifetime sets the MaxInstanceLifetime field's value.
  8775. func (s *Group) SetMaxInstanceLifetime(v int64) *Group {
  8776. s.MaxInstanceLifetime = &v
  8777. return s
  8778. }
  8779. // SetMaxSize sets the MaxSize field's value.
  8780. func (s *Group) SetMaxSize(v int64) *Group {
  8781. s.MaxSize = &v
  8782. return s
  8783. }
  8784. // SetMinSize sets the MinSize field's value.
  8785. func (s *Group) SetMinSize(v int64) *Group {
  8786. s.MinSize = &v
  8787. return s
  8788. }
  8789. // SetMixedInstancesPolicy sets the MixedInstancesPolicy field's value.
  8790. func (s *Group) SetMixedInstancesPolicy(v *MixedInstancesPolicy) *Group {
  8791. s.MixedInstancesPolicy = v
  8792. return s
  8793. }
  8794. // SetNewInstancesProtectedFromScaleIn sets the NewInstancesProtectedFromScaleIn field's value.
  8795. func (s *Group) SetNewInstancesProtectedFromScaleIn(v bool) *Group {
  8796. s.NewInstancesProtectedFromScaleIn = &v
  8797. return s
  8798. }
  8799. // SetPlacementGroup sets the PlacementGroup field's value.
  8800. func (s *Group) SetPlacementGroup(v string) *Group {
  8801. s.PlacementGroup = &v
  8802. return s
  8803. }
  8804. // SetServiceLinkedRoleARN sets the ServiceLinkedRoleARN field's value.
  8805. func (s *Group) SetServiceLinkedRoleARN(v string) *Group {
  8806. s.ServiceLinkedRoleARN = &v
  8807. return s
  8808. }
  8809. // SetStatus sets the Status field's value.
  8810. func (s *Group) SetStatus(v string) *Group {
  8811. s.Status = &v
  8812. return s
  8813. }
  8814. // SetSuspendedProcesses sets the SuspendedProcesses field's value.
  8815. func (s *Group) SetSuspendedProcesses(v []*SuspendedProcess) *Group {
  8816. s.SuspendedProcesses = v
  8817. return s
  8818. }
  8819. // SetTags sets the Tags field's value.
  8820. func (s *Group) SetTags(v []*TagDescription) *Group {
  8821. s.Tags = v
  8822. return s
  8823. }
  8824. // SetTargetGroupARNs sets the TargetGroupARNs field's value.
  8825. func (s *Group) SetTargetGroupARNs(v []*string) *Group {
  8826. s.TargetGroupARNs = v
  8827. return s
  8828. }
  8829. // SetTerminationPolicies sets the TerminationPolicies field's value.
  8830. func (s *Group) SetTerminationPolicies(v []*string) *Group {
  8831. s.TerminationPolicies = v
  8832. return s
  8833. }
  8834. // SetVPCZoneIdentifier sets the VPCZoneIdentifier field's value.
  8835. func (s *Group) SetVPCZoneIdentifier(v string) *Group {
  8836. s.VPCZoneIdentifier = &v
  8837. return s
  8838. }
  8839. // Describes an EC2 instance.
  8840. type Instance struct {
  8841. _ struct{} `type:"structure"`
  8842. // The Availability Zone in which the instance is running.
  8843. //
  8844. // AvailabilityZone is a required field
  8845. AvailabilityZone *string `min:"1" type:"string" required:"true"`
  8846. // The last reported health status of the instance. "Healthy" means that the
  8847. // instance is healthy and should remain in service. "Unhealthy" means that
  8848. // the instance is unhealthy and that Amazon EC2 Auto Scaling should terminate
  8849. // and replace it.
  8850. //
  8851. // HealthStatus is a required field
  8852. HealthStatus *string `min:"1" type:"string" required:"true"`
  8853. // The ID of the instance.
  8854. //
  8855. // InstanceId is a required field
  8856. InstanceId *string `min:"1" type:"string" required:"true"`
  8857. // The instance type of the EC2 instance.
  8858. InstanceType *string `min:"1" type:"string"`
  8859. // The launch configuration associated with the instance.
  8860. LaunchConfigurationName *string `min:"1" type:"string"`
  8861. // The launch template for the instance.
  8862. LaunchTemplate *LaunchTemplateSpecification `type:"structure"`
  8863. // A description of the current lifecycle state. The Quarantined state is not
  8864. // used.
  8865. //
  8866. // LifecycleState is a required field
  8867. LifecycleState *string `type:"string" required:"true" enum:"LifecycleState"`
  8868. // Indicates whether the instance is protected from termination by Amazon EC2
  8869. // Auto Scaling when scaling in.
  8870. //
  8871. // ProtectedFromScaleIn is a required field
  8872. ProtectedFromScaleIn *bool `type:"boolean" required:"true"`
  8873. // The number of capacity units contributed by the instance based on its instance
  8874. // type.
  8875. //
  8876. // Valid Range: Minimum value of 1. Maximum value of 999.
  8877. WeightedCapacity *string `min:"1" type:"string"`
  8878. }
  8879. // String returns the string representation
  8880. func (s Instance) String() string {
  8881. return awsutil.Prettify(s)
  8882. }
  8883. // GoString returns the string representation
  8884. func (s Instance) GoString() string {
  8885. return s.String()
  8886. }
  8887. // SetAvailabilityZone sets the AvailabilityZone field's value.
  8888. func (s *Instance) SetAvailabilityZone(v string) *Instance {
  8889. s.AvailabilityZone = &v
  8890. return s
  8891. }
  8892. // SetHealthStatus sets the HealthStatus field's value.
  8893. func (s *Instance) SetHealthStatus(v string) *Instance {
  8894. s.HealthStatus = &v
  8895. return s
  8896. }
  8897. // SetInstanceId sets the InstanceId field's value.
  8898. func (s *Instance) SetInstanceId(v string) *Instance {
  8899. s.InstanceId = &v
  8900. return s
  8901. }
  8902. // SetInstanceType sets the InstanceType field's value.
  8903. func (s *Instance) SetInstanceType(v string) *Instance {
  8904. s.InstanceType = &v
  8905. return s
  8906. }
  8907. // SetLaunchConfigurationName sets the LaunchConfigurationName field's value.
  8908. func (s *Instance) SetLaunchConfigurationName(v string) *Instance {
  8909. s.LaunchConfigurationName = &v
  8910. return s
  8911. }
  8912. // SetLaunchTemplate sets the LaunchTemplate field's value.
  8913. func (s *Instance) SetLaunchTemplate(v *LaunchTemplateSpecification) *Instance {
  8914. s.LaunchTemplate = v
  8915. return s
  8916. }
  8917. // SetLifecycleState sets the LifecycleState field's value.
  8918. func (s *Instance) SetLifecycleState(v string) *Instance {
  8919. s.LifecycleState = &v
  8920. return s
  8921. }
  8922. // SetProtectedFromScaleIn sets the ProtectedFromScaleIn field's value.
  8923. func (s *Instance) SetProtectedFromScaleIn(v bool) *Instance {
  8924. s.ProtectedFromScaleIn = &v
  8925. return s
  8926. }
  8927. // SetWeightedCapacity sets the WeightedCapacity field's value.
  8928. func (s *Instance) SetWeightedCapacity(v string) *Instance {
  8929. s.WeightedCapacity = &v
  8930. return s
  8931. }
  8932. // Describes an EC2 instance associated with an Auto Scaling group.
  8933. type InstanceDetails struct {
  8934. _ struct{} `type:"structure"`
  8935. // The name of the Auto Scaling group for the instance.
  8936. //
  8937. // AutoScalingGroupName is a required field
  8938. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  8939. // The Availability Zone for the instance.
  8940. //
  8941. // AvailabilityZone is a required field
  8942. AvailabilityZone *string `min:"1" type:"string" required:"true"`
  8943. // The last reported health status of this instance. "Healthy" means that the
  8944. // instance is healthy and should remain in service. "Unhealthy" means that
  8945. // the instance is unhealthy and Amazon EC2 Auto Scaling should terminate and
  8946. // replace it.
  8947. //
  8948. // HealthStatus is a required field
  8949. HealthStatus *string `min:"1" type:"string" required:"true"`
  8950. // The ID of the instance.
  8951. //
  8952. // InstanceId is a required field
  8953. InstanceId *string `min:"1" type:"string" required:"true"`
  8954. // The instance type of the EC2 instance.
  8955. InstanceType *string `min:"1" type:"string"`
  8956. // The launch configuration used to launch the instance. This value is not available
  8957. // if you attached the instance to the Auto Scaling group.
  8958. LaunchConfigurationName *string `min:"1" type:"string"`
  8959. // The launch template for the instance.
  8960. LaunchTemplate *LaunchTemplateSpecification `type:"structure"`
  8961. // The lifecycle state for the instance.
  8962. //
  8963. // LifecycleState is a required field
  8964. LifecycleState *string `min:"1" type:"string" required:"true"`
  8965. // Indicates whether the instance is protected from termination by Amazon EC2
  8966. // Auto Scaling when scaling in.
  8967. //
  8968. // ProtectedFromScaleIn is a required field
  8969. ProtectedFromScaleIn *bool `type:"boolean" required:"true"`
  8970. // The number of capacity units contributed by the instance based on its instance
  8971. // type.
  8972. //
  8973. // Valid Range: Minimum value of 1. Maximum value of 999.
  8974. WeightedCapacity *string `min:"1" type:"string"`
  8975. }
  8976. // String returns the string representation
  8977. func (s InstanceDetails) String() string {
  8978. return awsutil.Prettify(s)
  8979. }
  8980. // GoString returns the string representation
  8981. func (s InstanceDetails) GoString() string {
  8982. return s.String()
  8983. }
  8984. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  8985. func (s *InstanceDetails) SetAutoScalingGroupName(v string) *InstanceDetails {
  8986. s.AutoScalingGroupName = &v
  8987. return s
  8988. }
  8989. // SetAvailabilityZone sets the AvailabilityZone field's value.
  8990. func (s *InstanceDetails) SetAvailabilityZone(v string) *InstanceDetails {
  8991. s.AvailabilityZone = &v
  8992. return s
  8993. }
  8994. // SetHealthStatus sets the HealthStatus field's value.
  8995. func (s *InstanceDetails) SetHealthStatus(v string) *InstanceDetails {
  8996. s.HealthStatus = &v
  8997. return s
  8998. }
  8999. // SetInstanceId sets the InstanceId field's value.
  9000. func (s *InstanceDetails) SetInstanceId(v string) *InstanceDetails {
  9001. s.InstanceId = &v
  9002. return s
  9003. }
  9004. // SetInstanceType sets the InstanceType field's value.
  9005. func (s *InstanceDetails) SetInstanceType(v string) *InstanceDetails {
  9006. s.InstanceType = &v
  9007. return s
  9008. }
  9009. // SetLaunchConfigurationName sets the LaunchConfigurationName field's value.
  9010. func (s *InstanceDetails) SetLaunchConfigurationName(v string) *InstanceDetails {
  9011. s.LaunchConfigurationName = &v
  9012. return s
  9013. }
  9014. // SetLaunchTemplate sets the LaunchTemplate field's value.
  9015. func (s *InstanceDetails) SetLaunchTemplate(v *LaunchTemplateSpecification) *InstanceDetails {
  9016. s.LaunchTemplate = v
  9017. return s
  9018. }
  9019. // SetLifecycleState sets the LifecycleState field's value.
  9020. func (s *InstanceDetails) SetLifecycleState(v string) *InstanceDetails {
  9021. s.LifecycleState = &v
  9022. return s
  9023. }
  9024. // SetProtectedFromScaleIn sets the ProtectedFromScaleIn field's value.
  9025. func (s *InstanceDetails) SetProtectedFromScaleIn(v bool) *InstanceDetails {
  9026. s.ProtectedFromScaleIn = &v
  9027. return s
  9028. }
  9029. // SetWeightedCapacity sets the WeightedCapacity field's value.
  9030. func (s *InstanceDetails) SetWeightedCapacity(v string) *InstanceDetails {
  9031. s.WeightedCapacity = &v
  9032. return s
  9033. }
  9034. // Describes whether detailed monitoring is enabled for the Auto Scaling instances.
  9035. type InstanceMonitoring struct {
  9036. _ struct{} `type:"structure"`
  9037. // If true, detailed monitoring is enabled. Otherwise, basic monitoring is enabled.
  9038. Enabled *bool `type:"boolean"`
  9039. }
  9040. // String returns the string representation
  9041. func (s InstanceMonitoring) String() string {
  9042. return awsutil.Prettify(s)
  9043. }
  9044. // GoString returns the string representation
  9045. func (s InstanceMonitoring) GoString() string {
  9046. return s.String()
  9047. }
  9048. // SetEnabled sets the Enabled field's value.
  9049. func (s *InstanceMonitoring) SetEnabled(v bool) *InstanceMonitoring {
  9050. s.Enabled = &v
  9051. return s
  9052. }
  9053. // Describes an instances distribution for an Auto Scaling group with MixedInstancesPolicy.
  9054. //
  9055. // The instances distribution specifies the distribution of On-Demand Instances
  9056. // and Spot Instances, the maximum price to pay for Spot Instances, and how
  9057. // the Auto Scaling group allocates instance types to fulfill On-Demand and
  9058. // Spot capacity.
  9059. //
  9060. // When you update SpotAllocationStrategy, SpotInstancePools, or SpotMaxPrice,
  9061. // this update action does not deploy any changes across the running Amazon
  9062. // EC2 instances in the group. Your existing Spot Instances continue to run
  9063. // as long as the maximum price for those instances is higher than the current
  9064. // Spot price. When scale out occurs, Amazon EC2 Auto Scaling launches instances
  9065. // based on the new settings. When scale in occurs, Amazon EC2 Auto Scaling
  9066. // terminates instances according to the group's termination policies.
  9067. type InstancesDistribution struct {
  9068. _ struct{} `type:"structure"`
  9069. // Indicates how to allocate instance types to fulfill On-Demand capacity.
  9070. //
  9071. // The only valid value is prioritized, which is also the default value. This
  9072. // strategy uses the order of instance type overrides for the LaunchTemplate
  9073. // to define the launch priority of each instance type. The first instance type
  9074. // in the array is prioritized higher than the last. If all your On-Demand capacity
  9075. // cannot be fulfilled using your highest priority instance, then the Auto Scaling
  9076. // groups launches the remaining capacity using the second priority instance
  9077. // type, and so on.
  9078. OnDemandAllocationStrategy *string `type:"string"`
  9079. // The minimum amount of the Auto Scaling group's capacity that must be fulfilled
  9080. // by On-Demand Instances. This base portion is provisioned first as your group
  9081. // scales.
  9082. //
  9083. // Default if not set is 0. If you leave it set to 0, On-Demand Instances are
  9084. // launched as a percentage of the Auto Scaling group's desired capacity, per
  9085. // the OnDemandPercentageAboveBaseCapacity setting.
  9086. //
  9087. // An update to this setting means a gradual replacement of instances to maintain
  9088. // the specified number of On-Demand Instances for your base capacity. When
  9089. // replacing instances, Amazon EC2 Auto Scaling launches new instances before
  9090. // terminating the old ones.
  9091. OnDemandBaseCapacity *int64 `type:"integer"`
  9092. // Controls the percentages of On-Demand Instances and Spot Instances for your
  9093. // additional capacity beyond OnDemandBaseCapacity.
  9094. //
  9095. // Default if not set is 100. If you leave it set to 100, the percentages are
  9096. // 100% for On-Demand Instances and 0% for Spot Instances.
  9097. //
  9098. // An update to this setting means a gradual replacement of instances to maintain
  9099. // the percentage of On-Demand Instances for your additional capacity above
  9100. // the base capacity. When replacing instances, Amazon EC2 Auto Scaling launches
  9101. // new instances before terminating the old ones.
  9102. //
  9103. // Valid Range: Minimum value of 0. Maximum value of 100.
  9104. OnDemandPercentageAboveBaseCapacity *int64 `type:"integer"`
  9105. // Indicates how to allocate instances across Spot Instance pools.
  9106. //
  9107. // If the allocation strategy is lowest-price, the Auto Scaling group launches
  9108. // instances using the Spot pools with the lowest price, and evenly allocates
  9109. // your instances across the number of Spot pools that you specify. If the allocation
  9110. // strategy is capacity-optimized, the Auto Scaling group launches instances
  9111. // using Spot pools that are optimally chosen based on the available Spot capacity.
  9112. //
  9113. // The default Spot allocation strategy for calls that you make through the
  9114. // API, the AWS CLI, or the AWS SDKs is lowest-price. The default Spot allocation
  9115. // strategy for the AWS Management Console is capacity-optimized.
  9116. //
  9117. // Valid values: lowest-price | capacity-optimized
  9118. SpotAllocationStrategy *string `type:"string"`
  9119. // The number of Spot Instance pools across which to allocate your Spot Instances.
  9120. // The Spot pools are determined from the different instance types in the Overrides
  9121. // array of LaunchTemplate. Default if not set is 2.
  9122. //
  9123. // Used only when the Spot allocation strategy is lowest-price.
  9124. //
  9125. // Valid Range: Minimum value of 1. Maximum value of 20.
  9126. SpotInstancePools *int64 `type:"integer"`
  9127. // The maximum price per unit hour that you are willing to pay for a Spot Instance.
  9128. // If you leave the value of this parameter blank (which is the default), the
  9129. // maximum Spot price is set at the On-Demand price.
  9130. //
  9131. // To remove a value that you previously set, include the parameter but leave
  9132. // the value blank.
  9133. SpotMaxPrice *string `type:"string"`
  9134. }
  9135. // String returns the string representation
  9136. func (s InstancesDistribution) String() string {
  9137. return awsutil.Prettify(s)
  9138. }
  9139. // GoString returns the string representation
  9140. func (s InstancesDistribution) GoString() string {
  9141. return s.String()
  9142. }
  9143. // SetOnDemandAllocationStrategy sets the OnDemandAllocationStrategy field's value.
  9144. func (s *InstancesDistribution) SetOnDemandAllocationStrategy(v string) *InstancesDistribution {
  9145. s.OnDemandAllocationStrategy = &v
  9146. return s
  9147. }
  9148. // SetOnDemandBaseCapacity sets the OnDemandBaseCapacity field's value.
  9149. func (s *InstancesDistribution) SetOnDemandBaseCapacity(v int64) *InstancesDistribution {
  9150. s.OnDemandBaseCapacity = &v
  9151. return s
  9152. }
  9153. // SetOnDemandPercentageAboveBaseCapacity sets the OnDemandPercentageAboveBaseCapacity field's value.
  9154. func (s *InstancesDistribution) SetOnDemandPercentageAboveBaseCapacity(v int64) *InstancesDistribution {
  9155. s.OnDemandPercentageAboveBaseCapacity = &v
  9156. return s
  9157. }
  9158. // SetSpotAllocationStrategy sets the SpotAllocationStrategy field's value.
  9159. func (s *InstancesDistribution) SetSpotAllocationStrategy(v string) *InstancesDistribution {
  9160. s.SpotAllocationStrategy = &v
  9161. return s
  9162. }
  9163. // SetSpotInstancePools sets the SpotInstancePools field's value.
  9164. func (s *InstancesDistribution) SetSpotInstancePools(v int64) *InstancesDistribution {
  9165. s.SpotInstancePools = &v
  9166. return s
  9167. }
  9168. // SetSpotMaxPrice sets the SpotMaxPrice field's value.
  9169. func (s *InstancesDistribution) SetSpotMaxPrice(v string) *InstancesDistribution {
  9170. s.SpotMaxPrice = &v
  9171. return s
  9172. }
  9173. // Describes a launch configuration.
  9174. type LaunchConfiguration struct {
  9175. _ struct{} `type:"structure"`
  9176. // For Auto Scaling groups that are running in a VPC, specifies whether to assign
  9177. // a public IP address to the group's instances.
  9178. //
  9179. // For more information, see Launching Auto Scaling Instances in a VPC (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html)
  9180. // in the Amazon EC2 Auto Scaling User Guide.
  9181. AssociatePublicIpAddress *bool `type:"boolean"`
  9182. // A block device mapping, which specifies the block devices for the instance.
  9183. //
  9184. // For more information, see Block Device Mapping (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
  9185. // in the Amazon EC2 User Guide for Linux Instances.
  9186. BlockDeviceMappings []*BlockDeviceMapping `type:"list"`
  9187. // The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.
  9188. //
  9189. // For more information, see ClassicLink (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
  9190. // in the Amazon EC2 User Guide for Linux Instances and Linking EC2-Classic
  9191. // Instances to a VPC (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink)
  9192. // in the Amazon EC2 Auto Scaling User Guide.
  9193. ClassicLinkVPCId *string `min:"1" type:"string"`
  9194. // The IDs of one or more security groups for the VPC specified in ClassicLinkVPCId.
  9195. //
  9196. // For more information, see ClassicLink (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
  9197. // in the Amazon EC2 User Guide for Linux Instances and Linking EC2-Classic
  9198. // Instances to a VPC (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink)
  9199. // in the Amazon EC2 Auto Scaling User Guide.
  9200. ClassicLinkVPCSecurityGroups []*string `type:"list"`
  9201. // The creation date and time for the launch configuration.
  9202. //
  9203. // CreatedTime is a required field
  9204. CreatedTime *time.Time `type:"timestamp" required:"true"`
  9205. // Specifies whether the launch configuration is optimized for EBS I/O (true)
  9206. // or not (false).
  9207. //
  9208. // For more information, see Amazon EBS-Optimized Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html)
  9209. // in the Amazon EC2 User Guide for Linux Instances.
  9210. EbsOptimized *bool `type:"boolean"`
  9211. // The name or the Amazon Resource Name (ARN) of the instance profile associated
  9212. // with the IAM role for the instance. The instance profile contains the IAM
  9213. // role.
  9214. //
  9215. // For more information, see IAM Role for Applications That Run on Amazon EC2
  9216. // Instances (https://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html)
  9217. // in the Amazon EC2 Auto Scaling User Guide.
  9218. IamInstanceProfile *string `min:"1" type:"string"`
  9219. // The ID of the Amazon Machine Image (AMI) to use to launch your EC2 instances.
  9220. //
  9221. // For more information, see Finding an AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html)
  9222. // in the Amazon EC2 User Guide for Linux Instances.
  9223. //
  9224. // ImageId is a required field
  9225. ImageId *string `min:"1" type:"string" required:"true"`
  9226. // Controls whether instances in this group are launched with detailed (true)
  9227. // or basic (false) monitoring.
  9228. //
  9229. // For more information, see Configure Monitoring for Auto Scaling Instances
  9230. // (https://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-monitoring.html#enable-as-instance-metrics)
  9231. // in the Amazon EC2 Auto Scaling User Guide.
  9232. InstanceMonitoring *InstanceMonitoring `type:"structure"`
  9233. // The instance type for the instances.
  9234. //
  9235. // For information about available instance types, see Available Instance Types
  9236. // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes)
  9237. // in the Amazon EC2 User Guide for Linux Instances.
  9238. //
  9239. // InstanceType is a required field
  9240. InstanceType *string `min:"1" type:"string" required:"true"`
  9241. // The ID of the kernel associated with the AMI.
  9242. KernelId *string `min:"1" type:"string"`
  9243. // The name of the key pair.
  9244. //
  9245. // For more information, see Amazon EC2 Key Pairs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
  9246. // in the Amazon EC2 User Guide for Linux Instances.
  9247. KeyName *string `min:"1" type:"string"`
  9248. // The Amazon Resource Name (ARN) of the launch configuration.
  9249. LaunchConfigurationARN *string `min:"1" type:"string"`
  9250. // The name of the launch configuration.
  9251. //
  9252. // LaunchConfigurationName is a required field
  9253. LaunchConfigurationName *string `min:"1" type:"string" required:"true"`
  9254. // The tenancy of the instance, either default or dedicated. An instance with
  9255. // dedicated tenancy runs on isolated, single-tenant hardware and can only be
  9256. // launched into a VPC.
  9257. //
  9258. // For more information, see Instance Placement Tenancy (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-vpc-tenancy)
  9259. // in the Amazon EC2 Auto Scaling User Guide.
  9260. PlacementTenancy *string `min:"1" type:"string"`
  9261. // The ID of the RAM disk associated with the AMI.
  9262. RamdiskId *string `min:"1" type:"string"`
  9263. // A list that contains the security groups to assign to the instances in the
  9264. // Auto Scaling group.
  9265. //
  9266. // For more information, see Security Groups for Your VPC (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html)
  9267. // in the Amazon Virtual Private Cloud User Guide.
  9268. SecurityGroups []*string `type:"list"`
  9269. // The maximum hourly price to be paid for any Spot Instance launched to fulfill
  9270. // the request. Spot Instances are launched when the price you specify exceeds
  9271. // the current Spot price.
  9272. //
  9273. // For more information, see Launching Spot Instances in Your Auto Scaling Group
  9274. // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-spot-instances.html)
  9275. // in the Amazon EC2 Auto Scaling User Guide.
  9276. SpotPrice *string `min:"1" type:"string"`
  9277. // The Base64-encoded user data to make available to the launched EC2 instances.
  9278. //
  9279. // For more information, see Instance Metadata and User Data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
  9280. // in the Amazon EC2 User Guide for Linux Instances.
  9281. UserData *string `type:"string"`
  9282. }
  9283. // String returns the string representation
  9284. func (s LaunchConfiguration) String() string {
  9285. return awsutil.Prettify(s)
  9286. }
  9287. // GoString returns the string representation
  9288. func (s LaunchConfiguration) GoString() string {
  9289. return s.String()
  9290. }
  9291. // SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value.
  9292. func (s *LaunchConfiguration) SetAssociatePublicIpAddress(v bool) *LaunchConfiguration {
  9293. s.AssociatePublicIpAddress = &v
  9294. return s
  9295. }
  9296. // SetBlockDeviceMappings sets the BlockDeviceMappings field's value.
  9297. func (s *LaunchConfiguration) SetBlockDeviceMappings(v []*BlockDeviceMapping) *LaunchConfiguration {
  9298. s.BlockDeviceMappings = v
  9299. return s
  9300. }
  9301. // SetClassicLinkVPCId sets the ClassicLinkVPCId field's value.
  9302. func (s *LaunchConfiguration) SetClassicLinkVPCId(v string) *LaunchConfiguration {
  9303. s.ClassicLinkVPCId = &v
  9304. return s
  9305. }
  9306. // SetClassicLinkVPCSecurityGroups sets the ClassicLinkVPCSecurityGroups field's value.
  9307. func (s *LaunchConfiguration) SetClassicLinkVPCSecurityGroups(v []*string) *LaunchConfiguration {
  9308. s.ClassicLinkVPCSecurityGroups = v
  9309. return s
  9310. }
  9311. // SetCreatedTime sets the CreatedTime field's value.
  9312. func (s *LaunchConfiguration) SetCreatedTime(v time.Time) *LaunchConfiguration {
  9313. s.CreatedTime = &v
  9314. return s
  9315. }
  9316. // SetEbsOptimized sets the EbsOptimized field's value.
  9317. func (s *LaunchConfiguration) SetEbsOptimized(v bool) *LaunchConfiguration {
  9318. s.EbsOptimized = &v
  9319. return s
  9320. }
  9321. // SetIamInstanceProfile sets the IamInstanceProfile field's value.
  9322. func (s *LaunchConfiguration) SetIamInstanceProfile(v string) *LaunchConfiguration {
  9323. s.IamInstanceProfile = &v
  9324. return s
  9325. }
  9326. // SetImageId sets the ImageId field's value.
  9327. func (s *LaunchConfiguration) SetImageId(v string) *LaunchConfiguration {
  9328. s.ImageId = &v
  9329. return s
  9330. }
  9331. // SetInstanceMonitoring sets the InstanceMonitoring field's value.
  9332. func (s *LaunchConfiguration) SetInstanceMonitoring(v *InstanceMonitoring) *LaunchConfiguration {
  9333. s.InstanceMonitoring = v
  9334. return s
  9335. }
  9336. // SetInstanceType sets the InstanceType field's value.
  9337. func (s *LaunchConfiguration) SetInstanceType(v string) *LaunchConfiguration {
  9338. s.InstanceType = &v
  9339. return s
  9340. }
  9341. // SetKernelId sets the KernelId field's value.
  9342. func (s *LaunchConfiguration) SetKernelId(v string) *LaunchConfiguration {
  9343. s.KernelId = &v
  9344. return s
  9345. }
  9346. // SetKeyName sets the KeyName field's value.
  9347. func (s *LaunchConfiguration) SetKeyName(v string) *LaunchConfiguration {
  9348. s.KeyName = &v
  9349. return s
  9350. }
  9351. // SetLaunchConfigurationARN sets the LaunchConfigurationARN field's value.
  9352. func (s *LaunchConfiguration) SetLaunchConfigurationARN(v string) *LaunchConfiguration {
  9353. s.LaunchConfigurationARN = &v
  9354. return s
  9355. }
  9356. // SetLaunchConfigurationName sets the LaunchConfigurationName field's value.
  9357. func (s *LaunchConfiguration) SetLaunchConfigurationName(v string) *LaunchConfiguration {
  9358. s.LaunchConfigurationName = &v
  9359. return s
  9360. }
  9361. // SetPlacementTenancy sets the PlacementTenancy field's value.
  9362. func (s *LaunchConfiguration) SetPlacementTenancy(v string) *LaunchConfiguration {
  9363. s.PlacementTenancy = &v
  9364. return s
  9365. }
  9366. // SetRamdiskId sets the RamdiskId field's value.
  9367. func (s *LaunchConfiguration) SetRamdiskId(v string) *LaunchConfiguration {
  9368. s.RamdiskId = &v
  9369. return s
  9370. }
  9371. // SetSecurityGroups sets the SecurityGroups field's value.
  9372. func (s *LaunchConfiguration) SetSecurityGroups(v []*string) *LaunchConfiguration {
  9373. s.SecurityGroups = v
  9374. return s
  9375. }
  9376. // SetSpotPrice sets the SpotPrice field's value.
  9377. func (s *LaunchConfiguration) SetSpotPrice(v string) *LaunchConfiguration {
  9378. s.SpotPrice = &v
  9379. return s
  9380. }
  9381. // SetUserData sets the UserData field's value.
  9382. func (s *LaunchConfiguration) SetUserData(v string) *LaunchConfiguration {
  9383. s.UserData = &v
  9384. return s
  9385. }
  9386. // Describes a launch template and overrides.
  9387. //
  9388. // The overrides are used to override the instance type specified by the launch
  9389. // template with multiple instance types that can be used to launch On-Demand
  9390. // Instances and Spot Instances.
  9391. //
  9392. // When you update the launch template or overrides, existing Amazon EC2 instances
  9393. // continue to run. When scale out occurs, Amazon EC2 Auto Scaling launches
  9394. // instances to match the new settings. When scale in occurs, Amazon EC2 Auto
  9395. // Scaling terminates instances according to the group's termination policies.
  9396. type LaunchTemplate struct {
  9397. _ struct{} `type:"structure"`
  9398. // The launch template to use. You must specify either the launch template ID
  9399. // or launch template name in the request.
  9400. LaunchTemplateSpecification *LaunchTemplateSpecification `type:"structure"`
  9401. // An optional setting. Any parameters that you specify override the same parameters
  9402. // in the launch template. Currently, the only supported override is instance
  9403. // type. You can specify between 1 and 20 instance types.
  9404. Overrides []*LaunchTemplateOverrides `type:"list"`
  9405. }
  9406. // String returns the string representation
  9407. func (s LaunchTemplate) String() string {
  9408. return awsutil.Prettify(s)
  9409. }
  9410. // GoString returns the string representation
  9411. func (s LaunchTemplate) GoString() string {
  9412. return s.String()
  9413. }
  9414. // Validate inspects the fields of the type to determine if they are valid.
  9415. func (s *LaunchTemplate) Validate() error {
  9416. invalidParams := request.ErrInvalidParams{Context: "LaunchTemplate"}
  9417. if s.LaunchTemplateSpecification != nil {
  9418. if err := s.LaunchTemplateSpecification.Validate(); err != nil {
  9419. invalidParams.AddNested("LaunchTemplateSpecification", err.(request.ErrInvalidParams))
  9420. }
  9421. }
  9422. if s.Overrides != nil {
  9423. for i, v := range s.Overrides {
  9424. if v == nil {
  9425. continue
  9426. }
  9427. if err := v.Validate(); err != nil {
  9428. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Overrides", i), err.(request.ErrInvalidParams))
  9429. }
  9430. }
  9431. }
  9432. if invalidParams.Len() > 0 {
  9433. return invalidParams
  9434. }
  9435. return nil
  9436. }
  9437. // SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value.
  9438. func (s *LaunchTemplate) SetLaunchTemplateSpecification(v *LaunchTemplateSpecification) *LaunchTemplate {
  9439. s.LaunchTemplateSpecification = v
  9440. return s
  9441. }
  9442. // SetOverrides sets the Overrides field's value.
  9443. func (s *LaunchTemplate) SetOverrides(v []*LaunchTemplateOverrides) *LaunchTemplate {
  9444. s.Overrides = v
  9445. return s
  9446. }
  9447. // Describes an override for a launch template.
  9448. type LaunchTemplateOverrides struct {
  9449. _ struct{} `type:"structure"`
  9450. // The instance type.
  9451. //
  9452. // For information about available instance types, see Available Instance Types
  9453. // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes)
  9454. // in the Amazon Elastic Compute Cloud User Guide.
  9455. InstanceType *string `min:"1" type:"string"`
  9456. // The number of capacity units, which gives the instance type a proportional
  9457. // weight to other instance types. For example, larger instance types are generally
  9458. // weighted more than smaller instance types. These are the same units that
  9459. // you chose to set the desired capacity in terms of instances, or a performance
  9460. // attribute such as vCPUs, memory, or I/O.
  9461. //
  9462. // Valid Range: Minimum value of 1. Maximum value of 999.
  9463. WeightedCapacity *string `min:"1" type:"string"`
  9464. }
  9465. // String returns the string representation
  9466. func (s LaunchTemplateOverrides) String() string {
  9467. return awsutil.Prettify(s)
  9468. }
  9469. // GoString returns the string representation
  9470. func (s LaunchTemplateOverrides) GoString() string {
  9471. return s.String()
  9472. }
  9473. // Validate inspects the fields of the type to determine if they are valid.
  9474. func (s *LaunchTemplateOverrides) Validate() error {
  9475. invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateOverrides"}
  9476. if s.InstanceType != nil && len(*s.InstanceType) < 1 {
  9477. invalidParams.Add(request.NewErrParamMinLen("InstanceType", 1))
  9478. }
  9479. if s.WeightedCapacity != nil && len(*s.WeightedCapacity) < 1 {
  9480. invalidParams.Add(request.NewErrParamMinLen("WeightedCapacity", 1))
  9481. }
  9482. if invalidParams.Len() > 0 {
  9483. return invalidParams
  9484. }
  9485. return nil
  9486. }
  9487. // SetInstanceType sets the InstanceType field's value.
  9488. func (s *LaunchTemplateOverrides) SetInstanceType(v string) *LaunchTemplateOverrides {
  9489. s.InstanceType = &v
  9490. return s
  9491. }
  9492. // SetWeightedCapacity sets the WeightedCapacity field's value.
  9493. func (s *LaunchTemplateOverrides) SetWeightedCapacity(v string) *LaunchTemplateOverrides {
  9494. s.WeightedCapacity = &v
  9495. return s
  9496. }
  9497. // Describes a launch template and the launch template version.
  9498. //
  9499. // The launch template that is specified must be configured for use with an
  9500. // Auto Scaling group. For more information, see Creating a Launch Template
  9501. // for an Auto Scaling Group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html)
  9502. // in the Amazon EC2 Auto Scaling User Guide.
  9503. type LaunchTemplateSpecification struct {
  9504. _ struct{} `type:"structure"`
  9505. // The ID of the launch template. You must specify either a template ID or a
  9506. // template name.
  9507. LaunchTemplateId *string `min:"1" type:"string"`
  9508. // The name of the launch template. You must specify either a template name
  9509. // or a template ID.
  9510. LaunchTemplateName *string `min:"3" type:"string"`
  9511. // The version number, $Latest, or $Default. If the value is $Latest, Amazon
  9512. // EC2 Auto Scaling selects the latest version of the launch template when launching
  9513. // instances. If the value is $Default, Amazon EC2 Auto Scaling selects the
  9514. // default version of the launch template when launching instances. The default
  9515. // value is $Default.
  9516. Version *string `min:"1" type:"string"`
  9517. }
  9518. // String returns the string representation
  9519. func (s LaunchTemplateSpecification) String() string {
  9520. return awsutil.Prettify(s)
  9521. }
  9522. // GoString returns the string representation
  9523. func (s LaunchTemplateSpecification) GoString() string {
  9524. return s.String()
  9525. }
  9526. // Validate inspects the fields of the type to determine if they are valid.
  9527. func (s *LaunchTemplateSpecification) Validate() error {
  9528. invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateSpecification"}
  9529. if s.LaunchTemplateId != nil && len(*s.LaunchTemplateId) < 1 {
  9530. invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateId", 1))
  9531. }
  9532. if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 {
  9533. invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3))
  9534. }
  9535. if s.Version != nil && len(*s.Version) < 1 {
  9536. invalidParams.Add(request.NewErrParamMinLen("Version", 1))
  9537. }
  9538. if invalidParams.Len() > 0 {
  9539. return invalidParams
  9540. }
  9541. return nil
  9542. }
  9543. // SetLaunchTemplateId sets the LaunchTemplateId field's value.
  9544. func (s *LaunchTemplateSpecification) SetLaunchTemplateId(v string) *LaunchTemplateSpecification {
  9545. s.LaunchTemplateId = &v
  9546. return s
  9547. }
  9548. // SetLaunchTemplateName sets the LaunchTemplateName field's value.
  9549. func (s *LaunchTemplateSpecification) SetLaunchTemplateName(v string) *LaunchTemplateSpecification {
  9550. s.LaunchTemplateName = &v
  9551. return s
  9552. }
  9553. // SetVersion sets the Version field's value.
  9554. func (s *LaunchTemplateSpecification) SetVersion(v string) *LaunchTemplateSpecification {
  9555. s.Version = &v
  9556. return s
  9557. }
  9558. // Describes a lifecycle hook, which tells Amazon EC2 Auto Scaling that you
  9559. // want to perform an action whenever it launches instances or terminates instances.
  9560. // Used in response to DescribeLifecycleHooks.
  9561. type LifecycleHook struct {
  9562. _ struct{} `type:"structure"`
  9563. // The name of the Auto Scaling group for the lifecycle hook.
  9564. AutoScalingGroupName *string `min:"1" type:"string"`
  9565. // Defines the action the Auto Scaling group should take when the lifecycle
  9566. // hook timeout elapses or if an unexpected failure occurs. The possible values
  9567. // are CONTINUE and ABANDON.
  9568. DefaultResult *string `type:"string"`
  9569. // The maximum time, in seconds, that an instance can remain in a Pending:Wait
  9570. // or Terminating:Wait state. The maximum is 172800 seconds (48 hours) or 100
  9571. // times HeartbeatTimeout, whichever is smaller.
  9572. GlobalTimeout *int64 `type:"integer"`
  9573. // The maximum time, in seconds, that can elapse before the lifecycle hook times
  9574. // out. If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the
  9575. // action that you specified in the DefaultResult parameter.
  9576. HeartbeatTimeout *int64 `type:"integer"`
  9577. // The name of the lifecycle hook.
  9578. LifecycleHookName *string `min:"1" type:"string"`
  9579. // The state of the EC2 instance to which to attach the lifecycle hook. The
  9580. // following are possible values:
  9581. //
  9582. // * autoscaling:EC2_INSTANCE_LAUNCHING
  9583. //
  9584. // * autoscaling:EC2_INSTANCE_TERMINATING
  9585. LifecycleTransition *string `type:"string"`
  9586. // Additional information that is included any time Amazon EC2 Auto Scaling
  9587. // sends a message to the notification target.
  9588. NotificationMetadata *string `min:"1" type:"string"`
  9589. // The ARN of the target that Amazon EC2 Auto Scaling sends notifications to
  9590. // when an instance is in the transition state for the lifecycle hook. The notification
  9591. // target can be either an SQS queue or an SNS topic.
  9592. NotificationTargetARN *string `min:"1" type:"string"`
  9593. // The ARN of the IAM role that allows the Auto Scaling group to publish to
  9594. // the specified notification target.
  9595. RoleARN *string `min:"1" type:"string"`
  9596. }
  9597. // String returns the string representation
  9598. func (s LifecycleHook) String() string {
  9599. return awsutil.Prettify(s)
  9600. }
  9601. // GoString returns the string representation
  9602. func (s LifecycleHook) GoString() string {
  9603. return s.String()
  9604. }
  9605. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  9606. func (s *LifecycleHook) SetAutoScalingGroupName(v string) *LifecycleHook {
  9607. s.AutoScalingGroupName = &v
  9608. return s
  9609. }
  9610. // SetDefaultResult sets the DefaultResult field's value.
  9611. func (s *LifecycleHook) SetDefaultResult(v string) *LifecycleHook {
  9612. s.DefaultResult = &v
  9613. return s
  9614. }
  9615. // SetGlobalTimeout sets the GlobalTimeout field's value.
  9616. func (s *LifecycleHook) SetGlobalTimeout(v int64) *LifecycleHook {
  9617. s.GlobalTimeout = &v
  9618. return s
  9619. }
  9620. // SetHeartbeatTimeout sets the HeartbeatTimeout field's value.
  9621. func (s *LifecycleHook) SetHeartbeatTimeout(v int64) *LifecycleHook {
  9622. s.HeartbeatTimeout = &v
  9623. return s
  9624. }
  9625. // SetLifecycleHookName sets the LifecycleHookName field's value.
  9626. func (s *LifecycleHook) SetLifecycleHookName(v string) *LifecycleHook {
  9627. s.LifecycleHookName = &v
  9628. return s
  9629. }
  9630. // SetLifecycleTransition sets the LifecycleTransition field's value.
  9631. func (s *LifecycleHook) SetLifecycleTransition(v string) *LifecycleHook {
  9632. s.LifecycleTransition = &v
  9633. return s
  9634. }
  9635. // SetNotificationMetadata sets the NotificationMetadata field's value.
  9636. func (s *LifecycleHook) SetNotificationMetadata(v string) *LifecycleHook {
  9637. s.NotificationMetadata = &v
  9638. return s
  9639. }
  9640. // SetNotificationTargetARN sets the NotificationTargetARN field's value.
  9641. func (s *LifecycleHook) SetNotificationTargetARN(v string) *LifecycleHook {
  9642. s.NotificationTargetARN = &v
  9643. return s
  9644. }
  9645. // SetRoleARN sets the RoleARN field's value.
  9646. func (s *LifecycleHook) SetRoleARN(v string) *LifecycleHook {
  9647. s.RoleARN = &v
  9648. return s
  9649. }
  9650. // Describes a lifecycle hook. Used in combination with CreateAutoScalingGroup.
  9651. //
  9652. // A lifecycle hook tells Amazon EC2 Auto Scaling to perform an action on an
  9653. // instance when the instance launches (before it is put into service) or as
  9654. // the instance terminates (before it is fully terminated).
  9655. //
  9656. // This step is a part of the procedure for creating a lifecycle hook for an
  9657. // Auto Scaling group:
  9658. //
  9659. // (Optional) Create a Lambda function and a rule that allows CloudWatch Events
  9660. // to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates
  9661. // instances.
  9662. //
  9663. // (Optional) Create a notification target and an IAM role. The target can be
  9664. // either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon
  9665. // EC2 Auto Scaling to publish lifecycle notifications to the target.
  9666. //
  9667. // Create the lifecycle hook. Specify whether the hook is used when the instances
  9668. // launch or terminate.
  9669. //
  9670. // If you need more time, record the lifecycle action heartbeat to keep the
  9671. // instance in a pending state using RecordLifecycleActionHeartbeat.
  9672. //
  9673. // If you finish before the timeout period ends, complete the lifecycle action
  9674. // using CompleteLifecycleAction.
  9675. //
  9676. // For more information, see Amazon EC2 Auto Scaling Lifecycle Hooks (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html)
  9677. // in the Amazon EC2 Auto Scaling User Guide.
  9678. //
  9679. // You can view the lifecycle hooks for an Auto Scaling group using DescribeLifecycleHooks.
  9680. // You can modify an existing lifecycle hook or create new lifecycle hooks using
  9681. // PutLifecycleHook. If you are no longer using a lifecycle hook, you can delete
  9682. // it using DeleteLifecycleHook.
  9683. type LifecycleHookSpecification struct {
  9684. _ struct{} `type:"structure"`
  9685. // Defines the action the Auto Scaling group should take when the lifecycle
  9686. // hook timeout elapses or if an unexpected failure occurs. The valid values
  9687. // are CONTINUE and ABANDON. The default value is ABANDON.
  9688. DefaultResult *string `type:"string"`
  9689. // The maximum time, in seconds, that can elapse before the lifecycle hook times
  9690. // out.
  9691. //
  9692. // If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the action
  9693. // that you specified in the DefaultResult parameter. You can prevent the lifecycle
  9694. // hook from timing out by calling RecordLifecycleActionHeartbeat.
  9695. HeartbeatTimeout *int64 `type:"integer"`
  9696. // The name of the lifecycle hook.
  9697. //
  9698. // LifecycleHookName is a required field
  9699. LifecycleHookName *string `min:"1" type:"string" required:"true"`
  9700. // The state of the EC2 instance to which you want to attach the lifecycle hook.
  9701. // The valid values are:
  9702. //
  9703. // * autoscaling:EC2_INSTANCE_LAUNCHING
  9704. //
  9705. // * autoscaling:EC2_INSTANCE_TERMINATING
  9706. //
  9707. // LifecycleTransition is a required field
  9708. LifecycleTransition *string `type:"string" required:"true"`
  9709. // Additional information that you want to include any time Amazon EC2 Auto
  9710. // Scaling sends a message to the notification target.
  9711. NotificationMetadata *string `min:"1" type:"string"`
  9712. // The ARN of the target that Amazon EC2 Auto Scaling sends notifications to
  9713. // when an instance is in the transition state for the lifecycle hook. The notification
  9714. // target can be either an SQS queue or an SNS topic.
  9715. NotificationTargetARN *string `type:"string"`
  9716. // The ARN of the IAM role that allows the Auto Scaling group to publish to
  9717. // the specified notification target, for example, an Amazon SNS topic or an
  9718. // Amazon SQS queue.
  9719. RoleARN *string `min:"1" type:"string"`
  9720. }
  9721. // String returns the string representation
  9722. func (s LifecycleHookSpecification) String() string {
  9723. return awsutil.Prettify(s)
  9724. }
  9725. // GoString returns the string representation
  9726. func (s LifecycleHookSpecification) GoString() string {
  9727. return s.String()
  9728. }
  9729. // Validate inspects the fields of the type to determine if they are valid.
  9730. func (s *LifecycleHookSpecification) Validate() error {
  9731. invalidParams := request.ErrInvalidParams{Context: "LifecycleHookSpecification"}
  9732. if s.LifecycleHookName == nil {
  9733. invalidParams.Add(request.NewErrParamRequired("LifecycleHookName"))
  9734. }
  9735. if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 {
  9736. invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1))
  9737. }
  9738. if s.LifecycleTransition == nil {
  9739. invalidParams.Add(request.NewErrParamRequired("LifecycleTransition"))
  9740. }
  9741. if s.NotificationMetadata != nil && len(*s.NotificationMetadata) < 1 {
  9742. invalidParams.Add(request.NewErrParamMinLen("NotificationMetadata", 1))
  9743. }
  9744. if s.RoleARN != nil && len(*s.RoleARN) < 1 {
  9745. invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1))
  9746. }
  9747. if invalidParams.Len() > 0 {
  9748. return invalidParams
  9749. }
  9750. return nil
  9751. }
  9752. // SetDefaultResult sets the DefaultResult field's value.
  9753. func (s *LifecycleHookSpecification) SetDefaultResult(v string) *LifecycleHookSpecification {
  9754. s.DefaultResult = &v
  9755. return s
  9756. }
  9757. // SetHeartbeatTimeout sets the HeartbeatTimeout field's value.
  9758. func (s *LifecycleHookSpecification) SetHeartbeatTimeout(v int64) *LifecycleHookSpecification {
  9759. s.HeartbeatTimeout = &v
  9760. return s
  9761. }
  9762. // SetLifecycleHookName sets the LifecycleHookName field's value.
  9763. func (s *LifecycleHookSpecification) SetLifecycleHookName(v string) *LifecycleHookSpecification {
  9764. s.LifecycleHookName = &v
  9765. return s
  9766. }
  9767. // SetLifecycleTransition sets the LifecycleTransition field's value.
  9768. func (s *LifecycleHookSpecification) SetLifecycleTransition(v string) *LifecycleHookSpecification {
  9769. s.LifecycleTransition = &v
  9770. return s
  9771. }
  9772. // SetNotificationMetadata sets the NotificationMetadata field's value.
  9773. func (s *LifecycleHookSpecification) SetNotificationMetadata(v string) *LifecycleHookSpecification {
  9774. s.NotificationMetadata = &v
  9775. return s
  9776. }
  9777. // SetNotificationTargetARN sets the NotificationTargetARN field's value.
  9778. func (s *LifecycleHookSpecification) SetNotificationTargetARN(v string) *LifecycleHookSpecification {
  9779. s.NotificationTargetARN = &v
  9780. return s
  9781. }
  9782. // SetRoleARN sets the RoleARN field's value.
  9783. func (s *LifecycleHookSpecification) SetRoleARN(v string) *LifecycleHookSpecification {
  9784. s.RoleARN = &v
  9785. return s
  9786. }
  9787. // Describes the state of a Classic Load Balancer.
  9788. //
  9789. // If you specify a load balancer when creating the Auto Scaling group, the
  9790. // state of the load balancer is InService.
  9791. //
  9792. // If you attach a load balancer to an existing Auto Scaling group, the initial
  9793. // state is Adding. The state transitions to Added after all instances in the
  9794. // group are registered with the load balancer. If Elastic Load Balancing health
  9795. // checks are enabled for the load balancer, the state transitions to InService
  9796. // after at least one instance in the group passes the health check. If EC2
  9797. // health checks are enabled instead, the load balancer remains in the Added
  9798. // state.
  9799. type LoadBalancerState struct {
  9800. _ struct{} `type:"structure"`
  9801. // The name of the load balancer.
  9802. LoadBalancerName *string `min:"1" type:"string"`
  9803. // One of the following load balancer states:
  9804. //
  9805. // * Adding - The instances in the group are being registered with the load
  9806. // balancer.
  9807. //
  9808. // * Added - All instances in the group are registered with the load balancer.
  9809. //
  9810. // * InService - At least one instance in the group passed an ELB health
  9811. // check.
  9812. //
  9813. // * Removing - The instances in the group are being deregistered from the
  9814. // load balancer. If connection draining is enabled, Elastic Load Balancing
  9815. // waits for in-flight requests to complete before deregistering the instances.
  9816. //
  9817. // * Removed - All instances in the group are deregistered from the load
  9818. // balancer.
  9819. State *string `min:"1" type:"string"`
  9820. }
  9821. // String returns the string representation
  9822. func (s LoadBalancerState) String() string {
  9823. return awsutil.Prettify(s)
  9824. }
  9825. // GoString returns the string representation
  9826. func (s LoadBalancerState) GoString() string {
  9827. return s.String()
  9828. }
  9829. // SetLoadBalancerName sets the LoadBalancerName field's value.
  9830. func (s *LoadBalancerState) SetLoadBalancerName(v string) *LoadBalancerState {
  9831. s.LoadBalancerName = &v
  9832. return s
  9833. }
  9834. // SetState sets the State field's value.
  9835. func (s *LoadBalancerState) SetState(v string) *LoadBalancerState {
  9836. s.State = &v
  9837. return s
  9838. }
  9839. // Describes the state of a target group.
  9840. //
  9841. // If you attach a target group to an existing Auto Scaling group, the initial
  9842. // state is Adding. The state transitions to Added after all Auto Scaling instances
  9843. // are registered with the target group. If Elastic Load Balancing health checks
  9844. // are enabled, the state transitions to InService after at least one Auto Scaling
  9845. // instance passes the health check. If EC2 health checks are enabled instead,
  9846. // the target group remains in the Added state.
  9847. type LoadBalancerTargetGroupState struct {
  9848. _ struct{} `type:"structure"`
  9849. // The Amazon Resource Name (ARN) of the target group.
  9850. LoadBalancerTargetGroupARN *string `min:"1" type:"string"`
  9851. // The state of the target group.
  9852. //
  9853. // * Adding - The Auto Scaling instances are being registered with the target
  9854. // group.
  9855. //
  9856. // * Added - All Auto Scaling instances are registered with the target group.
  9857. //
  9858. // * InService - At least one Auto Scaling instance passed an ELB health
  9859. // check.
  9860. //
  9861. // * Removing - The Auto Scaling instances are being deregistered from the
  9862. // target group. If connection draining is enabled, Elastic Load Balancing
  9863. // waits for in-flight requests to complete before deregistering the instances.
  9864. //
  9865. // * Removed - All Auto Scaling instances are deregistered from the target
  9866. // group.
  9867. State *string `min:"1" type:"string"`
  9868. }
  9869. // String returns the string representation
  9870. func (s LoadBalancerTargetGroupState) String() string {
  9871. return awsutil.Prettify(s)
  9872. }
  9873. // GoString returns the string representation
  9874. func (s LoadBalancerTargetGroupState) GoString() string {
  9875. return s.String()
  9876. }
  9877. // SetLoadBalancerTargetGroupARN sets the LoadBalancerTargetGroupARN field's value.
  9878. func (s *LoadBalancerTargetGroupState) SetLoadBalancerTargetGroupARN(v string) *LoadBalancerTargetGroupState {
  9879. s.LoadBalancerTargetGroupARN = &v
  9880. return s
  9881. }
  9882. // SetState sets the State field's value.
  9883. func (s *LoadBalancerTargetGroupState) SetState(v string) *LoadBalancerTargetGroupState {
  9884. s.State = &v
  9885. return s
  9886. }
  9887. // Describes a metric.
  9888. type MetricCollectionType struct {
  9889. _ struct{} `type:"structure"`
  9890. // One of the following metrics:
  9891. //
  9892. // * GroupMinSize
  9893. //
  9894. // * GroupMaxSize
  9895. //
  9896. // * GroupDesiredCapacity
  9897. //
  9898. // * GroupInServiceInstances
  9899. //
  9900. // * GroupPendingInstances
  9901. //
  9902. // * GroupStandbyInstances
  9903. //
  9904. // * GroupTerminatingInstances
  9905. //
  9906. // * GroupTotalInstances
  9907. Metric *string `min:"1" type:"string"`
  9908. }
  9909. // String returns the string representation
  9910. func (s MetricCollectionType) String() string {
  9911. return awsutil.Prettify(s)
  9912. }
  9913. // GoString returns the string representation
  9914. func (s MetricCollectionType) GoString() string {
  9915. return s.String()
  9916. }
  9917. // SetMetric sets the Metric field's value.
  9918. func (s *MetricCollectionType) SetMetric(v string) *MetricCollectionType {
  9919. s.Metric = &v
  9920. return s
  9921. }
  9922. // Describes the dimension of a metric.
  9923. type MetricDimension struct {
  9924. _ struct{} `type:"structure"`
  9925. // The name of the dimension.
  9926. //
  9927. // Name is a required field
  9928. Name *string `type:"string" required:"true"`
  9929. // The value of the dimension.
  9930. //
  9931. // Value is a required field
  9932. Value *string `type:"string" required:"true"`
  9933. }
  9934. // String returns the string representation
  9935. func (s MetricDimension) String() string {
  9936. return awsutil.Prettify(s)
  9937. }
  9938. // GoString returns the string representation
  9939. func (s MetricDimension) GoString() string {
  9940. return s.String()
  9941. }
  9942. // Validate inspects the fields of the type to determine if they are valid.
  9943. func (s *MetricDimension) Validate() error {
  9944. invalidParams := request.ErrInvalidParams{Context: "MetricDimension"}
  9945. if s.Name == nil {
  9946. invalidParams.Add(request.NewErrParamRequired("Name"))
  9947. }
  9948. if s.Value == nil {
  9949. invalidParams.Add(request.NewErrParamRequired("Value"))
  9950. }
  9951. if invalidParams.Len() > 0 {
  9952. return invalidParams
  9953. }
  9954. return nil
  9955. }
  9956. // SetName sets the Name field's value.
  9957. func (s *MetricDimension) SetName(v string) *MetricDimension {
  9958. s.Name = &v
  9959. return s
  9960. }
  9961. // SetValue sets the Value field's value.
  9962. func (s *MetricDimension) SetValue(v string) *MetricDimension {
  9963. s.Value = &v
  9964. return s
  9965. }
  9966. // Describes a granularity of a metric.
  9967. type MetricGranularityType struct {
  9968. _ struct{} `type:"structure"`
  9969. // The granularity. The only valid value is 1Minute.
  9970. Granularity *string `min:"1" type:"string"`
  9971. }
  9972. // String returns the string representation
  9973. func (s MetricGranularityType) String() string {
  9974. return awsutil.Prettify(s)
  9975. }
  9976. // GoString returns the string representation
  9977. func (s MetricGranularityType) GoString() string {
  9978. return s.String()
  9979. }
  9980. // SetGranularity sets the Granularity field's value.
  9981. func (s *MetricGranularityType) SetGranularity(v string) *MetricGranularityType {
  9982. s.Granularity = &v
  9983. return s
  9984. }
  9985. // Describes a mixed instances policy for an Auto Scaling group. With mixed
  9986. // instances, your Auto Scaling group can provision a combination of On-Demand
  9987. // Instances and Spot Instances across multiple instance types. For more information,
  9988. // see Auto Scaling Groups with Multiple Instance Types and Purchase Options
  9989. // (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html)
  9990. // in the Amazon EC2 Auto Scaling User Guide.
  9991. //
  9992. // You can create a mixed instances policy for a new Auto Scaling group, or
  9993. // you can create it for an existing group by updating the group to specify
  9994. // MixedInstancesPolicy as the top-level parameter instead of a launch configuration
  9995. // or template. For more information, see CreateAutoScalingGroup and UpdateAutoScalingGroup.
  9996. type MixedInstancesPolicy struct {
  9997. _ struct{} `type:"structure"`
  9998. // The instances distribution to use.
  9999. //
  10000. // If you leave this parameter unspecified, the value for each parameter in
  10001. // InstancesDistribution uses a default value.
  10002. InstancesDistribution *InstancesDistribution `type:"structure"`
  10003. // The launch template and instance types (overrides).
  10004. //
  10005. // This parameter must be specified when creating a mixed instances policy.
  10006. LaunchTemplate *LaunchTemplate `type:"structure"`
  10007. }
  10008. // String returns the string representation
  10009. func (s MixedInstancesPolicy) String() string {
  10010. return awsutil.Prettify(s)
  10011. }
  10012. // GoString returns the string representation
  10013. func (s MixedInstancesPolicy) GoString() string {
  10014. return s.String()
  10015. }
  10016. // Validate inspects the fields of the type to determine if they are valid.
  10017. func (s *MixedInstancesPolicy) Validate() error {
  10018. invalidParams := request.ErrInvalidParams{Context: "MixedInstancesPolicy"}
  10019. if s.LaunchTemplate != nil {
  10020. if err := s.LaunchTemplate.Validate(); err != nil {
  10021. invalidParams.AddNested("LaunchTemplate", err.(request.ErrInvalidParams))
  10022. }
  10023. }
  10024. if invalidParams.Len() > 0 {
  10025. return invalidParams
  10026. }
  10027. return nil
  10028. }
  10029. // SetInstancesDistribution sets the InstancesDistribution field's value.
  10030. func (s *MixedInstancesPolicy) SetInstancesDistribution(v *InstancesDistribution) *MixedInstancesPolicy {
  10031. s.InstancesDistribution = v
  10032. return s
  10033. }
  10034. // SetLaunchTemplate sets the LaunchTemplate field's value.
  10035. func (s *MixedInstancesPolicy) SetLaunchTemplate(v *LaunchTemplate) *MixedInstancesPolicy {
  10036. s.LaunchTemplate = v
  10037. return s
  10038. }
  10039. // Describes a notification.
  10040. type NotificationConfiguration struct {
  10041. _ struct{} `type:"structure"`
  10042. // The name of the Auto Scaling group.
  10043. AutoScalingGroupName *string `min:"1" type:"string"`
  10044. // One of the following event notification types:
  10045. //
  10046. // * autoscaling:EC2_INSTANCE_LAUNCH
  10047. //
  10048. // * autoscaling:EC2_INSTANCE_LAUNCH_ERROR
  10049. //
  10050. // * autoscaling:EC2_INSTANCE_TERMINATE
  10051. //
  10052. // * autoscaling:EC2_INSTANCE_TERMINATE_ERROR
  10053. //
  10054. // * autoscaling:TEST_NOTIFICATION
  10055. NotificationType *string `min:"1" type:"string"`
  10056. // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service
  10057. // (Amazon SNS) topic.
  10058. TopicARN *string `min:"1" type:"string"`
  10059. }
  10060. // String returns the string representation
  10061. func (s NotificationConfiguration) String() string {
  10062. return awsutil.Prettify(s)
  10063. }
  10064. // GoString returns the string representation
  10065. func (s NotificationConfiguration) GoString() string {
  10066. return s.String()
  10067. }
  10068. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  10069. func (s *NotificationConfiguration) SetAutoScalingGroupName(v string) *NotificationConfiguration {
  10070. s.AutoScalingGroupName = &v
  10071. return s
  10072. }
  10073. // SetNotificationType sets the NotificationType field's value.
  10074. func (s *NotificationConfiguration) SetNotificationType(v string) *NotificationConfiguration {
  10075. s.NotificationType = &v
  10076. return s
  10077. }
  10078. // SetTopicARN sets the TopicARN field's value.
  10079. func (s *NotificationConfiguration) SetTopicARN(v string) *NotificationConfiguration {
  10080. s.TopicARN = &v
  10081. return s
  10082. }
  10083. // Represents a predefined metric for a target tracking scaling policy to use
  10084. // with Amazon EC2 Auto Scaling.
  10085. type PredefinedMetricSpecification struct {
  10086. _ struct{} `type:"structure"`
  10087. // The metric type. The following predefined metrics are available:
  10088. //
  10089. // * ASGAverageCPUUtilization - Average CPU utilization of the Auto Scaling
  10090. // group.
  10091. //
  10092. // * ASGAverageNetworkIn - Average number of bytes received on all network
  10093. // interfaces by the Auto Scaling group.
  10094. //
  10095. // * ASGAverageNetworkOut - Average number of bytes sent out on all network
  10096. // interfaces by the Auto Scaling group.
  10097. //
  10098. // * ALBRequestCountPerTarget - Number of requests completed per target in
  10099. // an Application Load Balancer target group.
  10100. //
  10101. // PredefinedMetricType is a required field
  10102. PredefinedMetricType *string `type:"string" required:"true" enum:"MetricType"`
  10103. // Identifies the resource associated with the metric type. You can't specify
  10104. // a resource label unless the metric type is ALBRequestCountPerTarget and there
  10105. // is a target group attached to the Auto Scaling group.
  10106. //
  10107. // The format is app/load-balancer-name/load-balancer-id/targetgroup/target-group-name/target-group-id
  10108. // , where
  10109. //
  10110. // * app/load-balancer-name/load-balancer-id is the final portion of the
  10111. // load balancer ARN, and
  10112. //
  10113. // * targetgroup/target-group-name/target-group-id is the final portion of
  10114. // the target group ARN.
  10115. ResourceLabel *string `min:"1" type:"string"`
  10116. }
  10117. // String returns the string representation
  10118. func (s PredefinedMetricSpecification) String() string {
  10119. return awsutil.Prettify(s)
  10120. }
  10121. // GoString returns the string representation
  10122. func (s PredefinedMetricSpecification) GoString() string {
  10123. return s.String()
  10124. }
  10125. // Validate inspects the fields of the type to determine if they are valid.
  10126. func (s *PredefinedMetricSpecification) Validate() error {
  10127. invalidParams := request.ErrInvalidParams{Context: "PredefinedMetricSpecification"}
  10128. if s.PredefinedMetricType == nil {
  10129. invalidParams.Add(request.NewErrParamRequired("PredefinedMetricType"))
  10130. }
  10131. if s.ResourceLabel != nil && len(*s.ResourceLabel) < 1 {
  10132. invalidParams.Add(request.NewErrParamMinLen("ResourceLabel", 1))
  10133. }
  10134. if invalidParams.Len() > 0 {
  10135. return invalidParams
  10136. }
  10137. return nil
  10138. }
  10139. // SetPredefinedMetricType sets the PredefinedMetricType field's value.
  10140. func (s *PredefinedMetricSpecification) SetPredefinedMetricType(v string) *PredefinedMetricSpecification {
  10141. s.PredefinedMetricType = &v
  10142. return s
  10143. }
  10144. // SetResourceLabel sets the ResourceLabel field's value.
  10145. func (s *PredefinedMetricSpecification) SetResourceLabel(v string) *PredefinedMetricSpecification {
  10146. s.ResourceLabel = &v
  10147. return s
  10148. }
  10149. // Describes a process type.
  10150. //
  10151. // For more information, see Scaling Processes (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html#process-types)
  10152. // in the Amazon EC2 Auto Scaling User Guide.
  10153. type ProcessType struct {
  10154. _ struct{} `type:"structure"`
  10155. // One of the following processes:
  10156. //
  10157. // * Launch
  10158. //
  10159. // * Terminate
  10160. //
  10161. // * AddToLoadBalancer
  10162. //
  10163. // * AlarmNotification
  10164. //
  10165. // * AZRebalance
  10166. //
  10167. // * HealthCheck
  10168. //
  10169. // * ReplaceUnhealthy
  10170. //
  10171. // * ScheduledActions
  10172. //
  10173. // ProcessName is a required field
  10174. ProcessName *string `min:"1" type:"string" required:"true"`
  10175. }
  10176. // String returns the string representation
  10177. func (s ProcessType) String() string {
  10178. return awsutil.Prettify(s)
  10179. }
  10180. // GoString returns the string representation
  10181. func (s ProcessType) GoString() string {
  10182. return s.String()
  10183. }
  10184. // SetProcessName sets the ProcessName field's value.
  10185. func (s *ProcessType) SetProcessName(v string) *ProcessType {
  10186. s.ProcessName = &v
  10187. return s
  10188. }
  10189. type PutLifecycleHookInput struct {
  10190. _ struct{} `type:"structure"`
  10191. // The name of the Auto Scaling group.
  10192. //
  10193. // AutoScalingGroupName is a required field
  10194. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  10195. // Defines the action the Auto Scaling group should take when the lifecycle
  10196. // hook timeout elapses or if an unexpected failure occurs. This parameter can
  10197. // be either CONTINUE or ABANDON. The default value is ABANDON.
  10198. DefaultResult *string `type:"string"`
  10199. // The maximum time, in seconds, that can elapse before the lifecycle hook times
  10200. // out. The range is from 30 to 7200 seconds. The default value is 3600 seconds
  10201. // (1 hour).
  10202. //
  10203. // If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the action
  10204. // that you specified in the DefaultResult parameter. You can prevent the lifecycle
  10205. // hook from timing out by calling RecordLifecycleActionHeartbeat.
  10206. HeartbeatTimeout *int64 `type:"integer"`
  10207. // The name of the lifecycle hook.
  10208. //
  10209. // LifecycleHookName is a required field
  10210. LifecycleHookName *string `min:"1" type:"string" required:"true"`
  10211. // The instance state to which you want to attach the lifecycle hook. The valid
  10212. // values are:
  10213. //
  10214. // * autoscaling:EC2_INSTANCE_LAUNCHING
  10215. //
  10216. // * autoscaling:EC2_INSTANCE_TERMINATING
  10217. //
  10218. // Conditional: This parameter is required for new lifecycle hooks, but optional
  10219. // when updating existing hooks.
  10220. LifecycleTransition *string `type:"string"`
  10221. // Additional information that you want to include any time Amazon EC2 Auto
  10222. // Scaling sends a message to the notification target.
  10223. NotificationMetadata *string `min:"1" type:"string"`
  10224. // The ARN of the notification target that Amazon EC2 Auto Scaling uses to notify
  10225. // you when an instance is in the transition state for the lifecycle hook. This
  10226. // target can be either an SQS queue or an SNS topic.
  10227. //
  10228. // If you specify an empty string, this overrides the current ARN.
  10229. //
  10230. // This operation uses the JSON format when sending notifications to an Amazon
  10231. // SQS queue, and an email key-value pair format when sending notifications
  10232. // to an Amazon SNS topic.
  10233. //
  10234. // When you specify a notification target, Amazon EC2 Auto Scaling sends it
  10235. // a test message. Test messages contain the following additional key-value
  10236. // pair: "Event": "autoscaling:TEST_NOTIFICATION".
  10237. NotificationTargetARN *string `type:"string"`
  10238. // The ARN of the IAM role that allows the Auto Scaling group to publish to
  10239. // the specified notification target, for example, an Amazon SNS topic or an
  10240. // Amazon SQS queue.
  10241. //
  10242. // Conditional: This parameter is required for new lifecycle hooks, but optional
  10243. // when updating existing hooks.
  10244. RoleARN *string `min:"1" type:"string"`
  10245. }
  10246. // String returns the string representation
  10247. func (s PutLifecycleHookInput) String() string {
  10248. return awsutil.Prettify(s)
  10249. }
  10250. // GoString returns the string representation
  10251. func (s PutLifecycleHookInput) GoString() string {
  10252. return s.String()
  10253. }
  10254. // Validate inspects the fields of the type to determine if they are valid.
  10255. func (s *PutLifecycleHookInput) Validate() error {
  10256. invalidParams := request.ErrInvalidParams{Context: "PutLifecycleHookInput"}
  10257. if s.AutoScalingGroupName == nil {
  10258. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  10259. }
  10260. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  10261. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  10262. }
  10263. if s.LifecycleHookName == nil {
  10264. invalidParams.Add(request.NewErrParamRequired("LifecycleHookName"))
  10265. }
  10266. if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 {
  10267. invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1))
  10268. }
  10269. if s.NotificationMetadata != nil && len(*s.NotificationMetadata) < 1 {
  10270. invalidParams.Add(request.NewErrParamMinLen("NotificationMetadata", 1))
  10271. }
  10272. if s.RoleARN != nil && len(*s.RoleARN) < 1 {
  10273. invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1))
  10274. }
  10275. if invalidParams.Len() > 0 {
  10276. return invalidParams
  10277. }
  10278. return nil
  10279. }
  10280. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  10281. func (s *PutLifecycleHookInput) SetAutoScalingGroupName(v string) *PutLifecycleHookInput {
  10282. s.AutoScalingGroupName = &v
  10283. return s
  10284. }
  10285. // SetDefaultResult sets the DefaultResult field's value.
  10286. func (s *PutLifecycleHookInput) SetDefaultResult(v string) *PutLifecycleHookInput {
  10287. s.DefaultResult = &v
  10288. return s
  10289. }
  10290. // SetHeartbeatTimeout sets the HeartbeatTimeout field's value.
  10291. func (s *PutLifecycleHookInput) SetHeartbeatTimeout(v int64) *PutLifecycleHookInput {
  10292. s.HeartbeatTimeout = &v
  10293. return s
  10294. }
  10295. // SetLifecycleHookName sets the LifecycleHookName field's value.
  10296. func (s *PutLifecycleHookInput) SetLifecycleHookName(v string) *PutLifecycleHookInput {
  10297. s.LifecycleHookName = &v
  10298. return s
  10299. }
  10300. // SetLifecycleTransition sets the LifecycleTransition field's value.
  10301. func (s *PutLifecycleHookInput) SetLifecycleTransition(v string) *PutLifecycleHookInput {
  10302. s.LifecycleTransition = &v
  10303. return s
  10304. }
  10305. // SetNotificationMetadata sets the NotificationMetadata field's value.
  10306. func (s *PutLifecycleHookInput) SetNotificationMetadata(v string) *PutLifecycleHookInput {
  10307. s.NotificationMetadata = &v
  10308. return s
  10309. }
  10310. // SetNotificationTargetARN sets the NotificationTargetARN field's value.
  10311. func (s *PutLifecycleHookInput) SetNotificationTargetARN(v string) *PutLifecycleHookInput {
  10312. s.NotificationTargetARN = &v
  10313. return s
  10314. }
  10315. // SetRoleARN sets the RoleARN field's value.
  10316. func (s *PutLifecycleHookInput) SetRoleARN(v string) *PutLifecycleHookInput {
  10317. s.RoleARN = &v
  10318. return s
  10319. }
  10320. type PutLifecycleHookOutput struct {
  10321. _ struct{} `type:"structure"`
  10322. }
  10323. // String returns the string representation
  10324. func (s PutLifecycleHookOutput) String() string {
  10325. return awsutil.Prettify(s)
  10326. }
  10327. // GoString returns the string representation
  10328. func (s PutLifecycleHookOutput) GoString() string {
  10329. return s.String()
  10330. }
  10331. type PutNotificationConfigurationInput struct {
  10332. _ struct{} `type:"structure"`
  10333. // The name of the Auto Scaling group.
  10334. //
  10335. // AutoScalingGroupName is a required field
  10336. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  10337. // The type of event that causes the notification to be sent. For more information
  10338. // about notification types supported by Amazon EC2 Auto Scaling, see DescribeAutoScalingNotificationTypes.
  10339. //
  10340. // NotificationTypes is a required field
  10341. NotificationTypes []*string `type:"list" required:"true"`
  10342. // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service
  10343. // (Amazon SNS) topic.
  10344. //
  10345. // TopicARN is a required field
  10346. TopicARN *string `min:"1" type:"string" required:"true"`
  10347. }
  10348. // String returns the string representation
  10349. func (s PutNotificationConfigurationInput) String() string {
  10350. return awsutil.Prettify(s)
  10351. }
  10352. // GoString returns the string representation
  10353. func (s PutNotificationConfigurationInput) GoString() string {
  10354. return s.String()
  10355. }
  10356. // Validate inspects the fields of the type to determine if they are valid.
  10357. func (s *PutNotificationConfigurationInput) Validate() error {
  10358. invalidParams := request.ErrInvalidParams{Context: "PutNotificationConfigurationInput"}
  10359. if s.AutoScalingGroupName == nil {
  10360. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  10361. }
  10362. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  10363. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  10364. }
  10365. if s.NotificationTypes == nil {
  10366. invalidParams.Add(request.NewErrParamRequired("NotificationTypes"))
  10367. }
  10368. if s.TopicARN == nil {
  10369. invalidParams.Add(request.NewErrParamRequired("TopicARN"))
  10370. }
  10371. if s.TopicARN != nil && len(*s.TopicARN) < 1 {
  10372. invalidParams.Add(request.NewErrParamMinLen("TopicARN", 1))
  10373. }
  10374. if invalidParams.Len() > 0 {
  10375. return invalidParams
  10376. }
  10377. return nil
  10378. }
  10379. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  10380. func (s *PutNotificationConfigurationInput) SetAutoScalingGroupName(v string) *PutNotificationConfigurationInput {
  10381. s.AutoScalingGroupName = &v
  10382. return s
  10383. }
  10384. // SetNotificationTypes sets the NotificationTypes field's value.
  10385. func (s *PutNotificationConfigurationInput) SetNotificationTypes(v []*string) *PutNotificationConfigurationInput {
  10386. s.NotificationTypes = v
  10387. return s
  10388. }
  10389. // SetTopicARN sets the TopicARN field's value.
  10390. func (s *PutNotificationConfigurationInput) SetTopicARN(v string) *PutNotificationConfigurationInput {
  10391. s.TopicARN = &v
  10392. return s
  10393. }
  10394. type PutNotificationConfigurationOutput struct {
  10395. _ struct{} `type:"structure"`
  10396. }
  10397. // String returns the string representation
  10398. func (s PutNotificationConfigurationOutput) String() string {
  10399. return awsutil.Prettify(s)
  10400. }
  10401. // GoString returns the string representation
  10402. func (s PutNotificationConfigurationOutput) GoString() string {
  10403. return s.String()
  10404. }
  10405. type PutScalingPolicyInput struct {
  10406. _ struct{} `type:"structure"`
  10407. // Specifies whether the ScalingAdjustment parameter is an absolute number or
  10408. // a percentage of the current capacity. The valid values are ChangeInCapacity,
  10409. // ExactCapacity, and PercentChangeInCapacity.
  10410. //
  10411. // Valid only if the policy type is StepScaling or SimpleScaling. For more information,
  10412. // see Scaling Adjustment Types (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-adjustment)
  10413. // in the Amazon EC2 Auto Scaling User Guide.
  10414. AdjustmentType *string `min:"1" type:"string"`
  10415. // The name of the Auto Scaling group.
  10416. //
  10417. // AutoScalingGroupName is a required field
  10418. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  10419. // The amount of time, in seconds, after a scaling activity completes before
  10420. // any further dynamic scaling activities can start. If this parameter is not
  10421. // specified, the default cooldown period for the group applies.
  10422. //
  10423. // Valid only if the policy type is SimpleScaling. For more information, see
  10424. // Scaling Cooldowns (https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html)
  10425. // in the Amazon EC2 Auto Scaling User Guide.
  10426. Cooldown *int64 `type:"integer"`
  10427. // The estimated time, in seconds, until a newly launched instance can contribute
  10428. // to the CloudWatch metrics. The default is to use the value specified for
  10429. // the default cooldown period for the group.
  10430. //
  10431. // Valid only if the policy type is StepScaling or TargetTrackingScaling.
  10432. EstimatedInstanceWarmup *int64 `type:"integer"`
  10433. // The aggregation type for the CloudWatch metrics. The valid values are Minimum,
  10434. // Maximum, and Average. If the aggregation type is null, the value is treated
  10435. // as Average.
  10436. //
  10437. // Valid only if the policy type is StepScaling.
  10438. MetricAggregationType *string `min:"1" type:"string"`
  10439. // The minimum number of instances to scale. If the value of AdjustmentType
  10440. // is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity
  10441. // of the Auto Scaling group by at least this many instances. Otherwise, the
  10442. // error is ValidationError.
  10443. //
  10444. // This property replaces the MinAdjustmentStep property. For example, suppose
  10445. // that you create a step scaling policy to scale out an Auto Scaling group
  10446. // by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group
  10447. // has 4 instances and the scaling policy is performed, 25 percent of 4 is 1.
  10448. // However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2
  10449. // Auto Scaling scales out the group by 2 instances.
  10450. //
  10451. // Valid only if the policy type is SimpleScaling or StepScaling.
  10452. MinAdjustmentMagnitude *int64 `type:"integer"`
  10453. // Available for backward compatibility. Use MinAdjustmentMagnitude instead.
  10454. MinAdjustmentStep *int64 `deprecated:"true" type:"integer"`
  10455. // The name of the policy.
  10456. //
  10457. // PolicyName is a required field
  10458. PolicyName *string `min:"1" type:"string" required:"true"`
  10459. // The policy type. The valid values are SimpleScaling, StepScaling, and TargetTrackingScaling.
  10460. // If the policy type is null, the value is treated as SimpleScaling.
  10461. PolicyType *string `min:"1" type:"string"`
  10462. // The amount by which a simple scaling policy scales the Auto Scaling group
  10463. // in response to an alarm breach. The adjustment is based on the value that
  10464. // you specified in the AdjustmentType parameter (either an absolute number
  10465. // or a percentage). A positive value adds to the current capacity and a negative
  10466. // value subtracts from the current capacity. For exact capacity, you must specify
  10467. // a positive value.
  10468. //
  10469. // Conditional: If you specify SimpleScaling for the policy type, you must specify
  10470. // this parameter. (Not used with any other policy type.)
  10471. ScalingAdjustment *int64 `type:"integer"`
  10472. // A set of adjustments that enable you to scale based on the size of the alarm
  10473. // breach.
  10474. //
  10475. // Conditional: If you specify StepScaling for the policy type, you must specify
  10476. // this parameter. (Not used with any other policy type.)
  10477. StepAdjustments []*StepAdjustment `type:"list"`
  10478. // A target tracking scaling policy. Includes support for predefined or customized
  10479. // metrics.
  10480. //
  10481. // For more information, see TargetTrackingConfiguration (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_TargetTrackingConfiguration.html)
  10482. // in the Amazon EC2 Auto Scaling API Reference.
  10483. //
  10484. // Conditional: If you specify TargetTrackingScaling for the policy type, you
  10485. // must specify this parameter. (Not used with any other policy type.)
  10486. TargetTrackingConfiguration *TargetTrackingConfiguration `type:"structure"`
  10487. }
  10488. // String returns the string representation
  10489. func (s PutScalingPolicyInput) String() string {
  10490. return awsutil.Prettify(s)
  10491. }
  10492. // GoString returns the string representation
  10493. func (s PutScalingPolicyInput) GoString() string {
  10494. return s.String()
  10495. }
  10496. // Validate inspects the fields of the type to determine if they are valid.
  10497. func (s *PutScalingPolicyInput) Validate() error {
  10498. invalidParams := request.ErrInvalidParams{Context: "PutScalingPolicyInput"}
  10499. if s.AdjustmentType != nil && len(*s.AdjustmentType) < 1 {
  10500. invalidParams.Add(request.NewErrParamMinLen("AdjustmentType", 1))
  10501. }
  10502. if s.AutoScalingGroupName == nil {
  10503. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  10504. }
  10505. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  10506. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  10507. }
  10508. if s.MetricAggregationType != nil && len(*s.MetricAggregationType) < 1 {
  10509. invalidParams.Add(request.NewErrParamMinLen("MetricAggregationType", 1))
  10510. }
  10511. if s.PolicyName == nil {
  10512. invalidParams.Add(request.NewErrParamRequired("PolicyName"))
  10513. }
  10514. if s.PolicyName != nil && len(*s.PolicyName) < 1 {
  10515. invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
  10516. }
  10517. if s.PolicyType != nil && len(*s.PolicyType) < 1 {
  10518. invalidParams.Add(request.NewErrParamMinLen("PolicyType", 1))
  10519. }
  10520. if s.StepAdjustments != nil {
  10521. for i, v := range s.StepAdjustments {
  10522. if v == nil {
  10523. continue
  10524. }
  10525. if err := v.Validate(); err != nil {
  10526. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "StepAdjustments", i), err.(request.ErrInvalidParams))
  10527. }
  10528. }
  10529. }
  10530. if s.TargetTrackingConfiguration != nil {
  10531. if err := s.TargetTrackingConfiguration.Validate(); err != nil {
  10532. invalidParams.AddNested("TargetTrackingConfiguration", err.(request.ErrInvalidParams))
  10533. }
  10534. }
  10535. if invalidParams.Len() > 0 {
  10536. return invalidParams
  10537. }
  10538. return nil
  10539. }
  10540. // SetAdjustmentType sets the AdjustmentType field's value.
  10541. func (s *PutScalingPolicyInput) SetAdjustmentType(v string) *PutScalingPolicyInput {
  10542. s.AdjustmentType = &v
  10543. return s
  10544. }
  10545. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  10546. func (s *PutScalingPolicyInput) SetAutoScalingGroupName(v string) *PutScalingPolicyInput {
  10547. s.AutoScalingGroupName = &v
  10548. return s
  10549. }
  10550. // SetCooldown sets the Cooldown field's value.
  10551. func (s *PutScalingPolicyInput) SetCooldown(v int64) *PutScalingPolicyInput {
  10552. s.Cooldown = &v
  10553. return s
  10554. }
  10555. // SetEstimatedInstanceWarmup sets the EstimatedInstanceWarmup field's value.
  10556. func (s *PutScalingPolicyInput) SetEstimatedInstanceWarmup(v int64) *PutScalingPolicyInput {
  10557. s.EstimatedInstanceWarmup = &v
  10558. return s
  10559. }
  10560. // SetMetricAggregationType sets the MetricAggregationType field's value.
  10561. func (s *PutScalingPolicyInput) SetMetricAggregationType(v string) *PutScalingPolicyInput {
  10562. s.MetricAggregationType = &v
  10563. return s
  10564. }
  10565. // SetMinAdjustmentMagnitude sets the MinAdjustmentMagnitude field's value.
  10566. func (s *PutScalingPolicyInput) SetMinAdjustmentMagnitude(v int64) *PutScalingPolicyInput {
  10567. s.MinAdjustmentMagnitude = &v
  10568. return s
  10569. }
  10570. // SetMinAdjustmentStep sets the MinAdjustmentStep field's value.
  10571. func (s *PutScalingPolicyInput) SetMinAdjustmentStep(v int64) *PutScalingPolicyInput {
  10572. s.MinAdjustmentStep = &v
  10573. return s
  10574. }
  10575. // SetPolicyName sets the PolicyName field's value.
  10576. func (s *PutScalingPolicyInput) SetPolicyName(v string) *PutScalingPolicyInput {
  10577. s.PolicyName = &v
  10578. return s
  10579. }
  10580. // SetPolicyType sets the PolicyType field's value.
  10581. func (s *PutScalingPolicyInput) SetPolicyType(v string) *PutScalingPolicyInput {
  10582. s.PolicyType = &v
  10583. return s
  10584. }
  10585. // SetScalingAdjustment sets the ScalingAdjustment field's value.
  10586. func (s *PutScalingPolicyInput) SetScalingAdjustment(v int64) *PutScalingPolicyInput {
  10587. s.ScalingAdjustment = &v
  10588. return s
  10589. }
  10590. // SetStepAdjustments sets the StepAdjustments field's value.
  10591. func (s *PutScalingPolicyInput) SetStepAdjustments(v []*StepAdjustment) *PutScalingPolicyInput {
  10592. s.StepAdjustments = v
  10593. return s
  10594. }
  10595. // SetTargetTrackingConfiguration sets the TargetTrackingConfiguration field's value.
  10596. func (s *PutScalingPolicyInput) SetTargetTrackingConfiguration(v *TargetTrackingConfiguration) *PutScalingPolicyInput {
  10597. s.TargetTrackingConfiguration = v
  10598. return s
  10599. }
  10600. // Contains the output of PutScalingPolicy.
  10601. type PutScalingPolicyOutput struct {
  10602. _ struct{} `type:"structure"`
  10603. // The CloudWatch alarms created for the target tracking scaling policy.
  10604. Alarms []*Alarm `type:"list"`
  10605. // The Amazon Resource Name (ARN) of the policy.
  10606. PolicyARN *string `min:"1" type:"string"`
  10607. }
  10608. // String returns the string representation
  10609. func (s PutScalingPolicyOutput) String() string {
  10610. return awsutil.Prettify(s)
  10611. }
  10612. // GoString returns the string representation
  10613. func (s PutScalingPolicyOutput) GoString() string {
  10614. return s.String()
  10615. }
  10616. // SetAlarms sets the Alarms field's value.
  10617. func (s *PutScalingPolicyOutput) SetAlarms(v []*Alarm) *PutScalingPolicyOutput {
  10618. s.Alarms = v
  10619. return s
  10620. }
  10621. // SetPolicyARN sets the PolicyARN field's value.
  10622. func (s *PutScalingPolicyOutput) SetPolicyARN(v string) *PutScalingPolicyOutput {
  10623. s.PolicyARN = &v
  10624. return s
  10625. }
  10626. type PutScheduledUpdateGroupActionInput struct {
  10627. _ struct{} `type:"structure"`
  10628. // The name of the Auto Scaling group.
  10629. //
  10630. // AutoScalingGroupName is a required field
  10631. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  10632. // The number of EC2 instances that should be running in the Auto Scaling group.
  10633. DesiredCapacity *int64 `type:"integer"`
  10634. // The date and time for the recurring schedule to end. Amazon EC2 Auto Scaling
  10635. // does not perform the action after this time.
  10636. EndTime *time.Time `type:"timestamp"`
  10637. // The maximum number of instances in the Auto Scaling group.
  10638. MaxSize *int64 `type:"integer"`
  10639. // The minimum number of instances in the Auto Scaling group.
  10640. MinSize *int64 `type:"integer"`
  10641. // The recurring schedule for this action, in Unix cron syntax format. This
  10642. // format consists of five fields separated by white spaces: [Minute] [Hour]
  10643. // [Day_of_Month] [Month_of_Year] [Day_of_Week]. The value must be in quotes
  10644. // (for example, "30 0 1 1,6,12 *"). For more information about this format,
  10645. // see Crontab (http://crontab.org).
  10646. //
  10647. // When StartTime and EndTime are specified with Recurrence, they form the boundaries
  10648. // of when the recurring action starts and stops.
  10649. Recurrence *string `min:"1" type:"string"`
  10650. // The name of this scaling action.
  10651. //
  10652. // ScheduledActionName is a required field
  10653. ScheduledActionName *string `min:"1" type:"string" required:"true"`
  10654. // The date and time for this action to start, in YYYY-MM-DDThh:mm:ssZ format
  10655. // in UTC/GMT only and in quotes (for example, "2019-06-01T00:00:00Z").
  10656. //
  10657. // If you specify Recurrence and StartTime, Amazon EC2 Auto Scaling performs
  10658. // the action at this time, and then performs the action based on the specified
  10659. // recurrence.
  10660. //
  10661. // If you try to schedule your action in the past, Amazon EC2 Auto Scaling returns
  10662. // an error message.
  10663. StartTime *time.Time `type:"timestamp"`
  10664. // This parameter is no longer used.
  10665. Time *time.Time `type:"timestamp"`
  10666. }
  10667. // String returns the string representation
  10668. func (s PutScheduledUpdateGroupActionInput) String() string {
  10669. return awsutil.Prettify(s)
  10670. }
  10671. // GoString returns the string representation
  10672. func (s PutScheduledUpdateGroupActionInput) GoString() string {
  10673. return s.String()
  10674. }
  10675. // Validate inspects the fields of the type to determine if they are valid.
  10676. func (s *PutScheduledUpdateGroupActionInput) Validate() error {
  10677. invalidParams := request.ErrInvalidParams{Context: "PutScheduledUpdateGroupActionInput"}
  10678. if s.AutoScalingGroupName == nil {
  10679. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  10680. }
  10681. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  10682. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  10683. }
  10684. if s.Recurrence != nil && len(*s.Recurrence) < 1 {
  10685. invalidParams.Add(request.NewErrParamMinLen("Recurrence", 1))
  10686. }
  10687. if s.ScheduledActionName == nil {
  10688. invalidParams.Add(request.NewErrParamRequired("ScheduledActionName"))
  10689. }
  10690. if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 {
  10691. invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1))
  10692. }
  10693. if invalidParams.Len() > 0 {
  10694. return invalidParams
  10695. }
  10696. return nil
  10697. }
  10698. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  10699. func (s *PutScheduledUpdateGroupActionInput) SetAutoScalingGroupName(v string) *PutScheduledUpdateGroupActionInput {
  10700. s.AutoScalingGroupName = &v
  10701. return s
  10702. }
  10703. // SetDesiredCapacity sets the DesiredCapacity field's value.
  10704. func (s *PutScheduledUpdateGroupActionInput) SetDesiredCapacity(v int64) *PutScheduledUpdateGroupActionInput {
  10705. s.DesiredCapacity = &v
  10706. return s
  10707. }
  10708. // SetEndTime sets the EndTime field's value.
  10709. func (s *PutScheduledUpdateGroupActionInput) SetEndTime(v time.Time) *PutScheduledUpdateGroupActionInput {
  10710. s.EndTime = &v
  10711. return s
  10712. }
  10713. // SetMaxSize sets the MaxSize field's value.
  10714. func (s *PutScheduledUpdateGroupActionInput) SetMaxSize(v int64) *PutScheduledUpdateGroupActionInput {
  10715. s.MaxSize = &v
  10716. return s
  10717. }
  10718. // SetMinSize sets the MinSize field's value.
  10719. func (s *PutScheduledUpdateGroupActionInput) SetMinSize(v int64) *PutScheduledUpdateGroupActionInput {
  10720. s.MinSize = &v
  10721. return s
  10722. }
  10723. // SetRecurrence sets the Recurrence field's value.
  10724. func (s *PutScheduledUpdateGroupActionInput) SetRecurrence(v string) *PutScheduledUpdateGroupActionInput {
  10725. s.Recurrence = &v
  10726. return s
  10727. }
  10728. // SetScheduledActionName sets the ScheduledActionName field's value.
  10729. func (s *PutScheduledUpdateGroupActionInput) SetScheduledActionName(v string) *PutScheduledUpdateGroupActionInput {
  10730. s.ScheduledActionName = &v
  10731. return s
  10732. }
  10733. // SetStartTime sets the StartTime field's value.
  10734. func (s *PutScheduledUpdateGroupActionInput) SetStartTime(v time.Time) *PutScheduledUpdateGroupActionInput {
  10735. s.StartTime = &v
  10736. return s
  10737. }
  10738. // SetTime sets the Time field's value.
  10739. func (s *PutScheduledUpdateGroupActionInput) SetTime(v time.Time) *PutScheduledUpdateGroupActionInput {
  10740. s.Time = &v
  10741. return s
  10742. }
  10743. type PutScheduledUpdateGroupActionOutput struct {
  10744. _ struct{} `type:"structure"`
  10745. }
  10746. // String returns the string representation
  10747. func (s PutScheduledUpdateGroupActionOutput) String() string {
  10748. return awsutil.Prettify(s)
  10749. }
  10750. // GoString returns the string representation
  10751. func (s PutScheduledUpdateGroupActionOutput) GoString() string {
  10752. return s.String()
  10753. }
  10754. type RecordLifecycleActionHeartbeatInput struct {
  10755. _ struct{} `type:"structure"`
  10756. // The name of the Auto Scaling group.
  10757. //
  10758. // AutoScalingGroupName is a required field
  10759. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  10760. // The ID of the instance.
  10761. InstanceId *string `min:"1" type:"string"`
  10762. // A token that uniquely identifies a specific lifecycle action associated with
  10763. // an instance. Amazon EC2 Auto Scaling sends this token to the notification
  10764. // target that you specified when you created the lifecycle hook.
  10765. LifecycleActionToken *string `min:"36" type:"string"`
  10766. // The name of the lifecycle hook.
  10767. //
  10768. // LifecycleHookName is a required field
  10769. LifecycleHookName *string `min:"1" type:"string" required:"true"`
  10770. }
  10771. // String returns the string representation
  10772. func (s RecordLifecycleActionHeartbeatInput) String() string {
  10773. return awsutil.Prettify(s)
  10774. }
  10775. // GoString returns the string representation
  10776. func (s RecordLifecycleActionHeartbeatInput) GoString() string {
  10777. return s.String()
  10778. }
  10779. // Validate inspects the fields of the type to determine if they are valid.
  10780. func (s *RecordLifecycleActionHeartbeatInput) Validate() error {
  10781. invalidParams := request.ErrInvalidParams{Context: "RecordLifecycleActionHeartbeatInput"}
  10782. if s.AutoScalingGroupName == nil {
  10783. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  10784. }
  10785. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  10786. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  10787. }
  10788. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  10789. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  10790. }
  10791. if s.LifecycleActionToken != nil && len(*s.LifecycleActionToken) < 36 {
  10792. invalidParams.Add(request.NewErrParamMinLen("LifecycleActionToken", 36))
  10793. }
  10794. if s.LifecycleHookName == nil {
  10795. invalidParams.Add(request.NewErrParamRequired("LifecycleHookName"))
  10796. }
  10797. if s.LifecycleHookName != nil && len(*s.LifecycleHookName) < 1 {
  10798. invalidParams.Add(request.NewErrParamMinLen("LifecycleHookName", 1))
  10799. }
  10800. if invalidParams.Len() > 0 {
  10801. return invalidParams
  10802. }
  10803. return nil
  10804. }
  10805. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  10806. func (s *RecordLifecycleActionHeartbeatInput) SetAutoScalingGroupName(v string) *RecordLifecycleActionHeartbeatInput {
  10807. s.AutoScalingGroupName = &v
  10808. return s
  10809. }
  10810. // SetInstanceId sets the InstanceId field's value.
  10811. func (s *RecordLifecycleActionHeartbeatInput) SetInstanceId(v string) *RecordLifecycleActionHeartbeatInput {
  10812. s.InstanceId = &v
  10813. return s
  10814. }
  10815. // SetLifecycleActionToken sets the LifecycleActionToken field's value.
  10816. func (s *RecordLifecycleActionHeartbeatInput) SetLifecycleActionToken(v string) *RecordLifecycleActionHeartbeatInput {
  10817. s.LifecycleActionToken = &v
  10818. return s
  10819. }
  10820. // SetLifecycleHookName sets the LifecycleHookName field's value.
  10821. func (s *RecordLifecycleActionHeartbeatInput) SetLifecycleHookName(v string) *RecordLifecycleActionHeartbeatInput {
  10822. s.LifecycleHookName = &v
  10823. return s
  10824. }
  10825. type RecordLifecycleActionHeartbeatOutput struct {
  10826. _ struct{} `type:"structure"`
  10827. }
  10828. // String returns the string representation
  10829. func (s RecordLifecycleActionHeartbeatOutput) String() string {
  10830. return awsutil.Prettify(s)
  10831. }
  10832. // GoString returns the string representation
  10833. func (s RecordLifecycleActionHeartbeatOutput) GoString() string {
  10834. return s.String()
  10835. }
  10836. type ResumeProcessesOutput struct {
  10837. _ struct{} `type:"structure"`
  10838. }
  10839. // String returns the string representation
  10840. func (s ResumeProcessesOutput) String() string {
  10841. return awsutil.Prettify(s)
  10842. }
  10843. // GoString returns the string representation
  10844. func (s ResumeProcessesOutput) GoString() string {
  10845. return s.String()
  10846. }
  10847. // Describes a scaling policy.
  10848. type ScalingPolicy struct {
  10849. _ struct{} `type:"structure"`
  10850. // The adjustment type, which specifies how ScalingAdjustment is interpreted.
  10851. // The valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
  10852. AdjustmentType *string `min:"1" type:"string"`
  10853. // The CloudWatch alarms related to the policy.
  10854. Alarms []*Alarm `type:"list"`
  10855. // The name of the Auto Scaling group.
  10856. AutoScalingGroupName *string `min:"1" type:"string"`
  10857. // The amount of time, in seconds, after a scaling activity completes before
  10858. // any further dynamic scaling activities can start.
  10859. Cooldown *int64 `type:"integer"`
  10860. // The estimated time, in seconds, until a newly launched instance can contribute
  10861. // to the CloudWatch metrics.
  10862. EstimatedInstanceWarmup *int64 `type:"integer"`
  10863. // The aggregation type for the CloudWatch metrics. The valid values are Minimum,
  10864. // Maximum, and Average.
  10865. MetricAggregationType *string `min:"1" type:"string"`
  10866. // The minimum number of instances to scale. If the value of AdjustmentType
  10867. // is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity
  10868. // of the Auto Scaling group by at least this many instances. Otherwise, the
  10869. // error is ValidationError.
  10870. MinAdjustmentMagnitude *int64 `type:"integer"`
  10871. // Available for backward compatibility. Use MinAdjustmentMagnitude instead.
  10872. MinAdjustmentStep *int64 `deprecated:"true" type:"integer"`
  10873. // The Amazon Resource Name (ARN) of the policy.
  10874. PolicyARN *string `min:"1" type:"string"`
  10875. // The name of the scaling policy.
  10876. PolicyName *string `min:"1" type:"string"`
  10877. // The policy type. The valid values are SimpleScaling, StepScaling, and TargetTrackingScaling.
  10878. PolicyType *string `min:"1" type:"string"`
  10879. // The amount by which to scale, based on the specified adjustment type. A positive
  10880. // value adds to the current capacity while a negative number removes from the
  10881. // current capacity.
  10882. ScalingAdjustment *int64 `type:"integer"`
  10883. // A set of adjustments that enable you to scale based on the size of the alarm
  10884. // breach.
  10885. StepAdjustments []*StepAdjustment `type:"list"`
  10886. // A target tracking scaling policy.
  10887. TargetTrackingConfiguration *TargetTrackingConfiguration `type:"structure"`
  10888. }
  10889. // String returns the string representation
  10890. func (s ScalingPolicy) String() string {
  10891. return awsutil.Prettify(s)
  10892. }
  10893. // GoString returns the string representation
  10894. func (s ScalingPolicy) GoString() string {
  10895. return s.String()
  10896. }
  10897. // SetAdjustmentType sets the AdjustmentType field's value.
  10898. func (s *ScalingPolicy) SetAdjustmentType(v string) *ScalingPolicy {
  10899. s.AdjustmentType = &v
  10900. return s
  10901. }
  10902. // SetAlarms sets the Alarms field's value.
  10903. func (s *ScalingPolicy) SetAlarms(v []*Alarm) *ScalingPolicy {
  10904. s.Alarms = v
  10905. return s
  10906. }
  10907. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  10908. func (s *ScalingPolicy) SetAutoScalingGroupName(v string) *ScalingPolicy {
  10909. s.AutoScalingGroupName = &v
  10910. return s
  10911. }
  10912. // SetCooldown sets the Cooldown field's value.
  10913. func (s *ScalingPolicy) SetCooldown(v int64) *ScalingPolicy {
  10914. s.Cooldown = &v
  10915. return s
  10916. }
  10917. // SetEstimatedInstanceWarmup sets the EstimatedInstanceWarmup field's value.
  10918. func (s *ScalingPolicy) SetEstimatedInstanceWarmup(v int64) *ScalingPolicy {
  10919. s.EstimatedInstanceWarmup = &v
  10920. return s
  10921. }
  10922. // SetMetricAggregationType sets the MetricAggregationType field's value.
  10923. func (s *ScalingPolicy) SetMetricAggregationType(v string) *ScalingPolicy {
  10924. s.MetricAggregationType = &v
  10925. return s
  10926. }
  10927. // SetMinAdjustmentMagnitude sets the MinAdjustmentMagnitude field's value.
  10928. func (s *ScalingPolicy) SetMinAdjustmentMagnitude(v int64) *ScalingPolicy {
  10929. s.MinAdjustmentMagnitude = &v
  10930. return s
  10931. }
  10932. // SetMinAdjustmentStep sets the MinAdjustmentStep field's value.
  10933. func (s *ScalingPolicy) SetMinAdjustmentStep(v int64) *ScalingPolicy {
  10934. s.MinAdjustmentStep = &v
  10935. return s
  10936. }
  10937. // SetPolicyARN sets the PolicyARN field's value.
  10938. func (s *ScalingPolicy) SetPolicyARN(v string) *ScalingPolicy {
  10939. s.PolicyARN = &v
  10940. return s
  10941. }
  10942. // SetPolicyName sets the PolicyName field's value.
  10943. func (s *ScalingPolicy) SetPolicyName(v string) *ScalingPolicy {
  10944. s.PolicyName = &v
  10945. return s
  10946. }
  10947. // SetPolicyType sets the PolicyType field's value.
  10948. func (s *ScalingPolicy) SetPolicyType(v string) *ScalingPolicy {
  10949. s.PolicyType = &v
  10950. return s
  10951. }
  10952. // SetScalingAdjustment sets the ScalingAdjustment field's value.
  10953. func (s *ScalingPolicy) SetScalingAdjustment(v int64) *ScalingPolicy {
  10954. s.ScalingAdjustment = &v
  10955. return s
  10956. }
  10957. // SetStepAdjustments sets the StepAdjustments field's value.
  10958. func (s *ScalingPolicy) SetStepAdjustments(v []*StepAdjustment) *ScalingPolicy {
  10959. s.StepAdjustments = v
  10960. return s
  10961. }
  10962. // SetTargetTrackingConfiguration sets the TargetTrackingConfiguration field's value.
  10963. func (s *ScalingPolicy) SetTargetTrackingConfiguration(v *TargetTrackingConfiguration) *ScalingPolicy {
  10964. s.TargetTrackingConfiguration = v
  10965. return s
  10966. }
  10967. type ScalingProcessQuery struct {
  10968. _ struct{} `type:"structure"`
  10969. // The name of the Auto Scaling group.
  10970. //
  10971. // AutoScalingGroupName is a required field
  10972. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  10973. // One or more of the following processes. If you omit this parameter, all processes
  10974. // are specified.
  10975. //
  10976. // * Launch
  10977. //
  10978. // * Terminate
  10979. //
  10980. // * HealthCheck
  10981. //
  10982. // * ReplaceUnhealthy
  10983. //
  10984. // * AZRebalance
  10985. //
  10986. // * AlarmNotification
  10987. //
  10988. // * ScheduledActions
  10989. //
  10990. // * AddToLoadBalancer
  10991. ScalingProcesses []*string `type:"list"`
  10992. }
  10993. // String returns the string representation
  10994. func (s ScalingProcessQuery) String() string {
  10995. return awsutil.Prettify(s)
  10996. }
  10997. // GoString returns the string representation
  10998. func (s ScalingProcessQuery) GoString() string {
  10999. return s.String()
  11000. }
  11001. // Validate inspects the fields of the type to determine if they are valid.
  11002. func (s *ScalingProcessQuery) Validate() error {
  11003. invalidParams := request.ErrInvalidParams{Context: "ScalingProcessQuery"}
  11004. if s.AutoScalingGroupName == nil {
  11005. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  11006. }
  11007. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  11008. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  11009. }
  11010. if invalidParams.Len() > 0 {
  11011. return invalidParams
  11012. }
  11013. return nil
  11014. }
  11015. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  11016. func (s *ScalingProcessQuery) SetAutoScalingGroupName(v string) *ScalingProcessQuery {
  11017. s.AutoScalingGroupName = &v
  11018. return s
  11019. }
  11020. // SetScalingProcesses sets the ScalingProcesses field's value.
  11021. func (s *ScalingProcessQuery) SetScalingProcesses(v []*string) *ScalingProcessQuery {
  11022. s.ScalingProcesses = v
  11023. return s
  11024. }
  11025. // Describes a scheduled scaling action. Used in response to DescribeScheduledActions.
  11026. type ScheduledUpdateGroupAction struct {
  11027. _ struct{} `type:"structure"`
  11028. // The name of the Auto Scaling group.
  11029. AutoScalingGroupName *string `min:"1" type:"string"`
  11030. // The number of instances you prefer to maintain in the group.
  11031. DesiredCapacity *int64 `type:"integer"`
  11032. // The date and time in UTC for the recurring schedule to end. For example,
  11033. // "2019-06-01T00:00:00Z".
  11034. EndTime *time.Time `type:"timestamp"`
  11035. // The maximum number of instances in the Auto Scaling group.
  11036. MaxSize *int64 `type:"integer"`
  11037. // The minimum number of instances in the Auto Scaling group.
  11038. MinSize *int64 `type:"integer"`
  11039. // The recurring schedule for the action, in Unix cron syntax format.
  11040. //
  11041. // When StartTime and EndTime are specified with Recurrence, they form the boundaries
  11042. // of when the recurring action starts and stops.
  11043. Recurrence *string `min:"1" type:"string"`
  11044. // The Amazon Resource Name (ARN) of the scheduled action.
  11045. ScheduledActionARN *string `min:"1" type:"string"`
  11046. // The name of the scheduled action.
  11047. ScheduledActionName *string `min:"1" type:"string"`
  11048. // The date and time in UTC for this action to start. For example, "2019-06-01T00:00:00Z".
  11049. StartTime *time.Time `type:"timestamp"`
  11050. // This parameter is no longer used.
  11051. Time *time.Time `type:"timestamp"`
  11052. }
  11053. // String returns the string representation
  11054. func (s ScheduledUpdateGroupAction) String() string {
  11055. return awsutil.Prettify(s)
  11056. }
  11057. // GoString returns the string representation
  11058. func (s ScheduledUpdateGroupAction) GoString() string {
  11059. return s.String()
  11060. }
  11061. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  11062. func (s *ScheduledUpdateGroupAction) SetAutoScalingGroupName(v string) *ScheduledUpdateGroupAction {
  11063. s.AutoScalingGroupName = &v
  11064. return s
  11065. }
  11066. // SetDesiredCapacity sets the DesiredCapacity field's value.
  11067. func (s *ScheduledUpdateGroupAction) SetDesiredCapacity(v int64) *ScheduledUpdateGroupAction {
  11068. s.DesiredCapacity = &v
  11069. return s
  11070. }
  11071. // SetEndTime sets the EndTime field's value.
  11072. func (s *ScheduledUpdateGroupAction) SetEndTime(v time.Time) *ScheduledUpdateGroupAction {
  11073. s.EndTime = &v
  11074. return s
  11075. }
  11076. // SetMaxSize sets the MaxSize field's value.
  11077. func (s *ScheduledUpdateGroupAction) SetMaxSize(v int64) *ScheduledUpdateGroupAction {
  11078. s.MaxSize = &v
  11079. return s
  11080. }
  11081. // SetMinSize sets the MinSize field's value.
  11082. func (s *ScheduledUpdateGroupAction) SetMinSize(v int64) *ScheduledUpdateGroupAction {
  11083. s.MinSize = &v
  11084. return s
  11085. }
  11086. // SetRecurrence sets the Recurrence field's value.
  11087. func (s *ScheduledUpdateGroupAction) SetRecurrence(v string) *ScheduledUpdateGroupAction {
  11088. s.Recurrence = &v
  11089. return s
  11090. }
  11091. // SetScheduledActionARN sets the ScheduledActionARN field's value.
  11092. func (s *ScheduledUpdateGroupAction) SetScheduledActionARN(v string) *ScheduledUpdateGroupAction {
  11093. s.ScheduledActionARN = &v
  11094. return s
  11095. }
  11096. // SetScheduledActionName sets the ScheduledActionName field's value.
  11097. func (s *ScheduledUpdateGroupAction) SetScheduledActionName(v string) *ScheduledUpdateGroupAction {
  11098. s.ScheduledActionName = &v
  11099. return s
  11100. }
  11101. // SetStartTime sets the StartTime field's value.
  11102. func (s *ScheduledUpdateGroupAction) SetStartTime(v time.Time) *ScheduledUpdateGroupAction {
  11103. s.StartTime = &v
  11104. return s
  11105. }
  11106. // SetTime sets the Time field's value.
  11107. func (s *ScheduledUpdateGroupAction) SetTime(v time.Time) *ScheduledUpdateGroupAction {
  11108. s.Time = &v
  11109. return s
  11110. }
  11111. // Describes one or more scheduled scaling action updates for a specified Auto
  11112. // Scaling group. Used in combination with BatchPutScheduledUpdateGroupAction.
  11113. //
  11114. // When updating a scheduled scaling action, all optional parameters are left
  11115. // unchanged if not specified.
  11116. type ScheduledUpdateGroupActionRequest struct {
  11117. _ struct{} `type:"structure"`
  11118. // The number of EC2 instances that should be running in the group.
  11119. DesiredCapacity *int64 `type:"integer"`
  11120. // The date and time for the recurring schedule to end. Amazon EC2 Auto Scaling
  11121. // does not perform the action after this time.
  11122. EndTime *time.Time `type:"timestamp"`
  11123. // The maximum number of instances in the Auto Scaling group.
  11124. MaxSize *int64 `type:"integer"`
  11125. // The minimum number of instances in the Auto Scaling group.
  11126. MinSize *int64 `type:"integer"`
  11127. // The recurring schedule for the action, in Unix cron syntax format. This format
  11128. // consists of five fields separated by white spaces: [Minute] [Hour] [Day_of_Month]
  11129. // [Month_of_Year] [Day_of_Week]. The value must be in quotes (for example,
  11130. // "30 0 1 1,6,12 *"). For more information about this format, see Crontab (http://crontab.org).
  11131. //
  11132. // When StartTime and EndTime are specified with Recurrence, they form the boundaries
  11133. // of when the recurring action starts and stops.
  11134. Recurrence *string `min:"1" type:"string"`
  11135. // The name of the scaling action.
  11136. //
  11137. // ScheduledActionName is a required field
  11138. ScheduledActionName *string `min:"1" type:"string" required:"true"`
  11139. // The date and time for the action to start, in YYYY-MM-DDThh:mm:ssZ format
  11140. // in UTC/GMT only and in quotes (for example, "2019-06-01T00:00:00Z").
  11141. //
  11142. // If you specify Recurrence and StartTime, Amazon EC2 Auto Scaling performs
  11143. // the action at this time, and then performs the action based on the specified
  11144. // recurrence.
  11145. //
  11146. // If you try to schedule the action in the past, Amazon EC2 Auto Scaling returns
  11147. // an error message.
  11148. StartTime *time.Time `type:"timestamp"`
  11149. }
  11150. // String returns the string representation
  11151. func (s ScheduledUpdateGroupActionRequest) String() string {
  11152. return awsutil.Prettify(s)
  11153. }
  11154. // GoString returns the string representation
  11155. func (s ScheduledUpdateGroupActionRequest) GoString() string {
  11156. return s.String()
  11157. }
  11158. // Validate inspects the fields of the type to determine if they are valid.
  11159. func (s *ScheduledUpdateGroupActionRequest) Validate() error {
  11160. invalidParams := request.ErrInvalidParams{Context: "ScheduledUpdateGroupActionRequest"}
  11161. if s.Recurrence != nil && len(*s.Recurrence) < 1 {
  11162. invalidParams.Add(request.NewErrParamMinLen("Recurrence", 1))
  11163. }
  11164. if s.ScheduledActionName == nil {
  11165. invalidParams.Add(request.NewErrParamRequired("ScheduledActionName"))
  11166. }
  11167. if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 {
  11168. invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1))
  11169. }
  11170. if invalidParams.Len() > 0 {
  11171. return invalidParams
  11172. }
  11173. return nil
  11174. }
  11175. // SetDesiredCapacity sets the DesiredCapacity field's value.
  11176. func (s *ScheduledUpdateGroupActionRequest) SetDesiredCapacity(v int64) *ScheduledUpdateGroupActionRequest {
  11177. s.DesiredCapacity = &v
  11178. return s
  11179. }
  11180. // SetEndTime sets the EndTime field's value.
  11181. func (s *ScheduledUpdateGroupActionRequest) SetEndTime(v time.Time) *ScheduledUpdateGroupActionRequest {
  11182. s.EndTime = &v
  11183. return s
  11184. }
  11185. // SetMaxSize sets the MaxSize field's value.
  11186. func (s *ScheduledUpdateGroupActionRequest) SetMaxSize(v int64) *ScheduledUpdateGroupActionRequest {
  11187. s.MaxSize = &v
  11188. return s
  11189. }
  11190. // SetMinSize sets the MinSize field's value.
  11191. func (s *ScheduledUpdateGroupActionRequest) SetMinSize(v int64) *ScheduledUpdateGroupActionRequest {
  11192. s.MinSize = &v
  11193. return s
  11194. }
  11195. // SetRecurrence sets the Recurrence field's value.
  11196. func (s *ScheduledUpdateGroupActionRequest) SetRecurrence(v string) *ScheduledUpdateGroupActionRequest {
  11197. s.Recurrence = &v
  11198. return s
  11199. }
  11200. // SetScheduledActionName sets the ScheduledActionName field's value.
  11201. func (s *ScheduledUpdateGroupActionRequest) SetScheduledActionName(v string) *ScheduledUpdateGroupActionRequest {
  11202. s.ScheduledActionName = &v
  11203. return s
  11204. }
  11205. // SetStartTime sets the StartTime field's value.
  11206. func (s *ScheduledUpdateGroupActionRequest) SetStartTime(v time.Time) *ScheduledUpdateGroupActionRequest {
  11207. s.StartTime = &v
  11208. return s
  11209. }
  11210. type SetDesiredCapacityInput struct {
  11211. _ struct{} `type:"structure"`
  11212. // The name of the Auto Scaling group.
  11213. //
  11214. // AutoScalingGroupName is a required field
  11215. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  11216. // The number of EC2 instances that should be running in the Auto Scaling group.
  11217. //
  11218. // DesiredCapacity is a required field
  11219. DesiredCapacity *int64 `type:"integer" required:"true"`
  11220. // Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to
  11221. // complete before initiating a scaling activity to set your Auto Scaling group
  11222. // to its new capacity. By default, Amazon EC2 Auto Scaling does not honor the
  11223. // cooldown period during manual scaling activities.
  11224. HonorCooldown *bool `type:"boolean"`
  11225. }
  11226. // String returns the string representation
  11227. func (s SetDesiredCapacityInput) String() string {
  11228. return awsutil.Prettify(s)
  11229. }
  11230. // GoString returns the string representation
  11231. func (s SetDesiredCapacityInput) GoString() string {
  11232. return s.String()
  11233. }
  11234. // Validate inspects the fields of the type to determine if they are valid.
  11235. func (s *SetDesiredCapacityInput) Validate() error {
  11236. invalidParams := request.ErrInvalidParams{Context: "SetDesiredCapacityInput"}
  11237. if s.AutoScalingGroupName == nil {
  11238. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  11239. }
  11240. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  11241. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  11242. }
  11243. if s.DesiredCapacity == nil {
  11244. invalidParams.Add(request.NewErrParamRequired("DesiredCapacity"))
  11245. }
  11246. if invalidParams.Len() > 0 {
  11247. return invalidParams
  11248. }
  11249. return nil
  11250. }
  11251. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  11252. func (s *SetDesiredCapacityInput) SetAutoScalingGroupName(v string) *SetDesiredCapacityInput {
  11253. s.AutoScalingGroupName = &v
  11254. return s
  11255. }
  11256. // SetDesiredCapacity sets the DesiredCapacity field's value.
  11257. func (s *SetDesiredCapacityInput) SetDesiredCapacity(v int64) *SetDesiredCapacityInput {
  11258. s.DesiredCapacity = &v
  11259. return s
  11260. }
  11261. // SetHonorCooldown sets the HonorCooldown field's value.
  11262. func (s *SetDesiredCapacityInput) SetHonorCooldown(v bool) *SetDesiredCapacityInput {
  11263. s.HonorCooldown = &v
  11264. return s
  11265. }
  11266. type SetDesiredCapacityOutput struct {
  11267. _ struct{} `type:"structure"`
  11268. }
  11269. // String returns the string representation
  11270. func (s SetDesiredCapacityOutput) String() string {
  11271. return awsutil.Prettify(s)
  11272. }
  11273. // GoString returns the string representation
  11274. func (s SetDesiredCapacityOutput) GoString() string {
  11275. return s.String()
  11276. }
  11277. type SetInstanceHealthInput struct {
  11278. _ struct{} `type:"structure"`
  11279. // The health status of the instance. Set to Healthy to have the instance remain
  11280. // in service. Set to Unhealthy to have the instance be out of service. Amazon
  11281. // EC2 Auto Scaling terminates and replaces the unhealthy instance.
  11282. //
  11283. // HealthStatus is a required field
  11284. HealthStatus *string `min:"1" type:"string" required:"true"`
  11285. // The ID of the instance.
  11286. //
  11287. // InstanceId is a required field
  11288. InstanceId *string `min:"1" type:"string" required:"true"`
  11289. // If the Auto Scaling group of the specified instance has a HealthCheckGracePeriod
  11290. // specified for the group, by default, this call respects the grace period.
  11291. // Set this to False, to have the call not respect the grace period associated
  11292. // with the group.
  11293. //
  11294. // For more information about the health check grace period, see CreateAutoScalingGroup.
  11295. ShouldRespectGracePeriod *bool `type:"boolean"`
  11296. }
  11297. // String returns the string representation
  11298. func (s SetInstanceHealthInput) String() string {
  11299. return awsutil.Prettify(s)
  11300. }
  11301. // GoString returns the string representation
  11302. func (s SetInstanceHealthInput) GoString() string {
  11303. return s.String()
  11304. }
  11305. // Validate inspects the fields of the type to determine if they are valid.
  11306. func (s *SetInstanceHealthInput) Validate() error {
  11307. invalidParams := request.ErrInvalidParams{Context: "SetInstanceHealthInput"}
  11308. if s.HealthStatus == nil {
  11309. invalidParams.Add(request.NewErrParamRequired("HealthStatus"))
  11310. }
  11311. if s.HealthStatus != nil && len(*s.HealthStatus) < 1 {
  11312. invalidParams.Add(request.NewErrParamMinLen("HealthStatus", 1))
  11313. }
  11314. if s.InstanceId == nil {
  11315. invalidParams.Add(request.NewErrParamRequired("InstanceId"))
  11316. }
  11317. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  11318. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  11319. }
  11320. if invalidParams.Len() > 0 {
  11321. return invalidParams
  11322. }
  11323. return nil
  11324. }
  11325. // SetHealthStatus sets the HealthStatus field's value.
  11326. func (s *SetInstanceHealthInput) SetHealthStatus(v string) *SetInstanceHealthInput {
  11327. s.HealthStatus = &v
  11328. return s
  11329. }
  11330. // SetInstanceId sets the InstanceId field's value.
  11331. func (s *SetInstanceHealthInput) SetInstanceId(v string) *SetInstanceHealthInput {
  11332. s.InstanceId = &v
  11333. return s
  11334. }
  11335. // SetShouldRespectGracePeriod sets the ShouldRespectGracePeriod field's value.
  11336. func (s *SetInstanceHealthInput) SetShouldRespectGracePeriod(v bool) *SetInstanceHealthInput {
  11337. s.ShouldRespectGracePeriod = &v
  11338. return s
  11339. }
  11340. type SetInstanceHealthOutput struct {
  11341. _ struct{} `type:"structure"`
  11342. }
  11343. // String returns the string representation
  11344. func (s SetInstanceHealthOutput) String() string {
  11345. return awsutil.Prettify(s)
  11346. }
  11347. // GoString returns the string representation
  11348. func (s SetInstanceHealthOutput) GoString() string {
  11349. return s.String()
  11350. }
  11351. type SetInstanceProtectionInput struct {
  11352. _ struct{} `type:"structure"`
  11353. // The name of the Auto Scaling group.
  11354. //
  11355. // AutoScalingGroupName is a required field
  11356. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  11357. // One or more instance IDs.
  11358. //
  11359. // InstanceIds is a required field
  11360. InstanceIds []*string `type:"list" required:"true"`
  11361. // Indicates whether the instance is protected from termination by Amazon EC2
  11362. // Auto Scaling when scaling in.
  11363. //
  11364. // ProtectedFromScaleIn is a required field
  11365. ProtectedFromScaleIn *bool `type:"boolean" required:"true"`
  11366. }
  11367. // String returns the string representation
  11368. func (s SetInstanceProtectionInput) String() string {
  11369. return awsutil.Prettify(s)
  11370. }
  11371. // GoString returns the string representation
  11372. func (s SetInstanceProtectionInput) GoString() string {
  11373. return s.String()
  11374. }
  11375. // Validate inspects the fields of the type to determine if they are valid.
  11376. func (s *SetInstanceProtectionInput) Validate() error {
  11377. invalidParams := request.ErrInvalidParams{Context: "SetInstanceProtectionInput"}
  11378. if s.AutoScalingGroupName == nil {
  11379. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  11380. }
  11381. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  11382. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  11383. }
  11384. if s.InstanceIds == nil {
  11385. invalidParams.Add(request.NewErrParamRequired("InstanceIds"))
  11386. }
  11387. if s.ProtectedFromScaleIn == nil {
  11388. invalidParams.Add(request.NewErrParamRequired("ProtectedFromScaleIn"))
  11389. }
  11390. if invalidParams.Len() > 0 {
  11391. return invalidParams
  11392. }
  11393. return nil
  11394. }
  11395. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  11396. func (s *SetInstanceProtectionInput) SetAutoScalingGroupName(v string) *SetInstanceProtectionInput {
  11397. s.AutoScalingGroupName = &v
  11398. return s
  11399. }
  11400. // SetInstanceIds sets the InstanceIds field's value.
  11401. func (s *SetInstanceProtectionInput) SetInstanceIds(v []*string) *SetInstanceProtectionInput {
  11402. s.InstanceIds = v
  11403. return s
  11404. }
  11405. // SetProtectedFromScaleIn sets the ProtectedFromScaleIn field's value.
  11406. func (s *SetInstanceProtectionInput) SetProtectedFromScaleIn(v bool) *SetInstanceProtectionInput {
  11407. s.ProtectedFromScaleIn = &v
  11408. return s
  11409. }
  11410. type SetInstanceProtectionOutput struct {
  11411. _ struct{} `type:"structure"`
  11412. }
  11413. // String returns the string representation
  11414. func (s SetInstanceProtectionOutput) String() string {
  11415. return awsutil.Prettify(s)
  11416. }
  11417. // GoString returns the string representation
  11418. func (s SetInstanceProtectionOutput) GoString() string {
  11419. return s.String()
  11420. }
  11421. // Describes an adjustment based on the difference between the value of the
  11422. // aggregated CloudWatch metric and the breach threshold that you've defined
  11423. // for the alarm. Used in combination with PutScalingPolicy.
  11424. //
  11425. // For the following examples, suppose that you have an alarm with a breach
  11426. // threshold of 50:
  11427. //
  11428. // * To trigger the adjustment when the metric is greater than or equal to
  11429. // 50 and less than 60, specify a lower bound of 0 and an upper bound of
  11430. // 10.
  11431. //
  11432. // * To trigger the adjustment when the metric is greater than 40 and less
  11433. // than or equal to 50, specify a lower bound of -10 and an upper bound of
  11434. // 0.
  11435. //
  11436. // There are a few rules for the step adjustments for your step policy:
  11437. //
  11438. // * The ranges of your step adjustments can't overlap or have a gap.
  11439. //
  11440. // * At most, one step adjustment can have a null lower bound. If one step
  11441. // adjustment has a negative lower bound, then there must be a step adjustment
  11442. // with a null lower bound.
  11443. //
  11444. // * At most, one step adjustment can have a null upper bound. If one step
  11445. // adjustment has a positive upper bound, then there must be a step adjustment
  11446. // with a null upper bound.
  11447. //
  11448. // * The upper and lower bound can't be null in the same step adjustment.
  11449. type StepAdjustment struct {
  11450. _ struct{} `type:"structure"`
  11451. // The lower bound for the difference between the alarm threshold and the CloudWatch
  11452. // metric. If the metric value is above the breach threshold, the lower bound
  11453. // is inclusive (the metric must be greater than or equal to the threshold plus
  11454. // the lower bound). Otherwise, it is exclusive (the metric must be greater
  11455. // than the threshold plus the lower bound). A null value indicates negative
  11456. // infinity.
  11457. MetricIntervalLowerBound *float64 `type:"double"`
  11458. // The upper bound for the difference between the alarm threshold and the CloudWatch
  11459. // metric. If the metric value is above the breach threshold, the upper bound
  11460. // is exclusive (the metric must be less than the threshold plus the upper bound).
  11461. // Otherwise, it is inclusive (the metric must be less than or equal to the
  11462. // threshold plus the upper bound). A null value indicates positive infinity.
  11463. //
  11464. // The upper bound must be greater than the lower bound.
  11465. MetricIntervalUpperBound *float64 `type:"double"`
  11466. // The amount by which to scale, based on the specified adjustment type. A positive
  11467. // value adds to the current capacity while a negative number removes from the
  11468. // current capacity.
  11469. //
  11470. // ScalingAdjustment is a required field
  11471. ScalingAdjustment *int64 `type:"integer" required:"true"`
  11472. }
  11473. // String returns the string representation
  11474. func (s StepAdjustment) String() string {
  11475. return awsutil.Prettify(s)
  11476. }
  11477. // GoString returns the string representation
  11478. func (s StepAdjustment) GoString() string {
  11479. return s.String()
  11480. }
  11481. // Validate inspects the fields of the type to determine if they are valid.
  11482. func (s *StepAdjustment) Validate() error {
  11483. invalidParams := request.ErrInvalidParams{Context: "StepAdjustment"}
  11484. if s.ScalingAdjustment == nil {
  11485. invalidParams.Add(request.NewErrParamRequired("ScalingAdjustment"))
  11486. }
  11487. if invalidParams.Len() > 0 {
  11488. return invalidParams
  11489. }
  11490. return nil
  11491. }
  11492. // SetMetricIntervalLowerBound sets the MetricIntervalLowerBound field's value.
  11493. func (s *StepAdjustment) SetMetricIntervalLowerBound(v float64) *StepAdjustment {
  11494. s.MetricIntervalLowerBound = &v
  11495. return s
  11496. }
  11497. // SetMetricIntervalUpperBound sets the MetricIntervalUpperBound field's value.
  11498. func (s *StepAdjustment) SetMetricIntervalUpperBound(v float64) *StepAdjustment {
  11499. s.MetricIntervalUpperBound = &v
  11500. return s
  11501. }
  11502. // SetScalingAdjustment sets the ScalingAdjustment field's value.
  11503. func (s *StepAdjustment) SetScalingAdjustment(v int64) *StepAdjustment {
  11504. s.ScalingAdjustment = &v
  11505. return s
  11506. }
  11507. type SuspendProcessesOutput struct {
  11508. _ struct{} `type:"structure"`
  11509. }
  11510. // String returns the string representation
  11511. func (s SuspendProcessesOutput) String() string {
  11512. return awsutil.Prettify(s)
  11513. }
  11514. // GoString returns the string representation
  11515. func (s SuspendProcessesOutput) GoString() string {
  11516. return s.String()
  11517. }
  11518. // Describes an automatic scaling process that has been suspended. For more
  11519. // information, see ProcessType.
  11520. type SuspendedProcess struct {
  11521. _ struct{} `type:"structure"`
  11522. // The name of the suspended process.
  11523. ProcessName *string `min:"1" type:"string"`
  11524. // The reason that the process was suspended.
  11525. SuspensionReason *string `min:"1" type:"string"`
  11526. }
  11527. // String returns the string representation
  11528. func (s SuspendedProcess) String() string {
  11529. return awsutil.Prettify(s)
  11530. }
  11531. // GoString returns the string representation
  11532. func (s SuspendedProcess) GoString() string {
  11533. return s.String()
  11534. }
  11535. // SetProcessName sets the ProcessName field's value.
  11536. func (s *SuspendedProcess) SetProcessName(v string) *SuspendedProcess {
  11537. s.ProcessName = &v
  11538. return s
  11539. }
  11540. // SetSuspensionReason sets the SuspensionReason field's value.
  11541. func (s *SuspendedProcess) SetSuspensionReason(v string) *SuspendedProcess {
  11542. s.SuspensionReason = &v
  11543. return s
  11544. }
  11545. // Describes a tag for an Auto Scaling group.
  11546. type Tag struct {
  11547. _ struct{} `type:"structure"`
  11548. // The tag key.
  11549. //
  11550. // Key is a required field
  11551. Key *string `min:"1" type:"string" required:"true"`
  11552. // Determines whether the tag is added to new instances as they are launched
  11553. // in the group.
  11554. PropagateAtLaunch *bool `type:"boolean"`
  11555. // The name of the group.
  11556. ResourceId *string `type:"string"`
  11557. // The type of resource. The only supported value is auto-scaling-group.
  11558. ResourceType *string `type:"string"`
  11559. // The tag value.
  11560. Value *string `type:"string"`
  11561. }
  11562. // String returns the string representation
  11563. func (s Tag) String() string {
  11564. return awsutil.Prettify(s)
  11565. }
  11566. // GoString returns the string representation
  11567. func (s Tag) GoString() string {
  11568. return s.String()
  11569. }
  11570. // Validate inspects the fields of the type to determine if they are valid.
  11571. func (s *Tag) Validate() error {
  11572. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  11573. if s.Key == nil {
  11574. invalidParams.Add(request.NewErrParamRequired("Key"))
  11575. }
  11576. if s.Key != nil && len(*s.Key) < 1 {
  11577. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11578. }
  11579. if invalidParams.Len() > 0 {
  11580. return invalidParams
  11581. }
  11582. return nil
  11583. }
  11584. // SetKey sets the Key field's value.
  11585. func (s *Tag) SetKey(v string) *Tag {
  11586. s.Key = &v
  11587. return s
  11588. }
  11589. // SetPropagateAtLaunch sets the PropagateAtLaunch field's value.
  11590. func (s *Tag) SetPropagateAtLaunch(v bool) *Tag {
  11591. s.PropagateAtLaunch = &v
  11592. return s
  11593. }
  11594. // SetResourceId sets the ResourceId field's value.
  11595. func (s *Tag) SetResourceId(v string) *Tag {
  11596. s.ResourceId = &v
  11597. return s
  11598. }
  11599. // SetResourceType sets the ResourceType field's value.
  11600. func (s *Tag) SetResourceType(v string) *Tag {
  11601. s.ResourceType = &v
  11602. return s
  11603. }
  11604. // SetValue sets the Value field's value.
  11605. func (s *Tag) SetValue(v string) *Tag {
  11606. s.Value = &v
  11607. return s
  11608. }
  11609. // Describes a tag for an Auto Scaling group.
  11610. type TagDescription struct {
  11611. _ struct{} `type:"structure"`
  11612. // The tag key.
  11613. Key *string `min:"1" type:"string"`
  11614. // Determines whether the tag is added to new instances as they are launched
  11615. // in the group.
  11616. PropagateAtLaunch *bool `type:"boolean"`
  11617. // The name of the group.
  11618. ResourceId *string `type:"string"`
  11619. // The type of resource. The only supported value is auto-scaling-group.
  11620. ResourceType *string `type:"string"`
  11621. // The tag value.
  11622. Value *string `type:"string"`
  11623. }
  11624. // String returns the string representation
  11625. func (s TagDescription) String() string {
  11626. return awsutil.Prettify(s)
  11627. }
  11628. // GoString returns the string representation
  11629. func (s TagDescription) GoString() string {
  11630. return s.String()
  11631. }
  11632. // SetKey sets the Key field's value.
  11633. func (s *TagDescription) SetKey(v string) *TagDescription {
  11634. s.Key = &v
  11635. return s
  11636. }
  11637. // SetPropagateAtLaunch sets the PropagateAtLaunch field's value.
  11638. func (s *TagDescription) SetPropagateAtLaunch(v bool) *TagDescription {
  11639. s.PropagateAtLaunch = &v
  11640. return s
  11641. }
  11642. // SetResourceId sets the ResourceId field's value.
  11643. func (s *TagDescription) SetResourceId(v string) *TagDescription {
  11644. s.ResourceId = &v
  11645. return s
  11646. }
  11647. // SetResourceType sets the ResourceType field's value.
  11648. func (s *TagDescription) SetResourceType(v string) *TagDescription {
  11649. s.ResourceType = &v
  11650. return s
  11651. }
  11652. // SetValue sets the Value field's value.
  11653. func (s *TagDescription) SetValue(v string) *TagDescription {
  11654. s.Value = &v
  11655. return s
  11656. }
  11657. // Represents a target tracking scaling policy configuration to use with Amazon
  11658. // EC2 Auto Scaling.
  11659. type TargetTrackingConfiguration struct {
  11660. _ struct{} `type:"structure"`
  11661. // A customized metric. You must specify either a predefined metric or a customized
  11662. // metric.
  11663. CustomizedMetricSpecification *CustomizedMetricSpecification `type:"structure"`
  11664. // Indicates whether scaling in by the target tracking scaling policy is disabled.
  11665. // If scaling in is disabled, the target tracking scaling policy doesn't remove
  11666. // instances from the Auto Scaling group. Otherwise, the target tracking scaling
  11667. // policy can remove instances from the Auto Scaling group. The default is false.
  11668. DisableScaleIn *bool `type:"boolean"`
  11669. // A predefined metric. You must specify either a predefined metric or a customized
  11670. // metric.
  11671. PredefinedMetricSpecification *PredefinedMetricSpecification `type:"structure"`
  11672. // The target value for the metric.
  11673. //
  11674. // TargetValue is a required field
  11675. TargetValue *float64 `type:"double" required:"true"`
  11676. }
  11677. // String returns the string representation
  11678. func (s TargetTrackingConfiguration) String() string {
  11679. return awsutil.Prettify(s)
  11680. }
  11681. // GoString returns the string representation
  11682. func (s TargetTrackingConfiguration) GoString() string {
  11683. return s.String()
  11684. }
  11685. // Validate inspects the fields of the type to determine if they are valid.
  11686. func (s *TargetTrackingConfiguration) Validate() error {
  11687. invalidParams := request.ErrInvalidParams{Context: "TargetTrackingConfiguration"}
  11688. if s.TargetValue == nil {
  11689. invalidParams.Add(request.NewErrParamRequired("TargetValue"))
  11690. }
  11691. if s.CustomizedMetricSpecification != nil {
  11692. if err := s.CustomizedMetricSpecification.Validate(); err != nil {
  11693. invalidParams.AddNested("CustomizedMetricSpecification", err.(request.ErrInvalidParams))
  11694. }
  11695. }
  11696. if s.PredefinedMetricSpecification != nil {
  11697. if err := s.PredefinedMetricSpecification.Validate(); err != nil {
  11698. invalidParams.AddNested("PredefinedMetricSpecification", err.(request.ErrInvalidParams))
  11699. }
  11700. }
  11701. if invalidParams.Len() > 0 {
  11702. return invalidParams
  11703. }
  11704. return nil
  11705. }
  11706. // SetCustomizedMetricSpecification sets the CustomizedMetricSpecification field's value.
  11707. func (s *TargetTrackingConfiguration) SetCustomizedMetricSpecification(v *CustomizedMetricSpecification) *TargetTrackingConfiguration {
  11708. s.CustomizedMetricSpecification = v
  11709. return s
  11710. }
  11711. // SetDisableScaleIn sets the DisableScaleIn field's value.
  11712. func (s *TargetTrackingConfiguration) SetDisableScaleIn(v bool) *TargetTrackingConfiguration {
  11713. s.DisableScaleIn = &v
  11714. return s
  11715. }
  11716. // SetPredefinedMetricSpecification sets the PredefinedMetricSpecification field's value.
  11717. func (s *TargetTrackingConfiguration) SetPredefinedMetricSpecification(v *PredefinedMetricSpecification) *TargetTrackingConfiguration {
  11718. s.PredefinedMetricSpecification = v
  11719. return s
  11720. }
  11721. // SetTargetValue sets the TargetValue field's value.
  11722. func (s *TargetTrackingConfiguration) SetTargetValue(v float64) *TargetTrackingConfiguration {
  11723. s.TargetValue = &v
  11724. return s
  11725. }
  11726. type TerminateInstanceInAutoScalingGroupInput struct {
  11727. _ struct{} `type:"structure"`
  11728. // The ID of the instance.
  11729. //
  11730. // InstanceId is a required field
  11731. InstanceId *string `min:"1" type:"string" required:"true"`
  11732. // Indicates whether terminating the instance also decrements the size of the
  11733. // Auto Scaling group.
  11734. //
  11735. // ShouldDecrementDesiredCapacity is a required field
  11736. ShouldDecrementDesiredCapacity *bool `type:"boolean" required:"true"`
  11737. }
  11738. // String returns the string representation
  11739. func (s TerminateInstanceInAutoScalingGroupInput) String() string {
  11740. return awsutil.Prettify(s)
  11741. }
  11742. // GoString returns the string representation
  11743. func (s TerminateInstanceInAutoScalingGroupInput) GoString() string {
  11744. return s.String()
  11745. }
  11746. // Validate inspects the fields of the type to determine if they are valid.
  11747. func (s *TerminateInstanceInAutoScalingGroupInput) Validate() error {
  11748. invalidParams := request.ErrInvalidParams{Context: "TerminateInstanceInAutoScalingGroupInput"}
  11749. if s.InstanceId == nil {
  11750. invalidParams.Add(request.NewErrParamRequired("InstanceId"))
  11751. }
  11752. if s.InstanceId != nil && len(*s.InstanceId) < 1 {
  11753. invalidParams.Add(request.NewErrParamMinLen("InstanceId", 1))
  11754. }
  11755. if s.ShouldDecrementDesiredCapacity == nil {
  11756. invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity"))
  11757. }
  11758. if invalidParams.Len() > 0 {
  11759. return invalidParams
  11760. }
  11761. return nil
  11762. }
  11763. // SetInstanceId sets the InstanceId field's value.
  11764. func (s *TerminateInstanceInAutoScalingGroupInput) SetInstanceId(v string) *TerminateInstanceInAutoScalingGroupInput {
  11765. s.InstanceId = &v
  11766. return s
  11767. }
  11768. // SetShouldDecrementDesiredCapacity sets the ShouldDecrementDesiredCapacity field's value.
  11769. func (s *TerminateInstanceInAutoScalingGroupInput) SetShouldDecrementDesiredCapacity(v bool) *TerminateInstanceInAutoScalingGroupInput {
  11770. s.ShouldDecrementDesiredCapacity = &v
  11771. return s
  11772. }
  11773. type TerminateInstanceInAutoScalingGroupOutput struct {
  11774. _ struct{} `type:"structure"`
  11775. // A scaling activity.
  11776. Activity *Activity `type:"structure"`
  11777. }
  11778. // String returns the string representation
  11779. func (s TerminateInstanceInAutoScalingGroupOutput) String() string {
  11780. return awsutil.Prettify(s)
  11781. }
  11782. // GoString returns the string representation
  11783. func (s TerminateInstanceInAutoScalingGroupOutput) GoString() string {
  11784. return s.String()
  11785. }
  11786. // SetActivity sets the Activity field's value.
  11787. func (s *TerminateInstanceInAutoScalingGroupOutput) SetActivity(v *Activity) *TerminateInstanceInAutoScalingGroupOutput {
  11788. s.Activity = v
  11789. return s
  11790. }
  11791. type UpdateAutoScalingGroupInput struct {
  11792. _ struct{} `type:"structure"`
  11793. // The name of the Auto Scaling group.
  11794. //
  11795. // AutoScalingGroupName is a required field
  11796. AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
  11797. // One or more Availability Zones for the group.
  11798. AvailabilityZones []*string `min:"1" type:"list"`
  11799. // The amount of time, in seconds, after a scaling activity completes before
  11800. // another scaling activity can start. The default value is 300. This cooldown
  11801. // period is not used when a scaling-specific cooldown is specified.
  11802. //
  11803. // Cooldown periods are not supported for target tracking scaling policies,
  11804. // step scaling policies, or scheduled scaling. For more information, see Scaling
  11805. // Cooldowns (https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html)
  11806. // in the Amazon EC2 Auto Scaling User Guide.
  11807. DefaultCooldown *int64 `type:"integer"`
  11808. // The number of EC2 instances that should be running in the Auto Scaling group.
  11809. // This number must be greater than or equal to the minimum size of the group
  11810. // and less than or equal to the maximum size of the group.
  11811. DesiredCapacity *int64 `type:"integer"`
  11812. // The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before
  11813. // checking the health status of an EC2 instance that has come into service.
  11814. // The default value is 0.
  11815. //
  11816. // For more information, see Health Check Grace Period (https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html#health-check-grace-period)
  11817. // in the Amazon EC2 Auto Scaling User Guide.
  11818. //
  11819. // Conditional: This parameter is required if you are adding an ELB health check.
  11820. HealthCheckGracePeriod *int64 `type:"integer"`
  11821. // The service to use for the health checks. The valid values are EC2 and ELB.
  11822. // If you configure an Auto Scaling group to use ELB health checks, it considers
  11823. // the instance unhealthy if it fails either the EC2 status checks or the load
  11824. // balancer health checks.
  11825. HealthCheckType *string `min:"1" type:"string"`
  11826. // The name of the launch configuration. If you specify LaunchConfigurationName
  11827. // in your update request, you can't specify LaunchTemplate or MixedInstancesPolicy.
  11828. LaunchConfigurationName *string `min:"1" type:"string"`
  11829. // The launch template and version to use to specify the updates. If you specify
  11830. // LaunchTemplate in your update request, you can't specify LaunchConfigurationName
  11831. // or MixedInstancesPolicy.
  11832. //
  11833. // For more information, see LaunchTemplateSpecification (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_LaunchTemplateSpecification.html)
  11834. // in the Amazon EC2 Auto Scaling API Reference.
  11835. LaunchTemplate *LaunchTemplateSpecification `type:"structure"`
  11836. // The maximum amount of time, in seconds, that an instance can be in service.
  11837. //
  11838. // Valid Range: Minimum value of 604800.
  11839. MaxInstanceLifetime *int64 `type:"integer"`
  11840. // The maximum size of the Auto Scaling group.
  11841. MaxSize *int64 `type:"integer"`
  11842. // The minimum size of the Auto Scaling group.
  11843. MinSize *int64 `type:"integer"`
  11844. // An embedded object that specifies a mixed instances policy.
  11845. //
  11846. // In your call to UpdateAutoScalingGroup, you can make changes to the policy
  11847. // that is specified. All optional parameters are left unchanged if not specified.
  11848. //
  11849. // For more information, see MixedInstancesPolicy (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_MixedInstancesPolicy.html)
  11850. // in the Amazon EC2 Auto Scaling API Reference and Auto Scaling Groups with
  11851. // Multiple Instance Types and Purchase Options (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html)
  11852. // in the Amazon EC2 Auto Scaling User Guide.
  11853. MixedInstancesPolicy *MixedInstancesPolicy `type:"structure"`
  11854. // Indicates whether newly launched instances are protected from termination
  11855. // by Amazon EC2 Auto Scaling when scaling in.
  11856. //
  11857. // For more information about preventing instances from terminating on scale
  11858. // in, see Instance Protection (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection)
  11859. // in the Amazon EC2 Auto Scaling User Guide.
  11860. NewInstancesProtectedFromScaleIn *bool `type:"boolean"`
  11861. // The name of the placement group into which to launch your instances, if any.
  11862. // A placement group is a logical grouping of instances within a single Availability
  11863. // Zone. You cannot specify multiple Availability Zones and a placement group.
  11864. // For more information, see Placement Groups (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html)
  11865. // in the Amazon EC2 User Guide for Linux Instances.
  11866. PlacementGroup *string `min:"1" type:"string"`
  11867. // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling
  11868. // group uses to call other AWS services on your behalf. For more information,
  11869. // see Service-Linked Roles (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-service-linked-role.html)
  11870. // in the Amazon EC2 Auto Scaling User Guide.
  11871. ServiceLinkedRoleARN *string `min:"1" type:"string"`
  11872. // A standalone termination policy or a list of termination policies used to
  11873. // select the instance to terminate. The policies are executed in the order
  11874. // that they are listed.
  11875. //
  11876. // For more information, see Controlling Which Instances Auto Scaling Terminates
  11877. // During Scale In (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html)
  11878. // in the Amazon EC2 Auto Scaling User Guide.
  11879. TerminationPolicies []*string `type:"list"`
  11880. // A comma-separated list of subnet IDs for virtual private cloud (VPC).
  11881. //
  11882. // If you specify VPCZoneIdentifier with AvailabilityZones, the subnets that
  11883. // you specify for this parameter must reside in those Availability Zones.
  11884. VPCZoneIdentifier *string `min:"1" type:"string"`
  11885. }
  11886. // String returns the string representation
  11887. func (s UpdateAutoScalingGroupInput) String() string {
  11888. return awsutil.Prettify(s)
  11889. }
  11890. // GoString returns the string representation
  11891. func (s UpdateAutoScalingGroupInput) GoString() string {
  11892. return s.String()
  11893. }
  11894. // Validate inspects the fields of the type to determine if they are valid.
  11895. func (s *UpdateAutoScalingGroupInput) Validate() error {
  11896. invalidParams := request.ErrInvalidParams{Context: "UpdateAutoScalingGroupInput"}
  11897. if s.AutoScalingGroupName == nil {
  11898. invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName"))
  11899. }
  11900. if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 {
  11901. invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1))
  11902. }
  11903. if s.AvailabilityZones != nil && len(s.AvailabilityZones) < 1 {
  11904. invalidParams.Add(request.NewErrParamMinLen("AvailabilityZones", 1))
  11905. }
  11906. if s.HealthCheckType != nil && len(*s.HealthCheckType) < 1 {
  11907. invalidParams.Add(request.NewErrParamMinLen("HealthCheckType", 1))
  11908. }
  11909. if s.LaunchConfigurationName != nil && len(*s.LaunchConfigurationName) < 1 {
  11910. invalidParams.Add(request.NewErrParamMinLen("LaunchConfigurationName", 1))
  11911. }
  11912. if s.PlacementGroup != nil && len(*s.PlacementGroup) < 1 {
  11913. invalidParams.Add(request.NewErrParamMinLen("PlacementGroup", 1))
  11914. }
  11915. if s.ServiceLinkedRoleARN != nil && len(*s.ServiceLinkedRoleARN) < 1 {
  11916. invalidParams.Add(request.NewErrParamMinLen("ServiceLinkedRoleARN", 1))
  11917. }
  11918. if s.VPCZoneIdentifier != nil && len(*s.VPCZoneIdentifier) < 1 {
  11919. invalidParams.Add(request.NewErrParamMinLen("VPCZoneIdentifier", 1))
  11920. }
  11921. if s.LaunchTemplate != nil {
  11922. if err := s.LaunchTemplate.Validate(); err != nil {
  11923. invalidParams.AddNested("LaunchTemplate", err.(request.ErrInvalidParams))
  11924. }
  11925. }
  11926. if s.MixedInstancesPolicy != nil {
  11927. if err := s.MixedInstancesPolicy.Validate(); err != nil {
  11928. invalidParams.AddNested("MixedInstancesPolicy", err.(request.ErrInvalidParams))
  11929. }
  11930. }
  11931. if invalidParams.Len() > 0 {
  11932. return invalidParams
  11933. }
  11934. return nil
  11935. }
  11936. // SetAutoScalingGroupName sets the AutoScalingGroupName field's value.
  11937. func (s *UpdateAutoScalingGroupInput) SetAutoScalingGroupName(v string) *UpdateAutoScalingGroupInput {
  11938. s.AutoScalingGroupName = &v
  11939. return s
  11940. }
  11941. // SetAvailabilityZones sets the AvailabilityZones field's value.
  11942. func (s *UpdateAutoScalingGroupInput) SetAvailabilityZones(v []*string) *UpdateAutoScalingGroupInput {
  11943. s.AvailabilityZones = v
  11944. return s
  11945. }
  11946. // SetDefaultCooldown sets the DefaultCooldown field's value.
  11947. func (s *UpdateAutoScalingGroupInput) SetDefaultCooldown(v int64) *UpdateAutoScalingGroupInput {
  11948. s.DefaultCooldown = &v
  11949. return s
  11950. }
  11951. // SetDesiredCapacity sets the DesiredCapacity field's value.
  11952. func (s *UpdateAutoScalingGroupInput) SetDesiredCapacity(v int64) *UpdateAutoScalingGroupInput {
  11953. s.DesiredCapacity = &v
  11954. return s
  11955. }
  11956. // SetHealthCheckGracePeriod sets the HealthCheckGracePeriod field's value.
  11957. func (s *UpdateAutoScalingGroupInput) SetHealthCheckGracePeriod(v int64) *UpdateAutoScalingGroupInput {
  11958. s.HealthCheckGracePeriod = &v
  11959. return s
  11960. }
  11961. // SetHealthCheckType sets the HealthCheckType field's value.
  11962. func (s *UpdateAutoScalingGroupInput) SetHealthCheckType(v string) *UpdateAutoScalingGroupInput {
  11963. s.HealthCheckType = &v
  11964. return s
  11965. }
  11966. // SetLaunchConfigurationName sets the LaunchConfigurationName field's value.
  11967. func (s *UpdateAutoScalingGroupInput) SetLaunchConfigurationName(v string) *UpdateAutoScalingGroupInput {
  11968. s.LaunchConfigurationName = &v
  11969. return s
  11970. }
  11971. // SetLaunchTemplate sets the LaunchTemplate field's value.
  11972. func (s *UpdateAutoScalingGroupInput) SetLaunchTemplate(v *LaunchTemplateSpecification) *UpdateAutoScalingGroupInput {
  11973. s.LaunchTemplate = v
  11974. return s
  11975. }
  11976. // SetMaxInstanceLifetime sets the MaxInstanceLifetime field's value.
  11977. func (s *UpdateAutoScalingGroupInput) SetMaxInstanceLifetime(v int64) *UpdateAutoScalingGroupInput {
  11978. s.MaxInstanceLifetime = &v
  11979. return s
  11980. }
  11981. // SetMaxSize sets the MaxSize field's value.
  11982. func (s *UpdateAutoScalingGroupInput) SetMaxSize(v int64) *UpdateAutoScalingGroupInput {
  11983. s.MaxSize = &v
  11984. return s
  11985. }
  11986. // SetMinSize sets the MinSize field's value.
  11987. func (s *UpdateAutoScalingGroupInput) SetMinSize(v int64) *UpdateAutoScalingGroupInput {
  11988. s.MinSize = &v
  11989. return s
  11990. }
  11991. // SetMixedInstancesPolicy sets the MixedInstancesPolicy field's value.
  11992. func (s *UpdateAutoScalingGroupInput) SetMixedInstancesPolicy(v *MixedInstancesPolicy) *UpdateAutoScalingGroupInput {
  11993. s.MixedInstancesPolicy = v
  11994. return s
  11995. }
  11996. // SetNewInstancesProtectedFromScaleIn sets the NewInstancesProtectedFromScaleIn field's value.
  11997. func (s *UpdateAutoScalingGroupInput) SetNewInstancesProtectedFromScaleIn(v bool) *UpdateAutoScalingGroupInput {
  11998. s.NewInstancesProtectedFromScaleIn = &v
  11999. return s
  12000. }
  12001. // SetPlacementGroup sets the PlacementGroup field's value.
  12002. func (s *UpdateAutoScalingGroupInput) SetPlacementGroup(v string) *UpdateAutoScalingGroupInput {
  12003. s.PlacementGroup = &v
  12004. return s
  12005. }
  12006. // SetServiceLinkedRoleARN sets the ServiceLinkedRoleARN field's value.
  12007. func (s *UpdateAutoScalingGroupInput) SetServiceLinkedRoleARN(v string) *UpdateAutoScalingGroupInput {
  12008. s.ServiceLinkedRoleARN = &v
  12009. return s
  12010. }
  12011. // SetTerminationPolicies sets the TerminationPolicies field's value.
  12012. func (s *UpdateAutoScalingGroupInput) SetTerminationPolicies(v []*string) *UpdateAutoScalingGroupInput {
  12013. s.TerminationPolicies = v
  12014. return s
  12015. }
  12016. // SetVPCZoneIdentifier sets the VPCZoneIdentifier field's value.
  12017. func (s *UpdateAutoScalingGroupInput) SetVPCZoneIdentifier(v string) *UpdateAutoScalingGroupInput {
  12018. s.VPCZoneIdentifier = &v
  12019. return s
  12020. }
  12021. type UpdateAutoScalingGroupOutput struct {
  12022. _ struct{} `type:"structure"`
  12023. }
  12024. // String returns the string representation
  12025. func (s UpdateAutoScalingGroupOutput) String() string {
  12026. return awsutil.Prettify(s)
  12027. }
  12028. // GoString returns the string representation
  12029. func (s UpdateAutoScalingGroupOutput) GoString() string {
  12030. return s.String()
  12031. }
  12032. const (
  12033. // LifecycleStatePending is a LifecycleState enum value
  12034. LifecycleStatePending = "Pending"
  12035. // LifecycleStatePendingWait is a LifecycleState enum value
  12036. LifecycleStatePendingWait = "Pending:Wait"
  12037. // LifecycleStatePendingProceed is a LifecycleState enum value
  12038. LifecycleStatePendingProceed = "Pending:Proceed"
  12039. // LifecycleStateQuarantined is a LifecycleState enum value
  12040. LifecycleStateQuarantined = "Quarantined"
  12041. // LifecycleStateInService is a LifecycleState enum value
  12042. LifecycleStateInService = "InService"
  12043. // LifecycleStateTerminating is a LifecycleState enum value
  12044. LifecycleStateTerminating = "Terminating"
  12045. // LifecycleStateTerminatingWait is a LifecycleState enum value
  12046. LifecycleStateTerminatingWait = "Terminating:Wait"
  12047. // LifecycleStateTerminatingProceed is a LifecycleState enum value
  12048. LifecycleStateTerminatingProceed = "Terminating:Proceed"
  12049. // LifecycleStateTerminated is a LifecycleState enum value
  12050. LifecycleStateTerminated = "Terminated"
  12051. // LifecycleStateDetaching is a LifecycleState enum value
  12052. LifecycleStateDetaching = "Detaching"
  12053. // LifecycleStateDetached is a LifecycleState enum value
  12054. LifecycleStateDetached = "Detached"
  12055. // LifecycleStateEnteringStandby is a LifecycleState enum value
  12056. LifecycleStateEnteringStandby = "EnteringStandby"
  12057. // LifecycleStateStandby is a LifecycleState enum value
  12058. LifecycleStateStandby = "Standby"
  12059. )
  12060. const (
  12061. // MetricStatisticAverage is a MetricStatistic enum value
  12062. MetricStatisticAverage = "Average"
  12063. // MetricStatisticMinimum is a MetricStatistic enum value
  12064. MetricStatisticMinimum = "Minimum"
  12065. // MetricStatisticMaximum is a MetricStatistic enum value
  12066. MetricStatisticMaximum = "Maximum"
  12067. // MetricStatisticSampleCount is a MetricStatistic enum value
  12068. MetricStatisticSampleCount = "SampleCount"
  12069. // MetricStatisticSum is a MetricStatistic enum value
  12070. MetricStatisticSum = "Sum"
  12071. )
  12072. const (
  12073. // MetricTypeAsgaverageCpuutilization is a MetricType enum value
  12074. MetricTypeAsgaverageCpuutilization = "ASGAverageCPUUtilization"
  12075. // MetricTypeAsgaverageNetworkIn is a MetricType enum value
  12076. MetricTypeAsgaverageNetworkIn = "ASGAverageNetworkIn"
  12077. // MetricTypeAsgaverageNetworkOut is a MetricType enum value
  12078. MetricTypeAsgaverageNetworkOut = "ASGAverageNetworkOut"
  12079. // MetricTypeAlbrequestCountPerTarget is a MetricType enum value
  12080. MetricTypeAlbrequestCountPerTarget = "ALBRequestCountPerTarget"
  12081. )
  12082. const (
  12083. // ScalingActivityStatusCodePendingSpotBidPlacement is a ScalingActivityStatusCode enum value
  12084. ScalingActivityStatusCodePendingSpotBidPlacement = "PendingSpotBidPlacement"
  12085. // ScalingActivityStatusCodeWaitingForSpotInstanceRequestId is a ScalingActivityStatusCode enum value
  12086. ScalingActivityStatusCodeWaitingForSpotInstanceRequestId = "WaitingForSpotInstanceRequestId"
  12087. // ScalingActivityStatusCodeWaitingForSpotInstanceId is a ScalingActivityStatusCode enum value
  12088. ScalingActivityStatusCodeWaitingForSpotInstanceId = "WaitingForSpotInstanceId"
  12089. // ScalingActivityStatusCodeWaitingForInstanceId is a ScalingActivityStatusCode enum value
  12090. ScalingActivityStatusCodeWaitingForInstanceId = "WaitingForInstanceId"
  12091. // ScalingActivityStatusCodePreInService is a ScalingActivityStatusCode enum value
  12092. ScalingActivityStatusCodePreInService = "PreInService"
  12093. // ScalingActivityStatusCodeInProgress is a ScalingActivityStatusCode enum value
  12094. ScalingActivityStatusCodeInProgress = "InProgress"
  12095. // ScalingActivityStatusCodeWaitingForElbconnectionDraining is a ScalingActivityStatusCode enum value
  12096. ScalingActivityStatusCodeWaitingForElbconnectionDraining = "WaitingForELBConnectionDraining"
  12097. // ScalingActivityStatusCodeMidLifecycleAction is a ScalingActivityStatusCode enum value
  12098. ScalingActivityStatusCodeMidLifecycleAction = "MidLifecycleAction"
  12099. // ScalingActivityStatusCodeWaitingForInstanceWarmup is a ScalingActivityStatusCode enum value
  12100. ScalingActivityStatusCodeWaitingForInstanceWarmup = "WaitingForInstanceWarmup"
  12101. // ScalingActivityStatusCodeSuccessful is a ScalingActivityStatusCode enum value
  12102. ScalingActivityStatusCodeSuccessful = "Successful"
  12103. // ScalingActivityStatusCodeFailed is a ScalingActivityStatusCode enum value
  12104. ScalingActivityStatusCodeFailed = "Failed"
  12105. // ScalingActivityStatusCodeCancelled is a ScalingActivityStatusCode enum value
  12106. ScalingActivityStatusCodeCancelled = "Cancelled"
  12107. )