api.go 289 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package elbv2
  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 opAddListenerCertificates = "AddListenerCertificates"
  13. // AddListenerCertificatesRequest generates a "aws/request.Request" representing the
  14. // client's request for the AddListenerCertificates 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 AddListenerCertificates for more information on using the AddListenerCertificates
  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 AddListenerCertificatesRequest method.
  29. // req, resp := client.AddListenerCertificatesRequest(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/elasticloadbalancingv2-2015-12-01/AddListenerCertificates
  37. func (c *ELBV2) AddListenerCertificatesRequest(input *AddListenerCertificatesInput) (req *request.Request, output *AddListenerCertificatesOutput) {
  38. op := &request.Operation{
  39. Name: opAddListenerCertificates,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &AddListenerCertificatesInput{}
  45. }
  46. output = &AddListenerCertificatesOutput{}
  47. req = c.newRequest(op, input, output)
  48. return
  49. }
  50. // AddListenerCertificates API operation for Elastic Load Balancing.
  51. //
  52. // Adds the specified certificate to the specified secure listener.
  53. //
  54. // If the certificate was already added, the call is successful but the certificate
  55. // is not added again.
  56. //
  57. // To list the certificates for your listener, use DescribeListenerCertificates.
  58. // To remove certificates from your listener, use RemoveListenerCertificates.
  59. // To specify the default SSL server certificate, use ModifyListener.
  60. //
  61. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  62. // with awserr.Error's Code and Message methods to get detailed information about
  63. // the error.
  64. //
  65. // See the AWS API reference guide for Elastic Load Balancing's
  66. // API operation AddListenerCertificates for usage and error information.
  67. //
  68. // Returned Error Codes:
  69. // * ErrCodeListenerNotFoundException "ListenerNotFound"
  70. // The specified listener does not exist.
  71. //
  72. // * ErrCodeTooManyCertificatesException "TooManyCertificates"
  73. // You've reached the limit on the number of certificates per load balancer.
  74. //
  75. // * ErrCodeCertificateNotFoundException "CertificateNotFound"
  76. // The specified certificate does not exist.
  77. //
  78. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddListenerCertificates
  79. func (c *ELBV2) AddListenerCertificates(input *AddListenerCertificatesInput) (*AddListenerCertificatesOutput, error) {
  80. req, out := c.AddListenerCertificatesRequest(input)
  81. return out, req.Send()
  82. }
  83. // AddListenerCertificatesWithContext is the same as AddListenerCertificates with the addition of
  84. // the ability to pass a context and additional request options.
  85. //
  86. // See AddListenerCertificates for details on how to use this API operation.
  87. //
  88. // The context must be non-nil and will be used for request cancellation. If
  89. // the context is nil a panic will occur. In the future the SDK may create
  90. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  91. // for more information on using Contexts.
  92. func (c *ELBV2) AddListenerCertificatesWithContext(ctx aws.Context, input *AddListenerCertificatesInput, opts ...request.Option) (*AddListenerCertificatesOutput, error) {
  93. req, out := c.AddListenerCertificatesRequest(input)
  94. req.SetContext(ctx)
  95. req.ApplyOptions(opts...)
  96. return out, req.Send()
  97. }
  98. const opAddTags = "AddTags"
  99. // AddTagsRequest generates a "aws/request.Request" representing the
  100. // client's request for the AddTags operation. The "output" return
  101. // value will be populated with the request's response once the request completes
  102. // successfully.
  103. //
  104. // Use "Send" method on the returned Request to send the API call to the service.
  105. // the "output" return value is not valid until after Send returns without error.
  106. //
  107. // See AddTags for more information on using the AddTags
  108. // API call, and error handling.
  109. //
  110. // This method is useful when you want to inject custom logic or configuration
  111. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  112. //
  113. //
  114. // // Example sending a request using the AddTagsRequest method.
  115. // req, resp := client.AddTagsRequest(params)
  116. //
  117. // err := req.Send()
  118. // if err == nil { // resp is now filled
  119. // fmt.Println(resp)
  120. // }
  121. //
  122. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddTags
  123. func (c *ELBV2) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) {
  124. op := &request.Operation{
  125. Name: opAddTags,
  126. HTTPMethod: "POST",
  127. HTTPPath: "/",
  128. }
  129. if input == nil {
  130. input = &AddTagsInput{}
  131. }
  132. output = &AddTagsOutput{}
  133. req = c.newRequest(op, input, output)
  134. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  135. return
  136. }
  137. // AddTags API operation for Elastic Load Balancing.
  138. //
  139. // Adds the specified tags to the specified Elastic Load Balancing resource.
  140. // You can tag your Application Load Balancers, Network Load Balancers, and
  141. // your target groups.
  142. //
  143. // Each tag consists of a key and an optional value. If a resource already has
  144. // a tag with the same key, AddTags updates its value.
  145. //
  146. // To list the current tags for your resources, use DescribeTags. To remove
  147. // tags from your resources, use RemoveTags.
  148. //
  149. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  150. // with awserr.Error's Code and Message methods to get detailed information about
  151. // the error.
  152. //
  153. // See the AWS API reference guide for Elastic Load Balancing's
  154. // API operation AddTags for usage and error information.
  155. //
  156. // Returned Error Codes:
  157. // * ErrCodeDuplicateTagKeysException "DuplicateTagKeys"
  158. // A tag key was specified more than once.
  159. //
  160. // * ErrCodeTooManyTagsException "TooManyTags"
  161. // You've reached the limit on the number of tags per load balancer.
  162. //
  163. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  164. // The specified load balancer does not exist.
  165. //
  166. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  167. // The specified target group does not exist.
  168. //
  169. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddTags
  170. func (c *ELBV2) AddTags(input *AddTagsInput) (*AddTagsOutput, error) {
  171. req, out := c.AddTagsRequest(input)
  172. return out, req.Send()
  173. }
  174. // AddTagsWithContext is the same as AddTags with the addition of
  175. // the ability to pass a context and additional request options.
  176. //
  177. // See AddTags for details on how to use this API operation.
  178. //
  179. // The context must be non-nil and will be used for request cancellation. If
  180. // the context is nil a panic will occur. In the future the SDK may create
  181. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  182. // for more information on using Contexts.
  183. func (c *ELBV2) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) {
  184. req, out := c.AddTagsRequest(input)
  185. req.SetContext(ctx)
  186. req.ApplyOptions(opts...)
  187. return out, req.Send()
  188. }
  189. const opCreateListener = "CreateListener"
  190. // CreateListenerRequest generates a "aws/request.Request" representing the
  191. // client's request for the CreateListener operation. The "output" return
  192. // value will be populated with the request's response once the request completes
  193. // successfully.
  194. //
  195. // Use "Send" method on the returned Request to send the API call to the service.
  196. // the "output" return value is not valid until after Send returns without error.
  197. //
  198. // See CreateListener for more information on using the CreateListener
  199. // API call, and error handling.
  200. //
  201. // This method is useful when you want to inject custom logic or configuration
  202. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  203. //
  204. //
  205. // // Example sending a request using the CreateListenerRequest method.
  206. // req, resp := client.CreateListenerRequest(params)
  207. //
  208. // err := req.Send()
  209. // if err == nil { // resp is now filled
  210. // fmt.Println(resp)
  211. // }
  212. //
  213. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateListener
  214. func (c *ELBV2) CreateListenerRequest(input *CreateListenerInput) (req *request.Request, output *CreateListenerOutput) {
  215. op := &request.Operation{
  216. Name: opCreateListener,
  217. HTTPMethod: "POST",
  218. HTTPPath: "/",
  219. }
  220. if input == nil {
  221. input = &CreateListenerInput{}
  222. }
  223. output = &CreateListenerOutput{}
  224. req = c.newRequest(op, input, output)
  225. return
  226. }
  227. // CreateListener API operation for Elastic Load Balancing.
  228. //
  229. // Creates a listener for the specified Application Load Balancer or Network
  230. // Load Balancer.
  231. //
  232. // To update a listener, use ModifyListener. When you are finished with a listener,
  233. // you can delete it using DeleteListener. If you are finished with both the
  234. // listener and the load balancer, you can delete them both using DeleteLoadBalancer.
  235. //
  236. // This operation is idempotent, which means that it completes at most one time.
  237. // If you attempt to create multiple listeners with the same settings, each
  238. // call succeeds.
  239. //
  240. // For more information, see Listeners for Your Application Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html)
  241. // in the Application Load Balancers Guide and Listeners for Your Network Load
  242. // Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-listeners.html)
  243. // in the Network Load Balancers 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 Elastic Load Balancing's
  250. // API operation CreateListener for usage and error information.
  251. //
  252. // Returned Error Codes:
  253. // * ErrCodeDuplicateListenerException "DuplicateListener"
  254. // A listener with the specified port already exists.
  255. //
  256. // * ErrCodeTooManyListenersException "TooManyListeners"
  257. // You've reached the limit on the number of listeners per load balancer.
  258. //
  259. // * ErrCodeTooManyCertificatesException "TooManyCertificates"
  260. // You've reached the limit on the number of certificates per load balancer.
  261. //
  262. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  263. // The specified load balancer does not exist.
  264. //
  265. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  266. // The specified target group does not exist.
  267. //
  268. // * ErrCodeTargetGroupAssociationLimitException "TargetGroupAssociationLimit"
  269. // You've reached the limit on the number of load balancers per target group.
  270. //
  271. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  272. // The requested configuration is not valid.
  273. //
  274. // * ErrCodeIncompatibleProtocolsException "IncompatibleProtocols"
  275. // The specified configuration is not valid with this protocol.
  276. //
  277. // * ErrCodeSSLPolicyNotFoundException "SSLPolicyNotFound"
  278. // The specified SSL policy does not exist.
  279. //
  280. // * ErrCodeCertificateNotFoundException "CertificateNotFound"
  281. // The specified certificate does not exist.
  282. //
  283. // * ErrCodeUnsupportedProtocolException "UnsupportedProtocol"
  284. // The specified protocol is not supported.
  285. //
  286. // * ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId"
  287. // You've reached the limit on the number of times a target can be registered
  288. // with a load balancer.
  289. //
  290. // * ErrCodeTooManyTargetsException "TooManyTargets"
  291. // You've reached the limit on the number of targets.
  292. //
  293. // * ErrCodeTooManyActionsException "TooManyActions"
  294. // You've reached the limit on the number of actions per rule.
  295. //
  296. // * ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction"
  297. // The requested action is not valid.
  298. //
  299. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateListener
  300. func (c *ELBV2) CreateListener(input *CreateListenerInput) (*CreateListenerOutput, error) {
  301. req, out := c.CreateListenerRequest(input)
  302. return out, req.Send()
  303. }
  304. // CreateListenerWithContext is the same as CreateListener with the addition of
  305. // the ability to pass a context and additional request options.
  306. //
  307. // See CreateListener for details on how to use this API operation.
  308. //
  309. // The context must be non-nil and will be used for request cancellation. If
  310. // the context is nil a panic will occur. In the future the SDK may create
  311. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  312. // for more information on using Contexts.
  313. func (c *ELBV2) CreateListenerWithContext(ctx aws.Context, input *CreateListenerInput, opts ...request.Option) (*CreateListenerOutput, error) {
  314. req, out := c.CreateListenerRequest(input)
  315. req.SetContext(ctx)
  316. req.ApplyOptions(opts...)
  317. return out, req.Send()
  318. }
  319. const opCreateLoadBalancer = "CreateLoadBalancer"
  320. // CreateLoadBalancerRequest generates a "aws/request.Request" representing the
  321. // client's request for the CreateLoadBalancer operation. The "output" return
  322. // value will be populated with the request's response once the request completes
  323. // successfully.
  324. //
  325. // Use "Send" method on the returned Request to send the API call to the service.
  326. // the "output" return value is not valid until after Send returns without error.
  327. //
  328. // See CreateLoadBalancer for more information on using the CreateLoadBalancer
  329. // API call, and error handling.
  330. //
  331. // This method is useful when you want to inject custom logic or configuration
  332. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  333. //
  334. //
  335. // // Example sending a request using the CreateLoadBalancerRequest method.
  336. // req, resp := client.CreateLoadBalancerRequest(params)
  337. //
  338. // err := req.Send()
  339. // if err == nil { // resp is now filled
  340. // fmt.Println(resp)
  341. // }
  342. //
  343. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateLoadBalancer
  344. func (c *ELBV2) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req *request.Request, output *CreateLoadBalancerOutput) {
  345. op := &request.Operation{
  346. Name: opCreateLoadBalancer,
  347. HTTPMethod: "POST",
  348. HTTPPath: "/",
  349. }
  350. if input == nil {
  351. input = &CreateLoadBalancerInput{}
  352. }
  353. output = &CreateLoadBalancerOutput{}
  354. req = c.newRequest(op, input, output)
  355. return
  356. }
  357. // CreateLoadBalancer API operation for Elastic Load Balancing.
  358. //
  359. // Creates an Application Load Balancer or a Network Load Balancer.
  360. //
  361. // When you create a load balancer, you can specify security groups, public
  362. // subnets, IP address type, and tags. Otherwise, you could do so later using
  363. // SetSecurityGroups, SetSubnets, SetIpAddressType, and AddTags.
  364. //
  365. // To create listeners for your load balancer, use CreateListener. To describe
  366. // your current load balancers, see DescribeLoadBalancers. When you are finished
  367. // with a load balancer, you can delete it using DeleteLoadBalancer.
  368. //
  369. // For limit information, see Limits for Your Application Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html)
  370. // in the Application Load Balancers Guide and Limits for Your Network Load
  371. // Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-limits.html)
  372. // in the Network Load Balancers Guide.
  373. //
  374. // This operation is idempotent, which means that it completes at most one time.
  375. // If you attempt to create multiple load balancers with the same settings,
  376. // each call succeeds.
  377. //
  378. // For more information, see Application Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html)
  379. // in the Application Load Balancers Guide and Network Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html)
  380. // in the Network Load Balancers Guide.
  381. //
  382. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  383. // with awserr.Error's Code and Message methods to get detailed information about
  384. // the error.
  385. //
  386. // See the AWS API reference guide for Elastic Load Balancing's
  387. // API operation CreateLoadBalancer for usage and error information.
  388. //
  389. // Returned Error Codes:
  390. // * ErrCodeDuplicateLoadBalancerNameException "DuplicateLoadBalancerName"
  391. // A load balancer with the specified name already exists.
  392. //
  393. // * ErrCodeTooManyLoadBalancersException "TooManyLoadBalancers"
  394. // You've reached the limit on the number of load balancers for your AWS account.
  395. //
  396. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  397. // The requested configuration is not valid.
  398. //
  399. // * ErrCodeSubnetNotFoundException "SubnetNotFound"
  400. // The specified subnet does not exist.
  401. //
  402. // * ErrCodeInvalidSubnetException "InvalidSubnet"
  403. // The specified subnet is out of available addresses.
  404. //
  405. // * ErrCodeInvalidSecurityGroupException "InvalidSecurityGroup"
  406. // The specified security group does not exist.
  407. //
  408. // * ErrCodeInvalidSchemeException "InvalidScheme"
  409. // The requested scheme is not valid.
  410. //
  411. // * ErrCodeTooManyTagsException "TooManyTags"
  412. // You've reached the limit on the number of tags per load balancer.
  413. //
  414. // * ErrCodeDuplicateTagKeysException "DuplicateTagKeys"
  415. // A tag key was specified more than once.
  416. //
  417. // * ErrCodeResourceInUseException "ResourceInUse"
  418. // A specified resource is in use.
  419. //
  420. // * ErrCodeAllocationIdNotFoundException "AllocationIdNotFound"
  421. // The specified allocation ID does not exist.
  422. //
  423. // * ErrCodeAvailabilityZoneNotSupportedException "AvailabilityZoneNotSupported"
  424. // The specified Availability Zone is not supported.
  425. //
  426. // * ErrCodeOperationNotPermittedException "OperationNotPermitted"
  427. // This operation is not allowed.
  428. //
  429. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateLoadBalancer
  430. func (c *ELBV2) CreateLoadBalancer(input *CreateLoadBalancerInput) (*CreateLoadBalancerOutput, error) {
  431. req, out := c.CreateLoadBalancerRequest(input)
  432. return out, req.Send()
  433. }
  434. // CreateLoadBalancerWithContext is the same as CreateLoadBalancer with the addition of
  435. // the ability to pass a context and additional request options.
  436. //
  437. // See CreateLoadBalancer for details on how to use this API operation.
  438. //
  439. // The context must be non-nil and will be used for request cancellation. If
  440. // the context is nil a panic will occur. In the future the SDK may create
  441. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  442. // for more information on using Contexts.
  443. func (c *ELBV2) CreateLoadBalancerWithContext(ctx aws.Context, input *CreateLoadBalancerInput, opts ...request.Option) (*CreateLoadBalancerOutput, error) {
  444. req, out := c.CreateLoadBalancerRequest(input)
  445. req.SetContext(ctx)
  446. req.ApplyOptions(opts...)
  447. return out, req.Send()
  448. }
  449. const opCreateRule = "CreateRule"
  450. // CreateRuleRequest generates a "aws/request.Request" representing the
  451. // client's request for the CreateRule operation. The "output" return
  452. // value will be populated with the request's response once the request completes
  453. // successfully.
  454. //
  455. // Use "Send" method on the returned Request to send the API call to the service.
  456. // the "output" return value is not valid until after Send returns without error.
  457. //
  458. // See CreateRule for more information on using the CreateRule
  459. // API call, and error handling.
  460. //
  461. // This method is useful when you want to inject custom logic or configuration
  462. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  463. //
  464. //
  465. // // Example sending a request using the CreateRuleRequest method.
  466. // req, resp := client.CreateRuleRequest(params)
  467. //
  468. // err := req.Send()
  469. // if err == nil { // resp is now filled
  470. // fmt.Println(resp)
  471. // }
  472. //
  473. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateRule
  474. func (c *ELBV2) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, output *CreateRuleOutput) {
  475. op := &request.Operation{
  476. Name: opCreateRule,
  477. HTTPMethod: "POST",
  478. HTTPPath: "/",
  479. }
  480. if input == nil {
  481. input = &CreateRuleInput{}
  482. }
  483. output = &CreateRuleOutput{}
  484. req = c.newRequest(op, input, output)
  485. return
  486. }
  487. // CreateRule API operation for Elastic Load Balancing.
  488. //
  489. // Creates a rule for the specified listener. The listener must be associated
  490. // with an Application Load Balancer.
  491. //
  492. // Rules are evaluated in priority order, from the lowest value to the highest
  493. // value. When the conditions for a rule are met, its actions are performed.
  494. // If the conditions for no rules are met, the actions for the default rule
  495. // are performed. For more information, see Listener Rules (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#listener-rules)
  496. // in the Application Load Balancers Guide.
  497. //
  498. // To view your current rules, use DescribeRules. To update a rule, use ModifyRule.
  499. // To set the priorities of your rules, use SetRulePriorities. To delete a rule,
  500. // use DeleteRule.
  501. //
  502. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  503. // with awserr.Error's Code and Message methods to get detailed information about
  504. // the error.
  505. //
  506. // See the AWS API reference guide for Elastic Load Balancing's
  507. // API operation CreateRule for usage and error information.
  508. //
  509. // Returned Error Codes:
  510. // * ErrCodePriorityInUseException "PriorityInUse"
  511. // The specified priority is in use.
  512. //
  513. // * ErrCodeTooManyTargetGroupsException "TooManyTargetGroups"
  514. // You've reached the limit on the number of target groups for your AWS account.
  515. //
  516. // * ErrCodeTooManyRulesException "TooManyRules"
  517. // You've reached the limit on the number of rules per load balancer.
  518. //
  519. // * ErrCodeTargetGroupAssociationLimitException "TargetGroupAssociationLimit"
  520. // You've reached the limit on the number of load balancers per target group.
  521. //
  522. // * ErrCodeIncompatibleProtocolsException "IncompatibleProtocols"
  523. // The specified configuration is not valid with this protocol.
  524. //
  525. // * ErrCodeListenerNotFoundException "ListenerNotFound"
  526. // The specified listener does not exist.
  527. //
  528. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  529. // The specified target group does not exist.
  530. //
  531. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  532. // The requested configuration is not valid.
  533. //
  534. // * ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId"
  535. // You've reached the limit on the number of times a target can be registered
  536. // with a load balancer.
  537. //
  538. // * ErrCodeTooManyTargetsException "TooManyTargets"
  539. // You've reached the limit on the number of targets.
  540. //
  541. // * ErrCodeUnsupportedProtocolException "UnsupportedProtocol"
  542. // The specified protocol is not supported.
  543. //
  544. // * ErrCodeTooManyActionsException "TooManyActions"
  545. // You've reached the limit on the number of actions per rule.
  546. //
  547. // * ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction"
  548. // The requested action is not valid.
  549. //
  550. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateRule
  551. func (c *ELBV2) CreateRule(input *CreateRuleInput) (*CreateRuleOutput, error) {
  552. req, out := c.CreateRuleRequest(input)
  553. return out, req.Send()
  554. }
  555. // CreateRuleWithContext is the same as CreateRule with the addition of
  556. // the ability to pass a context and additional request options.
  557. //
  558. // See CreateRule for details on how to use this API operation.
  559. //
  560. // The context must be non-nil and will be used for request cancellation. If
  561. // the context is nil a panic will occur. In the future the SDK may create
  562. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  563. // for more information on using Contexts.
  564. func (c *ELBV2) CreateRuleWithContext(ctx aws.Context, input *CreateRuleInput, opts ...request.Option) (*CreateRuleOutput, error) {
  565. req, out := c.CreateRuleRequest(input)
  566. req.SetContext(ctx)
  567. req.ApplyOptions(opts...)
  568. return out, req.Send()
  569. }
  570. const opCreateTargetGroup = "CreateTargetGroup"
  571. // CreateTargetGroupRequest generates a "aws/request.Request" representing the
  572. // client's request for the CreateTargetGroup operation. The "output" return
  573. // value will be populated with the request's response once the request completes
  574. // successfully.
  575. //
  576. // Use "Send" method on the returned Request to send the API call to the service.
  577. // the "output" return value is not valid until after Send returns without error.
  578. //
  579. // See CreateTargetGroup for more information on using the CreateTargetGroup
  580. // API call, and error handling.
  581. //
  582. // This method is useful when you want to inject custom logic or configuration
  583. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  584. //
  585. //
  586. // // Example sending a request using the CreateTargetGroupRequest method.
  587. // req, resp := client.CreateTargetGroupRequest(params)
  588. //
  589. // err := req.Send()
  590. // if err == nil { // resp is now filled
  591. // fmt.Println(resp)
  592. // }
  593. //
  594. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateTargetGroup
  595. func (c *ELBV2) CreateTargetGroupRequest(input *CreateTargetGroupInput) (req *request.Request, output *CreateTargetGroupOutput) {
  596. op := &request.Operation{
  597. Name: opCreateTargetGroup,
  598. HTTPMethod: "POST",
  599. HTTPPath: "/",
  600. }
  601. if input == nil {
  602. input = &CreateTargetGroupInput{}
  603. }
  604. output = &CreateTargetGroupOutput{}
  605. req = c.newRequest(op, input, output)
  606. return
  607. }
  608. // CreateTargetGroup API operation for Elastic Load Balancing.
  609. //
  610. // Creates a target group.
  611. //
  612. // To register targets with the target group, use RegisterTargets. To update
  613. // the health check settings for the target group, use ModifyTargetGroup. To
  614. // monitor the health of targets in the target group, use DescribeTargetHealth.
  615. //
  616. // To route traffic to the targets in a target group, specify the target group
  617. // in an action using CreateListener or CreateRule.
  618. //
  619. // To delete a target group, use DeleteTargetGroup.
  620. //
  621. // This operation is idempotent, which means that it completes at most one time.
  622. // If you attempt to create multiple target groups with the same settings, each
  623. // call succeeds.
  624. //
  625. // For more information, see Target Groups for Your Application Load Balancers
  626. // (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html)
  627. // in the Application Load Balancers Guide or Target Groups for Your Network
  628. // Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html)
  629. // in the Network Load Balancers Guide.
  630. //
  631. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  632. // with awserr.Error's Code and Message methods to get detailed information about
  633. // the error.
  634. //
  635. // See the AWS API reference guide for Elastic Load Balancing's
  636. // API operation CreateTargetGroup for usage and error information.
  637. //
  638. // Returned Error Codes:
  639. // * ErrCodeDuplicateTargetGroupNameException "DuplicateTargetGroupName"
  640. // A target group with the specified name already exists.
  641. //
  642. // * ErrCodeTooManyTargetGroupsException "TooManyTargetGroups"
  643. // You've reached the limit on the number of target groups for your AWS account.
  644. //
  645. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  646. // The requested configuration is not valid.
  647. //
  648. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateTargetGroup
  649. func (c *ELBV2) CreateTargetGroup(input *CreateTargetGroupInput) (*CreateTargetGroupOutput, error) {
  650. req, out := c.CreateTargetGroupRequest(input)
  651. return out, req.Send()
  652. }
  653. // CreateTargetGroupWithContext is the same as CreateTargetGroup with the addition of
  654. // the ability to pass a context and additional request options.
  655. //
  656. // See CreateTargetGroup for details on how to use this API operation.
  657. //
  658. // The context must be non-nil and will be used for request cancellation. If
  659. // the context is nil a panic will occur. In the future the SDK may create
  660. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  661. // for more information on using Contexts.
  662. func (c *ELBV2) CreateTargetGroupWithContext(ctx aws.Context, input *CreateTargetGroupInput, opts ...request.Option) (*CreateTargetGroupOutput, error) {
  663. req, out := c.CreateTargetGroupRequest(input)
  664. req.SetContext(ctx)
  665. req.ApplyOptions(opts...)
  666. return out, req.Send()
  667. }
  668. const opDeleteListener = "DeleteListener"
  669. // DeleteListenerRequest generates a "aws/request.Request" representing the
  670. // client's request for the DeleteListener operation. The "output" return
  671. // value will be populated with the request's response once the request completes
  672. // successfully.
  673. //
  674. // Use "Send" method on the returned Request to send the API call to the service.
  675. // the "output" return value is not valid until after Send returns without error.
  676. //
  677. // See DeleteListener for more information on using the DeleteListener
  678. // API call, and error handling.
  679. //
  680. // This method is useful when you want to inject custom logic or configuration
  681. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  682. //
  683. //
  684. // // Example sending a request using the DeleteListenerRequest method.
  685. // req, resp := client.DeleteListenerRequest(params)
  686. //
  687. // err := req.Send()
  688. // if err == nil { // resp is now filled
  689. // fmt.Println(resp)
  690. // }
  691. //
  692. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteListener
  693. func (c *ELBV2) DeleteListenerRequest(input *DeleteListenerInput) (req *request.Request, output *DeleteListenerOutput) {
  694. op := &request.Operation{
  695. Name: opDeleteListener,
  696. HTTPMethod: "POST",
  697. HTTPPath: "/",
  698. }
  699. if input == nil {
  700. input = &DeleteListenerInput{}
  701. }
  702. output = &DeleteListenerOutput{}
  703. req = c.newRequest(op, input, output)
  704. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  705. return
  706. }
  707. // DeleteListener API operation for Elastic Load Balancing.
  708. //
  709. // Deletes the specified listener.
  710. //
  711. // Alternatively, your listener is deleted when you delete the load balancer
  712. // to which it is attached, using DeleteLoadBalancer.
  713. //
  714. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  715. // with awserr.Error's Code and Message methods to get detailed information about
  716. // the error.
  717. //
  718. // See the AWS API reference guide for Elastic Load Balancing's
  719. // API operation DeleteListener for usage and error information.
  720. //
  721. // Returned Error Codes:
  722. // * ErrCodeListenerNotFoundException "ListenerNotFound"
  723. // The specified listener does not exist.
  724. //
  725. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteListener
  726. func (c *ELBV2) DeleteListener(input *DeleteListenerInput) (*DeleteListenerOutput, error) {
  727. req, out := c.DeleteListenerRequest(input)
  728. return out, req.Send()
  729. }
  730. // DeleteListenerWithContext is the same as DeleteListener with the addition of
  731. // the ability to pass a context and additional request options.
  732. //
  733. // See DeleteListener for details on how to use this API operation.
  734. //
  735. // The context must be non-nil and will be used for request cancellation. If
  736. // the context is nil a panic will occur. In the future the SDK may create
  737. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  738. // for more information on using Contexts.
  739. func (c *ELBV2) DeleteListenerWithContext(ctx aws.Context, input *DeleteListenerInput, opts ...request.Option) (*DeleteListenerOutput, error) {
  740. req, out := c.DeleteListenerRequest(input)
  741. req.SetContext(ctx)
  742. req.ApplyOptions(opts...)
  743. return out, req.Send()
  744. }
  745. const opDeleteLoadBalancer = "DeleteLoadBalancer"
  746. // DeleteLoadBalancerRequest generates a "aws/request.Request" representing the
  747. // client's request for the DeleteLoadBalancer operation. The "output" return
  748. // value will be populated with the request's response once the request completes
  749. // successfully.
  750. //
  751. // Use "Send" method on the returned Request to send the API call to the service.
  752. // the "output" return value is not valid until after Send returns without error.
  753. //
  754. // See DeleteLoadBalancer for more information on using the DeleteLoadBalancer
  755. // API call, and error handling.
  756. //
  757. // This method is useful when you want to inject custom logic or configuration
  758. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  759. //
  760. //
  761. // // Example sending a request using the DeleteLoadBalancerRequest method.
  762. // req, resp := client.DeleteLoadBalancerRequest(params)
  763. //
  764. // err := req.Send()
  765. // if err == nil { // resp is now filled
  766. // fmt.Println(resp)
  767. // }
  768. //
  769. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteLoadBalancer
  770. func (c *ELBV2) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (req *request.Request, output *DeleteLoadBalancerOutput) {
  771. op := &request.Operation{
  772. Name: opDeleteLoadBalancer,
  773. HTTPMethod: "POST",
  774. HTTPPath: "/",
  775. }
  776. if input == nil {
  777. input = &DeleteLoadBalancerInput{}
  778. }
  779. output = &DeleteLoadBalancerOutput{}
  780. req = c.newRequest(op, input, output)
  781. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  782. return
  783. }
  784. // DeleteLoadBalancer API operation for Elastic Load Balancing.
  785. //
  786. // Deletes the specified Application Load Balancer or Network Load Balancer
  787. // and its attached listeners.
  788. //
  789. // You can't delete a load balancer if deletion protection is enabled. If the
  790. // load balancer does not exist or has already been deleted, the call succeeds.
  791. //
  792. // Deleting a load balancer does not affect its registered targets. For example,
  793. // your EC2 instances continue to run and are still registered to their target
  794. // groups. If you no longer need these EC2 instances, you can stop or terminate
  795. // them.
  796. //
  797. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  798. // with awserr.Error's Code and Message methods to get detailed information about
  799. // the error.
  800. //
  801. // See the AWS API reference guide for Elastic Load Balancing's
  802. // API operation DeleteLoadBalancer for usage and error information.
  803. //
  804. // Returned Error Codes:
  805. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  806. // The specified load balancer does not exist.
  807. //
  808. // * ErrCodeOperationNotPermittedException "OperationNotPermitted"
  809. // This operation is not allowed.
  810. //
  811. // * ErrCodeResourceInUseException "ResourceInUse"
  812. // A specified resource is in use.
  813. //
  814. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteLoadBalancer
  815. func (c *ELBV2) DeleteLoadBalancer(input *DeleteLoadBalancerInput) (*DeleteLoadBalancerOutput, error) {
  816. req, out := c.DeleteLoadBalancerRequest(input)
  817. return out, req.Send()
  818. }
  819. // DeleteLoadBalancerWithContext is the same as DeleteLoadBalancer with the addition of
  820. // the ability to pass a context and additional request options.
  821. //
  822. // See DeleteLoadBalancer for details on how to use this API operation.
  823. //
  824. // The context must be non-nil and will be used for request cancellation. If
  825. // the context is nil a panic will occur. In the future the SDK may create
  826. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  827. // for more information on using Contexts.
  828. func (c *ELBV2) DeleteLoadBalancerWithContext(ctx aws.Context, input *DeleteLoadBalancerInput, opts ...request.Option) (*DeleteLoadBalancerOutput, error) {
  829. req, out := c.DeleteLoadBalancerRequest(input)
  830. req.SetContext(ctx)
  831. req.ApplyOptions(opts...)
  832. return out, req.Send()
  833. }
  834. const opDeleteRule = "DeleteRule"
  835. // DeleteRuleRequest generates a "aws/request.Request" representing the
  836. // client's request for the DeleteRule operation. The "output" return
  837. // value will be populated with the request's response once the request completes
  838. // successfully.
  839. //
  840. // Use "Send" method on the returned Request to send the API call to the service.
  841. // the "output" return value is not valid until after Send returns without error.
  842. //
  843. // See DeleteRule for more information on using the DeleteRule
  844. // API call, and error handling.
  845. //
  846. // This method is useful when you want to inject custom logic or configuration
  847. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  848. //
  849. //
  850. // // Example sending a request using the DeleteRuleRequest method.
  851. // req, resp := client.DeleteRuleRequest(params)
  852. //
  853. // err := req.Send()
  854. // if err == nil { // resp is now filled
  855. // fmt.Println(resp)
  856. // }
  857. //
  858. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteRule
  859. func (c *ELBV2) DeleteRuleRequest(input *DeleteRuleInput) (req *request.Request, output *DeleteRuleOutput) {
  860. op := &request.Operation{
  861. Name: opDeleteRule,
  862. HTTPMethod: "POST",
  863. HTTPPath: "/",
  864. }
  865. if input == nil {
  866. input = &DeleteRuleInput{}
  867. }
  868. output = &DeleteRuleOutput{}
  869. req = c.newRequest(op, input, output)
  870. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  871. return
  872. }
  873. // DeleteRule API operation for Elastic Load Balancing.
  874. //
  875. // Deletes the specified rule.
  876. //
  877. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  878. // with awserr.Error's Code and Message methods to get detailed information about
  879. // the error.
  880. //
  881. // See the AWS API reference guide for Elastic Load Balancing's
  882. // API operation DeleteRule for usage and error information.
  883. //
  884. // Returned Error Codes:
  885. // * ErrCodeRuleNotFoundException "RuleNotFound"
  886. // The specified rule does not exist.
  887. //
  888. // * ErrCodeOperationNotPermittedException "OperationNotPermitted"
  889. // This operation is not allowed.
  890. //
  891. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteRule
  892. func (c *ELBV2) DeleteRule(input *DeleteRuleInput) (*DeleteRuleOutput, error) {
  893. req, out := c.DeleteRuleRequest(input)
  894. return out, req.Send()
  895. }
  896. // DeleteRuleWithContext is the same as DeleteRule with the addition of
  897. // the ability to pass a context and additional request options.
  898. //
  899. // See DeleteRule for details on how to use this API operation.
  900. //
  901. // The context must be non-nil and will be used for request cancellation. If
  902. // the context is nil a panic will occur. In the future the SDK may create
  903. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  904. // for more information on using Contexts.
  905. func (c *ELBV2) DeleteRuleWithContext(ctx aws.Context, input *DeleteRuleInput, opts ...request.Option) (*DeleteRuleOutput, error) {
  906. req, out := c.DeleteRuleRequest(input)
  907. req.SetContext(ctx)
  908. req.ApplyOptions(opts...)
  909. return out, req.Send()
  910. }
  911. const opDeleteTargetGroup = "DeleteTargetGroup"
  912. // DeleteTargetGroupRequest generates a "aws/request.Request" representing the
  913. // client's request for the DeleteTargetGroup operation. The "output" return
  914. // value will be populated with the request's response once the request completes
  915. // successfully.
  916. //
  917. // Use "Send" method on the returned Request to send the API call to the service.
  918. // the "output" return value is not valid until after Send returns without error.
  919. //
  920. // See DeleteTargetGroup for more information on using the DeleteTargetGroup
  921. // API call, and error handling.
  922. //
  923. // This method is useful when you want to inject custom logic or configuration
  924. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  925. //
  926. //
  927. // // Example sending a request using the DeleteTargetGroupRequest method.
  928. // req, resp := client.DeleteTargetGroupRequest(params)
  929. //
  930. // err := req.Send()
  931. // if err == nil { // resp is now filled
  932. // fmt.Println(resp)
  933. // }
  934. //
  935. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteTargetGroup
  936. func (c *ELBV2) DeleteTargetGroupRequest(input *DeleteTargetGroupInput) (req *request.Request, output *DeleteTargetGroupOutput) {
  937. op := &request.Operation{
  938. Name: opDeleteTargetGroup,
  939. HTTPMethod: "POST",
  940. HTTPPath: "/",
  941. }
  942. if input == nil {
  943. input = &DeleteTargetGroupInput{}
  944. }
  945. output = &DeleteTargetGroupOutput{}
  946. req = c.newRequest(op, input, output)
  947. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  948. return
  949. }
  950. // DeleteTargetGroup API operation for Elastic Load Balancing.
  951. //
  952. // Deletes the specified target group.
  953. //
  954. // You can delete a target group if it is not referenced by any actions. Deleting
  955. // a target group also deletes any associated health checks.
  956. //
  957. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  958. // with awserr.Error's Code and Message methods to get detailed information about
  959. // the error.
  960. //
  961. // See the AWS API reference guide for Elastic Load Balancing's
  962. // API operation DeleteTargetGroup for usage and error information.
  963. //
  964. // Returned Error Codes:
  965. // * ErrCodeResourceInUseException "ResourceInUse"
  966. // A specified resource is in use.
  967. //
  968. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteTargetGroup
  969. func (c *ELBV2) DeleteTargetGroup(input *DeleteTargetGroupInput) (*DeleteTargetGroupOutput, error) {
  970. req, out := c.DeleteTargetGroupRequest(input)
  971. return out, req.Send()
  972. }
  973. // DeleteTargetGroupWithContext is the same as DeleteTargetGroup with the addition of
  974. // the ability to pass a context and additional request options.
  975. //
  976. // See DeleteTargetGroup for details on how to use this API operation.
  977. //
  978. // The context must be non-nil and will be used for request cancellation. If
  979. // the context is nil a panic will occur. In the future the SDK may create
  980. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  981. // for more information on using Contexts.
  982. func (c *ELBV2) DeleteTargetGroupWithContext(ctx aws.Context, input *DeleteTargetGroupInput, opts ...request.Option) (*DeleteTargetGroupOutput, error) {
  983. req, out := c.DeleteTargetGroupRequest(input)
  984. req.SetContext(ctx)
  985. req.ApplyOptions(opts...)
  986. return out, req.Send()
  987. }
  988. const opDeregisterTargets = "DeregisterTargets"
  989. // DeregisterTargetsRequest generates a "aws/request.Request" representing the
  990. // client's request for the DeregisterTargets operation. The "output" return
  991. // value will be populated with the request's response once the request completes
  992. // successfully.
  993. //
  994. // Use "Send" method on the returned Request to send the API call to the service.
  995. // the "output" return value is not valid until after Send returns without error.
  996. //
  997. // See DeregisterTargets for more information on using the DeregisterTargets
  998. // API call, and error handling.
  999. //
  1000. // This method is useful when you want to inject custom logic or configuration
  1001. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1002. //
  1003. //
  1004. // // Example sending a request using the DeregisterTargetsRequest method.
  1005. // req, resp := client.DeregisterTargetsRequest(params)
  1006. //
  1007. // err := req.Send()
  1008. // if err == nil { // resp is now filled
  1009. // fmt.Println(resp)
  1010. // }
  1011. //
  1012. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeregisterTargets
  1013. func (c *ELBV2) DeregisterTargetsRequest(input *DeregisterTargetsInput) (req *request.Request, output *DeregisterTargetsOutput) {
  1014. op := &request.Operation{
  1015. Name: opDeregisterTargets,
  1016. HTTPMethod: "POST",
  1017. HTTPPath: "/",
  1018. }
  1019. if input == nil {
  1020. input = &DeregisterTargetsInput{}
  1021. }
  1022. output = &DeregisterTargetsOutput{}
  1023. req = c.newRequest(op, input, output)
  1024. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1025. return
  1026. }
  1027. // DeregisterTargets API operation for Elastic Load Balancing.
  1028. //
  1029. // Deregisters the specified targets from the specified target group. After
  1030. // the targets are deregistered, they no longer receive traffic from the load
  1031. // balancer.
  1032. //
  1033. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1034. // with awserr.Error's Code and Message methods to get detailed information about
  1035. // the error.
  1036. //
  1037. // See the AWS API reference guide for Elastic Load Balancing's
  1038. // API operation DeregisterTargets for usage and error information.
  1039. //
  1040. // Returned Error Codes:
  1041. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  1042. // The specified target group does not exist.
  1043. //
  1044. // * ErrCodeInvalidTargetException "InvalidTarget"
  1045. // The specified target does not exist, is not in the same VPC as the target
  1046. // group, or has an unsupported instance type.
  1047. //
  1048. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeregisterTargets
  1049. func (c *ELBV2) DeregisterTargets(input *DeregisterTargetsInput) (*DeregisterTargetsOutput, error) {
  1050. req, out := c.DeregisterTargetsRequest(input)
  1051. return out, req.Send()
  1052. }
  1053. // DeregisterTargetsWithContext is the same as DeregisterTargets with the addition of
  1054. // the ability to pass a context and additional request options.
  1055. //
  1056. // See DeregisterTargets for details on how to use this API operation.
  1057. //
  1058. // The context must be non-nil and will be used for request cancellation. If
  1059. // the context is nil a panic will occur. In the future the SDK may create
  1060. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1061. // for more information on using Contexts.
  1062. func (c *ELBV2) DeregisterTargetsWithContext(ctx aws.Context, input *DeregisterTargetsInput, opts ...request.Option) (*DeregisterTargetsOutput, error) {
  1063. req, out := c.DeregisterTargetsRequest(input)
  1064. req.SetContext(ctx)
  1065. req.ApplyOptions(opts...)
  1066. return out, req.Send()
  1067. }
  1068. const opDescribeAccountLimits = "DescribeAccountLimits"
  1069. // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the
  1070. // client's request for the DescribeAccountLimits operation. The "output" return
  1071. // value will be populated with the request's response once the request completes
  1072. // successfully.
  1073. //
  1074. // Use "Send" method on the returned Request to send the API call to the service.
  1075. // the "output" return value is not valid until after Send returns without error.
  1076. //
  1077. // See DescribeAccountLimits for more information on using the DescribeAccountLimits
  1078. // API call, and error handling.
  1079. //
  1080. // This method is useful when you want to inject custom logic or configuration
  1081. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1082. //
  1083. //
  1084. // // Example sending a request using the DescribeAccountLimitsRequest method.
  1085. // req, resp := client.DescribeAccountLimitsRequest(params)
  1086. //
  1087. // err := req.Send()
  1088. // if err == nil { // resp is now filled
  1089. // fmt.Println(resp)
  1090. // }
  1091. //
  1092. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeAccountLimits
  1093. func (c *ELBV2) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) (req *request.Request, output *DescribeAccountLimitsOutput) {
  1094. op := &request.Operation{
  1095. Name: opDescribeAccountLimits,
  1096. HTTPMethod: "POST",
  1097. HTTPPath: "/",
  1098. }
  1099. if input == nil {
  1100. input = &DescribeAccountLimitsInput{}
  1101. }
  1102. output = &DescribeAccountLimitsOutput{}
  1103. req = c.newRequest(op, input, output)
  1104. return
  1105. }
  1106. // DescribeAccountLimits API operation for Elastic Load Balancing.
  1107. //
  1108. // Describes the current Elastic Load Balancing resource limits for your AWS
  1109. // account.
  1110. //
  1111. // For more information, see Limits for Your Application Load Balancers (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html)
  1112. // in the Application Load Balancer Guide or Limits for Your Network Load Balancers
  1113. // (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-limits.html)
  1114. // in the Network Load Balancers Guide.
  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 Elastic Load Balancing's
  1121. // API operation DescribeAccountLimits for usage and error information.
  1122. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeAccountLimits
  1123. func (c *ELBV2) DescribeAccountLimits(input *DescribeAccountLimitsInput) (*DescribeAccountLimitsOutput, error) {
  1124. req, out := c.DescribeAccountLimitsRequest(input)
  1125. return out, req.Send()
  1126. }
  1127. // DescribeAccountLimitsWithContext is the same as DescribeAccountLimits with the addition of
  1128. // the ability to pass a context and additional request options.
  1129. //
  1130. // See DescribeAccountLimits for details on how to use this API operation.
  1131. //
  1132. // The context must be non-nil and will be used for request cancellation. If
  1133. // the context is nil a panic will occur. In the future the SDK may create
  1134. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1135. // for more information on using Contexts.
  1136. func (c *ELBV2) DescribeAccountLimitsWithContext(ctx aws.Context, input *DescribeAccountLimitsInput, opts ...request.Option) (*DescribeAccountLimitsOutput, error) {
  1137. req, out := c.DescribeAccountLimitsRequest(input)
  1138. req.SetContext(ctx)
  1139. req.ApplyOptions(opts...)
  1140. return out, req.Send()
  1141. }
  1142. const opDescribeListenerCertificates = "DescribeListenerCertificates"
  1143. // DescribeListenerCertificatesRequest generates a "aws/request.Request" representing the
  1144. // client's request for the DescribeListenerCertificates operation. The "output" return
  1145. // value will be populated with the request's response once the request completes
  1146. // successfully.
  1147. //
  1148. // Use "Send" method on the returned Request to send the API call to the service.
  1149. // the "output" return value is not valid until after Send returns without error.
  1150. //
  1151. // See DescribeListenerCertificates for more information on using the DescribeListenerCertificates
  1152. // API call, and error handling.
  1153. //
  1154. // This method is useful when you want to inject custom logic or configuration
  1155. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1156. //
  1157. //
  1158. // // Example sending a request using the DescribeListenerCertificatesRequest method.
  1159. // req, resp := client.DescribeListenerCertificatesRequest(params)
  1160. //
  1161. // err := req.Send()
  1162. // if err == nil { // resp is now filled
  1163. // fmt.Println(resp)
  1164. // }
  1165. //
  1166. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListenerCertificates
  1167. func (c *ELBV2) DescribeListenerCertificatesRequest(input *DescribeListenerCertificatesInput) (req *request.Request, output *DescribeListenerCertificatesOutput) {
  1168. op := &request.Operation{
  1169. Name: opDescribeListenerCertificates,
  1170. HTTPMethod: "POST",
  1171. HTTPPath: "/",
  1172. }
  1173. if input == nil {
  1174. input = &DescribeListenerCertificatesInput{}
  1175. }
  1176. output = &DescribeListenerCertificatesOutput{}
  1177. req = c.newRequest(op, input, output)
  1178. return
  1179. }
  1180. // DescribeListenerCertificates API operation for Elastic Load Balancing.
  1181. //
  1182. // Describes the certificates for the specified secure listener.
  1183. //
  1184. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1185. // with awserr.Error's Code and Message methods to get detailed information about
  1186. // the error.
  1187. //
  1188. // See the AWS API reference guide for Elastic Load Balancing's
  1189. // API operation DescribeListenerCertificates for usage and error information.
  1190. //
  1191. // Returned Error Codes:
  1192. // * ErrCodeListenerNotFoundException "ListenerNotFound"
  1193. // The specified listener does not exist.
  1194. //
  1195. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListenerCertificates
  1196. func (c *ELBV2) DescribeListenerCertificates(input *DescribeListenerCertificatesInput) (*DescribeListenerCertificatesOutput, error) {
  1197. req, out := c.DescribeListenerCertificatesRequest(input)
  1198. return out, req.Send()
  1199. }
  1200. // DescribeListenerCertificatesWithContext is the same as DescribeListenerCertificates with the addition of
  1201. // the ability to pass a context and additional request options.
  1202. //
  1203. // See DescribeListenerCertificates for details on how to use this API operation.
  1204. //
  1205. // The context must be non-nil and will be used for request cancellation. If
  1206. // the context is nil a panic will occur. In the future the SDK may create
  1207. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1208. // for more information on using Contexts.
  1209. func (c *ELBV2) DescribeListenerCertificatesWithContext(ctx aws.Context, input *DescribeListenerCertificatesInput, opts ...request.Option) (*DescribeListenerCertificatesOutput, error) {
  1210. req, out := c.DescribeListenerCertificatesRequest(input)
  1211. req.SetContext(ctx)
  1212. req.ApplyOptions(opts...)
  1213. return out, req.Send()
  1214. }
  1215. const opDescribeListeners = "DescribeListeners"
  1216. // DescribeListenersRequest generates a "aws/request.Request" representing the
  1217. // client's request for the DescribeListeners operation. The "output" return
  1218. // value will be populated with the request's response once the request completes
  1219. // successfully.
  1220. //
  1221. // Use "Send" method on the returned Request to send the API call to the service.
  1222. // the "output" return value is not valid until after Send returns without error.
  1223. //
  1224. // See DescribeListeners for more information on using the DescribeListeners
  1225. // API call, and error handling.
  1226. //
  1227. // This method is useful when you want to inject custom logic or configuration
  1228. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1229. //
  1230. //
  1231. // // Example sending a request using the DescribeListenersRequest method.
  1232. // req, resp := client.DescribeListenersRequest(params)
  1233. //
  1234. // err := req.Send()
  1235. // if err == nil { // resp is now filled
  1236. // fmt.Println(resp)
  1237. // }
  1238. //
  1239. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListeners
  1240. func (c *ELBV2) DescribeListenersRequest(input *DescribeListenersInput) (req *request.Request, output *DescribeListenersOutput) {
  1241. op := &request.Operation{
  1242. Name: opDescribeListeners,
  1243. HTTPMethod: "POST",
  1244. HTTPPath: "/",
  1245. Paginator: &request.Paginator{
  1246. InputTokens: []string{"Marker"},
  1247. OutputTokens: []string{"NextMarker"},
  1248. LimitToken: "",
  1249. TruncationToken: "",
  1250. },
  1251. }
  1252. if input == nil {
  1253. input = &DescribeListenersInput{}
  1254. }
  1255. output = &DescribeListenersOutput{}
  1256. req = c.newRequest(op, input, output)
  1257. return
  1258. }
  1259. // DescribeListeners API operation for Elastic Load Balancing.
  1260. //
  1261. // Describes the specified listeners or the listeners for the specified Application
  1262. // Load Balancer or Network Load Balancer. You must specify either a load balancer
  1263. // or one or more listeners.
  1264. //
  1265. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1266. // with awserr.Error's Code and Message methods to get detailed information about
  1267. // the error.
  1268. //
  1269. // See the AWS API reference guide for Elastic Load Balancing's
  1270. // API operation DescribeListeners for usage and error information.
  1271. //
  1272. // Returned Error Codes:
  1273. // * ErrCodeListenerNotFoundException "ListenerNotFound"
  1274. // The specified listener does not exist.
  1275. //
  1276. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  1277. // The specified load balancer does not exist.
  1278. //
  1279. // * ErrCodeUnsupportedProtocolException "UnsupportedProtocol"
  1280. // The specified protocol is not supported.
  1281. //
  1282. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListeners
  1283. func (c *ELBV2) DescribeListeners(input *DescribeListenersInput) (*DescribeListenersOutput, error) {
  1284. req, out := c.DescribeListenersRequest(input)
  1285. return out, req.Send()
  1286. }
  1287. // DescribeListenersWithContext is the same as DescribeListeners with the addition of
  1288. // the ability to pass a context and additional request options.
  1289. //
  1290. // See DescribeListeners for details on how to use this API operation.
  1291. //
  1292. // The context must be non-nil and will be used for request cancellation. If
  1293. // the context is nil a panic will occur. In the future the SDK may create
  1294. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1295. // for more information on using Contexts.
  1296. func (c *ELBV2) DescribeListenersWithContext(ctx aws.Context, input *DescribeListenersInput, opts ...request.Option) (*DescribeListenersOutput, error) {
  1297. req, out := c.DescribeListenersRequest(input)
  1298. req.SetContext(ctx)
  1299. req.ApplyOptions(opts...)
  1300. return out, req.Send()
  1301. }
  1302. // DescribeListenersPages iterates over the pages of a DescribeListeners operation,
  1303. // calling the "fn" function with the response data for each page. To stop
  1304. // iterating, return false from the fn function.
  1305. //
  1306. // See DescribeListeners method for more information on how to use this operation.
  1307. //
  1308. // Note: This operation can generate multiple requests to a service.
  1309. //
  1310. // // Example iterating over at most 3 pages of a DescribeListeners operation.
  1311. // pageNum := 0
  1312. // err := client.DescribeListenersPages(params,
  1313. // func(page *DescribeListenersOutput, lastPage bool) bool {
  1314. // pageNum++
  1315. // fmt.Println(page)
  1316. // return pageNum <= 3
  1317. // })
  1318. //
  1319. func (c *ELBV2) DescribeListenersPages(input *DescribeListenersInput, fn func(*DescribeListenersOutput, bool) bool) error {
  1320. return c.DescribeListenersPagesWithContext(aws.BackgroundContext(), input, fn)
  1321. }
  1322. // DescribeListenersPagesWithContext same as DescribeListenersPages except
  1323. // it takes a Context and allows setting request options on the pages.
  1324. //
  1325. // The context must be non-nil and will be used for request cancellation. If
  1326. // the context is nil a panic will occur. In the future the SDK may create
  1327. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1328. // for more information on using Contexts.
  1329. func (c *ELBV2) DescribeListenersPagesWithContext(ctx aws.Context, input *DescribeListenersInput, fn func(*DescribeListenersOutput, bool) bool, opts ...request.Option) error {
  1330. p := request.Pagination{
  1331. NewRequest: func() (*request.Request, error) {
  1332. var inCpy *DescribeListenersInput
  1333. if input != nil {
  1334. tmp := *input
  1335. inCpy = &tmp
  1336. }
  1337. req, _ := c.DescribeListenersRequest(inCpy)
  1338. req.SetContext(ctx)
  1339. req.ApplyOptions(opts...)
  1340. return req, nil
  1341. },
  1342. }
  1343. cont := true
  1344. for p.Next() && cont {
  1345. cont = fn(p.Page().(*DescribeListenersOutput), !p.HasNextPage())
  1346. }
  1347. return p.Err()
  1348. }
  1349. const opDescribeLoadBalancerAttributes = "DescribeLoadBalancerAttributes"
  1350. // DescribeLoadBalancerAttributesRequest generates a "aws/request.Request" representing the
  1351. // client's request for the DescribeLoadBalancerAttributes operation. The "output" return
  1352. // value will be populated with the request's response once the request completes
  1353. // successfully.
  1354. //
  1355. // Use "Send" method on the returned Request to send the API call to the service.
  1356. // the "output" return value is not valid until after Send returns without error.
  1357. //
  1358. // See DescribeLoadBalancerAttributes for more information on using the DescribeLoadBalancerAttributes
  1359. // API call, and error handling.
  1360. //
  1361. // This method is useful when you want to inject custom logic or configuration
  1362. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1363. //
  1364. //
  1365. // // Example sending a request using the DescribeLoadBalancerAttributesRequest method.
  1366. // req, resp := client.DescribeLoadBalancerAttributesRequest(params)
  1367. //
  1368. // err := req.Send()
  1369. // if err == nil { // resp is now filled
  1370. // fmt.Println(resp)
  1371. // }
  1372. //
  1373. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeLoadBalancerAttributes
  1374. func (c *ELBV2) DescribeLoadBalancerAttributesRequest(input *DescribeLoadBalancerAttributesInput) (req *request.Request, output *DescribeLoadBalancerAttributesOutput) {
  1375. op := &request.Operation{
  1376. Name: opDescribeLoadBalancerAttributes,
  1377. HTTPMethod: "POST",
  1378. HTTPPath: "/",
  1379. }
  1380. if input == nil {
  1381. input = &DescribeLoadBalancerAttributesInput{}
  1382. }
  1383. output = &DescribeLoadBalancerAttributesOutput{}
  1384. req = c.newRequest(op, input, output)
  1385. return
  1386. }
  1387. // DescribeLoadBalancerAttributes API operation for Elastic Load Balancing.
  1388. //
  1389. // Describes the attributes for the specified Application Load Balancer or Network
  1390. // Load Balancer.
  1391. //
  1392. // For more information, see Load Balancer Attributes (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#load-balancer-attributes)
  1393. // in the Application Load Balancers Guide or Load Balancer Attributes (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#load-balancer-attributes)
  1394. // in the Network Load Balancers Guide.
  1395. //
  1396. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1397. // with awserr.Error's Code and Message methods to get detailed information about
  1398. // the error.
  1399. //
  1400. // See the AWS API reference guide for Elastic Load Balancing's
  1401. // API operation DescribeLoadBalancerAttributes for usage and error information.
  1402. //
  1403. // Returned Error Codes:
  1404. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  1405. // The specified load balancer does not exist.
  1406. //
  1407. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeLoadBalancerAttributes
  1408. func (c *ELBV2) DescribeLoadBalancerAttributes(input *DescribeLoadBalancerAttributesInput) (*DescribeLoadBalancerAttributesOutput, error) {
  1409. req, out := c.DescribeLoadBalancerAttributesRequest(input)
  1410. return out, req.Send()
  1411. }
  1412. // DescribeLoadBalancerAttributesWithContext is the same as DescribeLoadBalancerAttributes with the addition of
  1413. // the ability to pass a context and additional request options.
  1414. //
  1415. // See DescribeLoadBalancerAttributes for details on how to use this API operation.
  1416. //
  1417. // The context must be non-nil and will be used for request cancellation. If
  1418. // the context is nil a panic will occur. In the future the SDK may create
  1419. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1420. // for more information on using Contexts.
  1421. func (c *ELBV2) DescribeLoadBalancerAttributesWithContext(ctx aws.Context, input *DescribeLoadBalancerAttributesInput, opts ...request.Option) (*DescribeLoadBalancerAttributesOutput, error) {
  1422. req, out := c.DescribeLoadBalancerAttributesRequest(input)
  1423. req.SetContext(ctx)
  1424. req.ApplyOptions(opts...)
  1425. return out, req.Send()
  1426. }
  1427. const opDescribeLoadBalancers = "DescribeLoadBalancers"
  1428. // DescribeLoadBalancersRequest generates a "aws/request.Request" representing the
  1429. // client's request for the DescribeLoadBalancers operation. The "output" return
  1430. // value will be populated with the request's response once the request completes
  1431. // successfully.
  1432. //
  1433. // Use "Send" method on the returned Request to send the API call to the service.
  1434. // the "output" return value is not valid until after Send returns without error.
  1435. //
  1436. // See DescribeLoadBalancers for more information on using the DescribeLoadBalancers
  1437. // API call, and error handling.
  1438. //
  1439. // This method is useful when you want to inject custom logic or configuration
  1440. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1441. //
  1442. //
  1443. // // Example sending a request using the DescribeLoadBalancersRequest method.
  1444. // req, resp := client.DescribeLoadBalancersRequest(params)
  1445. //
  1446. // err := req.Send()
  1447. // if err == nil { // resp is now filled
  1448. // fmt.Println(resp)
  1449. // }
  1450. //
  1451. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeLoadBalancers
  1452. func (c *ELBV2) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) (req *request.Request, output *DescribeLoadBalancersOutput) {
  1453. op := &request.Operation{
  1454. Name: opDescribeLoadBalancers,
  1455. HTTPMethod: "POST",
  1456. HTTPPath: "/",
  1457. Paginator: &request.Paginator{
  1458. InputTokens: []string{"Marker"},
  1459. OutputTokens: []string{"NextMarker"},
  1460. LimitToken: "",
  1461. TruncationToken: "",
  1462. },
  1463. }
  1464. if input == nil {
  1465. input = &DescribeLoadBalancersInput{}
  1466. }
  1467. output = &DescribeLoadBalancersOutput{}
  1468. req = c.newRequest(op, input, output)
  1469. return
  1470. }
  1471. // DescribeLoadBalancers API operation for Elastic Load Balancing.
  1472. //
  1473. // Describes the specified load balancers or all of your load balancers.
  1474. //
  1475. // To describe the listeners for a load balancer, use DescribeListeners. To
  1476. // describe the attributes for a load balancer, use DescribeLoadBalancerAttributes.
  1477. //
  1478. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1479. // with awserr.Error's Code and Message methods to get detailed information about
  1480. // the error.
  1481. //
  1482. // See the AWS API reference guide for Elastic Load Balancing's
  1483. // API operation DescribeLoadBalancers for usage and error information.
  1484. //
  1485. // Returned Error Codes:
  1486. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  1487. // The specified load balancer does not exist.
  1488. //
  1489. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeLoadBalancers
  1490. func (c *ELBV2) DescribeLoadBalancers(input *DescribeLoadBalancersInput) (*DescribeLoadBalancersOutput, error) {
  1491. req, out := c.DescribeLoadBalancersRequest(input)
  1492. return out, req.Send()
  1493. }
  1494. // DescribeLoadBalancersWithContext is the same as DescribeLoadBalancers with the addition of
  1495. // the ability to pass a context and additional request options.
  1496. //
  1497. // See DescribeLoadBalancers for details on how to use this API operation.
  1498. //
  1499. // The context must be non-nil and will be used for request cancellation. If
  1500. // the context is nil a panic will occur. In the future the SDK may create
  1501. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1502. // for more information on using Contexts.
  1503. func (c *ELBV2) DescribeLoadBalancersWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, opts ...request.Option) (*DescribeLoadBalancersOutput, error) {
  1504. req, out := c.DescribeLoadBalancersRequest(input)
  1505. req.SetContext(ctx)
  1506. req.ApplyOptions(opts...)
  1507. return out, req.Send()
  1508. }
  1509. // DescribeLoadBalancersPages iterates over the pages of a DescribeLoadBalancers operation,
  1510. // calling the "fn" function with the response data for each page. To stop
  1511. // iterating, return false from the fn function.
  1512. //
  1513. // See DescribeLoadBalancers method for more information on how to use this operation.
  1514. //
  1515. // Note: This operation can generate multiple requests to a service.
  1516. //
  1517. // // Example iterating over at most 3 pages of a DescribeLoadBalancers operation.
  1518. // pageNum := 0
  1519. // err := client.DescribeLoadBalancersPages(params,
  1520. // func(page *DescribeLoadBalancersOutput, lastPage bool) bool {
  1521. // pageNum++
  1522. // fmt.Println(page)
  1523. // return pageNum <= 3
  1524. // })
  1525. //
  1526. func (c *ELBV2) DescribeLoadBalancersPages(input *DescribeLoadBalancersInput, fn func(*DescribeLoadBalancersOutput, bool) bool) error {
  1527. return c.DescribeLoadBalancersPagesWithContext(aws.BackgroundContext(), input, fn)
  1528. }
  1529. // DescribeLoadBalancersPagesWithContext same as DescribeLoadBalancersPages except
  1530. // it takes a Context and allows setting request options on the pages.
  1531. //
  1532. // The context must be non-nil and will be used for request cancellation. If
  1533. // the context is nil a panic will occur. In the future the SDK may create
  1534. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1535. // for more information on using Contexts.
  1536. func (c *ELBV2) DescribeLoadBalancersPagesWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, fn func(*DescribeLoadBalancersOutput, bool) bool, opts ...request.Option) error {
  1537. p := request.Pagination{
  1538. NewRequest: func() (*request.Request, error) {
  1539. var inCpy *DescribeLoadBalancersInput
  1540. if input != nil {
  1541. tmp := *input
  1542. inCpy = &tmp
  1543. }
  1544. req, _ := c.DescribeLoadBalancersRequest(inCpy)
  1545. req.SetContext(ctx)
  1546. req.ApplyOptions(opts...)
  1547. return req, nil
  1548. },
  1549. }
  1550. cont := true
  1551. for p.Next() && cont {
  1552. cont = fn(p.Page().(*DescribeLoadBalancersOutput), !p.HasNextPage())
  1553. }
  1554. return p.Err()
  1555. }
  1556. const opDescribeRules = "DescribeRules"
  1557. // DescribeRulesRequest generates a "aws/request.Request" representing the
  1558. // client's request for the DescribeRules operation. The "output" return
  1559. // value will be populated with the request's response once the request completes
  1560. // successfully.
  1561. //
  1562. // Use "Send" method on the returned Request to send the API call to the service.
  1563. // the "output" return value is not valid until after Send returns without error.
  1564. //
  1565. // See DescribeRules for more information on using the DescribeRules
  1566. // API call, and error handling.
  1567. //
  1568. // This method is useful when you want to inject custom logic or configuration
  1569. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1570. //
  1571. //
  1572. // // Example sending a request using the DescribeRulesRequest method.
  1573. // req, resp := client.DescribeRulesRequest(params)
  1574. //
  1575. // err := req.Send()
  1576. // if err == nil { // resp is now filled
  1577. // fmt.Println(resp)
  1578. // }
  1579. //
  1580. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeRules
  1581. func (c *ELBV2) DescribeRulesRequest(input *DescribeRulesInput) (req *request.Request, output *DescribeRulesOutput) {
  1582. op := &request.Operation{
  1583. Name: opDescribeRules,
  1584. HTTPMethod: "POST",
  1585. HTTPPath: "/",
  1586. }
  1587. if input == nil {
  1588. input = &DescribeRulesInput{}
  1589. }
  1590. output = &DescribeRulesOutput{}
  1591. req = c.newRequest(op, input, output)
  1592. return
  1593. }
  1594. // DescribeRules API operation for Elastic Load Balancing.
  1595. //
  1596. // Describes the specified rules or the rules for the specified listener. You
  1597. // must specify either a listener or one or more rules.
  1598. //
  1599. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1600. // with awserr.Error's Code and Message methods to get detailed information about
  1601. // the error.
  1602. //
  1603. // See the AWS API reference guide for Elastic Load Balancing's
  1604. // API operation DescribeRules for usage and error information.
  1605. //
  1606. // Returned Error Codes:
  1607. // * ErrCodeListenerNotFoundException "ListenerNotFound"
  1608. // The specified listener does not exist.
  1609. //
  1610. // * ErrCodeRuleNotFoundException "RuleNotFound"
  1611. // The specified rule does not exist.
  1612. //
  1613. // * ErrCodeUnsupportedProtocolException "UnsupportedProtocol"
  1614. // The specified protocol is not supported.
  1615. //
  1616. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeRules
  1617. func (c *ELBV2) DescribeRules(input *DescribeRulesInput) (*DescribeRulesOutput, error) {
  1618. req, out := c.DescribeRulesRequest(input)
  1619. return out, req.Send()
  1620. }
  1621. // DescribeRulesWithContext is the same as DescribeRules with the addition of
  1622. // the ability to pass a context and additional request options.
  1623. //
  1624. // See DescribeRules for details on how to use this API operation.
  1625. //
  1626. // The context must be non-nil and will be used for request cancellation. If
  1627. // the context is nil a panic will occur. In the future the SDK may create
  1628. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1629. // for more information on using Contexts.
  1630. func (c *ELBV2) DescribeRulesWithContext(ctx aws.Context, input *DescribeRulesInput, opts ...request.Option) (*DescribeRulesOutput, error) {
  1631. req, out := c.DescribeRulesRequest(input)
  1632. req.SetContext(ctx)
  1633. req.ApplyOptions(opts...)
  1634. return out, req.Send()
  1635. }
  1636. const opDescribeSSLPolicies = "DescribeSSLPolicies"
  1637. // DescribeSSLPoliciesRequest generates a "aws/request.Request" representing the
  1638. // client's request for the DescribeSSLPolicies operation. The "output" return
  1639. // value will be populated with the request's response once the request completes
  1640. // successfully.
  1641. //
  1642. // Use "Send" method on the returned Request to send the API call to the service.
  1643. // the "output" return value is not valid until after Send returns without error.
  1644. //
  1645. // See DescribeSSLPolicies for more information on using the DescribeSSLPolicies
  1646. // API call, and error handling.
  1647. //
  1648. // This method is useful when you want to inject custom logic or configuration
  1649. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1650. //
  1651. //
  1652. // // Example sending a request using the DescribeSSLPoliciesRequest method.
  1653. // req, resp := client.DescribeSSLPoliciesRequest(params)
  1654. //
  1655. // err := req.Send()
  1656. // if err == nil { // resp is now filled
  1657. // fmt.Println(resp)
  1658. // }
  1659. //
  1660. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeSSLPolicies
  1661. func (c *ELBV2) DescribeSSLPoliciesRequest(input *DescribeSSLPoliciesInput) (req *request.Request, output *DescribeSSLPoliciesOutput) {
  1662. op := &request.Operation{
  1663. Name: opDescribeSSLPolicies,
  1664. HTTPMethod: "POST",
  1665. HTTPPath: "/",
  1666. }
  1667. if input == nil {
  1668. input = &DescribeSSLPoliciesInput{}
  1669. }
  1670. output = &DescribeSSLPoliciesOutput{}
  1671. req = c.newRequest(op, input, output)
  1672. return
  1673. }
  1674. // DescribeSSLPolicies API operation for Elastic Load Balancing.
  1675. //
  1676. // Describes the specified policies or all policies used for SSL negotiation.
  1677. //
  1678. // For more information, see Security Policies (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies)
  1679. // in the Application Load Balancers Guide.
  1680. //
  1681. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1682. // with awserr.Error's Code and Message methods to get detailed information about
  1683. // the error.
  1684. //
  1685. // See the AWS API reference guide for Elastic Load Balancing's
  1686. // API operation DescribeSSLPolicies for usage and error information.
  1687. //
  1688. // Returned Error Codes:
  1689. // * ErrCodeSSLPolicyNotFoundException "SSLPolicyNotFound"
  1690. // The specified SSL policy does not exist.
  1691. //
  1692. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeSSLPolicies
  1693. func (c *ELBV2) DescribeSSLPolicies(input *DescribeSSLPoliciesInput) (*DescribeSSLPoliciesOutput, error) {
  1694. req, out := c.DescribeSSLPoliciesRequest(input)
  1695. return out, req.Send()
  1696. }
  1697. // DescribeSSLPoliciesWithContext is the same as DescribeSSLPolicies with the addition of
  1698. // the ability to pass a context and additional request options.
  1699. //
  1700. // See DescribeSSLPolicies for details on how to use this API operation.
  1701. //
  1702. // The context must be non-nil and will be used for request cancellation. If
  1703. // the context is nil a panic will occur. In the future the SDK may create
  1704. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1705. // for more information on using Contexts.
  1706. func (c *ELBV2) DescribeSSLPoliciesWithContext(ctx aws.Context, input *DescribeSSLPoliciesInput, opts ...request.Option) (*DescribeSSLPoliciesOutput, error) {
  1707. req, out := c.DescribeSSLPoliciesRequest(input)
  1708. req.SetContext(ctx)
  1709. req.ApplyOptions(opts...)
  1710. return out, req.Send()
  1711. }
  1712. const opDescribeTags = "DescribeTags"
  1713. // DescribeTagsRequest generates a "aws/request.Request" representing the
  1714. // client's request for the DescribeTags operation. The "output" return
  1715. // value will be populated with the request's response once the request completes
  1716. // successfully.
  1717. //
  1718. // Use "Send" method on the returned Request to send the API call to the service.
  1719. // the "output" return value is not valid until after Send returns without error.
  1720. //
  1721. // See DescribeTags for more information on using the DescribeTags
  1722. // API call, and error handling.
  1723. //
  1724. // This method is useful when you want to inject custom logic or configuration
  1725. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1726. //
  1727. //
  1728. // // Example sending a request using the DescribeTagsRequest method.
  1729. // req, resp := client.DescribeTagsRequest(params)
  1730. //
  1731. // err := req.Send()
  1732. // if err == nil { // resp is now filled
  1733. // fmt.Println(resp)
  1734. // }
  1735. //
  1736. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTags
  1737. func (c *ELBV2) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) {
  1738. op := &request.Operation{
  1739. Name: opDescribeTags,
  1740. HTTPMethod: "POST",
  1741. HTTPPath: "/",
  1742. }
  1743. if input == nil {
  1744. input = &DescribeTagsInput{}
  1745. }
  1746. output = &DescribeTagsOutput{}
  1747. req = c.newRequest(op, input, output)
  1748. return
  1749. }
  1750. // DescribeTags API operation for Elastic Load Balancing.
  1751. //
  1752. // Describes the tags for the specified resources. You can describe the tags
  1753. // for one or more Application Load Balancers, Network Load Balancers, and target
  1754. // groups.
  1755. //
  1756. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1757. // with awserr.Error's Code and Message methods to get detailed information about
  1758. // the error.
  1759. //
  1760. // See the AWS API reference guide for Elastic Load Balancing's
  1761. // API operation DescribeTags for usage and error information.
  1762. //
  1763. // Returned Error Codes:
  1764. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  1765. // The specified load balancer does not exist.
  1766. //
  1767. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  1768. // The specified target group does not exist.
  1769. //
  1770. // * ErrCodeListenerNotFoundException "ListenerNotFound"
  1771. // The specified listener does not exist.
  1772. //
  1773. // * ErrCodeRuleNotFoundException "RuleNotFound"
  1774. // The specified rule does not exist.
  1775. //
  1776. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTags
  1777. func (c *ELBV2) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
  1778. req, out := c.DescribeTagsRequest(input)
  1779. return out, req.Send()
  1780. }
  1781. // DescribeTagsWithContext is the same as DescribeTags with the addition of
  1782. // the ability to pass a context and additional request options.
  1783. //
  1784. // See DescribeTags for details on how to use this API operation.
  1785. //
  1786. // The context must be non-nil and will be used for request cancellation. If
  1787. // the context is nil a panic will occur. In the future the SDK may create
  1788. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1789. // for more information on using Contexts.
  1790. func (c *ELBV2) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) {
  1791. req, out := c.DescribeTagsRequest(input)
  1792. req.SetContext(ctx)
  1793. req.ApplyOptions(opts...)
  1794. return out, req.Send()
  1795. }
  1796. const opDescribeTargetGroupAttributes = "DescribeTargetGroupAttributes"
  1797. // DescribeTargetGroupAttributesRequest generates a "aws/request.Request" representing the
  1798. // client's request for the DescribeTargetGroupAttributes operation. The "output" return
  1799. // value will be populated with the request's response once the request completes
  1800. // successfully.
  1801. //
  1802. // Use "Send" method on the returned Request to send the API call to the service.
  1803. // the "output" return value is not valid until after Send returns without error.
  1804. //
  1805. // See DescribeTargetGroupAttributes for more information on using the DescribeTargetGroupAttributes
  1806. // API call, and error handling.
  1807. //
  1808. // This method is useful when you want to inject custom logic or configuration
  1809. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1810. //
  1811. //
  1812. // // Example sending a request using the DescribeTargetGroupAttributesRequest method.
  1813. // req, resp := client.DescribeTargetGroupAttributesRequest(params)
  1814. //
  1815. // err := req.Send()
  1816. // if err == nil { // resp is now filled
  1817. // fmt.Println(resp)
  1818. // }
  1819. //
  1820. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetGroupAttributes
  1821. func (c *ELBV2) DescribeTargetGroupAttributesRequest(input *DescribeTargetGroupAttributesInput) (req *request.Request, output *DescribeTargetGroupAttributesOutput) {
  1822. op := &request.Operation{
  1823. Name: opDescribeTargetGroupAttributes,
  1824. HTTPMethod: "POST",
  1825. HTTPPath: "/",
  1826. }
  1827. if input == nil {
  1828. input = &DescribeTargetGroupAttributesInput{}
  1829. }
  1830. output = &DescribeTargetGroupAttributesOutput{}
  1831. req = c.newRequest(op, input, output)
  1832. return
  1833. }
  1834. // DescribeTargetGroupAttributes API operation for Elastic Load Balancing.
  1835. //
  1836. // Describes the attributes for the specified target group.
  1837. //
  1838. // For more information, see Target Group Attributes (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#target-group-attributes)
  1839. // in the Application Load Balancers Guide or Target Group Attributes (http://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#target-group-attributes)
  1840. // in the Network Load Balancers Guide.
  1841. //
  1842. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1843. // with awserr.Error's Code and Message methods to get detailed information about
  1844. // the error.
  1845. //
  1846. // See the AWS API reference guide for Elastic Load Balancing's
  1847. // API operation DescribeTargetGroupAttributes for usage and error information.
  1848. //
  1849. // Returned Error Codes:
  1850. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  1851. // The specified target group does not exist.
  1852. //
  1853. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetGroupAttributes
  1854. func (c *ELBV2) DescribeTargetGroupAttributes(input *DescribeTargetGroupAttributesInput) (*DescribeTargetGroupAttributesOutput, error) {
  1855. req, out := c.DescribeTargetGroupAttributesRequest(input)
  1856. return out, req.Send()
  1857. }
  1858. // DescribeTargetGroupAttributesWithContext is the same as DescribeTargetGroupAttributes with the addition of
  1859. // the ability to pass a context and additional request options.
  1860. //
  1861. // See DescribeTargetGroupAttributes for details on how to use this API operation.
  1862. //
  1863. // The context must be non-nil and will be used for request cancellation. If
  1864. // the context is nil a panic will occur. In the future the SDK may create
  1865. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1866. // for more information on using Contexts.
  1867. func (c *ELBV2) DescribeTargetGroupAttributesWithContext(ctx aws.Context, input *DescribeTargetGroupAttributesInput, opts ...request.Option) (*DescribeTargetGroupAttributesOutput, error) {
  1868. req, out := c.DescribeTargetGroupAttributesRequest(input)
  1869. req.SetContext(ctx)
  1870. req.ApplyOptions(opts...)
  1871. return out, req.Send()
  1872. }
  1873. const opDescribeTargetGroups = "DescribeTargetGroups"
  1874. // DescribeTargetGroupsRequest generates a "aws/request.Request" representing the
  1875. // client's request for the DescribeTargetGroups operation. The "output" return
  1876. // value will be populated with the request's response once the request completes
  1877. // successfully.
  1878. //
  1879. // Use "Send" method on the returned Request to send the API call to the service.
  1880. // the "output" return value is not valid until after Send returns without error.
  1881. //
  1882. // See DescribeTargetGroups for more information on using the DescribeTargetGroups
  1883. // API call, and error handling.
  1884. //
  1885. // This method is useful when you want to inject custom logic or configuration
  1886. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1887. //
  1888. //
  1889. // // Example sending a request using the DescribeTargetGroupsRequest method.
  1890. // req, resp := client.DescribeTargetGroupsRequest(params)
  1891. //
  1892. // err := req.Send()
  1893. // if err == nil { // resp is now filled
  1894. // fmt.Println(resp)
  1895. // }
  1896. //
  1897. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetGroups
  1898. func (c *ELBV2) DescribeTargetGroupsRequest(input *DescribeTargetGroupsInput) (req *request.Request, output *DescribeTargetGroupsOutput) {
  1899. op := &request.Operation{
  1900. Name: opDescribeTargetGroups,
  1901. HTTPMethod: "POST",
  1902. HTTPPath: "/",
  1903. Paginator: &request.Paginator{
  1904. InputTokens: []string{"Marker"},
  1905. OutputTokens: []string{"NextMarker"},
  1906. LimitToken: "",
  1907. TruncationToken: "",
  1908. },
  1909. }
  1910. if input == nil {
  1911. input = &DescribeTargetGroupsInput{}
  1912. }
  1913. output = &DescribeTargetGroupsOutput{}
  1914. req = c.newRequest(op, input, output)
  1915. return
  1916. }
  1917. // DescribeTargetGroups API operation for Elastic Load Balancing.
  1918. //
  1919. // Describes the specified target groups or all of your target groups. By default,
  1920. // all target groups are described. Alternatively, you can specify one of the
  1921. // following to filter the results: the ARN of the load balancer, the names
  1922. // of one or more target groups, or the ARNs of one or more target groups.
  1923. //
  1924. // To describe the targets for a target group, use DescribeTargetHealth. To
  1925. // describe the attributes of a target group, use DescribeTargetGroupAttributes.
  1926. //
  1927. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1928. // with awserr.Error's Code and Message methods to get detailed information about
  1929. // the error.
  1930. //
  1931. // See the AWS API reference guide for Elastic Load Balancing's
  1932. // API operation DescribeTargetGroups for usage and error information.
  1933. //
  1934. // Returned Error Codes:
  1935. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  1936. // The specified load balancer does not exist.
  1937. //
  1938. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  1939. // The specified target group does not exist.
  1940. //
  1941. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetGroups
  1942. func (c *ELBV2) DescribeTargetGroups(input *DescribeTargetGroupsInput) (*DescribeTargetGroupsOutput, error) {
  1943. req, out := c.DescribeTargetGroupsRequest(input)
  1944. return out, req.Send()
  1945. }
  1946. // DescribeTargetGroupsWithContext is the same as DescribeTargetGroups with the addition of
  1947. // the ability to pass a context and additional request options.
  1948. //
  1949. // See DescribeTargetGroups for details on how to use this API operation.
  1950. //
  1951. // The context must be non-nil and will be used for request cancellation. If
  1952. // the context is nil a panic will occur. In the future the SDK may create
  1953. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1954. // for more information on using Contexts.
  1955. func (c *ELBV2) DescribeTargetGroupsWithContext(ctx aws.Context, input *DescribeTargetGroupsInput, opts ...request.Option) (*DescribeTargetGroupsOutput, error) {
  1956. req, out := c.DescribeTargetGroupsRequest(input)
  1957. req.SetContext(ctx)
  1958. req.ApplyOptions(opts...)
  1959. return out, req.Send()
  1960. }
  1961. // DescribeTargetGroupsPages iterates over the pages of a DescribeTargetGroups operation,
  1962. // calling the "fn" function with the response data for each page. To stop
  1963. // iterating, return false from the fn function.
  1964. //
  1965. // See DescribeTargetGroups method for more information on how to use this operation.
  1966. //
  1967. // Note: This operation can generate multiple requests to a service.
  1968. //
  1969. // // Example iterating over at most 3 pages of a DescribeTargetGroups operation.
  1970. // pageNum := 0
  1971. // err := client.DescribeTargetGroupsPages(params,
  1972. // func(page *DescribeTargetGroupsOutput, lastPage bool) bool {
  1973. // pageNum++
  1974. // fmt.Println(page)
  1975. // return pageNum <= 3
  1976. // })
  1977. //
  1978. func (c *ELBV2) DescribeTargetGroupsPages(input *DescribeTargetGroupsInput, fn func(*DescribeTargetGroupsOutput, bool) bool) error {
  1979. return c.DescribeTargetGroupsPagesWithContext(aws.BackgroundContext(), input, fn)
  1980. }
  1981. // DescribeTargetGroupsPagesWithContext same as DescribeTargetGroupsPages except
  1982. // it takes a Context and allows setting request options on the pages.
  1983. //
  1984. // The context must be non-nil and will be used for request cancellation. If
  1985. // the context is nil a panic will occur. In the future the SDK may create
  1986. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1987. // for more information on using Contexts.
  1988. func (c *ELBV2) DescribeTargetGroupsPagesWithContext(ctx aws.Context, input *DescribeTargetGroupsInput, fn func(*DescribeTargetGroupsOutput, bool) bool, opts ...request.Option) error {
  1989. p := request.Pagination{
  1990. NewRequest: func() (*request.Request, error) {
  1991. var inCpy *DescribeTargetGroupsInput
  1992. if input != nil {
  1993. tmp := *input
  1994. inCpy = &tmp
  1995. }
  1996. req, _ := c.DescribeTargetGroupsRequest(inCpy)
  1997. req.SetContext(ctx)
  1998. req.ApplyOptions(opts...)
  1999. return req, nil
  2000. },
  2001. }
  2002. cont := true
  2003. for p.Next() && cont {
  2004. cont = fn(p.Page().(*DescribeTargetGroupsOutput), !p.HasNextPage())
  2005. }
  2006. return p.Err()
  2007. }
  2008. const opDescribeTargetHealth = "DescribeTargetHealth"
  2009. // DescribeTargetHealthRequest generates a "aws/request.Request" representing the
  2010. // client's request for the DescribeTargetHealth operation. The "output" return
  2011. // value will be populated with the request's response once the request completes
  2012. // successfully.
  2013. //
  2014. // Use "Send" method on the returned Request to send the API call to the service.
  2015. // the "output" return value is not valid until after Send returns without error.
  2016. //
  2017. // See DescribeTargetHealth for more information on using the DescribeTargetHealth
  2018. // API call, and error handling.
  2019. //
  2020. // This method is useful when you want to inject custom logic or configuration
  2021. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2022. //
  2023. //
  2024. // // Example sending a request using the DescribeTargetHealthRequest method.
  2025. // req, resp := client.DescribeTargetHealthRequest(params)
  2026. //
  2027. // err := req.Send()
  2028. // if err == nil { // resp is now filled
  2029. // fmt.Println(resp)
  2030. // }
  2031. //
  2032. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetHealth
  2033. func (c *ELBV2) DescribeTargetHealthRequest(input *DescribeTargetHealthInput) (req *request.Request, output *DescribeTargetHealthOutput) {
  2034. op := &request.Operation{
  2035. Name: opDescribeTargetHealth,
  2036. HTTPMethod: "POST",
  2037. HTTPPath: "/",
  2038. }
  2039. if input == nil {
  2040. input = &DescribeTargetHealthInput{}
  2041. }
  2042. output = &DescribeTargetHealthOutput{}
  2043. req = c.newRequest(op, input, output)
  2044. return
  2045. }
  2046. // DescribeTargetHealth API operation for Elastic Load Balancing.
  2047. //
  2048. // Describes the health of the specified targets or all of your targets.
  2049. //
  2050. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2051. // with awserr.Error's Code and Message methods to get detailed information about
  2052. // the error.
  2053. //
  2054. // See the AWS API reference guide for Elastic Load Balancing's
  2055. // API operation DescribeTargetHealth for usage and error information.
  2056. //
  2057. // Returned Error Codes:
  2058. // * ErrCodeInvalidTargetException "InvalidTarget"
  2059. // The specified target does not exist, is not in the same VPC as the target
  2060. // group, or has an unsupported instance type.
  2061. //
  2062. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  2063. // The specified target group does not exist.
  2064. //
  2065. // * ErrCodeHealthUnavailableException "HealthUnavailable"
  2066. // The health of the specified targets could not be retrieved due to an internal
  2067. // error.
  2068. //
  2069. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetHealth
  2070. func (c *ELBV2) DescribeTargetHealth(input *DescribeTargetHealthInput) (*DescribeTargetHealthOutput, error) {
  2071. req, out := c.DescribeTargetHealthRequest(input)
  2072. return out, req.Send()
  2073. }
  2074. // DescribeTargetHealthWithContext is the same as DescribeTargetHealth with the addition of
  2075. // the ability to pass a context and additional request options.
  2076. //
  2077. // See DescribeTargetHealth for details on how to use this API operation.
  2078. //
  2079. // The context must be non-nil and will be used for request cancellation. If
  2080. // the context is nil a panic will occur. In the future the SDK may create
  2081. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2082. // for more information on using Contexts.
  2083. func (c *ELBV2) DescribeTargetHealthWithContext(ctx aws.Context, input *DescribeTargetHealthInput, opts ...request.Option) (*DescribeTargetHealthOutput, error) {
  2084. req, out := c.DescribeTargetHealthRequest(input)
  2085. req.SetContext(ctx)
  2086. req.ApplyOptions(opts...)
  2087. return out, req.Send()
  2088. }
  2089. const opModifyListener = "ModifyListener"
  2090. // ModifyListenerRequest generates a "aws/request.Request" representing the
  2091. // client's request for the ModifyListener operation. The "output" return
  2092. // value will be populated with the request's response once the request completes
  2093. // successfully.
  2094. //
  2095. // Use "Send" method on the returned Request to send the API call to the service.
  2096. // the "output" return value is not valid until after Send returns without error.
  2097. //
  2098. // See ModifyListener for more information on using the ModifyListener
  2099. // API call, and error handling.
  2100. //
  2101. // This method is useful when you want to inject custom logic or configuration
  2102. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2103. //
  2104. //
  2105. // // Example sending a request using the ModifyListenerRequest method.
  2106. // req, resp := client.ModifyListenerRequest(params)
  2107. //
  2108. // err := req.Send()
  2109. // if err == nil { // resp is now filled
  2110. // fmt.Println(resp)
  2111. // }
  2112. //
  2113. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyListener
  2114. func (c *ELBV2) ModifyListenerRequest(input *ModifyListenerInput) (req *request.Request, output *ModifyListenerOutput) {
  2115. op := &request.Operation{
  2116. Name: opModifyListener,
  2117. HTTPMethod: "POST",
  2118. HTTPPath: "/",
  2119. }
  2120. if input == nil {
  2121. input = &ModifyListenerInput{}
  2122. }
  2123. output = &ModifyListenerOutput{}
  2124. req = c.newRequest(op, input, output)
  2125. return
  2126. }
  2127. // ModifyListener API operation for Elastic Load Balancing.
  2128. //
  2129. // Modifies the specified properties of the specified listener.
  2130. //
  2131. // Any properties that you do not specify retain their current values. However,
  2132. // changing the protocol from HTTPS to HTTP removes the security policy and
  2133. // SSL certificate properties. If you change the protocol from HTTP to HTTPS,
  2134. // you must add the security policy and server certificate.
  2135. //
  2136. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2137. // with awserr.Error's Code and Message methods to get detailed information about
  2138. // the error.
  2139. //
  2140. // See the AWS API reference guide for Elastic Load Balancing's
  2141. // API operation ModifyListener for usage and error information.
  2142. //
  2143. // Returned Error Codes:
  2144. // * ErrCodeDuplicateListenerException "DuplicateListener"
  2145. // A listener with the specified port already exists.
  2146. //
  2147. // * ErrCodeTooManyListenersException "TooManyListeners"
  2148. // You've reached the limit on the number of listeners per load balancer.
  2149. //
  2150. // * ErrCodeTooManyCertificatesException "TooManyCertificates"
  2151. // You've reached the limit on the number of certificates per load balancer.
  2152. //
  2153. // * ErrCodeListenerNotFoundException "ListenerNotFound"
  2154. // The specified listener does not exist.
  2155. //
  2156. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  2157. // The specified target group does not exist.
  2158. //
  2159. // * ErrCodeTargetGroupAssociationLimitException "TargetGroupAssociationLimit"
  2160. // You've reached the limit on the number of load balancers per target group.
  2161. //
  2162. // * ErrCodeIncompatibleProtocolsException "IncompatibleProtocols"
  2163. // The specified configuration is not valid with this protocol.
  2164. //
  2165. // * ErrCodeSSLPolicyNotFoundException "SSLPolicyNotFound"
  2166. // The specified SSL policy does not exist.
  2167. //
  2168. // * ErrCodeCertificateNotFoundException "CertificateNotFound"
  2169. // The specified certificate does not exist.
  2170. //
  2171. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  2172. // The requested configuration is not valid.
  2173. //
  2174. // * ErrCodeUnsupportedProtocolException "UnsupportedProtocol"
  2175. // The specified protocol is not supported.
  2176. //
  2177. // * ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId"
  2178. // You've reached the limit on the number of times a target can be registered
  2179. // with a load balancer.
  2180. //
  2181. // * ErrCodeTooManyTargetsException "TooManyTargets"
  2182. // You've reached the limit on the number of targets.
  2183. //
  2184. // * ErrCodeTooManyActionsException "TooManyActions"
  2185. // You've reached the limit on the number of actions per rule.
  2186. //
  2187. // * ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction"
  2188. // The requested action is not valid.
  2189. //
  2190. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyListener
  2191. func (c *ELBV2) ModifyListener(input *ModifyListenerInput) (*ModifyListenerOutput, error) {
  2192. req, out := c.ModifyListenerRequest(input)
  2193. return out, req.Send()
  2194. }
  2195. // ModifyListenerWithContext is the same as ModifyListener with the addition of
  2196. // the ability to pass a context and additional request options.
  2197. //
  2198. // See ModifyListener for details on how to use this API operation.
  2199. //
  2200. // The context must be non-nil and will be used for request cancellation. If
  2201. // the context is nil a panic will occur. In the future the SDK may create
  2202. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2203. // for more information on using Contexts.
  2204. func (c *ELBV2) ModifyListenerWithContext(ctx aws.Context, input *ModifyListenerInput, opts ...request.Option) (*ModifyListenerOutput, error) {
  2205. req, out := c.ModifyListenerRequest(input)
  2206. req.SetContext(ctx)
  2207. req.ApplyOptions(opts...)
  2208. return out, req.Send()
  2209. }
  2210. const opModifyLoadBalancerAttributes = "ModifyLoadBalancerAttributes"
  2211. // ModifyLoadBalancerAttributesRequest generates a "aws/request.Request" representing the
  2212. // client's request for the ModifyLoadBalancerAttributes operation. The "output" return
  2213. // value will be populated with the request's response once the request completes
  2214. // successfully.
  2215. //
  2216. // Use "Send" method on the returned Request to send the API call to the service.
  2217. // the "output" return value is not valid until after Send returns without error.
  2218. //
  2219. // See ModifyLoadBalancerAttributes for more information on using the ModifyLoadBalancerAttributes
  2220. // API call, and error handling.
  2221. //
  2222. // This method is useful when you want to inject custom logic or configuration
  2223. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2224. //
  2225. //
  2226. // // Example sending a request using the ModifyLoadBalancerAttributesRequest method.
  2227. // req, resp := client.ModifyLoadBalancerAttributesRequest(params)
  2228. //
  2229. // err := req.Send()
  2230. // if err == nil { // resp is now filled
  2231. // fmt.Println(resp)
  2232. // }
  2233. //
  2234. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyLoadBalancerAttributes
  2235. func (c *ELBV2) ModifyLoadBalancerAttributesRequest(input *ModifyLoadBalancerAttributesInput) (req *request.Request, output *ModifyLoadBalancerAttributesOutput) {
  2236. op := &request.Operation{
  2237. Name: opModifyLoadBalancerAttributes,
  2238. HTTPMethod: "POST",
  2239. HTTPPath: "/",
  2240. }
  2241. if input == nil {
  2242. input = &ModifyLoadBalancerAttributesInput{}
  2243. }
  2244. output = &ModifyLoadBalancerAttributesOutput{}
  2245. req = c.newRequest(op, input, output)
  2246. return
  2247. }
  2248. // ModifyLoadBalancerAttributes API operation for Elastic Load Balancing.
  2249. //
  2250. // Modifies the specified attributes of the specified Application Load Balancer
  2251. // or Network Load Balancer.
  2252. //
  2253. // If any of the specified attributes can't be modified as requested, the call
  2254. // fails. Any existing attributes that you do not modify retain their current
  2255. // values.
  2256. //
  2257. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2258. // with awserr.Error's Code and Message methods to get detailed information about
  2259. // the error.
  2260. //
  2261. // See the AWS API reference guide for Elastic Load Balancing's
  2262. // API operation ModifyLoadBalancerAttributes for usage and error information.
  2263. //
  2264. // Returned Error Codes:
  2265. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  2266. // The specified load balancer does not exist.
  2267. //
  2268. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  2269. // The requested configuration is not valid.
  2270. //
  2271. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyLoadBalancerAttributes
  2272. func (c *ELBV2) ModifyLoadBalancerAttributes(input *ModifyLoadBalancerAttributesInput) (*ModifyLoadBalancerAttributesOutput, error) {
  2273. req, out := c.ModifyLoadBalancerAttributesRequest(input)
  2274. return out, req.Send()
  2275. }
  2276. // ModifyLoadBalancerAttributesWithContext is the same as ModifyLoadBalancerAttributes with the addition of
  2277. // the ability to pass a context and additional request options.
  2278. //
  2279. // See ModifyLoadBalancerAttributes for details on how to use this API operation.
  2280. //
  2281. // The context must be non-nil and will be used for request cancellation. If
  2282. // the context is nil a panic will occur. In the future the SDK may create
  2283. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2284. // for more information on using Contexts.
  2285. func (c *ELBV2) ModifyLoadBalancerAttributesWithContext(ctx aws.Context, input *ModifyLoadBalancerAttributesInput, opts ...request.Option) (*ModifyLoadBalancerAttributesOutput, error) {
  2286. req, out := c.ModifyLoadBalancerAttributesRequest(input)
  2287. req.SetContext(ctx)
  2288. req.ApplyOptions(opts...)
  2289. return out, req.Send()
  2290. }
  2291. const opModifyRule = "ModifyRule"
  2292. // ModifyRuleRequest generates a "aws/request.Request" representing the
  2293. // client's request for the ModifyRule operation. The "output" return
  2294. // value will be populated with the request's response once the request completes
  2295. // successfully.
  2296. //
  2297. // Use "Send" method on the returned Request to send the API call to the service.
  2298. // the "output" return value is not valid until after Send returns without error.
  2299. //
  2300. // See ModifyRule for more information on using the ModifyRule
  2301. // API call, and error handling.
  2302. //
  2303. // This method is useful when you want to inject custom logic or configuration
  2304. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2305. //
  2306. //
  2307. // // Example sending a request using the ModifyRuleRequest method.
  2308. // req, resp := client.ModifyRuleRequest(params)
  2309. //
  2310. // err := req.Send()
  2311. // if err == nil { // resp is now filled
  2312. // fmt.Println(resp)
  2313. // }
  2314. //
  2315. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyRule
  2316. func (c *ELBV2) ModifyRuleRequest(input *ModifyRuleInput) (req *request.Request, output *ModifyRuleOutput) {
  2317. op := &request.Operation{
  2318. Name: opModifyRule,
  2319. HTTPMethod: "POST",
  2320. HTTPPath: "/",
  2321. }
  2322. if input == nil {
  2323. input = &ModifyRuleInput{}
  2324. }
  2325. output = &ModifyRuleOutput{}
  2326. req = c.newRequest(op, input, output)
  2327. return
  2328. }
  2329. // ModifyRule API operation for Elastic Load Balancing.
  2330. //
  2331. // Modifies the specified rule.
  2332. //
  2333. // Any existing properties that you do not modify retain their current values.
  2334. //
  2335. // To modify the actions for the default rule, use ModifyListener.
  2336. //
  2337. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2338. // with awserr.Error's Code and Message methods to get detailed information about
  2339. // the error.
  2340. //
  2341. // See the AWS API reference guide for Elastic Load Balancing's
  2342. // API operation ModifyRule for usage and error information.
  2343. //
  2344. // Returned Error Codes:
  2345. // * ErrCodeTargetGroupAssociationLimitException "TargetGroupAssociationLimit"
  2346. // You've reached the limit on the number of load balancers per target group.
  2347. //
  2348. // * ErrCodeIncompatibleProtocolsException "IncompatibleProtocols"
  2349. // The specified configuration is not valid with this protocol.
  2350. //
  2351. // * ErrCodeRuleNotFoundException "RuleNotFound"
  2352. // The specified rule does not exist.
  2353. //
  2354. // * ErrCodeOperationNotPermittedException "OperationNotPermitted"
  2355. // This operation is not allowed.
  2356. //
  2357. // * ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId"
  2358. // You've reached the limit on the number of times a target can be registered
  2359. // with a load balancer.
  2360. //
  2361. // * ErrCodeTooManyTargetsException "TooManyTargets"
  2362. // You've reached the limit on the number of targets.
  2363. //
  2364. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  2365. // The specified target group does not exist.
  2366. //
  2367. // * ErrCodeUnsupportedProtocolException "UnsupportedProtocol"
  2368. // The specified protocol is not supported.
  2369. //
  2370. // * ErrCodeTooManyActionsException "TooManyActions"
  2371. // You've reached the limit on the number of actions per rule.
  2372. //
  2373. // * ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction"
  2374. // The requested action is not valid.
  2375. //
  2376. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyRule
  2377. func (c *ELBV2) ModifyRule(input *ModifyRuleInput) (*ModifyRuleOutput, error) {
  2378. req, out := c.ModifyRuleRequest(input)
  2379. return out, req.Send()
  2380. }
  2381. // ModifyRuleWithContext is the same as ModifyRule with the addition of
  2382. // the ability to pass a context and additional request options.
  2383. //
  2384. // See ModifyRule for details on how to use this API operation.
  2385. //
  2386. // The context must be non-nil and will be used for request cancellation. If
  2387. // the context is nil a panic will occur. In the future the SDK may create
  2388. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2389. // for more information on using Contexts.
  2390. func (c *ELBV2) ModifyRuleWithContext(ctx aws.Context, input *ModifyRuleInput, opts ...request.Option) (*ModifyRuleOutput, error) {
  2391. req, out := c.ModifyRuleRequest(input)
  2392. req.SetContext(ctx)
  2393. req.ApplyOptions(opts...)
  2394. return out, req.Send()
  2395. }
  2396. const opModifyTargetGroup = "ModifyTargetGroup"
  2397. // ModifyTargetGroupRequest generates a "aws/request.Request" representing the
  2398. // client's request for the ModifyTargetGroup operation. The "output" return
  2399. // value will be populated with the request's response once the request completes
  2400. // successfully.
  2401. //
  2402. // Use "Send" method on the returned Request to send the API call to the service.
  2403. // the "output" return value is not valid until after Send returns without error.
  2404. //
  2405. // See ModifyTargetGroup for more information on using the ModifyTargetGroup
  2406. // API call, and error handling.
  2407. //
  2408. // This method is useful when you want to inject custom logic or configuration
  2409. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2410. //
  2411. //
  2412. // // Example sending a request using the ModifyTargetGroupRequest method.
  2413. // req, resp := client.ModifyTargetGroupRequest(params)
  2414. //
  2415. // err := req.Send()
  2416. // if err == nil { // resp is now filled
  2417. // fmt.Println(resp)
  2418. // }
  2419. //
  2420. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroup
  2421. func (c *ELBV2) ModifyTargetGroupRequest(input *ModifyTargetGroupInput) (req *request.Request, output *ModifyTargetGroupOutput) {
  2422. op := &request.Operation{
  2423. Name: opModifyTargetGroup,
  2424. HTTPMethod: "POST",
  2425. HTTPPath: "/",
  2426. }
  2427. if input == nil {
  2428. input = &ModifyTargetGroupInput{}
  2429. }
  2430. output = &ModifyTargetGroupOutput{}
  2431. req = c.newRequest(op, input, output)
  2432. return
  2433. }
  2434. // ModifyTargetGroup API operation for Elastic Load Balancing.
  2435. //
  2436. // Modifies the health checks used when evaluating the health state of the targets
  2437. // in the specified target group.
  2438. //
  2439. // To monitor the health of the targets, use DescribeTargetHealth.
  2440. //
  2441. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2442. // with awserr.Error's Code and Message methods to get detailed information about
  2443. // the error.
  2444. //
  2445. // See the AWS API reference guide for Elastic Load Balancing's
  2446. // API operation ModifyTargetGroup for usage and error information.
  2447. //
  2448. // Returned Error Codes:
  2449. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  2450. // The specified target group does not exist.
  2451. //
  2452. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  2453. // The requested configuration is not valid.
  2454. //
  2455. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroup
  2456. func (c *ELBV2) ModifyTargetGroup(input *ModifyTargetGroupInput) (*ModifyTargetGroupOutput, error) {
  2457. req, out := c.ModifyTargetGroupRequest(input)
  2458. return out, req.Send()
  2459. }
  2460. // ModifyTargetGroupWithContext is the same as ModifyTargetGroup with the addition of
  2461. // the ability to pass a context and additional request options.
  2462. //
  2463. // See ModifyTargetGroup for details on how to use this API operation.
  2464. //
  2465. // The context must be non-nil and will be used for request cancellation. If
  2466. // the context is nil a panic will occur. In the future the SDK may create
  2467. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2468. // for more information on using Contexts.
  2469. func (c *ELBV2) ModifyTargetGroupWithContext(ctx aws.Context, input *ModifyTargetGroupInput, opts ...request.Option) (*ModifyTargetGroupOutput, error) {
  2470. req, out := c.ModifyTargetGroupRequest(input)
  2471. req.SetContext(ctx)
  2472. req.ApplyOptions(opts...)
  2473. return out, req.Send()
  2474. }
  2475. const opModifyTargetGroupAttributes = "ModifyTargetGroupAttributes"
  2476. // ModifyTargetGroupAttributesRequest generates a "aws/request.Request" representing the
  2477. // client's request for the ModifyTargetGroupAttributes operation. The "output" return
  2478. // value will be populated with the request's response once the request completes
  2479. // successfully.
  2480. //
  2481. // Use "Send" method on the returned Request to send the API call to the service.
  2482. // the "output" return value is not valid until after Send returns without error.
  2483. //
  2484. // See ModifyTargetGroupAttributes for more information on using the ModifyTargetGroupAttributes
  2485. // API call, and error handling.
  2486. //
  2487. // This method is useful when you want to inject custom logic or configuration
  2488. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2489. //
  2490. //
  2491. // // Example sending a request using the ModifyTargetGroupAttributesRequest method.
  2492. // req, resp := client.ModifyTargetGroupAttributesRequest(params)
  2493. //
  2494. // err := req.Send()
  2495. // if err == nil { // resp is now filled
  2496. // fmt.Println(resp)
  2497. // }
  2498. //
  2499. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroupAttributes
  2500. func (c *ELBV2) ModifyTargetGroupAttributesRequest(input *ModifyTargetGroupAttributesInput) (req *request.Request, output *ModifyTargetGroupAttributesOutput) {
  2501. op := &request.Operation{
  2502. Name: opModifyTargetGroupAttributes,
  2503. HTTPMethod: "POST",
  2504. HTTPPath: "/",
  2505. }
  2506. if input == nil {
  2507. input = &ModifyTargetGroupAttributesInput{}
  2508. }
  2509. output = &ModifyTargetGroupAttributesOutput{}
  2510. req = c.newRequest(op, input, output)
  2511. return
  2512. }
  2513. // ModifyTargetGroupAttributes API operation for Elastic Load Balancing.
  2514. //
  2515. // Modifies the specified attributes of the specified target group.
  2516. //
  2517. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2518. // with awserr.Error's Code and Message methods to get detailed information about
  2519. // the error.
  2520. //
  2521. // See the AWS API reference guide for Elastic Load Balancing's
  2522. // API operation ModifyTargetGroupAttributes for usage and error information.
  2523. //
  2524. // Returned Error Codes:
  2525. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  2526. // The specified target group does not exist.
  2527. //
  2528. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  2529. // The requested configuration is not valid.
  2530. //
  2531. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroupAttributes
  2532. func (c *ELBV2) ModifyTargetGroupAttributes(input *ModifyTargetGroupAttributesInput) (*ModifyTargetGroupAttributesOutput, error) {
  2533. req, out := c.ModifyTargetGroupAttributesRequest(input)
  2534. return out, req.Send()
  2535. }
  2536. // ModifyTargetGroupAttributesWithContext is the same as ModifyTargetGroupAttributes with the addition of
  2537. // the ability to pass a context and additional request options.
  2538. //
  2539. // See ModifyTargetGroupAttributes for details on how to use this API operation.
  2540. //
  2541. // The context must be non-nil and will be used for request cancellation. If
  2542. // the context is nil a panic will occur. In the future the SDK may create
  2543. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2544. // for more information on using Contexts.
  2545. func (c *ELBV2) ModifyTargetGroupAttributesWithContext(ctx aws.Context, input *ModifyTargetGroupAttributesInput, opts ...request.Option) (*ModifyTargetGroupAttributesOutput, error) {
  2546. req, out := c.ModifyTargetGroupAttributesRequest(input)
  2547. req.SetContext(ctx)
  2548. req.ApplyOptions(opts...)
  2549. return out, req.Send()
  2550. }
  2551. const opRegisterTargets = "RegisterTargets"
  2552. // RegisterTargetsRequest generates a "aws/request.Request" representing the
  2553. // client's request for the RegisterTargets operation. The "output" return
  2554. // value will be populated with the request's response once the request completes
  2555. // successfully.
  2556. //
  2557. // Use "Send" method on the returned Request to send the API call to the service.
  2558. // the "output" return value is not valid until after Send returns without error.
  2559. //
  2560. // See RegisterTargets for more information on using the RegisterTargets
  2561. // API call, and error handling.
  2562. //
  2563. // This method is useful when you want to inject custom logic or configuration
  2564. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2565. //
  2566. //
  2567. // // Example sending a request using the RegisterTargetsRequest method.
  2568. // req, resp := client.RegisterTargetsRequest(params)
  2569. //
  2570. // err := req.Send()
  2571. // if err == nil { // resp is now filled
  2572. // fmt.Println(resp)
  2573. // }
  2574. //
  2575. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RegisterTargets
  2576. func (c *ELBV2) RegisterTargetsRequest(input *RegisterTargetsInput) (req *request.Request, output *RegisterTargetsOutput) {
  2577. op := &request.Operation{
  2578. Name: opRegisterTargets,
  2579. HTTPMethod: "POST",
  2580. HTTPPath: "/",
  2581. }
  2582. if input == nil {
  2583. input = &RegisterTargetsInput{}
  2584. }
  2585. output = &RegisterTargetsOutput{}
  2586. req = c.newRequest(op, input, output)
  2587. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2588. return
  2589. }
  2590. // RegisterTargets API operation for Elastic Load Balancing.
  2591. //
  2592. // Registers the specified targets with the specified target group.
  2593. //
  2594. // If the target is an EC2 instance, it must be in the running state when you
  2595. // register it.
  2596. //
  2597. // By default, the load balancer routes requests to registered targets using
  2598. // the protocol and port for the target group. Alternatively, you can override
  2599. // the port for a target when you register it. You can register each EC2 instance
  2600. // or IP address with the same target group multiple times using different ports.
  2601. //
  2602. // With a Network Load Balancer, you cannot register instances by instance ID
  2603. // if they have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1,
  2604. // G1, G2, HI1, HS1, M1, M2, M3, and T1. You can register instances of these
  2605. // types by IP address.
  2606. //
  2607. // To remove a target from a target group, use DeregisterTargets.
  2608. //
  2609. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2610. // with awserr.Error's Code and Message methods to get detailed information about
  2611. // the error.
  2612. //
  2613. // See the AWS API reference guide for Elastic Load Balancing's
  2614. // API operation RegisterTargets for usage and error information.
  2615. //
  2616. // Returned Error Codes:
  2617. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  2618. // The specified target group does not exist.
  2619. //
  2620. // * ErrCodeTooManyTargetsException "TooManyTargets"
  2621. // You've reached the limit on the number of targets.
  2622. //
  2623. // * ErrCodeInvalidTargetException "InvalidTarget"
  2624. // The specified target does not exist, is not in the same VPC as the target
  2625. // group, or has an unsupported instance type.
  2626. //
  2627. // * ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId"
  2628. // You've reached the limit on the number of times a target can be registered
  2629. // with a load balancer.
  2630. //
  2631. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RegisterTargets
  2632. func (c *ELBV2) RegisterTargets(input *RegisterTargetsInput) (*RegisterTargetsOutput, error) {
  2633. req, out := c.RegisterTargetsRequest(input)
  2634. return out, req.Send()
  2635. }
  2636. // RegisterTargetsWithContext is the same as RegisterTargets with the addition of
  2637. // the ability to pass a context and additional request options.
  2638. //
  2639. // See RegisterTargets for details on how to use this API operation.
  2640. //
  2641. // The context must be non-nil and will be used for request cancellation. If
  2642. // the context is nil a panic will occur. In the future the SDK may create
  2643. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2644. // for more information on using Contexts.
  2645. func (c *ELBV2) RegisterTargetsWithContext(ctx aws.Context, input *RegisterTargetsInput, opts ...request.Option) (*RegisterTargetsOutput, error) {
  2646. req, out := c.RegisterTargetsRequest(input)
  2647. req.SetContext(ctx)
  2648. req.ApplyOptions(opts...)
  2649. return out, req.Send()
  2650. }
  2651. const opRemoveListenerCertificates = "RemoveListenerCertificates"
  2652. // RemoveListenerCertificatesRequest generates a "aws/request.Request" representing the
  2653. // client's request for the RemoveListenerCertificates operation. The "output" return
  2654. // value will be populated with the request's response once the request completes
  2655. // successfully.
  2656. //
  2657. // Use "Send" method on the returned Request to send the API call to the service.
  2658. // the "output" return value is not valid until after Send returns without error.
  2659. //
  2660. // See RemoveListenerCertificates for more information on using the RemoveListenerCertificates
  2661. // API call, and error handling.
  2662. //
  2663. // This method is useful when you want to inject custom logic or configuration
  2664. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2665. //
  2666. //
  2667. // // Example sending a request using the RemoveListenerCertificatesRequest method.
  2668. // req, resp := client.RemoveListenerCertificatesRequest(params)
  2669. //
  2670. // err := req.Send()
  2671. // if err == nil { // resp is now filled
  2672. // fmt.Println(resp)
  2673. // }
  2674. //
  2675. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveListenerCertificates
  2676. func (c *ELBV2) RemoveListenerCertificatesRequest(input *RemoveListenerCertificatesInput) (req *request.Request, output *RemoveListenerCertificatesOutput) {
  2677. op := &request.Operation{
  2678. Name: opRemoveListenerCertificates,
  2679. HTTPMethod: "POST",
  2680. HTTPPath: "/",
  2681. }
  2682. if input == nil {
  2683. input = &RemoveListenerCertificatesInput{}
  2684. }
  2685. output = &RemoveListenerCertificatesOutput{}
  2686. req = c.newRequest(op, input, output)
  2687. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2688. return
  2689. }
  2690. // RemoveListenerCertificates API operation for Elastic Load Balancing.
  2691. //
  2692. // Removes the specified certificate from the specified secure listener.
  2693. //
  2694. // You can't remove the default certificate for a listener. To replace the default
  2695. // certificate, call ModifyListener.
  2696. //
  2697. // To list the certificates for your listener, use DescribeListenerCertificates.
  2698. //
  2699. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2700. // with awserr.Error's Code and Message methods to get detailed information about
  2701. // the error.
  2702. //
  2703. // See the AWS API reference guide for Elastic Load Balancing's
  2704. // API operation RemoveListenerCertificates for usage and error information.
  2705. //
  2706. // Returned Error Codes:
  2707. // * ErrCodeListenerNotFoundException "ListenerNotFound"
  2708. // The specified listener does not exist.
  2709. //
  2710. // * ErrCodeOperationNotPermittedException "OperationNotPermitted"
  2711. // This operation is not allowed.
  2712. //
  2713. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveListenerCertificates
  2714. func (c *ELBV2) RemoveListenerCertificates(input *RemoveListenerCertificatesInput) (*RemoveListenerCertificatesOutput, error) {
  2715. req, out := c.RemoveListenerCertificatesRequest(input)
  2716. return out, req.Send()
  2717. }
  2718. // RemoveListenerCertificatesWithContext is the same as RemoveListenerCertificates with the addition of
  2719. // the ability to pass a context and additional request options.
  2720. //
  2721. // See RemoveListenerCertificates for details on how to use this API operation.
  2722. //
  2723. // The context must be non-nil and will be used for request cancellation. If
  2724. // the context is nil a panic will occur. In the future the SDK may create
  2725. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2726. // for more information on using Contexts.
  2727. func (c *ELBV2) RemoveListenerCertificatesWithContext(ctx aws.Context, input *RemoveListenerCertificatesInput, opts ...request.Option) (*RemoveListenerCertificatesOutput, error) {
  2728. req, out := c.RemoveListenerCertificatesRequest(input)
  2729. req.SetContext(ctx)
  2730. req.ApplyOptions(opts...)
  2731. return out, req.Send()
  2732. }
  2733. const opRemoveTags = "RemoveTags"
  2734. // RemoveTagsRequest generates a "aws/request.Request" representing the
  2735. // client's request for the RemoveTags operation. The "output" return
  2736. // value will be populated with the request's response once the request completes
  2737. // successfully.
  2738. //
  2739. // Use "Send" method on the returned Request to send the API call to the service.
  2740. // the "output" return value is not valid until after Send returns without error.
  2741. //
  2742. // See RemoveTags for more information on using the RemoveTags
  2743. // API call, and error handling.
  2744. //
  2745. // This method is useful when you want to inject custom logic or configuration
  2746. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2747. //
  2748. //
  2749. // // Example sending a request using the RemoveTagsRequest method.
  2750. // req, resp := client.RemoveTagsRequest(params)
  2751. //
  2752. // err := req.Send()
  2753. // if err == nil { // resp is now filled
  2754. // fmt.Println(resp)
  2755. // }
  2756. //
  2757. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveTags
  2758. func (c *ELBV2) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) {
  2759. op := &request.Operation{
  2760. Name: opRemoveTags,
  2761. HTTPMethod: "POST",
  2762. HTTPPath: "/",
  2763. }
  2764. if input == nil {
  2765. input = &RemoveTagsInput{}
  2766. }
  2767. output = &RemoveTagsOutput{}
  2768. req = c.newRequest(op, input, output)
  2769. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2770. return
  2771. }
  2772. // RemoveTags API operation for Elastic Load Balancing.
  2773. //
  2774. // Removes the specified tags from the specified Elastic Load Balancing resource.
  2775. //
  2776. // To list the current tags for your resources, use DescribeTags.
  2777. //
  2778. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2779. // with awserr.Error's Code and Message methods to get detailed information about
  2780. // the error.
  2781. //
  2782. // See the AWS API reference guide for Elastic Load Balancing's
  2783. // API operation RemoveTags for usage and error information.
  2784. //
  2785. // Returned Error Codes:
  2786. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  2787. // The specified load balancer does not exist.
  2788. //
  2789. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  2790. // The specified target group does not exist.
  2791. //
  2792. // * ErrCodeListenerNotFoundException "ListenerNotFound"
  2793. // The specified listener does not exist.
  2794. //
  2795. // * ErrCodeRuleNotFoundException "RuleNotFound"
  2796. // The specified rule does not exist.
  2797. //
  2798. // * ErrCodeTooManyTagsException "TooManyTags"
  2799. // You've reached the limit on the number of tags per load balancer.
  2800. //
  2801. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveTags
  2802. func (c *ELBV2) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) {
  2803. req, out := c.RemoveTagsRequest(input)
  2804. return out, req.Send()
  2805. }
  2806. // RemoveTagsWithContext is the same as RemoveTags with the addition of
  2807. // the ability to pass a context and additional request options.
  2808. //
  2809. // See RemoveTags for details on how to use this API operation.
  2810. //
  2811. // The context must be non-nil and will be used for request cancellation. If
  2812. // the context is nil a panic will occur. In the future the SDK may create
  2813. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2814. // for more information on using Contexts.
  2815. func (c *ELBV2) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error) {
  2816. req, out := c.RemoveTagsRequest(input)
  2817. req.SetContext(ctx)
  2818. req.ApplyOptions(opts...)
  2819. return out, req.Send()
  2820. }
  2821. const opSetIpAddressType = "SetIpAddressType"
  2822. // SetIpAddressTypeRequest generates a "aws/request.Request" representing the
  2823. // client's request for the SetIpAddressType operation. The "output" return
  2824. // value will be populated with the request's response once the request completes
  2825. // successfully.
  2826. //
  2827. // Use "Send" method on the returned Request to send the API call to the service.
  2828. // the "output" return value is not valid until after Send returns without error.
  2829. //
  2830. // See SetIpAddressType for more information on using the SetIpAddressType
  2831. // API call, and error handling.
  2832. //
  2833. // This method is useful when you want to inject custom logic or configuration
  2834. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2835. //
  2836. //
  2837. // // Example sending a request using the SetIpAddressTypeRequest method.
  2838. // req, resp := client.SetIpAddressTypeRequest(params)
  2839. //
  2840. // err := req.Send()
  2841. // if err == nil { // resp is now filled
  2842. // fmt.Println(resp)
  2843. // }
  2844. //
  2845. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetIpAddressType
  2846. func (c *ELBV2) SetIpAddressTypeRequest(input *SetIpAddressTypeInput) (req *request.Request, output *SetIpAddressTypeOutput) {
  2847. op := &request.Operation{
  2848. Name: opSetIpAddressType,
  2849. HTTPMethod: "POST",
  2850. HTTPPath: "/",
  2851. }
  2852. if input == nil {
  2853. input = &SetIpAddressTypeInput{}
  2854. }
  2855. output = &SetIpAddressTypeOutput{}
  2856. req = c.newRequest(op, input, output)
  2857. return
  2858. }
  2859. // SetIpAddressType API operation for Elastic Load Balancing.
  2860. //
  2861. // Sets the type of IP addresses used by the subnets of the specified Application
  2862. // Load Balancer or Network Load Balancer.
  2863. //
  2864. // Network Load Balancers must use ipv4.
  2865. //
  2866. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2867. // with awserr.Error's Code and Message methods to get detailed information about
  2868. // the error.
  2869. //
  2870. // See the AWS API reference guide for Elastic Load Balancing's
  2871. // API operation SetIpAddressType for usage and error information.
  2872. //
  2873. // Returned Error Codes:
  2874. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  2875. // The specified load balancer does not exist.
  2876. //
  2877. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  2878. // The requested configuration is not valid.
  2879. //
  2880. // * ErrCodeInvalidSubnetException "InvalidSubnet"
  2881. // The specified subnet is out of available addresses.
  2882. //
  2883. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetIpAddressType
  2884. func (c *ELBV2) SetIpAddressType(input *SetIpAddressTypeInput) (*SetIpAddressTypeOutput, error) {
  2885. req, out := c.SetIpAddressTypeRequest(input)
  2886. return out, req.Send()
  2887. }
  2888. // SetIpAddressTypeWithContext is the same as SetIpAddressType with the addition of
  2889. // the ability to pass a context and additional request options.
  2890. //
  2891. // See SetIpAddressType for details on how to use this API operation.
  2892. //
  2893. // The context must be non-nil and will be used for request cancellation. If
  2894. // the context is nil a panic will occur. In the future the SDK may create
  2895. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2896. // for more information on using Contexts.
  2897. func (c *ELBV2) SetIpAddressTypeWithContext(ctx aws.Context, input *SetIpAddressTypeInput, opts ...request.Option) (*SetIpAddressTypeOutput, error) {
  2898. req, out := c.SetIpAddressTypeRequest(input)
  2899. req.SetContext(ctx)
  2900. req.ApplyOptions(opts...)
  2901. return out, req.Send()
  2902. }
  2903. const opSetRulePriorities = "SetRulePriorities"
  2904. // SetRulePrioritiesRequest generates a "aws/request.Request" representing the
  2905. // client's request for the SetRulePriorities operation. The "output" return
  2906. // value will be populated with the request's response once the request completes
  2907. // successfully.
  2908. //
  2909. // Use "Send" method on the returned Request to send the API call to the service.
  2910. // the "output" return value is not valid until after Send returns without error.
  2911. //
  2912. // See SetRulePriorities for more information on using the SetRulePriorities
  2913. // API call, and error handling.
  2914. //
  2915. // This method is useful when you want to inject custom logic or configuration
  2916. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2917. //
  2918. //
  2919. // // Example sending a request using the SetRulePrioritiesRequest method.
  2920. // req, resp := client.SetRulePrioritiesRequest(params)
  2921. //
  2922. // err := req.Send()
  2923. // if err == nil { // resp is now filled
  2924. // fmt.Println(resp)
  2925. // }
  2926. //
  2927. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetRulePriorities
  2928. func (c *ELBV2) SetRulePrioritiesRequest(input *SetRulePrioritiesInput) (req *request.Request, output *SetRulePrioritiesOutput) {
  2929. op := &request.Operation{
  2930. Name: opSetRulePriorities,
  2931. HTTPMethod: "POST",
  2932. HTTPPath: "/",
  2933. }
  2934. if input == nil {
  2935. input = &SetRulePrioritiesInput{}
  2936. }
  2937. output = &SetRulePrioritiesOutput{}
  2938. req = c.newRequest(op, input, output)
  2939. return
  2940. }
  2941. // SetRulePriorities API operation for Elastic Load Balancing.
  2942. //
  2943. // Sets the priorities of the specified rules.
  2944. //
  2945. // You can reorder the rules as long as there are no priority conflicts in the
  2946. // new order. Any existing rules that you do not specify retain their current
  2947. // priority.
  2948. //
  2949. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2950. // with awserr.Error's Code and Message methods to get detailed information about
  2951. // the error.
  2952. //
  2953. // See the AWS API reference guide for Elastic Load Balancing's
  2954. // API operation SetRulePriorities for usage and error information.
  2955. //
  2956. // Returned Error Codes:
  2957. // * ErrCodeRuleNotFoundException "RuleNotFound"
  2958. // The specified rule does not exist.
  2959. //
  2960. // * ErrCodePriorityInUseException "PriorityInUse"
  2961. // The specified priority is in use.
  2962. //
  2963. // * ErrCodeOperationNotPermittedException "OperationNotPermitted"
  2964. // This operation is not allowed.
  2965. //
  2966. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetRulePriorities
  2967. func (c *ELBV2) SetRulePriorities(input *SetRulePrioritiesInput) (*SetRulePrioritiesOutput, error) {
  2968. req, out := c.SetRulePrioritiesRequest(input)
  2969. return out, req.Send()
  2970. }
  2971. // SetRulePrioritiesWithContext is the same as SetRulePriorities with the addition of
  2972. // the ability to pass a context and additional request options.
  2973. //
  2974. // See SetRulePriorities for details on how to use this API operation.
  2975. //
  2976. // The context must be non-nil and will be used for request cancellation. If
  2977. // the context is nil a panic will occur. In the future the SDK may create
  2978. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2979. // for more information on using Contexts.
  2980. func (c *ELBV2) SetRulePrioritiesWithContext(ctx aws.Context, input *SetRulePrioritiesInput, opts ...request.Option) (*SetRulePrioritiesOutput, error) {
  2981. req, out := c.SetRulePrioritiesRequest(input)
  2982. req.SetContext(ctx)
  2983. req.ApplyOptions(opts...)
  2984. return out, req.Send()
  2985. }
  2986. const opSetSecurityGroups = "SetSecurityGroups"
  2987. // SetSecurityGroupsRequest generates a "aws/request.Request" representing the
  2988. // client's request for the SetSecurityGroups operation. The "output" return
  2989. // value will be populated with the request's response once the request completes
  2990. // successfully.
  2991. //
  2992. // Use "Send" method on the returned Request to send the API call to the service.
  2993. // the "output" return value is not valid until after Send returns without error.
  2994. //
  2995. // See SetSecurityGroups for more information on using the SetSecurityGroups
  2996. // API call, and error handling.
  2997. //
  2998. // This method is useful when you want to inject custom logic or configuration
  2999. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3000. //
  3001. //
  3002. // // Example sending a request using the SetSecurityGroupsRequest method.
  3003. // req, resp := client.SetSecurityGroupsRequest(params)
  3004. //
  3005. // err := req.Send()
  3006. // if err == nil { // resp is now filled
  3007. // fmt.Println(resp)
  3008. // }
  3009. //
  3010. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSecurityGroups
  3011. func (c *ELBV2) SetSecurityGroupsRequest(input *SetSecurityGroupsInput) (req *request.Request, output *SetSecurityGroupsOutput) {
  3012. op := &request.Operation{
  3013. Name: opSetSecurityGroups,
  3014. HTTPMethod: "POST",
  3015. HTTPPath: "/",
  3016. }
  3017. if input == nil {
  3018. input = &SetSecurityGroupsInput{}
  3019. }
  3020. output = &SetSecurityGroupsOutput{}
  3021. req = c.newRequest(op, input, output)
  3022. return
  3023. }
  3024. // SetSecurityGroups API operation for Elastic Load Balancing.
  3025. //
  3026. // Associates the specified security groups with the specified Application Load
  3027. // Balancer. The specified security groups override the previously associated
  3028. // security groups.
  3029. //
  3030. // You can't specify a security group for a Network Load Balancer.
  3031. //
  3032. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3033. // with awserr.Error's Code and Message methods to get detailed information about
  3034. // the error.
  3035. //
  3036. // See the AWS API reference guide for Elastic Load Balancing's
  3037. // API operation SetSecurityGroups for usage and error information.
  3038. //
  3039. // Returned Error Codes:
  3040. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  3041. // The specified load balancer does not exist.
  3042. //
  3043. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  3044. // The requested configuration is not valid.
  3045. //
  3046. // * ErrCodeInvalidSecurityGroupException "InvalidSecurityGroup"
  3047. // The specified security group does not exist.
  3048. //
  3049. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSecurityGroups
  3050. func (c *ELBV2) SetSecurityGroups(input *SetSecurityGroupsInput) (*SetSecurityGroupsOutput, error) {
  3051. req, out := c.SetSecurityGroupsRequest(input)
  3052. return out, req.Send()
  3053. }
  3054. // SetSecurityGroupsWithContext is the same as SetSecurityGroups with the addition of
  3055. // the ability to pass a context and additional request options.
  3056. //
  3057. // See SetSecurityGroups for details on how to use this API operation.
  3058. //
  3059. // The context must be non-nil and will be used for request cancellation. If
  3060. // the context is nil a panic will occur. In the future the SDK may create
  3061. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3062. // for more information on using Contexts.
  3063. func (c *ELBV2) SetSecurityGroupsWithContext(ctx aws.Context, input *SetSecurityGroupsInput, opts ...request.Option) (*SetSecurityGroupsOutput, error) {
  3064. req, out := c.SetSecurityGroupsRequest(input)
  3065. req.SetContext(ctx)
  3066. req.ApplyOptions(opts...)
  3067. return out, req.Send()
  3068. }
  3069. const opSetSubnets = "SetSubnets"
  3070. // SetSubnetsRequest generates a "aws/request.Request" representing the
  3071. // client's request for the SetSubnets operation. The "output" return
  3072. // value will be populated with the request's response once the request completes
  3073. // successfully.
  3074. //
  3075. // Use "Send" method on the returned Request to send the API call to the service.
  3076. // the "output" return value is not valid until after Send returns without error.
  3077. //
  3078. // See SetSubnets for more information on using the SetSubnets
  3079. // API call, and error handling.
  3080. //
  3081. // This method is useful when you want to inject custom logic or configuration
  3082. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3083. //
  3084. //
  3085. // // Example sending a request using the SetSubnetsRequest method.
  3086. // req, resp := client.SetSubnetsRequest(params)
  3087. //
  3088. // err := req.Send()
  3089. // if err == nil { // resp is now filled
  3090. // fmt.Println(resp)
  3091. // }
  3092. //
  3093. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSubnets
  3094. func (c *ELBV2) SetSubnetsRequest(input *SetSubnetsInput) (req *request.Request, output *SetSubnetsOutput) {
  3095. op := &request.Operation{
  3096. Name: opSetSubnets,
  3097. HTTPMethod: "POST",
  3098. HTTPPath: "/",
  3099. }
  3100. if input == nil {
  3101. input = &SetSubnetsInput{}
  3102. }
  3103. output = &SetSubnetsOutput{}
  3104. req = c.newRequest(op, input, output)
  3105. return
  3106. }
  3107. // SetSubnets API operation for Elastic Load Balancing.
  3108. //
  3109. // Enables the Availability Zone for the specified public subnets for the specified
  3110. // Application Load Balancer. The specified subnets replace the previously enabled
  3111. // subnets.
  3112. //
  3113. // You can't change the subnets for a Network Load Balancer.
  3114. //
  3115. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3116. // with awserr.Error's Code and Message methods to get detailed information about
  3117. // the error.
  3118. //
  3119. // See the AWS API reference guide for Elastic Load Balancing's
  3120. // API operation SetSubnets for usage and error information.
  3121. //
  3122. // Returned Error Codes:
  3123. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  3124. // The specified load balancer does not exist.
  3125. //
  3126. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  3127. // The requested configuration is not valid.
  3128. //
  3129. // * ErrCodeSubnetNotFoundException "SubnetNotFound"
  3130. // The specified subnet does not exist.
  3131. //
  3132. // * ErrCodeInvalidSubnetException "InvalidSubnet"
  3133. // The specified subnet is out of available addresses.
  3134. //
  3135. // * ErrCodeAllocationIdNotFoundException "AllocationIdNotFound"
  3136. // The specified allocation ID does not exist.
  3137. //
  3138. // * ErrCodeAvailabilityZoneNotSupportedException "AvailabilityZoneNotSupported"
  3139. // The specified Availability Zone is not supported.
  3140. //
  3141. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSubnets
  3142. func (c *ELBV2) SetSubnets(input *SetSubnetsInput) (*SetSubnetsOutput, error) {
  3143. req, out := c.SetSubnetsRequest(input)
  3144. return out, req.Send()
  3145. }
  3146. // SetSubnetsWithContext is the same as SetSubnets with the addition of
  3147. // the ability to pass a context and additional request options.
  3148. //
  3149. // See SetSubnets for details on how to use this API operation.
  3150. //
  3151. // The context must be non-nil and will be used for request cancellation. If
  3152. // the context is nil a panic will occur. In the future the SDK may create
  3153. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3154. // for more information on using Contexts.
  3155. func (c *ELBV2) SetSubnetsWithContext(ctx aws.Context, input *SetSubnetsInput, opts ...request.Option) (*SetSubnetsOutput, error) {
  3156. req, out := c.SetSubnetsRequest(input)
  3157. req.SetContext(ctx)
  3158. req.ApplyOptions(opts...)
  3159. return out, req.Send()
  3160. }
  3161. // Information about an action.
  3162. type Action struct {
  3163. _ struct{} `type:"structure"`
  3164. // [HTTPS listener] Information for using Amazon Cognito to authenticate users.
  3165. // Specify only when Type is authenticate-cognito.
  3166. AuthenticateCognitoConfig *AuthenticateCognitoActionConfig `type:"structure"`
  3167. // [HTTPS listener] Information about an identity provider that is compliant
  3168. // with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc.
  3169. AuthenticateOidcConfig *AuthenticateOidcActionConfig `type:"structure"`
  3170. // [Application Load Balancer] Information for creating an action that returns
  3171. // a custom HTTP response. Specify only when Type is fixed-response.
  3172. FixedResponseConfig *FixedResponseActionConfig `type:"structure"`
  3173. // The order for the action. This value is required for rules with multiple
  3174. // actions. The action with the lowest value for order is performed first. The
  3175. // final action to be performed must be a forward or a fixed-response action.
  3176. Order *int64 `min:"1" type:"integer"`
  3177. // [Application Load Balancer] Information for creating a redirect action. Specify
  3178. // only when Type is redirect.
  3179. RedirectConfig *RedirectActionConfig `type:"structure"`
  3180. // The Amazon Resource Name (ARN) of the target group. Specify only when Type
  3181. // is forward.
  3182. TargetGroupArn *string `type:"string"`
  3183. // The type of action. Each rule must include exactly one of the following types
  3184. // of actions: forward, fixed-response, or redirect.
  3185. //
  3186. // Type is a required field
  3187. Type *string `type:"string" required:"true" enum:"ActionTypeEnum"`
  3188. }
  3189. // String returns the string representation
  3190. func (s Action) String() string {
  3191. return awsutil.Prettify(s)
  3192. }
  3193. // GoString returns the string representation
  3194. func (s Action) GoString() string {
  3195. return s.String()
  3196. }
  3197. // Validate inspects the fields of the type to determine if they are valid.
  3198. func (s *Action) Validate() error {
  3199. invalidParams := request.ErrInvalidParams{Context: "Action"}
  3200. if s.Order != nil && *s.Order < 1 {
  3201. invalidParams.Add(request.NewErrParamMinValue("Order", 1))
  3202. }
  3203. if s.Type == nil {
  3204. invalidParams.Add(request.NewErrParamRequired("Type"))
  3205. }
  3206. if s.AuthenticateCognitoConfig != nil {
  3207. if err := s.AuthenticateCognitoConfig.Validate(); err != nil {
  3208. invalidParams.AddNested("AuthenticateCognitoConfig", err.(request.ErrInvalidParams))
  3209. }
  3210. }
  3211. if s.AuthenticateOidcConfig != nil {
  3212. if err := s.AuthenticateOidcConfig.Validate(); err != nil {
  3213. invalidParams.AddNested("AuthenticateOidcConfig", err.(request.ErrInvalidParams))
  3214. }
  3215. }
  3216. if s.FixedResponseConfig != nil {
  3217. if err := s.FixedResponseConfig.Validate(); err != nil {
  3218. invalidParams.AddNested("FixedResponseConfig", err.(request.ErrInvalidParams))
  3219. }
  3220. }
  3221. if s.RedirectConfig != nil {
  3222. if err := s.RedirectConfig.Validate(); err != nil {
  3223. invalidParams.AddNested("RedirectConfig", err.(request.ErrInvalidParams))
  3224. }
  3225. }
  3226. if invalidParams.Len() > 0 {
  3227. return invalidParams
  3228. }
  3229. return nil
  3230. }
  3231. // SetAuthenticateCognitoConfig sets the AuthenticateCognitoConfig field's value.
  3232. func (s *Action) SetAuthenticateCognitoConfig(v *AuthenticateCognitoActionConfig) *Action {
  3233. s.AuthenticateCognitoConfig = v
  3234. return s
  3235. }
  3236. // SetAuthenticateOidcConfig sets the AuthenticateOidcConfig field's value.
  3237. func (s *Action) SetAuthenticateOidcConfig(v *AuthenticateOidcActionConfig) *Action {
  3238. s.AuthenticateOidcConfig = v
  3239. return s
  3240. }
  3241. // SetFixedResponseConfig sets the FixedResponseConfig field's value.
  3242. func (s *Action) SetFixedResponseConfig(v *FixedResponseActionConfig) *Action {
  3243. s.FixedResponseConfig = v
  3244. return s
  3245. }
  3246. // SetOrder sets the Order field's value.
  3247. func (s *Action) SetOrder(v int64) *Action {
  3248. s.Order = &v
  3249. return s
  3250. }
  3251. // SetRedirectConfig sets the RedirectConfig field's value.
  3252. func (s *Action) SetRedirectConfig(v *RedirectActionConfig) *Action {
  3253. s.RedirectConfig = v
  3254. return s
  3255. }
  3256. // SetTargetGroupArn sets the TargetGroupArn field's value.
  3257. func (s *Action) SetTargetGroupArn(v string) *Action {
  3258. s.TargetGroupArn = &v
  3259. return s
  3260. }
  3261. // SetType sets the Type field's value.
  3262. func (s *Action) SetType(v string) *Action {
  3263. s.Type = &v
  3264. return s
  3265. }
  3266. type AddListenerCertificatesInput struct {
  3267. _ struct{} `type:"structure"`
  3268. // The certificate to add. You can specify one certificate per call. Set CertificateArn
  3269. // to the certificate ARN but do not set IsDefault.
  3270. //
  3271. // Certificates is a required field
  3272. Certificates []*Certificate `type:"list" required:"true"`
  3273. // The Amazon Resource Name (ARN) of the listener.
  3274. //
  3275. // ListenerArn is a required field
  3276. ListenerArn *string `type:"string" required:"true"`
  3277. }
  3278. // String returns the string representation
  3279. func (s AddListenerCertificatesInput) String() string {
  3280. return awsutil.Prettify(s)
  3281. }
  3282. // GoString returns the string representation
  3283. func (s AddListenerCertificatesInput) GoString() string {
  3284. return s.String()
  3285. }
  3286. // Validate inspects the fields of the type to determine if they are valid.
  3287. func (s *AddListenerCertificatesInput) Validate() error {
  3288. invalidParams := request.ErrInvalidParams{Context: "AddListenerCertificatesInput"}
  3289. if s.Certificates == nil {
  3290. invalidParams.Add(request.NewErrParamRequired("Certificates"))
  3291. }
  3292. if s.ListenerArn == nil {
  3293. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  3294. }
  3295. if invalidParams.Len() > 0 {
  3296. return invalidParams
  3297. }
  3298. return nil
  3299. }
  3300. // SetCertificates sets the Certificates field's value.
  3301. func (s *AddListenerCertificatesInput) SetCertificates(v []*Certificate) *AddListenerCertificatesInput {
  3302. s.Certificates = v
  3303. return s
  3304. }
  3305. // SetListenerArn sets the ListenerArn field's value.
  3306. func (s *AddListenerCertificatesInput) SetListenerArn(v string) *AddListenerCertificatesInput {
  3307. s.ListenerArn = &v
  3308. return s
  3309. }
  3310. type AddListenerCertificatesOutput struct {
  3311. _ struct{} `type:"structure"`
  3312. // Information about the certificates.
  3313. Certificates []*Certificate `type:"list"`
  3314. }
  3315. // String returns the string representation
  3316. func (s AddListenerCertificatesOutput) String() string {
  3317. return awsutil.Prettify(s)
  3318. }
  3319. // GoString returns the string representation
  3320. func (s AddListenerCertificatesOutput) GoString() string {
  3321. return s.String()
  3322. }
  3323. // SetCertificates sets the Certificates field's value.
  3324. func (s *AddListenerCertificatesOutput) SetCertificates(v []*Certificate) *AddListenerCertificatesOutput {
  3325. s.Certificates = v
  3326. return s
  3327. }
  3328. type AddTagsInput struct {
  3329. _ struct{} `type:"structure"`
  3330. // The Amazon Resource Name (ARN) of the resource.
  3331. //
  3332. // ResourceArns is a required field
  3333. ResourceArns []*string `type:"list" required:"true"`
  3334. // The tags. Each resource can have a maximum of 10 tags.
  3335. //
  3336. // Tags is a required field
  3337. Tags []*Tag `min:"1" type:"list" required:"true"`
  3338. }
  3339. // String returns the string representation
  3340. func (s AddTagsInput) String() string {
  3341. return awsutil.Prettify(s)
  3342. }
  3343. // GoString returns the string representation
  3344. func (s AddTagsInput) GoString() string {
  3345. return s.String()
  3346. }
  3347. // Validate inspects the fields of the type to determine if they are valid.
  3348. func (s *AddTagsInput) Validate() error {
  3349. invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"}
  3350. if s.ResourceArns == nil {
  3351. invalidParams.Add(request.NewErrParamRequired("ResourceArns"))
  3352. }
  3353. if s.Tags == nil {
  3354. invalidParams.Add(request.NewErrParamRequired("Tags"))
  3355. }
  3356. if s.Tags != nil && len(s.Tags) < 1 {
  3357. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  3358. }
  3359. if s.Tags != nil {
  3360. for i, v := range s.Tags {
  3361. if v == nil {
  3362. continue
  3363. }
  3364. if err := v.Validate(); err != nil {
  3365. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  3366. }
  3367. }
  3368. }
  3369. if invalidParams.Len() > 0 {
  3370. return invalidParams
  3371. }
  3372. return nil
  3373. }
  3374. // SetResourceArns sets the ResourceArns field's value.
  3375. func (s *AddTagsInput) SetResourceArns(v []*string) *AddTagsInput {
  3376. s.ResourceArns = v
  3377. return s
  3378. }
  3379. // SetTags sets the Tags field's value.
  3380. func (s *AddTagsInput) SetTags(v []*Tag) *AddTagsInput {
  3381. s.Tags = v
  3382. return s
  3383. }
  3384. type AddTagsOutput struct {
  3385. _ struct{} `type:"structure"`
  3386. }
  3387. // String returns the string representation
  3388. func (s AddTagsOutput) String() string {
  3389. return awsutil.Prettify(s)
  3390. }
  3391. // GoString returns the string representation
  3392. func (s AddTagsOutput) GoString() string {
  3393. return s.String()
  3394. }
  3395. // Request parameters to use when integrating with Amazon Cognito to authenticate
  3396. // users.
  3397. type AuthenticateCognitoActionConfig struct {
  3398. _ struct{} `type:"structure"`
  3399. // The query parameters (up to 10) to include in the redirect request to the
  3400. // authorization endpoint.
  3401. AuthenticationRequestExtraParams map[string]*string `type:"map"`
  3402. // The behavior if the user is not authenticated. The following are possible
  3403. // values:
  3404. //
  3405. // * deny - Return an HTTP 401 Unauthorized error.
  3406. //
  3407. // * allow - Allow the request to be forwarded to the target.
  3408. //
  3409. // authenticate
  3410. OnUnauthenticatedRequest *string `type:"string" enum:"AuthenticateCognitoActionConditionalBehaviorEnum"`
  3411. // The set of user claims to be requested from the IdP. The default is openid.
  3412. //
  3413. // To verify which scope values your IdP supports and how to separate multiple
  3414. // values, see the documentation for your IdP.
  3415. Scope *string `type:"string"`
  3416. // The name of the cookie used to maintain session information. The default
  3417. // is AWSELBAuthSessionCookie.
  3418. SessionCookieName *string `type:"string"`
  3419. // The maximum duration of the authentication session, in seconds. The default
  3420. // is 604800 seconds (7 days).
  3421. SessionTimeout *int64 `type:"long"`
  3422. // The Amazon Resource Name (ARN) of the Amazon Cognito user pool.
  3423. //
  3424. // UserPoolArn is a required field
  3425. UserPoolArn *string `type:"string" required:"true"`
  3426. // The ID of the Amazon Cognito user pool client.
  3427. //
  3428. // UserPoolClientId is a required field
  3429. UserPoolClientId *string `type:"string" required:"true"`
  3430. // The domain prefix or fully-qualified domain name of the Amazon Cognito user
  3431. // pool.
  3432. //
  3433. // UserPoolDomain is a required field
  3434. UserPoolDomain *string `type:"string" required:"true"`
  3435. }
  3436. // String returns the string representation
  3437. func (s AuthenticateCognitoActionConfig) String() string {
  3438. return awsutil.Prettify(s)
  3439. }
  3440. // GoString returns the string representation
  3441. func (s AuthenticateCognitoActionConfig) GoString() string {
  3442. return s.String()
  3443. }
  3444. // Validate inspects the fields of the type to determine if they are valid.
  3445. func (s *AuthenticateCognitoActionConfig) Validate() error {
  3446. invalidParams := request.ErrInvalidParams{Context: "AuthenticateCognitoActionConfig"}
  3447. if s.UserPoolArn == nil {
  3448. invalidParams.Add(request.NewErrParamRequired("UserPoolArn"))
  3449. }
  3450. if s.UserPoolClientId == nil {
  3451. invalidParams.Add(request.NewErrParamRequired("UserPoolClientId"))
  3452. }
  3453. if s.UserPoolDomain == nil {
  3454. invalidParams.Add(request.NewErrParamRequired("UserPoolDomain"))
  3455. }
  3456. if invalidParams.Len() > 0 {
  3457. return invalidParams
  3458. }
  3459. return nil
  3460. }
  3461. // SetAuthenticationRequestExtraParams sets the AuthenticationRequestExtraParams field's value.
  3462. func (s *AuthenticateCognitoActionConfig) SetAuthenticationRequestExtraParams(v map[string]*string) *AuthenticateCognitoActionConfig {
  3463. s.AuthenticationRequestExtraParams = v
  3464. return s
  3465. }
  3466. // SetOnUnauthenticatedRequest sets the OnUnauthenticatedRequest field's value.
  3467. func (s *AuthenticateCognitoActionConfig) SetOnUnauthenticatedRequest(v string) *AuthenticateCognitoActionConfig {
  3468. s.OnUnauthenticatedRequest = &v
  3469. return s
  3470. }
  3471. // SetScope sets the Scope field's value.
  3472. func (s *AuthenticateCognitoActionConfig) SetScope(v string) *AuthenticateCognitoActionConfig {
  3473. s.Scope = &v
  3474. return s
  3475. }
  3476. // SetSessionCookieName sets the SessionCookieName field's value.
  3477. func (s *AuthenticateCognitoActionConfig) SetSessionCookieName(v string) *AuthenticateCognitoActionConfig {
  3478. s.SessionCookieName = &v
  3479. return s
  3480. }
  3481. // SetSessionTimeout sets the SessionTimeout field's value.
  3482. func (s *AuthenticateCognitoActionConfig) SetSessionTimeout(v int64) *AuthenticateCognitoActionConfig {
  3483. s.SessionTimeout = &v
  3484. return s
  3485. }
  3486. // SetUserPoolArn sets the UserPoolArn field's value.
  3487. func (s *AuthenticateCognitoActionConfig) SetUserPoolArn(v string) *AuthenticateCognitoActionConfig {
  3488. s.UserPoolArn = &v
  3489. return s
  3490. }
  3491. // SetUserPoolClientId sets the UserPoolClientId field's value.
  3492. func (s *AuthenticateCognitoActionConfig) SetUserPoolClientId(v string) *AuthenticateCognitoActionConfig {
  3493. s.UserPoolClientId = &v
  3494. return s
  3495. }
  3496. // SetUserPoolDomain sets the UserPoolDomain field's value.
  3497. func (s *AuthenticateCognitoActionConfig) SetUserPoolDomain(v string) *AuthenticateCognitoActionConfig {
  3498. s.UserPoolDomain = &v
  3499. return s
  3500. }
  3501. // Request parameters when using an identity provider (IdP) that is compliant
  3502. // with OpenID Connect (OIDC) to authenticate users.
  3503. type AuthenticateOidcActionConfig struct {
  3504. _ struct{} `type:"structure"`
  3505. // The query parameters (up to 10) to include in the redirect request to the
  3506. // authorization endpoint.
  3507. AuthenticationRequestExtraParams map[string]*string `type:"map"`
  3508. // The authorization endpoint of the IdP. This must be a full URL, including
  3509. // the HTTPS protocol, the domain, and the path.
  3510. //
  3511. // AuthorizationEndpoint is a required field
  3512. AuthorizationEndpoint *string `type:"string" required:"true"`
  3513. // The OAuth 2.0 client identifier.
  3514. //
  3515. // ClientId is a required field
  3516. ClientId *string `type:"string" required:"true"`
  3517. // The OAuth 2.0 client secret.
  3518. //
  3519. // ClientSecret is a required field
  3520. ClientSecret *string `type:"string" required:"true"`
  3521. // The OIDC issuer identifier of the IdP. This must be a full URL, including
  3522. // the HTTPS protocol, the domain, and the path.
  3523. //
  3524. // Issuer is a required field
  3525. Issuer *string `type:"string" required:"true"`
  3526. // The behavior if the user is not authenticated. The following are possible
  3527. // values:
  3528. //
  3529. // * deny - Return an HTTP 401 Unauthorized error.
  3530. //
  3531. // * allow - Allow the request to be forwarded to the target.
  3532. //
  3533. // authenticate
  3534. OnUnauthenticatedRequest *string `type:"string" enum:"AuthenticateOidcActionConditionalBehaviorEnum"`
  3535. // The set of user claims to be requested from the IdP. The default is openid.
  3536. //
  3537. // To verify which scope values your IdP supports and how to separate multiple
  3538. // values, see the documentation for your IdP.
  3539. Scope *string `type:"string"`
  3540. // The name of the cookie used to maintain session information. The default
  3541. // is AWSELBAuthSessionCookie.
  3542. SessionCookieName *string `type:"string"`
  3543. // The maximum duration of the authentication session, in seconds. The default
  3544. // is 604800 seconds (7 days).
  3545. SessionTimeout *int64 `type:"long"`
  3546. // The token endpoint of the IdP. This must be a full URL, including the HTTPS
  3547. // protocol, the domain, and the path.
  3548. //
  3549. // TokenEndpoint is a required field
  3550. TokenEndpoint *string `type:"string" required:"true"`
  3551. // The user info endpoint of the IdP. This must be a full URL, including the
  3552. // HTTPS protocol, the domain, and the path.
  3553. //
  3554. // UserInfoEndpoint is a required field
  3555. UserInfoEndpoint *string `type:"string" required:"true"`
  3556. }
  3557. // String returns the string representation
  3558. func (s AuthenticateOidcActionConfig) String() string {
  3559. return awsutil.Prettify(s)
  3560. }
  3561. // GoString returns the string representation
  3562. func (s AuthenticateOidcActionConfig) GoString() string {
  3563. return s.String()
  3564. }
  3565. // Validate inspects the fields of the type to determine if they are valid.
  3566. func (s *AuthenticateOidcActionConfig) Validate() error {
  3567. invalidParams := request.ErrInvalidParams{Context: "AuthenticateOidcActionConfig"}
  3568. if s.AuthorizationEndpoint == nil {
  3569. invalidParams.Add(request.NewErrParamRequired("AuthorizationEndpoint"))
  3570. }
  3571. if s.ClientId == nil {
  3572. invalidParams.Add(request.NewErrParamRequired("ClientId"))
  3573. }
  3574. if s.ClientSecret == nil {
  3575. invalidParams.Add(request.NewErrParamRequired("ClientSecret"))
  3576. }
  3577. if s.Issuer == nil {
  3578. invalidParams.Add(request.NewErrParamRequired("Issuer"))
  3579. }
  3580. if s.TokenEndpoint == nil {
  3581. invalidParams.Add(request.NewErrParamRequired("TokenEndpoint"))
  3582. }
  3583. if s.UserInfoEndpoint == nil {
  3584. invalidParams.Add(request.NewErrParamRequired("UserInfoEndpoint"))
  3585. }
  3586. if invalidParams.Len() > 0 {
  3587. return invalidParams
  3588. }
  3589. return nil
  3590. }
  3591. // SetAuthenticationRequestExtraParams sets the AuthenticationRequestExtraParams field's value.
  3592. func (s *AuthenticateOidcActionConfig) SetAuthenticationRequestExtraParams(v map[string]*string) *AuthenticateOidcActionConfig {
  3593. s.AuthenticationRequestExtraParams = v
  3594. return s
  3595. }
  3596. // SetAuthorizationEndpoint sets the AuthorizationEndpoint field's value.
  3597. func (s *AuthenticateOidcActionConfig) SetAuthorizationEndpoint(v string) *AuthenticateOidcActionConfig {
  3598. s.AuthorizationEndpoint = &v
  3599. return s
  3600. }
  3601. // SetClientId sets the ClientId field's value.
  3602. func (s *AuthenticateOidcActionConfig) SetClientId(v string) *AuthenticateOidcActionConfig {
  3603. s.ClientId = &v
  3604. return s
  3605. }
  3606. // SetClientSecret sets the ClientSecret field's value.
  3607. func (s *AuthenticateOidcActionConfig) SetClientSecret(v string) *AuthenticateOidcActionConfig {
  3608. s.ClientSecret = &v
  3609. return s
  3610. }
  3611. // SetIssuer sets the Issuer field's value.
  3612. func (s *AuthenticateOidcActionConfig) SetIssuer(v string) *AuthenticateOidcActionConfig {
  3613. s.Issuer = &v
  3614. return s
  3615. }
  3616. // SetOnUnauthenticatedRequest sets the OnUnauthenticatedRequest field's value.
  3617. func (s *AuthenticateOidcActionConfig) SetOnUnauthenticatedRequest(v string) *AuthenticateOidcActionConfig {
  3618. s.OnUnauthenticatedRequest = &v
  3619. return s
  3620. }
  3621. // SetScope sets the Scope field's value.
  3622. func (s *AuthenticateOidcActionConfig) SetScope(v string) *AuthenticateOidcActionConfig {
  3623. s.Scope = &v
  3624. return s
  3625. }
  3626. // SetSessionCookieName sets the SessionCookieName field's value.
  3627. func (s *AuthenticateOidcActionConfig) SetSessionCookieName(v string) *AuthenticateOidcActionConfig {
  3628. s.SessionCookieName = &v
  3629. return s
  3630. }
  3631. // SetSessionTimeout sets the SessionTimeout field's value.
  3632. func (s *AuthenticateOidcActionConfig) SetSessionTimeout(v int64) *AuthenticateOidcActionConfig {
  3633. s.SessionTimeout = &v
  3634. return s
  3635. }
  3636. // SetTokenEndpoint sets the TokenEndpoint field's value.
  3637. func (s *AuthenticateOidcActionConfig) SetTokenEndpoint(v string) *AuthenticateOidcActionConfig {
  3638. s.TokenEndpoint = &v
  3639. return s
  3640. }
  3641. // SetUserInfoEndpoint sets the UserInfoEndpoint field's value.
  3642. func (s *AuthenticateOidcActionConfig) SetUserInfoEndpoint(v string) *AuthenticateOidcActionConfig {
  3643. s.UserInfoEndpoint = &v
  3644. return s
  3645. }
  3646. // Information about an Availability Zone.
  3647. type AvailabilityZone struct {
  3648. _ struct{} `type:"structure"`
  3649. // [Network Load Balancers] The static IP address.
  3650. LoadBalancerAddresses []*LoadBalancerAddress `type:"list"`
  3651. // The ID of the subnet.
  3652. SubnetId *string `type:"string"`
  3653. // The name of the Availability Zone.
  3654. ZoneName *string `type:"string"`
  3655. }
  3656. // String returns the string representation
  3657. func (s AvailabilityZone) String() string {
  3658. return awsutil.Prettify(s)
  3659. }
  3660. // GoString returns the string representation
  3661. func (s AvailabilityZone) GoString() string {
  3662. return s.String()
  3663. }
  3664. // SetLoadBalancerAddresses sets the LoadBalancerAddresses field's value.
  3665. func (s *AvailabilityZone) SetLoadBalancerAddresses(v []*LoadBalancerAddress) *AvailabilityZone {
  3666. s.LoadBalancerAddresses = v
  3667. return s
  3668. }
  3669. // SetSubnetId sets the SubnetId field's value.
  3670. func (s *AvailabilityZone) SetSubnetId(v string) *AvailabilityZone {
  3671. s.SubnetId = &v
  3672. return s
  3673. }
  3674. // SetZoneName sets the ZoneName field's value.
  3675. func (s *AvailabilityZone) SetZoneName(v string) *AvailabilityZone {
  3676. s.ZoneName = &v
  3677. return s
  3678. }
  3679. // Information about an SSL server certificate.
  3680. type Certificate struct {
  3681. _ struct{} `type:"structure"`
  3682. // The Amazon Resource Name (ARN) of the certificate.
  3683. CertificateArn *string `type:"string"`
  3684. // Indicates whether the certificate is the default certificate. Do not set
  3685. // IsDefault when specifying a certificate as an input parameter.
  3686. IsDefault *bool `type:"boolean"`
  3687. }
  3688. // String returns the string representation
  3689. func (s Certificate) String() string {
  3690. return awsutil.Prettify(s)
  3691. }
  3692. // GoString returns the string representation
  3693. func (s Certificate) GoString() string {
  3694. return s.String()
  3695. }
  3696. // SetCertificateArn sets the CertificateArn field's value.
  3697. func (s *Certificate) SetCertificateArn(v string) *Certificate {
  3698. s.CertificateArn = &v
  3699. return s
  3700. }
  3701. // SetIsDefault sets the IsDefault field's value.
  3702. func (s *Certificate) SetIsDefault(v bool) *Certificate {
  3703. s.IsDefault = &v
  3704. return s
  3705. }
  3706. // Information about a cipher used in a policy.
  3707. type Cipher struct {
  3708. _ struct{} `type:"structure"`
  3709. // The name of the cipher.
  3710. Name *string `type:"string"`
  3711. // The priority of the cipher.
  3712. Priority *int64 `type:"integer"`
  3713. }
  3714. // String returns the string representation
  3715. func (s Cipher) String() string {
  3716. return awsutil.Prettify(s)
  3717. }
  3718. // GoString returns the string representation
  3719. func (s Cipher) GoString() string {
  3720. return s.String()
  3721. }
  3722. // SetName sets the Name field's value.
  3723. func (s *Cipher) SetName(v string) *Cipher {
  3724. s.Name = &v
  3725. return s
  3726. }
  3727. // SetPriority sets the Priority field's value.
  3728. func (s *Cipher) SetPriority(v int64) *Cipher {
  3729. s.Priority = &v
  3730. return s
  3731. }
  3732. type CreateListenerInput struct {
  3733. _ struct{} `type:"structure"`
  3734. // [HTTPS listeners] The default SSL server certificate. You must provide exactly
  3735. // one certificate. Set CertificateArn to the certificate ARN but do not set
  3736. // IsDefault.
  3737. //
  3738. // To create a certificate list, use AddListenerCertificates.
  3739. Certificates []*Certificate `type:"list"`
  3740. // The actions for the default rule. The rule must include one forward action
  3741. // or one or more fixed-response actions.
  3742. //
  3743. // If the action type is forward, you specify a target group. The protocol of
  3744. // the target group must be HTTP or HTTPS for an Application Load Balancer or
  3745. // TCP for a Network Load Balancer.
  3746. //
  3747. // [HTTPS listener] If the action type is authenticate-oidc, you authenticate
  3748. // users through an identity provider that is OpenID Connect (OIDC) compliant.
  3749. //
  3750. // [HTTPS listener] If the action type is authenticate-cognito, you authenticate
  3751. // users through the user pools supported by Amazon Cognito.
  3752. //
  3753. // [Application Load Balancer] If the action type is redirect, you redirect
  3754. // specified client requests from one URL to another.
  3755. //
  3756. // [Application Load Balancer] If the action type is fixed-response, you drop
  3757. // specified client requests and return a custom HTTP response.
  3758. //
  3759. // DefaultActions is a required field
  3760. DefaultActions []*Action `type:"list" required:"true"`
  3761. // The Amazon Resource Name (ARN) of the load balancer.
  3762. //
  3763. // LoadBalancerArn is a required field
  3764. LoadBalancerArn *string `type:"string" required:"true"`
  3765. // The port on which the load balancer is listening.
  3766. //
  3767. // Port is a required field
  3768. Port *int64 `min:"1" type:"integer" required:"true"`
  3769. // The protocol for connections from clients to the load balancer. For Application
  3770. // Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load
  3771. // Balancers, the supported protocol is TCP.
  3772. //
  3773. // Protocol is a required field
  3774. Protocol *string `type:"string" required:"true" enum:"ProtocolEnum"`
  3775. // [HTTPS listeners] The security policy that defines which ciphers and protocols
  3776. // are supported. The default is the current predefined security policy.
  3777. SslPolicy *string `type:"string"`
  3778. }
  3779. // String returns the string representation
  3780. func (s CreateListenerInput) String() string {
  3781. return awsutil.Prettify(s)
  3782. }
  3783. // GoString returns the string representation
  3784. func (s CreateListenerInput) GoString() string {
  3785. return s.String()
  3786. }
  3787. // Validate inspects the fields of the type to determine if they are valid.
  3788. func (s *CreateListenerInput) Validate() error {
  3789. invalidParams := request.ErrInvalidParams{Context: "CreateListenerInput"}
  3790. if s.DefaultActions == nil {
  3791. invalidParams.Add(request.NewErrParamRequired("DefaultActions"))
  3792. }
  3793. if s.LoadBalancerArn == nil {
  3794. invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn"))
  3795. }
  3796. if s.Port == nil {
  3797. invalidParams.Add(request.NewErrParamRequired("Port"))
  3798. }
  3799. if s.Port != nil && *s.Port < 1 {
  3800. invalidParams.Add(request.NewErrParamMinValue("Port", 1))
  3801. }
  3802. if s.Protocol == nil {
  3803. invalidParams.Add(request.NewErrParamRequired("Protocol"))
  3804. }
  3805. if s.DefaultActions != nil {
  3806. for i, v := range s.DefaultActions {
  3807. if v == nil {
  3808. continue
  3809. }
  3810. if err := v.Validate(); err != nil {
  3811. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DefaultActions", i), err.(request.ErrInvalidParams))
  3812. }
  3813. }
  3814. }
  3815. if invalidParams.Len() > 0 {
  3816. return invalidParams
  3817. }
  3818. return nil
  3819. }
  3820. // SetCertificates sets the Certificates field's value.
  3821. func (s *CreateListenerInput) SetCertificates(v []*Certificate) *CreateListenerInput {
  3822. s.Certificates = v
  3823. return s
  3824. }
  3825. // SetDefaultActions sets the DefaultActions field's value.
  3826. func (s *CreateListenerInput) SetDefaultActions(v []*Action) *CreateListenerInput {
  3827. s.DefaultActions = v
  3828. return s
  3829. }
  3830. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  3831. func (s *CreateListenerInput) SetLoadBalancerArn(v string) *CreateListenerInput {
  3832. s.LoadBalancerArn = &v
  3833. return s
  3834. }
  3835. // SetPort sets the Port field's value.
  3836. func (s *CreateListenerInput) SetPort(v int64) *CreateListenerInput {
  3837. s.Port = &v
  3838. return s
  3839. }
  3840. // SetProtocol sets the Protocol field's value.
  3841. func (s *CreateListenerInput) SetProtocol(v string) *CreateListenerInput {
  3842. s.Protocol = &v
  3843. return s
  3844. }
  3845. // SetSslPolicy sets the SslPolicy field's value.
  3846. func (s *CreateListenerInput) SetSslPolicy(v string) *CreateListenerInput {
  3847. s.SslPolicy = &v
  3848. return s
  3849. }
  3850. type CreateListenerOutput struct {
  3851. _ struct{} `type:"structure"`
  3852. // Information about the listener.
  3853. Listeners []*Listener `type:"list"`
  3854. }
  3855. // String returns the string representation
  3856. func (s CreateListenerOutput) String() string {
  3857. return awsutil.Prettify(s)
  3858. }
  3859. // GoString returns the string representation
  3860. func (s CreateListenerOutput) GoString() string {
  3861. return s.String()
  3862. }
  3863. // SetListeners sets the Listeners field's value.
  3864. func (s *CreateListenerOutput) SetListeners(v []*Listener) *CreateListenerOutput {
  3865. s.Listeners = v
  3866. return s
  3867. }
  3868. type CreateLoadBalancerInput struct {
  3869. _ struct{} `type:"structure"`
  3870. // [Application Load Balancers] The type of IP addresses used by the subnets
  3871. // for your load balancer. The possible values are ipv4 (for IPv4 addresses)
  3872. // and dualstack (for IPv4 and IPv6 addresses). Internal load balancers must
  3873. // use ipv4.
  3874. IpAddressType *string `type:"string" enum:"IpAddressType"`
  3875. // The name of the load balancer.
  3876. //
  3877. // This name must be unique per region per account, can have a maximum of 32
  3878. // characters, must contain only alphanumeric characters or hyphens, must not
  3879. // begin or end with a hyphen, and must not begin with "internal-".
  3880. //
  3881. // Name is a required field
  3882. Name *string `type:"string" required:"true"`
  3883. // The nodes of an Internet-facing load balancer have public IP addresses. The
  3884. // DNS name of an Internet-facing load balancer is publicly resolvable to the
  3885. // public IP addresses of the nodes. Therefore, Internet-facing load balancers
  3886. // can route requests from clients over the internet.
  3887. //
  3888. // The nodes of an internal load balancer have only private IP addresses. The
  3889. // DNS name of an internal load balancer is publicly resolvable to the private
  3890. // IP addresses of the nodes. Therefore, internal load balancers can only route
  3891. // requests from clients with access to the VPC for the load balancer.
  3892. //
  3893. // The default is an Internet-facing load balancer.
  3894. Scheme *string `type:"string" enum:"LoadBalancerSchemeEnum"`
  3895. // [Application Load Balancers] The IDs of the security groups for the load
  3896. // balancer.
  3897. SecurityGroups []*string `type:"list"`
  3898. // The IDs of the public subnets. You can specify only one subnet per Availability
  3899. // Zone. You must specify either subnets or subnet mappings.
  3900. //
  3901. // [Application Load Balancers] You must specify subnets from at least two Availability
  3902. // Zones. You cannot specify Elastic IP addresses for your subnets.
  3903. //
  3904. // [Network Load Balancers] You can specify subnets from one or more Availability
  3905. // Zones. You can specify one Elastic IP address per subnet.
  3906. SubnetMappings []*SubnetMapping `type:"list"`
  3907. // The IDs of the public subnets. You can specify only one subnet per Availability
  3908. // Zone. You must specify either subnets or subnet mappings.
  3909. //
  3910. // [Application Load Balancers] You must specify subnets from at least two Availability
  3911. // Zones.
  3912. //
  3913. // [Network Load Balancers] You can specify subnets from one or more Availability
  3914. // Zones.
  3915. Subnets []*string `type:"list"`
  3916. // One or more tags to assign to the load balancer.
  3917. Tags []*Tag `min:"1" type:"list"`
  3918. // The type of load balancer. The default is application.
  3919. Type *string `type:"string" enum:"LoadBalancerTypeEnum"`
  3920. }
  3921. // String returns the string representation
  3922. func (s CreateLoadBalancerInput) String() string {
  3923. return awsutil.Prettify(s)
  3924. }
  3925. // GoString returns the string representation
  3926. func (s CreateLoadBalancerInput) GoString() string {
  3927. return s.String()
  3928. }
  3929. // Validate inspects the fields of the type to determine if they are valid.
  3930. func (s *CreateLoadBalancerInput) Validate() error {
  3931. invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerInput"}
  3932. if s.Name == nil {
  3933. invalidParams.Add(request.NewErrParamRequired("Name"))
  3934. }
  3935. if s.Tags != nil && len(s.Tags) < 1 {
  3936. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  3937. }
  3938. if s.Tags != nil {
  3939. for i, v := range s.Tags {
  3940. if v == nil {
  3941. continue
  3942. }
  3943. if err := v.Validate(); err != nil {
  3944. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  3945. }
  3946. }
  3947. }
  3948. if invalidParams.Len() > 0 {
  3949. return invalidParams
  3950. }
  3951. return nil
  3952. }
  3953. // SetIpAddressType sets the IpAddressType field's value.
  3954. func (s *CreateLoadBalancerInput) SetIpAddressType(v string) *CreateLoadBalancerInput {
  3955. s.IpAddressType = &v
  3956. return s
  3957. }
  3958. // SetName sets the Name field's value.
  3959. func (s *CreateLoadBalancerInput) SetName(v string) *CreateLoadBalancerInput {
  3960. s.Name = &v
  3961. return s
  3962. }
  3963. // SetScheme sets the Scheme field's value.
  3964. func (s *CreateLoadBalancerInput) SetScheme(v string) *CreateLoadBalancerInput {
  3965. s.Scheme = &v
  3966. return s
  3967. }
  3968. // SetSecurityGroups sets the SecurityGroups field's value.
  3969. func (s *CreateLoadBalancerInput) SetSecurityGroups(v []*string) *CreateLoadBalancerInput {
  3970. s.SecurityGroups = v
  3971. return s
  3972. }
  3973. // SetSubnetMappings sets the SubnetMappings field's value.
  3974. func (s *CreateLoadBalancerInput) SetSubnetMappings(v []*SubnetMapping) *CreateLoadBalancerInput {
  3975. s.SubnetMappings = v
  3976. return s
  3977. }
  3978. // SetSubnets sets the Subnets field's value.
  3979. func (s *CreateLoadBalancerInput) SetSubnets(v []*string) *CreateLoadBalancerInput {
  3980. s.Subnets = v
  3981. return s
  3982. }
  3983. // SetTags sets the Tags field's value.
  3984. func (s *CreateLoadBalancerInput) SetTags(v []*Tag) *CreateLoadBalancerInput {
  3985. s.Tags = v
  3986. return s
  3987. }
  3988. // SetType sets the Type field's value.
  3989. func (s *CreateLoadBalancerInput) SetType(v string) *CreateLoadBalancerInput {
  3990. s.Type = &v
  3991. return s
  3992. }
  3993. type CreateLoadBalancerOutput struct {
  3994. _ struct{} `type:"structure"`
  3995. // Information about the load balancer.
  3996. LoadBalancers []*LoadBalancer `type:"list"`
  3997. }
  3998. // String returns the string representation
  3999. func (s CreateLoadBalancerOutput) String() string {
  4000. return awsutil.Prettify(s)
  4001. }
  4002. // GoString returns the string representation
  4003. func (s CreateLoadBalancerOutput) GoString() string {
  4004. return s.String()
  4005. }
  4006. // SetLoadBalancers sets the LoadBalancers field's value.
  4007. func (s *CreateLoadBalancerOutput) SetLoadBalancers(v []*LoadBalancer) *CreateLoadBalancerOutput {
  4008. s.LoadBalancers = v
  4009. return s
  4010. }
  4011. type CreateRuleInput struct {
  4012. _ struct{} `type:"structure"`
  4013. // The actions. Each rule must include exactly one of the following types of
  4014. // actions: forward, fixed-response, or redirect.
  4015. //
  4016. // If the action type is forward, you specify a target group. The protocol of
  4017. // the target group must be HTTP or HTTPS for an Application Load Balancer or
  4018. // TCP for a Network Load Balancer.
  4019. //
  4020. // [HTTPS listener] If the action type is authenticate-oidc, you authenticate
  4021. // users through an identity provider that is OpenID Connect (OIDC) compliant.
  4022. //
  4023. // [HTTPS listener] If the action type is authenticate-cognito, you authenticate
  4024. // users through the user pools supported by Amazon Cognito.
  4025. //
  4026. // [Application Load Balancer] If the action type is redirect, you redirect
  4027. // specified client requests from one URL to another.
  4028. //
  4029. // [Application Load Balancer] If the action type is fixed-response, you drop
  4030. // specified client requests and return a custom HTTP response.
  4031. //
  4032. // Actions is a required field
  4033. Actions []*Action `type:"list" required:"true"`
  4034. // The conditions. Each condition specifies a field name and a single value.
  4035. //
  4036. // If the field name is host-header, you can specify a single host name (for
  4037. // example, my.example.com). A host name is case insensitive, can be up to 128
  4038. // characters in length, and can contain any of the following characters. You
  4039. // can include up to three wildcard characters.
  4040. //
  4041. // * A-Z, a-z, 0-9
  4042. //
  4043. // * - .
  4044. //
  4045. // * * (matches 0 or more characters)
  4046. //
  4047. // * ? (matches exactly 1 character)
  4048. //
  4049. // If the field name is path-pattern, you can specify a single path pattern.
  4050. // A path pattern is case-sensitive, can be up to 128 characters in length,
  4051. // and can contain any of the following characters. You can include up to three
  4052. // wildcard characters.
  4053. //
  4054. // * A-Z, a-z, 0-9
  4055. //
  4056. // * _ - . $ / ~ " ' @ : +
  4057. //
  4058. // * & (using &)
  4059. //
  4060. // * * (matches 0 or more characters)
  4061. //
  4062. // * ? (matches exactly 1 character)
  4063. //
  4064. // Conditions is a required field
  4065. Conditions []*RuleCondition `type:"list" required:"true"`
  4066. // The Amazon Resource Name (ARN) of the listener.
  4067. //
  4068. // ListenerArn is a required field
  4069. ListenerArn *string `type:"string" required:"true"`
  4070. // The rule priority. A listener can't have multiple rules with the same priority.
  4071. //
  4072. // Priority is a required field
  4073. Priority *int64 `min:"1" type:"integer" required:"true"`
  4074. }
  4075. // String returns the string representation
  4076. func (s CreateRuleInput) String() string {
  4077. return awsutil.Prettify(s)
  4078. }
  4079. // GoString returns the string representation
  4080. func (s CreateRuleInput) GoString() string {
  4081. return s.String()
  4082. }
  4083. // Validate inspects the fields of the type to determine if they are valid.
  4084. func (s *CreateRuleInput) Validate() error {
  4085. invalidParams := request.ErrInvalidParams{Context: "CreateRuleInput"}
  4086. if s.Actions == nil {
  4087. invalidParams.Add(request.NewErrParamRequired("Actions"))
  4088. }
  4089. if s.Conditions == nil {
  4090. invalidParams.Add(request.NewErrParamRequired("Conditions"))
  4091. }
  4092. if s.ListenerArn == nil {
  4093. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  4094. }
  4095. if s.Priority == nil {
  4096. invalidParams.Add(request.NewErrParamRequired("Priority"))
  4097. }
  4098. if s.Priority != nil && *s.Priority < 1 {
  4099. invalidParams.Add(request.NewErrParamMinValue("Priority", 1))
  4100. }
  4101. if s.Actions != nil {
  4102. for i, v := range s.Actions {
  4103. if v == nil {
  4104. continue
  4105. }
  4106. if err := v.Validate(); err != nil {
  4107. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Actions", i), err.(request.ErrInvalidParams))
  4108. }
  4109. }
  4110. }
  4111. if invalidParams.Len() > 0 {
  4112. return invalidParams
  4113. }
  4114. return nil
  4115. }
  4116. // SetActions sets the Actions field's value.
  4117. func (s *CreateRuleInput) SetActions(v []*Action) *CreateRuleInput {
  4118. s.Actions = v
  4119. return s
  4120. }
  4121. // SetConditions sets the Conditions field's value.
  4122. func (s *CreateRuleInput) SetConditions(v []*RuleCondition) *CreateRuleInput {
  4123. s.Conditions = v
  4124. return s
  4125. }
  4126. // SetListenerArn sets the ListenerArn field's value.
  4127. func (s *CreateRuleInput) SetListenerArn(v string) *CreateRuleInput {
  4128. s.ListenerArn = &v
  4129. return s
  4130. }
  4131. // SetPriority sets the Priority field's value.
  4132. func (s *CreateRuleInput) SetPriority(v int64) *CreateRuleInput {
  4133. s.Priority = &v
  4134. return s
  4135. }
  4136. type CreateRuleOutput struct {
  4137. _ struct{} `type:"structure"`
  4138. // Information about the rule.
  4139. Rules []*Rule `type:"list"`
  4140. }
  4141. // String returns the string representation
  4142. func (s CreateRuleOutput) String() string {
  4143. return awsutil.Prettify(s)
  4144. }
  4145. // GoString returns the string representation
  4146. func (s CreateRuleOutput) GoString() string {
  4147. return s.String()
  4148. }
  4149. // SetRules sets the Rules field's value.
  4150. func (s *CreateRuleOutput) SetRules(v []*Rule) *CreateRuleOutput {
  4151. s.Rules = v
  4152. return s
  4153. }
  4154. type CreateTargetGroupInput struct {
  4155. _ struct{} `type:"structure"`
  4156. // Indicates whether health checks are enabled. If the target type is instance
  4157. // or ip, the default is true. If the target type is lambda, the default is
  4158. // false.
  4159. HealthCheckEnabled *bool `type:"boolean"`
  4160. // The approximate amount of time, in seconds, between health checks of an individual
  4161. // target. For Application Load Balancers, the range is 5–300 seconds. For Network
  4162. // Load Balancers, the supported values are 10 or 30 seconds. If the target
  4163. // type is instance or ip, the default is 30 seconds. If the target type is
  4164. // lambda, the default is 35 seconds.
  4165. HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"`
  4166. // [HTTP/HTTPS health checks] The ping path that is the destination on the targets
  4167. // for health checks. The default is /.
  4168. HealthCheckPath *string `min:"1" type:"string"`
  4169. // The port the load balancer uses when performing health checks on targets.
  4170. // The default is traffic-port, which is the port on which each target receives
  4171. // traffic from the load balancer.
  4172. HealthCheckPort *string `type:"string"`
  4173. // The protocol the load balancer uses when performing health checks on targets.
  4174. // The TCP protocol is supported only if the protocol of the target group is
  4175. // TCP. For Application Load Balancers, the default is HTTP. For Network Load
  4176. // Balancers, the default is TCP.
  4177. HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"`
  4178. // The amount of time, in seconds, during which no response from a target means
  4179. // a failed health check. For Application Load Balancers, the range is 2–120
  4180. // seconds and the default is 5 seconds if the target type is instance or ip
  4181. // and 30 seconds if the target type is lambda. For Network Load Balancers,
  4182. // this is 10 seconds for TCP and HTTPS health checks and 6 seconds for HTTP
  4183. // health checks.
  4184. HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"`
  4185. // The number of consecutive health checks successes required before considering
  4186. // an unhealthy target healthy. For Application Load Balancers, the default
  4187. // is 5. For Network Load Balancers, the default is 3.
  4188. HealthyThresholdCount *int64 `min:"2" type:"integer"`
  4189. // [HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful
  4190. // response from a target.
  4191. Matcher *Matcher `type:"structure"`
  4192. // The name of the target group.
  4193. //
  4194. // This name must be unique per region per account, can have a maximum of 32
  4195. // characters, must contain only alphanumeric characters or hyphens, and must
  4196. // not begin or end with a hyphen.
  4197. //
  4198. // Name is a required field
  4199. Name *string `type:"string" required:"true"`
  4200. // The port on which the targets receive traffic. This port is used unless you
  4201. // specify a port override when registering the target. If the target is a Lambda
  4202. // function, this parameter does not apply.
  4203. Port *int64 `min:"1" type:"integer"`
  4204. // The protocol to use for routing traffic to the targets. For Application Load
  4205. // Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers,
  4206. // the supported protocol is TCP. If the target is a Lambda function, this parameter
  4207. // does not apply.
  4208. Protocol *string `type:"string" enum:"ProtocolEnum"`
  4209. // The type of target that you must specify when registering targets with this
  4210. // target group. You can't specify targets for a target group using more than
  4211. // one target type.
  4212. //
  4213. // * instance - Targets are specified by instance ID. This is the default
  4214. // value.
  4215. //
  4216. // * ip - Targets are specified by IP address. You can specify IP addresses
  4217. // from the subnets of the virtual private cloud (VPC) for the target group,
  4218. // the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and
  4219. // the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable
  4220. // IP addresses.
  4221. //
  4222. // * lambda - The target groups contains a single Lambda function.
  4223. TargetType *string `type:"string" enum:"TargetTypeEnum"`
  4224. // The number of consecutive health check failures required before considering
  4225. // a target unhealthy. For Application Load Balancers, the default is 2. For
  4226. // Network Load Balancers, this value must be the same as the healthy threshold
  4227. // count.
  4228. UnhealthyThresholdCount *int64 `min:"2" type:"integer"`
  4229. // The identifier of the virtual private cloud (VPC). If the target is a Lambda
  4230. // function, this parameter does not apply.
  4231. VpcId *string `type:"string"`
  4232. }
  4233. // String returns the string representation
  4234. func (s CreateTargetGroupInput) String() string {
  4235. return awsutil.Prettify(s)
  4236. }
  4237. // GoString returns the string representation
  4238. func (s CreateTargetGroupInput) GoString() string {
  4239. return s.String()
  4240. }
  4241. // Validate inspects the fields of the type to determine if they are valid.
  4242. func (s *CreateTargetGroupInput) Validate() error {
  4243. invalidParams := request.ErrInvalidParams{Context: "CreateTargetGroupInput"}
  4244. if s.HealthCheckIntervalSeconds != nil && *s.HealthCheckIntervalSeconds < 5 {
  4245. invalidParams.Add(request.NewErrParamMinValue("HealthCheckIntervalSeconds", 5))
  4246. }
  4247. if s.HealthCheckPath != nil && len(*s.HealthCheckPath) < 1 {
  4248. invalidParams.Add(request.NewErrParamMinLen("HealthCheckPath", 1))
  4249. }
  4250. if s.HealthCheckTimeoutSeconds != nil && *s.HealthCheckTimeoutSeconds < 2 {
  4251. invalidParams.Add(request.NewErrParamMinValue("HealthCheckTimeoutSeconds", 2))
  4252. }
  4253. if s.HealthyThresholdCount != nil && *s.HealthyThresholdCount < 2 {
  4254. invalidParams.Add(request.NewErrParamMinValue("HealthyThresholdCount", 2))
  4255. }
  4256. if s.Name == nil {
  4257. invalidParams.Add(request.NewErrParamRequired("Name"))
  4258. }
  4259. if s.Port != nil && *s.Port < 1 {
  4260. invalidParams.Add(request.NewErrParamMinValue("Port", 1))
  4261. }
  4262. if s.UnhealthyThresholdCount != nil && *s.UnhealthyThresholdCount < 2 {
  4263. invalidParams.Add(request.NewErrParamMinValue("UnhealthyThresholdCount", 2))
  4264. }
  4265. if s.Matcher != nil {
  4266. if err := s.Matcher.Validate(); err != nil {
  4267. invalidParams.AddNested("Matcher", err.(request.ErrInvalidParams))
  4268. }
  4269. }
  4270. if invalidParams.Len() > 0 {
  4271. return invalidParams
  4272. }
  4273. return nil
  4274. }
  4275. // SetHealthCheckEnabled sets the HealthCheckEnabled field's value.
  4276. func (s *CreateTargetGroupInput) SetHealthCheckEnabled(v bool) *CreateTargetGroupInput {
  4277. s.HealthCheckEnabled = &v
  4278. return s
  4279. }
  4280. // SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value.
  4281. func (s *CreateTargetGroupInput) SetHealthCheckIntervalSeconds(v int64) *CreateTargetGroupInput {
  4282. s.HealthCheckIntervalSeconds = &v
  4283. return s
  4284. }
  4285. // SetHealthCheckPath sets the HealthCheckPath field's value.
  4286. func (s *CreateTargetGroupInput) SetHealthCheckPath(v string) *CreateTargetGroupInput {
  4287. s.HealthCheckPath = &v
  4288. return s
  4289. }
  4290. // SetHealthCheckPort sets the HealthCheckPort field's value.
  4291. func (s *CreateTargetGroupInput) SetHealthCheckPort(v string) *CreateTargetGroupInput {
  4292. s.HealthCheckPort = &v
  4293. return s
  4294. }
  4295. // SetHealthCheckProtocol sets the HealthCheckProtocol field's value.
  4296. func (s *CreateTargetGroupInput) SetHealthCheckProtocol(v string) *CreateTargetGroupInput {
  4297. s.HealthCheckProtocol = &v
  4298. return s
  4299. }
  4300. // SetHealthCheckTimeoutSeconds sets the HealthCheckTimeoutSeconds field's value.
  4301. func (s *CreateTargetGroupInput) SetHealthCheckTimeoutSeconds(v int64) *CreateTargetGroupInput {
  4302. s.HealthCheckTimeoutSeconds = &v
  4303. return s
  4304. }
  4305. // SetHealthyThresholdCount sets the HealthyThresholdCount field's value.
  4306. func (s *CreateTargetGroupInput) SetHealthyThresholdCount(v int64) *CreateTargetGroupInput {
  4307. s.HealthyThresholdCount = &v
  4308. return s
  4309. }
  4310. // SetMatcher sets the Matcher field's value.
  4311. func (s *CreateTargetGroupInput) SetMatcher(v *Matcher) *CreateTargetGroupInput {
  4312. s.Matcher = v
  4313. return s
  4314. }
  4315. // SetName sets the Name field's value.
  4316. func (s *CreateTargetGroupInput) SetName(v string) *CreateTargetGroupInput {
  4317. s.Name = &v
  4318. return s
  4319. }
  4320. // SetPort sets the Port field's value.
  4321. func (s *CreateTargetGroupInput) SetPort(v int64) *CreateTargetGroupInput {
  4322. s.Port = &v
  4323. return s
  4324. }
  4325. // SetProtocol sets the Protocol field's value.
  4326. func (s *CreateTargetGroupInput) SetProtocol(v string) *CreateTargetGroupInput {
  4327. s.Protocol = &v
  4328. return s
  4329. }
  4330. // SetTargetType sets the TargetType field's value.
  4331. func (s *CreateTargetGroupInput) SetTargetType(v string) *CreateTargetGroupInput {
  4332. s.TargetType = &v
  4333. return s
  4334. }
  4335. // SetUnhealthyThresholdCount sets the UnhealthyThresholdCount field's value.
  4336. func (s *CreateTargetGroupInput) SetUnhealthyThresholdCount(v int64) *CreateTargetGroupInput {
  4337. s.UnhealthyThresholdCount = &v
  4338. return s
  4339. }
  4340. // SetVpcId sets the VpcId field's value.
  4341. func (s *CreateTargetGroupInput) SetVpcId(v string) *CreateTargetGroupInput {
  4342. s.VpcId = &v
  4343. return s
  4344. }
  4345. type CreateTargetGroupOutput struct {
  4346. _ struct{} `type:"structure"`
  4347. // Information about the target group.
  4348. TargetGroups []*TargetGroup `type:"list"`
  4349. }
  4350. // String returns the string representation
  4351. func (s CreateTargetGroupOutput) String() string {
  4352. return awsutil.Prettify(s)
  4353. }
  4354. // GoString returns the string representation
  4355. func (s CreateTargetGroupOutput) GoString() string {
  4356. return s.String()
  4357. }
  4358. // SetTargetGroups sets the TargetGroups field's value.
  4359. func (s *CreateTargetGroupOutput) SetTargetGroups(v []*TargetGroup) *CreateTargetGroupOutput {
  4360. s.TargetGroups = v
  4361. return s
  4362. }
  4363. type DeleteListenerInput struct {
  4364. _ struct{} `type:"structure"`
  4365. // The Amazon Resource Name (ARN) of the listener.
  4366. //
  4367. // ListenerArn is a required field
  4368. ListenerArn *string `type:"string" required:"true"`
  4369. }
  4370. // String returns the string representation
  4371. func (s DeleteListenerInput) String() string {
  4372. return awsutil.Prettify(s)
  4373. }
  4374. // GoString returns the string representation
  4375. func (s DeleteListenerInput) GoString() string {
  4376. return s.String()
  4377. }
  4378. // Validate inspects the fields of the type to determine if they are valid.
  4379. func (s *DeleteListenerInput) Validate() error {
  4380. invalidParams := request.ErrInvalidParams{Context: "DeleteListenerInput"}
  4381. if s.ListenerArn == nil {
  4382. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  4383. }
  4384. if invalidParams.Len() > 0 {
  4385. return invalidParams
  4386. }
  4387. return nil
  4388. }
  4389. // SetListenerArn sets the ListenerArn field's value.
  4390. func (s *DeleteListenerInput) SetListenerArn(v string) *DeleteListenerInput {
  4391. s.ListenerArn = &v
  4392. return s
  4393. }
  4394. type DeleteListenerOutput struct {
  4395. _ struct{} `type:"structure"`
  4396. }
  4397. // String returns the string representation
  4398. func (s DeleteListenerOutput) String() string {
  4399. return awsutil.Prettify(s)
  4400. }
  4401. // GoString returns the string representation
  4402. func (s DeleteListenerOutput) GoString() string {
  4403. return s.String()
  4404. }
  4405. type DeleteLoadBalancerInput struct {
  4406. _ struct{} `type:"structure"`
  4407. // The Amazon Resource Name (ARN) of the load balancer.
  4408. //
  4409. // LoadBalancerArn is a required field
  4410. LoadBalancerArn *string `type:"string" required:"true"`
  4411. }
  4412. // String returns the string representation
  4413. func (s DeleteLoadBalancerInput) String() string {
  4414. return awsutil.Prettify(s)
  4415. }
  4416. // GoString returns the string representation
  4417. func (s DeleteLoadBalancerInput) GoString() string {
  4418. return s.String()
  4419. }
  4420. // Validate inspects the fields of the type to determine if they are valid.
  4421. func (s *DeleteLoadBalancerInput) Validate() error {
  4422. invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerInput"}
  4423. if s.LoadBalancerArn == nil {
  4424. invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn"))
  4425. }
  4426. if invalidParams.Len() > 0 {
  4427. return invalidParams
  4428. }
  4429. return nil
  4430. }
  4431. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  4432. func (s *DeleteLoadBalancerInput) SetLoadBalancerArn(v string) *DeleteLoadBalancerInput {
  4433. s.LoadBalancerArn = &v
  4434. return s
  4435. }
  4436. type DeleteLoadBalancerOutput struct {
  4437. _ struct{} `type:"structure"`
  4438. }
  4439. // String returns the string representation
  4440. func (s DeleteLoadBalancerOutput) String() string {
  4441. return awsutil.Prettify(s)
  4442. }
  4443. // GoString returns the string representation
  4444. func (s DeleteLoadBalancerOutput) GoString() string {
  4445. return s.String()
  4446. }
  4447. type DeleteRuleInput struct {
  4448. _ struct{} `type:"structure"`
  4449. // The Amazon Resource Name (ARN) of the rule.
  4450. //
  4451. // RuleArn is a required field
  4452. RuleArn *string `type:"string" required:"true"`
  4453. }
  4454. // String returns the string representation
  4455. func (s DeleteRuleInput) String() string {
  4456. return awsutil.Prettify(s)
  4457. }
  4458. // GoString returns the string representation
  4459. func (s DeleteRuleInput) GoString() string {
  4460. return s.String()
  4461. }
  4462. // Validate inspects the fields of the type to determine if they are valid.
  4463. func (s *DeleteRuleInput) Validate() error {
  4464. invalidParams := request.ErrInvalidParams{Context: "DeleteRuleInput"}
  4465. if s.RuleArn == nil {
  4466. invalidParams.Add(request.NewErrParamRequired("RuleArn"))
  4467. }
  4468. if invalidParams.Len() > 0 {
  4469. return invalidParams
  4470. }
  4471. return nil
  4472. }
  4473. // SetRuleArn sets the RuleArn field's value.
  4474. func (s *DeleteRuleInput) SetRuleArn(v string) *DeleteRuleInput {
  4475. s.RuleArn = &v
  4476. return s
  4477. }
  4478. type DeleteRuleOutput struct {
  4479. _ struct{} `type:"structure"`
  4480. }
  4481. // String returns the string representation
  4482. func (s DeleteRuleOutput) String() string {
  4483. return awsutil.Prettify(s)
  4484. }
  4485. // GoString returns the string representation
  4486. func (s DeleteRuleOutput) GoString() string {
  4487. return s.String()
  4488. }
  4489. type DeleteTargetGroupInput struct {
  4490. _ struct{} `type:"structure"`
  4491. // The Amazon Resource Name (ARN) of the target group.
  4492. //
  4493. // TargetGroupArn is a required field
  4494. TargetGroupArn *string `type:"string" required:"true"`
  4495. }
  4496. // String returns the string representation
  4497. func (s DeleteTargetGroupInput) String() string {
  4498. return awsutil.Prettify(s)
  4499. }
  4500. // GoString returns the string representation
  4501. func (s DeleteTargetGroupInput) GoString() string {
  4502. return s.String()
  4503. }
  4504. // Validate inspects the fields of the type to determine if they are valid.
  4505. func (s *DeleteTargetGroupInput) Validate() error {
  4506. invalidParams := request.ErrInvalidParams{Context: "DeleteTargetGroupInput"}
  4507. if s.TargetGroupArn == nil {
  4508. invalidParams.Add(request.NewErrParamRequired("TargetGroupArn"))
  4509. }
  4510. if invalidParams.Len() > 0 {
  4511. return invalidParams
  4512. }
  4513. return nil
  4514. }
  4515. // SetTargetGroupArn sets the TargetGroupArn field's value.
  4516. func (s *DeleteTargetGroupInput) SetTargetGroupArn(v string) *DeleteTargetGroupInput {
  4517. s.TargetGroupArn = &v
  4518. return s
  4519. }
  4520. type DeleteTargetGroupOutput struct {
  4521. _ struct{} `type:"structure"`
  4522. }
  4523. // String returns the string representation
  4524. func (s DeleteTargetGroupOutput) String() string {
  4525. return awsutil.Prettify(s)
  4526. }
  4527. // GoString returns the string representation
  4528. func (s DeleteTargetGroupOutput) GoString() string {
  4529. return s.String()
  4530. }
  4531. type DeregisterTargetsInput struct {
  4532. _ struct{} `type:"structure"`
  4533. // The Amazon Resource Name (ARN) of the target group.
  4534. //
  4535. // TargetGroupArn is a required field
  4536. TargetGroupArn *string `type:"string" required:"true"`
  4537. // The targets. If you specified a port override when you registered a target,
  4538. // you must specify both the target ID and the port when you deregister it.
  4539. //
  4540. // Targets is a required field
  4541. Targets []*TargetDescription `type:"list" required:"true"`
  4542. }
  4543. // String returns the string representation
  4544. func (s DeregisterTargetsInput) String() string {
  4545. return awsutil.Prettify(s)
  4546. }
  4547. // GoString returns the string representation
  4548. func (s DeregisterTargetsInput) GoString() string {
  4549. return s.String()
  4550. }
  4551. // Validate inspects the fields of the type to determine if they are valid.
  4552. func (s *DeregisterTargetsInput) Validate() error {
  4553. invalidParams := request.ErrInvalidParams{Context: "DeregisterTargetsInput"}
  4554. if s.TargetGroupArn == nil {
  4555. invalidParams.Add(request.NewErrParamRequired("TargetGroupArn"))
  4556. }
  4557. if s.Targets == nil {
  4558. invalidParams.Add(request.NewErrParamRequired("Targets"))
  4559. }
  4560. if s.Targets != nil {
  4561. for i, v := range s.Targets {
  4562. if v == nil {
  4563. continue
  4564. }
  4565. if err := v.Validate(); err != nil {
  4566. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams))
  4567. }
  4568. }
  4569. }
  4570. if invalidParams.Len() > 0 {
  4571. return invalidParams
  4572. }
  4573. return nil
  4574. }
  4575. // SetTargetGroupArn sets the TargetGroupArn field's value.
  4576. func (s *DeregisterTargetsInput) SetTargetGroupArn(v string) *DeregisterTargetsInput {
  4577. s.TargetGroupArn = &v
  4578. return s
  4579. }
  4580. // SetTargets sets the Targets field's value.
  4581. func (s *DeregisterTargetsInput) SetTargets(v []*TargetDescription) *DeregisterTargetsInput {
  4582. s.Targets = v
  4583. return s
  4584. }
  4585. type DeregisterTargetsOutput struct {
  4586. _ struct{} `type:"structure"`
  4587. }
  4588. // String returns the string representation
  4589. func (s DeregisterTargetsOutput) String() string {
  4590. return awsutil.Prettify(s)
  4591. }
  4592. // GoString returns the string representation
  4593. func (s DeregisterTargetsOutput) GoString() string {
  4594. return s.String()
  4595. }
  4596. type DescribeAccountLimitsInput struct {
  4597. _ struct{} `type:"structure"`
  4598. // The marker for the next set of results. (You received this marker from a
  4599. // previous call.)
  4600. Marker *string `type:"string"`
  4601. // The maximum number of results to return with this call.
  4602. PageSize *int64 `min:"1" type:"integer"`
  4603. }
  4604. // String returns the string representation
  4605. func (s DescribeAccountLimitsInput) String() string {
  4606. return awsutil.Prettify(s)
  4607. }
  4608. // GoString returns the string representation
  4609. func (s DescribeAccountLimitsInput) GoString() string {
  4610. return s.String()
  4611. }
  4612. // Validate inspects the fields of the type to determine if they are valid.
  4613. func (s *DescribeAccountLimitsInput) Validate() error {
  4614. invalidParams := request.ErrInvalidParams{Context: "DescribeAccountLimitsInput"}
  4615. if s.PageSize != nil && *s.PageSize < 1 {
  4616. invalidParams.Add(request.NewErrParamMinValue("PageSize", 1))
  4617. }
  4618. if invalidParams.Len() > 0 {
  4619. return invalidParams
  4620. }
  4621. return nil
  4622. }
  4623. // SetMarker sets the Marker field's value.
  4624. func (s *DescribeAccountLimitsInput) SetMarker(v string) *DescribeAccountLimitsInput {
  4625. s.Marker = &v
  4626. return s
  4627. }
  4628. // SetPageSize sets the PageSize field's value.
  4629. func (s *DescribeAccountLimitsInput) SetPageSize(v int64) *DescribeAccountLimitsInput {
  4630. s.PageSize = &v
  4631. return s
  4632. }
  4633. type DescribeAccountLimitsOutput struct {
  4634. _ struct{} `type:"structure"`
  4635. // Information about the limits.
  4636. Limits []*Limit `type:"list"`
  4637. // The marker to use when requesting the next set of results. If there are no
  4638. // additional results, the string is empty.
  4639. NextMarker *string `type:"string"`
  4640. }
  4641. // String returns the string representation
  4642. func (s DescribeAccountLimitsOutput) String() string {
  4643. return awsutil.Prettify(s)
  4644. }
  4645. // GoString returns the string representation
  4646. func (s DescribeAccountLimitsOutput) GoString() string {
  4647. return s.String()
  4648. }
  4649. // SetLimits sets the Limits field's value.
  4650. func (s *DescribeAccountLimitsOutput) SetLimits(v []*Limit) *DescribeAccountLimitsOutput {
  4651. s.Limits = v
  4652. return s
  4653. }
  4654. // SetNextMarker sets the NextMarker field's value.
  4655. func (s *DescribeAccountLimitsOutput) SetNextMarker(v string) *DescribeAccountLimitsOutput {
  4656. s.NextMarker = &v
  4657. return s
  4658. }
  4659. type DescribeListenerCertificatesInput struct {
  4660. _ struct{} `type:"structure"`
  4661. // The Amazon Resource Names (ARN) of the listener.
  4662. //
  4663. // ListenerArn is a required field
  4664. ListenerArn *string `type:"string" required:"true"`
  4665. // The marker for the next set of results. (You received this marker from a
  4666. // previous call.)
  4667. Marker *string `type:"string"`
  4668. // The maximum number of results to return with this call.
  4669. PageSize *int64 `min:"1" type:"integer"`
  4670. }
  4671. // String returns the string representation
  4672. func (s DescribeListenerCertificatesInput) String() string {
  4673. return awsutil.Prettify(s)
  4674. }
  4675. // GoString returns the string representation
  4676. func (s DescribeListenerCertificatesInput) GoString() string {
  4677. return s.String()
  4678. }
  4679. // Validate inspects the fields of the type to determine if they are valid.
  4680. func (s *DescribeListenerCertificatesInput) Validate() error {
  4681. invalidParams := request.ErrInvalidParams{Context: "DescribeListenerCertificatesInput"}
  4682. if s.ListenerArn == nil {
  4683. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  4684. }
  4685. if s.PageSize != nil && *s.PageSize < 1 {
  4686. invalidParams.Add(request.NewErrParamMinValue("PageSize", 1))
  4687. }
  4688. if invalidParams.Len() > 0 {
  4689. return invalidParams
  4690. }
  4691. return nil
  4692. }
  4693. // SetListenerArn sets the ListenerArn field's value.
  4694. func (s *DescribeListenerCertificatesInput) SetListenerArn(v string) *DescribeListenerCertificatesInput {
  4695. s.ListenerArn = &v
  4696. return s
  4697. }
  4698. // SetMarker sets the Marker field's value.
  4699. func (s *DescribeListenerCertificatesInput) SetMarker(v string) *DescribeListenerCertificatesInput {
  4700. s.Marker = &v
  4701. return s
  4702. }
  4703. // SetPageSize sets the PageSize field's value.
  4704. func (s *DescribeListenerCertificatesInput) SetPageSize(v int64) *DescribeListenerCertificatesInput {
  4705. s.PageSize = &v
  4706. return s
  4707. }
  4708. type DescribeListenerCertificatesOutput struct {
  4709. _ struct{} `type:"structure"`
  4710. // Information about the certificates.
  4711. Certificates []*Certificate `type:"list"`
  4712. // The marker to use when requesting the next set of results. If there are no
  4713. // additional results, the string is empty.
  4714. NextMarker *string `type:"string"`
  4715. }
  4716. // String returns the string representation
  4717. func (s DescribeListenerCertificatesOutput) String() string {
  4718. return awsutil.Prettify(s)
  4719. }
  4720. // GoString returns the string representation
  4721. func (s DescribeListenerCertificatesOutput) GoString() string {
  4722. return s.String()
  4723. }
  4724. // SetCertificates sets the Certificates field's value.
  4725. func (s *DescribeListenerCertificatesOutput) SetCertificates(v []*Certificate) *DescribeListenerCertificatesOutput {
  4726. s.Certificates = v
  4727. return s
  4728. }
  4729. // SetNextMarker sets the NextMarker field's value.
  4730. func (s *DescribeListenerCertificatesOutput) SetNextMarker(v string) *DescribeListenerCertificatesOutput {
  4731. s.NextMarker = &v
  4732. return s
  4733. }
  4734. type DescribeListenersInput struct {
  4735. _ struct{} `type:"structure"`
  4736. // The Amazon Resource Names (ARN) of the listeners.
  4737. ListenerArns []*string `type:"list"`
  4738. // The Amazon Resource Name (ARN) of the load balancer.
  4739. LoadBalancerArn *string `type:"string"`
  4740. // The marker for the next set of results. (You received this marker from a
  4741. // previous call.)
  4742. Marker *string `type:"string"`
  4743. // The maximum number of results to return with this call.
  4744. PageSize *int64 `min:"1" type:"integer"`
  4745. }
  4746. // String returns the string representation
  4747. func (s DescribeListenersInput) String() string {
  4748. return awsutil.Prettify(s)
  4749. }
  4750. // GoString returns the string representation
  4751. func (s DescribeListenersInput) GoString() string {
  4752. return s.String()
  4753. }
  4754. // Validate inspects the fields of the type to determine if they are valid.
  4755. func (s *DescribeListenersInput) Validate() error {
  4756. invalidParams := request.ErrInvalidParams{Context: "DescribeListenersInput"}
  4757. if s.PageSize != nil && *s.PageSize < 1 {
  4758. invalidParams.Add(request.NewErrParamMinValue("PageSize", 1))
  4759. }
  4760. if invalidParams.Len() > 0 {
  4761. return invalidParams
  4762. }
  4763. return nil
  4764. }
  4765. // SetListenerArns sets the ListenerArns field's value.
  4766. func (s *DescribeListenersInput) SetListenerArns(v []*string) *DescribeListenersInput {
  4767. s.ListenerArns = v
  4768. return s
  4769. }
  4770. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  4771. func (s *DescribeListenersInput) SetLoadBalancerArn(v string) *DescribeListenersInput {
  4772. s.LoadBalancerArn = &v
  4773. return s
  4774. }
  4775. // SetMarker sets the Marker field's value.
  4776. func (s *DescribeListenersInput) SetMarker(v string) *DescribeListenersInput {
  4777. s.Marker = &v
  4778. return s
  4779. }
  4780. // SetPageSize sets the PageSize field's value.
  4781. func (s *DescribeListenersInput) SetPageSize(v int64) *DescribeListenersInput {
  4782. s.PageSize = &v
  4783. return s
  4784. }
  4785. type DescribeListenersOutput struct {
  4786. _ struct{} `type:"structure"`
  4787. // Information about the listeners.
  4788. Listeners []*Listener `type:"list"`
  4789. // The marker to use when requesting the next set of results. If there are no
  4790. // additional results, the string is empty.
  4791. NextMarker *string `type:"string"`
  4792. }
  4793. // String returns the string representation
  4794. func (s DescribeListenersOutput) String() string {
  4795. return awsutil.Prettify(s)
  4796. }
  4797. // GoString returns the string representation
  4798. func (s DescribeListenersOutput) GoString() string {
  4799. return s.String()
  4800. }
  4801. // SetListeners sets the Listeners field's value.
  4802. func (s *DescribeListenersOutput) SetListeners(v []*Listener) *DescribeListenersOutput {
  4803. s.Listeners = v
  4804. return s
  4805. }
  4806. // SetNextMarker sets the NextMarker field's value.
  4807. func (s *DescribeListenersOutput) SetNextMarker(v string) *DescribeListenersOutput {
  4808. s.NextMarker = &v
  4809. return s
  4810. }
  4811. type DescribeLoadBalancerAttributesInput struct {
  4812. _ struct{} `type:"structure"`
  4813. // The Amazon Resource Name (ARN) of the load balancer.
  4814. //
  4815. // LoadBalancerArn is a required field
  4816. LoadBalancerArn *string `type:"string" required:"true"`
  4817. }
  4818. // String returns the string representation
  4819. func (s DescribeLoadBalancerAttributesInput) String() string {
  4820. return awsutil.Prettify(s)
  4821. }
  4822. // GoString returns the string representation
  4823. func (s DescribeLoadBalancerAttributesInput) GoString() string {
  4824. return s.String()
  4825. }
  4826. // Validate inspects the fields of the type to determine if they are valid.
  4827. func (s *DescribeLoadBalancerAttributesInput) Validate() error {
  4828. invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancerAttributesInput"}
  4829. if s.LoadBalancerArn == nil {
  4830. invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn"))
  4831. }
  4832. if invalidParams.Len() > 0 {
  4833. return invalidParams
  4834. }
  4835. return nil
  4836. }
  4837. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  4838. func (s *DescribeLoadBalancerAttributesInput) SetLoadBalancerArn(v string) *DescribeLoadBalancerAttributesInput {
  4839. s.LoadBalancerArn = &v
  4840. return s
  4841. }
  4842. type DescribeLoadBalancerAttributesOutput struct {
  4843. _ struct{} `type:"structure"`
  4844. // Information about the load balancer attributes.
  4845. Attributes []*LoadBalancerAttribute `type:"list"`
  4846. }
  4847. // String returns the string representation
  4848. func (s DescribeLoadBalancerAttributesOutput) String() string {
  4849. return awsutil.Prettify(s)
  4850. }
  4851. // GoString returns the string representation
  4852. func (s DescribeLoadBalancerAttributesOutput) GoString() string {
  4853. return s.String()
  4854. }
  4855. // SetAttributes sets the Attributes field's value.
  4856. func (s *DescribeLoadBalancerAttributesOutput) SetAttributes(v []*LoadBalancerAttribute) *DescribeLoadBalancerAttributesOutput {
  4857. s.Attributes = v
  4858. return s
  4859. }
  4860. type DescribeLoadBalancersInput struct {
  4861. _ struct{} `type:"structure"`
  4862. // The Amazon Resource Names (ARN) of the load balancers. You can specify up
  4863. // to 20 load balancers in a single call.
  4864. LoadBalancerArns []*string `type:"list"`
  4865. // The marker for the next set of results. (You received this marker from a
  4866. // previous call.)
  4867. Marker *string `type:"string"`
  4868. // The names of the load balancers.
  4869. Names []*string `type:"list"`
  4870. // The maximum number of results to return with this call.
  4871. PageSize *int64 `min:"1" type:"integer"`
  4872. }
  4873. // String returns the string representation
  4874. func (s DescribeLoadBalancersInput) String() string {
  4875. return awsutil.Prettify(s)
  4876. }
  4877. // GoString returns the string representation
  4878. func (s DescribeLoadBalancersInput) GoString() string {
  4879. return s.String()
  4880. }
  4881. // Validate inspects the fields of the type to determine if they are valid.
  4882. func (s *DescribeLoadBalancersInput) Validate() error {
  4883. invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancersInput"}
  4884. if s.PageSize != nil && *s.PageSize < 1 {
  4885. invalidParams.Add(request.NewErrParamMinValue("PageSize", 1))
  4886. }
  4887. if invalidParams.Len() > 0 {
  4888. return invalidParams
  4889. }
  4890. return nil
  4891. }
  4892. // SetLoadBalancerArns sets the LoadBalancerArns field's value.
  4893. func (s *DescribeLoadBalancersInput) SetLoadBalancerArns(v []*string) *DescribeLoadBalancersInput {
  4894. s.LoadBalancerArns = v
  4895. return s
  4896. }
  4897. // SetMarker sets the Marker field's value.
  4898. func (s *DescribeLoadBalancersInput) SetMarker(v string) *DescribeLoadBalancersInput {
  4899. s.Marker = &v
  4900. return s
  4901. }
  4902. // SetNames sets the Names field's value.
  4903. func (s *DescribeLoadBalancersInput) SetNames(v []*string) *DescribeLoadBalancersInput {
  4904. s.Names = v
  4905. return s
  4906. }
  4907. // SetPageSize sets the PageSize field's value.
  4908. func (s *DescribeLoadBalancersInput) SetPageSize(v int64) *DescribeLoadBalancersInput {
  4909. s.PageSize = &v
  4910. return s
  4911. }
  4912. type DescribeLoadBalancersOutput struct {
  4913. _ struct{} `type:"structure"`
  4914. // Information about the load balancers.
  4915. LoadBalancers []*LoadBalancer `type:"list"`
  4916. // The marker to use when requesting the next set of results. If there are no
  4917. // additional results, the string is empty.
  4918. NextMarker *string `type:"string"`
  4919. }
  4920. // String returns the string representation
  4921. func (s DescribeLoadBalancersOutput) String() string {
  4922. return awsutil.Prettify(s)
  4923. }
  4924. // GoString returns the string representation
  4925. func (s DescribeLoadBalancersOutput) GoString() string {
  4926. return s.String()
  4927. }
  4928. // SetLoadBalancers sets the LoadBalancers field's value.
  4929. func (s *DescribeLoadBalancersOutput) SetLoadBalancers(v []*LoadBalancer) *DescribeLoadBalancersOutput {
  4930. s.LoadBalancers = v
  4931. return s
  4932. }
  4933. // SetNextMarker sets the NextMarker field's value.
  4934. func (s *DescribeLoadBalancersOutput) SetNextMarker(v string) *DescribeLoadBalancersOutput {
  4935. s.NextMarker = &v
  4936. return s
  4937. }
  4938. type DescribeRulesInput struct {
  4939. _ struct{} `type:"structure"`
  4940. // The Amazon Resource Name (ARN) of the listener.
  4941. ListenerArn *string `type:"string"`
  4942. // The marker for the next set of results. (You received this marker from a
  4943. // previous call.)
  4944. Marker *string `type:"string"`
  4945. // The maximum number of results to return with this call.
  4946. PageSize *int64 `min:"1" type:"integer"`
  4947. // The Amazon Resource Names (ARN) of the rules.
  4948. RuleArns []*string `type:"list"`
  4949. }
  4950. // String returns the string representation
  4951. func (s DescribeRulesInput) String() string {
  4952. return awsutil.Prettify(s)
  4953. }
  4954. // GoString returns the string representation
  4955. func (s DescribeRulesInput) GoString() string {
  4956. return s.String()
  4957. }
  4958. // Validate inspects the fields of the type to determine if they are valid.
  4959. func (s *DescribeRulesInput) Validate() error {
  4960. invalidParams := request.ErrInvalidParams{Context: "DescribeRulesInput"}
  4961. if s.PageSize != nil && *s.PageSize < 1 {
  4962. invalidParams.Add(request.NewErrParamMinValue("PageSize", 1))
  4963. }
  4964. if invalidParams.Len() > 0 {
  4965. return invalidParams
  4966. }
  4967. return nil
  4968. }
  4969. // SetListenerArn sets the ListenerArn field's value.
  4970. func (s *DescribeRulesInput) SetListenerArn(v string) *DescribeRulesInput {
  4971. s.ListenerArn = &v
  4972. return s
  4973. }
  4974. // SetMarker sets the Marker field's value.
  4975. func (s *DescribeRulesInput) SetMarker(v string) *DescribeRulesInput {
  4976. s.Marker = &v
  4977. return s
  4978. }
  4979. // SetPageSize sets the PageSize field's value.
  4980. func (s *DescribeRulesInput) SetPageSize(v int64) *DescribeRulesInput {
  4981. s.PageSize = &v
  4982. return s
  4983. }
  4984. // SetRuleArns sets the RuleArns field's value.
  4985. func (s *DescribeRulesInput) SetRuleArns(v []*string) *DescribeRulesInput {
  4986. s.RuleArns = v
  4987. return s
  4988. }
  4989. type DescribeRulesOutput struct {
  4990. _ struct{} `type:"structure"`
  4991. // The marker to use when requesting the next set of results. If there are no
  4992. // additional results, the string is empty.
  4993. NextMarker *string `type:"string"`
  4994. // Information about the rules.
  4995. Rules []*Rule `type:"list"`
  4996. }
  4997. // String returns the string representation
  4998. func (s DescribeRulesOutput) String() string {
  4999. return awsutil.Prettify(s)
  5000. }
  5001. // GoString returns the string representation
  5002. func (s DescribeRulesOutput) GoString() string {
  5003. return s.String()
  5004. }
  5005. // SetNextMarker sets the NextMarker field's value.
  5006. func (s *DescribeRulesOutput) SetNextMarker(v string) *DescribeRulesOutput {
  5007. s.NextMarker = &v
  5008. return s
  5009. }
  5010. // SetRules sets the Rules field's value.
  5011. func (s *DescribeRulesOutput) SetRules(v []*Rule) *DescribeRulesOutput {
  5012. s.Rules = v
  5013. return s
  5014. }
  5015. type DescribeSSLPoliciesInput struct {
  5016. _ struct{} `type:"structure"`
  5017. // The marker for the next set of results. (You received this marker from a
  5018. // previous call.)
  5019. Marker *string `type:"string"`
  5020. // The names of the policies.
  5021. Names []*string `type:"list"`
  5022. // The maximum number of results to return with this call.
  5023. PageSize *int64 `min:"1" type:"integer"`
  5024. }
  5025. // String returns the string representation
  5026. func (s DescribeSSLPoliciesInput) String() string {
  5027. return awsutil.Prettify(s)
  5028. }
  5029. // GoString returns the string representation
  5030. func (s DescribeSSLPoliciesInput) GoString() string {
  5031. return s.String()
  5032. }
  5033. // Validate inspects the fields of the type to determine if they are valid.
  5034. func (s *DescribeSSLPoliciesInput) Validate() error {
  5035. invalidParams := request.ErrInvalidParams{Context: "DescribeSSLPoliciesInput"}
  5036. if s.PageSize != nil && *s.PageSize < 1 {
  5037. invalidParams.Add(request.NewErrParamMinValue("PageSize", 1))
  5038. }
  5039. if invalidParams.Len() > 0 {
  5040. return invalidParams
  5041. }
  5042. return nil
  5043. }
  5044. // SetMarker sets the Marker field's value.
  5045. func (s *DescribeSSLPoliciesInput) SetMarker(v string) *DescribeSSLPoliciesInput {
  5046. s.Marker = &v
  5047. return s
  5048. }
  5049. // SetNames sets the Names field's value.
  5050. func (s *DescribeSSLPoliciesInput) SetNames(v []*string) *DescribeSSLPoliciesInput {
  5051. s.Names = v
  5052. return s
  5053. }
  5054. // SetPageSize sets the PageSize field's value.
  5055. func (s *DescribeSSLPoliciesInput) SetPageSize(v int64) *DescribeSSLPoliciesInput {
  5056. s.PageSize = &v
  5057. return s
  5058. }
  5059. type DescribeSSLPoliciesOutput struct {
  5060. _ struct{} `type:"structure"`
  5061. // The marker to use when requesting the next set of results. If there are no
  5062. // additional results, the string is empty.
  5063. NextMarker *string `type:"string"`
  5064. // Information about the policies.
  5065. SslPolicies []*SslPolicy `type:"list"`
  5066. }
  5067. // String returns the string representation
  5068. func (s DescribeSSLPoliciesOutput) String() string {
  5069. return awsutil.Prettify(s)
  5070. }
  5071. // GoString returns the string representation
  5072. func (s DescribeSSLPoliciesOutput) GoString() string {
  5073. return s.String()
  5074. }
  5075. // SetNextMarker sets the NextMarker field's value.
  5076. func (s *DescribeSSLPoliciesOutput) SetNextMarker(v string) *DescribeSSLPoliciesOutput {
  5077. s.NextMarker = &v
  5078. return s
  5079. }
  5080. // SetSslPolicies sets the SslPolicies field's value.
  5081. func (s *DescribeSSLPoliciesOutput) SetSslPolicies(v []*SslPolicy) *DescribeSSLPoliciesOutput {
  5082. s.SslPolicies = v
  5083. return s
  5084. }
  5085. type DescribeTagsInput struct {
  5086. _ struct{} `type:"structure"`
  5087. // The Amazon Resource Names (ARN) of the resources.
  5088. //
  5089. // ResourceArns is a required field
  5090. ResourceArns []*string `type:"list" required:"true"`
  5091. }
  5092. // String returns the string representation
  5093. func (s DescribeTagsInput) String() string {
  5094. return awsutil.Prettify(s)
  5095. }
  5096. // GoString returns the string representation
  5097. func (s DescribeTagsInput) GoString() string {
  5098. return s.String()
  5099. }
  5100. // Validate inspects the fields of the type to determine if they are valid.
  5101. func (s *DescribeTagsInput) Validate() error {
  5102. invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"}
  5103. if s.ResourceArns == nil {
  5104. invalidParams.Add(request.NewErrParamRequired("ResourceArns"))
  5105. }
  5106. if invalidParams.Len() > 0 {
  5107. return invalidParams
  5108. }
  5109. return nil
  5110. }
  5111. // SetResourceArns sets the ResourceArns field's value.
  5112. func (s *DescribeTagsInput) SetResourceArns(v []*string) *DescribeTagsInput {
  5113. s.ResourceArns = v
  5114. return s
  5115. }
  5116. type DescribeTagsOutput struct {
  5117. _ struct{} `type:"structure"`
  5118. // Information about the tags.
  5119. TagDescriptions []*TagDescription `type:"list"`
  5120. }
  5121. // String returns the string representation
  5122. func (s DescribeTagsOutput) String() string {
  5123. return awsutil.Prettify(s)
  5124. }
  5125. // GoString returns the string representation
  5126. func (s DescribeTagsOutput) GoString() string {
  5127. return s.String()
  5128. }
  5129. // SetTagDescriptions sets the TagDescriptions field's value.
  5130. func (s *DescribeTagsOutput) SetTagDescriptions(v []*TagDescription) *DescribeTagsOutput {
  5131. s.TagDescriptions = v
  5132. return s
  5133. }
  5134. type DescribeTargetGroupAttributesInput struct {
  5135. _ struct{} `type:"structure"`
  5136. // The Amazon Resource Name (ARN) of the target group.
  5137. //
  5138. // TargetGroupArn is a required field
  5139. TargetGroupArn *string `type:"string" required:"true"`
  5140. }
  5141. // String returns the string representation
  5142. func (s DescribeTargetGroupAttributesInput) String() string {
  5143. return awsutil.Prettify(s)
  5144. }
  5145. // GoString returns the string representation
  5146. func (s DescribeTargetGroupAttributesInput) GoString() string {
  5147. return s.String()
  5148. }
  5149. // Validate inspects the fields of the type to determine if they are valid.
  5150. func (s *DescribeTargetGroupAttributesInput) Validate() error {
  5151. invalidParams := request.ErrInvalidParams{Context: "DescribeTargetGroupAttributesInput"}
  5152. if s.TargetGroupArn == nil {
  5153. invalidParams.Add(request.NewErrParamRequired("TargetGroupArn"))
  5154. }
  5155. if invalidParams.Len() > 0 {
  5156. return invalidParams
  5157. }
  5158. return nil
  5159. }
  5160. // SetTargetGroupArn sets the TargetGroupArn field's value.
  5161. func (s *DescribeTargetGroupAttributesInput) SetTargetGroupArn(v string) *DescribeTargetGroupAttributesInput {
  5162. s.TargetGroupArn = &v
  5163. return s
  5164. }
  5165. type DescribeTargetGroupAttributesOutput struct {
  5166. _ struct{} `type:"structure"`
  5167. // Information about the target group attributes
  5168. Attributes []*TargetGroupAttribute `type:"list"`
  5169. }
  5170. // String returns the string representation
  5171. func (s DescribeTargetGroupAttributesOutput) String() string {
  5172. return awsutil.Prettify(s)
  5173. }
  5174. // GoString returns the string representation
  5175. func (s DescribeTargetGroupAttributesOutput) GoString() string {
  5176. return s.String()
  5177. }
  5178. // SetAttributes sets the Attributes field's value.
  5179. func (s *DescribeTargetGroupAttributesOutput) SetAttributes(v []*TargetGroupAttribute) *DescribeTargetGroupAttributesOutput {
  5180. s.Attributes = v
  5181. return s
  5182. }
  5183. type DescribeTargetGroupsInput struct {
  5184. _ struct{} `type:"structure"`
  5185. // The Amazon Resource Name (ARN) of the load balancer.
  5186. LoadBalancerArn *string `type:"string"`
  5187. // The marker for the next set of results. (You received this marker from a
  5188. // previous call.)
  5189. Marker *string `type:"string"`
  5190. // The names of the target groups.
  5191. Names []*string `type:"list"`
  5192. // The maximum number of results to return with this call.
  5193. PageSize *int64 `min:"1" type:"integer"`
  5194. // The Amazon Resource Names (ARN) of the target groups.
  5195. TargetGroupArns []*string `type:"list"`
  5196. }
  5197. // String returns the string representation
  5198. func (s DescribeTargetGroupsInput) String() string {
  5199. return awsutil.Prettify(s)
  5200. }
  5201. // GoString returns the string representation
  5202. func (s DescribeTargetGroupsInput) GoString() string {
  5203. return s.String()
  5204. }
  5205. // Validate inspects the fields of the type to determine if they are valid.
  5206. func (s *DescribeTargetGroupsInput) Validate() error {
  5207. invalidParams := request.ErrInvalidParams{Context: "DescribeTargetGroupsInput"}
  5208. if s.PageSize != nil && *s.PageSize < 1 {
  5209. invalidParams.Add(request.NewErrParamMinValue("PageSize", 1))
  5210. }
  5211. if invalidParams.Len() > 0 {
  5212. return invalidParams
  5213. }
  5214. return nil
  5215. }
  5216. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  5217. func (s *DescribeTargetGroupsInput) SetLoadBalancerArn(v string) *DescribeTargetGroupsInput {
  5218. s.LoadBalancerArn = &v
  5219. return s
  5220. }
  5221. // SetMarker sets the Marker field's value.
  5222. func (s *DescribeTargetGroupsInput) SetMarker(v string) *DescribeTargetGroupsInput {
  5223. s.Marker = &v
  5224. return s
  5225. }
  5226. // SetNames sets the Names field's value.
  5227. func (s *DescribeTargetGroupsInput) SetNames(v []*string) *DescribeTargetGroupsInput {
  5228. s.Names = v
  5229. return s
  5230. }
  5231. // SetPageSize sets the PageSize field's value.
  5232. func (s *DescribeTargetGroupsInput) SetPageSize(v int64) *DescribeTargetGroupsInput {
  5233. s.PageSize = &v
  5234. return s
  5235. }
  5236. // SetTargetGroupArns sets the TargetGroupArns field's value.
  5237. func (s *DescribeTargetGroupsInput) SetTargetGroupArns(v []*string) *DescribeTargetGroupsInput {
  5238. s.TargetGroupArns = v
  5239. return s
  5240. }
  5241. type DescribeTargetGroupsOutput struct {
  5242. _ struct{} `type:"structure"`
  5243. // The marker to use when requesting the next set of results. If there are no
  5244. // additional results, the string is empty.
  5245. NextMarker *string `type:"string"`
  5246. // Information about the target groups.
  5247. TargetGroups []*TargetGroup `type:"list"`
  5248. }
  5249. // String returns the string representation
  5250. func (s DescribeTargetGroupsOutput) String() string {
  5251. return awsutil.Prettify(s)
  5252. }
  5253. // GoString returns the string representation
  5254. func (s DescribeTargetGroupsOutput) GoString() string {
  5255. return s.String()
  5256. }
  5257. // SetNextMarker sets the NextMarker field's value.
  5258. func (s *DescribeTargetGroupsOutput) SetNextMarker(v string) *DescribeTargetGroupsOutput {
  5259. s.NextMarker = &v
  5260. return s
  5261. }
  5262. // SetTargetGroups sets the TargetGroups field's value.
  5263. func (s *DescribeTargetGroupsOutput) SetTargetGroups(v []*TargetGroup) *DescribeTargetGroupsOutput {
  5264. s.TargetGroups = v
  5265. return s
  5266. }
  5267. type DescribeTargetHealthInput struct {
  5268. _ struct{} `type:"structure"`
  5269. // The Amazon Resource Name (ARN) of the target group.
  5270. //
  5271. // TargetGroupArn is a required field
  5272. TargetGroupArn *string `type:"string" required:"true"`
  5273. // The targets.
  5274. Targets []*TargetDescription `type:"list"`
  5275. }
  5276. // String returns the string representation
  5277. func (s DescribeTargetHealthInput) String() string {
  5278. return awsutil.Prettify(s)
  5279. }
  5280. // GoString returns the string representation
  5281. func (s DescribeTargetHealthInput) GoString() string {
  5282. return s.String()
  5283. }
  5284. // Validate inspects the fields of the type to determine if they are valid.
  5285. func (s *DescribeTargetHealthInput) Validate() error {
  5286. invalidParams := request.ErrInvalidParams{Context: "DescribeTargetHealthInput"}
  5287. if s.TargetGroupArn == nil {
  5288. invalidParams.Add(request.NewErrParamRequired("TargetGroupArn"))
  5289. }
  5290. if s.Targets != nil {
  5291. for i, v := range s.Targets {
  5292. if v == nil {
  5293. continue
  5294. }
  5295. if err := v.Validate(); err != nil {
  5296. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams))
  5297. }
  5298. }
  5299. }
  5300. if invalidParams.Len() > 0 {
  5301. return invalidParams
  5302. }
  5303. return nil
  5304. }
  5305. // SetTargetGroupArn sets the TargetGroupArn field's value.
  5306. func (s *DescribeTargetHealthInput) SetTargetGroupArn(v string) *DescribeTargetHealthInput {
  5307. s.TargetGroupArn = &v
  5308. return s
  5309. }
  5310. // SetTargets sets the Targets field's value.
  5311. func (s *DescribeTargetHealthInput) SetTargets(v []*TargetDescription) *DescribeTargetHealthInput {
  5312. s.Targets = v
  5313. return s
  5314. }
  5315. type DescribeTargetHealthOutput struct {
  5316. _ struct{} `type:"structure"`
  5317. // Information about the health of the targets.
  5318. TargetHealthDescriptions []*TargetHealthDescription `type:"list"`
  5319. }
  5320. // String returns the string representation
  5321. func (s DescribeTargetHealthOutput) String() string {
  5322. return awsutil.Prettify(s)
  5323. }
  5324. // GoString returns the string representation
  5325. func (s DescribeTargetHealthOutput) GoString() string {
  5326. return s.String()
  5327. }
  5328. // SetTargetHealthDescriptions sets the TargetHealthDescriptions field's value.
  5329. func (s *DescribeTargetHealthOutput) SetTargetHealthDescriptions(v []*TargetHealthDescription) *DescribeTargetHealthOutput {
  5330. s.TargetHealthDescriptions = v
  5331. return s
  5332. }
  5333. // Information about an action that returns a custom HTTP response.
  5334. type FixedResponseActionConfig struct {
  5335. _ struct{} `type:"structure"`
  5336. // The content type.
  5337. //
  5338. // Valid Values: text/plain | text/css | text/html | application/javascript
  5339. // | application/json
  5340. ContentType *string `type:"string"`
  5341. // The message.
  5342. MessageBody *string `type:"string"`
  5343. // The HTTP response code (2XX, 4XX, or 5XX).
  5344. //
  5345. // StatusCode is a required field
  5346. StatusCode *string `type:"string" required:"true"`
  5347. }
  5348. // String returns the string representation
  5349. func (s FixedResponseActionConfig) String() string {
  5350. return awsutil.Prettify(s)
  5351. }
  5352. // GoString returns the string representation
  5353. func (s FixedResponseActionConfig) GoString() string {
  5354. return s.String()
  5355. }
  5356. // Validate inspects the fields of the type to determine if they are valid.
  5357. func (s *FixedResponseActionConfig) Validate() error {
  5358. invalidParams := request.ErrInvalidParams{Context: "FixedResponseActionConfig"}
  5359. if s.StatusCode == nil {
  5360. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  5361. }
  5362. if invalidParams.Len() > 0 {
  5363. return invalidParams
  5364. }
  5365. return nil
  5366. }
  5367. // SetContentType sets the ContentType field's value.
  5368. func (s *FixedResponseActionConfig) SetContentType(v string) *FixedResponseActionConfig {
  5369. s.ContentType = &v
  5370. return s
  5371. }
  5372. // SetMessageBody sets the MessageBody field's value.
  5373. func (s *FixedResponseActionConfig) SetMessageBody(v string) *FixedResponseActionConfig {
  5374. s.MessageBody = &v
  5375. return s
  5376. }
  5377. // SetStatusCode sets the StatusCode field's value.
  5378. func (s *FixedResponseActionConfig) SetStatusCode(v string) *FixedResponseActionConfig {
  5379. s.StatusCode = &v
  5380. return s
  5381. }
  5382. // Information about an Elastic Load Balancing resource limit for your AWS account.
  5383. type Limit struct {
  5384. _ struct{} `type:"structure"`
  5385. // The maximum value of the limit.
  5386. Max *string `type:"string"`
  5387. // The name of the limit. The possible values are:
  5388. //
  5389. // * application-load-balancers
  5390. //
  5391. // * listeners-per-application-load-balancer
  5392. //
  5393. // * listeners-per-network-load-balancer
  5394. //
  5395. // * network-load-balancers
  5396. //
  5397. // * rules-per-application-load-balancer
  5398. //
  5399. // * target-groups
  5400. //
  5401. // * targets-per-application-load-balancer
  5402. //
  5403. // * targets-per-availability-zone-per-network-load-balancer
  5404. //
  5405. // * targets-per-network-load-balancer
  5406. Name *string `type:"string"`
  5407. }
  5408. // String returns the string representation
  5409. func (s Limit) String() string {
  5410. return awsutil.Prettify(s)
  5411. }
  5412. // GoString returns the string representation
  5413. func (s Limit) GoString() string {
  5414. return s.String()
  5415. }
  5416. // SetMax sets the Max field's value.
  5417. func (s *Limit) SetMax(v string) *Limit {
  5418. s.Max = &v
  5419. return s
  5420. }
  5421. // SetName sets the Name field's value.
  5422. func (s *Limit) SetName(v string) *Limit {
  5423. s.Name = &v
  5424. return s
  5425. }
  5426. // Information about a listener.
  5427. type Listener struct {
  5428. _ struct{} `type:"structure"`
  5429. // The SSL server certificate. You must provide a certificate if the protocol
  5430. // is HTTPS.
  5431. Certificates []*Certificate `type:"list"`
  5432. // The default actions for the listener.
  5433. DefaultActions []*Action `type:"list"`
  5434. // The Amazon Resource Name (ARN) of the listener.
  5435. ListenerArn *string `type:"string"`
  5436. // The Amazon Resource Name (ARN) of the load balancer.
  5437. LoadBalancerArn *string `type:"string"`
  5438. // The port on which the load balancer is listening.
  5439. Port *int64 `min:"1" type:"integer"`
  5440. // The protocol for connections from clients to the load balancer.
  5441. Protocol *string `type:"string" enum:"ProtocolEnum"`
  5442. // The security policy that defines which ciphers and protocols are supported.
  5443. // The default is the current predefined security policy.
  5444. SslPolicy *string `type:"string"`
  5445. }
  5446. // String returns the string representation
  5447. func (s Listener) String() string {
  5448. return awsutil.Prettify(s)
  5449. }
  5450. // GoString returns the string representation
  5451. func (s Listener) GoString() string {
  5452. return s.String()
  5453. }
  5454. // SetCertificates sets the Certificates field's value.
  5455. func (s *Listener) SetCertificates(v []*Certificate) *Listener {
  5456. s.Certificates = v
  5457. return s
  5458. }
  5459. // SetDefaultActions sets the DefaultActions field's value.
  5460. func (s *Listener) SetDefaultActions(v []*Action) *Listener {
  5461. s.DefaultActions = v
  5462. return s
  5463. }
  5464. // SetListenerArn sets the ListenerArn field's value.
  5465. func (s *Listener) SetListenerArn(v string) *Listener {
  5466. s.ListenerArn = &v
  5467. return s
  5468. }
  5469. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  5470. func (s *Listener) SetLoadBalancerArn(v string) *Listener {
  5471. s.LoadBalancerArn = &v
  5472. return s
  5473. }
  5474. // SetPort sets the Port field's value.
  5475. func (s *Listener) SetPort(v int64) *Listener {
  5476. s.Port = &v
  5477. return s
  5478. }
  5479. // SetProtocol sets the Protocol field's value.
  5480. func (s *Listener) SetProtocol(v string) *Listener {
  5481. s.Protocol = &v
  5482. return s
  5483. }
  5484. // SetSslPolicy sets the SslPolicy field's value.
  5485. func (s *Listener) SetSslPolicy(v string) *Listener {
  5486. s.SslPolicy = &v
  5487. return s
  5488. }
  5489. // Information about a load balancer.
  5490. type LoadBalancer struct {
  5491. _ struct{} `type:"structure"`
  5492. // The Availability Zones for the load balancer.
  5493. AvailabilityZones []*AvailabilityZone `type:"list"`
  5494. // The ID of the Amazon Route 53 hosted zone associated with the load balancer.
  5495. CanonicalHostedZoneId *string `type:"string"`
  5496. // The date and time the load balancer was created.
  5497. CreatedTime *time.Time `type:"timestamp"`
  5498. // The public DNS name of the load balancer.
  5499. DNSName *string `type:"string"`
  5500. // The type of IP addresses used by the subnets for your load balancer. The
  5501. // possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and
  5502. // IPv6 addresses).
  5503. IpAddressType *string `type:"string" enum:"IpAddressType"`
  5504. // The Amazon Resource Name (ARN) of the load balancer.
  5505. LoadBalancerArn *string `type:"string"`
  5506. // The name of the load balancer.
  5507. LoadBalancerName *string `type:"string"`
  5508. // The nodes of an Internet-facing load balancer have public IP addresses. The
  5509. // DNS name of an Internet-facing load balancer is publicly resolvable to the
  5510. // public IP addresses of the nodes. Therefore, Internet-facing load balancers
  5511. // can route requests from clients over the internet.
  5512. //
  5513. // The nodes of an internal load balancer have only private IP addresses. The
  5514. // DNS name of an internal load balancer is publicly resolvable to the private
  5515. // IP addresses of the nodes. Therefore, internal load balancers can only route
  5516. // requests from clients with access to the VPC for the load balancer.
  5517. Scheme *string `type:"string" enum:"LoadBalancerSchemeEnum"`
  5518. // The IDs of the security groups for the load balancer.
  5519. SecurityGroups []*string `type:"list"`
  5520. // The state of the load balancer.
  5521. State *LoadBalancerState `type:"structure"`
  5522. // The type of load balancer.
  5523. Type *string `type:"string" enum:"LoadBalancerTypeEnum"`
  5524. // The ID of the VPC for the load balancer.
  5525. VpcId *string `type:"string"`
  5526. }
  5527. // String returns the string representation
  5528. func (s LoadBalancer) String() string {
  5529. return awsutil.Prettify(s)
  5530. }
  5531. // GoString returns the string representation
  5532. func (s LoadBalancer) GoString() string {
  5533. return s.String()
  5534. }
  5535. // SetAvailabilityZones sets the AvailabilityZones field's value.
  5536. func (s *LoadBalancer) SetAvailabilityZones(v []*AvailabilityZone) *LoadBalancer {
  5537. s.AvailabilityZones = v
  5538. return s
  5539. }
  5540. // SetCanonicalHostedZoneId sets the CanonicalHostedZoneId field's value.
  5541. func (s *LoadBalancer) SetCanonicalHostedZoneId(v string) *LoadBalancer {
  5542. s.CanonicalHostedZoneId = &v
  5543. return s
  5544. }
  5545. // SetCreatedTime sets the CreatedTime field's value.
  5546. func (s *LoadBalancer) SetCreatedTime(v time.Time) *LoadBalancer {
  5547. s.CreatedTime = &v
  5548. return s
  5549. }
  5550. // SetDNSName sets the DNSName field's value.
  5551. func (s *LoadBalancer) SetDNSName(v string) *LoadBalancer {
  5552. s.DNSName = &v
  5553. return s
  5554. }
  5555. // SetIpAddressType sets the IpAddressType field's value.
  5556. func (s *LoadBalancer) SetIpAddressType(v string) *LoadBalancer {
  5557. s.IpAddressType = &v
  5558. return s
  5559. }
  5560. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  5561. func (s *LoadBalancer) SetLoadBalancerArn(v string) *LoadBalancer {
  5562. s.LoadBalancerArn = &v
  5563. return s
  5564. }
  5565. // SetLoadBalancerName sets the LoadBalancerName field's value.
  5566. func (s *LoadBalancer) SetLoadBalancerName(v string) *LoadBalancer {
  5567. s.LoadBalancerName = &v
  5568. return s
  5569. }
  5570. // SetScheme sets the Scheme field's value.
  5571. func (s *LoadBalancer) SetScheme(v string) *LoadBalancer {
  5572. s.Scheme = &v
  5573. return s
  5574. }
  5575. // SetSecurityGroups sets the SecurityGroups field's value.
  5576. func (s *LoadBalancer) SetSecurityGroups(v []*string) *LoadBalancer {
  5577. s.SecurityGroups = v
  5578. return s
  5579. }
  5580. // SetState sets the State field's value.
  5581. func (s *LoadBalancer) SetState(v *LoadBalancerState) *LoadBalancer {
  5582. s.State = v
  5583. return s
  5584. }
  5585. // SetType sets the Type field's value.
  5586. func (s *LoadBalancer) SetType(v string) *LoadBalancer {
  5587. s.Type = &v
  5588. return s
  5589. }
  5590. // SetVpcId sets the VpcId field's value.
  5591. func (s *LoadBalancer) SetVpcId(v string) *LoadBalancer {
  5592. s.VpcId = &v
  5593. return s
  5594. }
  5595. // Information about a static IP address for a load balancer.
  5596. type LoadBalancerAddress struct {
  5597. _ struct{} `type:"structure"`
  5598. // [Network Load Balancers] The allocation ID of the Elastic IP address.
  5599. AllocationId *string `type:"string"`
  5600. // The static IP address.
  5601. IpAddress *string `type:"string"`
  5602. }
  5603. // String returns the string representation
  5604. func (s LoadBalancerAddress) String() string {
  5605. return awsutil.Prettify(s)
  5606. }
  5607. // GoString returns the string representation
  5608. func (s LoadBalancerAddress) GoString() string {
  5609. return s.String()
  5610. }
  5611. // SetAllocationId sets the AllocationId field's value.
  5612. func (s *LoadBalancerAddress) SetAllocationId(v string) *LoadBalancerAddress {
  5613. s.AllocationId = &v
  5614. return s
  5615. }
  5616. // SetIpAddress sets the IpAddress field's value.
  5617. func (s *LoadBalancerAddress) SetIpAddress(v string) *LoadBalancerAddress {
  5618. s.IpAddress = &v
  5619. return s
  5620. }
  5621. // Information about a load balancer attribute.
  5622. type LoadBalancerAttribute struct {
  5623. _ struct{} `type:"structure"`
  5624. // The name of the attribute.
  5625. //
  5626. // The following attributes are supported by both Application Load Balancers
  5627. // and Network Load Balancers:
  5628. //
  5629. // * deletion_protection.enabled - Indicates whether deletion protection
  5630. // is enabled. The value is true or false. The default is false.
  5631. //
  5632. // The following attributes are supported by only Application Load Balancers:
  5633. //
  5634. // * access_logs.s3.enabled - Indicates whether access logs are enabled.
  5635. // The value is true or false. The default is false.
  5636. //
  5637. // * access_logs.s3.bucket - The name of the S3 bucket for the access logs.
  5638. // This attribute is required if access logs are enabled. The bucket must
  5639. // exist in the same region as the load balancer and have a bucket policy
  5640. // that grants Elastic Load Balancing permissions to write to the bucket.
  5641. //
  5642. // * access_logs.s3.prefix - The prefix for the location in the S3 bucket
  5643. // for the access logs.
  5644. //
  5645. // * idle_timeout.timeout_seconds - The idle timeout value, in seconds. The
  5646. // valid range is 1-4000 seconds. The default is 60 seconds.
  5647. //
  5648. // * routing.http2.enabled - Indicates whether HTTP/2 is enabled. The value
  5649. // is true or false. The default is true.
  5650. //
  5651. // The following attributes are supported by only Network Load Balancers:
  5652. //
  5653. // * load_balancing.cross_zone.enabled - Indicates whether cross-zone load
  5654. // balancing is enabled. The value is true or false. The default is false.
  5655. Key *string `type:"string"`
  5656. // The value of the attribute.
  5657. Value *string `type:"string"`
  5658. }
  5659. // String returns the string representation
  5660. func (s LoadBalancerAttribute) String() string {
  5661. return awsutil.Prettify(s)
  5662. }
  5663. // GoString returns the string representation
  5664. func (s LoadBalancerAttribute) GoString() string {
  5665. return s.String()
  5666. }
  5667. // SetKey sets the Key field's value.
  5668. func (s *LoadBalancerAttribute) SetKey(v string) *LoadBalancerAttribute {
  5669. s.Key = &v
  5670. return s
  5671. }
  5672. // SetValue sets the Value field's value.
  5673. func (s *LoadBalancerAttribute) SetValue(v string) *LoadBalancerAttribute {
  5674. s.Value = &v
  5675. return s
  5676. }
  5677. // Information about the state of the load balancer.
  5678. type LoadBalancerState struct {
  5679. _ struct{} `type:"structure"`
  5680. // The state code. The initial state of the load balancer is provisioning. After
  5681. // the load balancer is fully set up and ready to route traffic, its state is
  5682. // active. If the load balancer could not be set up, its state is failed.
  5683. Code *string `type:"string" enum:"LoadBalancerStateEnum"`
  5684. // A description of the state.
  5685. Reason *string `type:"string"`
  5686. }
  5687. // String returns the string representation
  5688. func (s LoadBalancerState) String() string {
  5689. return awsutil.Prettify(s)
  5690. }
  5691. // GoString returns the string representation
  5692. func (s LoadBalancerState) GoString() string {
  5693. return s.String()
  5694. }
  5695. // SetCode sets the Code field's value.
  5696. func (s *LoadBalancerState) SetCode(v string) *LoadBalancerState {
  5697. s.Code = &v
  5698. return s
  5699. }
  5700. // SetReason sets the Reason field's value.
  5701. func (s *LoadBalancerState) SetReason(v string) *LoadBalancerState {
  5702. s.Reason = &v
  5703. return s
  5704. }
  5705. // Information to use when checking for a successful response from a target.
  5706. type Matcher struct {
  5707. _ struct{} `type:"structure"`
  5708. // The HTTP codes.
  5709. //
  5710. // For Application Load Balancers, you can specify values between 200 and 499,
  5711. // and the default value is 200. You can specify multiple values (for example,
  5712. // "200,202") or a range of values (for example, "200-299").
  5713. //
  5714. // For Network Load Balancers, this is 200–399.
  5715. //
  5716. // HttpCode is a required field
  5717. HttpCode *string `type:"string" required:"true"`
  5718. }
  5719. // String returns the string representation
  5720. func (s Matcher) String() string {
  5721. return awsutil.Prettify(s)
  5722. }
  5723. // GoString returns the string representation
  5724. func (s Matcher) GoString() string {
  5725. return s.String()
  5726. }
  5727. // Validate inspects the fields of the type to determine if they are valid.
  5728. func (s *Matcher) Validate() error {
  5729. invalidParams := request.ErrInvalidParams{Context: "Matcher"}
  5730. if s.HttpCode == nil {
  5731. invalidParams.Add(request.NewErrParamRequired("HttpCode"))
  5732. }
  5733. if invalidParams.Len() > 0 {
  5734. return invalidParams
  5735. }
  5736. return nil
  5737. }
  5738. // SetHttpCode sets the HttpCode field's value.
  5739. func (s *Matcher) SetHttpCode(v string) *Matcher {
  5740. s.HttpCode = &v
  5741. return s
  5742. }
  5743. type ModifyListenerInput struct {
  5744. _ struct{} `type:"structure"`
  5745. // [HTTPS listeners] The default SSL server certificate. You must provide exactly
  5746. // one certificate. Set CertificateArn to the certificate ARN but do not set
  5747. // IsDefault.
  5748. //
  5749. // To create a certificate list, use AddListenerCertificates.
  5750. Certificates []*Certificate `type:"list"`
  5751. // The actions for the default rule. The rule must include one forward action
  5752. // or one or more fixed-response actions.
  5753. //
  5754. // If the action type is forward, you specify a target group. The protocol of
  5755. // the target group must be HTTP or HTTPS for an Application Load Balancer or
  5756. // TCP for a Network Load Balancer.
  5757. //
  5758. // [HTTPS listener] If the action type is authenticate-oidc, you authenticate
  5759. // users through an identity provider that is OpenID Connect (OIDC) compliant.
  5760. //
  5761. // [HTTPS listener] If the action type is authenticate-cognito, you authenticate
  5762. // users through the user pools supported by Amazon Cognito.
  5763. //
  5764. // [Application Load Balancer] If the action type is redirect, you redirect
  5765. // specified client requests from one URL to another.
  5766. //
  5767. // [Application Load Balancer] If the action type is fixed-response, you drop
  5768. // specified client requests and return a custom HTTP response.
  5769. DefaultActions []*Action `type:"list"`
  5770. // The Amazon Resource Name (ARN) of the listener.
  5771. //
  5772. // ListenerArn is a required field
  5773. ListenerArn *string `type:"string" required:"true"`
  5774. // The port for connections from clients to the load balancer.
  5775. Port *int64 `min:"1" type:"integer"`
  5776. // The protocol for connections from clients to the load balancer. Application
  5777. // Load Balancers support HTTP and HTTPS and Network Load Balancers support
  5778. // TCP.
  5779. Protocol *string `type:"string" enum:"ProtocolEnum"`
  5780. // [HTTPS listeners] The security policy that defines which protocols and ciphers
  5781. // are supported. For more information, see Security Policies (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies)
  5782. // in the Application Load Balancers Guide.
  5783. SslPolicy *string `type:"string"`
  5784. }
  5785. // String returns the string representation
  5786. func (s ModifyListenerInput) String() string {
  5787. return awsutil.Prettify(s)
  5788. }
  5789. // GoString returns the string representation
  5790. func (s ModifyListenerInput) GoString() string {
  5791. return s.String()
  5792. }
  5793. // Validate inspects the fields of the type to determine if they are valid.
  5794. func (s *ModifyListenerInput) Validate() error {
  5795. invalidParams := request.ErrInvalidParams{Context: "ModifyListenerInput"}
  5796. if s.ListenerArn == nil {
  5797. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  5798. }
  5799. if s.Port != nil && *s.Port < 1 {
  5800. invalidParams.Add(request.NewErrParamMinValue("Port", 1))
  5801. }
  5802. if s.DefaultActions != nil {
  5803. for i, v := range s.DefaultActions {
  5804. if v == nil {
  5805. continue
  5806. }
  5807. if err := v.Validate(); err != nil {
  5808. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DefaultActions", i), err.(request.ErrInvalidParams))
  5809. }
  5810. }
  5811. }
  5812. if invalidParams.Len() > 0 {
  5813. return invalidParams
  5814. }
  5815. return nil
  5816. }
  5817. // SetCertificates sets the Certificates field's value.
  5818. func (s *ModifyListenerInput) SetCertificates(v []*Certificate) *ModifyListenerInput {
  5819. s.Certificates = v
  5820. return s
  5821. }
  5822. // SetDefaultActions sets the DefaultActions field's value.
  5823. func (s *ModifyListenerInput) SetDefaultActions(v []*Action) *ModifyListenerInput {
  5824. s.DefaultActions = v
  5825. return s
  5826. }
  5827. // SetListenerArn sets the ListenerArn field's value.
  5828. func (s *ModifyListenerInput) SetListenerArn(v string) *ModifyListenerInput {
  5829. s.ListenerArn = &v
  5830. return s
  5831. }
  5832. // SetPort sets the Port field's value.
  5833. func (s *ModifyListenerInput) SetPort(v int64) *ModifyListenerInput {
  5834. s.Port = &v
  5835. return s
  5836. }
  5837. // SetProtocol sets the Protocol field's value.
  5838. func (s *ModifyListenerInput) SetProtocol(v string) *ModifyListenerInput {
  5839. s.Protocol = &v
  5840. return s
  5841. }
  5842. // SetSslPolicy sets the SslPolicy field's value.
  5843. func (s *ModifyListenerInput) SetSslPolicy(v string) *ModifyListenerInput {
  5844. s.SslPolicy = &v
  5845. return s
  5846. }
  5847. type ModifyListenerOutput struct {
  5848. _ struct{} `type:"structure"`
  5849. // Information about the modified listener.
  5850. Listeners []*Listener `type:"list"`
  5851. }
  5852. // String returns the string representation
  5853. func (s ModifyListenerOutput) String() string {
  5854. return awsutil.Prettify(s)
  5855. }
  5856. // GoString returns the string representation
  5857. func (s ModifyListenerOutput) GoString() string {
  5858. return s.String()
  5859. }
  5860. // SetListeners sets the Listeners field's value.
  5861. func (s *ModifyListenerOutput) SetListeners(v []*Listener) *ModifyListenerOutput {
  5862. s.Listeners = v
  5863. return s
  5864. }
  5865. type ModifyLoadBalancerAttributesInput struct {
  5866. _ struct{} `type:"structure"`
  5867. // The load balancer attributes.
  5868. //
  5869. // Attributes is a required field
  5870. Attributes []*LoadBalancerAttribute `type:"list" required:"true"`
  5871. // The Amazon Resource Name (ARN) of the load balancer.
  5872. //
  5873. // LoadBalancerArn is a required field
  5874. LoadBalancerArn *string `type:"string" required:"true"`
  5875. }
  5876. // String returns the string representation
  5877. func (s ModifyLoadBalancerAttributesInput) String() string {
  5878. return awsutil.Prettify(s)
  5879. }
  5880. // GoString returns the string representation
  5881. func (s ModifyLoadBalancerAttributesInput) GoString() string {
  5882. return s.String()
  5883. }
  5884. // Validate inspects the fields of the type to determine if they are valid.
  5885. func (s *ModifyLoadBalancerAttributesInput) Validate() error {
  5886. invalidParams := request.ErrInvalidParams{Context: "ModifyLoadBalancerAttributesInput"}
  5887. if s.Attributes == nil {
  5888. invalidParams.Add(request.NewErrParamRequired("Attributes"))
  5889. }
  5890. if s.LoadBalancerArn == nil {
  5891. invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn"))
  5892. }
  5893. if invalidParams.Len() > 0 {
  5894. return invalidParams
  5895. }
  5896. return nil
  5897. }
  5898. // SetAttributes sets the Attributes field's value.
  5899. func (s *ModifyLoadBalancerAttributesInput) SetAttributes(v []*LoadBalancerAttribute) *ModifyLoadBalancerAttributesInput {
  5900. s.Attributes = v
  5901. return s
  5902. }
  5903. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  5904. func (s *ModifyLoadBalancerAttributesInput) SetLoadBalancerArn(v string) *ModifyLoadBalancerAttributesInput {
  5905. s.LoadBalancerArn = &v
  5906. return s
  5907. }
  5908. type ModifyLoadBalancerAttributesOutput struct {
  5909. _ struct{} `type:"structure"`
  5910. // Information about the load balancer attributes.
  5911. Attributes []*LoadBalancerAttribute `type:"list"`
  5912. }
  5913. // String returns the string representation
  5914. func (s ModifyLoadBalancerAttributesOutput) String() string {
  5915. return awsutil.Prettify(s)
  5916. }
  5917. // GoString returns the string representation
  5918. func (s ModifyLoadBalancerAttributesOutput) GoString() string {
  5919. return s.String()
  5920. }
  5921. // SetAttributes sets the Attributes field's value.
  5922. func (s *ModifyLoadBalancerAttributesOutput) SetAttributes(v []*LoadBalancerAttribute) *ModifyLoadBalancerAttributesOutput {
  5923. s.Attributes = v
  5924. return s
  5925. }
  5926. type ModifyRuleInput struct {
  5927. _ struct{} `type:"structure"`
  5928. // The actions.
  5929. //
  5930. // If the action type is forward, you specify a target group. The protocol of
  5931. // the target group must be HTTP or HTTPS for an Application Load Balancer or
  5932. // TCP for a Network Load Balancer.
  5933. //
  5934. // [HTTPS listener] If the action type is authenticate-oidc, you authenticate
  5935. // users through an identity provider that is OpenID Connect (OIDC) compliant.
  5936. //
  5937. // [HTTPS listener] If the action type is authenticate-cognito, you authenticate
  5938. // users through the user pools supported by Amazon Cognito.
  5939. //
  5940. // [Application Load Balancer] If the action type is redirect, you redirect
  5941. // specified client requests from one URL to another.
  5942. //
  5943. // [Application Load Balancer] If the action type is fixed-response, you drop
  5944. // specified client requests and return a custom HTTP response.
  5945. Actions []*Action `type:"list"`
  5946. // The conditions. Each condition specifies a field name and a single value.
  5947. //
  5948. // If the field name is host-header, you can specify a single host name (for
  5949. // example, my.example.com). A host name is case insensitive, can be up to 128
  5950. // characters in length, and can contain any of the following characters. You
  5951. // can include up to three wildcard characters.
  5952. //
  5953. // * A-Z, a-z, 0-9
  5954. //
  5955. // * - .
  5956. //
  5957. // * * (matches 0 or more characters)
  5958. //
  5959. // * ? (matches exactly 1 character)
  5960. //
  5961. // If the field name is path-pattern, you can specify a single path pattern.
  5962. // A path pattern is case-sensitive, can be up to 128 characters in length,
  5963. // and can contain any of the following characters. You can include up to three
  5964. // wildcard characters.
  5965. //
  5966. // * A-Z, a-z, 0-9
  5967. //
  5968. // * _ - . $ / ~ " ' @ : +
  5969. //
  5970. // * & (using &)
  5971. //
  5972. // * * (matches 0 or more characters)
  5973. //
  5974. // * ? (matches exactly 1 character)
  5975. Conditions []*RuleCondition `type:"list"`
  5976. // The Amazon Resource Name (ARN) of the rule.
  5977. //
  5978. // RuleArn is a required field
  5979. RuleArn *string `type:"string" required:"true"`
  5980. }
  5981. // String returns the string representation
  5982. func (s ModifyRuleInput) String() string {
  5983. return awsutil.Prettify(s)
  5984. }
  5985. // GoString returns the string representation
  5986. func (s ModifyRuleInput) GoString() string {
  5987. return s.String()
  5988. }
  5989. // Validate inspects the fields of the type to determine if they are valid.
  5990. func (s *ModifyRuleInput) Validate() error {
  5991. invalidParams := request.ErrInvalidParams{Context: "ModifyRuleInput"}
  5992. if s.RuleArn == nil {
  5993. invalidParams.Add(request.NewErrParamRequired("RuleArn"))
  5994. }
  5995. if s.Actions != nil {
  5996. for i, v := range s.Actions {
  5997. if v == nil {
  5998. continue
  5999. }
  6000. if err := v.Validate(); err != nil {
  6001. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Actions", i), err.(request.ErrInvalidParams))
  6002. }
  6003. }
  6004. }
  6005. if invalidParams.Len() > 0 {
  6006. return invalidParams
  6007. }
  6008. return nil
  6009. }
  6010. // SetActions sets the Actions field's value.
  6011. func (s *ModifyRuleInput) SetActions(v []*Action) *ModifyRuleInput {
  6012. s.Actions = v
  6013. return s
  6014. }
  6015. // SetConditions sets the Conditions field's value.
  6016. func (s *ModifyRuleInput) SetConditions(v []*RuleCondition) *ModifyRuleInput {
  6017. s.Conditions = v
  6018. return s
  6019. }
  6020. // SetRuleArn sets the RuleArn field's value.
  6021. func (s *ModifyRuleInput) SetRuleArn(v string) *ModifyRuleInput {
  6022. s.RuleArn = &v
  6023. return s
  6024. }
  6025. type ModifyRuleOutput struct {
  6026. _ struct{} `type:"structure"`
  6027. // Information about the modified rule.
  6028. Rules []*Rule `type:"list"`
  6029. }
  6030. // String returns the string representation
  6031. func (s ModifyRuleOutput) String() string {
  6032. return awsutil.Prettify(s)
  6033. }
  6034. // GoString returns the string representation
  6035. func (s ModifyRuleOutput) GoString() string {
  6036. return s.String()
  6037. }
  6038. // SetRules sets the Rules field's value.
  6039. func (s *ModifyRuleOutput) SetRules(v []*Rule) *ModifyRuleOutput {
  6040. s.Rules = v
  6041. return s
  6042. }
  6043. type ModifyTargetGroupAttributesInput struct {
  6044. _ struct{} `type:"structure"`
  6045. // The attributes.
  6046. //
  6047. // Attributes is a required field
  6048. Attributes []*TargetGroupAttribute `type:"list" required:"true"`
  6049. // The Amazon Resource Name (ARN) of the target group.
  6050. //
  6051. // TargetGroupArn is a required field
  6052. TargetGroupArn *string `type:"string" required:"true"`
  6053. }
  6054. // String returns the string representation
  6055. func (s ModifyTargetGroupAttributesInput) String() string {
  6056. return awsutil.Prettify(s)
  6057. }
  6058. // GoString returns the string representation
  6059. func (s ModifyTargetGroupAttributesInput) GoString() string {
  6060. return s.String()
  6061. }
  6062. // Validate inspects the fields of the type to determine if they are valid.
  6063. func (s *ModifyTargetGroupAttributesInput) Validate() error {
  6064. invalidParams := request.ErrInvalidParams{Context: "ModifyTargetGroupAttributesInput"}
  6065. if s.Attributes == nil {
  6066. invalidParams.Add(request.NewErrParamRequired("Attributes"))
  6067. }
  6068. if s.TargetGroupArn == nil {
  6069. invalidParams.Add(request.NewErrParamRequired("TargetGroupArn"))
  6070. }
  6071. if invalidParams.Len() > 0 {
  6072. return invalidParams
  6073. }
  6074. return nil
  6075. }
  6076. // SetAttributes sets the Attributes field's value.
  6077. func (s *ModifyTargetGroupAttributesInput) SetAttributes(v []*TargetGroupAttribute) *ModifyTargetGroupAttributesInput {
  6078. s.Attributes = v
  6079. return s
  6080. }
  6081. // SetTargetGroupArn sets the TargetGroupArn field's value.
  6082. func (s *ModifyTargetGroupAttributesInput) SetTargetGroupArn(v string) *ModifyTargetGroupAttributesInput {
  6083. s.TargetGroupArn = &v
  6084. return s
  6085. }
  6086. type ModifyTargetGroupAttributesOutput struct {
  6087. _ struct{} `type:"structure"`
  6088. // Information about the attributes.
  6089. Attributes []*TargetGroupAttribute `type:"list"`
  6090. }
  6091. // String returns the string representation
  6092. func (s ModifyTargetGroupAttributesOutput) String() string {
  6093. return awsutil.Prettify(s)
  6094. }
  6095. // GoString returns the string representation
  6096. func (s ModifyTargetGroupAttributesOutput) GoString() string {
  6097. return s.String()
  6098. }
  6099. // SetAttributes sets the Attributes field's value.
  6100. func (s *ModifyTargetGroupAttributesOutput) SetAttributes(v []*TargetGroupAttribute) *ModifyTargetGroupAttributesOutput {
  6101. s.Attributes = v
  6102. return s
  6103. }
  6104. type ModifyTargetGroupInput struct {
  6105. _ struct{} `type:"structure"`
  6106. // Indicates whether health checks are enabled.
  6107. HealthCheckEnabled *bool `type:"boolean"`
  6108. // The approximate amount of time, in seconds, between health checks of an individual
  6109. // target. For Application Load Balancers, the range is 5–300 seconds. For Network
  6110. // Load Balancers, the supported values are 10 or 30 seconds.
  6111. //
  6112. // If the protocol of the target group is TCP, you can't modify this setting.
  6113. HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"`
  6114. // [HTTP/HTTPS health checks] The ping path that is the destination for the
  6115. // health check request.
  6116. HealthCheckPath *string `min:"1" type:"string"`
  6117. // The port the load balancer uses when performing health checks on targets.
  6118. HealthCheckPort *string `type:"string"`
  6119. // The protocol the load balancer uses when performing health checks on targets.
  6120. // The TCP protocol is supported only if the protocol of the target group is
  6121. // TCP.
  6122. //
  6123. // If the protocol of the target group is TCP, you can't modify this setting.
  6124. HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"`
  6125. // [HTTP/HTTPS health checks] The amount of time, in seconds, during which no
  6126. // response means a failed health check.
  6127. //
  6128. // If the protocol of the target group is TCP, you can't modify this setting.
  6129. HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"`
  6130. // The number of consecutive health checks successes required before considering
  6131. // an unhealthy target healthy.
  6132. HealthyThresholdCount *int64 `min:"2" type:"integer"`
  6133. // [HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful
  6134. // response from a target.
  6135. //
  6136. // If the protocol of the target group is TCP, you can't modify this setting.
  6137. Matcher *Matcher `type:"structure"`
  6138. // The Amazon Resource Name (ARN) of the target group.
  6139. //
  6140. // TargetGroupArn is a required field
  6141. TargetGroupArn *string `type:"string" required:"true"`
  6142. // The number of consecutive health check failures required before considering
  6143. // the target unhealthy. For Network Load Balancers, this value must be the
  6144. // same as the healthy threshold count.
  6145. UnhealthyThresholdCount *int64 `min:"2" type:"integer"`
  6146. }
  6147. // String returns the string representation
  6148. func (s ModifyTargetGroupInput) String() string {
  6149. return awsutil.Prettify(s)
  6150. }
  6151. // GoString returns the string representation
  6152. func (s ModifyTargetGroupInput) GoString() string {
  6153. return s.String()
  6154. }
  6155. // Validate inspects the fields of the type to determine if they are valid.
  6156. func (s *ModifyTargetGroupInput) Validate() error {
  6157. invalidParams := request.ErrInvalidParams{Context: "ModifyTargetGroupInput"}
  6158. if s.HealthCheckIntervalSeconds != nil && *s.HealthCheckIntervalSeconds < 5 {
  6159. invalidParams.Add(request.NewErrParamMinValue("HealthCheckIntervalSeconds", 5))
  6160. }
  6161. if s.HealthCheckPath != nil && len(*s.HealthCheckPath) < 1 {
  6162. invalidParams.Add(request.NewErrParamMinLen("HealthCheckPath", 1))
  6163. }
  6164. if s.HealthCheckTimeoutSeconds != nil && *s.HealthCheckTimeoutSeconds < 2 {
  6165. invalidParams.Add(request.NewErrParamMinValue("HealthCheckTimeoutSeconds", 2))
  6166. }
  6167. if s.HealthyThresholdCount != nil && *s.HealthyThresholdCount < 2 {
  6168. invalidParams.Add(request.NewErrParamMinValue("HealthyThresholdCount", 2))
  6169. }
  6170. if s.TargetGroupArn == nil {
  6171. invalidParams.Add(request.NewErrParamRequired("TargetGroupArn"))
  6172. }
  6173. if s.UnhealthyThresholdCount != nil && *s.UnhealthyThresholdCount < 2 {
  6174. invalidParams.Add(request.NewErrParamMinValue("UnhealthyThresholdCount", 2))
  6175. }
  6176. if s.Matcher != nil {
  6177. if err := s.Matcher.Validate(); err != nil {
  6178. invalidParams.AddNested("Matcher", err.(request.ErrInvalidParams))
  6179. }
  6180. }
  6181. if invalidParams.Len() > 0 {
  6182. return invalidParams
  6183. }
  6184. return nil
  6185. }
  6186. // SetHealthCheckEnabled sets the HealthCheckEnabled field's value.
  6187. func (s *ModifyTargetGroupInput) SetHealthCheckEnabled(v bool) *ModifyTargetGroupInput {
  6188. s.HealthCheckEnabled = &v
  6189. return s
  6190. }
  6191. // SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value.
  6192. func (s *ModifyTargetGroupInput) SetHealthCheckIntervalSeconds(v int64) *ModifyTargetGroupInput {
  6193. s.HealthCheckIntervalSeconds = &v
  6194. return s
  6195. }
  6196. // SetHealthCheckPath sets the HealthCheckPath field's value.
  6197. func (s *ModifyTargetGroupInput) SetHealthCheckPath(v string) *ModifyTargetGroupInput {
  6198. s.HealthCheckPath = &v
  6199. return s
  6200. }
  6201. // SetHealthCheckPort sets the HealthCheckPort field's value.
  6202. func (s *ModifyTargetGroupInput) SetHealthCheckPort(v string) *ModifyTargetGroupInput {
  6203. s.HealthCheckPort = &v
  6204. return s
  6205. }
  6206. // SetHealthCheckProtocol sets the HealthCheckProtocol field's value.
  6207. func (s *ModifyTargetGroupInput) SetHealthCheckProtocol(v string) *ModifyTargetGroupInput {
  6208. s.HealthCheckProtocol = &v
  6209. return s
  6210. }
  6211. // SetHealthCheckTimeoutSeconds sets the HealthCheckTimeoutSeconds field's value.
  6212. func (s *ModifyTargetGroupInput) SetHealthCheckTimeoutSeconds(v int64) *ModifyTargetGroupInput {
  6213. s.HealthCheckTimeoutSeconds = &v
  6214. return s
  6215. }
  6216. // SetHealthyThresholdCount sets the HealthyThresholdCount field's value.
  6217. func (s *ModifyTargetGroupInput) SetHealthyThresholdCount(v int64) *ModifyTargetGroupInput {
  6218. s.HealthyThresholdCount = &v
  6219. return s
  6220. }
  6221. // SetMatcher sets the Matcher field's value.
  6222. func (s *ModifyTargetGroupInput) SetMatcher(v *Matcher) *ModifyTargetGroupInput {
  6223. s.Matcher = v
  6224. return s
  6225. }
  6226. // SetTargetGroupArn sets the TargetGroupArn field's value.
  6227. func (s *ModifyTargetGroupInput) SetTargetGroupArn(v string) *ModifyTargetGroupInput {
  6228. s.TargetGroupArn = &v
  6229. return s
  6230. }
  6231. // SetUnhealthyThresholdCount sets the UnhealthyThresholdCount field's value.
  6232. func (s *ModifyTargetGroupInput) SetUnhealthyThresholdCount(v int64) *ModifyTargetGroupInput {
  6233. s.UnhealthyThresholdCount = &v
  6234. return s
  6235. }
  6236. type ModifyTargetGroupOutput struct {
  6237. _ struct{} `type:"structure"`
  6238. // Information about the modified target group.
  6239. TargetGroups []*TargetGroup `type:"list"`
  6240. }
  6241. // String returns the string representation
  6242. func (s ModifyTargetGroupOutput) String() string {
  6243. return awsutil.Prettify(s)
  6244. }
  6245. // GoString returns the string representation
  6246. func (s ModifyTargetGroupOutput) GoString() string {
  6247. return s.String()
  6248. }
  6249. // SetTargetGroups sets the TargetGroups field's value.
  6250. func (s *ModifyTargetGroupOutput) SetTargetGroups(v []*TargetGroup) *ModifyTargetGroupOutput {
  6251. s.TargetGroups = v
  6252. return s
  6253. }
  6254. // Information about a redirect action.
  6255. //
  6256. // A URI consists of the following components: protocol://hostname:port/path?query.
  6257. // You must modify at least one of the following components to avoid a redirect
  6258. // loop: protocol, hostname, port, or path. Any components that you do not modify
  6259. // retain their original values.
  6260. //
  6261. // You can reuse URI components using the following reserved keywords:
  6262. //
  6263. // * #{protocol}
  6264. //
  6265. // * #{host}
  6266. //
  6267. // * #{port}
  6268. //
  6269. // * #{path} (the leading "/" is removed)
  6270. //
  6271. // * #{query}
  6272. //
  6273. // For example, you can change the path to "/new/#{path}", the hostname to "example.#{host}",
  6274. // or the query to "#{query}&value=xyz".
  6275. type RedirectActionConfig struct {
  6276. _ struct{} `type:"structure"`
  6277. // The hostname. This component is not percent-encoded. The hostname can contain
  6278. // #{host}.
  6279. Host *string `min:"1" type:"string"`
  6280. // The absolute path, starting with the leading "/". This component is not percent-encoded.
  6281. // The path can contain #{host}, #{path}, and #{port}.
  6282. Path *string `min:"1" type:"string"`
  6283. // The port. You can specify a value from 1 to 65535 or #{port}.
  6284. Port *string `type:"string"`
  6285. // The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect
  6286. // HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You cannot redirect HTTPS
  6287. // to HTTP.
  6288. Protocol *string `type:"string"`
  6289. // The query parameters, URL-encoded when necessary, but not percent-encoded.
  6290. // Do not include the leading "?", as it is automatically added. You can specify
  6291. // any of the reserved keywords.
  6292. Query *string `type:"string"`
  6293. // The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary
  6294. // (HTTP 302).
  6295. //
  6296. // StatusCode is a required field
  6297. StatusCode *string `type:"string" required:"true" enum:"RedirectActionStatusCodeEnum"`
  6298. }
  6299. // String returns the string representation
  6300. func (s RedirectActionConfig) String() string {
  6301. return awsutil.Prettify(s)
  6302. }
  6303. // GoString returns the string representation
  6304. func (s RedirectActionConfig) GoString() string {
  6305. return s.String()
  6306. }
  6307. // Validate inspects the fields of the type to determine if they are valid.
  6308. func (s *RedirectActionConfig) Validate() error {
  6309. invalidParams := request.ErrInvalidParams{Context: "RedirectActionConfig"}
  6310. if s.Host != nil && len(*s.Host) < 1 {
  6311. invalidParams.Add(request.NewErrParamMinLen("Host", 1))
  6312. }
  6313. if s.Path != nil && len(*s.Path) < 1 {
  6314. invalidParams.Add(request.NewErrParamMinLen("Path", 1))
  6315. }
  6316. if s.StatusCode == nil {
  6317. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  6318. }
  6319. if invalidParams.Len() > 0 {
  6320. return invalidParams
  6321. }
  6322. return nil
  6323. }
  6324. // SetHost sets the Host field's value.
  6325. func (s *RedirectActionConfig) SetHost(v string) *RedirectActionConfig {
  6326. s.Host = &v
  6327. return s
  6328. }
  6329. // SetPath sets the Path field's value.
  6330. func (s *RedirectActionConfig) SetPath(v string) *RedirectActionConfig {
  6331. s.Path = &v
  6332. return s
  6333. }
  6334. // SetPort sets the Port field's value.
  6335. func (s *RedirectActionConfig) SetPort(v string) *RedirectActionConfig {
  6336. s.Port = &v
  6337. return s
  6338. }
  6339. // SetProtocol sets the Protocol field's value.
  6340. func (s *RedirectActionConfig) SetProtocol(v string) *RedirectActionConfig {
  6341. s.Protocol = &v
  6342. return s
  6343. }
  6344. // SetQuery sets the Query field's value.
  6345. func (s *RedirectActionConfig) SetQuery(v string) *RedirectActionConfig {
  6346. s.Query = &v
  6347. return s
  6348. }
  6349. // SetStatusCode sets the StatusCode field's value.
  6350. func (s *RedirectActionConfig) SetStatusCode(v string) *RedirectActionConfig {
  6351. s.StatusCode = &v
  6352. return s
  6353. }
  6354. type RegisterTargetsInput struct {
  6355. _ struct{} `type:"structure"`
  6356. // The Amazon Resource Name (ARN) of the target group.
  6357. //
  6358. // TargetGroupArn is a required field
  6359. TargetGroupArn *string `type:"string" required:"true"`
  6360. // The targets.
  6361. //
  6362. // To register a target by instance ID, specify the instance ID. To register
  6363. // a target by IP address, specify the IP address. To register a Lambda function,
  6364. // specify the ARN of the Lambda function.
  6365. //
  6366. // Targets is a required field
  6367. Targets []*TargetDescription `type:"list" required:"true"`
  6368. }
  6369. // String returns the string representation
  6370. func (s RegisterTargetsInput) String() string {
  6371. return awsutil.Prettify(s)
  6372. }
  6373. // GoString returns the string representation
  6374. func (s RegisterTargetsInput) GoString() string {
  6375. return s.String()
  6376. }
  6377. // Validate inspects the fields of the type to determine if they are valid.
  6378. func (s *RegisterTargetsInput) Validate() error {
  6379. invalidParams := request.ErrInvalidParams{Context: "RegisterTargetsInput"}
  6380. if s.TargetGroupArn == nil {
  6381. invalidParams.Add(request.NewErrParamRequired("TargetGroupArn"))
  6382. }
  6383. if s.Targets == nil {
  6384. invalidParams.Add(request.NewErrParamRequired("Targets"))
  6385. }
  6386. if s.Targets != nil {
  6387. for i, v := range s.Targets {
  6388. if v == nil {
  6389. continue
  6390. }
  6391. if err := v.Validate(); err != nil {
  6392. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams))
  6393. }
  6394. }
  6395. }
  6396. if invalidParams.Len() > 0 {
  6397. return invalidParams
  6398. }
  6399. return nil
  6400. }
  6401. // SetTargetGroupArn sets the TargetGroupArn field's value.
  6402. func (s *RegisterTargetsInput) SetTargetGroupArn(v string) *RegisterTargetsInput {
  6403. s.TargetGroupArn = &v
  6404. return s
  6405. }
  6406. // SetTargets sets the Targets field's value.
  6407. func (s *RegisterTargetsInput) SetTargets(v []*TargetDescription) *RegisterTargetsInput {
  6408. s.Targets = v
  6409. return s
  6410. }
  6411. type RegisterTargetsOutput struct {
  6412. _ struct{} `type:"structure"`
  6413. }
  6414. // String returns the string representation
  6415. func (s RegisterTargetsOutput) String() string {
  6416. return awsutil.Prettify(s)
  6417. }
  6418. // GoString returns the string representation
  6419. func (s RegisterTargetsOutput) GoString() string {
  6420. return s.String()
  6421. }
  6422. type RemoveListenerCertificatesInput struct {
  6423. _ struct{} `type:"structure"`
  6424. // The certificate to remove. You can specify one certificate per call. Set
  6425. // CertificateArn to the certificate ARN but do not set IsDefault.
  6426. //
  6427. // Certificates is a required field
  6428. Certificates []*Certificate `type:"list" required:"true"`
  6429. // The Amazon Resource Name (ARN) of the listener.
  6430. //
  6431. // ListenerArn is a required field
  6432. ListenerArn *string `type:"string" required:"true"`
  6433. }
  6434. // String returns the string representation
  6435. func (s RemoveListenerCertificatesInput) String() string {
  6436. return awsutil.Prettify(s)
  6437. }
  6438. // GoString returns the string representation
  6439. func (s RemoveListenerCertificatesInput) GoString() string {
  6440. return s.String()
  6441. }
  6442. // Validate inspects the fields of the type to determine if they are valid.
  6443. func (s *RemoveListenerCertificatesInput) Validate() error {
  6444. invalidParams := request.ErrInvalidParams{Context: "RemoveListenerCertificatesInput"}
  6445. if s.Certificates == nil {
  6446. invalidParams.Add(request.NewErrParamRequired("Certificates"))
  6447. }
  6448. if s.ListenerArn == nil {
  6449. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  6450. }
  6451. if invalidParams.Len() > 0 {
  6452. return invalidParams
  6453. }
  6454. return nil
  6455. }
  6456. // SetCertificates sets the Certificates field's value.
  6457. func (s *RemoveListenerCertificatesInput) SetCertificates(v []*Certificate) *RemoveListenerCertificatesInput {
  6458. s.Certificates = v
  6459. return s
  6460. }
  6461. // SetListenerArn sets the ListenerArn field's value.
  6462. func (s *RemoveListenerCertificatesInput) SetListenerArn(v string) *RemoveListenerCertificatesInput {
  6463. s.ListenerArn = &v
  6464. return s
  6465. }
  6466. type RemoveListenerCertificatesOutput struct {
  6467. _ struct{} `type:"structure"`
  6468. }
  6469. // String returns the string representation
  6470. func (s RemoveListenerCertificatesOutput) String() string {
  6471. return awsutil.Prettify(s)
  6472. }
  6473. // GoString returns the string representation
  6474. func (s RemoveListenerCertificatesOutput) GoString() string {
  6475. return s.String()
  6476. }
  6477. type RemoveTagsInput struct {
  6478. _ struct{} `type:"structure"`
  6479. // The Amazon Resource Name (ARN) of the resource.
  6480. //
  6481. // ResourceArns is a required field
  6482. ResourceArns []*string `type:"list" required:"true"`
  6483. // The tag keys for the tags to remove.
  6484. //
  6485. // TagKeys is a required field
  6486. TagKeys []*string `type:"list" required:"true"`
  6487. }
  6488. // String returns the string representation
  6489. func (s RemoveTagsInput) String() string {
  6490. return awsutil.Prettify(s)
  6491. }
  6492. // GoString returns the string representation
  6493. func (s RemoveTagsInput) GoString() string {
  6494. return s.String()
  6495. }
  6496. // Validate inspects the fields of the type to determine if they are valid.
  6497. func (s *RemoveTagsInput) Validate() error {
  6498. invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"}
  6499. if s.ResourceArns == nil {
  6500. invalidParams.Add(request.NewErrParamRequired("ResourceArns"))
  6501. }
  6502. if s.TagKeys == nil {
  6503. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  6504. }
  6505. if invalidParams.Len() > 0 {
  6506. return invalidParams
  6507. }
  6508. return nil
  6509. }
  6510. // SetResourceArns sets the ResourceArns field's value.
  6511. func (s *RemoveTagsInput) SetResourceArns(v []*string) *RemoveTagsInput {
  6512. s.ResourceArns = v
  6513. return s
  6514. }
  6515. // SetTagKeys sets the TagKeys field's value.
  6516. func (s *RemoveTagsInput) SetTagKeys(v []*string) *RemoveTagsInput {
  6517. s.TagKeys = v
  6518. return s
  6519. }
  6520. type RemoveTagsOutput struct {
  6521. _ struct{} `type:"structure"`
  6522. }
  6523. // String returns the string representation
  6524. func (s RemoveTagsOutput) String() string {
  6525. return awsutil.Prettify(s)
  6526. }
  6527. // GoString returns the string representation
  6528. func (s RemoveTagsOutput) GoString() string {
  6529. return s.String()
  6530. }
  6531. // Information about a rule.
  6532. type Rule struct {
  6533. _ struct{} `type:"structure"`
  6534. // The actions.
  6535. Actions []*Action `type:"list"`
  6536. // The conditions.
  6537. Conditions []*RuleCondition `type:"list"`
  6538. // Indicates whether this is the default rule.
  6539. IsDefault *bool `type:"boolean"`
  6540. // The priority.
  6541. Priority *string `type:"string"`
  6542. // The Amazon Resource Name (ARN) of the rule.
  6543. RuleArn *string `type:"string"`
  6544. }
  6545. // String returns the string representation
  6546. func (s Rule) String() string {
  6547. return awsutil.Prettify(s)
  6548. }
  6549. // GoString returns the string representation
  6550. func (s Rule) GoString() string {
  6551. return s.String()
  6552. }
  6553. // SetActions sets the Actions field's value.
  6554. func (s *Rule) SetActions(v []*Action) *Rule {
  6555. s.Actions = v
  6556. return s
  6557. }
  6558. // SetConditions sets the Conditions field's value.
  6559. func (s *Rule) SetConditions(v []*RuleCondition) *Rule {
  6560. s.Conditions = v
  6561. return s
  6562. }
  6563. // SetIsDefault sets the IsDefault field's value.
  6564. func (s *Rule) SetIsDefault(v bool) *Rule {
  6565. s.IsDefault = &v
  6566. return s
  6567. }
  6568. // SetPriority sets the Priority field's value.
  6569. func (s *Rule) SetPriority(v string) *Rule {
  6570. s.Priority = &v
  6571. return s
  6572. }
  6573. // SetRuleArn sets the RuleArn field's value.
  6574. func (s *Rule) SetRuleArn(v string) *Rule {
  6575. s.RuleArn = &v
  6576. return s
  6577. }
  6578. // Information about a condition for a rule.
  6579. type RuleCondition struct {
  6580. _ struct{} `type:"structure"`
  6581. // The name of the field. The possible values are host-header and path-pattern.
  6582. Field *string `type:"string"`
  6583. // The condition value.
  6584. //
  6585. // If the field name is host-header, you can specify a single host name (for
  6586. // example, my.example.com). A host name is case insensitive, can be up to 128
  6587. // characters in length, and can contain any of the following characters. You
  6588. // can include up to three wildcard characters.
  6589. //
  6590. // * A-Z, a-z, 0-9
  6591. //
  6592. // * - .
  6593. //
  6594. // * * (matches 0 or more characters)
  6595. //
  6596. // * ? (matches exactly 1 character)
  6597. //
  6598. // If the field name is path-pattern, you can specify a single path pattern
  6599. // (for example, /img/*). A path pattern is case-sensitive, can be up to 128
  6600. // characters in length, and can contain any of the following characters. You
  6601. // can include up to three wildcard characters.
  6602. //
  6603. // * A-Z, a-z, 0-9
  6604. //
  6605. // * _ - . $ / ~ " ' @ : +
  6606. //
  6607. // * & (using &)
  6608. //
  6609. // * * (matches 0 or more characters)
  6610. //
  6611. // * ? (matches exactly 1 character)
  6612. Values []*string `type:"list"`
  6613. }
  6614. // String returns the string representation
  6615. func (s RuleCondition) String() string {
  6616. return awsutil.Prettify(s)
  6617. }
  6618. // GoString returns the string representation
  6619. func (s RuleCondition) GoString() string {
  6620. return s.String()
  6621. }
  6622. // SetField sets the Field field's value.
  6623. func (s *RuleCondition) SetField(v string) *RuleCondition {
  6624. s.Field = &v
  6625. return s
  6626. }
  6627. // SetValues sets the Values field's value.
  6628. func (s *RuleCondition) SetValues(v []*string) *RuleCondition {
  6629. s.Values = v
  6630. return s
  6631. }
  6632. // Information about the priorities for the rules for a listener.
  6633. type RulePriorityPair struct {
  6634. _ struct{} `type:"structure"`
  6635. // The rule priority.
  6636. Priority *int64 `min:"1" type:"integer"`
  6637. // The Amazon Resource Name (ARN) of the rule.
  6638. RuleArn *string `type:"string"`
  6639. }
  6640. // String returns the string representation
  6641. func (s RulePriorityPair) String() string {
  6642. return awsutil.Prettify(s)
  6643. }
  6644. // GoString returns the string representation
  6645. func (s RulePriorityPair) GoString() string {
  6646. return s.String()
  6647. }
  6648. // Validate inspects the fields of the type to determine if they are valid.
  6649. func (s *RulePriorityPair) Validate() error {
  6650. invalidParams := request.ErrInvalidParams{Context: "RulePriorityPair"}
  6651. if s.Priority != nil && *s.Priority < 1 {
  6652. invalidParams.Add(request.NewErrParamMinValue("Priority", 1))
  6653. }
  6654. if invalidParams.Len() > 0 {
  6655. return invalidParams
  6656. }
  6657. return nil
  6658. }
  6659. // SetPriority sets the Priority field's value.
  6660. func (s *RulePriorityPair) SetPriority(v int64) *RulePriorityPair {
  6661. s.Priority = &v
  6662. return s
  6663. }
  6664. // SetRuleArn sets the RuleArn field's value.
  6665. func (s *RulePriorityPair) SetRuleArn(v string) *RulePriorityPair {
  6666. s.RuleArn = &v
  6667. return s
  6668. }
  6669. type SetIpAddressTypeInput struct {
  6670. _ struct{} `type:"structure"`
  6671. // The IP address type. The possible values are ipv4 (for IPv4 addresses) and
  6672. // dualstack (for IPv4 and IPv6 addresses). Internal load balancers must use
  6673. // ipv4.
  6674. //
  6675. // IpAddressType is a required field
  6676. IpAddressType *string `type:"string" required:"true" enum:"IpAddressType"`
  6677. // The Amazon Resource Name (ARN) of the load balancer.
  6678. //
  6679. // LoadBalancerArn is a required field
  6680. LoadBalancerArn *string `type:"string" required:"true"`
  6681. }
  6682. // String returns the string representation
  6683. func (s SetIpAddressTypeInput) String() string {
  6684. return awsutil.Prettify(s)
  6685. }
  6686. // GoString returns the string representation
  6687. func (s SetIpAddressTypeInput) GoString() string {
  6688. return s.String()
  6689. }
  6690. // Validate inspects the fields of the type to determine if they are valid.
  6691. func (s *SetIpAddressTypeInput) Validate() error {
  6692. invalidParams := request.ErrInvalidParams{Context: "SetIpAddressTypeInput"}
  6693. if s.IpAddressType == nil {
  6694. invalidParams.Add(request.NewErrParamRequired("IpAddressType"))
  6695. }
  6696. if s.LoadBalancerArn == nil {
  6697. invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn"))
  6698. }
  6699. if invalidParams.Len() > 0 {
  6700. return invalidParams
  6701. }
  6702. return nil
  6703. }
  6704. // SetIpAddressType sets the IpAddressType field's value.
  6705. func (s *SetIpAddressTypeInput) SetIpAddressType(v string) *SetIpAddressTypeInput {
  6706. s.IpAddressType = &v
  6707. return s
  6708. }
  6709. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  6710. func (s *SetIpAddressTypeInput) SetLoadBalancerArn(v string) *SetIpAddressTypeInput {
  6711. s.LoadBalancerArn = &v
  6712. return s
  6713. }
  6714. type SetIpAddressTypeOutput struct {
  6715. _ struct{} `type:"structure"`
  6716. // The IP address type.
  6717. IpAddressType *string `type:"string" enum:"IpAddressType"`
  6718. }
  6719. // String returns the string representation
  6720. func (s SetIpAddressTypeOutput) String() string {
  6721. return awsutil.Prettify(s)
  6722. }
  6723. // GoString returns the string representation
  6724. func (s SetIpAddressTypeOutput) GoString() string {
  6725. return s.String()
  6726. }
  6727. // SetIpAddressType sets the IpAddressType field's value.
  6728. func (s *SetIpAddressTypeOutput) SetIpAddressType(v string) *SetIpAddressTypeOutput {
  6729. s.IpAddressType = &v
  6730. return s
  6731. }
  6732. type SetRulePrioritiesInput struct {
  6733. _ struct{} `type:"structure"`
  6734. // The rule priorities.
  6735. //
  6736. // RulePriorities is a required field
  6737. RulePriorities []*RulePriorityPair `type:"list" required:"true"`
  6738. }
  6739. // String returns the string representation
  6740. func (s SetRulePrioritiesInput) String() string {
  6741. return awsutil.Prettify(s)
  6742. }
  6743. // GoString returns the string representation
  6744. func (s SetRulePrioritiesInput) GoString() string {
  6745. return s.String()
  6746. }
  6747. // Validate inspects the fields of the type to determine if they are valid.
  6748. func (s *SetRulePrioritiesInput) Validate() error {
  6749. invalidParams := request.ErrInvalidParams{Context: "SetRulePrioritiesInput"}
  6750. if s.RulePriorities == nil {
  6751. invalidParams.Add(request.NewErrParamRequired("RulePriorities"))
  6752. }
  6753. if s.RulePriorities != nil {
  6754. for i, v := range s.RulePriorities {
  6755. if v == nil {
  6756. continue
  6757. }
  6758. if err := v.Validate(); err != nil {
  6759. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RulePriorities", i), err.(request.ErrInvalidParams))
  6760. }
  6761. }
  6762. }
  6763. if invalidParams.Len() > 0 {
  6764. return invalidParams
  6765. }
  6766. return nil
  6767. }
  6768. // SetRulePriorities sets the RulePriorities field's value.
  6769. func (s *SetRulePrioritiesInput) SetRulePriorities(v []*RulePriorityPair) *SetRulePrioritiesInput {
  6770. s.RulePriorities = v
  6771. return s
  6772. }
  6773. type SetRulePrioritiesOutput struct {
  6774. _ struct{} `type:"structure"`
  6775. // Information about the rules.
  6776. Rules []*Rule `type:"list"`
  6777. }
  6778. // String returns the string representation
  6779. func (s SetRulePrioritiesOutput) String() string {
  6780. return awsutil.Prettify(s)
  6781. }
  6782. // GoString returns the string representation
  6783. func (s SetRulePrioritiesOutput) GoString() string {
  6784. return s.String()
  6785. }
  6786. // SetRules sets the Rules field's value.
  6787. func (s *SetRulePrioritiesOutput) SetRules(v []*Rule) *SetRulePrioritiesOutput {
  6788. s.Rules = v
  6789. return s
  6790. }
  6791. type SetSecurityGroupsInput struct {
  6792. _ struct{} `type:"structure"`
  6793. // The Amazon Resource Name (ARN) of the load balancer.
  6794. //
  6795. // LoadBalancerArn is a required field
  6796. LoadBalancerArn *string `type:"string" required:"true"`
  6797. // The IDs of the security groups.
  6798. //
  6799. // SecurityGroups is a required field
  6800. SecurityGroups []*string `type:"list" required:"true"`
  6801. }
  6802. // String returns the string representation
  6803. func (s SetSecurityGroupsInput) String() string {
  6804. return awsutil.Prettify(s)
  6805. }
  6806. // GoString returns the string representation
  6807. func (s SetSecurityGroupsInput) GoString() string {
  6808. return s.String()
  6809. }
  6810. // Validate inspects the fields of the type to determine if they are valid.
  6811. func (s *SetSecurityGroupsInput) Validate() error {
  6812. invalidParams := request.ErrInvalidParams{Context: "SetSecurityGroupsInput"}
  6813. if s.LoadBalancerArn == nil {
  6814. invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn"))
  6815. }
  6816. if s.SecurityGroups == nil {
  6817. invalidParams.Add(request.NewErrParamRequired("SecurityGroups"))
  6818. }
  6819. if invalidParams.Len() > 0 {
  6820. return invalidParams
  6821. }
  6822. return nil
  6823. }
  6824. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  6825. func (s *SetSecurityGroupsInput) SetLoadBalancerArn(v string) *SetSecurityGroupsInput {
  6826. s.LoadBalancerArn = &v
  6827. return s
  6828. }
  6829. // SetSecurityGroups sets the SecurityGroups field's value.
  6830. func (s *SetSecurityGroupsInput) SetSecurityGroups(v []*string) *SetSecurityGroupsInput {
  6831. s.SecurityGroups = v
  6832. return s
  6833. }
  6834. type SetSecurityGroupsOutput struct {
  6835. _ struct{} `type:"structure"`
  6836. // The IDs of the security groups associated with the load balancer.
  6837. SecurityGroupIds []*string `type:"list"`
  6838. }
  6839. // String returns the string representation
  6840. func (s SetSecurityGroupsOutput) String() string {
  6841. return awsutil.Prettify(s)
  6842. }
  6843. // GoString returns the string representation
  6844. func (s SetSecurityGroupsOutput) GoString() string {
  6845. return s.String()
  6846. }
  6847. // SetSecurityGroupIds sets the SecurityGroupIds field's value.
  6848. func (s *SetSecurityGroupsOutput) SetSecurityGroupIds(v []*string) *SetSecurityGroupsOutput {
  6849. s.SecurityGroupIds = v
  6850. return s
  6851. }
  6852. type SetSubnetsInput struct {
  6853. _ struct{} `type:"structure"`
  6854. // The Amazon Resource Name (ARN) of the load balancer.
  6855. //
  6856. // LoadBalancerArn is a required field
  6857. LoadBalancerArn *string `type:"string" required:"true"`
  6858. // The IDs of the public subnets. You must specify subnets from at least two
  6859. // Availability Zones. You can specify only one subnet per Availability Zone.
  6860. // You must specify either subnets or subnet mappings.
  6861. //
  6862. // You cannot specify Elastic IP addresses for your subnets.
  6863. SubnetMappings []*SubnetMapping `type:"list"`
  6864. // The IDs of the public subnets. You must specify subnets from at least two
  6865. // Availability Zones. You can specify only one subnet per Availability Zone.
  6866. // You must specify either subnets or subnet mappings.
  6867. Subnets []*string `type:"list"`
  6868. }
  6869. // String returns the string representation
  6870. func (s SetSubnetsInput) String() string {
  6871. return awsutil.Prettify(s)
  6872. }
  6873. // GoString returns the string representation
  6874. func (s SetSubnetsInput) GoString() string {
  6875. return s.String()
  6876. }
  6877. // Validate inspects the fields of the type to determine if they are valid.
  6878. func (s *SetSubnetsInput) Validate() error {
  6879. invalidParams := request.ErrInvalidParams{Context: "SetSubnetsInput"}
  6880. if s.LoadBalancerArn == nil {
  6881. invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn"))
  6882. }
  6883. if invalidParams.Len() > 0 {
  6884. return invalidParams
  6885. }
  6886. return nil
  6887. }
  6888. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  6889. func (s *SetSubnetsInput) SetLoadBalancerArn(v string) *SetSubnetsInput {
  6890. s.LoadBalancerArn = &v
  6891. return s
  6892. }
  6893. // SetSubnetMappings sets the SubnetMappings field's value.
  6894. func (s *SetSubnetsInput) SetSubnetMappings(v []*SubnetMapping) *SetSubnetsInput {
  6895. s.SubnetMappings = v
  6896. return s
  6897. }
  6898. // SetSubnets sets the Subnets field's value.
  6899. func (s *SetSubnetsInput) SetSubnets(v []*string) *SetSubnetsInput {
  6900. s.Subnets = v
  6901. return s
  6902. }
  6903. type SetSubnetsOutput struct {
  6904. _ struct{} `type:"structure"`
  6905. // Information about the subnet and Availability Zone.
  6906. AvailabilityZones []*AvailabilityZone `type:"list"`
  6907. }
  6908. // String returns the string representation
  6909. func (s SetSubnetsOutput) String() string {
  6910. return awsutil.Prettify(s)
  6911. }
  6912. // GoString returns the string representation
  6913. func (s SetSubnetsOutput) GoString() string {
  6914. return s.String()
  6915. }
  6916. // SetAvailabilityZones sets the AvailabilityZones field's value.
  6917. func (s *SetSubnetsOutput) SetAvailabilityZones(v []*AvailabilityZone) *SetSubnetsOutput {
  6918. s.AvailabilityZones = v
  6919. return s
  6920. }
  6921. // Information about a policy used for SSL negotiation.
  6922. type SslPolicy struct {
  6923. _ struct{} `type:"structure"`
  6924. // The ciphers.
  6925. Ciphers []*Cipher `type:"list"`
  6926. // The name of the policy.
  6927. Name *string `type:"string"`
  6928. // The protocols.
  6929. SslProtocols []*string `type:"list"`
  6930. }
  6931. // String returns the string representation
  6932. func (s SslPolicy) String() string {
  6933. return awsutil.Prettify(s)
  6934. }
  6935. // GoString returns the string representation
  6936. func (s SslPolicy) GoString() string {
  6937. return s.String()
  6938. }
  6939. // SetCiphers sets the Ciphers field's value.
  6940. func (s *SslPolicy) SetCiphers(v []*Cipher) *SslPolicy {
  6941. s.Ciphers = v
  6942. return s
  6943. }
  6944. // SetName sets the Name field's value.
  6945. func (s *SslPolicy) SetName(v string) *SslPolicy {
  6946. s.Name = &v
  6947. return s
  6948. }
  6949. // SetSslProtocols sets the SslProtocols field's value.
  6950. func (s *SslPolicy) SetSslProtocols(v []*string) *SslPolicy {
  6951. s.SslProtocols = v
  6952. return s
  6953. }
  6954. // Information about a subnet mapping.
  6955. type SubnetMapping struct {
  6956. _ struct{} `type:"structure"`
  6957. // [Network Load Balancers] The allocation ID of the Elastic IP address.
  6958. AllocationId *string `type:"string"`
  6959. // The ID of the subnet.
  6960. SubnetId *string `type:"string"`
  6961. }
  6962. // String returns the string representation
  6963. func (s SubnetMapping) String() string {
  6964. return awsutil.Prettify(s)
  6965. }
  6966. // GoString returns the string representation
  6967. func (s SubnetMapping) GoString() string {
  6968. return s.String()
  6969. }
  6970. // SetAllocationId sets the AllocationId field's value.
  6971. func (s *SubnetMapping) SetAllocationId(v string) *SubnetMapping {
  6972. s.AllocationId = &v
  6973. return s
  6974. }
  6975. // SetSubnetId sets the SubnetId field's value.
  6976. func (s *SubnetMapping) SetSubnetId(v string) *SubnetMapping {
  6977. s.SubnetId = &v
  6978. return s
  6979. }
  6980. // Information about a tag.
  6981. type Tag struct {
  6982. _ struct{} `type:"structure"`
  6983. // The key of the tag.
  6984. //
  6985. // Key is a required field
  6986. Key *string `min:"1" type:"string" required:"true"`
  6987. // The value of the tag.
  6988. Value *string `type:"string"`
  6989. }
  6990. // String returns the string representation
  6991. func (s Tag) String() string {
  6992. return awsutil.Prettify(s)
  6993. }
  6994. // GoString returns the string representation
  6995. func (s Tag) GoString() string {
  6996. return s.String()
  6997. }
  6998. // Validate inspects the fields of the type to determine if they are valid.
  6999. func (s *Tag) Validate() error {
  7000. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  7001. if s.Key == nil {
  7002. invalidParams.Add(request.NewErrParamRequired("Key"))
  7003. }
  7004. if s.Key != nil && len(*s.Key) < 1 {
  7005. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7006. }
  7007. if invalidParams.Len() > 0 {
  7008. return invalidParams
  7009. }
  7010. return nil
  7011. }
  7012. // SetKey sets the Key field's value.
  7013. func (s *Tag) SetKey(v string) *Tag {
  7014. s.Key = &v
  7015. return s
  7016. }
  7017. // SetValue sets the Value field's value.
  7018. func (s *Tag) SetValue(v string) *Tag {
  7019. s.Value = &v
  7020. return s
  7021. }
  7022. // The tags associated with a resource.
  7023. type TagDescription struct {
  7024. _ struct{} `type:"structure"`
  7025. // The Amazon Resource Name (ARN) of the resource.
  7026. ResourceArn *string `type:"string"`
  7027. // Information about the tags.
  7028. Tags []*Tag `min:"1" type:"list"`
  7029. }
  7030. // String returns the string representation
  7031. func (s TagDescription) String() string {
  7032. return awsutil.Prettify(s)
  7033. }
  7034. // GoString returns the string representation
  7035. func (s TagDescription) GoString() string {
  7036. return s.String()
  7037. }
  7038. // SetResourceArn sets the ResourceArn field's value.
  7039. func (s *TagDescription) SetResourceArn(v string) *TagDescription {
  7040. s.ResourceArn = &v
  7041. return s
  7042. }
  7043. // SetTags sets the Tags field's value.
  7044. func (s *TagDescription) SetTags(v []*Tag) *TagDescription {
  7045. s.Tags = v
  7046. return s
  7047. }
  7048. // Information about a target.
  7049. type TargetDescription struct {
  7050. _ struct{} `type:"structure"`
  7051. // An Availability Zone or all. This determines whether the target receives
  7052. // traffic from the load balancer nodes in the specified Availability Zone or
  7053. // from all enabled Availability Zones for the load balancer.
  7054. //
  7055. // This parameter is not supported if the target type of the target group is
  7056. // instance.
  7057. //
  7058. // If the target type is ip and the IP address is in a subnet of the VPC for
  7059. // the target group, the Availability Zone is automatically detected and this
  7060. // parameter is optional. If the IP address is outside the VPC, this parameter
  7061. // is required.
  7062. //
  7063. // With an Application Load Balancer, if the target type is ip and the IP address
  7064. // is outside the VPC for the target group, the only supported value is all.
  7065. //
  7066. // If the target type is lambda, this parameter is optional and the only supported
  7067. // value is all.
  7068. AvailabilityZone *string `type:"string"`
  7069. // The ID of the target. If the target type of the target group is instance,
  7070. // specify an instance ID. If the target type is ip, specify an IP address.
  7071. // If the target type is lambda, specify the ARN of the Lambda function.
  7072. //
  7073. // Id is a required field
  7074. Id *string `type:"string" required:"true"`
  7075. // The port on which the target is listening.
  7076. Port *int64 `min:"1" type:"integer"`
  7077. }
  7078. // String returns the string representation
  7079. func (s TargetDescription) String() string {
  7080. return awsutil.Prettify(s)
  7081. }
  7082. // GoString returns the string representation
  7083. func (s TargetDescription) GoString() string {
  7084. return s.String()
  7085. }
  7086. // Validate inspects the fields of the type to determine if they are valid.
  7087. func (s *TargetDescription) Validate() error {
  7088. invalidParams := request.ErrInvalidParams{Context: "TargetDescription"}
  7089. if s.Id == nil {
  7090. invalidParams.Add(request.NewErrParamRequired("Id"))
  7091. }
  7092. if s.Port != nil && *s.Port < 1 {
  7093. invalidParams.Add(request.NewErrParamMinValue("Port", 1))
  7094. }
  7095. if invalidParams.Len() > 0 {
  7096. return invalidParams
  7097. }
  7098. return nil
  7099. }
  7100. // SetAvailabilityZone sets the AvailabilityZone field's value.
  7101. func (s *TargetDescription) SetAvailabilityZone(v string) *TargetDescription {
  7102. s.AvailabilityZone = &v
  7103. return s
  7104. }
  7105. // SetId sets the Id field's value.
  7106. func (s *TargetDescription) SetId(v string) *TargetDescription {
  7107. s.Id = &v
  7108. return s
  7109. }
  7110. // SetPort sets the Port field's value.
  7111. func (s *TargetDescription) SetPort(v int64) *TargetDescription {
  7112. s.Port = &v
  7113. return s
  7114. }
  7115. // Information about a target group.
  7116. type TargetGroup struct {
  7117. _ struct{} `type:"structure"`
  7118. // Indicates whether health checks are enabled.
  7119. HealthCheckEnabled *bool `type:"boolean"`
  7120. // The approximate amount of time, in seconds, between health checks of an individual
  7121. // target.
  7122. HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"`
  7123. // The destination for the health check request.
  7124. HealthCheckPath *string `min:"1" type:"string"`
  7125. // The port to use to connect with the target.
  7126. HealthCheckPort *string `type:"string"`
  7127. // The protocol to use to connect with the target.
  7128. HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"`
  7129. // The amount of time, in seconds, during which no response means a failed health
  7130. // check.
  7131. HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"`
  7132. // The number of consecutive health checks successes required before considering
  7133. // an unhealthy target healthy.
  7134. HealthyThresholdCount *int64 `min:"2" type:"integer"`
  7135. // The Amazon Resource Names (ARN) of the load balancers that route traffic
  7136. // to this target group.
  7137. LoadBalancerArns []*string `type:"list"`
  7138. // The HTTP codes to use when checking for a successful response from a target.
  7139. Matcher *Matcher `type:"structure"`
  7140. // The port on which the targets are listening.
  7141. Port *int64 `min:"1" type:"integer"`
  7142. // The protocol to use for routing traffic to the targets.
  7143. Protocol *string `type:"string" enum:"ProtocolEnum"`
  7144. // The Amazon Resource Name (ARN) of the target group.
  7145. TargetGroupArn *string `type:"string"`
  7146. // The name of the target group.
  7147. TargetGroupName *string `type:"string"`
  7148. // The type of target that you must specify when registering targets with this
  7149. // target group. The possible values are instance (targets are specified by
  7150. // instance ID) or ip (targets are specified by IP address).
  7151. TargetType *string `type:"string" enum:"TargetTypeEnum"`
  7152. // The number of consecutive health check failures required before considering
  7153. // the target unhealthy.
  7154. UnhealthyThresholdCount *int64 `min:"2" type:"integer"`
  7155. // The ID of the VPC for the targets.
  7156. VpcId *string `type:"string"`
  7157. }
  7158. // String returns the string representation
  7159. func (s TargetGroup) String() string {
  7160. return awsutil.Prettify(s)
  7161. }
  7162. // GoString returns the string representation
  7163. func (s TargetGroup) GoString() string {
  7164. return s.String()
  7165. }
  7166. // SetHealthCheckEnabled sets the HealthCheckEnabled field's value.
  7167. func (s *TargetGroup) SetHealthCheckEnabled(v bool) *TargetGroup {
  7168. s.HealthCheckEnabled = &v
  7169. return s
  7170. }
  7171. // SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value.
  7172. func (s *TargetGroup) SetHealthCheckIntervalSeconds(v int64) *TargetGroup {
  7173. s.HealthCheckIntervalSeconds = &v
  7174. return s
  7175. }
  7176. // SetHealthCheckPath sets the HealthCheckPath field's value.
  7177. func (s *TargetGroup) SetHealthCheckPath(v string) *TargetGroup {
  7178. s.HealthCheckPath = &v
  7179. return s
  7180. }
  7181. // SetHealthCheckPort sets the HealthCheckPort field's value.
  7182. func (s *TargetGroup) SetHealthCheckPort(v string) *TargetGroup {
  7183. s.HealthCheckPort = &v
  7184. return s
  7185. }
  7186. // SetHealthCheckProtocol sets the HealthCheckProtocol field's value.
  7187. func (s *TargetGroup) SetHealthCheckProtocol(v string) *TargetGroup {
  7188. s.HealthCheckProtocol = &v
  7189. return s
  7190. }
  7191. // SetHealthCheckTimeoutSeconds sets the HealthCheckTimeoutSeconds field's value.
  7192. func (s *TargetGroup) SetHealthCheckTimeoutSeconds(v int64) *TargetGroup {
  7193. s.HealthCheckTimeoutSeconds = &v
  7194. return s
  7195. }
  7196. // SetHealthyThresholdCount sets the HealthyThresholdCount field's value.
  7197. func (s *TargetGroup) SetHealthyThresholdCount(v int64) *TargetGroup {
  7198. s.HealthyThresholdCount = &v
  7199. return s
  7200. }
  7201. // SetLoadBalancerArns sets the LoadBalancerArns field's value.
  7202. func (s *TargetGroup) SetLoadBalancerArns(v []*string) *TargetGroup {
  7203. s.LoadBalancerArns = v
  7204. return s
  7205. }
  7206. // SetMatcher sets the Matcher field's value.
  7207. func (s *TargetGroup) SetMatcher(v *Matcher) *TargetGroup {
  7208. s.Matcher = v
  7209. return s
  7210. }
  7211. // SetPort sets the Port field's value.
  7212. func (s *TargetGroup) SetPort(v int64) *TargetGroup {
  7213. s.Port = &v
  7214. return s
  7215. }
  7216. // SetProtocol sets the Protocol field's value.
  7217. func (s *TargetGroup) SetProtocol(v string) *TargetGroup {
  7218. s.Protocol = &v
  7219. return s
  7220. }
  7221. // SetTargetGroupArn sets the TargetGroupArn field's value.
  7222. func (s *TargetGroup) SetTargetGroupArn(v string) *TargetGroup {
  7223. s.TargetGroupArn = &v
  7224. return s
  7225. }
  7226. // SetTargetGroupName sets the TargetGroupName field's value.
  7227. func (s *TargetGroup) SetTargetGroupName(v string) *TargetGroup {
  7228. s.TargetGroupName = &v
  7229. return s
  7230. }
  7231. // SetTargetType sets the TargetType field's value.
  7232. func (s *TargetGroup) SetTargetType(v string) *TargetGroup {
  7233. s.TargetType = &v
  7234. return s
  7235. }
  7236. // SetUnhealthyThresholdCount sets the UnhealthyThresholdCount field's value.
  7237. func (s *TargetGroup) SetUnhealthyThresholdCount(v int64) *TargetGroup {
  7238. s.UnhealthyThresholdCount = &v
  7239. return s
  7240. }
  7241. // SetVpcId sets the VpcId field's value.
  7242. func (s *TargetGroup) SetVpcId(v string) *TargetGroup {
  7243. s.VpcId = &v
  7244. return s
  7245. }
  7246. // Information about a target group attribute.
  7247. type TargetGroupAttribute struct {
  7248. _ struct{} `type:"structure"`
  7249. // The name of the attribute.
  7250. //
  7251. // The following attribute is supported by both Application Load Balancers and
  7252. // Network Load Balancers:
  7253. //
  7254. // * deregistration_delay.timeout_seconds - The amount of time, in seconds,
  7255. // for Elastic Load Balancing to wait before changing the state of a deregistering
  7256. // target from draining to unused. The range is 0-3600 seconds. The default
  7257. // value is 300 seconds. If the target is a Lambda function, this attribute
  7258. // is not supported.
  7259. //
  7260. // The following attributes are supported by Application Load Balancers if the
  7261. // target is not a Lambda function:
  7262. //
  7263. // * slow_start.duration_seconds - The time period, in seconds, during which
  7264. // a newly registered target receives a linearly increasing share of the
  7265. // traffic to the target group. After this time period ends, the target receives
  7266. // its full share of traffic. The range is 30-900 seconds (15 minutes). Slow
  7267. // start mode is disabled by default.
  7268. //
  7269. // * stickiness.enabled - Indicates whether sticky sessions are enabled.
  7270. // The value is true or false. The default is false.
  7271. //
  7272. // * stickiness.type - The type of sticky sessions. The possible value is
  7273. // lb_cookie.
  7274. //
  7275. // * stickiness.lb_cookie.duration_seconds - The time period, in seconds,
  7276. // during which requests from a client should be routed to the same target.
  7277. // After this time period expires, the load balancer-generated cookie is
  7278. // considered stale. The range is 1 second to 1 week (604800 seconds). The
  7279. // default value is 1 day (86400 seconds).
  7280. //
  7281. // The following attribute is supported only if the target is a Lambda function.
  7282. //
  7283. // * lambda.multi_value_headers.enabled - Indicates whether the request and
  7284. // response headers exchanged between the load balancer and the Lambda function
  7285. // include arrays of values or strings. The value is true or false. The default
  7286. // is false. If the value is false and the request contains a duplicate header
  7287. // field name or query parameter key, the load balancer uses the last value
  7288. // sent by the client.
  7289. //
  7290. // The following attribute is supported only by Network Load Balancers:
  7291. //
  7292. // * proxy_protocol_v2.enabled - Indicates whether Proxy Protocol version
  7293. // 2 is enabled. The value is true or false. The default is false.
  7294. Key *string `type:"string"`
  7295. // The value of the attribute.
  7296. Value *string `type:"string"`
  7297. }
  7298. // String returns the string representation
  7299. func (s TargetGroupAttribute) String() string {
  7300. return awsutil.Prettify(s)
  7301. }
  7302. // GoString returns the string representation
  7303. func (s TargetGroupAttribute) GoString() string {
  7304. return s.String()
  7305. }
  7306. // SetKey sets the Key field's value.
  7307. func (s *TargetGroupAttribute) SetKey(v string) *TargetGroupAttribute {
  7308. s.Key = &v
  7309. return s
  7310. }
  7311. // SetValue sets the Value field's value.
  7312. func (s *TargetGroupAttribute) SetValue(v string) *TargetGroupAttribute {
  7313. s.Value = &v
  7314. return s
  7315. }
  7316. // Information about the current health of a target.
  7317. type TargetHealth struct {
  7318. _ struct{} `type:"structure"`
  7319. // A description of the target health that provides additional details. If the
  7320. // state is healthy, a description is not provided.
  7321. Description *string `type:"string"`
  7322. // The reason code.
  7323. //
  7324. // If the target state is healthy, a reason code is not provided.
  7325. //
  7326. // If the target state is initial, the reason code can be one of the following
  7327. // values:
  7328. //
  7329. // * Elb.RegistrationInProgress - The target is in the process of being registered
  7330. // with the load balancer.
  7331. //
  7332. // * Elb.InitialHealthChecking - The load balancer is still sending the target
  7333. // the minimum number of health checks required to determine its health status.
  7334. //
  7335. // If the target state is unhealthy, the reason code can be one of the following
  7336. // values:
  7337. //
  7338. // * Target.ResponseCodeMismatch - The health checks did not return an expected
  7339. // HTTP code.
  7340. //
  7341. // * Target.Timeout - The health check requests timed out.
  7342. //
  7343. // * Target.FailedHealthChecks - The health checks failed because the connection
  7344. // to the target timed out, the target response was malformed, or the target
  7345. // failed the health check for an unknown reason.
  7346. //
  7347. // * Elb.InternalError - The health checks failed due to an internal error.
  7348. //
  7349. // If the target state is unused, the reason code can be one of the following
  7350. // values:
  7351. //
  7352. // * Target.NotRegistered - The target is not registered with the target
  7353. // group.
  7354. //
  7355. // * Target.NotInUse - The target group is not used by any load balancer
  7356. // or the target is in an Availability Zone that is not enabled for its load
  7357. // balancer.
  7358. //
  7359. // * Target.IpUnusable - The target IP address is reserved for use by a load
  7360. // balancer.
  7361. //
  7362. // * Target.InvalidState - The target is in the stopped or terminated state.
  7363. //
  7364. // If the target state is draining, the reason code can be the following value:
  7365. //
  7366. // * Target.DeregistrationInProgress - The target is in the process of being
  7367. // deregistered and the deregistration delay period has not expired.
  7368. //
  7369. // If the target state is unavailable, the reason code can be the following
  7370. // value:
  7371. //
  7372. // * Target.HealthCheckDisabled - Health checks are disabled for the target
  7373. // group.
  7374. Reason *string `type:"string" enum:"TargetHealthReasonEnum"`
  7375. // The state of the target.
  7376. State *string `type:"string" enum:"TargetHealthStateEnum"`
  7377. }
  7378. // String returns the string representation
  7379. func (s TargetHealth) String() string {
  7380. return awsutil.Prettify(s)
  7381. }
  7382. // GoString returns the string representation
  7383. func (s TargetHealth) GoString() string {
  7384. return s.String()
  7385. }
  7386. // SetDescription sets the Description field's value.
  7387. func (s *TargetHealth) SetDescription(v string) *TargetHealth {
  7388. s.Description = &v
  7389. return s
  7390. }
  7391. // SetReason sets the Reason field's value.
  7392. func (s *TargetHealth) SetReason(v string) *TargetHealth {
  7393. s.Reason = &v
  7394. return s
  7395. }
  7396. // SetState sets the State field's value.
  7397. func (s *TargetHealth) SetState(v string) *TargetHealth {
  7398. s.State = &v
  7399. return s
  7400. }
  7401. // Information about the health of a target.
  7402. type TargetHealthDescription struct {
  7403. _ struct{} `type:"structure"`
  7404. // The port to use to connect with the target.
  7405. HealthCheckPort *string `type:"string"`
  7406. // The description of the target.
  7407. Target *TargetDescription `type:"structure"`
  7408. // The health information for the target.
  7409. TargetHealth *TargetHealth `type:"structure"`
  7410. }
  7411. // String returns the string representation
  7412. func (s TargetHealthDescription) String() string {
  7413. return awsutil.Prettify(s)
  7414. }
  7415. // GoString returns the string representation
  7416. func (s TargetHealthDescription) GoString() string {
  7417. return s.String()
  7418. }
  7419. // SetHealthCheckPort sets the HealthCheckPort field's value.
  7420. func (s *TargetHealthDescription) SetHealthCheckPort(v string) *TargetHealthDescription {
  7421. s.HealthCheckPort = &v
  7422. return s
  7423. }
  7424. // SetTarget sets the Target field's value.
  7425. func (s *TargetHealthDescription) SetTarget(v *TargetDescription) *TargetHealthDescription {
  7426. s.Target = v
  7427. return s
  7428. }
  7429. // SetTargetHealth sets the TargetHealth field's value.
  7430. func (s *TargetHealthDescription) SetTargetHealth(v *TargetHealth) *TargetHealthDescription {
  7431. s.TargetHealth = v
  7432. return s
  7433. }
  7434. const (
  7435. // ActionTypeEnumForward is a ActionTypeEnum enum value
  7436. ActionTypeEnumForward = "forward"
  7437. // ActionTypeEnumAuthenticateOidc is a ActionTypeEnum enum value
  7438. ActionTypeEnumAuthenticateOidc = "authenticate-oidc"
  7439. // ActionTypeEnumAuthenticateCognito is a ActionTypeEnum enum value
  7440. ActionTypeEnumAuthenticateCognito = "authenticate-cognito"
  7441. // ActionTypeEnumRedirect is a ActionTypeEnum enum value
  7442. ActionTypeEnumRedirect = "redirect"
  7443. // ActionTypeEnumFixedResponse is a ActionTypeEnum enum value
  7444. ActionTypeEnumFixedResponse = "fixed-response"
  7445. )
  7446. const (
  7447. // AuthenticateCognitoActionConditionalBehaviorEnumDeny is a AuthenticateCognitoActionConditionalBehaviorEnum enum value
  7448. AuthenticateCognitoActionConditionalBehaviorEnumDeny = "deny"
  7449. // AuthenticateCognitoActionConditionalBehaviorEnumAllow is a AuthenticateCognitoActionConditionalBehaviorEnum enum value
  7450. AuthenticateCognitoActionConditionalBehaviorEnumAllow = "allow"
  7451. // AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate is a AuthenticateCognitoActionConditionalBehaviorEnum enum value
  7452. AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate = "authenticate"
  7453. )
  7454. const (
  7455. // AuthenticateOidcActionConditionalBehaviorEnumDeny is a AuthenticateOidcActionConditionalBehaviorEnum enum value
  7456. AuthenticateOidcActionConditionalBehaviorEnumDeny = "deny"
  7457. // AuthenticateOidcActionConditionalBehaviorEnumAllow is a AuthenticateOidcActionConditionalBehaviorEnum enum value
  7458. AuthenticateOidcActionConditionalBehaviorEnumAllow = "allow"
  7459. // AuthenticateOidcActionConditionalBehaviorEnumAuthenticate is a AuthenticateOidcActionConditionalBehaviorEnum enum value
  7460. AuthenticateOidcActionConditionalBehaviorEnumAuthenticate = "authenticate"
  7461. )
  7462. const (
  7463. // IpAddressTypeIpv4 is a IpAddressType enum value
  7464. IpAddressTypeIpv4 = "ipv4"
  7465. // IpAddressTypeDualstack is a IpAddressType enum value
  7466. IpAddressTypeDualstack = "dualstack"
  7467. )
  7468. const (
  7469. // LoadBalancerSchemeEnumInternetFacing is a LoadBalancerSchemeEnum enum value
  7470. LoadBalancerSchemeEnumInternetFacing = "internet-facing"
  7471. // LoadBalancerSchemeEnumInternal is a LoadBalancerSchemeEnum enum value
  7472. LoadBalancerSchemeEnumInternal = "internal"
  7473. )
  7474. const (
  7475. // LoadBalancerStateEnumActive is a LoadBalancerStateEnum enum value
  7476. LoadBalancerStateEnumActive = "active"
  7477. // LoadBalancerStateEnumProvisioning is a LoadBalancerStateEnum enum value
  7478. LoadBalancerStateEnumProvisioning = "provisioning"
  7479. // LoadBalancerStateEnumActiveImpaired is a LoadBalancerStateEnum enum value
  7480. LoadBalancerStateEnumActiveImpaired = "active_impaired"
  7481. // LoadBalancerStateEnumFailed is a LoadBalancerStateEnum enum value
  7482. LoadBalancerStateEnumFailed = "failed"
  7483. )
  7484. const (
  7485. // LoadBalancerTypeEnumApplication is a LoadBalancerTypeEnum enum value
  7486. LoadBalancerTypeEnumApplication = "application"
  7487. // LoadBalancerTypeEnumNetwork is a LoadBalancerTypeEnum enum value
  7488. LoadBalancerTypeEnumNetwork = "network"
  7489. )
  7490. const (
  7491. // ProtocolEnumHttp is a ProtocolEnum enum value
  7492. ProtocolEnumHttp = "HTTP"
  7493. // ProtocolEnumHttps is a ProtocolEnum enum value
  7494. ProtocolEnumHttps = "HTTPS"
  7495. // ProtocolEnumTcp is a ProtocolEnum enum value
  7496. ProtocolEnumTcp = "TCP"
  7497. )
  7498. const (
  7499. // RedirectActionStatusCodeEnumHttp301 is a RedirectActionStatusCodeEnum enum value
  7500. RedirectActionStatusCodeEnumHttp301 = "HTTP_301"
  7501. // RedirectActionStatusCodeEnumHttp302 is a RedirectActionStatusCodeEnum enum value
  7502. RedirectActionStatusCodeEnumHttp302 = "HTTP_302"
  7503. )
  7504. const (
  7505. // TargetHealthReasonEnumElbRegistrationInProgress is a TargetHealthReasonEnum enum value
  7506. TargetHealthReasonEnumElbRegistrationInProgress = "Elb.RegistrationInProgress"
  7507. // TargetHealthReasonEnumElbInitialHealthChecking is a TargetHealthReasonEnum enum value
  7508. TargetHealthReasonEnumElbInitialHealthChecking = "Elb.InitialHealthChecking"
  7509. // TargetHealthReasonEnumTargetResponseCodeMismatch is a TargetHealthReasonEnum enum value
  7510. TargetHealthReasonEnumTargetResponseCodeMismatch = "Target.ResponseCodeMismatch"
  7511. // TargetHealthReasonEnumTargetTimeout is a TargetHealthReasonEnum enum value
  7512. TargetHealthReasonEnumTargetTimeout = "Target.Timeout"
  7513. // TargetHealthReasonEnumTargetFailedHealthChecks is a TargetHealthReasonEnum enum value
  7514. TargetHealthReasonEnumTargetFailedHealthChecks = "Target.FailedHealthChecks"
  7515. // TargetHealthReasonEnumTargetNotRegistered is a TargetHealthReasonEnum enum value
  7516. TargetHealthReasonEnumTargetNotRegistered = "Target.NotRegistered"
  7517. // TargetHealthReasonEnumTargetNotInUse is a TargetHealthReasonEnum enum value
  7518. TargetHealthReasonEnumTargetNotInUse = "Target.NotInUse"
  7519. // TargetHealthReasonEnumTargetDeregistrationInProgress is a TargetHealthReasonEnum enum value
  7520. TargetHealthReasonEnumTargetDeregistrationInProgress = "Target.DeregistrationInProgress"
  7521. // TargetHealthReasonEnumTargetInvalidState is a TargetHealthReasonEnum enum value
  7522. TargetHealthReasonEnumTargetInvalidState = "Target.InvalidState"
  7523. // TargetHealthReasonEnumTargetIpUnusable is a TargetHealthReasonEnum enum value
  7524. TargetHealthReasonEnumTargetIpUnusable = "Target.IpUnusable"
  7525. // TargetHealthReasonEnumTargetHealthCheckDisabled is a TargetHealthReasonEnum enum value
  7526. TargetHealthReasonEnumTargetHealthCheckDisabled = "Target.HealthCheckDisabled"
  7527. // TargetHealthReasonEnumElbInternalError is a TargetHealthReasonEnum enum value
  7528. TargetHealthReasonEnumElbInternalError = "Elb.InternalError"
  7529. )
  7530. const (
  7531. // TargetHealthStateEnumInitial is a TargetHealthStateEnum enum value
  7532. TargetHealthStateEnumInitial = "initial"
  7533. // TargetHealthStateEnumHealthy is a TargetHealthStateEnum enum value
  7534. TargetHealthStateEnumHealthy = "healthy"
  7535. // TargetHealthStateEnumUnhealthy is a TargetHealthStateEnum enum value
  7536. TargetHealthStateEnumUnhealthy = "unhealthy"
  7537. // TargetHealthStateEnumUnused is a TargetHealthStateEnum enum value
  7538. TargetHealthStateEnumUnused = "unused"
  7539. // TargetHealthStateEnumDraining is a TargetHealthStateEnum enum value
  7540. TargetHealthStateEnumDraining = "draining"
  7541. // TargetHealthStateEnumUnavailable is a TargetHealthStateEnum enum value
  7542. TargetHealthStateEnumUnavailable = "unavailable"
  7543. )
  7544. const (
  7545. // TargetTypeEnumInstance is a TargetTypeEnum enum value
  7546. TargetTypeEnumInstance = "instance"
  7547. // TargetTypeEnumIp is a TargetTypeEnum enum value
  7548. TargetTypeEnumIp = "ip"
  7549. // TargetTypeEnumLambda is a TargetTypeEnum enum value
  7550. TargetTypeEnumLambda = "lambda"
  7551. )