api.go 290 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705
  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 HTTPS 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 HTTPS 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, or from TLS to TCP, removes the
  2133. // security policy and server certificate properties. If you change the protocol
  2134. // from HTTP to HTTPS, or from TCP to TLS, you must add the security policy
  2135. // and server certificate properties.
  2136. //
  2137. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2138. // with awserr.Error's Code and Message methods to get detailed information about
  2139. // the error.
  2140. //
  2141. // See the AWS API reference guide for Elastic Load Balancing's
  2142. // API operation ModifyListener for usage and error information.
  2143. //
  2144. // Returned Error Codes:
  2145. // * ErrCodeDuplicateListenerException "DuplicateListener"
  2146. // A listener with the specified port already exists.
  2147. //
  2148. // * ErrCodeTooManyListenersException "TooManyListeners"
  2149. // You've reached the limit on the number of listeners per load balancer.
  2150. //
  2151. // * ErrCodeTooManyCertificatesException "TooManyCertificates"
  2152. // You've reached the limit on the number of certificates per load balancer.
  2153. //
  2154. // * ErrCodeListenerNotFoundException "ListenerNotFound"
  2155. // The specified listener does not exist.
  2156. //
  2157. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  2158. // The specified target group does not exist.
  2159. //
  2160. // * ErrCodeTargetGroupAssociationLimitException "TargetGroupAssociationLimit"
  2161. // You've reached the limit on the number of load balancers per target group.
  2162. //
  2163. // * ErrCodeIncompatibleProtocolsException "IncompatibleProtocols"
  2164. // The specified configuration is not valid with this protocol.
  2165. //
  2166. // * ErrCodeSSLPolicyNotFoundException "SSLPolicyNotFound"
  2167. // The specified SSL policy does not exist.
  2168. //
  2169. // * ErrCodeCertificateNotFoundException "CertificateNotFound"
  2170. // The specified certificate does not exist.
  2171. //
  2172. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  2173. // The requested configuration is not valid.
  2174. //
  2175. // * ErrCodeUnsupportedProtocolException "UnsupportedProtocol"
  2176. // The specified protocol is not supported.
  2177. //
  2178. // * ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId"
  2179. // You've reached the limit on the number of times a target can be registered
  2180. // with a load balancer.
  2181. //
  2182. // * ErrCodeTooManyTargetsException "TooManyTargets"
  2183. // You've reached the limit on the number of targets.
  2184. //
  2185. // * ErrCodeTooManyActionsException "TooManyActions"
  2186. // You've reached the limit on the number of actions per rule.
  2187. //
  2188. // * ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction"
  2189. // The requested action is not valid.
  2190. //
  2191. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyListener
  2192. func (c *ELBV2) ModifyListener(input *ModifyListenerInput) (*ModifyListenerOutput, error) {
  2193. req, out := c.ModifyListenerRequest(input)
  2194. return out, req.Send()
  2195. }
  2196. // ModifyListenerWithContext is the same as ModifyListener with the addition of
  2197. // the ability to pass a context and additional request options.
  2198. //
  2199. // See ModifyListener for details on how to use this API operation.
  2200. //
  2201. // The context must be non-nil and will be used for request cancellation. If
  2202. // the context is nil a panic will occur. In the future the SDK may create
  2203. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2204. // for more information on using Contexts.
  2205. func (c *ELBV2) ModifyListenerWithContext(ctx aws.Context, input *ModifyListenerInput, opts ...request.Option) (*ModifyListenerOutput, error) {
  2206. req, out := c.ModifyListenerRequest(input)
  2207. req.SetContext(ctx)
  2208. req.ApplyOptions(opts...)
  2209. return out, req.Send()
  2210. }
  2211. const opModifyLoadBalancerAttributes = "ModifyLoadBalancerAttributes"
  2212. // ModifyLoadBalancerAttributesRequest generates a "aws/request.Request" representing the
  2213. // client's request for the ModifyLoadBalancerAttributes operation. The "output" return
  2214. // value will be populated with the request's response once the request completes
  2215. // successfully.
  2216. //
  2217. // Use "Send" method on the returned Request to send the API call to the service.
  2218. // the "output" return value is not valid until after Send returns without error.
  2219. //
  2220. // See ModifyLoadBalancerAttributes for more information on using the ModifyLoadBalancerAttributes
  2221. // API call, and error handling.
  2222. //
  2223. // This method is useful when you want to inject custom logic or configuration
  2224. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2225. //
  2226. //
  2227. // // Example sending a request using the ModifyLoadBalancerAttributesRequest method.
  2228. // req, resp := client.ModifyLoadBalancerAttributesRequest(params)
  2229. //
  2230. // err := req.Send()
  2231. // if err == nil { // resp is now filled
  2232. // fmt.Println(resp)
  2233. // }
  2234. //
  2235. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyLoadBalancerAttributes
  2236. func (c *ELBV2) ModifyLoadBalancerAttributesRequest(input *ModifyLoadBalancerAttributesInput) (req *request.Request, output *ModifyLoadBalancerAttributesOutput) {
  2237. op := &request.Operation{
  2238. Name: opModifyLoadBalancerAttributes,
  2239. HTTPMethod: "POST",
  2240. HTTPPath: "/",
  2241. }
  2242. if input == nil {
  2243. input = &ModifyLoadBalancerAttributesInput{}
  2244. }
  2245. output = &ModifyLoadBalancerAttributesOutput{}
  2246. req = c.newRequest(op, input, output)
  2247. return
  2248. }
  2249. // ModifyLoadBalancerAttributes API operation for Elastic Load Balancing.
  2250. //
  2251. // Modifies the specified attributes of the specified Application Load Balancer
  2252. // or Network Load Balancer.
  2253. //
  2254. // If any of the specified attributes can't be modified as requested, the call
  2255. // fails. Any existing attributes that you do not modify retain their current
  2256. // values.
  2257. //
  2258. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2259. // with awserr.Error's Code and Message methods to get detailed information about
  2260. // the error.
  2261. //
  2262. // See the AWS API reference guide for Elastic Load Balancing's
  2263. // API operation ModifyLoadBalancerAttributes for usage and error information.
  2264. //
  2265. // Returned Error Codes:
  2266. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  2267. // The specified load balancer does not exist.
  2268. //
  2269. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  2270. // The requested configuration is not valid.
  2271. //
  2272. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyLoadBalancerAttributes
  2273. func (c *ELBV2) ModifyLoadBalancerAttributes(input *ModifyLoadBalancerAttributesInput) (*ModifyLoadBalancerAttributesOutput, error) {
  2274. req, out := c.ModifyLoadBalancerAttributesRequest(input)
  2275. return out, req.Send()
  2276. }
  2277. // ModifyLoadBalancerAttributesWithContext is the same as ModifyLoadBalancerAttributes with the addition of
  2278. // the ability to pass a context and additional request options.
  2279. //
  2280. // See ModifyLoadBalancerAttributes for details on how to use this API operation.
  2281. //
  2282. // The context must be non-nil and will be used for request cancellation. If
  2283. // the context is nil a panic will occur. In the future the SDK may create
  2284. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2285. // for more information on using Contexts.
  2286. func (c *ELBV2) ModifyLoadBalancerAttributesWithContext(ctx aws.Context, input *ModifyLoadBalancerAttributesInput, opts ...request.Option) (*ModifyLoadBalancerAttributesOutput, error) {
  2287. req, out := c.ModifyLoadBalancerAttributesRequest(input)
  2288. req.SetContext(ctx)
  2289. req.ApplyOptions(opts...)
  2290. return out, req.Send()
  2291. }
  2292. const opModifyRule = "ModifyRule"
  2293. // ModifyRuleRequest generates a "aws/request.Request" representing the
  2294. // client's request for the ModifyRule operation. The "output" return
  2295. // value will be populated with the request's response once the request completes
  2296. // successfully.
  2297. //
  2298. // Use "Send" method on the returned Request to send the API call to the service.
  2299. // the "output" return value is not valid until after Send returns without error.
  2300. //
  2301. // See ModifyRule for more information on using the ModifyRule
  2302. // API call, and error handling.
  2303. //
  2304. // This method is useful when you want to inject custom logic or configuration
  2305. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2306. //
  2307. //
  2308. // // Example sending a request using the ModifyRuleRequest method.
  2309. // req, resp := client.ModifyRuleRequest(params)
  2310. //
  2311. // err := req.Send()
  2312. // if err == nil { // resp is now filled
  2313. // fmt.Println(resp)
  2314. // }
  2315. //
  2316. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyRule
  2317. func (c *ELBV2) ModifyRuleRequest(input *ModifyRuleInput) (req *request.Request, output *ModifyRuleOutput) {
  2318. op := &request.Operation{
  2319. Name: opModifyRule,
  2320. HTTPMethod: "POST",
  2321. HTTPPath: "/",
  2322. }
  2323. if input == nil {
  2324. input = &ModifyRuleInput{}
  2325. }
  2326. output = &ModifyRuleOutput{}
  2327. req = c.newRequest(op, input, output)
  2328. return
  2329. }
  2330. // ModifyRule API operation for Elastic Load Balancing.
  2331. //
  2332. // Modifies the specified rule.
  2333. //
  2334. // Any existing properties that you do not modify retain their current values.
  2335. //
  2336. // To modify the actions for the default rule, use ModifyListener.
  2337. //
  2338. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2339. // with awserr.Error's Code and Message methods to get detailed information about
  2340. // the error.
  2341. //
  2342. // See the AWS API reference guide for Elastic Load Balancing's
  2343. // API operation ModifyRule for usage and error information.
  2344. //
  2345. // Returned Error Codes:
  2346. // * ErrCodeTargetGroupAssociationLimitException "TargetGroupAssociationLimit"
  2347. // You've reached the limit on the number of load balancers per target group.
  2348. //
  2349. // * ErrCodeIncompatibleProtocolsException "IncompatibleProtocols"
  2350. // The specified configuration is not valid with this protocol.
  2351. //
  2352. // * ErrCodeRuleNotFoundException "RuleNotFound"
  2353. // The specified rule does not exist.
  2354. //
  2355. // * ErrCodeOperationNotPermittedException "OperationNotPermitted"
  2356. // This operation is not allowed.
  2357. //
  2358. // * ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId"
  2359. // You've reached the limit on the number of times a target can be registered
  2360. // with a load balancer.
  2361. //
  2362. // * ErrCodeTooManyTargetsException "TooManyTargets"
  2363. // You've reached the limit on the number of targets.
  2364. //
  2365. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  2366. // The specified target group does not exist.
  2367. //
  2368. // * ErrCodeUnsupportedProtocolException "UnsupportedProtocol"
  2369. // The specified protocol is not supported.
  2370. //
  2371. // * ErrCodeTooManyActionsException "TooManyActions"
  2372. // You've reached the limit on the number of actions per rule.
  2373. //
  2374. // * ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction"
  2375. // The requested action is not valid.
  2376. //
  2377. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyRule
  2378. func (c *ELBV2) ModifyRule(input *ModifyRuleInput) (*ModifyRuleOutput, error) {
  2379. req, out := c.ModifyRuleRequest(input)
  2380. return out, req.Send()
  2381. }
  2382. // ModifyRuleWithContext is the same as ModifyRule with the addition of
  2383. // the ability to pass a context and additional request options.
  2384. //
  2385. // See ModifyRule for details on how to use this API operation.
  2386. //
  2387. // The context must be non-nil and will be used for request cancellation. If
  2388. // the context is nil a panic will occur. In the future the SDK may create
  2389. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2390. // for more information on using Contexts.
  2391. func (c *ELBV2) ModifyRuleWithContext(ctx aws.Context, input *ModifyRuleInput, opts ...request.Option) (*ModifyRuleOutput, error) {
  2392. req, out := c.ModifyRuleRequest(input)
  2393. req.SetContext(ctx)
  2394. req.ApplyOptions(opts...)
  2395. return out, req.Send()
  2396. }
  2397. const opModifyTargetGroup = "ModifyTargetGroup"
  2398. // ModifyTargetGroupRequest generates a "aws/request.Request" representing the
  2399. // client's request for the ModifyTargetGroup operation. The "output" return
  2400. // value will be populated with the request's response once the request completes
  2401. // successfully.
  2402. //
  2403. // Use "Send" method on the returned Request to send the API call to the service.
  2404. // the "output" return value is not valid until after Send returns without error.
  2405. //
  2406. // See ModifyTargetGroup for more information on using the ModifyTargetGroup
  2407. // API call, and error handling.
  2408. //
  2409. // This method is useful when you want to inject custom logic or configuration
  2410. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2411. //
  2412. //
  2413. // // Example sending a request using the ModifyTargetGroupRequest method.
  2414. // req, resp := client.ModifyTargetGroupRequest(params)
  2415. //
  2416. // err := req.Send()
  2417. // if err == nil { // resp is now filled
  2418. // fmt.Println(resp)
  2419. // }
  2420. //
  2421. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroup
  2422. func (c *ELBV2) ModifyTargetGroupRequest(input *ModifyTargetGroupInput) (req *request.Request, output *ModifyTargetGroupOutput) {
  2423. op := &request.Operation{
  2424. Name: opModifyTargetGroup,
  2425. HTTPMethod: "POST",
  2426. HTTPPath: "/",
  2427. }
  2428. if input == nil {
  2429. input = &ModifyTargetGroupInput{}
  2430. }
  2431. output = &ModifyTargetGroupOutput{}
  2432. req = c.newRequest(op, input, output)
  2433. return
  2434. }
  2435. // ModifyTargetGroup API operation for Elastic Load Balancing.
  2436. //
  2437. // Modifies the health checks used when evaluating the health state of the targets
  2438. // in the specified target group.
  2439. //
  2440. // To monitor the health of the targets, use DescribeTargetHealth.
  2441. //
  2442. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2443. // with awserr.Error's Code and Message methods to get detailed information about
  2444. // the error.
  2445. //
  2446. // See the AWS API reference guide for Elastic Load Balancing's
  2447. // API operation ModifyTargetGroup for usage and error information.
  2448. //
  2449. // Returned Error Codes:
  2450. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  2451. // The specified target group does not exist.
  2452. //
  2453. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  2454. // The requested configuration is not valid.
  2455. //
  2456. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroup
  2457. func (c *ELBV2) ModifyTargetGroup(input *ModifyTargetGroupInput) (*ModifyTargetGroupOutput, error) {
  2458. req, out := c.ModifyTargetGroupRequest(input)
  2459. return out, req.Send()
  2460. }
  2461. // ModifyTargetGroupWithContext is the same as ModifyTargetGroup with the addition of
  2462. // the ability to pass a context and additional request options.
  2463. //
  2464. // See ModifyTargetGroup for details on how to use this API operation.
  2465. //
  2466. // The context must be non-nil and will be used for request cancellation. If
  2467. // the context is nil a panic will occur. In the future the SDK may create
  2468. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2469. // for more information on using Contexts.
  2470. func (c *ELBV2) ModifyTargetGroupWithContext(ctx aws.Context, input *ModifyTargetGroupInput, opts ...request.Option) (*ModifyTargetGroupOutput, error) {
  2471. req, out := c.ModifyTargetGroupRequest(input)
  2472. req.SetContext(ctx)
  2473. req.ApplyOptions(opts...)
  2474. return out, req.Send()
  2475. }
  2476. const opModifyTargetGroupAttributes = "ModifyTargetGroupAttributes"
  2477. // ModifyTargetGroupAttributesRequest generates a "aws/request.Request" representing the
  2478. // client's request for the ModifyTargetGroupAttributes operation. The "output" return
  2479. // value will be populated with the request's response once the request completes
  2480. // successfully.
  2481. //
  2482. // Use "Send" method on the returned Request to send the API call to the service.
  2483. // the "output" return value is not valid until after Send returns without error.
  2484. //
  2485. // See ModifyTargetGroupAttributes for more information on using the ModifyTargetGroupAttributes
  2486. // API call, and error handling.
  2487. //
  2488. // This method is useful when you want to inject custom logic or configuration
  2489. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2490. //
  2491. //
  2492. // // Example sending a request using the ModifyTargetGroupAttributesRequest method.
  2493. // req, resp := client.ModifyTargetGroupAttributesRequest(params)
  2494. //
  2495. // err := req.Send()
  2496. // if err == nil { // resp is now filled
  2497. // fmt.Println(resp)
  2498. // }
  2499. //
  2500. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroupAttributes
  2501. func (c *ELBV2) ModifyTargetGroupAttributesRequest(input *ModifyTargetGroupAttributesInput) (req *request.Request, output *ModifyTargetGroupAttributesOutput) {
  2502. op := &request.Operation{
  2503. Name: opModifyTargetGroupAttributes,
  2504. HTTPMethod: "POST",
  2505. HTTPPath: "/",
  2506. }
  2507. if input == nil {
  2508. input = &ModifyTargetGroupAttributesInput{}
  2509. }
  2510. output = &ModifyTargetGroupAttributesOutput{}
  2511. req = c.newRequest(op, input, output)
  2512. return
  2513. }
  2514. // ModifyTargetGroupAttributes API operation for Elastic Load Balancing.
  2515. //
  2516. // Modifies the specified attributes of the specified target group.
  2517. //
  2518. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2519. // with awserr.Error's Code and Message methods to get detailed information about
  2520. // the error.
  2521. //
  2522. // See the AWS API reference guide for Elastic Load Balancing's
  2523. // API operation ModifyTargetGroupAttributes for usage and error information.
  2524. //
  2525. // Returned Error Codes:
  2526. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  2527. // The specified target group does not exist.
  2528. //
  2529. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  2530. // The requested configuration is not valid.
  2531. //
  2532. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroupAttributes
  2533. func (c *ELBV2) ModifyTargetGroupAttributes(input *ModifyTargetGroupAttributesInput) (*ModifyTargetGroupAttributesOutput, error) {
  2534. req, out := c.ModifyTargetGroupAttributesRequest(input)
  2535. return out, req.Send()
  2536. }
  2537. // ModifyTargetGroupAttributesWithContext is the same as ModifyTargetGroupAttributes with the addition of
  2538. // the ability to pass a context and additional request options.
  2539. //
  2540. // See ModifyTargetGroupAttributes for details on how to use this API operation.
  2541. //
  2542. // The context must be non-nil and will be used for request cancellation. If
  2543. // the context is nil a panic will occur. In the future the SDK may create
  2544. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2545. // for more information on using Contexts.
  2546. func (c *ELBV2) ModifyTargetGroupAttributesWithContext(ctx aws.Context, input *ModifyTargetGroupAttributesInput, opts ...request.Option) (*ModifyTargetGroupAttributesOutput, error) {
  2547. req, out := c.ModifyTargetGroupAttributesRequest(input)
  2548. req.SetContext(ctx)
  2549. req.ApplyOptions(opts...)
  2550. return out, req.Send()
  2551. }
  2552. const opRegisterTargets = "RegisterTargets"
  2553. // RegisterTargetsRequest generates a "aws/request.Request" representing the
  2554. // client's request for the RegisterTargets operation. The "output" return
  2555. // value will be populated with the request's response once the request completes
  2556. // successfully.
  2557. //
  2558. // Use "Send" method on the returned Request to send the API call to the service.
  2559. // the "output" return value is not valid until after Send returns without error.
  2560. //
  2561. // See RegisterTargets for more information on using the RegisterTargets
  2562. // API call, and error handling.
  2563. //
  2564. // This method is useful when you want to inject custom logic or configuration
  2565. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2566. //
  2567. //
  2568. // // Example sending a request using the RegisterTargetsRequest method.
  2569. // req, resp := client.RegisterTargetsRequest(params)
  2570. //
  2571. // err := req.Send()
  2572. // if err == nil { // resp is now filled
  2573. // fmt.Println(resp)
  2574. // }
  2575. //
  2576. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RegisterTargets
  2577. func (c *ELBV2) RegisterTargetsRequest(input *RegisterTargetsInput) (req *request.Request, output *RegisterTargetsOutput) {
  2578. op := &request.Operation{
  2579. Name: opRegisterTargets,
  2580. HTTPMethod: "POST",
  2581. HTTPPath: "/",
  2582. }
  2583. if input == nil {
  2584. input = &RegisterTargetsInput{}
  2585. }
  2586. output = &RegisterTargetsOutput{}
  2587. req = c.newRequest(op, input, output)
  2588. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2589. return
  2590. }
  2591. // RegisterTargets API operation for Elastic Load Balancing.
  2592. //
  2593. // Registers the specified targets with the specified target group.
  2594. //
  2595. // If the target is an EC2 instance, it must be in the running state when you
  2596. // register it.
  2597. //
  2598. // By default, the load balancer routes requests to registered targets using
  2599. // the protocol and port for the target group. Alternatively, you can override
  2600. // the port for a target when you register it. You can register each EC2 instance
  2601. // or IP address with the same target group multiple times using different ports.
  2602. //
  2603. // With a Network Load Balancer, you cannot register instances by instance ID
  2604. // if they have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1,
  2605. // G1, G2, HI1, HS1, M1, M2, M3, and T1. You can register instances of these
  2606. // types by IP address.
  2607. //
  2608. // To remove a target from a target group, use DeregisterTargets.
  2609. //
  2610. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2611. // with awserr.Error's Code and Message methods to get detailed information about
  2612. // the error.
  2613. //
  2614. // See the AWS API reference guide for Elastic Load Balancing's
  2615. // API operation RegisterTargets for usage and error information.
  2616. //
  2617. // Returned Error Codes:
  2618. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  2619. // The specified target group does not exist.
  2620. //
  2621. // * ErrCodeTooManyTargetsException "TooManyTargets"
  2622. // You've reached the limit on the number of targets.
  2623. //
  2624. // * ErrCodeInvalidTargetException "InvalidTarget"
  2625. // The specified target does not exist, is not in the same VPC as the target
  2626. // group, or has an unsupported instance type.
  2627. //
  2628. // * ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId"
  2629. // You've reached the limit on the number of times a target can be registered
  2630. // with a load balancer.
  2631. //
  2632. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RegisterTargets
  2633. func (c *ELBV2) RegisterTargets(input *RegisterTargetsInput) (*RegisterTargetsOutput, error) {
  2634. req, out := c.RegisterTargetsRequest(input)
  2635. return out, req.Send()
  2636. }
  2637. // RegisterTargetsWithContext is the same as RegisterTargets with the addition of
  2638. // the ability to pass a context and additional request options.
  2639. //
  2640. // See RegisterTargets for details on how to use this API operation.
  2641. //
  2642. // The context must be non-nil and will be used for request cancellation. If
  2643. // the context is nil a panic will occur. In the future the SDK may create
  2644. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2645. // for more information on using Contexts.
  2646. func (c *ELBV2) RegisterTargetsWithContext(ctx aws.Context, input *RegisterTargetsInput, opts ...request.Option) (*RegisterTargetsOutput, error) {
  2647. req, out := c.RegisterTargetsRequest(input)
  2648. req.SetContext(ctx)
  2649. req.ApplyOptions(opts...)
  2650. return out, req.Send()
  2651. }
  2652. const opRemoveListenerCertificates = "RemoveListenerCertificates"
  2653. // RemoveListenerCertificatesRequest generates a "aws/request.Request" representing the
  2654. // client's request for the RemoveListenerCertificates operation. The "output" return
  2655. // value will be populated with the request's response once the request completes
  2656. // successfully.
  2657. //
  2658. // Use "Send" method on the returned Request to send the API call to the service.
  2659. // the "output" return value is not valid until after Send returns without error.
  2660. //
  2661. // See RemoveListenerCertificates for more information on using the RemoveListenerCertificates
  2662. // API call, and error handling.
  2663. //
  2664. // This method is useful when you want to inject custom logic or configuration
  2665. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2666. //
  2667. //
  2668. // // Example sending a request using the RemoveListenerCertificatesRequest method.
  2669. // req, resp := client.RemoveListenerCertificatesRequest(params)
  2670. //
  2671. // err := req.Send()
  2672. // if err == nil { // resp is now filled
  2673. // fmt.Println(resp)
  2674. // }
  2675. //
  2676. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveListenerCertificates
  2677. func (c *ELBV2) RemoveListenerCertificatesRequest(input *RemoveListenerCertificatesInput) (req *request.Request, output *RemoveListenerCertificatesOutput) {
  2678. op := &request.Operation{
  2679. Name: opRemoveListenerCertificates,
  2680. HTTPMethod: "POST",
  2681. HTTPPath: "/",
  2682. }
  2683. if input == nil {
  2684. input = &RemoveListenerCertificatesInput{}
  2685. }
  2686. output = &RemoveListenerCertificatesOutput{}
  2687. req = c.newRequest(op, input, output)
  2688. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2689. return
  2690. }
  2691. // RemoveListenerCertificates API operation for Elastic Load Balancing.
  2692. //
  2693. // Removes the specified certificate from the specified HTTPS listener.
  2694. //
  2695. // You can't remove the default certificate for a listener. To replace the default
  2696. // certificate, call ModifyListener.
  2697. //
  2698. // To list the certificates for your listener, use DescribeListenerCertificates.
  2699. //
  2700. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2701. // with awserr.Error's Code and Message methods to get detailed information about
  2702. // the error.
  2703. //
  2704. // See the AWS API reference guide for Elastic Load Balancing's
  2705. // API operation RemoveListenerCertificates for usage and error information.
  2706. //
  2707. // Returned Error Codes:
  2708. // * ErrCodeListenerNotFoundException "ListenerNotFound"
  2709. // The specified listener does not exist.
  2710. //
  2711. // * ErrCodeOperationNotPermittedException "OperationNotPermitted"
  2712. // This operation is not allowed.
  2713. //
  2714. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveListenerCertificates
  2715. func (c *ELBV2) RemoveListenerCertificates(input *RemoveListenerCertificatesInput) (*RemoveListenerCertificatesOutput, error) {
  2716. req, out := c.RemoveListenerCertificatesRequest(input)
  2717. return out, req.Send()
  2718. }
  2719. // RemoveListenerCertificatesWithContext is the same as RemoveListenerCertificates with the addition of
  2720. // the ability to pass a context and additional request options.
  2721. //
  2722. // See RemoveListenerCertificates for details on how to use this API operation.
  2723. //
  2724. // The context must be non-nil and will be used for request cancellation. If
  2725. // the context is nil a panic will occur. In the future the SDK may create
  2726. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2727. // for more information on using Contexts.
  2728. func (c *ELBV2) RemoveListenerCertificatesWithContext(ctx aws.Context, input *RemoveListenerCertificatesInput, opts ...request.Option) (*RemoveListenerCertificatesOutput, error) {
  2729. req, out := c.RemoveListenerCertificatesRequest(input)
  2730. req.SetContext(ctx)
  2731. req.ApplyOptions(opts...)
  2732. return out, req.Send()
  2733. }
  2734. const opRemoveTags = "RemoveTags"
  2735. // RemoveTagsRequest generates a "aws/request.Request" representing the
  2736. // client's request for the RemoveTags operation. The "output" return
  2737. // value will be populated with the request's response once the request completes
  2738. // successfully.
  2739. //
  2740. // Use "Send" method on the returned Request to send the API call to the service.
  2741. // the "output" return value is not valid until after Send returns without error.
  2742. //
  2743. // See RemoveTags for more information on using the RemoveTags
  2744. // API call, and error handling.
  2745. //
  2746. // This method is useful when you want to inject custom logic or configuration
  2747. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2748. //
  2749. //
  2750. // // Example sending a request using the RemoveTagsRequest method.
  2751. // req, resp := client.RemoveTagsRequest(params)
  2752. //
  2753. // err := req.Send()
  2754. // if err == nil { // resp is now filled
  2755. // fmt.Println(resp)
  2756. // }
  2757. //
  2758. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveTags
  2759. func (c *ELBV2) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) {
  2760. op := &request.Operation{
  2761. Name: opRemoveTags,
  2762. HTTPMethod: "POST",
  2763. HTTPPath: "/",
  2764. }
  2765. if input == nil {
  2766. input = &RemoveTagsInput{}
  2767. }
  2768. output = &RemoveTagsOutput{}
  2769. req = c.newRequest(op, input, output)
  2770. req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  2771. return
  2772. }
  2773. // RemoveTags API operation for Elastic Load Balancing.
  2774. //
  2775. // Removes the specified tags from the specified Elastic Load Balancing resource.
  2776. //
  2777. // To list the current tags for your resources, use DescribeTags.
  2778. //
  2779. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2780. // with awserr.Error's Code and Message methods to get detailed information about
  2781. // the error.
  2782. //
  2783. // See the AWS API reference guide for Elastic Load Balancing's
  2784. // API operation RemoveTags for usage and error information.
  2785. //
  2786. // Returned Error Codes:
  2787. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  2788. // The specified load balancer does not exist.
  2789. //
  2790. // * ErrCodeTargetGroupNotFoundException "TargetGroupNotFound"
  2791. // The specified target group does not exist.
  2792. //
  2793. // * ErrCodeListenerNotFoundException "ListenerNotFound"
  2794. // The specified listener does not exist.
  2795. //
  2796. // * ErrCodeRuleNotFoundException "RuleNotFound"
  2797. // The specified rule does not exist.
  2798. //
  2799. // * ErrCodeTooManyTagsException "TooManyTags"
  2800. // You've reached the limit on the number of tags per load balancer.
  2801. //
  2802. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveTags
  2803. func (c *ELBV2) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) {
  2804. req, out := c.RemoveTagsRequest(input)
  2805. return out, req.Send()
  2806. }
  2807. // RemoveTagsWithContext is the same as RemoveTags with the addition of
  2808. // the ability to pass a context and additional request options.
  2809. //
  2810. // See RemoveTags for details on how to use this API operation.
  2811. //
  2812. // The context must be non-nil and will be used for request cancellation. If
  2813. // the context is nil a panic will occur. In the future the SDK may create
  2814. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2815. // for more information on using Contexts.
  2816. func (c *ELBV2) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error) {
  2817. req, out := c.RemoveTagsRequest(input)
  2818. req.SetContext(ctx)
  2819. req.ApplyOptions(opts...)
  2820. return out, req.Send()
  2821. }
  2822. const opSetIpAddressType = "SetIpAddressType"
  2823. // SetIpAddressTypeRequest generates a "aws/request.Request" representing the
  2824. // client's request for the SetIpAddressType operation. The "output" return
  2825. // value will be populated with the request's response once the request completes
  2826. // successfully.
  2827. //
  2828. // Use "Send" method on the returned Request to send the API call to the service.
  2829. // the "output" return value is not valid until after Send returns without error.
  2830. //
  2831. // See SetIpAddressType for more information on using the SetIpAddressType
  2832. // API call, and error handling.
  2833. //
  2834. // This method is useful when you want to inject custom logic or configuration
  2835. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2836. //
  2837. //
  2838. // // Example sending a request using the SetIpAddressTypeRequest method.
  2839. // req, resp := client.SetIpAddressTypeRequest(params)
  2840. //
  2841. // err := req.Send()
  2842. // if err == nil { // resp is now filled
  2843. // fmt.Println(resp)
  2844. // }
  2845. //
  2846. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetIpAddressType
  2847. func (c *ELBV2) SetIpAddressTypeRequest(input *SetIpAddressTypeInput) (req *request.Request, output *SetIpAddressTypeOutput) {
  2848. op := &request.Operation{
  2849. Name: opSetIpAddressType,
  2850. HTTPMethod: "POST",
  2851. HTTPPath: "/",
  2852. }
  2853. if input == nil {
  2854. input = &SetIpAddressTypeInput{}
  2855. }
  2856. output = &SetIpAddressTypeOutput{}
  2857. req = c.newRequest(op, input, output)
  2858. return
  2859. }
  2860. // SetIpAddressType API operation for Elastic Load Balancing.
  2861. //
  2862. // Sets the type of IP addresses used by the subnets of the specified Application
  2863. // Load Balancer or Network Load Balancer.
  2864. //
  2865. // Network Load Balancers must use ipv4.
  2866. //
  2867. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2868. // with awserr.Error's Code and Message methods to get detailed information about
  2869. // the error.
  2870. //
  2871. // See the AWS API reference guide for Elastic Load Balancing's
  2872. // API operation SetIpAddressType for usage and error information.
  2873. //
  2874. // Returned Error Codes:
  2875. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  2876. // The specified load balancer does not exist.
  2877. //
  2878. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  2879. // The requested configuration is not valid.
  2880. //
  2881. // * ErrCodeInvalidSubnetException "InvalidSubnet"
  2882. // The specified subnet is out of available addresses.
  2883. //
  2884. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetIpAddressType
  2885. func (c *ELBV2) SetIpAddressType(input *SetIpAddressTypeInput) (*SetIpAddressTypeOutput, error) {
  2886. req, out := c.SetIpAddressTypeRequest(input)
  2887. return out, req.Send()
  2888. }
  2889. // SetIpAddressTypeWithContext is the same as SetIpAddressType with the addition of
  2890. // the ability to pass a context and additional request options.
  2891. //
  2892. // See SetIpAddressType for details on how to use this API operation.
  2893. //
  2894. // The context must be non-nil and will be used for request cancellation. If
  2895. // the context is nil a panic will occur. In the future the SDK may create
  2896. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2897. // for more information on using Contexts.
  2898. func (c *ELBV2) SetIpAddressTypeWithContext(ctx aws.Context, input *SetIpAddressTypeInput, opts ...request.Option) (*SetIpAddressTypeOutput, error) {
  2899. req, out := c.SetIpAddressTypeRequest(input)
  2900. req.SetContext(ctx)
  2901. req.ApplyOptions(opts...)
  2902. return out, req.Send()
  2903. }
  2904. const opSetRulePriorities = "SetRulePriorities"
  2905. // SetRulePrioritiesRequest generates a "aws/request.Request" representing the
  2906. // client's request for the SetRulePriorities operation. The "output" return
  2907. // value will be populated with the request's response once the request completes
  2908. // successfully.
  2909. //
  2910. // Use "Send" method on the returned Request to send the API call to the service.
  2911. // the "output" return value is not valid until after Send returns without error.
  2912. //
  2913. // See SetRulePriorities for more information on using the SetRulePriorities
  2914. // API call, and error handling.
  2915. //
  2916. // This method is useful when you want to inject custom logic or configuration
  2917. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2918. //
  2919. //
  2920. // // Example sending a request using the SetRulePrioritiesRequest method.
  2921. // req, resp := client.SetRulePrioritiesRequest(params)
  2922. //
  2923. // err := req.Send()
  2924. // if err == nil { // resp is now filled
  2925. // fmt.Println(resp)
  2926. // }
  2927. //
  2928. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetRulePriorities
  2929. func (c *ELBV2) SetRulePrioritiesRequest(input *SetRulePrioritiesInput) (req *request.Request, output *SetRulePrioritiesOutput) {
  2930. op := &request.Operation{
  2931. Name: opSetRulePriorities,
  2932. HTTPMethod: "POST",
  2933. HTTPPath: "/",
  2934. }
  2935. if input == nil {
  2936. input = &SetRulePrioritiesInput{}
  2937. }
  2938. output = &SetRulePrioritiesOutput{}
  2939. req = c.newRequest(op, input, output)
  2940. return
  2941. }
  2942. // SetRulePriorities API operation for Elastic Load Balancing.
  2943. //
  2944. // Sets the priorities of the specified rules.
  2945. //
  2946. // You can reorder the rules as long as there are no priority conflicts in the
  2947. // new order. Any existing rules that you do not specify retain their current
  2948. // priority.
  2949. //
  2950. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2951. // with awserr.Error's Code and Message methods to get detailed information about
  2952. // the error.
  2953. //
  2954. // See the AWS API reference guide for Elastic Load Balancing's
  2955. // API operation SetRulePriorities for usage and error information.
  2956. //
  2957. // Returned Error Codes:
  2958. // * ErrCodeRuleNotFoundException "RuleNotFound"
  2959. // The specified rule does not exist.
  2960. //
  2961. // * ErrCodePriorityInUseException "PriorityInUse"
  2962. // The specified priority is in use.
  2963. //
  2964. // * ErrCodeOperationNotPermittedException "OperationNotPermitted"
  2965. // This operation is not allowed.
  2966. //
  2967. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetRulePriorities
  2968. func (c *ELBV2) SetRulePriorities(input *SetRulePrioritiesInput) (*SetRulePrioritiesOutput, error) {
  2969. req, out := c.SetRulePrioritiesRequest(input)
  2970. return out, req.Send()
  2971. }
  2972. // SetRulePrioritiesWithContext is the same as SetRulePriorities with the addition of
  2973. // the ability to pass a context and additional request options.
  2974. //
  2975. // See SetRulePriorities for details on how to use this API operation.
  2976. //
  2977. // The context must be non-nil and will be used for request cancellation. If
  2978. // the context is nil a panic will occur. In the future the SDK may create
  2979. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2980. // for more information on using Contexts.
  2981. func (c *ELBV2) SetRulePrioritiesWithContext(ctx aws.Context, input *SetRulePrioritiesInput, opts ...request.Option) (*SetRulePrioritiesOutput, error) {
  2982. req, out := c.SetRulePrioritiesRequest(input)
  2983. req.SetContext(ctx)
  2984. req.ApplyOptions(opts...)
  2985. return out, req.Send()
  2986. }
  2987. const opSetSecurityGroups = "SetSecurityGroups"
  2988. // SetSecurityGroupsRequest generates a "aws/request.Request" representing the
  2989. // client's request for the SetSecurityGroups operation. The "output" return
  2990. // value will be populated with the request's response once the request completes
  2991. // successfully.
  2992. //
  2993. // Use "Send" method on the returned Request to send the API call to the service.
  2994. // the "output" return value is not valid until after Send returns without error.
  2995. //
  2996. // See SetSecurityGroups for more information on using the SetSecurityGroups
  2997. // API call, and error handling.
  2998. //
  2999. // This method is useful when you want to inject custom logic or configuration
  3000. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3001. //
  3002. //
  3003. // // Example sending a request using the SetSecurityGroupsRequest method.
  3004. // req, resp := client.SetSecurityGroupsRequest(params)
  3005. //
  3006. // err := req.Send()
  3007. // if err == nil { // resp is now filled
  3008. // fmt.Println(resp)
  3009. // }
  3010. //
  3011. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSecurityGroups
  3012. func (c *ELBV2) SetSecurityGroupsRequest(input *SetSecurityGroupsInput) (req *request.Request, output *SetSecurityGroupsOutput) {
  3013. op := &request.Operation{
  3014. Name: opSetSecurityGroups,
  3015. HTTPMethod: "POST",
  3016. HTTPPath: "/",
  3017. }
  3018. if input == nil {
  3019. input = &SetSecurityGroupsInput{}
  3020. }
  3021. output = &SetSecurityGroupsOutput{}
  3022. req = c.newRequest(op, input, output)
  3023. return
  3024. }
  3025. // SetSecurityGroups API operation for Elastic Load Balancing.
  3026. //
  3027. // Associates the specified security groups with the specified Application Load
  3028. // Balancer. The specified security groups override the previously associated
  3029. // security groups.
  3030. //
  3031. // You can't specify a security group for a Network Load Balancer.
  3032. //
  3033. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3034. // with awserr.Error's Code and Message methods to get detailed information about
  3035. // the error.
  3036. //
  3037. // See the AWS API reference guide for Elastic Load Balancing's
  3038. // API operation SetSecurityGroups for usage and error information.
  3039. //
  3040. // Returned Error Codes:
  3041. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  3042. // The specified load balancer does not exist.
  3043. //
  3044. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  3045. // The requested configuration is not valid.
  3046. //
  3047. // * ErrCodeInvalidSecurityGroupException "InvalidSecurityGroup"
  3048. // The specified security group does not exist.
  3049. //
  3050. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSecurityGroups
  3051. func (c *ELBV2) SetSecurityGroups(input *SetSecurityGroupsInput) (*SetSecurityGroupsOutput, error) {
  3052. req, out := c.SetSecurityGroupsRequest(input)
  3053. return out, req.Send()
  3054. }
  3055. // SetSecurityGroupsWithContext is the same as SetSecurityGroups with the addition of
  3056. // the ability to pass a context and additional request options.
  3057. //
  3058. // See SetSecurityGroups for details on how to use this API operation.
  3059. //
  3060. // The context must be non-nil and will be used for request cancellation. If
  3061. // the context is nil a panic will occur. In the future the SDK may create
  3062. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3063. // for more information on using Contexts.
  3064. func (c *ELBV2) SetSecurityGroupsWithContext(ctx aws.Context, input *SetSecurityGroupsInput, opts ...request.Option) (*SetSecurityGroupsOutput, error) {
  3065. req, out := c.SetSecurityGroupsRequest(input)
  3066. req.SetContext(ctx)
  3067. req.ApplyOptions(opts...)
  3068. return out, req.Send()
  3069. }
  3070. const opSetSubnets = "SetSubnets"
  3071. // SetSubnetsRequest generates a "aws/request.Request" representing the
  3072. // client's request for the SetSubnets operation. The "output" return
  3073. // value will be populated with the request's response once the request completes
  3074. // successfully.
  3075. //
  3076. // Use "Send" method on the returned Request to send the API call to the service.
  3077. // the "output" return value is not valid until after Send returns without error.
  3078. //
  3079. // See SetSubnets for more information on using the SetSubnets
  3080. // API call, and error handling.
  3081. //
  3082. // This method is useful when you want to inject custom logic or configuration
  3083. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3084. //
  3085. //
  3086. // // Example sending a request using the SetSubnetsRequest method.
  3087. // req, resp := client.SetSubnetsRequest(params)
  3088. //
  3089. // err := req.Send()
  3090. // if err == nil { // resp is now filled
  3091. // fmt.Println(resp)
  3092. // }
  3093. //
  3094. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSubnets
  3095. func (c *ELBV2) SetSubnetsRequest(input *SetSubnetsInput) (req *request.Request, output *SetSubnetsOutput) {
  3096. op := &request.Operation{
  3097. Name: opSetSubnets,
  3098. HTTPMethod: "POST",
  3099. HTTPPath: "/",
  3100. }
  3101. if input == nil {
  3102. input = &SetSubnetsInput{}
  3103. }
  3104. output = &SetSubnetsOutput{}
  3105. req = c.newRequest(op, input, output)
  3106. return
  3107. }
  3108. // SetSubnets API operation for Elastic Load Balancing.
  3109. //
  3110. // Enables the Availability Zone for the specified public subnets for the specified
  3111. // Application Load Balancer. The specified subnets replace the previously enabled
  3112. // subnets.
  3113. //
  3114. // You can't change the subnets for a Network Load Balancer.
  3115. //
  3116. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3117. // with awserr.Error's Code and Message methods to get detailed information about
  3118. // the error.
  3119. //
  3120. // See the AWS API reference guide for Elastic Load Balancing's
  3121. // API operation SetSubnets for usage and error information.
  3122. //
  3123. // Returned Error Codes:
  3124. // * ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound"
  3125. // The specified load balancer does not exist.
  3126. //
  3127. // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest"
  3128. // The requested configuration is not valid.
  3129. //
  3130. // * ErrCodeSubnetNotFoundException "SubnetNotFound"
  3131. // The specified subnet does not exist.
  3132. //
  3133. // * ErrCodeInvalidSubnetException "InvalidSubnet"
  3134. // The specified subnet is out of available addresses.
  3135. //
  3136. // * ErrCodeAllocationIdNotFoundException "AllocationIdNotFound"
  3137. // The specified allocation ID does not exist.
  3138. //
  3139. // * ErrCodeAvailabilityZoneNotSupportedException "AvailabilityZoneNotSupported"
  3140. // The specified Availability Zone is not supported.
  3141. //
  3142. // See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSubnets
  3143. func (c *ELBV2) SetSubnets(input *SetSubnetsInput) (*SetSubnetsOutput, error) {
  3144. req, out := c.SetSubnetsRequest(input)
  3145. return out, req.Send()
  3146. }
  3147. // SetSubnetsWithContext is the same as SetSubnets with the addition of
  3148. // the ability to pass a context and additional request options.
  3149. //
  3150. // See SetSubnets for details on how to use this API operation.
  3151. //
  3152. // The context must be non-nil and will be used for request cancellation. If
  3153. // the context is nil a panic will occur. In the future the SDK may create
  3154. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3155. // for more information on using Contexts.
  3156. func (c *ELBV2) SetSubnetsWithContext(ctx aws.Context, input *SetSubnetsInput, opts ...request.Option) (*SetSubnetsOutput, error) {
  3157. req, out := c.SetSubnetsRequest(input)
  3158. req.SetContext(ctx)
  3159. req.ApplyOptions(opts...)
  3160. return out, req.Send()
  3161. }
  3162. // Information about an action.
  3163. type Action struct {
  3164. _ struct{} `type:"structure"`
  3165. // [HTTPS listeners] Information for using Amazon Cognito to authenticate users.
  3166. // Specify only when Type is authenticate-cognito.
  3167. AuthenticateCognitoConfig *AuthenticateCognitoActionConfig `type:"structure"`
  3168. // [HTTPS listeners] Information about an identity provider that is compliant
  3169. // with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc.
  3170. AuthenticateOidcConfig *AuthenticateOidcActionConfig `type:"structure"`
  3171. // [Application Load Balancer] Information for creating an action that returns
  3172. // a custom HTTP response. Specify only when Type is fixed-response.
  3173. FixedResponseConfig *FixedResponseActionConfig `type:"structure"`
  3174. // The order for the action. This value is required for rules with multiple
  3175. // actions. The action with the lowest value for order is performed first. The
  3176. // final action to be performed must be a forward or a fixed-response action.
  3177. Order *int64 `min:"1" type:"integer"`
  3178. // [Application Load Balancer] Information for creating a redirect action. Specify
  3179. // only when Type is redirect.
  3180. RedirectConfig *RedirectActionConfig `type:"structure"`
  3181. // The Amazon Resource Name (ARN) of the target group. Specify only when Type
  3182. // is forward.
  3183. TargetGroupArn *string `type:"string"`
  3184. // The type of action. Each rule must include exactly one of the following types
  3185. // of actions: forward, fixed-response, or redirect.
  3186. //
  3187. // Type is a required field
  3188. Type *string `type:"string" required:"true" enum:"ActionTypeEnum"`
  3189. }
  3190. // String returns the string representation
  3191. func (s Action) String() string {
  3192. return awsutil.Prettify(s)
  3193. }
  3194. // GoString returns the string representation
  3195. func (s Action) GoString() string {
  3196. return s.String()
  3197. }
  3198. // Validate inspects the fields of the type to determine if they are valid.
  3199. func (s *Action) Validate() error {
  3200. invalidParams := request.ErrInvalidParams{Context: "Action"}
  3201. if s.Order != nil && *s.Order < 1 {
  3202. invalidParams.Add(request.NewErrParamMinValue("Order", 1))
  3203. }
  3204. if s.Type == nil {
  3205. invalidParams.Add(request.NewErrParamRequired("Type"))
  3206. }
  3207. if s.AuthenticateCognitoConfig != nil {
  3208. if err := s.AuthenticateCognitoConfig.Validate(); err != nil {
  3209. invalidParams.AddNested("AuthenticateCognitoConfig", err.(request.ErrInvalidParams))
  3210. }
  3211. }
  3212. if s.AuthenticateOidcConfig != nil {
  3213. if err := s.AuthenticateOidcConfig.Validate(); err != nil {
  3214. invalidParams.AddNested("AuthenticateOidcConfig", err.(request.ErrInvalidParams))
  3215. }
  3216. }
  3217. if s.FixedResponseConfig != nil {
  3218. if err := s.FixedResponseConfig.Validate(); err != nil {
  3219. invalidParams.AddNested("FixedResponseConfig", err.(request.ErrInvalidParams))
  3220. }
  3221. }
  3222. if s.RedirectConfig != nil {
  3223. if err := s.RedirectConfig.Validate(); err != nil {
  3224. invalidParams.AddNested("RedirectConfig", err.(request.ErrInvalidParams))
  3225. }
  3226. }
  3227. if invalidParams.Len() > 0 {
  3228. return invalidParams
  3229. }
  3230. return nil
  3231. }
  3232. // SetAuthenticateCognitoConfig sets the AuthenticateCognitoConfig field's value.
  3233. func (s *Action) SetAuthenticateCognitoConfig(v *AuthenticateCognitoActionConfig) *Action {
  3234. s.AuthenticateCognitoConfig = v
  3235. return s
  3236. }
  3237. // SetAuthenticateOidcConfig sets the AuthenticateOidcConfig field's value.
  3238. func (s *Action) SetAuthenticateOidcConfig(v *AuthenticateOidcActionConfig) *Action {
  3239. s.AuthenticateOidcConfig = v
  3240. return s
  3241. }
  3242. // SetFixedResponseConfig sets the FixedResponseConfig field's value.
  3243. func (s *Action) SetFixedResponseConfig(v *FixedResponseActionConfig) *Action {
  3244. s.FixedResponseConfig = v
  3245. return s
  3246. }
  3247. // SetOrder sets the Order field's value.
  3248. func (s *Action) SetOrder(v int64) *Action {
  3249. s.Order = &v
  3250. return s
  3251. }
  3252. // SetRedirectConfig sets the RedirectConfig field's value.
  3253. func (s *Action) SetRedirectConfig(v *RedirectActionConfig) *Action {
  3254. s.RedirectConfig = v
  3255. return s
  3256. }
  3257. // SetTargetGroupArn sets the TargetGroupArn field's value.
  3258. func (s *Action) SetTargetGroupArn(v string) *Action {
  3259. s.TargetGroupArn = &v
  3260. return s
  3261. }
  3262. // SetType sets the Type field's value.
  3263. func (s *Action) SetType(v string) *Action {
  3264. s.Type = &v
  3265. return s
  3266. }
  3267. type AddListenerCertificatesInput struct {
  3268. _ struct{} `type:"structure"`
  3269. // The certificate to add. You can specify one certificate per call. Set CertificateArn
  3270. // to the certificate ARN but do not set IsDefault.
  3271. //
  3272. // Certificates is a required field
  3273. Certificates []*Certificate `type:"list" required:"true"`
  3274. // The Amazon Resource Name (ARN) of the listener.
  3275. //
  3276. // ListenerArn is a required field
  3277. ListenerArn *string `type:"string" required:"true"`
  3278. }
  3279. // String returns the string representation
  3280. func (s AddListenerCertificatesInput) String() string {
  3281. return awsutil.Prettify(s)
  3282. }
  3283. // GoString returns the string representation
  3284. func (s AddListenerCertificatesInput) GoString() string {
  3285. return s.String()
  3286. }
  3287. // Validate inspects the fields of the type to determine if they are valid.
  3288. func (s *AddListenerCertificatesInput) Validate() error {
  3289. invalidParams := request.ErrInvalidParams{Context: "AddListenerCertificatesInput"}
  3290. if s.Certificates == nil {
  3291. invalidParams.Add(request.NewErrParamRequired("Certificates"))
  3292. }
  3293. if s.ListenerArn == nil {
  3294. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  3295. }
  3296. if invalidParams.Len() > 0 {
  3297. return invalidParams
  3298. }
  3299. return nil
  3300. }
  3301. // SetCertificates sets the Certificates field's value.
  3302. func (s *AddListenerCertificatesInput) SetCertificates(v []*Certificate) *AddListenerCertificatesInput {
  3303. s.Certificates = v
  3304. return s
  3305. }
  3306. // SetListenerArn sets the ListenerArn field's value.
  3307. func (s *AddListenerCertificatesInput) SetListenerArn(v string) *AddListenerCertificatesInput {
  3308. s.ListenerArn = &v
  3309. return s
  3310. }
  3311. type AddListenerCertificatesOutput struct {
  3312. _ struct{} `type:"structure"`
  3313. // Information about the certificates.
  3314. Certificates []*Certificate `type:"list"`
  3315. }
  3316. // String returns the string representation
  3317. func (s AddListenerCertificatesOutput) String() string {
  3318. return awsutil.Prettify(s)
  3319. }
  3320. // GoString returns the string representation
  3321. func (s AddListenerCertificatesOutput) GoString() string {
  3322. return s.String()
  3323. }
  3324. // SetCertificates sets the Certificates field's value.
  3325. func (s *AddListenerCertificatesOutput) SetCertificates(v []*Certificate) *AddListenerCertificatesOutput {
  3326. s.Certificates = v
  3327. return s
  3328. }
  3329. type AddTagsInput struct {
  3330. _ struct{} `type:"structure"`
  3331. // The Amazon Resource Name (ARN) of the resource.
  3332. //
  3333. // ResourceArns is a required field
  3334. ResourceArns []*string `type:"list" required:"true"`
  3335. // The tags. Each resource can have a maximum of 10 tags.
  3336. //
  3337. // Tags is a required field
  3338. Tags []*Tag `min:"1" type:"list" required:"true"`
  3339. }
  3340. // String returns the string representation
  3341. func (s AddTagsInput) String() string {
  3342. return awsutil.Prettify(s)
  3343. }
  3344. // GoString returns the string representation
  3345. func (s AddTagsInput) GoString() string {
  3346. return s.String()
  3347. }
  3348. // Validate inspects the fields of the type to determine if they are valid.
  3349. func (s *AddTagsInput) Validate() error {
  3350. invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"}
  3351. if s.ResourceArns == nil {
  3352. invalidParams.Add(request.NewErrParamRequired("ResourceArns"))
  3353. }
  3354. if s.Tags == nil {
  3355. invalidParams.Add(request.NewErrParamRequired("Tags"))
  3356. }
  3357. if s.Tags != nil && len(s.Tags) < 1 {
  3358. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  3359. }
  3360. if s.Tags != nil {
  3361. for i, v := range s.Tags {
  3362. if v == nil {
  3363. continue
  3364. }
  3365. if err := v.Validate(); err != nil {
  3366. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  3367. }
  3368. }
  3369. }
  3370. if invalidParams.Len() > 0 {
  3371. return invalidParams
  3372. }
  3373. return nil
  3374. }
  3375. // SetResourceArns sets the ResourceArns field's value.
  3376. func (s *AddTagsInput) SetResourceArns(v []*string) *AddTagsInput {
  3377. s.ResourceArns = v
  3378. return s
  3379. }
  3380. // SetTags sets the Tags field's value.
  3381. func (s *AddTagsInput) SetTags(v []*Tag) *AddTagsInput {
  3382. s.Tags = v
  3383. return s
  3384. }
  3385. type AddTagsOutput struct {
  3386. _ struct{} `type:"structure"`
  3387. }
  3388. // String returns the string representation
  3389. func (s AddTagsOutput) String() string {
  3390. return awsutil.Prettify(s)
  3391. }
  3392. // GoString returns the string representation
  3393. func (s AddTagsOutput) GoString() string {
  3394. return s.String()
  3395. }
  3396. // Request parameters to use when integrating with Amazon Cognito to authenticate
  3397. // users.
  3398. type AuthenticateCognitoActionConfig struct {
  3399. _ struct{} `type:"structure"`
  3400. // The query parameters (up to 10) to include in the redirect request to the
  3401. // authorization endpoint.
  3402. AuthenticationRequestExtraParams map[string]*string `type:"map"`
  3403. // The behavior if the user is not authenticated. The following are possible
  3404. // values:
  3405. //
  3406. // * deny - Return an HTTP 401 Unauthorized error.
  3407. //
  3408. // * allow - Allow the request to be forwarded to the target.
  3409. //
  3410. // authenticate
  3411. OnUnauthenticatedRequest *string `type:"string" enum:"AuthenticateCognitoActionConditionalBehaviorEnum"`
  3412. // The set of user claims to be requested from the IdP. The default is openid.
  3413. //
  3414. // To verify which scope values your IdP supports and how to separate multiple
  3415. // values, see the documentation for your IdP.
  3416. Scope *string `type:"string"`
  3417. // The name of the cookie used to maintain session information. The default
  3418. // is AWSELBAuthSessionCookie.
  3419. SessionCookieName *string `type:"string"`
  3420. // The maximum duration of the authentication session, in seconds. The default
  3421. // is 604800 seconds (7 days).
  3422. SessionTimeout *int64 `type:"long"`
  3423. // The Amazon Resource Name (ARN) of the Amazon Cognito user pool.
  3424. //
  3425. // UserPoolArn is a required field
  3426. UserPoolArn *string `type:"string" required:"true"`
  3427. // The ID of the Amazon Cognito user pool client.
  3428. //
  3429. // UserPoolClientId is a required field
  3430. UserPoolClientId *string `type:"string" required:"true"`
  3431. // The domain prefix or fully-qualified domain name of the Amazon Cognito user
  3432. // pool.
  3433. //
  3434. // UserPoolDomain is a required field
  3435. UserPoolDomain *string `type:"string" required:"true"`
  3436. }
  3437. // String returns the string representation
  3438. func (s AuthenticateCognitoActionConfig) String() string {
  3439. return awsutil.Prettify(s)
  3440. }
  3441. // GoString returns the string representation
  3442. func (s AuthenticateCognitoActionConfig) GoString() string {
  3443. return s.String()
  3444. }
  3445. // Validate inspects the fields of the type to determine if they are valid.
  3446. func (s *AuthenticateCognitoActionConfig) Validate() error {
  3447. invalidParams := request.ErrInvalidParams{Context: "AuthenticateCognitoActionConfig"}
  3448. if s.UserPoolArn == nil {
  3449. invalidParams.Add(request.NewErrParamRequired("UserPoolArn"))
  3450. }
  3451. if s.UserPoolClientId == nil {
  3452. invalidParams.Add(request.NewErrParamRequired("UserPoolClientId"))
  3453. }
  3454. if s.UserPoolDomain == nil {
  3455. invalidParams.Add(request.NewErrParamRequired("UserPoolDomain"))
  3456. }
  3457. if invalidParams.Len() > 0 {
  3458. return invalidParams
  3459. }
  3460. return nil
  3461. }
  3462. // SetAuthenticationRequestExtraParams sets the AuthenticationRequestExtraParams field's value.
  3463. func (s *AuthenticateCognitoActionConfig) SetAuthenticationRequestExtraParams(v map[string]*string) *AuthenticateCognitoActionConfig {
  3464. s.AuthenticationRequestExtraParams = v
  3465. return s
  3466. }
  3467. // SetOnUnauthenticatedRequest sets the OnUnauthenticatedRequest field's value.
  3468. func (s *AuthenticateCognitoActionConfig) SetOnUnauthenticatedRequest(v string) *AuthenticateCognitoActionConfig {
  3469. s.OnUnauthenticatedRequest = &v
  3470. return s
  3471. }
  3472. // SetScope sets the Scope field's value.
  3473. func (s *AuthenticateCognitoActionConfig) SetScope(v string) *AuthenticateCognitoActionConfig {
  3474. s.Scope = &v
  3475. return s
  3476. }
  3477. // SetSessionCookieName sets the SessionCookieName field's value.
  3478. func (s *AuthenticateCognitoActionConfig) SetSessionCookieName(v string) *AuthenticateCognitoActionConfig {
  3479. s.SessionCookieName = &v
  3480. return s
  3481. }
  3482. // SetSessionTimeout sets the SessionTimeout field's value.
  3483. func (s *AuthenticateCognitoActionConfig) SetSessionTimeout(v int64) *AuthenticateCognitoActionConfig {
  3484. s.SessionTimeout = &v
  3485. return s
  3486. }
  3487. // SetUserPoolArn sets the UserPoolArn field's value.
  3488. func (s *AuthenticateCognitoActionConfig) SetUserPoolArn(v string) *AuthenticateCognitoActionConfig {
  3489. s.UserPoolArn = &v
  3490. return s
  3491. }
  3492. // SetUserPoolClientId sets the UserPoolClientId field's value.
  3493. func (s *AuthenticateCognitoActionConfig) SetUserPoolClientId(v string) *AuthenticateCognitoActionConfig {
  3494. s.UserPoolClientId = &v
  3495. return s
  3496. }
  3497. // SetUserPoolDomain sets the UserPoolDomain field's value.
  3498. func (s *AuthenticateCognitoActionConfig) SetUserPoolDomain(v string) *AuthenticateCognitoActionConfig {
  3499. s.UserPoolDomain = &v
  3500. return s
  3501. }
  3502. // Request parameters when using an identity provider (IdP) that is compliant
  3503. // with OpenID Connect (OIDC) to authenticate users.
  3504. type AuthenticateOidcActionConfig struct {
  3505. _ struct{} `type:"structure"`
  3506. // The query parameters (up to 10) to include in the redirect request to the
  3507. // authorization endpoint.
  3508. AuthenticationRequestExtraParams map[string]*string `type:"map"`
  3509. // The authorization endpoint of the IdP. This must be a full URL, including
  3510. // the HTTPS protocol, the domain, and the path.
  3511. //
  3512. // AuthorizationEndpoint is a required field
  3513. AuthorizationEndpoint *string `type:"string" required:"true"`
  3514. // The OAuth 2.0 client identifier.
  3515. //
  3516. // ClientId is a required field
  3517. ClientId *string `type:"string" required:"true"`
  3518. // The OAuth 2.0 client secret.
  3519. //
  3520. // ClientSecret is a required field
  3521. ClientSecret *string `type:"string" required:"true"`
  3522. // The OIDC issuer identifier of the IdP. This must be a full URL, including
  3523. // the HTTPS protocol, the domain, and the path.
  3524. //
  3525. // Issuer is a required field
  3526. Issuer *string `type:"string" required:"true"`
  3527. // The behavior if the user is not authenticated. The following are possible
  3528. // values:
  3529. //
  3530. // * deny - Return an HTTP 401 Unauthorized error.
  3531. //
  3532. // * allow - Allow the request to be forwarded to the target.
  3533. //
  3534. // authenticate
  3535. OnUnauthenticatedRequest *string `type:"string" enum:"AuthenticateOidcActionConditionalBehaviorEnum"`
  3536. // The set of user claims to be requested from the IdP. The default is openid.
  3537. //
  3538. // To verify which scope values your IdP supports and how to separate multiple
  3539. // values, see the documentation for your IdP.
  3540. Scope *string `type:"string"`
  3541. // The name of the cookie used to maintain session information. The default
  3542. // is AWSELBAuthSessionCookie.
  3543. SessionCookieName *string `type:"string"`
  3544. // The maximum duration of the authentication session, in seconds. The default
  3545. // is 604800 seconds (7 days).
  3546. SessionTimeout *int64 `type:"long"`
  3547. // The token endpoint of the IdP. This must be a full URL, including the HTTPS
  3548. // protocol, the domain, and the path.
  3549. //
  3550. // TokenEndpoint is a required field
  3551. TokenEndpoint *string `type:"string" required:"true"`
  3552. // The user info endpoint of the IdP. This must be a full URL, including the
  3553. // HTTPS protocol, the domain, and the path.
  3554. //
  3555. // UserInfoEndpoint is a required field
  3556. UserInfoEndpoint *string `type:"string" required:"true"`
  3557. }
  3558. // String returns the string representation
  3559. func (s AuthenticateOidcActionConfig) String() string {
  3560. return awsutil.Prettify(s)
  3561. }
  3562. // GoString returns the string representation
  3563. func (s AuthenticateOidcActionConfig) GoString() string {
  3564. return s.String()
  3565. }
  3566. // Validate inspects the fields of the type to determine if they are valid.
  3567. func (s *AuthenticateOidcActionConfig) Validate() error {
  3568. invalidParams := request.ErrInvalidParams{Context: "AuthenticateOidcActionConfig"}
  3569. if s.AuthorizationEndpoint == nil {
  3570. invalidParams.Add(request.NewErrParamRequired("AuthorizationEndpoint"))
  3571. }
  3572. if s.ClientId == nil {
  3573. invalidParams.Add(request.NewErrParamRequired("ClientId"))
  3574. }
  3575. if s.ClientSecret == nil {
  3576. invalidParams.Add(request.NewErrParamRequired("ClientSecret"))
  3577. }
  3578. if s.Issuer == nil {
  3579. invalidParams.Add(request.NewErrParamRequired("Issuer"))
  3580. }
  3581. if s.TokenEndpoint == nil {
  3582. invalidParams.Add(request.NewErrParamRequired("TokenEndpoint"))
  3583. }
  3584. if s.UserInfoEndpoint == nil {
  3585. invalidParams.Add(request.NewErrParamRequired("UserInfoEndpoint"))
  3586. }
  3587. if invalidParams.Len() > 0 {
  3588. return invalidParams
  3589. }
  3590. return nil
  3591. }
  3592. // SetAuthenticationRequestExtraParams sets the AuthenticationRequestExtraParams field's value.
  3593. func (s *AuthenticateOidcActionConfig) SetAuthenticationRequestExtraParams(v map[string]*string) *AuthenticateOidcActionConfig {
  3594. s.AuthenticationRequestExtraParams = v
  3595. return s
  3596. }
  3597. // SetAuthorizationEndpoint sets the AuthorizationEndpoint field's value.
  3598. func (s *AuthenticateOidcActionConfig) SetAuthorizationEndpoint(v string) *AuthenticateOidcActionConfig {
  3599. s.AuthorizationEndpoint = &v
  3600. return s
  3601. }
  3602. // SetClientId sets the ClientId field's value.
  3603. func (s *AuthenticateOidcActionConfig) SetClientId(v string) *AuthenticateOidcActionConfig {
  3604. s.ClientId = &v
  3605. return s
  3606. }
  3607. // SetClientSecret sets the ClientSecret field's value.
  3608. func (s *AuthenticateOidcActionConfig) SetClientSecret(v string) *AuthenticateOidcActionConfig {
  3609. s.ClientSecret = &v
  3610. return s
  3611. }
  3612. // SetIssuer sets the Issuer field's value.
  3613. func (s *AuthenticateOidcActionConfig) SetIssuer(v string) *AuthenticateOidcActionConfig {
  3614. s.Issuer = &v
  3615. return s
  3616. }
  3617. // SetOnUnauthenticatedRequest sets the OnUnauthenticatedRequest field's value.
  3618. func (s *AuthenticateOidcActionConfig) SetOnUnauthenticatedRequest(v string) *AuthenticateOidcActionConfig {
  3619. s.OnUnauthenticatedRequest = &v
  3620. return s
  3621. }
  3622. // SetScope sets the Scope field's value.
  3623. func (s *AuthenticateOidcActionConfig) SetScope(v string) *AuthenticateOidcActionConfig {
  3624. s.Scope = &v
  3625. return s
  3626. }
  3627. // SetSessionCookieName sets the SessionCookieName field's value.
  3628. func (s *AuthenticateOidcActionConfig) SetSessionCookieName(v string) *AuthenticateOidcActionConfig {
  3629. s.SessionCookieName = &v
  3630. return s
  3631. }
  3632. // SetSessionTimeout sets the SessionTimeout field's value.
  3633. func (s *AuthenticateOidcActionConfig) SetSessionTimeout(v int64) *AuthenticateOidcActionConfig {
  3634. s.SessionTimeout = &v
  3635. return s
  3636. }
  3637. // SetTokenEndpoint sets the TokenEndpoint field's value.
  3638. func (s *AuthenticateOidcActionConfig) SetTokenEndpoint(v string) *AuthenticateOidcActionConfig {
  3639. s.TokenEndpoint = &v
  3640. return s
  3641. }
  3642. // SetUserInfoEndpoint sets the UserInfoEndpoint field's value.
  3643. func (s *AuthenticateOidcActionConfig) SetUserInfoEndpoint(v string) *AuthenticateOidcActionConfig {
  3644. s.UserInfoEndpoint = &v
  3645. return s
  3646. }
  3647. // Information about an Availability Zone.
  3648. type AvailabilityZone struct {
  3649. _ struct{} `type:"structure"`
  3650. // [Network Load Balancers] The static IP address.
  3651. LoadBalancerAddresses []*LoadBalancerAddress `type:"list"`
  3652. // The ID of the subnet.
  3653. SubnetId *string `type:"string"`
  3654. // The name of the Availability Zone.
  3655. ZoneName *string `type:"string"`
  3656. }
  3657. // String returns the string representation
  3658. func (s AvailabilityZone) String() string {
  3659. return awsutil.Prettify(s)
  3660. }
  3661. // GoString returns the string representation
  3662. func (s AvailabilityZone) GoString() string {
  3663. return s.String()
  3664. }
  3665. // SetLoadBalancerAddresses sets the LoadBalancerAddresses field's value.
  3666. func (s *AvailabilityZone) SetLoadBalancerAddresses(v []*LoadBalancerAddress) *AvailabilityZone {
  3667. s.LoadBalancerAddresses = v
  3668. return s
  3669. }
  3670. // SetSubnetId sets the SubnetId field's value.
  3671. func (s *AvailabilityZone) SetSubnetId(v string) *AvailabilityZone {
  3672. s.SubnetId = &v
  3673. return s
  3674. }
  3675. // SetZoneName sets the ZoneName field's value.
  3676. func (s *AvailabilityZone) SetZoneName(v string) *AvailabilityZone {
  3677. s.ZoneName = &v
  3678. return s
  3679. }
  3680. // Information about an SSL server certificate.
  3681. type Certificate struct {
  3682. _ struct{} `type:"structure"`
  3683. // The Amazon Resource Name (ARN) of the certificate.
  3684. CertificateArn *string `type:"string"`
  3685. // Indicates whether the certificate is the default certificate. Do not set
  3686. // IsDefault when specifying a certificate as an input parameter.
  3687. IsDefault *bool `type:"boolean"`
  3688. }
  3689. // String returns the string representation
  3690. func (s Certificate) String() string {
  3691. return awsutil.Prettify(s)
  3692. }
  3693. // GoString returns the string representation
  3694. func (s Certificate) GoString() string {
  3695. return s.String()
  3696. }
  3697. // SetCertificateArn sets the CertificateArn field's value.
  3698. func (s *Certificate) SetCertificateArn(v string) *Certificate {
  3699. s.CertificateArn = &v
  3700. return s
  3701. }
  3702. // SetIsDefault sets the IsDefault field's value.
  3703. func (s *Certificate) SetIsDefault(v bool) *Certificate {
  3704. s.IsDefault = &v
  3705. return s
  3706. }
  3707. // Information about a cipher used in a policy.
  3708. type Cipher struct {
  3709. _ struct{} `type:"structure"`
  3710. // The name of the cipher.
  3711. Name *string `type:"string"`
  3712. // The priority of the cipher.
  3713. Priority *int64 `type:"integer"`
  3714. }
  3715. // String returns the string representation
  3716. func (s Cipher) String() string {
  3717. return awsutil.Prettify(s)
  3718. }
  3719. // GoString returns the string representation
  3720. func (s Cipher) GoString() string {
  3721. return s.String()
  3722. }
  3723. // SetName sets the Name field's value.
  3724. func (s *Cipher) SetName(v string) *Cipher {
  3725. s.Name = &v
  3726. return s
  3727. }
  3728. // SetPriority sets the Priority field's value.
  3729. func (s *Cipher) SetPriority(v int64) *Cipher {
  3730. s.Priority = &v
  3731. return s
  3732. }
  3733. type CreateListenerInput struct {
  3734. _ struct{} `type:"structure"`
  3735. // [HTTPS and TLS listeners] The default SSL server certificate. You must provide
  3736. // exactly one certificate. Set CertificateArn to the certificate ARN but do
  3737. // not set IsDefault.
  3738. //
  3739. // To create a certificate list, use AddListenerCertificates.
  3740. Certificates []*Certificate `type:"list"`
  3741. // The actions for the default rule. The rule must include one forward action
  3742. // or one or more fixed-response actions.
  3743. //
  3744. // If the action type is forward, you specify a target group. The protocol of
  3745. // the target group must be HTTP or HTTPS for an Application Load Balancer.
  3746. // The protocol of the target group must be TCP or TLS for a Network Load Balancer.
  3747. //
  3748. // [HTTPS listeners] If the action type is authenticate-oidc, you authenticate
  3749. // users through an identity provider that is OpenID Connect (OIDC) compliant.
  3750. //
  3751. // [HTTPS listeners] If the action type is authenticate-cognito, you authenticate
  3752. // users through the user pools supported by Amazon Cognito.
  3753. //
  3754. // [Application Load Balancer] If the action type is redirect, you redirect
  3755. // specified client requests from one URL to another.
  3756. //
  3757. // [Application Load Balancer] If the action type is fixed-response, you drop
  3758. // specified client requests and return a custom HTTP response.
  3759. //
  3760. // DefaultActions is a required field
  3761. DefaultActions []*Action `type:"list" required:"true"`
  3762. // The Amazon Resource Name (ARN) of the load balancer.
  3763. //
  3764. // LoadBalancerArn is a required field
  3765. LoadBalancerArn *string `type:"string" required:"true"`
  3766. // The port on which the load balancer is listening.
  3767. //
  3768. // Port is a required field
  3769. Port *int64 `min:"1" type:"integer" required:"true"`
  3770. // The protocol for connections from clients to the load balancer. For Application
  3771. // Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load
  3772. // Balancers, the supported protocols are TCP and TLS.
  3773. //
  3774. // Protocol is a required field
  3775. Protocol *string `type:"string" required:"true" enum:"ProtocolEnum"`
  3776. // [HTTPS and TLS listeners] The security policy that defines which ciphers
  3777. // and protocols are supported. The default is the current predefined security
  3778. // policy.
  3779. SslPolicy *string `type:"string"`
  3780. }
  3781. // String returns the string representation
  3782. func (s CreateListenerInput) String() string {
  3783. return awsutil.Prettify(s)
  3784. }
  3785. // GoString returns the string representation
  3786. func (s CreateListenerInput) GoString() string {
  3787. return s.String()
  3788. }
  3789. // Validate inspects the fields of the type to determine if they are valid.
  3790. func (s *CreateListenerInput) Validate() error {
  3791. invalidParams := request.ErrInvalidParams{Context: "CreateListenerInput"}
  3792. if s.DefaultActions == nil {
  3793. invalidParams.Add(request.NewErrParamRequired("DefaultActions"))
  3794. }
  3795. if s.LoadBalancerArn == nil {
  3796. invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn"))
  3797. }
  3798. if s.Port == nil {
  3799. invalidParams.Add(request.NewErrParamRequired("Port"))
  3800. }
  3801. if s.Port != nil && *s.Port < 1 {
  3802. invalidParams.Add(request.NewErrParamMinValue("Port", 1))
  3803. }
  3804. if s.Protocol == nil {
  3805. invalidParams.Add(request.NewErrParamRequired("Protocol"))
  3806. }
  3807. if s.DefaultActions != nil {
  3808. for i, v := range s.DefaultActions {
  3809. if v == nil {
  3810. continue
  3811. }
  3812. if err := v.Validate(); err != nil {
  3813. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DefaultActions", i), err.(request.ErrInvalidParams))
  3814. }
  3815. }
  3816. }
  3817. if invalidParams.Len() > 0 {
  3818. return invalidParams
  3819. }
  3820. return nil
  3821. }
  3822. // SetCertificates sets the Certificates field's value.
  3823. func (s *CreateListenerInput) SetCertificates(v []*Certificate) *CreateListenerInput {
  3824. s.Certificates = v
  3825. return s
  3826. }
  3827. // SetDefaultActions sets the DefaultActions field's value.
  3828. func (s *CreateListenerInput) SetDefaultActions(v []*Action) *CreateListenerInput {
  3829. s.DefaultActions = v
  3830. return s
  3831. }
  3832. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  3833. func (s *CreateListenerInput) SetLoadBalancerArn(v string) *CreateListenerInput {
  3834. s.LoadBalancerArn = &v
  3835. return s
  3836. }
  3837. // SetPort sets the Port field's value.
  3838. func (s *CreateListenerInput) SetPort(v int64) *CreateListenerInput {
  3839. s.Port = &v
  3840. return s
  3841. }
  3842. // SetProtocol sets the Protocol field's value.
  3843. func (s *CreateListenerInput) SetProtocol(v string) *CreateListenerInput {
  3844. s.Protocol = &v
  3845. return s
  3846. }
  3847. // SetSslPolicy sets the SslPolicy field's value.
  3848. func (s *CreateListenerInput) SetSslPolicy(v string) *CreateListenerInput {
  3849. s.SslPolicy = &v
  3850. return s
  3851. }
  3852. type CreateListenerOutput struct {
  3853. _ struct{} `type:"structure"`
  3854. // Information about the listener.
  3855. Listeners []*Listener `type:"list"`
  3856. }
  3857. // String returns the string representation
  3858. func (s CreateListenerOutput) String() string {
  3859. return awsutil.Prettify(s)
  3860. }
  3861. // GoString returns the string representation
  3862. func (s CreateListenerOutput) GoString() string {
  3863. return s.String()
  3864. }
  3865. // SetListeners sets the Listeners field's value.
  3866. func (s *CreateListenerOutput) SetListeners(v []*Listener) *CreateListenerOutput {
  3867. s.Listeners = v
  3868. return s
  3869. }
  3870. type CreateLoadBalancerInput struct {
  3871. _ struct{} `type:"structure"`
  3872. // [Application Load Balancers] The type of IP addresses used by the subnets
  3873. // for your load balancer. The possible values are ipv4 (for IPv4 addresses)
  3874. // and dualstack (for IPv4 and IPv6 addresses). Internal load balancers must
  3875. // use ipv4.
  3876. IpAddressType *string `type:"string" enum:"IpAddressType"`
  3877. // The name of the load balancer.
  3878. //
  3879. // This name must be unique per region per account, can have a maximum of 32
  3880. // characters, must contain only alphanumeric characters or hyphens, must not
  3881. // begin or end with a hyphen, and must not begin with "internal-".
  3882. //
  3883. // Name is a required field
  3884. Name *string `type:"string" required:"true"`
  3885. // The nodes of an Internet-facing load balancer have public IP addresses. The
  3886. // DNS name of an Internet-facing load balancer is publicly resolvable to the
  3887. // public IP addresses of the nodes. Therefore, Internet-facing load balancers
  3888. // can route requests from clients over the internet.
  3889. //
  3890. // The nodes of an internal load balancer have only private IP addresses. The
  3891. // DNS name of an internal load balancer is publicly resolvable to the private
  3892. // IP addresses of the nodes. Therefore, internal load balancers can only route
  3893. // requests from clients with access to the VPC for the load balancer.
  3894. //
  3895. // The default is an Internet-facing load balancer.
  3896. Scheme *string `type:"string" enum:"LoadBalancerSchemeEnum"`
  3897. // [Application Load Balancers] The IDs of the security groups for the load
  3898. // balancer.
  3899. SecurityGroups []*string `type:"list"`
  3900. // The IDs of the public subnets. You can specify only one subnet per Availability
  3901. // Zone. You must specify either subnets or subnet mappings.
  3902. //
  3903. // [Application Load Balancers] You must specify subnets from at least two Availability
  3904. // Zones. You cannot specify Elastic IP addresses for your subnets.
  3905. //
  3906. // [Network Load Balancers] You can specify subnets from one or more Availability
  3907. // Zones. You can specify one Elastic IP address per subnet.
  3908. SubnetMappings []*SubnetMapping `type:"list"`
  3909. // The IDs of the public subnets. You can specify only one subnet per Availability
  3910. // Zone. You must specify either subnets or subnet mappings.
  3911. //
  3912. // [Application Load Balancers] You must specify subnets from at least two Availability
  3913. // Zones.
  3914. //
  3915. // [Network Load Balancers] You can specify subnets from one or more Availability
  3916. // Zones.
  3917. Subnets []*string `type:"list"`
  3918. // One or more tags to assign to the load balancer.
  3919. Tags []*Tag `min:"1" type:"list"`
  3920. // The type of load balancer. The default is application.
  3921. Type *string `type:"string" enum:"LoadBalancerTypeEnum"`
  3922. }
  3923. // String returns the string representation
  3924. func (s CreateLoadBalancerInput) String() string {
  3925. return awsutil.Prettify(s)
  3926. }
  3927. // GoString returns the string representation
  3928. func (s CreateLoadBalancerInput) GoString() string {
  3929. return s.String()
  3930. }
  3931. // Validate inspects the fields of the type to determine if they are valid.
  3932. func (s *CreateLoadBalancerInput) Validate() error {
  3933. invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerInput"}
  3934. if s.Name == nil {
  3935. invalidParams.Add(request.NewErrParamRequired("Name"))
  3936. }
  3937. if s.Tags != nil && len(s.Tags) < 1 {
  3938. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  3939. }
  3940. if s.Tags != nil {
  3941. for i, v := range s.Tags {
  3942. if v == nil {
  3943. continue
  3944. }
  3945. if err := v.Validate(); err != nil {
  3946. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  3947. }
  3948. }
  3949. }
  3950. if invalidParams.Len() > 0 {
  3951. return invalidParams
  3952. }
  3953. return nil
  3954. }
  3955. // SetIpAddressType sets the IpAddressType field's value.
  3956. func (s *CreateLoadBalancerInput) SetIpAddressType(v string) *CreateLoadBalancerInput {
  3957. s.IpAddressType = &v
  3958. return s
  3959. }
  3960. // SetName sets the Name field's value.
  3961. func (s *CreateLoadBalancerInput) SetName(v string) *CreateLoadBalancerInput {
  3962. s.Name = &v
  3963. return s
  3964. }
  3965. // SetScheme sets the Scheme field's value.
  3966. func (s *CreateLoadBalancerInput) SetScheme(v string) *CreateLoadBalancerInput {
  3967. s.Scheme = &v
  3968. return s
  3969. }
  3970. // SetSecurityGroups sets the SecurityGroups field's value.
  3971. func (s *CreateLoadBalancerInput) SetSecurityGroups(v []*string) *CreateLoadBalancerInput {
  3972. s.SecurityGroups = v
  3973. return s
  3974. }
  3975. // SetSubnetMappings sets the SubnetMappings field's value.
  3976. func (s *CreateLoadBalancerInput) SetSubnetMappings(v []*SubnetMapping) *CreateLoadBalancerInput {
  3977. s.SubnetMappings = v
  3978. return s
  3979. }
  3980. // SetSubnets sets the Subnets field's value.
  3981. func (s *CreateLoadBalancerInput) SetSubnets(v []*string) *CreateLoadBalancerInput {
  3982. s.Subnets = v
  3983. return s
  3984. }
  3985. // SetTags sets the Tags field's value.
  3986. func (s *CreateLoadBalancerInput) SetTags(v []*Tag) *CreateLoadBalancerInput {
  3987. s.Tags = v
  3988. return s
  3989. }
  3990. // SetType sets the Type field's value.
  3991. func (s *CreateLoadBalancerInput) SetType(v string) *CreateLoadBalancerInput {
  3992. s.Type = &v
  3993. return s
  3994. }
  3995. type CreateLoadBalancerOutput struct {
  3996. _ struct{} `type:"structure"`
  3997. // Information about the load balancer.
  3998. LoadBalancers []*LoadBalancer `type:"list"`
  3999. }
  4000. // String returns the string representation
  4001. func (s CreateLoadBalancerOutput) String() string {
  4002. return awsutil.Prettify(s)
  4003. }
  4004. // GoString returns the string representation
  4005. func (s CreateLoadBalancerOutput) GoString() string {
  4006. return s.String()
  4007. }
  4008. // SetLoadBalancers sets the LoadBalancers field's value.
  4009. func (s *CreateLoadBalancerOutput) SetLoadBalancers(v []*LoadBalancer) *CreateLoadBalancerOutput {
  4010. s.LoadBalancers = v
  4011. return s
  4012. }
  4013. type CreateRuleInput struct {
  4014. _ struct{} `type:"structure"`
  4015. // The actions. Each rule must include exactly one of the following types of
  4016. // actions: forward, fixed-response, or redirect.
  4017. //
  4018. // If the action type is forward, you specify a target group. The protocol of
  4019. // the target group must be HTTP or HTTPS for an Application Load Balancer.
  4020. // The protocol of the target group must be TCP or TLS for a Network Load Balancer.
  4021. //
  4022. // [HTTPS listeners] If the action type is authenticate-oidc, you authenticate
  4023. // users through an identity provider that is OpenID Connect (OIDC) compliant.
  4024. //
  4025. // [HTTPS listeners] If the action type is authenticate-cognito, you authenticate
  4026. // users through the user pools supported by Amazon Cognito.
  4027. //
  4028. // [Application Load Balancer] If the action type is redirect, you redirect
  4029. // specified client requests from one URL to another.
  4030. //
  4031. // [Application Load Balancer] If the action type is fixed-response, you drop
  4032. // specified client requests and return a custom HTTP response.
  4033. //
  4034. // Actions is a required field
  4035. Actions []*Action `type:"list" required:"true"`
  4036. // The conditions. Each condition specifies a field name and a single value.
  4037. //
  4038. // If the field name is host-header, you can specify a single host name (for
  4039. // example, my.example.com). A host name is case insensitive, can be up to 128
  4040. // characters in length, and can contain any of the following characters. You
  4041. // can include up to three wildcard characters.
  4042. //
  4043. // * A-Z, a-z, 0-9
  4044. //
  4045. // * - .
  4046. //
  4047. // * * (matches 0 or more characters)
  4048. //
  4049. // * ? (matches exactly 1 character)
  4050. //
  4051. // If the field name is path-pattern, you can specify a single path pattern.
  4052. // A path pattern is case-sensitive, can be up to 128 characters in length,
  4053. // and can contain any of the following characters. You can include up to three
  4054. // wildcard characters.
  4055. //
  4056. // * A-Z, a-z, 0-9
  4057. //
  4058. // * _ - . $ / ~ " ' @ : +
  4059. //
  4060. // * & (using &)
  4061. //
  4062. // * * (matches 0 or more characters)
  4063. //
  4064. // * ? (matches exactly 1 character)
  4065. //
  4066. // Conditions is a required field
  4067. Conditions []*RuleCondition `type:"list" required:"true"`
  4068. // The Amazon Resource Name (ARN) of the listener.
  4069. //
  4070. // ListenerArn is a required field
  4071. ListenerArn *string `type:"string" required:"true"`
  4072. // The rule priority. A listener can't have multiple rules with the same priority.
  4073. //
  4074. // Priority is a required field
  4075. Priority *int64 `min:"1" type:"integer" required:"true"`
  4076. }
  4077. // String returns the string representation
  4078. func (s CreateRuleInput) String() string {
  4079. return awsutil.Prettify(s)
  4080. }
  4081. // GoString returns the string representation
  4082. func (s CreateRuleInput) GoString() string {
  4083. return s.String()
  4084. }
  4085. // Validate inspects the fields of the type to determine if they are valid.
  4086. func (s *CreateRuleInput) Validate() error {
  4087. invalidParams := request.ErrInvalidParams{Context: "CreateRuleInput"}
  4088. if s.Actions == nil {
  4089. invalidParams.Add(request.NewErrParamRequired("Actions"))
  4090. }
  4091. if s.Conditions == nil {
  4092. invalidParams.Add(request.NewErrParamRequired("Conditions"))
  4093. }
  4094. if s.ListenerArn == nil {
  4095. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  4096. }
  4097. if s.Priority == nil {
  4098. invalidParams.Add(request.NewErrParamRequired("Priority"))
  4099. }
  4100. if s.Priority != nil && *s.Priority < 1 {
  4101. invalidParams.Add(request.NewErrParamMinValue("Priority", 1))
  4102. }
  4103. if s.Actions != nil {
  4104. for i, v := range s.Actions {
  4105. if v == nil {
  4106. continue
  4107. }
  4108. if err := v.Validate(); err != nil {
  4109. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Actions", i), err.(request.ErrInvalidParams))
  4110. }
  4111. }
  4112. }
  4113. if invalidParams.Len() > 0 {
  4114. return invalidParams
  4115. }
  4116. return nil
  4117. }
  4118. // SetActions sets the Actions field's value.
  4119. func (s *CreateRuleInput) SetActions(v []*Action) *CreateRuleInput {
  4120. s.Actions = v
  4121. return s
  4122. }
  4123. // SetConditions sets the Conditions field's value.
  4124. func (s *CreateRuleInput) SetConditions(v []*RuleCondition) *CreateRuleInput {
  4125. s.Conditions = v
  4126. return s
  4127. }
  4128. // SetListenerArn sets the ListenerArn field's value.
  4129. func (s *CreateRuleInput) SetListenerArn(v string) *CreateRuleInput {
  4130. s.ListenerArn = &v
  4131. return s
  4132. }
  4133. // SetPriority sets the Priority field's value.
  4134. func (s *CreateRuleInput) SetPriority(v int64) *CreateRuleInput {
  4135. s.Priority = &v
  4136. return s
  4137. }
  4138. type CreateRuleOutput struct {
  4139. _ struct{} `type:"structure"`
  4140. // Information about the rule.
  4141. Rules []*Rule `type:"list"`
  4142. }
  4143. // String returns the string representation
  4144. func (s CreateRuleOutput) String() string {
  4145. return awsutil.Prettify(s)
  4146. }
  4147. // GoString returns the string representation
  4148. func (s CreateRuleOutput) GoString() string {
  4149. return s.String()
  4150. }
  4151. // SetRules sets the Rules field's value.
  4152. func (s *CreateRuleOutput) SetRules(v []*Rule) *CreateRuleOutput {
  4153. s.Rules = v
  4154. return s
  4155. }
  4156. type CreateTargetGroupInput struct {
  4157. _ struct{} `type:"structure"`
  4158. // Indicates whether health checks are enabled. If the target type is instance
  4159. // or ip, the default is true. If the target type is lambda, the default is
  4160. // false.
  4161. HealthCheckEnabled *bool `type:"boolean"`
  4162. // The approximate amount of time, in seconds, between health checks of an individual
  4163. // target. For Application Load Balancers, the range is 5–300 seconds. For Network
  4164. // Load Balancers, the supported values are 10 or 30 seconds. If the target
  4165. // type is instance or ip, the default is 30 seconds. If the target type is
  4166. // lambda, the default is 35 seconds.
  4167. HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"`
  4168. // [HTTP/HTTPS health checks] The ping path that is the destination on the targets
  4169. // for health checks. The default is /.
  4170. HealthCheckPath *string `min:"1" type:"string"`
  4171. // The port the load balancer uses when performing health checks on targets.
  4172. // The default is traffic-port, which is the port on which each target receives
  4173. // traffic from the load balancer.
  4174. HealthCheckPort *string `type:"string"`
  4175. // The protocol the load balancer uses when performing health checks on targets.
  4176. // For Application Load Balancers, the default is HTTP. For Network Load Balancers,
  4177. // the default is TCP. The TCP protocol is supported for health checks only
  4178. // if the protocol of the target group is TCP or TLS. The TLS protocol is not
  4179. // supported for health checks.
  4180. HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"`
  4181. // The amount of time, in seconds, during which no response from a target means
  4182. // a failed health check. For Application Load Balancers, the range is 2–120
  4183. // seconds and the default is 5 seconds if the target type is instance or ip
  4184. // and 30 seconds if the target type is lambda. For Network Load Balancers,
  4185. // this is 10 seconds for TCP and HTTPS health checks and 6 seconds for HTTP
  4186. // health checks.
  4187. HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"`
  4188. // The number of consecutive health checks successes required before considering
  4189. // an unhealthy target healthy. For Application Load Balancers, the default
  4190. // is 5. For Network Load Balancers, the default is 3.
  4191. HealthyThresholdCount *int64 `min:"2" type:"integer"`
  4192. // [HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful
  4193. // response from a target.
  4194. Matcher *Matcher `type:"structure"`
  4195. // The name of the target group.
  4196. //
  4197. // This name must be unique per region per account, can have a maximum of 32
  4198. // characters, must contain only alphanumeric characters or hyphens, and must
  4199. // not begin or end with a hyphen.
  4200. //
  4201. // Name is a required field
  4202. Name *string `type:"string" required:"true"`
  4203. // The port on which the targets receive traffic. This port is used unless you
  4204. // specify a port override when registering the target. If the target is a Lambda
  4205. // function, this parameter does not apply.
  4206. Port *int64 `min:"1" type:"integer"`
  4207. // The protocol to use for routing traffic to the targets. For Application Load
  4208. // Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers,
  4209. // the supported protocols are TCP and TLS. If the target is a Lambda function,
  4210. // this parameter does not apply.
  4211. Protocol *string `type:"string" enum:"ProtocolEnum"`
  4212. // The type of target that you must specify when registering targets with this
  4213. // target group. You can't specify targets for a target group using more than
  4214. // one target type.
  4215. //
  4216. // * instance - Targets are specified by instance ID. This is the default
  4217. // value.
  4218. //
  4219. // * ip - Targets are specified by IP address. You can specify IP addresses
  4220. // from the subnets of the virtual private cloud (VPC) for the target group,
  4221. // the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and
  4222. // the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable
  4223. // IP addresses.
  4224. //
  4225. // * lambda - The target groups contains a single Lambda function.
  4226. TargetType *string `type:"string" enum:"TargetTypeEnum"`
  4227. // The number of consecutive health check failures required before considering
  4228. // a target unhealthy. For Application Load Balancers, the default is 2. For
  4229. // Network Load Balancers, this value must be the same as the healthy threshold
  4230. // count.
  4231. UnhealthyThresholdCount *int64 `min:"2" type:"integer"`
  4232. // The identifier of the virtual private cloud (VPC). If the target is a Lambda
  4233. // function, this parameter does not apply.
  4234. VpcId *string `type:"string"`
  4235. }
  4236. // String returns the string representation
  4237. func (s CreateTargetGroupInput) String() string {
  4238. return awsutil.Prettify(s)
  4239. }
  4240. // GoString returns the string representation
  4241. func (s CreateTargetGroupInput) GoString() string {
  4242. return s.String()
  4243. }
  4244. // Validate inspects the fields of the type to determine if they are valid.
  4245. func (s *CreateTargetGroupInput) Validate() error {
  4246. invalidParams := request.ErrInvalidParams{Context: "CreateTargetGroupInput"}
  4247. if s.HealthCheckIntervalSeconds != nil && *s.HealthCheckIntervalSeconds < 5 {
  4248. invalidParams.Add(request.NewErrParamMinValue("HealthCheckIntervalSeconds", 5))
  4249. }
  4250. if s.HealthCheckPath != nil && len(*s.HealthCheckPath) < 1 {
  4251. invalidParams.Add(request.NewErrParamMinLen("HealthCheckPath", 1))
  4252. }
  4253. if s.HealthCheckTimeoutSeconds != nil && *s.HealthCheckTimeoutSeconds < 2 {
  4254. invalidParams.Add(request.NewErrParamMinValue("HealthCheckTimeoutSeconds", 2))
  4255. }
  4256. if s.HealthyThresholdCount != nil && *s.HealthyThresholdCount < 2 {
  4257. invalidParams.Add(request.NewErrParamMinValue("HealthyThresholdCount", 2))
  4258. }
  4259. if s.Name == nil {
  4260. invalidParams.Add(request.NewErrParamRequired("Name"))
  4261. }
  4262. if s.Port != nil && *s.Port < 1 {
  4263. invalidParams.Add(request.NewErrParamMinValue("Port", 1))
  4264. }
  4265. if s.UnhealthyThresholdCount != nil && *s.UnhealthyThresholdCount < 2 {
  4266. invalidParams.Add(request.NewErrParamMinValue("UnhealthyThresholdCount", 2))
  4267. }
  4268. if s.Matcher != nil {
  4269. if err := s.Matcher.Validate(); err != nil {
  4270. invalidParams.AddNested("Matcher", err.(request.ErrInvalidParams))
  4271. }
  4272. }
  4273. if invalidParams.Len() > 0 {
  4274. return invalidParams
  4275. }
  4276. return nil
  4277. }
  4278. // SetHealthCheckEnabled sets the HealthCheckEnabled field's value.
  4279. func (s *CreateTargetGroupInput) SetHealthCheckEnabled(v bool) *CreateTargetGroupInput {
  4280. s.HealthCheckEnabled = &v
  4281. return s
  4282. }
  4283. // SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value.
  4284. func (s *CreateTargetGroupInput) SetHealthCheckIntervalSeconds(v int64) *CreateTargetGroupInput {
  4285. s.HealthCheckIntervalSeconds = &v
  4286. return s
  4287. }
  4288. // SetHealthCheckPath sets the HealthCheckPath field's value.
  4289. func (s *CreateTargetGroupInput) SetHealthCheckPath(v string) *CreateTargetGroupInput {
  4290. s.HealthCheckPath = &v
  4291. return s
  4292. }
  4293. // SetHealthCheckPort sets the HealthCheckPort field's value.
  4294. func (s *CreateTargetGroupInput) SetHealthCheckPort(v string) *CreateTargetGroupInput {
  4295. s.HealthCheckPort = &v
  4296. return s
  4297. }
  4298. // SetHealthCheckProtocol sets the HealthCheckProtocol field's value.
  4299. func (s *CreateTargetGroupInput) SetHealthCheckProtocol(v string) *CreateTargetGroupInput {
  4300. s.HealthCheckProtocol = &v
  4301. return s
  4302. }
  4303. // SetHealthCheckTimeoutSeconds sets the HealthCheckTimeoutSeconds field's value.
  4304. func (s *CreateTargetGroupInput) SetHealthCheckTimeoutSeconds(v int64) *CreateTargetGroupInput {
  4305. s.HealthCheckTimeoutSeconds = &v
  4306. return s
  4307. }
  4308. // SetHealthyThresholdCount sets the HealthyThresholdCount field's value.
  4309. func (s *CreateTargetGroupInput) SetHealthyThresholdCount(v int64) *CreateTargetGroupInput {
  4310. s.HealthyThresholdCount = &v
  4311. return s
  4312. }
  4313. // SetMatcher sets the Matcher field's value.
  4314. func (s *CreateTargetGroupInput) SetMatcher(v *Matcher) *CreateTargetGroupInput {
  4315. s.Matcher = v
  4316. return s
  4317. }
  4318. // SetName sets the Name field's value.
  4319. func (s *CreateTargetGroupInput) SetName(v string) *CreateTargetGroupInput {
  4320. s.Name = &v
  4321. return s
  4322. }
  4323. // SetPort sets the Port field's value.
  4324. func (s *CreateTargetGroupInput) SetPort(v int64) *CreateTargetGroupInput {
  4325. s.Port = &v
  4326. return s
  4327. }
  4328. // SetProtocol sets the Protocol field's value.
  4329. func (s *CreateTargetGroupInput) SetProtocol(v string) *CreateTargetGroupInput {
  4330. s.Protocol = &v
  4331. return s
  4332. }
  4333. // SetTargetType sets the TargetType field's value.
  4334. func (s *CreateTargetGroupInput) SetTargetType(v string) *CreateTargetGroupInput {
  4335. s.TargetType = &v
  4336. return s
  4337. }
  4338. // SetUnhealthyThresholdCount sets the UnhealthyThresholdCount field's value.
  4339. func (s *CreateTargetGroupInput) SetUnhealthyThresholdCount(v int64) *CreateTargetGroupInput {
  4340. s.UnhealthyThresholdCount = &v
  4341. return s
  4342. }
  4343. // SetVpcId sets the VpcId field's value.
  4344. func (s *CreateTargetGroupInput) SetVpcId(v string) *CreateTargetGroupInput {
  4345. s.VpcId = &v
  4346. return s
  4347. }
  4348. type CreateTargetGroupOutput struct {
  4349. _ struct{} `type:"structure"`
  4350. // Information about the target group.
  4351. TargetGroups []*TargetGroup `type:"list"`
  4352. }
  4353. // String returns the string representation
  4354. func (s CreateTargetGroupOutput) String() string {
  4355. return awsutil.Prettify(s)
  4356. }
  4357. // GoString returns the string representation
  4358. func (s CreateTargetGroupOutput) GoString() string {
  4359. return s.String()
  4360. }
  4361. // SetTargetGroups sets the TargetGroups field's value.
  4362. func (s *CreateTargetGroupOutput) SetTargetGroups(v []*TargetGroup) *CreateTargetGroupOutput {
  4363. s.TargetGroups = v
  4364. return s
  4365. }
  4366. type DeleteListenerInput struct {
  4367. _ struct{} `type:"structure"`
  4368. // The Amazon Resource Name (ARN) of the listener.
  4369. //
  4370. // ListenerArn is a required field
  4371. ListenerArn *string `type:"string" required:"true"`
  4372. }
  4373. // String returns the string representation
  4374. func (s DeleteListenerInput) String() string {
  4375. return awsutil.Prettify(s)
  4376. }
  4377. // GoString returns the string representation
  4378. func (s DeleteListenerInput) GoString() string {
  4379. return s.String()
  4380. }
  4381. // Validate inspects the fields of the type to determine if they are valid.
  4382. func (s *DeleteListenerInput) Validate() error {
  4383. invalidParams := request.ErrInvalidParams{Context: "DeleteListenerInput"}
  4384. if s.ListenerArn == nil {
  4385. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  4386. }
  4387. if invalidParams.Len() > 0 {
  4388. return invalidParams
  4389. }
  4390. return nil
  4391. }
  4392. // SetListenerArn sets the ListenerArn field's value.
  4393. func (s *DeleteListenerInput) SetListenerArn(v string) *DeleteListenerInput {
  4394. s.ListenerArn = &v
  4395. return s
  4396. }
  4397. type DeleteListenerOutput struct {
  4398. _ struct{} `type:"structure"`
  4399. }
  4400. // String returns the string representation
  4401. func (s DeleteListenerOutput) String() string {
  4402. return awsutil.Prettify(s)
  4403. }
  4404. // GoString returns the string representation
  4405. func (s DeleteListenerOutput) GoString() string {
  4406. return s.String()
  4407. }
  4408. type DeleteLoadBalancerInput struct {
  4409. _ struct{} `type:"structure"`
  4410. // The Amazon Resource Name (ARN) of the load balancer.
  4411. //
  4412. // LoadBalancerArn is a required field
  4413. LoadBalancerArn *string `type:"string" required:"true"`
  4414. }
  4415. // String returns the string representation
  4416. func (s DeleteLoadBalancerInput) String() string {
  4417. return awsutil.Prettify(s)
  4418. }
  4419. // GoString returns the string representation
  4420. func (s DeleteLoadBalancerInput) GoString() string {
  4421. return s.String()
  4422. }
  4423. // Validate inspects the fields of the type to determine if they are valid.
  4424. func (s *DeleteLoadBalancerInput) Validate() error {
  4425. invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerInput"}
  4426. if s.LoadBalancerArn == nil {
  4427. invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn"))
  4428. }
  4429. if invalidParams.Len() > 0 {
  4430. return invalidParams
  4431. }
  4432. return nil
  4433. }
  4434. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  4435. func (s *DeleteLoadBalancerInput) SetLoadBalancerArn(v string) *DeleteLoadBalancerInput {
  4436. s.LoadBalancerArn = &v
  4437. return s
  4438. }
  4439. type DeleteLoadBalancerOutput struct {
  4440. _ struct{} `type:"structure"`
  4441. }
  4442. // String returns the string representation
  4443. func (s DeleteLoadBalancerOutput) String() string {
  4444. return awsutil.Prettify(s)
  4445. }
  4446. // GoString returns the string representation
  4447. func (s DeleteLoadBalancerOutput) GoString() string {
  4448. return s.String()
  4449. }
  4450. type DeleteRuleInput struct {
  4451. _ struct{} `type:"structure"`
  4452. // The Amazon Resource Name (ARN) of the rule.
  4453. //
  4454. // RuleArn is a required field
  4455. RuleArn *string `type:"string" required:"true"`
  4456. }
  4457. // String returns the string representation
  4458. func (s DeleteRuleInput) String() string {
  4459. return awsutil.Prettify(s)
  4460. }
  4461. // GoString returns the string representation
  4462. func (s DeleteRuleInput) GoString() string {
  4463. return s.String()
  4464. }
  4465. // Validate inspects the fields of the type to determine if they are valid.
  4466. func (s *DeleteRuleInput) Validate() error {
  4467. invalidParams := request.ErrInvalidParams{Context: "DeleteRuleInput"}
  4468. if s.RuleArn == nil {
  4469. invalidParams.Add(request.NewErrParamRequired("RuleArn"))
  4470. }
  4471. if invalidParams.Len() > 0 {
  4472. return invalidParams
  4473. }
  4474. return nil
  4475. }
  4476. // SetRuleArn sets the RuleArn field's value.
  4477. func (s *DeleteRuleInput) SetRuleArn(v string) *DeleteRuleInput {
  4478. s.RuleArn = &v
  4479. return s
  4480. }
  4481. type DeleteRuleOutput struct {
  4482. _ struct{} `type:"structure"`
  4483. }
  4484. // String returns the string representation
  4485. func (s DeleteRuleOutput) String() string {
  4486. return awsutil.Prettify(s)
  4487. }
  4488. // GoString returns the string representation
  4489. func (s DeleteRuleOutput) GoString() string {
  4490. return s.String()
  4491. }
  4492. type DeleteTargetGroupInput struct {
  4493. _ struct{} `type:"structure"`
  4494. // The Amazon Resource Name (ARN) of the target group.
  4495. //
  4496. // TargetGroupArn is a required field
  4497. TargetGroupArn *string `type:"string" required:"true"`
  4498. }
  4499. // String returns the string representation
  4500. func (s DeleteTargetGroupInput) String() string {
  4501. return awsutil.Prettify(s)
  4502. }
  4503. // GoString returns the string representation
  4504. func (s DeleteTargetGroupInput) GoString() string {
  4505. return s.String()
  4506. }
  4507. // Validate inspects the fields of the type to determine if they are valid.
  4508. func (s *DeleteTargetGroupInput) Validate() error {
  4509. invalidParams := request.ErrInvalidParams{Context: "DeleteTargetGroupInput"}
  4510. if s.TargetGroupArn == nil {
  4511. invalidParams.Add(request.NewErrParamRequired("TargetGroupArn"))
  4512. }
  4513. if invalidParams.Len() > 0 {
  4514. return invalidParams
  4515. }
  4516. return nil
  4517. }
  4518. // SetTargetGroupArn sets the TargetGroupArn field's value.
  4519. func (s *DeleteTargetGroupInput) SetTargetGroupArn(v string) *DeleteTargetGroupInput {
  4520. s.TargetGroupArn = &v
  4521. return s
  4522. }
  4523. type DeleteTargetGroupOutput struct {
  4524. _ struct{} `type:"structure"`
  4525. }
  4526. // String returns the string representation
  4527. func (s DeleteTargetGroupOutput) String() string {
  4528. return awsutil.Prettify(s)
  4529. }
  4530. // GoString returns the string representation
  4531. func (s DeleteTargetGroupOutput) GoString() string {
  4532. return s.String()
  4533. }
  4534. type DeregisterTargetsInput struct {
  4535. _ struct{} `type:"structure"`
  4536. // The Amazon Resource Name (ARN) of the target group.
  4537. //
  4538. // TargetGroupArn is a required field
  4539. TargetGroupArn *string `type:"string" required:"true"`
  4540. // The targets. If you specified a port override when you registered a target,
  4541. // you must specify both the target ID and the port when you deregister it.
  4542. //
  4543. // Targets is a required field
  4544. Targets []*TargetDescription `type:"list" required:"true"`
  4545. }
  4546. // String returns the string representation
  4547. func (s DeregisterTargetsInput) String() string {
  4548. return awsutil.Prettify(s)
  4549. }
  4550. // GoString returns the string representation
  4551. func (s DeregisterTargetsInput) GoString() string {
  4552. return s.String()
  4553. }
  4554. // Validate inspects the fields of the type to determine if they are valid.
  4555. func (s *DeregisterTargetsInput) Validate() error {
  4556. invalidParams := request.ErrInvalidParams{Context: "DeregisterTargetsInput"}
  4557. if s.TargetGroupArn == nil {
  4558. invalidParams.Add(request.NewErrParamRequired("TargetGroupArn"))
  4559. }
  4560. if s.Targets == nil {
  4561. invalidParams.Add(request.NewErrParamRequired("Targets"))
  4562. }
  4563. if s.Targets != nil {
  4564. for i, v := range s.Targets {
  4565. if v == nil {
  4566. continue
  4567. }
  4568. if err := v.Validate(); err != nil {
  4569. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams))
  4570. }
  4571. }
  4572. }
  4573. if invalidParams.Len() > 0 {
  4574. return invalidParams
  4575. }
  4576. return nil
  4577. }
  4578. // SetTargetGroupArn sets the TargetGroupArn field's value.
  4579. func (s *DeregisterTargetsInput) SetTargetGroupArn(v string) *DeregisterTargetsInput {
  4580. s.TargetGroupArn = &v
  4581. return s
  4582. }
  4583. // SetTargets sets the Targets field's value.
  4584. func (s *DeregisterTargetsInput) SetTargets(v []*TargetDescription) *DeregisterTargetsInput {
  4585. s.Targets = v
  4586. return s
  4587. }
  4588. type DeregisterTargetsOutput struct {
  4589. _ struct{} `type:"structure"`
  4590. }
  4591. // String returns the string representation
  4592. func (s DeregisterTargetsOutput) String() string {
  4593. return awsutil.Prettify(s)
  4594. }
  4595. // GoString returns the string representation
  4596. func (s DeregisterTargetsOutput) GoString() string {
  4597. return s.String()
  4598. }
  4599. type DescribeAccountLimitsInput struct {
  4600. _ struct{} `type:"structure"`
  4601. // The marker for the next set of results. (You received this marker from a
  4602. // previous call.)
  4603. Marker *string `type:"string"`
  4604. // The maximum number of results to return with this call.
  4605. PageSize *int64 `min:"1" type:"integer"`
  4606. }
  4607. // String returns the string representation
  4608. func (s DescribeAccountLimitsInput) String() string {
  4609. return awsutil.Prettify(s)
  4610. }
  4611. // GoString returns the string representation
  4612. func (s DescribeAccountLimitsInput) GoString() string {
  4613. return s.String()
  4614. }
  4615. // Validate inspects the fields of the type to determine if they are valid.
  4616. func (s *DescribeAccountLimitsInput) Validate() error {
  4617. invalidParams := request.ErrInvalidParams{Context: "DescribeAccountLimitsInput"}
  4618. if s.PageSize != nil && *s.PageSize < 1 {
  4619. invalidParams.Add(request.NewErrParamMinValue("PageSize", 1))
  4620. }
  4621. if invalidParams.Len() > 0 {
  4622. return invalidParams
  4623. }
  4624. return nil
  4625. }
  4626. // SetMarker sets the Marker field's value.
  4627. func (s *DescribeAccountLimitsInput) SetMarker(v string) *DescribeAccountLimitsInput {
  4628. s.Marker = &v
  4629. return s
  4630. }
  4631. // SetPageSize sets the PageSize field's value.
  4632. func (s *DescribeAccountLimitsInput) SetPageSize(v int64) *DescribeAccountLimitsInput {
  4633. s.PageSize = &v
  4634. return s
  4635. }
  4636. type DescribeAccountLimitsOutput struct {
  4637. _ struct{} `type:"structure"`
  4638. // Information about the limits.
  4639. Limits []*Limit `type:"list"`
  4640. // The marker to use when requesting the next set of results. If there are no
  4641. // additional results, the string is empty.
  4642. NextMarker *string `type:"string"`
  4643. }
  4644. // String returns the string representation
  4645. func (s DescribeAccountLimitsOutput) String() string {
  4646. return awsutil.Prettify(s)
  4647. }
  4648. // GoString returns the string representation
  4649. func (s DescribeAccountLimitsOutput) GoString() string {
  4650. return s.String()
  4651. }
  4652. // SetLimits sets the Limits field's value.
  4653. func (s *DescribeAccountLimitsOutput) SetLimits(v []*Limit) *DescribeAccountLimitsOutput {
  4654. s.Limits = v
  4655. return s
  4656. }
  4657. // SetNextMarker sets the NextMarker field's value.
  4658. func (s *DescribeAccountLimitsOutput) SetNextMarker(v string) *DescribeAccountLimitsOutput {
  4659. s.NextMarker = &v
  4660. return s
  4661. }
  4662. type DescribeListenerCertificatesInput struct {
  4663. _ struct{} `type:"structure"`
  4664. // The Amazon Resource Names (ARN) of the listener.
  4665. //
  4666. // ListenerArn is a required field
  4667. ListenerArn *string `type:"string" required:"true"`
  4668. // The marker for the next set of results. (You received this marker from a
  4669. // previous call.)
  4670. Marker *string `type:"string"`
  4671. // The maximum number of results to return with this call.
  4672. PageSize *int64 `min:"1" type:"integer"`
  4673. }
  4674. // String returns the string representation
  4675. func (s DescribeListenerCertificatesInput) String() string {
  4676. return awsutil.Prettify(s)
  4677. }
  4678. // GoString returns the string representation
  4679. func (s DescribeListenerCertificatesInput) GoString() string {
  4680. return s.String()
  4681. }
  4682. // Validate inspects the fields of the type to determine if they are valid.
  4683. func (s *DescribeListenerCertificatesInput) Validate() error {
  4684. invalidParams := request.ErrInvalidParams{Context: "DescribeListenerCertificatesInput"}
  4685. if s.ListenerArn == nil {
  4686. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  4687. }
  4688. if s.PageSize != nil && *s.PageSize < 1 {
  4689. invalidParams.Add(request.NewErrParamMinValue("PageSize", 1))
  4690. }
  4691. if invalidParams.Len() > 0 {
  4692. return invalidParams
  4693. }
  4694. return nil
  4695. }
  4696. // SetListenerArn sets the ListenerArn field's value.
  4697. func (s *DescribeListenerCertificatesInput) SetListenerArn(v string) *DescribeListenerCertificatesInput {
  4698. s.ListenerArn = &v
  4699. return s
  4700. }
  4701. // SetMarker sets the Marker field's value.
  4702. func (s *DescribeListenerCertificatesInput) SetMarker(v string) *DescribeListenerCertificatesInput {
  4703. s.Marker = &v
  4704. return s
  4705. }
  4706. // SetPageSize sets the PageSize field's value.
  4707. func (s *DescribeListenerCertificatesInput) SetPageSize(v int64) *DescribeListenerCertificatesInput {
  4708. s.PageSize = &v
  4709. return s
  4710. }
  4711. type DescribeListenerCertificatesOutput struct {
  4712. _ struct{} `type:"structure"`
  4713. // Information about the certificates.
  4714. Certificates []*Certificate `type:"list"`
  4715. // The marker to use when requesting the next set of results. If there are no
  4716. // additional results, the string is empty.
  4717. NextMarker *string `type:"string"`
  4718. }
  4719. // String returns the string representation
  4720. func (s DescribeListenerCertificatesOutput) String() string {
  4721. return awsutil.Prettify(s)
  4722. }
  4723. // GoString returns the string representation
  4724. func (s DescribeListenerCertificatesOutput) GoString() string {
  4725. return s.String()
  4726. }
  4727. // SetCertificates sets the Certificates field's value.
  4728. func (s *DescribeListenerCertificatesOutput) SetCertificates(v []*Certificate) *DescribeListenerCertificatesOutput {
  4729. s.Certificates = v
  4730. return s
  4731. }
  4732. // SetNextMarker sets the NextMarker field's value.
  4733. func (s *DescribeListenerCertificatesOutput) SetNextMarker(v string) *DescribeListenerCertificatesOutput {
  4734. s.NextMarker = &v
  4735. return s
  4736. }
  4737. type DescribeListenersInput struct {
  4738. _ struct{} `type:"structure"`
  4739. // The Amazon Resource Names (ARN) of the listeners.
  4740. ListenerArns []*string `type:"list"`
  4741. // The Amazon Resource Name (ARN) of the load balancer.
  4742. LoadBalancerArn *string `type:"string"`
  4743. // The marker for the next set of results. (You received this marker from a
  4744. // previous call.)
  4745. Marker *string `type:"string"`
  4746. // The maximum number of results to return with this call.
  4747. PageSize *int64 `min:"1" type:"integer"`
  4748. }
  4749. // String returns the string representation
  4750. func (s DescribeListenersInput) String() string {
  4751. return awsutil.Prettify(s)
  4752. }
  4753. // GoString returns the string representation
  4754. func (s DescribeListenersInput) GoString() string {
  4755. return s.String()
  4756. }
  4757. // Validate inspects the fields of the type to determine if they are valid.
  4758. func (s *DescribeListenersInput) Validate() error {
  4759. invalidParams := request.ErrInvalidParams{Context: "DescribeListenersInput"}
  4760. if s.PageSize != nil && *s.PageSize < 1 {
  4761. invalidParams.Add(request.NewErrParamMinValue("PageSize", 1))
  4762. }
  4763. if invalidParams.Len() > 0 {
  4764. return invalidParams
  4765. }
  4766. return nil
  4767. }
  4768. // SetListenerArns sets the ListenerArns field's value.
  4769. func (s *DescribeListenersInput) SetListenerArns(v []*string) *DescribeListenersInput {
  4770. s.ListenerArns = v
  4771. return s
  4772. }
  4773. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  4774. func (s *DescribeListenersInput) SetLoadBalancerArn(v string) *DescribeListenersInput {
  4775. s.LoadBalancerArn = &v
  4776. return s
  4777. }
  4778. // SetMarker sets the Marker field's value.
  4779. func (s *DescribeListenersInput) SetMarker(v string) *DescribeListenersInput {
  4780. s.Marker = &v
  4781. return s
  4782. }
  4783. // SetPageSize sets the PageSize field's value.
  4784. func (s *DescribeListenersInput) SetPageSize(v int64) *DescribeListenersInput {
  4785. s.PageSize = &v
  4786. return s
  4787. }
  4788. type DescribeListenersOutput struct {
  4789. _ struct{} `type:"structure"`
  4790. // Information about the listeners.
  4791. Listeners []*Listener `type:"list"`
  4792. // The marker to use when requesting the next set of results. If there are no
  4793. // additional results, the string is empty.
  4794. NextMarker *string `type:"string"`
  4795. }
  4796. // String returns the string representation
  4797. func (s DescribeListenersOutput) String() string {
  4798. return awsutil.Prettify(s)
  4799. }
  4800. // GoString returns the string representation
  4801. func (s DescribeListenersOutput) GoString() string {
  4802. return s.String()
  4803. }
  4804. // SetListeners sets the Listeners field's value.
  4805. func (s *DescribeListenersOutput) SetListeners(v []*Listener) *DescribeListenersOutput {
  4806. s.Listeners = v
  4807. return s
  4808. }
  4809. // SetNextMarker sets the NextMarker field's value.
  4810. func (s *DescribeListenersOutput) SetNextMarker(v string) *DescribeListenersOutput {
  4811. s.NextMarker = &v
  4812. return s
  4813. }
  4814. type DescribeLoadBalancerAttributesInput struct {
  4815. _ struct{} `type:"structure"`
  4816. // The Amazon Resource Name (ARN) of the load balancer.
  4817. //
  4818. // LoadBalancerArn is a required field
  4819. LoadBalancerArn *string `type:"string" required:"true"`
  4820. }
  4821. // String returns the string representation
  4822. func (s DescribeLoadBalancerAttributesInput) String() string {
  4823. return awsutil.Prettify(s)
  4824. }
  4825. // GoString returns the string representation
  4826. func (s DescribeLoadBalancerAttributesInput) GoString() string {
  4827. return s.String()
  4828. }
  4829. // Validate inspects the fields of the type to determine if they are valid.
  4830. func (s *DescribeLoadBalancerAttributesInput) Validate() error {
  4831. invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancerAttributesInput"}
  4832. if s.LoadBalancerArn == nil {
  4833. invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn"))
  4834. }
  4835. if invalidParams.Len() > 0 {
  4836. return invalidParams
  4837. }
  4838. return nil
  4839. }
  4840. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  4841. func (s *DescribeLoadBalancerAttributesInput) SetLoadBalancerArn(v string) *DescribeLoadBalancerAttributesInput {
  4842. s.LoadBalancerArn = &v
  4843. return s
  4844. }
  4845. type DescribeLoadBalancerAttributesOutput struct {
  4846. _ struct{} `type:"structure"`
  4847. // Information about the load balancer attributes.
  4848. Attributes []*LoadBalancerAttribute `type:"list"`
  4849. }
  4850. // String returns the string representation
  4851. func (s DescribeLoadBalancerAttributesOutput) String() string {
  4852. return awsutil.Prettify(s)
  4853. }
  4854. // GoString returns the string representation
  4855. func (s DescribeLoadBalancerAttributesOutput) GoString() string {
  4856. return s.String()
  4857. }
  4858. // SetAttributes sets the Attributes field's value.
  4859. func (s *DescribeLoadBalancerAttributesOutput) SetAttributes(v []*LoadBalancerAttribute) *DescribeLoadBalancerAttributesOutput {
  4860. s.Attributes = v
  4861. return s
  4862. }
  4863. type DescribeLoadBalancersInput struct {
  4864. _ struct{} `type:"structure"`
  4865. // The Amazon Resource Names (ARN) of the load balancers. You can specify up
  4866. // to 20 load balancers in a single call.
  4867. LoadBalancerArns []*string `type:"list"`
  4868. // The marker for the next set of results. (You received this marker from a
  4869. // previous call.)
  4870. Marker *string `type:"string"`
  4871. // The names of the load balancers.
  4872. Names []*string `type:"list"`
  4873. // The maximum number of results to return with this call.
  4874. PageSize *int64 `min:"1" type:"integer"`
  4875. }
  4876. // String returns the string representation
  4877. func (s DescribeLoadBalancersInput) String() string {
  4878. return awsutil.Prettify(s)
  4879. }
  4880. // GoString returns the string representation
  4881. func (s DescribeLoadBalancersInput) GoString() string {
  4882. return s.String()
  4883. }
  4884. // Validate inspects the fields of the type to determine if they are valid.
  4885. func (s *DescribeLoadBalancersInput) Validate() error {
  4886. invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancersInput"}
  4887. if s.PageSize != nil && *s.PageSize < 1 {
  4888. invalidParams.Add(request.NewErrParamMinValue("PageSize", 1))
  4889. }
  4890. if invalidParams.Len() > 0 {
  4891. return invalidParams
  4892. }
  4893. return nil
  4894. }
  4895. // SetLoadBalancerArns sets the LoadBalancerArns field's value.
  4896. func (s *DescribeLoadBalancersInput) SetLoadBalancerArns(v []*string) *DescribeLoadBalancersInput {
  4897. s.LoadBalancerArns = v
  4898. return s
  4899. }
  4900. // SetMarker sets the Marker field's value.
  4901. func (s *DescribeLoadBalancersInput) SetMarker(v string) *DescribeLoadBalancersInput {
  4902. s.Marker = &v
  4903. return s
  4904. }
  4905. // SetNames sets the Names field's value.
  4906. func (s *DescribeLoadBalancersInput) SetNames(v []*string) *DescribeLoadBalancersInput {
  4907. s.Names = v
  4908. return s
  4909. }
  4910. // SetPageSize sets the PageSize field's value.
  4911. func (s *DescribeLoadBalancersInput) SetPageSize(v int64) *DescribeLoadBalancersInput {
  4912. s.PageSize = &v
  4913. return s
  4914. }
  4915. type DescribeLoadBalancersOutput struct {
  4916. _ struct{} `type:"structure"`
  4917. // Information about the load balancers.
  4918. LoadBalancers []*LoadBalancer `type:"list"`
  4919. // The marker to use when requesting the next set of results. If there are no
  4920. // additional results, the string is empty.
  4921. NextMarker *string `type:"string"`
  4922. }
  4923. // String returns the string representation
  4924. func (s DescribeLoadBalancersOutput) String() string {
  4925. return awsutil.Prettify(s)
  4926. }
  4927. // GoString returns the string representation
  4928. func (s DescribeLoadBalancersOutput) GoString() string {
  4929. return s.String()
  4930. }
  4931. // SetLoadBalancers sets the LoadBalancers field's value.
  4932. func (s *DescribeLoadBalancersOutput) SetLoadBalancers(v []*LoadBalancer) *DescribeLoadBalancersOutput {
  4933. s.LoadBalancers = v
  4934. return s
  4935. }
  4936. // SetNextMarker sets the NextMarker field's value.
  4937. func (s *DescribeLoadBalancersOutput) SetNextMarker(v string) *DescribeLoadBalancersOutput {
  4938. s.NextMarker = &v
  4939. return s
  4940. }
  4941. type DescribeRulesInput struct {
  4942. _ struct{} `type:"structure"`
  4943. // The Amazon Resource Name (ARN) of the listener.
  4944. ListenerArn *string `type:"string"`
  4945. // The marker for the next set of results. (You received this marker from a
  4946. // previous call.)
  4947. Marker *string `type:"string"`
  4948. // The maximum number of results to return with this call.
  4949. PageSize *int64 `min:"1" type:"integer"`
  4950. // The Amazon Resource Names (ARN) of the rules.
  4951. RuleArns []*string `type:"list"`
  4952. }
  4953. // String returns the string representation
  4954. func (s DescribeRulesInput) String() string {
  4955. return awsutil.Prettify(s)
  4956. }
  4957. // GoString returns the string representation
  4958. func (s DescribeRulesInput) GoString() string {
  4959. return s.String()
  4960. }
  4961. // Validate inspects the fields of the type to determine if they are valid.
  4962. func (s *DescribeRulesInput) Validate() error {
  4963. invalidParams := request.ErrInvalidParams{Context: "DescribeRulesInput"}
  4964. if s.PageSize != nil && *s.PageSize < 1 {
  4965. invalidParams.Add(request.NewErrParamMinValue("PageSize", 1))
  4966. }
  4967. if invalidParams.Len() > 0 {
  4968. return invalidParams
  4969. }
  4970. return nil
  4971. }
  4972. // SetListenerArn sets the ListenerArn field's value.
  4973. func (s *DescribeRulesInput) SetListenerArn(v string) *DescribeRulesInput {
  4974. s.ListenerArn = &v
  4975. return s
  4976. }
  4977. // SetMarker sets the Marker field's value.
  4978. func (s *DescribeRulesInput) SetMarker(v string) *DescribeRulesInput {
  4979. s.Marker = &v
  4980. return s
  4981. }
  4982. // SetPageSize sets the PageSize field's value.
  4983. func (s *DescribeRulesInput) SetPageSize(v int64) *DescribeRulesInput {
  4984. s.PageSize = &v
  4985. return s
  4986. }
  4987. // SetRuleArns sets the RuleArns field's value.
  4988. func (s *DescribeRulesInput) SetRuleArns(v []*string) *DescribeRulesInput {
  4989. s.RuleArns = v
  4990. return s
  4991. }
  4992. type DescribeRulesOutput struct {
  4993. _ struct{} `type:"structure"`
  4994. // The marker to use when requesting the next set of results. If there are no
  4995. // additional results, the string is empty.
  4996. NextMarker *string `type:"string"`
  4997. // Information about the rules.
  4998. Rules []*Rule `type:"list"`
  4999. }
  5000. // String returns the string representation
  5001. func (s DescribeRulesOutput) String() string {
  5002. return awsutil.Prettify(s)
  5003. }
  5004. // GoString returns the string representation
  5005. func (s DescribeRulesOutput) GoString() string {
  5006. return s.String()
  5007. }
  5008. // SetNextMarker sets the NextMarker field's value.
  5009. func (s *DescribeRulesOutput) SetNextMarker(v string) *DescribeRulesOutput {
  5010. s.NextMarker = &v
  5011. return s
  5012. }
  5013. // SetRules sets the Rules field's value.
  5014. func (s *DescribeRulesOutput) SetRules(v []*Rule) *DescribeRulesOutput {
  5015. s.Rules = v
  5016. return s
  5017. }
  5018. type DescribeSSLPoliciesInput struct {
  5019. _ struct{} `type:"structure"`
  5020. // The marker for the next set of results. (You received this marker from a
  5021. // previous call.)
  5022. Marker *string `type:"string"`
  5023. // The names of the policies.
  5024. Names []*string `type:"list"`
  5025. // The maximum number of results to return with this call.
  5026. PageSize *int64 `min:"1" type:"integer"`
  5027. }
  5028. // String returns the string representation
  5029. func (s DescribeSSLPoliciesInput) String() string {
  5030. return awsutil.Prettify(s)
  5031. }
  5032. // GoString returns the string representation
  5033. func (s DescribeSSLPoliciesInput) GoString() string {
  5034. return s.String()
  5035. }
  5036. // Validate inspects the fields of the type to determine if they are valid.
  5037. func (s *DescribeSSLPoliciesInput) Validate() error {
  5038. invalidParams := request.ErrInvalidParams{Context: "DescribeSSLPoliciesInput"}
  5039. if s.PageSize != nil && *s.PageSize < 1 {
  5040. invalidParams.Add(request.NewErrParamMinValue("PageSize", 1))
  5041. }
  5042. if invalidParams.Len() > 0 {
  5043. return invalidParams
  5044. }
  5045. return nil
  5046. }
  5047. // SetMarker sets the Marker field's value.
  5048. func (s *DescribeSSLPoliciesInput) SetMarker(v string) *DescribeSSLPoliciesInput {
  5049. s.Marker = &v
  5050. return s
  5051. }
  5052. // SetNames sets the Names field's value.
  5053. func (s *DescribeSSLPoliciesInput) SetNames(v []*string) *DescribeSSLPoliciesInput {
  5054. s.Names = v
  5055. return s
  5056. }
  5057. // SetPageSize sets the PageSize field's value.
  5058. func (s *DescribeSSLPoliciesInput) SetPageSize(v int64) *DescribeSSLPoliciesInput {
  5059. s.PageSize = &v
  5060. return s
  5061. }
  5062. type DescribeSSLPoliciesOutput struct {
  5063. _ struct{} `type:"structure"`
  5064. // The marker to use when requesting the next set of results. If there are no
  5065. // additional results, the string is empty.
  5066. NextMarker *string `type:"string"`
  5067. // Information about the policies.
  5068. SslPolicies []*SslPolicy `type:"list"`
  5069. }
  5070. // String returns the string representation
  5071. func (s DescribeSSLPoliciesOutput) String() string {
  5072. return awsutil.Prettify(s)
  5073. }
  5074. // GoString returns the string representation
  5075. func (s DescribeSSLPoliciesOutput) GoString() string {
  5076. return s.String()
  5077. }
  5078. // SetNextMarker sets the NextMarker field's value.
  5079. func (s *DescribeSSLPoliciesOutput) SetNextMarker(v string) *DescribeSSLPoliciesOutput {
  5080. s.NextMarker = &v
  5081. return s
  5082. }
  5083. // SetSslPolicies sets the SslPolicies field's value.
  5084. func (s *DescribeSSLPoliciesOutput) SetSslPolicies(v []*SslPolicy) *DescribeSSLPoliciesOutput {
  5085. s.SslPolicies = v
  5086. return s
  5087. }
  5088. type DescribeTagsInput struct {
  5089. _ struct{} `type:"structure"`
  5090. // The Amazon Resource Names (ARN) of the resources.
  5091. //
  5092. // ResourceArns is a required field
  5093. ResourceArns []*string `type:"list" required:"true"`
  5094. }
  5095. // String returns the string representation
  5096. func (s DescribeTagsInput) String() string {
  5097. return awsutil.Prettify(s)
  5098. }
  5099. // GoString returns the string representation
  5100. func (s DescribeTagsInput) GoString() string {
  5101. return s.String()
  5102. }
  5103. // Validate inspects the fields of the type to determine if they are valid.
  5104. func (s *DescribeTagsInput) Validate() error {
  5105. invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"}
  5106. if s.ResourceArns == nil {
  5107. invalidParams.Add(request.NewErrParamRequired("ResourceArns"))
  5108. }
  5109. if invalidParams.Len() > 0 {
  5110. return invalidParams
  5111. }
  5112. return nil
  5113. }
  5114. // SetResourceArns sets the ResourceArns field's value.
  5115. func (s *DescribeTagsInput) SetResourceArns(v []*string) *DescribeTagsInput {
  5116. s.ResourceArns = v
  5117. return s
  5118. }
  5119. type DescribeTagsOutput struct {
  5120. _ struct{} `type:"structure"`
  5121. // Information about the tags.
  5122. TagDescriptions []*TagDescription `type:"list"`
  5123. }
  5124. // String returns the string representation
  5125. func (s DescribeTagsOutput) String() string {
  5126. return awsutil.Prettify(s)
  5127. }
  5128. // GoString returns the string representation
  5129. func (s DescribeTagsOutput) GoString() string {
  5130. return s.String()
  5131. }
  5132. // SetTagDescriptions sets the TagDescriptions field's value.
  5133. func (s *DescribeTagsOutput) SetTagDescriptions(v []*TagDescription) *DescribeTagsOutput {
  5134. s.TagDescriptions = v
  5135. return s
  5136. }
  5137. type DescribeTargetGroupAttributesInput struct {
  5138. _ struct{} `type:"structure"`
  5139. // The Amazon Resource Name (ARN) of the target group.
  5140. //
  5141. // TargetGroupArn is a required field
  5142. TargetGroupArn *string `type:"string" required:"true"`
  5143. }
  5144. // String returns the string representation
  5145. func (s DescribeTargetGroupAttributesInput) String() string {
  5146. return awsutil.Prettify(s)
  5147. }
  5148. // GoString returns the string representation
  5149. func (s DescribeTargetGroupAttributesInput) GoString() string {
  5150. return s.String()
  5151. }
  5152. // Validate inspects the fields of the type to determine if they are valid.
  5153. func (s *DescribeTargetGroupAttributesInput) Validate() error {
  5154. invalidParams := request.ErrInvalidParams{Context: "DescribeTargetGroupAttributesInput"}
  5155. if s.TargetGroupArn == nil {
  5156. invalidParams.Add(request.NewErrParamRequired("TargetGroupArn"))
  5157. }
  5158. if invalidParams.Len() > 0 {
  5159. return invalidParams
  5160. }
  5161. return nil
  5162. }
  5163. // SetTargetGroupArn sets the TargetGroupArn field's value.
  5164. func (s *DescribeTargetGroupAttributesInput) SetTargetGroupArn(v string) *DescribeTargetGroupAttributesInput {
  5165. s.TargetGroupArn = &v
  5166. return s
  5167. }
  5168. type DescribeTargetGroupAttributesOutput struct {
  5169. _ struct{} `type:"structure"`
  5170. // Information about the target group attributes
  5171. Attributes []*TargetGroupAttribute `type:"list"`
  5172. }
  5173. // String returns the string representation
  5174. func (s DescribeTargetGroupAttributesOutput) String() string {
  5175. return awsutil.Prettify(s)
  5176. }
  5177. // GoString returns the string representation
  5178. func (s DescribeTargetGroupAttributesOutput) GoString() string {
  5179. return s.String()
  5180. }
  5181. // SetAttributes sets the Attributes field's value.
  5182. func (s *DescribeTargetGroupAttributesOutput) SetAttributes(v []*TargetGroupAttribute) *DescribeTargetGroupAttributesOutput {
  5183. s.Attributes = v
  5184. return s
  5185. }
  5186. type DescribeTargetGroupsInput struct {
  5187. _ struct{} `type:"structure"`
  5188. // The Amazon Resource Name (ARN) of the load balancer.
  5189. LoadBalancerArn *string `type:"string"`
  5190. // The marker for the next set of results. (You received this marker from a
  5191. // previous call.)
  5192. Marker *string `type:"string"`
  5193. // The names of the target groups.
  5194. Names []*string `type:"list"`
  5195. // The maximum number of results to return with this call.
  5196. PageSize *int64 `min:"1" type:"integer"`
  5197. // The Amazon Resource Names (ARN) of the target groups.
  5198. TargetGroupArns []*string `type:"list"`
  5199. }
  5200. // String returns the string representation
  5201. func (s DescribeTargetGroupsInput) String() string {
  5202. return awsutil.Prettify(s)
  5203. }
  5204. // GoString returns the string representation
  5205. func (s DescribeTargetGroupsInput) GoString() string {
  5206. return s.String()
  5207. }
  5208. // Validate inspects the fields of the type to determine if they are valid.
  5209. func (s *DescribeTargetGroupsInput) Validate() error {
  5210. invalidParams := request.ErrInvalidParams{Context: "DescribeTargetGroupsInput"}
  5211. if s.PageSize != nil && *s.PageSize < 1 {
  5212. invalidParams.Add(request.NewErrParamMinValue("PageSize", 1))
  5213. }
  5214. if invalidParams.Len() > 0 {
  5215. return invalidParams
  5216. }
  5217. return nil
  5218. }
  5219. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  5220. func (s *DescribeTargetGroupsInput) SetLoadBalancerArn(v string) *DescribeTargetGroupsInput {
  5221. s.LoadBalancerArn = &v
  5222. return s
  5223. }
  5224. // SetMarker sets the Marker field's value.
  5225. func (s *DescribeTargetGroupsInput) SetMarker(v string) *DescribeTargetGroupsInput {
  5226. s.Marker = &v
  5227. return s
  5228. }
  5229. // SetNames sets the Names field's value.
  5230. func (s *DescribeTargetGroupsInput) SetNames(v []*string) *DescribeTargetGroupsInput {
  5231. s.Names = v
  5232. return s
  5233. }
  5234. // SetPageSize sets the PageSize field's value.
  5235. func (s *DescribeTargetGroupsInput) SetPageSize(v int64) *DescribeTargetGroupsInput {
  5236. s.PageSize = &v
  5237. return s
  5238. }
  5239. // SetTargetGroupArns sets the TargetGroupArns field's value.
  5240. func (s *DescribeTargetGroupsInput) SetTargetGroupArns(v []*string) *DescribeTargetGroupsInput {
  5241. s.TargetGroupArns = v
  5242. return s
  5243. }
  5244. type DescribeTargetGroupsOutput struct {
  5245. _ struct{} `type:"structure"`
  5246. // The marker to use when requesting the next set of results. If there are no
  5247. // additional results, the string is empty.
  5248. NextMarker *string `type:"string"`
  5249. // Information about the target groups.
  5250. TargetGroups []*TargetGroup `type:"list"`
  5251. }
  5252. // String returns the string representation
  5253. func (s DescribeTargetGroupsOutput) String() string {
  5254. return awsutil.Prettify(s)
  5255. }
  5256. // GoString returns the string representation
  5257. func (s DescribeTargetGroupsOutput) GoString() string {
  5258. return s.String()
  5259. }
  5260. // SetNextMarker sets the NextMarker field's value.
  5261. func (s *DescribeTargetGroupsOutput) SetNextMarker(v string) *DescribeTargetGroupsOutput {
  5262. s.NextMarker = &v
  5263. return s
  5264. }
  5265. // SetTargetGroups sets the TargetGroups field's value.
  5266. func (s *DescribeTargetGroupsOutput) SetTargetGroups(v []*TargetGroup) *DescribeTargetGroupsOutput {
  5267. s.TargetGroups = v
  5268. return s
  5269. }
  5270. type DescribeTargetHealthInput struct {
  5271. _ struct{} `type:"structure"`
  5272. // The Amazon Resource Name (ARN) of the target group.
  5273. //
  5274. // TargetGroupArn is a required field
  5275. TargetGroupArn *string `type:"string" required:"true"`
  5276. // The targets.
  5277. Targets []*TargetDescription `type:"list"`
  5278. }
  5279. // String returns the string representation
  5280. func (s DescribeTargetHealthInput) String() string {
  5281. return awsutil.Prettify(s)
  5282. }
  5283. // GoString returns the string representation
  5284. func (s DescribeTargetHealthInput) GoString() string {
  5285. return s.String()
  5286. }
  5287. // Validate inspects the fields of the type to determine if they are valid.
  5288. func (s *DescribeTargetHealthInput) Validate() error {
  5289. invalidParams := request.ErrInvalidParams{Context: "DescribeTargetHealthInput"}
  5290. if s.TargetGroupArn == nil {
  5291. invalidParams.Add(request.NewErrParamRequired("TargetGroupArn"))
  5292. }
  5293. if s.Targets != nil {
  5294. for i, v := range s.Targets {
  5295. if v == nil {
  5296. continue
  5297. }
  5298. if err := v.Validate(); err != nil {
  5299. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams))
  5300. }
  5301. }
  5302. }
  5303. if invalidParams.Len() > 0 {
  5304. return invalidParams
  5305. }
  5306. return nil
  5307. }
  5308. // SetTargetGroupArn sets the TargetGroupArn field's value.
  5309. func (s *DescribeTargetHealthInput) SetTargetGroupArn(v string) *DescribeTargetHealthInput {
  5310. s.TargetGroupArn = &v
  5311. return s
  5312. }
  5313. // SetTargets sets the Targets field's value.
  5314. func (s *DescribeTargetHealthInput) SetTargets(v []*TargetDescription) *DescribeTargetHealthInput {
  5315. s.Targets = v
  5316. return s
  5317. }
  5318. type DescribeTargetHealthOutput struct {
  5319. _ struct{} `type:"structure"`
  5320. // Information about the health of the targets.
  5321. TargetHealthDescriptions []*TargetHealthDescription `type:"list"`
  5322. }
  5323. // String returns the string representation
  5324. func (s DescribeTargetHealthOutput) String() string {
  5325. return awsutil.Prettify(s)
  5326. }
  5327. // GoString returns the string representation
  5328. func (s DescribeTargetHealthOutput) GoString() string {
  5329. return s.String()
  5330. }
  5331. // SetTargetHealthDescriptions sets the TargetHealthDescriptions field's value.
  5332. func (s *DescribeTargetHealthOutput) SetTargetHealthDescriptions(v []*TargetHealthDescription) *DescribeTargetHealthOutput {
  5333. s.TargetHealthDescriptions = v
  5334. return s
  5335. }
  5336. // Information about an action that returns a custom HTTP response.
  5337. type FixedResponseActionConfig struct {
  5338. _ struct{} `type:"structure"`
  5339. // The content type.
  5340. //
  5341. // Valid Values: text/plain | text/css | text/html | application/javascript
  5342. // | application/json
  5343. ContentType *string `type:"string"`
  5344. // The message.
  5345. MessageBody *string `type:"string"`
  5346. // The HTTP response code (2XX, 4XX, or 5XX).
  5347. //
  5348. // StatusCode is a required field
  5349. StatusCode *string `type:"string" required:"true"`
  5350. }
  5351. // String returns the string representation
  5352. func (s FixedResponseActionConfig) String() string {
  5353. return awsutil.Prettify(s)
  5354. }
  5355. // GoString returns the string representation
  5356. func (s FixedResponseActionConfig) GoString() string {
  5357. return s.String()
  5358. }
  5359. // Validate inspects the fields of the type to determine if they are valid.
  5360. func (s *FixedResponseActionConfig) Validate() error {
  5361. invalidParams := request.ErrInvalidParams{Context: "FixedResponseActionConfig"}
  5362. if s.StatusCode == nil {
  5363. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  5364. }
  5365. if invalidParams.Len() > 0 {
  5366. return invalidParams
  5367. }
  5368. return nil
  5369. }
  5370. // SetContentType sets the ContentType field's value.
  5371. func (s *FixedResponseActionConfig) SetContentType(v string) *FixedResponseActionConfig {
  5372. s.ContentType = &v
  5373. return s
  5374. }
  5375. // SetMessageBody sets the MessageBody field's value.
  5376. func (s *FixedResponseActionConfig) SetMessageBody(v string) *FixedResponseActionConfig {
  5377. s.MessageBody = &v
  5378. return s
  5379. }
  5380. // SetStatusCode sets the StatusCode field's value.
  5381. func (s *FixedResponseActionConfig) SetStatusCode(v string) *FixedResponseActionConfig {
  5382. s.StatusCode = &v
  5383. return s
  5384. }
  5385. // Information about an Elastic Load Balancing resource limit for your AWS account.
  5386. type Limit struct {
  5387. _ struct{} `type:"structure"`
  5388. // The maximum value of the limit.
  5389. Max *string `type:"string"`
  5390. // The name of the limit. The possible values are:
  5391. //
  5392. // * application-load-balancers
  5393. //
  5394. // * listeners-per-application-load-balancer
  5395. //
  5396. // * listeners-per-network-load-balancer
  5397. //
  5398. // * network-load-balancers
  5399. //
  5400. // * rules-per-application-load-balancer
  5401. //
  5402. // * target-groups
  5403. //
  5404. // * targets-per-application-load-balancer
  5405. //
  5406. // * targets-per-availability-zone-per-network-load-balancer
  5407. //
  5408. // * targets-per-network-load-balancer
  5409. Name *string `type:"string"`
  5410. }
  5411. // String returns the string representation
  5412. func (s Limit) String() string {
  5413. return awsutil.Prettify(s)
  5414. }
  5415. // GoString returns the string representation
  5416. func (s Limit) GoString() string {
  5417. return s.String()
  5418. }
  5419. // SetMax sets the Max field's value.
  5420. func (s *Limit) SetMax(v string) *Limit {
  5421. s.Max = &v
  5422. return s
  5423. }
  5424. // SetName sets the Name field's value.
  5425. func (s *Limit) SetName(v string) *Limit {
  5426. s.Name = &v
  5427. return s
  5428. }
  5429. // Information about a listener.
  5430. type Listener struct {
  5431. _ struct{} `type:"structure"`
  5432. // The SSL server certificate. You must provide a certificate if the protocol
  5433. // is HTTPS or TLS.
  5434. Certificates []*Certificate `type:"list"`
  5435. // The default actions for the listener.
  5436. DefaultActions []*Action `type:"list"`
  5437. // The Amazon Resource Name (ARN) of the listener.
  5438. ListenerArn *string `type:"string"`
  5439. // The Amazon Resource Name (ARN) of the load balancer.
  5440. LoadBalancerArn *string `type:"string"`
  5441. // The port on which the load balancer is listening.
  5442. Port *int64 `min:"1" type:"integer"`
  5443. // The protocol for connections from clients to the load balancer.
  5444. Protocol *string `type:"string" enum:"ProtocolEnum"`
  5445. // The security policy that defines which ciphers and protocols are supported.
  5446. // The default is the current predefined security policy.
  5447. SslPolicy *string `type:"string"`
  5448. }
  5449. // String returns the string representation
  5450. func (s Listener) String() string {
  5451. return awsutil.Prettify(s)
  5452. }
  5453. // GoString returns the string representation
  5454. func (s Listener) GoString() string {
  5455. return s.String()
  5456. }
  5457. // SetCertificates sets the Certificates field's value.
  5458. func (s *Listener) SetCertificates(v []*Certificate) *Listener {
  5459. s.Certificates = v
  5460. return s
  5461. }
  5462. // SetDefaultActions sets the DefaultActions field's value.
  5463. func (s *Listener) SetDefaultActions(v []*Action) *Listener {
  5464. s.DefaultActions = v
  5465. return s
  5466. }
  5467. // SetListenerArn sets the ListenerArn field's value.
  5468. func (s *Listener) SetListenerArn(v string) *Listener {
  5469. s.ListenerArn = &v
  5470. return s
  5471. }
  5472. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  5473. func (s *Listener) SetLoadBalancerArn(v string) *Listener {
  5474. s.LoadBalancerArn = &v
  5475. return s
  5476. }
  5477. // SetPort sets the Port field's value.
  5478. func (s *Listener) SetPort(v int64) *Listener {
  5479. s.Port = &v
  5480. return s
  5481. }
  5482. // SetProtocol sets the Protocol field's value.
  5483. func (s *Listener) SetProtocol(v string) *Listener {
  5484. s.Protocol = &v
  5485. return s
  5486. }
  5487. // SetSslPolicy sets the SslPolicy field's value.
  5488. func (s *Listener) SetSslPolicy(v string) *Listener {
  5489. s.SslPolicy = &v
  5490. return s
  5491. }
  5492. // Information about a load balancer.
  5493. type LoadBalancer struct {
  5494. _ struct{} `type:"structure"`
  5495. // The Availability Zones for the load balancer.
  5496. AvailabilityZones []*AvailabilityZone `type:"list"`
  5497. // The ID of the Amazon Route 53 hosted zone associated with the load balancer.
  5498. CanonicalHostedZoneId *string `type:"string"`
  5499. // The date and time the load balancer was created.
  5500. CreatedTime *time.Time `type:"timestamp"`
  5501. // The public DNS name of the load balancer.
  5502. DNSName *string `type:"string"`
  5503. // The type of IP addresses used by the subnets for your load balancer. The
  5504. // possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and
  5505. // IPv6 addresses).
  5506. IpAddressType *string `type:"string" enum:"IpAddressType"`
  5507. // The Amazon Resource Name (ARN) of the load balancer.
  5508. LoadBalancerArn *string `type:"string"`
  5509. // The name of the load balancer.
  5510. LoadBalancerName *string `type:"string"`
  5511. // The nodes of an Internet-facing load balancer have public IP addresses. The
  5512. // DNS name of an Internet-facing load balancer is publicly resolvable to the
  5513. // public IP addresses of the nodes. Therefore, Internet-facing load balancers
  5514. // can route requests from clients over the internet.
  5515. //
  5516. // The nodes of an internal load balancer have only private IP addresses. The
  5517. // DNS name of an internal load balancer is publicly resolvable to the private
  5518. // IP addresses of the nodes. Therefore, internal load balancers can only route
  5519. // requests from clients with access to the VPC for the load balancer.
  5520. Scheme *string `type:"string" enum:"LoadBalancerSchemeEnum"`
  5521. // The IDs of the security groups for the load balancer.
  5522. SecurityGroups []*string `type:"list"`
  5523. // The state of the load balancer.
  5524. State *LoadBalancerState `type:"structure"`
  5525. // The type of load balancer.
  5526. Type *string `type:"string" enum:"LoadBalancerTypeEnum"`
  5527. // The ID of the VPC for the load balancer.
  5528. VpcId *string `type:"string"`
  5529. }
  5530. // String returns the string representation
  5531. func (s LoadBalancer) String() string {
  5532. return awsutil.Prettify(s)
  5533. }
  5534. // GoString returns the string representation
  5535. func (s LoadBalancer) GoString() string {
  5536. return s.String()
  5537. }
  5538. // SetAvailabilityZones sets the AvailabilityZones field's value.
  5539. func (s *LoadBalancer) SetAvailabilityZones(v []*AvailabilityZone) *LoadBalancer {
  5540. s.AvailabilityZones = v
  5541. return s
  5542. }
  5543. // SetCanonicalHostedZoneId sets the CanonicalHostedZoneId field's value.
  5544. func (s *LoadBalancer) SetCanonicalHostedZoneId(v string) *LoadBalancer {
  5545. s.CanonicalHostedZoneId = &v
  5546. return s
  5547. }
  5548. // SetCreatedTime sets the CreatedTime field's value.
  5549. func (s *LoadBalancer) SetCreatedTime(v time.Time) *LoadBalancer {
  5550. s.CreatedTime = &v
  5551. return s
  5552. }
  5553. // SetDNSName sets the DNSName field's value.
  5554. func (s *LoadBalancer) SetDNSName(v string) *LoadBalancer {
  5555. s.DNSName = &v
  5556. return s
  5557. }
  5558. // SetIpAddressType sets the IpAddressType field's value.
  5559. func (s *LoadBalancer) SetIpAddressType(v string) *LoadBalancer {
  5560. s.IpAddressType = &v
  5561. return s
  5562. }
  5563. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  5564. func (s *LoadBalancer) SetLoadBalancerArn(v string) *LoadBalancer {
  5565. s.LoadBalancerArn = &v
  5566. return s
  5567. }
  5568. // SetLoadBalancerName sets the LoadBalancerName field's value.
  5569. func (s *LoadBalancer) SetLoadBalancerName(v string) *LoadBalancer {
  5570. s.LoadBalancerName = &v
  5571. return s
  5572. }
  5573. // SetScheme sets the Scheme field's value.
  5574. func (s *LoadBalancer) SetScheme(v string) *LoadBalancer {
  5575. s.Scheme = &v
  5576. return s
  5577. }
  5578. // SetSecurityGroups sets the SecurityGroups field's value.
  5579. func (s *LoadBalancer) SetSecurityGroups(v []*string) *LoadBalancer {
  5580. s.SecurityGroups = v
  5581. return s
  5582. }
  5583. // SetState sets the State field's value.
  5584. func (s *LoadBalancer) SetState(v *LoadBalancerState) *LoadBalancer {
  5585. s.State = v
  5586. return s
  5587. }
  5588. // SetType sets the Type field's value.
  5589. func (s *LoadBalancer) SetType(v string) *LoadBalancer {
  5590. s.Type = &v
  5591. return s
  5592. }
  5593. // SetVpcId sets the VpcId field's value.
  5594. func (s *LoadBalancer) SetVpcId(v string) *LoadBalancer {
  5595. s.VpcId = &v
  5596. return s
  5597. }
  5598. // Information about a static IP address for a load balancer.
  5599. type LoadBalancerAddress struct {
  5600. _ struct{} `type:"structure"`
  5601. // [Network Load Balancers] The allocation ID of the Elastic IP address.
  5602. AllocationId *string `type:"string"`
  5603. // The static IP address.
  5604. IpAddress *string `type:"string"`
  5605. }
  5606. // String returns the string representation
  5607. func (s LoadBalancerAddress) String() string {
  5608. return awsutil.Prettify(s)
  5609. }
  5610. // GoString returns the string representation
  5611. func (s LoadBalancerAddress) GoString() string {
  5612. return s.String()
  5613. }
  5614. // SetAllocationId sets the AllocationId field's value.
  5615. func (s *LoadBalancerAddress) SetAllocationId(v string) *LoadBalancerAddress {
  5616. s.AllocationId = &v
  5617. return s
  5618. }
  5619. // SetIpAddress sets the IpAddress field's value.
  5620. func (s *LoadBalancerAddress) SetIpAddress(v string) *LoadBalancerAddress {
  5621. s.IpAddress = &v
  5622. return s
  5623. }
  5624. // Information about a load balancer attribute.
  5625. type LoadBalancerAttribute struct {
  5626. _ struct{} `type:"structure"`
  5627. // The name of the attribute.
  5628. //
  5629. // The following attributes are supported by both Application Load Balancers
  5630. // and Network Load Balancers:
  5631. //
  5632. // * deletion_protection.enabled - Indicates whether deletion protection
  5633. // is enabled. The value is true or false. The default is false.
  5634. //
  5635. // The following attributes are supported by only Application Load Balancers:
  5636. //
  5637. // * access_logs.s3.enabled - Indicates whether access logs are enabled.
  5638. // The value is true or false. The default is false.
  5639. //
  5640. // * access_logs.s3.bucket - The name of the S3 bucket for the access logs.
  5641. // This attribute is required if access logs are enabled. The bucket must
  5642. // exist in the same region as the load balancer and have a bucket policy
  5643. // that grants Elastic Load Balancing permissions to write to the bucket.
  5644. //
  5645. // * access_logs.s3.prefix - The prefix for the location in the S3 bucket
  5646. // for the access logs.
  5647. //
  5648. // * idle_timeout.timeout_seconds - The idle timeout value, in seconds. The
  5649. // valid range is 1-4000 seconds. The default is 60 seconds.
  5650. //
  5651. // * routing.http2.enabled - Indicates whether HTTP/2 is enabled. The value
  5652. // is true or false. The default is true.
  5653. //
  5654. // The following attributes are supported by only Network Load Balancers:
  5655. //
  5656. // * load_balancing.cross_zone.enabled - Indicates whether cross-zone load
  5657. // balancing is enabled. The value is true or false. The default is false.
  5658. Key *string `type:"string"`
  5659. // The value of the attribute.
  5660. Value *string `type:"string"`
  5661. }
  5662. // String returns the string representation
  5663. func (s LoadBalancerAttribute) String() string {
  5664. return awsutil.Prettify(s)
  5665. }
  5666. // GoString returns the string representation
  5667. func (s LoadBalancerAttribute) GoString() string {
  5668. return s.String()
  5669. }
  5670. // SetKey sets the Key field's value.
  5671. func (s *LoadBalancerAttribute) SetKey(v string) *LoadBalancerAttribute {
  5672. s.Key = &v
  5673. return s
  5674. }
  5675. // SetValue sets the Value field's value.
  5676. func (s *LoadBalancerAttribute) SetValue(v string) *LoadBalancerAttribute {
  5677. s.Value = &v
  5678. return s
  5679. }
  5680. // Information about the state of the load balancer.
  5681. type LoadBalancerState struct {
  5682. _ struct{} `type:"structure"`
  5683. // The state code. The initial state of the load balancer is provisioning. After
  5684. // the load balancer is fully set up and ready to route traffic, its state is
  5685. // active. If the load balancer could not be set up, its state is failed.
  5686. Code *string `type:"string" enum:"LoadBalancerStateEnum"`
  5687. // A description of the state.
  5688. Reason *string `type:"string"`
  5689. }
  5690. // String returns the string representation
  5691. func (s LoadBalancerState) String() string {
  5692. return awsutil.Prettify(s)
  5693. }
  5694. // GoString returns the string representation
  5695. func (s LoadBalancerState) GoString() string {
  5696. return s.String()
  5697. }
  5698. // SetCode sets the Code field's value.
  5699. func (s *LoadBalancerState) SetCode(v string) *LoadBalancerState {
  5700. s.Code = &v
  5701. return s
  5702. }
  5703. // SetReason sets the Reason field's value.
  5704. func (s *LoadBalancerState) SetReason(v string) *LoadBalancerState {
  5705. s.Reason = &v
  5706. return s
  5707. }
  5708. // Information to use when checking for a successful response from a target.
  5709. type Matcher struct {
  5710. _ struct{} `type:"structure"`
  5711. // The HTTP codes.
  5712. //
  5713. // For Application Load Balancers, you can specify values between 200 and 499,
  5714. // and the default value is 200. You can specify multiple values (for example,
  5715. // "200,202") or a range of values (for example, "200-299").
  5716. //
  5717. // For Network Load Balancers, this is 200–399.
  5718. //
  5719. // HttpCode is a required field
  5720. HttpCode *string `type:"string" required:"true"`
  5721. }
  5722. // String returns the string representation
  5723. func (s Matcher) String() string {
  5724. return awsutil.Prettify(s)
  5725. }
  5726. // GoString returns the string representation
  5727. func (s Matcher) GoString() string {
  5728. return s.String()
  5729. }
  5730. // Validate inspects the fields of the type to determine if they are valid.
  5731. func (s *Matcher) Validate() error {
  5732. invalidParams := request.ErrInvalidParams{Context: "Matcher"}
  5733. if s.HttpCode == nil {
  5734. invalidParams.Add(request.NewErrParamRequired("HttpCode"))
  5735. }
  5736. if invalidParams.Len() > 0 {
  5737. return invalidParams
  5738. }
  5739. return nil
  5740. }
  5741. // SetHttpCode sets the HttpCode field's value.
  5742. func (s *Matcher) SetHttpCode(v string) *Matcher {
  5743. s.HttpCode = &v
  5744. return s
  5745. }
  5746. type ModifyListenerInput struct {
  5747. _ struct{} `type:"structure"`
  5748. // [HTTPS and TLS listeners] The default SSL server certificate. You must provide
  5749. // exactly one certificate. Set CertificateArn to the certificate ARN but do
  5750. // not set IsDefault.
  5751. //
  5752. // To create a certificate list, use AddListenerCertificates.
  5753. Certificates []*Certificate `type:"list"`
  5754. // The actions for the default rule. The rule must include one forward action
  5755. // or one or more fixed-response actions.
  5756. //
  5757. // If the action type is forward, you specify a target group. The protocol of
  5758. // the target group must be HTTP or HTTPS for an Application Load Balancer.
  5759. // The protocol of the target group must be TCP or TLS for a Network Load Balancer.
  5760. //
  5761. // [HTTPS listeners] If the action type is authenticate-oidc, you authenticate
  5762. // users through an identity provider that is OpenID Connect (OIDC) compliant.
  5763. //
  5764. // [HTTPS listeners] If the action type is authenticate-cognito, you authenticate
  5765. // users through the user pools supported by Amazon Cognito.
  5766. //
  5767. // [Application Load Balancer] If the action type is redirect, you redirect
  5768. // specified client requests from one URL to another.
  5769. //
  5770. // [Application Load Balancer] If the action type is fixed-response, you drop
  5771. // specified client requests and return a custom HTTP response.
  5772. DefaultActions []*Action `type:"list"`
  5773. // The Amazon Resource Name (ARN) of the listener.
  5774. //
  5775. // ListenerArn is a required field
  5776. ListenerArn *string `type:"string" required:"true"`
  5777. // The port for connections from clients to the load balancer.
  5778. Port *int64 `min:"1" type:"integer"`
  5779. // The protocol for connections from clients to the load balancer. Application
  5780. // Load Balancers support the HTTP and HTTPS protocols. Network Load Balancers
  5781. // support the TCP and TLS protocols.
  5782. Protocol *string `type:"string" enum:"ProtocolEnum"`
  5783. // [HTTPS and TLS listeners] The security policy that defines which protocols
  5784. // and ciphers are supported. For more information, see Security Policies (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies)
  5785. // in the Application Load Balancers Guide.
  5786. SslPolicy *string `type:"string"`
  5787. }
  5788. // String returns the string representation
  5789. func (s ModifyListenerInput) String() string {
  5790. return awsutil.Prettify(s)
  5791. }
  5792. // GoString returns the string representation
  5793. func (s ModifyListenerInput) GoString() string {
  5794. return s.String()
  5795. }
  5796. // Validate inspects the fields of the type to determine if they are valid.
  5797. func (s *ModifyListenerInput) Validate() error {
  5798. invalidParams := request.ErrInvalidParams{Context: "ModifyListenerInput"}
  5799. if s.ListenerArn == nil {
  5800. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  5801. }
  5802. if s.Port != nil && *s.Port < 1 {
  5803. invalidParams.Add(request.NewErrParamMinValue("Port", 1))
  5804. }
  5805. if s.DefaultActions != nil {
  5806. for i, v := range s.DefaultActions {
  5807. if v == nil {
  5808. continue
  5809. }
  5810. if err := v.Validate(); err != nil {
  5811. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DefaultActions", i), err.(request.ErrInvalidParams))
  5812. }
  5813. }
  5814. }
  5815. if invalidParams.Len() > 0 {
  5816. return invalidParams
  5817. }
  5818. return nil
  5819. }
  5820. // SetCertificates sets the Certificates field's value.
  5821. func (s *ModifyListenerInput) SetCertificates(v []*Certificate) *ModifyListenerInput {
  5822. s.Certificates = v
  5823. return s
  5824. }
  5825. // SetDefaultActions sets the DefaultActions field's value.
  5826. func (s *ModifyListenerInput) SetDefaultActions(v []*Action) *ModifyListenerInput {
  5827. s.DefaultActions = v
  5828. return s
  5829. }
  5830. // SetListenerArn sets the ListenerArn field's value.
  5831. func (s *ModifyListenerInput) SetListenerArn(v string) *ModifyListenerInput {
  5832. s.ListenerArn = &v
  5833. return s
  5834. }
  5835. // SetPort sets the Port field's value.
  5836. func (s *ModifyListenerInput) SetPort(v int64) *ModifyListenerInput {
  5837. s.Port = &v
  5838. return s
  5839. }
  5840. // SetProtocol sets the Protocol field's value.
  5841. func (s *ModifyListenerInput) SetProtocol(v string) *ModifyListenerInput {
  5842. s.Protocol = &v
  5843. return s
  5844. }
  5845. // SetSslPolicy sets the SslPolicy field's value.
  5846. func (s *ModifyListenerInput) SetSslPolicy(v string) *ModifyListenerInput {
  5847. s.SslPolicy = &v
  5848. return s
  5849. }
  5850. type ModifyListenerOutput struct {
  5851. _ struct{} `type:"structure"`
  5852. // Information about the modified listener.
  5853. Listeners []*Listener `type:"list"`
  5854. }
  5855. // String returns the string representation
  5856. func (s ModifyListenerOutput) String() string {
  5857. return awsutil.Prettify(s)
  5858. }
  5859. // GoString returns the string representation
  5860. func (s ModifyListenerOutput) GoString() string {
  5861. return s.String()
  5862. }
  5863. // SetListeners sets the Listeners field's value.
  5864. func (s *ModifyListenerOutput) SetListeners(v []*Listener) *ModifyListenerOutput {
  5865. s.Listeners = v
  5866. return s
  5867. }
  5868. type ModifyLoadBalancerAttributesInput struct {
  5869. _ struct{} `type:"structure"`
  5870. // The load balancer attributes.
  5871. //
  5872. // Attributes is a required field
  5873. Attributes []*LoadBalancerAttribute `type:"list" required:"true"`
  5874. // The Amazon Resource Name (ARN) of the load balancer.
  5875. //
  5876. // LoadBalancerArn is a required field
  5877. LoadBalancerArn *string `type:"string" required:"true"`
  5878. }
  5879. // String returns the string representation
  5880. func (s ModifyLoadBalancerAttributesInput) String() string {
  5881. return awsutil.Prettify(s)
  5882. }
  5883. // GoString returns the string representation
  5884. func (s ModifyLoadBalancerAttributesInput) GoString() string {
  5885. return s.String()
  5886. }
  5887. // Validate inspects the fields of the type to determine if they are valid.
  5888. func (s *ModifyLoadBalancerAttributesInput) Validate() error {
  5889. invalidParams := request.ErrInvalidParams{Context: "ModifyLoadBalancerAttributesInput"}
  5890. if s.Attributes == nil {
  5891. invalidParams.Add(request.NewErrParamRequired("Attributes"))
  5892. }
  5893. if s.LoadBalancerArn == nil {
  5894. invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn"))
  5895. }
  5896. if invalidParams.Len() > 0 {
  5897. return invalidParams
  5898. }
  5899. return nil
  5900. }
  5901. // SetAttributes sets the Attributes field's value.
  5902. func (s *ModifyLoadBalancerAttributesInput) SetAttributes(v []*LoadBalancerAttribute) *ModifyLoadBalancerAttributesInput {
  5903. s.Attributes = v
  5904. return s
  5905. }
  5906. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  5907. func (s *ModifyLoadBalancerAttributesInput) SetLoadBalancerArn(v string) *ModifyLoadBalancerAttributesInput {
  5908. s.LoadBalancerArn = &v
  5909. return s
  5910. }
  5911. type ModifyLoadBalancerAttributesOutput struct {
  5912. _ struct{} `type:"structure"`
  5913. // Information about the load balancer attributes.
  5914. Attributes []*LoadBalancerAttribute `type:"list"`
  5915. }
  5916. // String returns the string representation
  5917. func (s ModifyLoadBalancerAttributesOutput) String() string {
  5918. return awsutil.Prettify(s)
  5919. }
  5920. // GoString returns the string representation
  5921. func (s ModifyLoadBalancerAttributesOutput) GoString() string {
  5922. return s.String()
  5923. }
  5924. // SetAttributes sets the Attributes field's value.
  5925. func (s *ModifyLoadBalancerAttributesOutput) SetAttributes(v []*LoadBalancerAttribute) *ModifyLoadBalancerAttributesOutput {
  5926. s.Attributes = v
  5927. return s
  5928. }
  5929. type ModifyRuleInput struct {
  5930. _ struct{} `type:"structure"`
  5931. // The actions.
  5932. //
  5933. // If the action type is forward, you specify a target group. The protocol of
  5934. // the target group must be HTTP or HTTPS for an Application Load Balancer.
  5935. // The protocol of the target group must be TCP or TLS for a Network Load Balancer.
  5936. //
  5937. // [HTTPS listeners] If the action type is authenticate-oidc, you authenticate
  5938. // users through an identity provider that is OpenID Connect (OIDC) compliant.
  5939. //
  5940. // [HTTPS listeners] If the action type is authenticate-cognito, you authenticate
  5941. // users through the user pools supported by Amazon Cognito.
  5942. //
  5943. // [Application Load Balancer] If the action type is redirect, you redirect
  5944. // specified client requests from one URL to another.
  5945. //
  5946. // [Application Load Balancer] If the action type is fixed-response, you drop
  5947. // specified client requests and return a custom HTTP response.
  5948. Actions []*Action `type:"list"`
  5949. // The conditions. Each condition specifies a field name and a single value.
  5950. //
  5951. // If the field name is host-header, you can specify a single host name (for
  5952. // example, my.example.com). A host name is case insensitive, can be up to 128
  5953. // characters in length, and can contain any of the following characters. You
  5954. // can include up to three wildcard characters.
  5955. //
  5956. // * A-Z, a-z, 0-9
  5957. //
  5958. // * - .
  5959. //
  5960. // * * (matches 0 or more characters)
  5961. //
  5962. // * ? (matches exactly 1 character)
  5963. //
  5964. // If the field name is path-pattern, you can specify a single path pattern.
  5965. // A path pattern is case-sensitive, can be up to 128 characters in length,
  5966. // and can contain any of the following characters. You can include up to three
  5967. // wildcard characters.
  5968. //
  5969. // * A-Z, a-z, 0-9
  5970. //
  5971. // * _ - . $ / ~ " ' @ : +
  5972. //
  5973. // * & (using &)
  5974. //
  5975. // * * (matches 0 or more characters)
  5976. //
  5977. // * ? (matches exactly 1 character)
  5978. Conditions []*RuleCondition `type:"list"`
  5979. // The Amazon Resource Name (ARN) of the rule.
  5980. //
  5981. // RuleArn is a required field
  5982. RuleArn *string `type:"string" required:"true"`
  5983. }
  5984. // String returns the string representation
  5985. func (s ModifyRuleInput) String() string {
  5986. return awsutil.Prettify(s)
  5987. }
  5988. // GoString returns the string representation
  5989. func (s ModifyRuleInput) GoString() string {
  5990. return s.String()
  5991. }
  5992. // Validate inspects the fields of the type to determine if they are valid.
  5993. func (s *ModifyRuleInput) Validate() error {
  5994. invalidParams := request.ErrInvalidParams{Context: "ModifyRuleInput"}
  5995. if s.RuleArn == nil {
  5996. invalidParams.Add(request.NewErrParamRequired("RuleArn"))
  5997. }
  5998. if s.Actions != nil {
  5999. for i, v := range s.Actions {
  6000. if v == nil {
  6001. continue
  6002. }
  6003. if err := v.Validate(); err != nil {
  6004. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Actions", i), err.(request.ErrInvalidParams))
  6005. }
  6006. }
  6007. }
  6008. if invalidParams.Len() > 0 {
  6009. return invalidParams
  6010. }
  6011. return nil
  6012. }
  6013. // SetActions sets the Actions field's value.
  6014. func (s *ModifyRuleInput) SetActions(v []*Action) *ModifyRuleInput {
  6015. s.Actions = v
  6016. return s
  6017. }
  6018. // SetConditions sets the Conditions field's value.
  6019. func (s *ModifyRuleInput) SetConditions(v []*RuleCondition) *ModifyRuleInput {
  6020. s.Conditions = v
  6021. return s
  6022. }
  6023. // SetRuleArn sets the RuleArn field's value.
  6024. func (s *ModifyRuleInput) SetRuleArn(v string) *ModifyRuleInput {
  6025. s.RuleArn = &v
  6026. return s
  6027. }
  6028. type ModifyRuleOutput struct {
  6029. _ struct{} `type:"structure"`
  6030. // Information about the modified rule.
  6031. Rules []*Rule `type:"list"`
  6032. }
  6033. // String returns the string representation
  6034. func (s ModifyRuleOutput) String() string {
  6035. return awsutil.Prettify(s)
  6036. }
  6037. // GoString returns the string representation
  6038. func (s ModifyRuleOutput) GoString() string {
  6039. return s.String()
  6040. }
  6041. // SetRules sets the Rules field's value.
  6042. func (s *ModifyRuleOutput) SetRules(v []*Rule) *ModifyRuleOutput {
  6043. s.Rules = v
  6044. return s
  6045. }
  6046. type ModifyTargetGroupAttributesInput struct {
  6047. _ struct{} `type:"structure"`
  6048. // The attributes.
  6049. //
  6050. // Attributes is a required field
  6051. Attributes []*TargetGroupAttribute `type:"list" required:"true"`
  6052. // The Amazon Resource Name (ARN) of the target group.
  6053. //
  6054. // TargetGroupArn is a required field
  6055. TargetGroupArn *string `type:"string" required:"true"`
  6056. }
  6057. // String returns the string representation
  6058. func (s ModifyTargetGroupAttributesInput) String() string {
  6059. return awsutil.Prettify(s)
  6060. }
  6061. // GoString returns the string representation
  6062. func (s ModifyTargetGroupAttributesInput) GoString() string {
  6063. return s.String()
  6064. }
  6065. // Validate inspects the fields of the type to determine if they are valid.
  6066. func (s *ModifyTargetGroupAttributesInput) Validate() error {
  6067. invalidParams := request.ErrInvalidParams{Context: "ModifyTargetGroupAttributesInput"}
  6068. if s.Attributes == nil {
  6069. invalidParams.Add(request.NewErrParamRequired("Attributes"))
  6070. }
  6071. if s.TargetGroupArn == nil {
  6072. invalidParams.Add(request.NewErrParamRequired("TargetGroupArn"))
  6073. }
  6074. if invalidParams.Len() > 0 {
  6075. return invalidParams
  6076. }
  6077. return nil
  6078. }
  6079. // SetAttributes sets the Attributes field's value.
  6080. func (s *ModifyTargetGroupAttributesInput) SetAttributes(v []*TargetGroupAttribute) *ModifyTargetGroupAttributesInput {
  6081. s.Attributes = v
  6082. return s
  6083. }
  6084. // SetTargetGroupArn sets the TargetGroupArn field's value.
  6085. func (s *ModifyTargetGroupAttributesInput) SetTargetGroupArn(v string) *ModifyTargetGroupAttributesInput {
  6086. s.TargetGroupArn = &v
  6087. return s
  6088. }
  6089. type ModifyTargetGroupAttributesOutput struct {
  6090. _ struct{} `type:"structure"`
  6091. // Information about the attributes.
  6092. Attributes []*TargetGroupAttribute `type:"list"`
  6093. }
  6094. // String returns the string representation
  6095. func (s ModifyTargetGroupAttributesOutput) String() string {
  6096. return awsutil.Prettify(s)
  6097. }
  6098. // GoString returns the string representation
  6099. func (s ModifyTargetGroupAttributesOutput) GoString() string {
  6100. return s.String()
  6101. }
  6102. // SetAttributes sets the Attributes field's value.
  6103. func (s *ModifyTargetGroupAttributesOutput) SetAttributes(v []*TargetGroupAttribute) *ModifyTargetGroupAttributesOutput {
  6104. s.Attributes = v
  6105. return s
  6106. }
  6107. type ModifyTargetGroupInput struct {
  6108. _ struct{} `type:"structure"`
  6109. // Indicates whether health checks are enabled.
  6110. HealthCheckEnabled *bool `type:"boolean"`
  6111. // The approximate amount of time, in seconds, between health checks of an individual
  6112. // target. For Application Load Balancers, the range is 5–300 seconds. For Network
  6113. // Load Balancers, the supported values are 10 or 30 seconds.
  6114. //
  6115. // If the protocol of the target group is TCP, you can't modify this setting.
  6116. HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"`
  6117. // [HTTP/HTTPS health checks] The ping path that is the destination for the
  6118. // health check request.
  6119. HealthCheckPath *string `min:"1" type:"string"`
  6120. // The port the load balancer uses when performing health checks on targets.
  6121. HealthCheckPort *string `type:"string"`
  6122. // The protocol the load balancer uses when performing health checks on targets.
  6123. // The TCP protocol is supported for health checks only if the protocol of the
  6124. // target group is TCP or TLS. The TLS protocol is not supported for health
  6125. // checks.
  6126. //
  6127. // If the protocol of the target group is TCP, you can't modify this setting.
  6128. HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"`
  6129. // [HTTP/HTTPS health checks] The amount of time, in seconds, during which no
  6130. // response means a failed health check.
  6131. //
  6132. // If the protocol of the target group is TCP, you can't modify this setting.
  6133. HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"`
  6134. // The number of consecutive health checks successes required before considering
  6135. // an unhealthy target healthy.
  6136. HealthyThresholdCount *int64 `min:"2" type:"integer"`
  6137. // [HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful
  6138. // response from a target.
  6139. //
  6140. // If the protocol of the target group is TCP, you can't modify this setting.
  6141. Matcher *Matcher `type:"structure"`
  6142. // The Amazon Resource Name (ARN) of the target group.
  6143. //
  6144. // TargetGroupArn is a required field
  6145. TargetGroupArn *string `type:"string" required:"true"`
  6146. // The number of consecutive health check failures required before considering
  6147. // the target unhealthy. For Network Load Balancers, this value must be the
  6148. // same as the healthy threshold count.
  6149. UnhealthyThresholdCount *int64 `min:"2" type:"integer"`
  6150. }
  6151. // String returns the string representation
  6152. func (s ModifyTargetGroupInput) String() string {
  6153. return awsutil.Prettify(s)
  6154. }
  6155. // GoString returns the string representation
  6156. func (s ModifyTargetGroupInput) GoString() string {
  6157. return s.String()
  6158. }
  6159. // Validate inspects the fields of the type to determine if they are valid.
  6160. func (s *ModifyTargetGroupInput) Validate() error {
  6161. invalidParams := request.ErrInvalidParams{Context: "ModifyTargetGroupInput"}
  6162. if s.HealthCheckIntervalSeconds != nil && *s.HealthCheckIntervalSeconds < 5 {
  6163. invalidParams.Add(request.NewErrParamMinValue("HealthCheckIntervalSeconds", 5))
  6164. }
  6165. if s.HealthCheckPath != nil && len(*s.HealthCheckPath) < 1 {
  6166. invalidParams.Add(request.NewErrParamMinLen("HealthCheckPath", 1))
  6167. }
  6168. if s.HealthCheckTimeoutSeconds != nil && *s.HealthCheckTimeoutSeconds < 2 {
  6169. invalidParams.Add(request.NewErrParamMinValue("HealthCheckTimeoutSeconds", 2))
  6170. }
  6171. if s.HealthyThresholdCount != nil && *s.HealthyThresholdCount < 2 {
  6172. invalidParams.Add(request.NewErrParamMinValue("HealthyThresholdCount", 2))
  6173. }
  6174. if s.TargetGroupArn == nil {
  6175. invalidParams.Add(request.NewErrParamRequired("TargetGroupArn"))
  6176. }
  6177. if s.UnhealthyThresholdCount != nil && *s.UnhealthyThresholdCount < 2 {
  6178. invalidParams.Add(request.NewErrParamMinValue("UnhealthyThresholdCount", 2))
  6179. }
  6180. if s.Matcher != nil {
  6181. if err := s.Matcher.Validate(); err != nil {
  6182. invalidParams.AddNested("Matcher", err.(request.ErrInvalidParams))
  6183. }
  6184. }
  6185. if invalidParams.Len() > 0 {
  6186. return invalidParams
  6187. }
  6188. return nil
  6189. }
  6190. // SetHealthCheckEnabled sets the HealthCheckEnabled field's value.
  6191. func (s *ModifyTargetGroupInput) SetHealthCheckEnabled(v bool) *ModifyTargetGroupInput {
  6192. s.HealthCheckEnabled = &v
  6193. return s
  6194. }
  6195. // SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value.
  6196. func (s *ModifyTargetGroupInput) SetHealthCheckIntervalSeconds(v int64) *ModifyTargetGroupInput {
  6197. s.HealthCheckIntervalSeconds = &v
  6198. return s
  6199. }
  6200. // SetHealthCheckPath sets the HealthCheckPath field's value.
  6201. func (s *ModifyTargetGroupInput) SetHealthCheckPath(v string) *ModifyTargetGroupInput {
  6202. s.HealthCheckPath = &v
  6203. return s
  6204. }
  6205. // SetHealthCheckPort sets the HealthCheckPort field's value.
  6206. func (s *ModifyTargetGroupInput) SetHealthCheckPort(v string) *ModifyTargetGroupInput {
  6207. s.HealthCheckPort = &v
  6208. return s
  6209. }
  6210. // SetHealthCheckProtocol sets the HealthCheckProtocol field's value.
  6211. func (s *ModifyTargetGroupInput) SetHealthCheckProtocol(v string) *ModifyTargetGroupInput {
  6212. s.HealthCheckProtocol = &v
  6213. return s
  6214. }
  6215. // SetHealthCheckTimeoutSeconds sets the HealthCheckTimeoutSeconds field's value.
  6216. func (s *ModifyTargetGroupInput) SetHealthCheckTimeoutSeconds(v int64) *ModifyTargetGroupInput {
  6217. s.HealthCheckTimeoutSeconds = &v
  6218. return s
  6219. }
  6220. // SetHealthyThresholdCount sets the HealthyThresholdCount field's value.
  6221. func (s *ModifyTargetGroupInput) SetHealthyThresholdCount(v int64) *ModifyTargetGroupInput {
  6222. s.HealthyThresholdCount = &v
  6223. return s
  6224. }
  6225. // SetMatcher sets the Matcher field's value.
  6226. func (s *ModifyTargetGroupInput) SetMatcher(v *Matcher) *ModifyTargetGroupInput {
  6227. s.Matcher = v
  6228. return s
  6229. }
  6230. // SetTargetGroupArn sets the TargetGroupArn field's value.
  6231. func (s *ModifyTargetGroupInput) SetTargetGroupArn(v string) *ModifyTargetGroupInput {
  6232. s.TargetGroupArn = &v
  6233. return s
  6234. }
  6235. // SetUnhealthyThresholdCount sets the UnhealthyThresholdCount field's value.
  6236. func (s *ModifyTargetGroupInput) SetUnhealthyThresholdCount(v int64) *ModifyTargetGroupInput {
  6237. s.UnhealthyThresholdCount = &v
  6238. return s
  6239. }
  6240. type ModifyTargetGroupOutput struct {
  6241. _ struct{} `type:"structure"`
  6242. // Information about the modified target group.
  6243. TargetGroups []*TargetGroup `type:"list"`
  6244. }
  6245. // String returns the string representation
  6246. func (s ModifyTargetGroupOutput) String() string {
  6247. return awsutil.Prettify(s)
  6248. }
  6249. // GoString returns the string representation
  6250. func (s ModifyTargetGroupOutput) GoString() string {
  6251. return s.String()
  6252. }
  6253. // SetTargetGroups sets the TargetGroups field's value.
  6254. func (s *ModifyTargetGroupOutput) SetTargetGroups(v []*TargetGroup) *ModifyTargetGroupOutput {
  6255. s.TargetGroups = v
  6256. return s
  6257. }
  6258. // Information about a redirect action.
  6259. //
  6260. // A URI consists of the following components: protocol://hostname:port/path?query.
  6261. // You must modify at least one of the following components to avoid a redirect
  6262. // loop: protocol, hostname, port, or path. Any components that you do not modify
  6263. // retain their original values.
  6264. //
  6265. // You can reuse URI components using the following reserved keywords:
  6266. //
  6267. // * #{protocol}
  6268. //
  6269. // * #{host}
  6270. //
  6271. // * #{port}
  6272. //
  6273. // * #{path} (the leading "/" is removed)
  6274. //
  6275. // * #{query}
  6276. //
  6277. // For example, you can change the path to "/new/#{path}", the hostname to "example.#{host}",
  6278. // or the query to "#{query}&value=xyz".
  6279. type RedirectActionConfig struct {
  6280. _ struct{} `type:"structure"`
  6281. // The hostname. This component is not percent-encoded. The hostname can contain
  6282. // #{host}.
  6283. Host *string `min:"1" type:"string"`
  6284. // The absolute path, starting with the leading "/". This component is not percent-encoded.
  6285. // The path can contain #{host}, #{path}, and #{port}.
  6286. Path *string `min:"1" type:"string"`
  6287. // The port. You can specify a value from 1 to 65535 or #{port}.
  6288. Port *string `type:"string"`
  6289. // The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect
  6290. // HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You cannot redirect HTTPS
  6291. // to HTTP.
  6292. Protocol *string `type:"string"`
  6293. // The query parameters, URL-encoded when necessary, but not percent-encoded.
  6294. // Do not include the leading "?", as it is automatically added. You can specify
  6295. // any of the reserved keywords.
  6296. Query *string `type:"string"`
  6297. // The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary
  6298. // (HTTP 302).
  6299. //
  6300. // StatusCode is a required field
  6301. StatusCode *string `type:"string" required:"true" enum:"RedirectActionStatusCodeEnum"`
  6302. }
  6303. // String returns the string representation
  6304. func (s RedirectActionConfig) String() string {
  6305. return awsutil.Prettify(s)
  6306. }
  6307. // GoString returns the string representation
  6308. func (s RedirectActionConfig) GoString() string {
  6309. return s.String()
  6310. }
  6311. // Validate inspects the fields of the type to determine if they are valid.
  6312. func (s *RedirectActionConfig) Validate() error {
  6313. invalidParams := request.ErrInvalidParams{Context: "RedirectActionConfig"}
  6314. if s.Host != nil && len(*s.Host) < 1 {
  6315. invalidParams.Add(request.NewErrParamMinLen("Host", 1))
  6316. }
  6317. if s.Path != nil && len(*s.Path) < 1 {
  6318. invalidParams.Add(request.NewErrParamMinLen("Path", 1))
  6319. }
  6320. if s.StatusCode == nil {
  6321. invalidParams.Add(request.NewErrParamRequired("StatusCode"))
  6322. }
  6323. if invalidParams.Len() > 0 {
  6324. return invalidParams
  6325. }
  6326. return nil
  6327. }
  6328. // SetHost sets the Host field's value.
  6329. func (s *RedirectActionConfig) SetHost(v string) *RedirectActionConfig {
  6330. s.Host = &v
  6331. return s
  6332. }
  6333. // SetPath sets the Path field's value.
  6334. func (s *RedirectActionConfig) SetPath(v string) *RedirectActionConfig {
  6335. s.Path = &v
  6336. return s
  6337. }
  6338. // SetPort sets the Port field's value.
  6339. func (s *RedirectActionConfig) SetPort(v string) *RedirectActionConfig {
  6340. s.Port = &v
  6341. return s
  6342. }
  6343. // SetProtocol sets the Protocol field's value.
  6344. func (s *RedirectActionConfig) SetProtocol(v string) *RedirectActionConfig {
  6345. s.Protocol = &v
  6346. return s
  6347. }
  6348. // SetQuery sets the Query field's value.
  6349. func (s *RedirectActionConfig) SetQuery(v string) *RedirectActionConfig {
  6350. s.Query = &v
  6351. return s
  6352. }
  6353. // SetStatusCode sets the StatusCode field's value.
  6354. func (s *RedirectActionConfig) SetStatusCode(v string) *RedirectActionConfig {
  6355. s.StatusCode = &v
  6356. return s
  6357. }
  6358. type RegisterTargetsInput struct {
  6359. _ struct{} `type:"structure"`
  6360. // The Amazon Resource Name (ARN) of the target group.
  6361. //
  6362. // TargetGroupArn is a required field
  6363. TargetGroupArn *string `type:"string" required:"true"`
  6364. // The targets.
  6365. //
  6366. // To register a target by instance ID, specify the instance ID. To register
  6367. // a target by IP address, specify the IP address. To register a Lambda function,
  6368. // specify the ARN of the Lambda function.
  6369. //
  6370. // Targets is a required field
  6371. Targets []*TargetDescription `type:"list" required:"true"`
  6372. }
  6373. // String returns the string representation
  6374. func (s RegisterTargetsInput) String() string {
  6375. return awsutil.Prettify(s)
  6376. }
  6377. // GoString returns the string representation
  6378. func (s RegisterTargetsInput) GoString() string {
  6379. return s.String()
  6380. }
  6381. // Validate inspects the fields of the type to determine if they are valid.
  6382. func (s *RegisterTargetsInput) Validate() error {
  6383. invalidParams := request.ErrInvalidParams{Context: "RegisterTargetsInput"}
  6384. if s.TargetGroupArn == nil {
  6385. invalidParams.Add(request.NewErrParamRequired("TargetGroupArn"))
  6386. }
  6387. if s.Targets == nil {
  6388. invalidParams.Add(request.NewErrParamRequired("Targets"))
  6389. }
  6390. if s.Targets != nil {
  6391. for i, v := range s.Targets {
  6392. if v == nil {
  6393. continue
  6394. }
  6395. if err := v.Validate(); err != nil {
  6396. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams))
  6397. }
  6398. }
  6399. }
  6400. if invalidParams.Len() > 0 {
  6401. return invalidParams
  6402. }
  6403. return nil
  6404. }
  6405. // SetTargetGroupArn sets the TargetGroupArn field's value.
  6406. func (s *RegisterTargetsInput) SetTargetGroupArn(v string) *RegisterTargetsInput {
  6407. s.TargetGroupArn = &v
  6408. return s
  6409. }
  6410. // SetTargets sets the Targets field's value.
  6411. func (s *RegisterTargetsInput) SetTargets(v []*TargetDescription) *RegisterTargetsInput {
  6412. s.Targets = v
  6413. return s
  6414. }
  6415. type RegisterTargetsOutput struct {
  6416. _ struct{} `type:"structure"`
  6417. }
  6418. // String returns the string representation
  6419. func (s RegisterTargetsOutput) String() string {
  6420. return awsutil.Prettify(s)
  6421. }
  6422. // GoString returns the string representation
  6423. func (s RegisterTargetsOutput) GoString() string {
  6424. return s.String()
  6425. }
  6426. type RemoveListenerCertificatesInput struct {
  6427. _ struct{} `type:"structure"`
  6428. // The certificate to remove. You can specify one certificate per call. Set
  6429. // CertificateArn to the certificate ARN but do not set IsDefault.
  6430. //
  6431. // Certificates is a required field
  6432. Certificates []*Certificate `type:"list" required:"true"`
  6433. // The Amazon Resource Name (ARN) of the listener.
  6434. //
  6435. // ListenerArn is a required field
  6436. ListenerArn *string `type:"string" required:"true"`
  6437. }
  6438. // String returns the string representation
  6439. func (s RemoveListenerCertificatesInput) String() string {
  6440. return awsutil.Prettify(s)
  6441. }
  6442. // GoString returns the string representation
  6443. func (s RemoveListenerCertificatesInput) GoString() string {
  6444. return s.String()
  6445. }
  6446. // Validate inspects the fields of the type to determine if they are valid.
  6447. func (s *RemoveListenerCertificatesInput) Validate() error {
  6448. invalidParams := request.ErrInvalidParams{Context: "RemoveListenerCertificatesInput"}
  6449. if s.Certificates == nil {
  6450. invalidParams.Add(request.NewErrParamRequired("Certificates"))
  6451. }
  6452. if s.ListenerArn == nil {
  6453. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  6454. }
  6455. if invalidParams.Len() > 0 {
  6456. return invalidParams
  6457. }
  6458. return nil
  6459. }
  6460. // SetCertificates sets the Certificates field's value.
  6461. func (s *RemoveListenerCertificatesInput) SetCertificates(v []*Certificate) *RemoveListenerCertificatesInput {
  6462. s.Certificates = v
  6463. return s
  6464. }
  6465. // SetListenerArn sets the ListenerArn field's value.
  6466. func (s *RemoveListenerCertificatesInput) SetListenerArn(v string) *RemoveListenerCertificatesInput {
  6467. s.ListenerArn = &v
  6468. return s
  6469. }
  6470. type RemoveListenerCertificatesOutput struct {
  6471. _ struct{} `type:"structure"`
  6472. }
  6473. // String returns the string representation
  6474. func (s RemoveListenerCertificatesOutput) String() string {
  6475. return awsutil.Prettify(s)
  6476. }
  6477. // GoString returns the string representation
  6478. func (s RemoveListenerCertificatesOutput) GoString() string {
  6479. return s.String()
  6480. }
  6481. type RemoveTagsInput struct {
  6482. _ struct{} `type:"structure"`
  6483. // The Amazon Resource Name (ARN) of the resource.
  6484. //
  6485. // ResourceArns is a required field
  6486. ResourceArns []*string `type:"list" required:"true"`
  6487. // The tag keys for the tags to remove.
  6488. //
  6489. // TagKeys is a required field
  6490. TagKeys []*string `type:"list" required:"true"`
  6491. }
  6492. // String returns the string representation
  6493. func (s RemoveTagsInput) String() string {
  6494. return awsutil.Prettify(s)
  6495. }
  6496. // GoString returns the string representation
  6497. func (s RemoveTagsInput) GoString() string {
  6498. return s.String()
  6499. }
  6500. // Validate inspects the fields of the type to determine if they are valid.
  6501. func (s *RemoveTagsInput) Validate() error {
  6502. invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"}
  6503. if s.ResourceArns == nil {
  6504. invalidParams.Add(request.NewErrParamRequired("ResourceArns"))
  6505. }
  6506. if s.TagKeys == nil {
  6507. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  6508. }
  6509. if invalidParams.Len() > 0 {
  6510. return invalidParams
  6511. }
  6512. return nil
  6513. }
  6514. // SetResourceArns sets the ResourceArns field's value.
  6515. func (s *RemoveTagsInput) SetResourceArns(v []*string) *RemoveTagsInput {
  6516. s.ResourceArns = v
  6517. return s
  6518. }
  6519. // SetTagKeys sets the TagKeys field's value.
  6520. func (s *RemoveTagsInput) SetTagKeys(v []*string) *RemoveTagsInput {
  6521. s.TagKeys = v
  6522. return s
  6523. }
  6524. type RemoveTagsOutput struct {
  6525. _ struct{} `type:"structure"`
  6526. }
  6527. // String returns the string representation
  6528. func (s RemoveTagsOutput) String() string {
  6529. return awsutil.Prettify(s)
  6530. }
  6531. // GoString returns the string representation
  6532. func (s RemoveTagsOutput) GoString() string {
  6533. return s.String()
  6534. }
  6535. // Information about a rule.
  6536. type Rule struct {
  6537. _ struct{} `type:"structure"`
  6538. // The actions.
  6539. Actions []*Action `type:"list"`
  6540. // The conditions.
  6541. Conditions []*RuleCondition `type:"list"`
  6542. // Indicates whether this is the default rule.
  6543. IsDefault *bool `type:"boolean"`
  6544. // The priority.
  6545. Priority *string `type:"string"`
  6546. // The Amazon Resource Name (ARN) of the rule.
  6547. RuleArn *string `type:"string"`
  6548. }
  6549. // String returns the string representation
  6550. func (s Rule) String() string {
  6551. return awsutil.Prettify(s)
  6552. }
  6553. // GoString returns the string representation
  6554. func (s Rule) GoString() string {
  6555. return s.String()
  6556. }
  6557. // SetActions sets the Actions field's value.
  6558. func (s *Rule) SetActions(v []*Action) *Rule {
  6559. s.Actions = v
  6560. return s
  6561. }
  6562. // SetConditions sets the Conditions field's value.
  6563. func (s *Rule) SetConditions(v []*RuleCondition) *Rule {
  6564. s.Conditions = v
  6565. return s
  6566. }
  6567. // SetIsDefault sets the IsDefault field's value.
  6568. func (s *Rule) SetIsDefault(v bool) *Rule {
  6569. s.IsDefault = &v
  6570. return s
  6571. }
  6572. // SetPriority sets the Priority field's value.
  6573. func (s *Rule) SetPriority(v string) *Rule {
  6574. s.Priority = &v
  6575. return s
  6576. }
  6577. // SetRuleArn sets the RuleArn field's value.
  6578. func (s *Rule) SetRuleArn(v string) *Rule {
  6579. s.RuleArn = &v
  6580. return s
  6581. }
  6582. // Information about a condition for a rule.
  6583. type RuleCondition struct {
  6584. _ struct{} `type:"structure"`
  6585. // The name of the field. The possible values are host-header and path-pattern.
  6586. Field *string `type:"string"`
  6587. // The condition value.
  6588. //
  6589. // If the field name is host-header, you can specify a single host name (for
  6590. // example, my.example.com). A host name is case insensitive, can be up to 128
  6591. // characters in length, and can contain any of the following characters. You
  6592. // can include up to three wildcard characters.
  6593. //
  6594. // * A-Z, a-z, 0-9
  6595. //
  6596. // * - .
  6597. //
  6598. // * * (matches 0 or more characters)
  6599. //
  6600. // * ? (matches exactly 1 character)
  6601. //
  6602. // If the field name is path-pattern, you can specify a single path pattern
  6603. // (for example, /img/*). A path pattern is case-sensitive, can be up to 128
  6604. // characters in length, and can contain any of the following characters. You
  6605. // can include up to three wildcard characters.
  6606. //
  6607. // * A-Z, a-z, 0-9
  6608. //
  6609. // * _ - . $ / ~ " ' @ : +
  6610. //
  6611. // * & (using &)
  6612. //
  6613. // * * (matches 0 or more characters)
  6614. //
  6615. // * ? (matches exactly 1 character)
  6616. Values []*string `type:"list"`
  6617. }
  6618. // String returns the string representation
  6619. func (s RuleCondition) String() string {
  6620. return awsutil.Prettify(s)
  6621. }
  6622. // GoString returns the string representation
  6623. func (s RuleCondition) GoString() string {
  6624. return s.String()
  6625. }
  6626. // SetField sets the Field field's value.
  6627. func (s *RuleCondition) SetField(v string) *RuleCondition {
  6628. s.Field = &v
  6629. return s
  6630. }
  6631. // SetValues sets the Values field's value.
  6632. func (s *RuleCondition) SetValues(v []*string) *RuleCondition {
  6633. s.Values = v
  6634. return s
  6635. }
  6636. // Information about the priorities for the rules for a listener.
  6637. type RulePriorityPair struct {
  6638. _ struct{} `type:"structure"`
  6639. // The rule priority.
  6640. Priority *int64 `min:"1" type:"integer"`
  6641. // The Amazon Resource Name (ARN) of the rule.
  6642. RuleArn *string `type:"string"`
  6643. }
  6644. // String returns the string representation
  6645. func (s RulePriorityPair) String() string {
  6646. return awsutil.Prettify(s)
  6647. }
  6648. // GoString returns the string representation
  6649. func (s RulePriorityPair) GoString() string {
  6650. return s.String()
  6651. }
  6652. // Validate inspects the fields of the type to determine if they are valid.
  6653. func (s *RulePriorityPair) Validate() error {
  6654. invalidParams := request.ErrInvalidParams{Context: "RulePriorityPair"}
  6655. if s.Priority != nil && *s.Priority < 1 {
  6656. invalidParams.Add(request.NewErrParamMinValue("Priority", 1))
  6657. }
  6658. if invalidParams.Len() > 0 {
  6659. return invalidParams
  6660. }
  6661. return nil
  6662. }
  6663. // SetPriority sets the Priority field's value.
  6664. func (s *RulePriorityPair) SetPriority(v int64) *RulePriorityPair {
  6665. s.Priority = &v
  6666. return s
  6667. }
  6668. // SetRuleArn sets the RuleArn field's value.
  6669. func (s *RulePriorityPair) SetRuleArn(v string) *RulePriorityPair {
  6670. s.RuleArn = &v
  6671. return s
  6672. }
  6673. type SetIpAddressTypeInput struct {
  6674. _ struct{} `type:"structure"`
  6675. // The IP address type. The possible values are ipv4 (for IPv4 addresses) and
  6676. // dualstack (for IPv4 and IPv6 addresses). Internal load balancers must use
  6677. // ipv4.
  6678. //
  6679. // IpAddressType is a required field
  6680. IpAddressType *string `type:"string" required:"true" enum:"IpAddressType"`
  6681. // The Amazon Resource Name (ARN) of the load balancer.
  6682. //
  6683. // LoadBalancerArn is a required field
  6684. LoadBalancerArn *string `type:"string" required:"true"`
  6685. }
  6686. // String returns the string representation
  6687. func (s SetIpAddressTypeInput) String() string {
  6688. return awsutil.Prettify(s)
  6689. }
  6690. // GoString returns the string representation
  6691. func (s SetIpAddressTypeInput) GoString() string {
  6692. return s.String()
  6693. }
  6694. // Validate inspects the fields of the type to determine if they are valid.
  6695. func (s *SetIpAddressTypeInput) Validate() error {
  6696. invalidParams := request.ErrInvalidParams{Context: "SetIpAddressTypeInput"}
  6697. if s.IpAddressType == nil {
  6698. invalidParams.Add(request.NewErrParamRequired("IpAddressType"))
  6699. }
  6700. if s.LoadBalancerArn == nil {
  6701. invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn"))
  6702. }
  6703. if invalidParams.Len() > 0 {
  6704. return invalidParams
  6705. }
  6706. return nil
  6707. }
  6708. // SetIpAddressType sets the IpAddressType field's value.
  6709. func (s *SetIpAddressTypeInput) SetIpAddressType(v string) *SetIpAddressTypeInput {
  6710. s.IpAddressType = &v
  6711. return s
  6712. }
  6713. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  6714. func (s *SetIpAddressTypeInput) SetLoadBalancerArn(v string) *SetIpAddressTypeInput {
  6715. s.LoadBalancerArn = &v
  6716. return s
  6717. }
  6718. type SetIpAddressTypeOutput struct {
  6719. _ struct{} `type:"structure"`
  6720. // The IP address type.
  6721. IpAddressType *string `type:"string" enum:"IpAddressType"`
  6722. }
  6723. // String returns the string representation
  6724. func (s SetIpAddressTypeOutput) String() string {
  6725. return awsutil.Prettify(s)
  6726. }
  6727. // GoString returns the string representation
  6728. func (s SetIpAddressTypeOutput) GoString() string {
  6729. return s.String()
  6730. }
  6731. // SetIpAddressType sets the IpAddressType field's value.
  6732. func (s *SetIpAddressTypeOutput) SetIpAddressType(v string) *SetIpAddressTypeOutput {
  6733. s.IpAddressType = &v
  6734. return s
  6735. }
  6736. type SetRulePrioritiesInput struct {
  6737. _ struct{} `type:"structure"`
  6738. // The rule priorities.
  6739. //
  6740. // RulePriorities is a required field
  6741. RulePriorities []*RulePriorityPair `type:"list" required:"true"`
  6742. }
  6743. // String returns the string representation
  6744. func (s SetRulePrioritiesInput) String() string {
  6745. return awsutil.Prettify(s)
  6746. }
  6747. // GoString returns the string representation
  6748. func (s SetRulePrioritiesInput) GoString() string {
  6749. return s.String()
  6750. }
  6751. // Validate inspects the fields of the type to determine if they are valid.
  6752. func (s *SetRulePrioritiesInput) Validate() error {
  6753. invalidParams := request.ErrInvalidParams{Context: "SetRulePrioritiesInput"}
  6754. if s.RulePriorities == nil {
  6755. invalidParams.Add(request.NewErrParamRequired("RulePriorities"))
  6756. }
  6757. if s.RulePriorities != nil {
  6758. for i, v := range s.RulePriorities {
  6759. if v == nil {
  6760. continue
  6761. }
  6762. if err := v.Validate(); err != nil {
  6763. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RulePriorities", i), err.(request.ErrInvalidParams))
  6764. }
  6765. }
  6766. }
  6767. if invalidParams.Len() > 0 {
  6768. return invalidParams
  6769. }
  6770. return nil
  6771. }
  6772. // SetRulePriorities sets the RulePriorities field's value.
  6773. func (s *SetRulePrioritiesInput) SetRulePriorities(v []*RulePriorityPair) *SetRulePrioritiesInput {
  6774. s.RulePriorities = v
  6775. return s
  6776. }
  6777. type SetRulePrioritiesOutput struct {
  6778. _ struct{} `type:"structure"`
  6779. // Information about the rules.
  6780. Rules []*Rule `type:"list"`
  6781. }
  6782. // String returns the string representation
  6783. func (s SetRulePrioritiesOutput) String() string {
  6784. return awsutil.Prettify(s)
  6785. }
  6786. // GoString returns the string representation
  6787. func (s SetRulePrioritiesOutput) GoString() string {
  6788. return s.String()
  6789. }
  6790. // SetRules sets the Rules field's value.
  6791. func (s *SetRulePrioritiesOutput) SetRules(v []*Rule) *SetRulePrioritiesOutput {
  6792. s.Rules = v
  6793. return s
  6794. }
  6795. type SetSecurityGroupsInput struct {
  6796. _ struct{} `type:"structure"`
  6797. // The Amazon Resource Name (ARN) of the load balancer.
  6798. //
  6799. // LoadBalancerArn is a required field
  6800. LoadBalancerArn *string `type:"string" required:"true"`
  6801. // The IDs of the security groups.
  6802. //
  6803. // SecurityGroups is a required field
  6804. SecurityGroups []*string `type:"list" required:"true"`
  6805. }
  6806. // String returns the string representation
  6807. func (s SetSecurityGroupsInput) String() string {
  6808. return awsutil.Prettify(s)
  6809. }
  6810. // GoString returns the string representation
  6811. func (s SetSecurityGroupsInput) GoString() string {
  6812. return s.String()
  6813. }
  6814. // Validate inspects the fields of the type to determine if they are valid.
  6815. func (s *SetSecurityGroupsInput) Validate() error {
  6816. invalidParams := request.ErrInvalidParams{Context: "SetSecurityGroupsInput"}
  6817. if s.LoadBalancerArn == nil {
  6818. invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn"))
  6819. }
  6820. if s.SecurityGroups == nil {
  6821. invalidParams.Add(request.NewErrParamRequired("SecurityGroups"))
  6822. }
  6823. if invalidParams.Len() > 0 {
  6824. return invalidParams
  6825. }
  6826. return nil
  6827. }
  6828. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  6829. func (s *SetSecurityGroupsInput) SetLoadBalancerArn(v string) *SetSecurityGroupsInput {
  6830. s.LoadBalancerArn = &v
  6831. return s
  6832. }
  6833. // SetSecurityGroups sets the SecurityGroups field's value.
  6834. func (s *SetSecurityGroupsInput) SetSecurityGroups(v []*string) *SetSecurityGroupsInput {
  6835. s.SecurityGroups = v
  6836. return s
  6837. }
  6838. type SetSecurityGroupsOutput struct {
  6839. _ struct{} `type:"structure"`
  6840. // The IDs of the security groups associated with the load balancer.
  6841. SecurityGroupIds []*string `type:"list"`
  6842. }
  6843. // String returns the string representation
  6844. func (s SetSecurityGroupsOutput) String() string {
  6845. return awsutil.Prettify(s)
  6846. }
  6847. // GoString returns the string representation
  6848. func (s SetSecurityGroupsOutput) GoString() string {
  6849. return s.String()
  6850. }
  6851. // SetSecurityGroupIds sets the SecurityGroupIds field's value.
  6852. func (s *SetSecurityGroupsOutput) SetSecurityGroupIds(v []*string) *SetSecurityGroupsOutput {
  6853. s.SecurityGroupIds = v
  6854. return s
  6855. }
  6856. type SetSubnetsInput struct {
  6857. _ struct{} `type:"structure"`
  6858. // The Amazon Resource Name (ARN) of the load balancer.
  6859. //
  6860. // LoadBalancerArn is a required field
  6861. LoadBalancerArn *string `type:"string" required:"true"`
  6862. // The IDs of the public subnets. You must specify subnets from at least two
  6863. // Availability Zones. You can specify only one subnet per Availability Zone.
  6864. // You must specify either subnets or subnet mappings.
  6865. //
  6866. // You cannot specify Elastic IP addresses for your subnets.
  6867. SubnetMappings []*SubnetMapping `type:"list"`
  6868. // The IDs of the public subnets. You must specify subnets from at least two
  6869. // Availability Zones. You can specify only one subnet per Availability Zone.
  6870. // You must specify either subnets or subnet mappings.
  6871. Subnets []*string `type:"list"`
  6872. }
  6873. // String returns the string representation
  6874. func (s SetSubnetsInput) String() string {
  6875. return awsutil.Prettify(s)
  6876. }
  6877. // GoString returns the string representation
  6878. func (s SetSubnetsInput) GoString() string {
  6879. return s.String()
  6880. }
  6881. // Validate inspects the fields of the type to determine if they are valid.
  6882. func (s *SetSubnetsInput) Validate() error {
  6883. invalidParams := request.ErrInvalidParams{Context: "SetSubnetsInput"}
  6884. if s.LoadBalancerArn == nil {
  6885. invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn"))
  6886. }
  6887. if invalidParams.Len() > 0 {
  6888. return invalidParams
  6889. }
  6890. return nil
  6891. }
  6892. // SetLoadBalancerArn sets the LoadBalancerArn field's value.
  6893. func (s *SetSubnetsInput) SetLoadBalancerArn(v string) *SetSubnetsInput {
  6894. s.LoadBalancerArn = &v
  6895. return s
  6896. }
  6897. // SetSubnetMappings sets the SubnetMappings field's value.
  6898. func (s *SetSubnetsInput) SetSubnetMappings(v []*SubnetMapping) *SetSubnetsInput {
  6899. s.SubnetMappings = v
  6900. return s
  6901. }
  6902. // SetSubnets sets the Subnets field's value.
  6903. func (s *SetSubnetsInput) SetSubnets(v []*string) *SetSubnetsInput {
  6904. s.Subnets = v
  6905. return s
  6906. }
  6907. type SetSubnetsOutput struct {
  6908. _ struct{} `type:"structure"`
  6909. // Information about the subnet and Availability Zone.
  6910. AvailabilityZones []*AvailabilityZone `type:"list"`
  6911. }
  6912. // String returns the string representation
  6913. func (s SetSubnetsOutput) String() string {
  6914. return awsutil.Prettify(s)
  6915. }
  6916. // GoString returns the string representation
  6917. func (s SetSubnetsOutput) GoString() string {
  6918. return s.String()
  6919. }
  6920. // SetAvailabilityZones sets the AvailabilityZones field's value.
  6921. func (s *SetSubnetsOutput) SetAvailabilityZones(v []*AvailabilityZone) *SetSubnetsOutput {
  6922. s.AvailabilityZones = v
  6923. return s
  6924. }
  6925. // Information about a policy used for SSL negotiation.
  6926. type SslPolicy struct {
  6927. _ struct{} `type:"structure"`
  6928. // The ciphers.
  6929. Ciphers []*Cipher `type:"list"`
  6930. // The name of the policy.
  6931. Name *string `type:"string"`
  6932. // The protocols.
  6933. SslProtocols []*string `type:"list"`
  6934. }
  6935. // String returns the string representation
  6936. func (s SslPolicy) String() string {
  6937. return awsutil.Prettify(s)
  6938. }
  6939. // GoString returns the string representation
  6940. func (s SslPolicy) GoString() string {
  6941. return s.String()
  6942. }
  6943. // SetCiphers sets the Ciphers field's value.
  6944. func (s *SslPolicy) SetCiphers(v []*Cipher) *SslPolicy {
  6945. s.Ciphers = v
  6946. return s
  6947. }
  6948. // SetName sets the Name field's value.
  6949. func (s *SslPolicy) SetName(v string) *SslPolicy {
  6950. s.Name = &v
  6951. return s
  6952. }
  6953. // SetSslProtocols sets the SslProtocols field's value.
  6954. func (s *SslPolicy) SetSslProtocols(v []*string) *SslPolicy {
  6955. s.SslProtocols = v
  6956. return s
  6957. }
  6958. // Information about a subnet mapping.
  6959. type SubnetMapping struct {
  6960. _ struct{} `type:"structure"`
  6961. // [Network Load Balancers] The allocation ID of the Elastic IP address.
  6962. AllocationId *string `type:"string"`
  6963. // The ID of the subnet.
  6964. SubnetId *string `type:"string"`
  6965. }
  6966. // String returns the string representation
  6967. func (s SubnetMapping) String() string {
  6968. return awsutil.Prettify(s)
  6969. }
  6970. // GoString returns the string representation
  6971. func (s SubnetMapping) GoString() string {
  6972. return s.String()
  6973. }
  6974. // SetAllocationId sets the AllocationId field's value.
  6975. func (s *SubnetMapping) SetAllocationId(v string) *SubnetMapping {
  6976. s.AllocationId = &v
  6977. return s
  6978. }
  6979. // SetSubnetId sets the SubnetId field's value.
  6980. func (s *SubnetMapping) SetSubnetId(v string) *SubnetMapping {
  6981. s.SubnetId = &v
  6982. return s
  6983. }
  6984. // Information about a tag.
  6985. type Tag struct {
  6986. _ struct{} `type:"structure"`
  6987. // The key of the tag.
  6988. //
  6989. // Key is a required field
  6990. Key *string `min:"1" type:"string" required:"true"`
  6991. // The value of the tag.
  6992. Value *string `type:"string"`
  6993. }
  6994. // String returns the string representation
  6995. func (s Tag) String() string {
  6996. return awsutil.Prettify(s)
  6997. }
  6998. // GoString returns the string representation
  6999. func (s Tag) GoString() string {
  7000. return s.String()
  7001. }
  7002. // Validate inspects the fields of the type to determine if they are valid.
  7003. func (s *Tag) Validate() error {
  7004. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  7005. if s.Key == nil {
  7006. invalidParams.Add(request.NewErrParamRequired("Key"))
  7007. }
  7008. if s.Key != nil && len(*s.Key) < 1 {
  7009. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7010. }
  7011. if invalidParams.Len() > 0 {
  7012. return invalidParams
  7013. }
  7014. return nil
  7015. }
  7016. // SetKey sets the Key field's value.
  7017. func (s *Tag) SetKey(v string) *Tag {
  7018. s.Key = &v
  7019. return s
  7020. }
  7021. // SetValue sets the Value field's value.
  7022. func (s *Tag) SetValue(v string) *Tag {
  7023. s.Value = &v
  7024. return s
  7025. }
  7026. // The tags associated with a resource.
  7027. type TagDescription struct {
  7028. _ struct{} `type:"structure"`
  7029. // The Amazon Resource Name (ARN) of the resource.
  7030. ResourceArn *string `type:"string"`
  7031. // Information about the tags.
  7032. Tags []*Tag `min:"1" type:"list"`
  7033. }
  7034. // String returns the string representation
  7035. func (s TagDescription) String() string {
  7036. return awsutil.Prettify(s)
  7037. }
  7038. // GoString returns the string representation
  7039. func (s TagDescription) GoString() string {
  7040. return s.String()
  7041. }
  7042. // SetResourceArn sets the ResourceArn field's value.
  7043. func (s *TagDescription) SetResourceArn(v string) *TagDescription {
  7044. s.ResourceArn = &v
  7045. return s
  7046. }
  7047. // SetTags sets the Tags field's value.
  7048. func (s *TagDescription) SetTags(v []*Tag) *TagDescription {
  7049. s.Tags = v
  7050. return s
  7051. }
  7052. // Information about a target.
  7053. type TargetDescription struct {
  7054. _ struct{} `type:"structure"`
  7055. // An Availability Zone or all. This determines whether the target receives
  7056. // traffic from the load balancer nodes in the specified Availability Zone or
  7057. // from all enabled Availability Zones for the load balancer.
  7058. //
  7059. // This parameter is not supported if the target type of the target group is
  7060. // instance.
  7061. //
  7062. // If the target type is ip and the IP address is in a subnet of the VPC for
  7063. // the target group, the Availability Zone is automatically detected and this
  7064. // parameter is optional. If the IP address is outside the VPC, this parameter
  7065. // is required.
  7066. //
  7067. // With an Application Load Balancer, if the target type is ip and the IP address
  7068. // is outside the VPC for the target group, the only supported value is all.
  7069. //
  7070. // If the target type is lambda, this parameter is optional and the only supported
  7071. // value is all.
  7072. AvailabilityZone *string `type:"string"`
  7073. // The ID of the target. If the target type of the target group is instance,
  7074. // specify an instance ID. If the target type is ip, specify an IP address.
  7075. // If the target type is lambda, specify the ARN of the Lambda function.
  7076. //
  7077. // Id is a required field
  7078. Id *string `type:"string" required:"true"`
  7079. // The port on which the target is listening.
  7080. Port *int64 `min:"1" type:"integer"`
  7081. }
  7082. // String returns the string representation
  7083. func (s TargetDescription) String() string {
  7084. return awsutil.Prettify(s)
  7085. }
  7086. // GoString returns the string representation
  7087. func (s TargetDescription) GoString() string {
  7088. return s.String()
  7089. }
  7090. // Validate inspects the fields of the type to determine if they are valid.
  7091. func (s *TargetDescription) Validate() error {
  7092. invalidParams := request.ErrInvalidParams{Context: "TargetDescription"}
  7093. if s.Id == nil {
  7094. invalidParams.Add(request.NewErrParamRequired("Id"))
  7095. }
  7096. if s.Port != nil && *s.Port < 1 {
  7097. invalidParams.Add(request.NewErrParamMinValue("Port", 1))
  7098. }
  7099. if invalidParams.Len() > 0 {
  7100. return invalidParams
  7101. }
  7102. return nil
  7103. }
  7104. // SetAvailabilityZone sets the AvailabilityZone field's value.
  7105. func (s *TargetDescription) SetAvailabilityZone(v string) *TargetDescription {
  7106. s.AvailabilityZone = &v
  7107. return s
  7108. }
  7109. // SetId sets the Id field's value.
  7110. func (s *TargetDescription) SetId(v string) *TargetDescription {
  7111. s.Id = &v
  7112. return s
  7113. }
  7114. // SetPort sets the Port field's value.
  7115. func (s *TargetDescription) SetPort(v int64) *TargetDescription {
  7116. s.Port = &v
  7117. return s
  7118. }
  7119. // Information about a target group.
  7120. type TargetGroup struct {
  7121. _ struct{} `type:"structure"`
  7122. // Indicates whether health checks are enabled.
  7123. HealthCheckEnabled *bool `type:"boolean"`
  7124. // The approximate amount of time, in seconds, between health checks of an individual
  7125. // target.
  7126. HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"`
  7127. // The destination for the health check request.
  7128. HealthCheckPath *string `min:"1" type:"string"`
  7129. // The port to use to connect with the target.
  7130. HealthCheckPort *string `type:"string"`
  7131. // The protocol to use to connect with the target.
  7132. HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"`
  7133. // The amount of time, in seconds, during which no response means a failed health
  7134. // check.
  7135. HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"`
  7136. // The number of consecutive health checks successes required before considering
  7137. // an unhealthy target healthy.
  7138. HealthyThresholdCount *int64 `min:"2" type:"integer"`
  7139. // The Amazon Resource Names (ARN) of the load balancers that route traffic
  7140. // to this target group.
  7141. LoadBalancerArns []*string `type:"list"`
  7142. // The HTTP codes to use when checking for a successful response from a target.
  7143. Matcher *Matcher `type:"structure"`
  7144. // The port on which the targets are listening.
  7145. Port *int64 `min:"1" type:"integer"`
  7146. // The protocol to use for routing traffic to the targets.
  7147. Protocol *string `type:"string" enum:"ProtocolEnum"`
  7148. // The Amazon Resource Name (ARN) of the target group.
  7149. TargetGroupArn *string `type:"string"`
  7150. // The name of the target group.
  7151. TargetGroupName *string `type:"string"`
  7152. // The type of target that you must specify when registering targets with this
  7153. // target group. The possible values are instance (targets are specified by
  7154. // instance ID) or ip (targets are specified by IP address).
  7155. TargetType *string `type:"string" enum:"TargetTypeEnum"`
  7156. // The number of consecutive health check failures required before considering
  7157. // the target unhealthy.
  7158. UnhealthyThresholdCount *int64 `min:"2" type:"integer"`
  7159. // The ID of the VPC for the targets.
  7160. VpcId *string `type:"string"`
  7161. }
  7162. // String returns the string representation
  7163. func (s TargetGroup) String() string {
  7164. return awsutil.Prettify(s)
  7165. }
  7166. // GoString returns the string representation
  7167. func (s TargetGroup) GoString() string {
  7168. return s.String()
  7169. }
  7170. // SetHealthCheckEnabled sets the HealthCheckEnabled field's value.
  7171. func (s *TargetGroup) SetHealthCheckEnabled(v bool) *TargetGroup {
  7172. s.HealthCheckEnabled = &v
  7173. return s
  7174. }
  7175. // SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value.
  7176. func (s *TargetGroup) SetHealthCheckIntervalSeconds(v int64) *TargetGroup {
  7177. s.HealthCheckIntervalSeconds = &v
  7178. return s
  7179. }
  7180. // SetHealthCheckPath sets the HealthCheckPath field's value.
  7181. func (s *TargetGroup) SetHealthCheckPath(v string) *TargetGroup {
  7182. s.HealthCheckPath = &v
  7183. return s
  7184. }
  7185. // SetHealthCheckPort sets the HealthCheckPort field's value.
  7186. func (s *TargetGroup) SetHealthCheckPort(v string) *TargetGroup {
  7187. s.HealthCheckPort = &v
  7188. return s
  7189. }
  7190. // SetHealthCheckProtocol sets the HealthCheckProtocol field's value.
  7191. func (s *TargetGroup) SetHealthCheckProtocol(v string) *TargetGroup {
  7192. s.HealthCheckProtocol = &v
  7193. return s
  7194. }
  7195. // SetHealthCheckTimeoutSeconds sets the HealthCheckTimeoutSeconds field's value.
  7196. func (s *TargetGroup) SetHealthCheckTimeoutSeconds(v int64) *TargetGroup {
  7197. s.HealthCheckTimeoutSeconds = &v
  7198. return s
  7199. }
  7200. // SetHealthyThresholdCount sets the HealthyThresholdCount field's value.
  7201. func (s *TargetGroup) SetHealthyThresholdCount(v int64) *TargetGroup {
  7202. s.HealthyThresholdCount = &v
  7203. return s
  7204. }
  7205. // SetLoadBalancerArns sets the LoadBalancerArns field's value.
  7206. func (s *TargetGroup) SetLoadBalancerArns(v []*string) *TargetGroup {
  7207. s.LoadBalancerArns = v
  7208. return s
  7209. }
  7210. // SetMatcher sets the Matcher field's value.
  7211. func (s *TargetGroup) SetMatcher(v *Matcher) *TargetGroup {
  7212. s.Matcher = v
  7213. return s
  7214. }
  7215. // SetPort sets the Port field's value.
  7216. func (s *TargetGroup) SetPort(v int64) *TargetGroup {
  7217. s.Port = &v
  7218. return s
  7219. }
  7220. // SetProtocol sets the Protocol field's value.
  7221. func (s *TargetGroup) SetProtocol(v string) *TargetGroup {
  7222. s.Protocol = &v
  7223. return s
  7224. }
  7225. // SetTargetGroupArn sets the TargetGroupArn field's value.
  7226. func (s *TargetGroup) SetTargetGroupArn(v string) *TargetGroup {
  7227. s.TargetGroupArn = &v
  7228. return s
  7229. }
  7230. // SetTargetGroupName sets the TargetGroupName field's value.
  7231. func (s *TargetGroup) SetTargetGroupName(v string) *TargetGroup {
  7232. s.TargetGroupName = &v
  7233. return s
  7234. }
  7235. // SetTargetType sets the TargetType field's value.
  7236. func (s *TargetGroup) SetTargetType(v string) *TargetGroup {
  7237. s.TargetType = &v
  7238. return s
  7239. }
  7240. // SetUnhealthyThresholdCount sets the UnhealthyThresholdCount field's value.
  7241. func (s *TargetGroup) SetUnhealthyThresholdCount(v int64) *TargetGroup {
  7242. s.UnhealthyThresholdCount = &v
  7243. return s
  7244. }
  7245. // SetVpcId sets the VpcId field's value.
  7246. func (s *TargetGroup) SetVpcId(v string) *TargetGroup {
  7247. s.VpcId = &v
  7248. return s
  7249. }
  7250. // Information about a target group attribute.
  7251. type TargetGroupAttribute struct {
  7252. _ struct{} `type:"structure"`
  7253. // The name of the attribute.
  7254. //
  7255. // The following attribute is supported by both Application Load Balancers and
  7256. // Network Load Balancers:
  7257. //
  7258. // * deregistration_delay.timeout_seconds - The amount of time, in seconds,
  7259. // for Elastic Load Balancing to wait before changing the state of a deregistering
  7260. // target from draining to unused. The range is 0-3600 seconds. The default
  7261. // value is 300 seconds. If the target is a Lambda function, this attribute
  7262. // is not supported.
  7263. //
  7264. // The following attributes are supported by Application Load Balancers if the
  7265. // target is not a Lambda function:
  7266. //
  7267. // * slow_start.duration_seconds - The time period, in seconds, during which
  7268. // a newly registered target receives a linearly increasing share of the
  7269. // traffic to the target group. After this time period ends, the target receives
  7270. // its full share of traffic. The range is 30-900 seconds (15 minutes). Slow
  7271. // start mode is disabled by default.
  7272. //
  7273. // * stickiness.enabled - Indicates whether sticky sessions are enabled.
  7274. // The value is true or false. The default is false.
  7275. //
  7276. // * stickiness.type - The type of sticky sessions. The possible value is
  7277. // lb_cookie.
  7278. //
  7279. // * stickiness.lb_cookie.duration_seconds - The time period, in seconds,
  7280. // during which requests from a client should be routed to the same target.
  7281. // After this time period expires, the load balancer-generated cookie is
  7282. // considered stale. The range is 1 second to 1 week (604800 seconds). The
  7283. // default value is 1 day (86400 seconds).
  7284. //
  7285. // The following attribute is supported only if the target is a Lambda function.
  7286. //
  7287. // * lambda.multi_value_headers.enabled - Indicates whether the request and
  7288. // response headers exchanged between the load balancer and the Lambda function
  7289. // include arrays of values or strings. The value is true or false. The default
  7290. // is false. If the value is false and the request contains a duplicate header
  7291. // field name or query parameter key, the load balancer uses the last value
  7292. // sent by the client.
  7293. //
  7294. // The following attribute is supported only by Network Load Balancers:
  7295. //
  7296. // * proxy_protocol_v2.enabled - Indicates whether Proxy Protocol version
  7297. // 2 is enabled. The value is true or false. The default is false.
  7298. Key *string `type:"string"`
  7299. // The value of the attribute.
  7300. Value *string `type:"string"`
  7301. }
  7302. // String returns the string representation
  7303. func (s TargetGroupAttribute) String() string {
  7304. return awsutil.Prettify(s)
  7305. }
  7306. // GoString returns the string representation
  7307. func (s TargetGroupAttribute) GoString() string {
  7308. return s.String()
  7309. }
  7310. // SetKey sets the Key field's value.
  7311. func (s *TargetGroupAttribute) SetKey(v string) *TargetGroupAttribute {
  7312. s.Key = &v
  7313. return s
  7314. }
  7315. // SetValue sets the Value field's value.
  7316. func (s *TargetGroupAttribute) SetValue(v string) *TargetGroupAttribute {
  7317. s.Value = &v
  7318. return s
  7319. }
  7320. // Information about the current health of a target.
  7321. type TargetHealth struct {
  7322. _ struct{} `type:"structure"`
  7323. // A description of the target health that provides additional details. If the
  7324. // state is healthy, a description is not provided.
  7325. Description *string `type:"string"`
  7326. // The reason code.
  7327. //
  7328. // If the target state is healthy, a reason code is not provided.
  7329. //
  7330. // If the target state is initial, the reason code can be one of the following
  7331. // values:
  7332. //
  7333. // * Elb.RegistrationInProgress - The target is in the process of being registered
  7334. // with the load balancer.
  7335. //
  7336. // * Elb.InitialHealthChecking - The load balancer is still sending the target
  7337. // the minimum number of health checks required to determine its health status.
  7338. //
  7339. // If the target state is unhealthy, the reason code can be one of the following
  7340. // values:
  7341. //
  7342. // * Target.ResponseCodeMismatch - The health checks did not return an expected
  7343. // HTTP code.
  7344. //
  7345. // * Target.Timeout - The health check requests timed out.
  7346. //
  7347. // * Target.FailedHealthChecks - The health checks failed because the connection
  7348. // to the target timed out, the target response was malformed, or the target
  7349. // failed the health check for an unknown reason.
  7350. //
  7351. // * Elb.InternalError - The health checks failed due to an internal error.
  7352. //
  7353. // If the target state is unused, the reason code can be one of the following
  7354. // values:
  7355. //
  7356. // * Target.NotRegistered - The target is not registered with the target
  7357. // group.
  7358. //
  7359. // * Target.NotInUse - The target group is not used by any load balancer
  7360. // or the target is in an Availability Zone that is not enabled for its load
  7361. // balancer.
  7362. //
  7363. // * Target.IpUnusable - The target IP address is reserved for use by a load
  7364. // balancer.
  7365. //
  7366. // * Target.InvalidState - The target is in the stopped or terminated state.
  7367. //
  7368. // If the target state is draining, the reason code can be the following value:
  7369. //
  7370. // * Target.DeregistrationInProgress - The target is in the process of being
  7371. // deregistered and the deregistration delay period has not expired.
  7372. //
  7373. // If the target state is unavailable, the reason code can be the following
  7374. // value:
  7375. //
  7376. // * Target.HealthCheckDisabled - Health checks are disabled for the target
  7377. // group.
  7378. Reason *string `type:"string" enum:"TargetHealthReasonEnum"`
  7379. // The state of the target.
  7380. State *string `type:"string" enum:"TargetHealthStateEnum"`
  7381. }
  7382. // String returns the string representation
  7383. func (s TargetHealth) String() string {
  7384. return awsutil.Prettify(s)
  7385. }
  7386. // GoString returns the string representation
  7387. func (s TargetHealth) GoString() string {
  7388. return s.String()
  7389. }
  7390. // SetDescription sets the Description field's value.
  7391. func (s *TargetHealth) SetDescription(v string) *TargetHealth {
  7392. s.Description = &v
  7393. return s
  7394. }
  7395. // SetReason sets the Reason field's value.
  7396. func (s *TargetHealth) SetReason(v string) *TargetHealth {
  7397. s.Reason = &v
  7398. return s
  7399. }
  7400. // SetState sets the State field's value.
  7401. func (s *TargetHealth) SetState(v string) *TargetHealth {
  7402. s.State = &v
  7403. return s
  7404. }
  7405. // Information about the health of a target.
  7406. type TargetHealthDescription struct {
  7407. _ struct{} `type:"structure"`
  7408. // The port to use to connect with the target.
  7409. HealthCheckPort *string `type:"string"`
  7410. // The description of the target.
  7411. Target *TargetDescription `type:"structure"`
  7412. // The health information for the target.
  7413. TargetHealth *TargetHealth `type:"structure"`
  7414. }
  7415. // String returns the string representation
  7416. func (s TargetHealthDescription) String() string {
  7417. return awsutil.Prettify(s)
  7418. }
  7419. // GoString returns the string representation
  7420. func (s TargetHealthDescription) GoString() string {
  7421. return s.String()
  7422. }
  7423. // SetHealthCheckPort sets the HealthCheckPort field's value.
  7424. func (s *TargetHealthDescription) SetHealthCheckPort(v string) *TargetHealthDescription {
  7425. s.HealthCheckPort = &v
  7426. return s
  7427. }
  7428. // SetTarget sets the Target field's value.
  7429. func (s *TargetHealthDescription) SetTarget(v *TargetDescription) *TargetHealthDescription {
  7430. s.Target = v
  7431. return s
  7432. }
  7433. // SetTargetHealth sets the TargetHealth field's value.
  7434. func (s *TargetHealthDescription) SetTargetHealth(v *TargetHealth) *TargetHealthDescription {
  7435. s.TargetHealth = v
  7436. return s
  7437. }
  7438. const (
  7439. // ActionTypeEnumForward is a ActionTypeEnum enum value
  7440. ActionTypeEnumForward = "forward"
  7441. // ActionTypeEnumAuthenticateOidc is a ActionTypeEnum enum value
  7442. ActionTypeEnumAuthenticateOidc = "authenticate-oidc"
  7443. // ActionTypeEnumAuthenticateCognito is a ActionTypeEnum enum value
  7444. ActionTypeEnumAuthenticateCognito = "authenticate-cognito"
  7445. // ActionTypeEnumRedirect is a ActionTypeEnum enum value
  7446. ActionTypeEnumRedirect = "redirect"
  7447. // ActionTypeEnumFixedResponse is a ActionTypeEnum enum value
  7448. ActionTypeEnumFixedResponse = "fixed-response"
  7449. )
  7450. const (
  7451. // AuthenticateCognitoActionConditionalBehaviorEnumDeny is a AuthenticateCognitoActionConditionalBehaviorEnum enum value
  7452. AuthenticateCognitoActionConditionalBehaviorEnumDeny = "deny"
  7453. // AuthenticateCognitoActionConditionalBehaviorEnumAllow is a AuthenticateCognitoActionConditionalBehaviorEnum enum value
  7454. AuthenticateCognitoActionConditionalBehaviorEnumAllow = "allow"
  7455. // AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate is a AuthenticateCognitoActionConditionalBehaviorEnum enum value
  7456. AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate = "authenticate"
  7457. )
  7458. const (
  7459. // AuthenticateOidcActionConditionalBehaviorEnumDeny is a AuthenticateOidcActionConditionalBehaviorEnum enum value
  7460. AuthenticateOidcActionConditionalBehaviorEnumDeny = "deny"
  7461. // AuthenticateOidcActionConditionalBehaviorEnumAllow is a AuthenticateOidcActionConditionalBehaviorEnum enum value
  7462. AuthenticateOidcActionConditionalBehaviorEnumAllow = "allow"
  7463. // AuthenticateOidcActionConditionalBehaviorEnumAuthenticate is a AuthenticateOidcActionConditionalBehaviorEnum enum value
  7464. AuthenticateOidcActionConditionalBehaviorEnumAuthenticate = "authenticate"
  7465. )
  7466. const (
  7467. // IpAddressTypeIpv4 is a IpAddressType enum value
  7468. IpAddressTypeIpv4 = "ipv4"
  7469. // IpAddressTypeDualstack is a IpAddressType enum value
  7470. IpAddressTypeDualstack = "dualstack"
  7471. )
  7472. const (
  7473. // LoadBalancerSchemeEnumInternetFacing is a LoadBalancerSchemeEnum enum value
  7474. LoadBalancerSchemeEnumInternetFacing = "internet-facing"
  7475. // LoadBalancerSchemeEnumInternal is a LoadBalancerSchemeEnum enum value
  7476. LoadBalancerSchemeEnumInternal = "internal"
  7477. )
  7478. const (
  7479. // LoadBalancerStateEnumActive is a LoadBalancerStateEnum enum value
  7480. LoadBalancerStateEnumActive = "active"
  7481. // LoadBalancerStateEnumProvisioning is a LoadBalancerStateEnum enum value
  7482. LoadBalancerStateEnumProvisioning = "provisioning"
  7483. // LoadBalancerStateEnumActiveImpaired is a LoadBalancerStateEnum enum value
  7484. LoadBalancerStateEnumActiveImpaired = "active_impaired"
  7485. // LoadBalancerStateEnumFailed is a LoadBalancerStateEnum enum value
  7486. LoadBalancerStateEnumFailed = "failed"
  7487. )
  7488. const (
  7489. // LoadBalancerTypeEnumApplication is a LoadBalancerTypeEnum enum value
  7490. LoadBalancerTypeEnumApplication = "application"
  7491. // LoadBalancerTypeEnumNetwork is a LoadBalancerTypeEnum enum value
  7492. LoadBalancerTypeEnumNetwork = "network"
  7493. )
  7494. const (
  7495. // ProtocolEnumHttp is a ProtocolEnum enum value
  7496. ProtocolEnumHttp = "HTTP"
  7497. // ProtocolEnumHttps is a ProtocolEnum enum value
  7498. ProtocolEnumHttps = "HTTPS"
  7499. // ProtocolEnumTcp is a ProtocolEnum enum value
  7500. ProtocolEnumTcp = "TCP"
  7501. // ProtocolEnumTls is a ProtocolEnum enum value
  7502. ProtocolEnumTls = "TLS"
  7503. )
  7504. const (
  7505. // RedirectActionStatusCodeEnumHttp301 is a RedirectActionStatusCodeEnum enum value
  7506. RedirectActionStatusCodeEnumHttp301 = "HTTP_301"
  7507. // RedirectActionStatusCodeEnumHttp302 is a RedirectActionStatusCodeEnum enum value
  7508. RedirectActionStatusCodeEnumHttp302 = "HTTP_302"
  7509. )
  7510. const (
  7511. // TargetHealthReasonEnumElbRegistrationInProgress is a TargetHealthReasonEnum enum value
  7512. TargetHealthReasonEnumElbRegistrationInProgress = "Elb.RegistrationInProgress"
  7513. // TargetHealthReasonEnumElbInitialHealthChecking is a TargetHealthReasonEnum enum value
  7514. TargetHealthReasonEnumElbInitialHealthChecking = "Elb.InitialHealthChecking"
  7515. // TargetHealthReasonEnumTargetResponseCodeMismatch is a TargetHealthReasonEnum enum value
  7516. TargetHealthReasonEnumTargetResponseCodeMismatch = "Target.ResponseCodeMismatch"
  7517. // TargetHealthReasonEnumTargetTimeout is a TargetHealthReasonEnum enum value
  7518. TargetHealthReasonEnumTargetTimeout = "Target.Timeout"
  7519. // TargetHealthReasonEnumTargetFailedHealthChecks is a TargetHealthReasonEnum enum value
  7520. TargetHealthReasonEnumTargetFailedHealthChecks = "Target.FailedHealthChecks"
  7521. // TargetHealthReasonEnumTargetNotRegistered is a TargetHealthReasonEnum enum value
  7522. TargetHealthReasonEnumTargetNotRegistered = "Target.NotRegistered"
  7523. // TargetHealthReasonEnumTargetNotInUse is a TargetHealthReasonEnum enum value
  7524. TargetHealthReasonEnumTargetNotInUse = "Target.NotInUse"
  7525. // TargetHealthReasonEnumTargetDeregistrationInProgress is a TargetHealthReasonEnum enum value
  7526. TargetHealthReasonEnumTargetDeregistrationInProgress = "Target.DeregistrationInProgress"
  7527. // TargetHealthReasonEnumTargetInvalidState is a TargetHealthReasonEnum enum value
  7528. TargetHealthReasonEnumTargetInvalidState = "Target.InvalidState"
  7529. // TargetHealthReasonEnumTargetIpUnusable is a TargetHealthReasonEnum enum value
  7530. TargetHealthReasonEnumTargetIpUnusable = "Target.IpUnusable"
  7531. // TargetHealthReasonEnumTargetHealthCheckDisabled is a TargetHealthReasonEnum enum value
  7532. TargetHealthReasonEnumTargetHealthCheckDisabled = "Target.HealthCheckDisabled"
  7533. // TargetHealthReasonEnumElbInternalError is a TargetHealthReasonEnum enum value
  7534. TargetHealthReasonEnumElbInternalError = "Elb.InternalError"
  7535. )
  7536. const (
  7537. // TargetHealthStateEnumInitial is a TargetHealthStateEnum enum value
  7538. TargetHealthStateEnumInitial = "initial"
  7539. // TargetHealthStateEnumHealthy is a TargetHealthStateEnum enum value
  7540. TargetHealthStateEnumHealthy = "healthy"
  7541. // TargetHealthStateEnumUnhealthy is a TargetHealthStateEnum enum value
  7542. TargetHealthStateEnumUnhealthy = "unhealthy"
  7543. // TargetHealthStateEnumUnused is a TargetHealthStateEnum enum value
  7544. TargetHealthStateEnumUnused = "unused"
  7545. // TargetHealthStateEnumDraining is a TargetHealthStateEnum enum value
  7546. TargetHealthStateEnumDraining = "draining"
  7547. // TargetHealthStateEnumUnavailable is a TargetHealthStateEnum enum value
  7548. TargetHealthStateEnumUnavailable = "unavailable"
  7549. )
  7550. const (
  7551. // TargetTypeEnumInstance is a TargetTypeEnum enum value
  7552. TargetTypeEnumInstance = "instance"
  7553. // TargetTypeEnumIp is a TargetTypeEnum enum value
  7554. TargetTypeEnumIp = "ip"
  7555. // TargetTypeEnumLambda is a TargetTypeEnum enum value
  7556. TargetTypeEnumLambda = "lambda"
  7557. )