api.go 310 KB

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