api.go 176 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package appmesh
  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. )
  10. const opCreateMesh = "CreateMesh"
  11. // CreateMeshRequest generates a "aws/request.Request" representing the
  12. // client's request for the CreateMesh operation. The "output" return
  13. // value will be populated with the request's response once the request completes
  14. // successfully.
  15. //
  16. // Use "Send" method on the returned Request to send the API call to the service.
  17. // the "output" return value is not valid until after Send returns without error.
  18. //
  19. // See CreateMesh for more information on using the CreateMesh
  20. // API call, and error handling.
  21. //
  22. // This method is useful when you want to inject custom logic or configuration
  23. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  24. //
  25. //
  26. // // Example sending a request using the CreateMeshRequest method.
  27. // req, resp := client.CreateMeshRequest(params)
  28. //
  29. // err := req.Send()
  30. // if err == nil { // resp is now filled
  31. // fmt.Println(resp)
  32. // }
  33. //
  34. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateMesh
  35. func (c *AppMesh) CreateMeshRequest(input *CreateMeshInput) (req *request.Request, output *CreateMeshOutput) {
  36. op := &request.Operation{
  37. Name: opCreateMesh,
  38. HTTPMethod: "PUT",
  39. HTTPPath: "/meshes",
  40. }
  41. if input == nil {
  42. input = &CreateMeshInput{}
  43. }
  44. output = &CreateMeshOutput{}
  45. req = c.newRequest(op, input, output)
  46. return
  47. }
  48. // CreateMesh API operation for AWS App Mesh.
  49. //
  50. // Creates a new service mesh. A service mesh is a logical boundary for network
  51. // traffic between the services that reside within it.
  52. //
  53. // After you create your service mesh, you can create virtual nodes, virtual
  54. // routers, and routes to distribute traffic between the applications in your
  55. // mesh.
  56. //
  57. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  58. // with awserr.Error's Code and Message methods to get detailed information about
  59. // the error.
  60. //
  61. // See the AWS API reference guide for AWS App Mesh's
  62. // API operation CreateMesh for usage and error information.
  63. //
  64. // Returned Error Codes:
  65. // * ErrCodeBadRequestException "BadRequestException"
  66. // The request syntax was malformed. Check your request syntax and try again.
  67. //
  68. // * ErrCodeConflictException "ConflictException"
  69. // The request contains a client token that was used for a previous update resource
  70. // call with different specifications. Try the request again with a new client
  71. // token.
  72. //
  73. // * ErrCodeForbiddenException "ForbiddenException"
  74. // You do not have permissions to perform this action.
  75. //
  76. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  77. // The request processing has failed because of an unknown error, exception,
  78. // or failure.
  79. //
  80. // * ErrCodeLimitExceededException "LimitExceededException"
  81. // You have exceeded a service limit for your account. For more information,
  82. // see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html)
  83. // in the AWS App Mesh User Guide.
  84. //
  85. // * ErrCodeNotFoundException "NotFoundException"
  86. // The specified resource does not exist. Check your request syntax and try
  87. // again.
  88. //
  89. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  90. // The request has failed due to a temporary failure of the service.
  91. //
  92. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  93. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  94. // for your account. For best results, use an increasing or variable sleep interval
  95. // between requests.
  96. //
  97. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateMesh
  98. func (c *AppMesh) CreateMesh(input *CreateMeshInput) (*CreateMeshOutput, error) {
  99. req, out := c.CreateMeshRequest(input)
  100. return out, req.Send()
  101. }
  102. // CreateMeshWithContext is the same as CreateMesh with the addition of
  103. // the ability to pass a context and additional request options.
  104. //
  105. // See CreateMesh for details on how to use this API operation.
  106. //
  107. // The context must be non-nil and will be used for request cancellation. If
  108. // the context is nil a panic will occur. In the future the SDK may create
  109. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  110. // for more information on using Contexts.
  111. func (c *AppMesh) CreateMeshWithContext(ctx aws.Context, input *CreateMeshInput, opts ...request.Option) (*CreateMeshOutput, error) {
  112. req, out := c.CreateMeshRequest(input)
  113. req.SetContext(ctx)
  114. req.ApplyOptions(opts...)
  115. return out, req.Send()
  116. }
  117. const opCreateRoute = "CreateRoute"
  118. // CreateRouteRequest generates a "aws/request.Request" representing the
  119. // client's request for the CreateRoute operation. The "output" return
  120. // value will be populated with the request's response once the request completes
  121. // successfully.
  122. //
  123. // Use "Send" method on the returned Request to send the API call to the service.
  124. // the "output" return value is not valid until after Send returns without error.
  125. //
  126. // See CreateRoute for more information on using the CreateRoute
  127. // API call, and error handling.
  128. //
  129. // This method is useful when you want to inject custom logic or configuration
  130. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  131. //
  132. //
  133. // // Example sending a request using the CreateRouteRequest method.
  134. // req, resp := client.CreateRouteRequest(params)
  135. //
  136. // err := req.Send()
  137. // if err == nil { // resp is now filled
  138. // fmt.Println(resp)
  139. // }
  140. //
  141. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateRoute
  142. func (c *AppMesh) CreateRouteRequest(input *CreateRouteInput) (req *request.Request, output *CreateRouteOutput) {
  143. op := &request.Operation{
  144. Name: opCreateRoute,
  145. HTTPMethod: "PUT",
  146. HTTPPath: "/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes",
  147. }
  148. if input == nil {
  149. input = &CreateRouteInput{}
  150. }
  151. output = &CreateRouteOutput{}
  152. req = c.newRequest(op, input, output)
  153. return
  154. }
  155. // CreateRoute API operation for AWS App Mesh.
  156. //
  157. // Creates a new route that is associated with a virtual router.
  158. //
  159. // You can use the prefix parameter in your route specification for path-based
  160. // routing of requests. For example, if your virtual router service name is
  161. // my-service.local, and you want the route to match requests to my-service.local/metrics,
  162. // then your prefix should be /metrics.
  163. //
  164. // If your route matches a request, you can distribute traffic to one or more
  165. // target virtual nodes with relative weighting.
  166. //
  167. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  168. // with awserr.Error's Code and Message methods to get detailed information about
  169. // the error.
  170. //
  171. // See the AWS API reference guide for AWS App Mesh's
  172. // API operation CreateRoute for usage and error information.
  173. //
  174. // Returned Error Codes:
  175. // * ErrCodeBadRequestException "BadRequestException"
  176. // The request syntax was malformed. Check your request syntax and try again.
  177. //
  178. // * ErrCodeConflictException "ConflictException"
  179. // The request contains a client token that was used for a previous update resource
  180. // call with different specifications. Try the request again with a new client
  181. // token.
  182. //
  183. // * ErrCodeForbiddenException "ForbiddenException"
  184. // You do not have permissions to perform this action.
  185. //
  186. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  187. // The request processing has failed because of an unknown error, exception,
  188. // or failure.
  189. //
  190. // * ErrCodeLimitExceededException "LimitExceededException"
  191. // You have exceeded a service limit for your account. For more information,
  192. // see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html)
  193. // in the AWS App Mesh User Guide.
  194. //
  195. // * ErrCodeNotFoundException "NotFoundException"
  196. // The specified resource does not exist. Check your request syntax and try
  197. // again.
  198. //
  199. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  200. // The request has failed due to a temporary failure of the service.
  201. //
  202. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  203. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  204. // for your account. For best results, use an increasing or variable sleep interval
  205. // between requests.
  206. //
  207. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateRoute
  208. func (c *AppMesh) CreateRoute(input *CreateRouteInput) (*CreateRouteOutput, error) {
  209. req, out := c.CreateRouteRequest(input)
  210. return out, req.Send()
  211. }
  212. // CreateRouteWithContext is the same as CreateRoute with the addition of
  213. // the ability to pass a context and additional request options.
  214. //
  215. // See CreateRoute for details on how to use this API operation.
  216. //
  217. // The context must be non-nil and will be used for request cancellation. If
  218. // the context is nil a panic will occur. In the future the SDK may create
  219. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  220. // for more information on using Contexts.
  221. func (c *AppMesh) CreateRouteWithContext(ctx aws.Context, input *CreateRouteInput, opts ...request.Option) (*CreateRouteOutput, error) {
  222. req, out := c.CreateRouteRequest(input)
  223. req.SetContext(ctx)
  224. req.ApplyOptions(opts...)
  225. return out, req.Send()
  226. }
  227. const opCreateVirtualNode = "CreateVirtualNode"
  228. // CreateVirtualNodeRequest generates a "aws/request.Request" representing the
  229. // client's request for the CreateVirtualNode operation. The "output" return
  230. // value will be populated with the request's response once the request completes
  231. // successfully.
  232. //
  233. // Use "Send" method on the returned Request to send the API call to the service.
  234. // the "output" return value is not valid until after Send returns without error.
  235. //
  236. // See CreateVirtualNode for more information on using the CreateVirtualNode
  237. // API call, and error handling.
  238. //
  239. // This method is useful when you want to inject custom logic or configuration
  240. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  241. //
  242. //
  243. // // Example sending a request using the CreateVirtualNodeRequest method.
  244. // req, resp := client.CreateVirtualNodeRequest(params)
  245. //
  246. // err := req.Send()
  247. // if err == nil { // resp is now filled
  248. // fmt.Println(resp)
  249. // }
  250. //
  251. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateVirtualNode
  252. func (c *AppMesh) CreateVirtualNodeRequest(input *CreateVirtualNodeInput) (req *request.Request, output *CreateVirtualNodeOutput) {
  253. op := &request.Operation{
  254. Name: opCreateVirtualNode,
  255. HTTPMethod: "PUT",
  256. HTTPPath: "/meshes/{meshName}/virtualNodes",
  257. }
  258. if input == nil {
  259. input = &CreateVirtualNodeInput{}
  260. }
  261. output = &CreateVirtualNodeOutput{}
  262. req = c.newRequest(op, input, output)
  263. return
  264. }
  265. // CreateVirtualNode API operation for AWS App Mesh.
  266. //
  267. // Creates a new virtual node within a service mesh.
  268. //
  269. // A virtual node acts as logical pointer to a particular task group, such as
  270. // an Amazon ECS service or a Kubernetes deployment. When you create a virtual
  271. // node, you must specify the DNS service discovery name for your task group.
  272. //
  273. // Any inbound traffic that your virtual node expects should be specified as
  274. // a listener. Any outbound traffic that your virtual node expects to reach
  275. // should be specified as a backend.
  276. //
  277. // The response metadata for your new virtual node contains the arn that is
  278. // associated with the virtual node. Set this value (either the full ARN or
  279. // the truncated resource name, for example, mesh/default/virtualNode/simpleapp,
  280. // as the APPMESH_VIRTUAL_NODE_NAME environment variable for your task group's
  281. // Envoy proxy container in your task definition or pod spec. This is then mapped
  282. // to the node.id and node.cluster Envoy parameters.
  283. //
  284. // If you require your Envoy stats or tracing to use a different name, you can
  285. // override the node.cluster value that is set by APPMESH_VIRTUAL_NODE_NAME
  286. // with the APPMESH_VIRTUAL_NODE_CLUSTER environment variable.
  287. //
  288. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  289. // with awserr.Error's Code and Message methods to get detailed information about
  290. // the error.
  291. //
  292. // See the AWS API reference guide for AWS App Mesh's
  293. // API operation CreateVirtualNode for usage and error information.
  294. //
  295. // Returned Error Codes:
  296. // * ErrCodeBadRequestException "BadRequestException"
  297. // The request syntax was malformed. Check your request syntax and try again.
  298. //
  299. // * ErrCodeConflictException "ConflictException"
  300. // The request contains a client token that was used for a previous update resource
  301. // call with different specifications. Try the request again with a new client
  302. // token.
  303. //
  304. // * ErrCodeForbiddenException "ForbiddenException"
  305. // You do not have permissions to perform this action.
  306. //
  307. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  308. // The request processing has failed because of an unknown error, exception,
  309. // or failure.
  310. //
  311. // * ErrCodeLimitExceededException "LimitExceededException"
  312. // You have exceeded a service limit for your account. For more information,
  313. // see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html)
  314. // in the AWS App Mesh User Guide.
  315. //
  316. // * ErrCodeNotFoundException "NotFoundException"
  317. // The specified resource does not exist. Check your request syntax and try
  318. // again.
  319. //
  320. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  321. // The request has failed due to a temporary failure of the service.
  322. //
  323. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  324. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  325. // for your account. For best results, use an increasing or variable sleep interval
  326. // between requests.
  327. //
  328. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateVirtualNode
  329. func (c *AppMesh) CreateVirtualNode(input *CreateVirtualNodeInput) (*CreateVirtualNodeOutput, error) {
  330. req, out := c.CreateVirtualNodeRequest(input)
  331. return out, req.Send()
  332. }
  333. // CreateVirtualNodeWithContext is the same as CreateVirtualNode with the addition of
  334. // the ability to pass a context and additional request options.
  335. //
  336. // See CreateVirtualNode for details on how to use this API operation.
  337. //
  338. // The context must be non-nil and will be used for request cancellation. If
  339. // the context is nil a panic will occur. In the future the SDK may create
  340. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  341. // for more information on using Contexts.
  342. func (c *AppMesh) CreateVirtualNodeWithContext(ctx aws.Context, input *CreateVirtualNodeInput, opts ...request.Option) (*CreateVirtualNodeOutput, error) {
  343. req, out := c.CreateVirtualNodeRequest(input)
  344. req.SetContext(ctx)
  345. req.ApplyOptions(opts...)
  346. return out, req.Send()
  347. }
  348. const opCreateVirtualRouter = "CreateVirtualRouter"
  349. // CreateVirtualRouterRequest generates a "aws/request.Request" representing the
  350. // client's request for the CreateVirtualRouter operation. The "output" return
  351. // value will be populated with the request's response once the request completes
  352. // successfully.
  353. //
  354. // Use "Send" method on the returned Request to send the API call to the service.
  355. // the "output" return value is not valid until after Send returns without error.
  356. //
  357. // See CreateVirtualRouter for more information on using the CreateVirtualRouter
  358. // API call, and error handling.
  359. //
  360. // This method is useful when you want to inject custom logic or configuration
  361. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  362. //
  363. //
  364. // // Example sending a request using the CreateVirtualRouterRequest method.
  365. // req, resp := client.CreateVirtualRouterRequest(params)
  366. //
  367. // err := req.Send()
  368. // if err == nil { // resp is now filled
  369. // fmt.Println(resp)
  370. // }
  371. //
  372. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateVirtualRouter
  373. func (c *AppMesh) CreateVirtualRouterRequest(input *CreateVirtualRouterInput) (req *request.Request, output *CreateVirtualRouterOutput) {
  374. op := &request.Operation{
  375. Name: opCreateVirtualRouter,
  376. HTTPMethod: "PUT",
  377. HTTPPath: "/meshes/{meshName}/virtualRouters",
  378. }
  379. if input == nil {
  380. input = &CreateVirtualRouterInput{}
  381. }
  382. output = &CreateVirtualRouterOutput{}
  383. req = c.newRequest(op, input, output)
  384. return
  385. }
  386. // CreateVirtualRouter API operation for AWS App Mesh.
  387. //
  388. // Creates a new virtual router within a service mesh.
  389. //
  390. // Virtual routers handle traffic for one or more service names within your
  391. // mesh. After you create your virtual router, create and associate routes for
  392. // your virtual router that direct incoming requests to different virtual nodes.
  393. //
  394. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  395. // with awserr.Error's Code and Message methods to get detailed information about
  396. // the error.
  397. //
  398. // See the AWS API reference guide for AWS App Mesh's
  399. // API operation CreateVirtualRouter for usage and error information.
  400. //
  401. // Returned Error Codes:
  402. // * ErrCodeBadRequestException "BadRequestException"
  403. // The request syntax was malformed. Check your request syntax and try again.
  404. //
  405. // * ErrCodeConflictException "ConflictException"
  406. // The request contains a client token that was used for a previous update resource
  407. // call with different specifications. Try the request again with a new client
  408. // token.
  409. //
  410. // * ErrCodeForbiddenException "ForbiddenException"
  411. // You do not have permissions to perform this action.
  412. //
  413. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  414. // The request processing has failed because of an unknown error, exception,
  415. // or failure.
  416. //
  417. // * ErrCodeLimitExceededException "LimitExceededException"
  418. // You have exceeded a service limit for your account. For more information,
  419. // see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html)
  420. // in the AWS App Mesh User Guide.
  421. //
  422. // * ErrCodeNotFoundException "NotFoundException"
  423. // The specified resource does not exist. Check your request syntax and try
  424. // again.
  425. //
  426. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  427. // The request has failed due to a temporary failure of the service.
  428. //
  429. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  430. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  431. // for your account. For best results, use an increasing or variable sleep interval
  432. // between requests.
  433. //
  434. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/CreateVirtualRouter
  435. func (c *AppMesh) CreateVirtualRouter(input *CreateVirtualRouterInput) (*CreateVirtualRouterOutput, error) {
  436. req, out := c.CreateVirtualRouterRequest(input)
  437. return out, req.Send()
  438. }
  439. // CreateVirtualRouterWithContext is the same as CreateVirtualRouter with the addition of
  440. // the ability to pass a context and additional request options.
  441. //
  442. // See CreateVirtualRouter for details on how to use this API operation.
  443. //
  444. // The context must be non-nil and will be used for request cancellation. If
  445. // the context is nil a panic will occur. In the future the SDK may create
  446. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  447. // for more information on using Contexts.
  448. func (c *AppMesh) CreateVirtualRouterWithContext(ctx aws.Context, input *CreateVirtualRouterInput, opts ...request.Option) (*CreateVirtualRouterOutput, error) {
  449. req, out := c.CreateVirtualRouterRequest(input)
  450. req.SetContext(ctx)
  451. req.ApplyOptions(opts...)
  452. return out, req.Send()
  453. }
  454. const opDeleteMesh = "DeleteMesh"
  455. // DeleteMeshRequest generates a "aws/request.Request" representing the
  456. // client's request for the DeleteMesh operation. The "output" return
  457. // value will be populated with the request's response once the request completes
  458. // successfully.
  459. //
  460. // Use "Send" method on the returned Request to send the API call to the service.
  461. // the "output" return value is not valid until after Send returns without error.
  462. //
  463. // See DeleteMesh for more information on using the DeleteMesh
  464. // API call, and error handling.
  465. //
  466. // This method is useful when you want to inject custom logic or configuration
  467. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  468. //
  469. //
  470. // // Example sending a request using the DeleteMeshRequest method.
  471. // req, resp := client.DeleteMeshRequest(params)
  472. //
  473. // err := req.Send()
  474. // if err == nil { // resp is now filled
  475. // fmt.Println(resp)
  476. // }
  477. //
  478. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteMesh
  479. func (c *AppMesh) DeleteMeshRequest(input *DeleteMeshInput) (req *request.Request, output *DeleteMeshOutput) {
  480. op := &request.Operation{
  481. Name: opDeleteMesh,
  482. HTTPMethod: "DELETE",
  483. HTTPPath: "/meshes/{meshName}",
  484. }
  485. if input == nil {
  486. input = &DeleteMeshInput{}
  487. }
  488. output = &DeleteMeshOutput{}
  489. req = c.newRequest(op, input, output)
  490. return
  491. }
  492. // DeleteMesh API operation for AWS App Mesh.
  493. //
  494. // Deletes an existing service mesh.
  495. //
  496. // You must delete all resources (routes, virtual routers, virtual nodes) in
  497. // the service mesh before you can delete the mesh itself.
  498. //
  499. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  500. // with awserr.Error's Code and Message methods to get detailed information about
  501. // the error.
  502. //
  503. // See the AWS API reference guide for AWS App Mesh's
  504. // API operation DeleteMesh for usage and error information.
  505. //
  506. // Returned Error Codes:
  507. // * ErrCodeBadRequestException "BadRequestException"
  508. // The request syntax was malformed. Check your request syntax and try again.
  509. //
  510. // * ErrCodeForbiddenException "ForbiddenException"
  511. // You do not have permissions to perform this action.
  512. //
  513. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  514. // The request processing has failed because of an unknown error, exception,
  515. // or failure.
  516. //
  517. // * ErrCodeNotFoundException "NotFoundException"
  518. // The specified resource does not exist. Check your request syntax and try
  519. // again.
  520. //
  521. // * ErrCodeResourceInUseException "ResourceInUseException"
  522. // You cannot delete the specified resource because it is in use or required
  523. // by another resource.
  524. //
  525. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  526. // The request has failed due to a temporary failure of the service.
  527. //
  528. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  529. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  530. // for your account. For best results, use an increasing or variable sleep interval
  531. // between requests.
  532. //
  533. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteMesh
  534. func (c *AppMesh) DeleteMesh(input *DeleteMeshInput) (*DeleteMeshOutput, error) {
  535. req, out := c.DeleteMeshRequest(input)
  536. return out, req.Send()
  537. }
  538. // DeleteMeshWithContext is the same as DeleteMesh with the addition of
  539. // the ability to pass a context and additional request options.
  540. //
  541. // See DeleteMesh for details on how to use this API operation.
  542. //
  543. // The context must be non-nil and will be used for request cancellation. If
  544. // the context is nil a panic will occur. In the future the SDK may create
  545. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  546. // for more information on using Contexts.
  547. func (c *AppMesh) DeleteMeshWithContext(ctx aws.Context, input *DeleteMeshInput, opts ...request.Option) (*DeleteMeshOutput, error) {
  548. req, out := c.DeleteMeshRequest(input)
  549. req.SetContext(ctx)
  550. req.ApplyOptions(opts...)
  551. return out, req.Send()
  552. }
  553. const opDeleteRoute = "DeleteRoute"
  554. // DeleteRouteRequest generates a "aws/request.Request" representing the
  555. // client's request for the DeleteRoute operation. The "output" return
  556. // value will be populated with the request's response once the request completes
  557. // successfully.
  558. //
  559. // Use "Send" method on the returned Request to send the API call to the service.
  560. // the "output" return value is not valid until after Send returns without error.
  561. //
  562. // See DeleteRoute for more information on using the DeleteRoute
  563. // API call, and error handling.
  564. //
  565. // This method is useful when you want to inject custom logic or configuration
  566. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  567. //
  568. //
  569. // // Example sending a request using the DeleteRouteRequest method.
  570. // req, resp := client.DeleteRouteRequest(params)
  571. //
  572. // err := req.Send()
  573. // if err == nil { // resp is now filled
  574. // fmt.Println(resp)
  575. // }
  576. //
  577. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteRoute
  578. func (c *AppMesh) DeleteRouteRequest(input *DeleteRouteInput) (req *request.Request, output *DeleteRouteOutput) {
  579. op := &request.Operation{
  580. Name: opDeleteRoute,
  581. HTTPMethod: "DELETE",
  582. HTTPPath: "/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes/{routeName}",
  583. }
  584. if input == nil {
  585. input = &DeleteRouteInput{}
  586. }
  587. output = &DeleteRouteOutput{}
  588. req = c.newRequest(op, input, output)
  589. return
  590. }
  591. // DeleteRoute API operation for AWS App Mesh.
  592. //
  593. // Deletes an existing route.
  594. //
  595. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  596. // with awserr.Error's Code and Message methods to get detailed information about
  597. // the error.
  598. //
  599. // See the AWS API reference guide for AWS App Mesh's
  600. // API operation DeleteRoute for usage and error information.
  601. //
  602. // Returned Error Codes:
  603. // * ErrCodeBadRequestException "BadRequestException"
  604. // The request syntax was malformed. Check your request syntax and try again.
  605. //
  606. // * ErrCodeForbiddenException "ForbiddenException"
  607. // You do not have permissions to perform this action.
  608. //
  609. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  610. // The request processing has failed because of an unknown error, exception,
  611. // or failure.
  612. //
  613. // * ErrCodeNotFoundException "NotFoundException"
  614. // The specified resource does not exist. Check your request syntax and try
  615. // again.
  616. //
  617. // * ErrCodeResourceInUseException "ResourceInUseException"
  618. // You cannot delete the specified resource because it is in use or required
  619. // by another resource.
  620. //
  621. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  622. // The request has failed due to a temporary failure of the service.
  623. //
  624. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  625. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  626. // for your account. For best results, use an increasing or variable sleep interval
  627. // between requests.
  628. //
  629. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteRoute
  630. func (c *AppMesh) DeleteRoute(input *DeleteRouteInput) (*DeleteRouteOutput, error) {
  631. req, out := c.DeleteRouteRequest(input)
  632. return out, req.Send()
  633. }
  634. // DeleteRouteWithContext is the same as DeleteRoute with the addition of
  635. // the ability to pass a context and additional request options.
  636. //
  637. // See DeleteRoute for details on how to use this API operation.
  638. //
  639. // The context must be non-nil and will be used for request cancellation. If
  640. // the context is nil a panic will occur. In the future the SDK may create
  641. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  642. // for more information on using Contexts.
  643. func (c *AppMesh) DeleteRouteWithContext(ctx aws.Context, input *DeleteRouteInput, opts ...request.Option) (*DeleteRouteOutput, error) {
  644. req, out := c.DeleteRouteRequest(input)
  645. req.SetContext(ctx)
  646. req.ApplyOptions(opts...)
  647. return out, req.Send()
  648. }
  649. const opDeleteVirtualNode = "DeleteVirtualNode"
  650. // DeleteVirtualNodeRequest generates a "aws/request.Request" representing the
  651. // client's request for the DeleteVirtualNode operation. The "output" return
  652. // value will be populated with the request's response once the request completes
  653. // successfully.
  654. //
  655. // Use "Send" method on the returned Request to send the API call to the service.
  656. // the "output" return value is not valid until after Send returns without error.
  657. //
  658. // See DeleteVirtualNode for more information on using the DeleteVirtualNode
  659. // API call, and error handling.
  660. //
  661. // This method is useful when you want to inject custom logic or configuration
  662. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  663. //
  664. //
  665. // // Example sending a request using the DeleteVirtualNodeRequest method.
  666. // req, resp := client.DeleteVirtualNodeRequest(params)
  667. //
  668. // err := req.Send()
  669. // if err == nil { // resp is now filled
  670. // fmt.Println(resp)
  671. // }
  672. //
  673. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteVirtualNode
  674. func (c *AppMesh) DeleteVirtualNodeRequest(input *DeleteVirtualNodeInput) (req *request.Request, output *DeleteVirtualNodeOutput) {
  675. op := &request.Operation{
  676. Name: opDeleteVirtualNode,
  677. HTTPMethod: "DELETE",
  678. HTTPPath: "/meshes/{meshName}/virtualNodes/{virtualNodeName}",
  679. }
  680. if input == nil {
  681. input = &DeleteVirtualNodeInput{}
  682. }
  683. output = &DeleteVirtualNodeOutput{}
  684. req = c.newRequest(op, input, output)
  685. return
  686. }
  687. // DeleteVirtualNode API operation for AWS App Mesh.
  688. //
  689. // Deletes an existing virtual node.
  690. //
  691. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  692. // with awserr.Error's Code and Message methods to get detailed information about
  693. // the error.
  694. //
  695. // See the AWS API reference guide for AWS App Mesh's
  696. // API operation DeleteVirtualNode for usage and error information.
  697. //
  698. // Returned Error Codes:
  699. // * ErrCodeBadRequestException "BadRequestException"
  700. // The request syntax was malformed. Check your request syntax and try again.
  701. //
  702. // * ErrCodeForbiddenException "ForbiddenException"
  703. // You do not have permissions to perform this action.
  704. //
  705. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  706. // The request processing has failed because of an unknown error, exception,
  707. // or failure.
  708. //
  709. // * ErrCodeNotFoundException "NotFoundException"
  710. // The specified resource does not exist. Check your request syntax and try
  711. // again.
  712. //
  713. // * ErrCodeResourceInUseException "ResourceInUseException"
  714. // You cannot delete the specified resource because it is in use or required
  715. // by another resource.
  716. //
  717. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  718. // The request has failed due to a temporary failure of the service.
  719. //
  720. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  721. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  722. // for your account. For best results, use an increasing or variable sleep interval
  723. // between requests.
  724. //
  725. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteVirtualNode
  726. func (c *AppMesh) DeleteVirtualNode(input *DeleteVirtualNodeInput) (*DeleteVirtualNodeOutput, error) {
  727. req, out := c.DeleteVirtualNodeRequest(input)
  728. return out, req.Send()
  729. }
  730. // DeleteVirtualNodeWithContext is the same as DeleteVirtualNode with the addition of
  731. // the ability to pass a context and additional request options.
  732. //
  733. // See DeleteVirtualNode for details on how to use this API operation.
  734. //
  735. // The context must be non-nil and will be used for request cancellation. If
  736. // the context is nil a panic will occur. In the future the SDK may create
  737. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  738. // for more information on using Contexts.
  739. func (c *AppMesh) DeleteVirtualNodeWithContext(ctx aws.Context, input *DeleteVirtualNodeInput, opts ...request.Option) (*DeleteVirtualNodeOutput, error) {
  740. req, out := c.DeleteVirtualNodeRequest(input)
  741. req.SetContext(ctx)
  742. req.ApplyOptions(opts...)
  743. return out, req.Send()
  744. }
  745. const opDeleteVirtualRouter = "DeleteVirtualRouter"
  746. // DeleteVirtualRouterRequest generates a "aws/request.Request" representing the
  747. // client's request for the DeleteVirtualRouter operation. The "output" return
  748. // value will be populated with the request's response once the request completes
  749. // successfully.
  750. //
  751. // Use "Send" method on the returned Request to send the API call to the service.
  752. // the "output" return value is not valid until after Send returns without error.
  753. //
  754. // See DeleteVirtualRouter for more information on using the DeleteVirtualRouter
  755. // API call, and error handling.
  756. //
  757. // This method is useful when you want to inject custom logic or configuration
  758. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  759. //
  760. //
  761. // // Example sending a request using the DeleteVirtualRouterRequest method.
  762. // req, resp := client.DeleteVirtualRouterRequest(params)
  763. //
  764. // err := req.Send()
  765. // if err == nil { // resp is now filled
  766. // fmt.Println(resp)
  767. // }
  768. //
  769. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteVirtualRouter
  770. func (c *AppMesh) DeleteVirtualRouterRequest(input *DeleteVirtualRouterInput) (req *request.Request, output *DeleteVirtualRouterOutput) {
  771. op := &request.Operation{
  772. Name: opDeleteVirtualRouter,
  773. HTTPMethod: "DELETE",
  774. HTTPPath: "/meshes/{meshName}/virtualRouters/{virtualRouterName}",
  775. }
  776. if input == nil {
  777. input = &DeleteVirtualRouterInput{}
  778. }
  779. output = &DeleteVirtualRouterOutput{}
  780. req = c.newRequest(op, input, output)
  781. return
  782. }
  783. // DeleteVirtualRouter API operation for AWS App Mesh.
  784. //
  785. // Deletes an existing virtual router.
  786. //
  787. // You must delete any routes associated with the virtual router before you
  788. // can delete the router itself.
  789. //
  790. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  791. // with awserr.Error's Code and Message methods to get detailed information about
  792. // the error.
  793. //
  794. // See the AWS API reference guide for AWS App Mesh's
  795. // API operation DeleteVirtualRouter for usage and error information.
  796. //
  797. // Returned Error Codes:
  798. // * ErrCodeBadRequestException "BadRequestException"
  799. // The request syntax was malformed. Check your request syntax and try again.
  800. //
  801. // * ErrCodeForbiddenException "ForbiddenException"
  802. // You do not have permissions to perform this action.
  803. //
  804. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  805. // The request processing has failed because of an unknown error, exception,
  806. // or failure.
  807. //
  808. // * ErrCodeNotFoundException "NotFoundException"
  809. // The specified resource does not exist. Check your request syntax and try
  810. // again.
  811. //
  812. // * ErrCodeResourceInUseException "ResourceInUseException"
  813. // You cannot delete the specified resource because it is in use or required
  814. // by another resource.
  815. //
  816. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  817. // The request has failed due to a temporary failure of the service.
  818. //
  819. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  820. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  821. // for your account. For best results, use an increasing or variable sleep interval
  822. // between requests.
  823. //
  824. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DeleteVirtualRouter
  825. func (c *AppMesh) DeleteVirtualRouter(input *DeleteVirtualRouterInput) (*DeleteVirtualRouterOutput, error) {
  826. req, out := c.DeleteVirtualRouterRequest(input)
  827. return out, req.Send()
  828. }
  829. // DeleteVirtualRouterWithContext is the same as DeleteVirtualRouter with the addition of
  830. // the ability to pass a context and additional request options.
  831. //
  832. // See DeleteVirtualRouter for details on how to use this API operation.
  833. //
  834. // The context must be non-nil and will be used for request cancellation. If
  835. // the context is nil a panic will occur. In the future the SDK may create
  836. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  837. // for more information on using Contexts.
  838. func (c *AppMesh) DeleteVirtualRouterWithContext(ctx aws.Context, input *DeleteVirtualRouterInput, opts ...request.Option) (*DeleteVirtualRouterOutput, error) {
  839. req, out := c.DeleteVirtualRouterRequest(input)
  840. req.SetContext(ctx)
  841. req.ApplyOptions(opts...)
  842. return out, req.Send()
  843. }
  844. const opDescribeMesh = "DescribeMesh"
  845. // DescribeMeshRequest generates a "aws/request.Request" representing the
  846. // client's request for the DescribeMesh operation. The "output" return
  847. // value will be populated with the request's response once the request completes
  848. // successfully.
  849. //
  850. // Use "Send" method on the returned Request to send the API call to the service.
  851. // the "output" return value is not valid until after Send returns without error.
  852. //
  853. // See DescribeMesh for more information on using the DescribeMesh
  854. // API call, and error handling.
  855. //
  856. // This method is useful when you want to inject custom logic or configuration
  857. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  858. //
  859. //
  860. // // Example sending a request using the DescribeMeshRequest method.
  861. // req, resp := client.DescribeMeshRequest(params)
  862. //
  863. // err := req.Send()
  864. // if err == nil { // resp is now filled
  865. // fmt.Println(resp)
  866. // }
  867. //
  868. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeMesh
  869. func (c *AppMesh) DescribeMeshRequest(input *DescribeMeshInput) (req *request.Request, output *DescribeMeshOutput) {
  870. op := &request.Operation{
  871. Name: opDescribeMesh,
  872. HTTPMethod: "GET",
  873. HTTPPath: "/meshes/{meshName}",
  874. }
  875. if input == nil {
  876. input = &DescribeMeshInput{}
  877. }
  878. output = &DescribeMeshOutput{}
  879. req = c.newRequest(op, input, output)
  880. return
  881. }
  882. // DescribeMesh API operation for AWS App Mesh.
  883. //
  884. // Describes an existing service mesh.
  885. //
  886. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  887. // with awserr.Error's Code and Message methods to get detailed information about
  888. // the error.
  889. //
  890. // See the AWS API reference guide for AWS App Mesh's
  891. // API operation DescribeMesh for usage and error information.
  892. //
  893. // Returned Error Codes:
  894. // * ErrCodeBadRequestException "BadRequestException"
  895. // The request syntax was malformed. Check your request syntax and try again.
  896. //
  897. // * ErrCodeForbiddenException "ForbiddenException"
  898. // You do not have permissions to perform this action.
  899. //
  900. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  901. // The request processing has failed because of an unknown error, exception,
  902. // or failure.
  903. //
  904. // * ErrCodeNotFoundException "NotFoundException"
  905. // The specified resource does not exist. Check your request syntax and try
  906. // again.
  907. //
  908. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  909. // The request has failed due to a temporary failure of the service.
  910. //
  911. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  912. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  913. // for your account. For best results, use an increasing or variable sleep interval
  914. // between requests.
  915. //
  916. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeMesh
  917. func (c *AppMesh) DescribeMesh(input *DescribeMeshInput) (*DescribeMeshOutput, error) {
  918. req, out := c.DescribeMeshRequest(input)
  919. return out, req.Send()
  920. }
  921. // DescribeMeshWithContext is the same as DescribeMesh with the addition of
  922. // the ability to pass a context and additional request options.
  923. //
  924. // See DescribeMesh for details on how to use this API operation.
  925. //
  926. // The context must be non-nil and will be used for request cancellation. If
  927. // the context is nil a panic will occur. In the future the SDK may create
  928. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  929. // for more information on using Contexts.
  930. func (c *AppMesh) DescribeMeshWithContext(ctx aws.Context, input *DescribeMeshInput, opts ...request.Option) (*DescribeMeshOutput, error) {
  931. req, out := c.DescribeMeshRequest(input)
  932. req.SetContext(ctx)
  933. req.ApplyOptions(opts...)
  934. return out, req.Send()
  935. }
  936. const opDescribeRoute = "DescribeRoute"
  937. // DescribeRouteRequest generates a "aws/request.Request" representing the
  938. // client's request for the DescribeRoute operation. The "output" return
  939. // value will be populated with the request's response once the request completes
  940. // successfully.
  941. //
  942. // Use "Send" method on the returned Request to send the API call to the service.
  943. // the "output" return value is not valid until after Send returns without error.
  944. //
  945. // See DescribeRoute for more information on using the DescribeRoute
  946. // API call, and error handling.
  947. //
  948. // This method is useful when you want to inject custom logic or configuration
  949. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  950. //
  951. //
  952. // // Example sending a request using the DescribeRouteRequest method.
  953. // req, resp := client.DescribeRouteRequest(params)
  954. //
  955. // err := req.Send()
  956. // if err == nil { // resp is now filled
  957. // fmt.Println(resp)
  958. // }
  959. //
  960. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeRoute
  961. func (c *AppMesh) DescribeRouteRequest(input *DescribeRouteInput) (req *request.Request, output *DescribeRouteOutput) {
  962. op := &request.Operation{
  963. Name: opDescribeRoute,
  964. HTTPMethod: "GET",
  965. HTTPPath: "/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes/{routeName}",
  966. }
  967. if input == nil {
  968. input = &DescribeRouteInput{}
  969. }
  970. output = &DescribeRouteOutput{}
  971. req = c.newRequest(op, input, output)
  972. return
  973. }
  974. // DescribeRoute API operation for AWS App Mesh.
  975. //
  976. // Describes an existing route.
  977. //
  978. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  979. // with awserr.Error's Code and Message methods to get detailed information about
  980. // the error.
  981. //
  982. // See the AWS API reference guide for AWS App Mesh's
  983. // API operation DescribeRoute for usage and error information.
  984. //
  985. // Returned Error Codes:
  986. // * ErrCodeBadRequestException "BadRequestException"
  987. // The request syntax was malformed. Check your request syntax and try again.
  988. //
  989. // * ErrCodeForbiddenException "ForbiddenException"
  990. // You do not have permissions to perform this action.
  991. //
  992. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  993. // The request processing has failed because of an unknown error, exception,
  994. // or failure.
  995. //
  996. // * ErrCodeNotFoundException "NotFoundException"
  997. // The specified resource does not exist. Check your request syntax and try
  998. // again.
  999. //
  1000. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1001. // The request has failed due to a temporary failure of the service.
  1002. //
  1003. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1004. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  1005. // for your account. For best results, use an increasing or variable sleep interval
  1006. // between requests.
  1007. //
  1008. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeRoute
  1009. func (c *AppMesh) DescribeRoute(input *DescribeRouteInput) (*DescribeRouteOutput, error) {
  1010. req, out := c.DescribeRouteRequest(input)
  1011. return out, req.Send()
  1012. }
  1013. // DescribeRouteWithContext is the same as DescribeRoute with the addition of
  1014. // the ability to pass a context and additional request options.
  1015. //
  1016. // See DescribeRoute for details on how to use this API operation.
  1017. //
  1018. // The context must be non-nil and will be used for request cancellation. If
  1019. // the context is nil a panic will occur. In the future the SDK may create
  1020. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1021. // for more information on using Contexts.
  1022. func (c *AppMesh) DescribeRouteWithContext(ctx aws.Context, input *DescribeRouteInput, opts ...request.Option) (*DescribeRouteOutput, error) {
  1023. req, out := c.DescribeRouteRequest(input)
  1024. req.SetContext(ctx)
  1025. req.ApplyOptions(opts...)
  1026. return out, req.Send()
  1027. }
  1028. const opDescribeVirtualNode = "DescribeVirtualNode"
  1029. // DescribeVirtualNodeRequest generates a "aws/request.Request" representing the
  1030. // client's request for the DescribeVirtualNode operation. The "output" return
  1031. // value will be populated with the request's response once the request completes
  1032. // successfully.
  1033. //
  1034. // Use "Send" method on the returned Request to send the API call to the service.
  1035. // the "output" return value is not valid until after Send returns without error.
  1036. //
  1037. // See DescribeVirtualNode for more information on using the DescribeVirtualNode
  1038. // API call, and error handling.
  1039. //
  1040. // This method is useful when you want to inject custom logic or configuration
  1041. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1042. //
  1043. //
  1044. // // Example sending a request using the DescribeVirtualNodeRequest method.
  1045. // req, resp := client.DescribeVirtualNodeRequest(params)
  1046. //
  1047. // err := req.Send()
  1048. // if err == nil { // resp is now filled
  1049. // fmt.Println(resp)
  1050. // }
  1051. //
  1052. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeVirtualNode
  1053. func (c *AppMesh) DescribeVirtualNodeRequest(input *DescribeVirtualNodeInput) (req *request.Request, output *DescribeVirtualNodeOutput) {
  1054. op := &request.Operation{
  1055. Name: opDescribeVirtualNode,
  1056. HTTPMethod: "GET",
  1057. HTTPPath: "/meshes/{meshName}/virtualNodes/{virtualNodeName}",
  1058. }
  1059. if input == nil {
  1060. input = &DescribeVirtualNodeInput{}
  1061. }
  1062. output = &DescribeVirtualNodeOutput{}
  1063. req = c.newRequest(op, input, output)
  1064. return
  1065. }
  1066. // DescribeVirtualNode API operation for AWS App Mesh.
  1067. //
  1068. // Describes an existing virtual node.
  1069. //
  1070. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1071. // with awserr.Error's Code and Message methods to get detailed information about
  1072. // the error.
  1073. //
  1074. // See the AWS API reference guide for AWS App Mesh's
  1075. // API operation DescribeVirtualNode for usage and error information.
  1076. //
  1077. // Returned Error Codes:
  1078. // * ErrCodeBadRequestException "BadRequestException"
  1079. // The request syntax was malformed. Check your request syntax and try again.
  1080. //
  1081. // * ErrCodeForbiddenException "ForbiddenException"
  1082. // You do not have permissions to perform this action.
  1083. //
  1084. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  1085. // The request processing has failed because of an unknown error, exception,
  1086. // or failure.
  1087. //
  1088. // * ErrCodeNotFoundException "NotFoundException"
  1089. // The specified resource does not exist. Check your request syntax and try
  1090. // again.
  1091. //
  1092. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1093. // The request has failed due to a temporary failure of the service.
  1094. //
  1095. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1096. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  1097. // for your account. For best results, use an increasing or variable sleep interval
  1098. // between requests.
  1099. //
  1100. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeVirtualNode
  1101. func (c *AppMesh) DescribeVirtualNode(input *DescribeVirtualNodeInput) (*DescribeVirtualNodeOutput, error) {
  1102. req, out := c.DescribeVirtualNodeRequest(input)
  1103. return out, req.Send()
  1104. }
  1105. // DescribeVirtualNodeWithContext is the same as DescribeVirtualNode with the addition of
  1106. // the ability to pass a context and additional request options.
  1107. //
  1108. // See DescribeVirtualNode for details on how to use this API operation.
  1109. //
  1110. // The context must be non-nil and will be used for request cancellation. If
  1111. // the context is nil a panic will occur. In the future the SDK may create
  1112. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1113. // for more information on using Contexts.
  1114. func (c *AppMesh) DescribeVirtualNodeWithContext(ctx aws.Context, input *DescribeVirtualNodeInput, opts ...request.Option) (*DescribeVirtualNodeOutput, error) {
  1115. req, out := c.DescribeVirtualNodeRequest(input)
  1116. req.SetContext(ctx)
  1117. req.ApplyOptions(opts...)
  1118. return out, req.Send()
  1119. }
  1120. const opDescribeVirtualRouter = "DescribeVirtualRouter"
  1121. // DescribeVirtualRouterRequest generates a "aws/request.Request" representing the
  1122. // client's request for the DescribeVirtualRouter operation. The "output" return
  1123. // value will be populated with the request's response once the request completes
  1124. // successfully.
  1125. //
  1126. // Use "Send" method on the returned Request to send the API call to the service.
  1127. // the "output" return value is not valid until after Send returns without error.
  1128. //
  1129. // See DescribeVirtualRouter for more information on using the DescribeVirtualRouter
  1130. // API call, and error handling.
  1131. //
  1132. // This method is useful when you want to inject custom logic or configuration
  1133. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1134. //
  1135. //
  1136. // // Example sending a request using the DescribeVirtualRouterRequest method.
  1137. // req, resp := client.DescribeVirtualRouterRequest(params)
  1138. //
  1139. // err := req.Send()
  1140. // if err == nil { // resp is now filled
  1141. // fmt.Println(resp)
  1142. // }
  1143. //
  1144. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeVirtualRouter
  1145. func (c *AppMesh) DescribeVirtualRouterRequest(input *DescribeVirtualRouterInput) (req *request.Request, output *DescribeVirtualRouterOutput) {
  1146. op := &request.Operation{
  1147. Name: opDescribeVirtualRouter,
  1148. HTTPMethod: "GET",
  1149. HTTPPath: "/meshes/{meshName}/virtualRouters/{virtualRouterName}",
  1150. }
  1151. if input == nil {
  1152. input = &DescribeVirtualRouterInput{}
  1153. }
  1154. output = &DescribeVirtualRouterOutput{}
  1155. req = c.newRequest(op, input, output)
  1156. return
  1157. }
  1158. // DescribeVirtualRouter API operation for AWS App Mesh.
  1159. //
  1160. // Describes an existing virtual router.
  1161. //
  1162. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1163. // with awserr.Error's Code and Message methods to get detailed information about
  1164. // the error.
  1165. //
  1166. // See the AWS API reference guide for AWS App Mesh's
  1167. // API operation DescribeVirtualRouter for usage and error information.
  1168. //
  1169. // Returned Error Codes:
  1170. // * ErrCodeBadRequestException "BadRequestException"
  1171. // The request syntax was malformed. Check your request syntax and try again.
  1172. //
  1173. // * ErrCodeForbiddenException "ForbiddenException"
  1174. // You do not have permissions to perform this action.
  1175. //
  1176. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  1177. // The request processing has failed because of an unknown error, exception,
  1178. // or failure.
  1179. //
  1180. // * ErrCodeNotFoundException "NotFoundException"
  1181. // The specified resource does not exist. Check your request syntax and try
  1182. // again.
  1183. //
  1184. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1185. // The request has failed due to a temporary failure of the service.
  1186. //
  1187. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1188. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  1189. // for your account. For best results, use an increasing or variable sleep interval
  1190. // between requests.
  1191. //
  1192. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/DescribeVirtualRouter
  1193. func (c *AppMesh) DescribeVirtualRouter(input *DescribeVirtualRouterInput) (*DescribeVirtualRouterOutput, error) {
  1194. req, out := c.DescribeVirtualRouterRequest(input)
  1195. return out, req.Send()
  1196. }
  1197. // DescribeVirtualRouterWithContext is the same as DescribeVirtualRouter with the addition of
  1198. // the ability to pass a context and additional request options.
  1199. //
  1200. // See DescribeVirtualRouter for details on how to use this API operation.
  1201. //
  1202. // The context must be non-nil and will be used for request cancellation. If
  1203. // the context is nil a panic will occur. In the future the SDK may create
  1204. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1205. // for more information on using Contexts.
  1206. func (c *AppMesh) DescribeVirtualRouterWithContext(ctx aws.Context, input *DescribeVirtualRouterInput, opts ...request.Option) (*DescribeVirtualRouterOutput, error) {
  1207. req, out := c.DescribeVirtualRouterRequest(input)
  1208. req.SetContext(ctx)
  1209. req.ApplyOptions(opts...)
  1210. return out, req.Send()
  1211. }
  1212. const opListMeshes = "ListMeshes"
  1213. // ListMeshesRequest generates a "aws/request.Request" representing the
  1214. // client's request for the ListMeshes operation. The "output" return
  1215. // value will be populated with the request's response once the request completes
  1216. // successfully.
  1217. //
  1218. // Use "Send" method on the returned Request to send the API call to the service.
  1219. // the "output" return value is not valid until after Send returns without error.
  1220. //
  1221. // See ListMeshes for more information on using the ListMeshes
  1222. // API call, and error handling.
  1223. //
  1224. // This method is useful when you want to inject custom logic or configuration
  1225. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1226. //
  1227. //
  1228. // // Example sending a request using the ListMeshesRequest method.
  1229. // req, resp := client.ListMeshesRequest(params)
  1230. //
  1231. // err := req.Send()
  1232. // if err == nil { // resp is now filled
  1233. // fmt.Println(resp)
  1234. // }
  1235. //
  1236. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListMeshes
  1237. func (c *AppMesh) ListMeshesRequest(input *ListMeshesInput) (req *request.Request, output *ListMeshesOutput) {
  1238. op := &request.Operation{
  1239. Name: opListMeshes,
  1240. HTTPMethod: "GET",
  1241. HTTPPath: "/meshes",
  1242. Paginator: &request.Paginator{
  1243. InputTokens: []string{"nextToken"},
  1244. OutputTokens: []string{"nextToken"},
  1245. LimitToken: "limit",
  1246. TruncationToken: "",
  1247. },
  1248. }
  1249. if input == nil {
  1250. input = &ListMeshesInput{}
  1251. }
  1252. output = &ListMeshesOutput{}
  1253. req = c.newRequest(op, input, output)
  1254. return
  1255. }
  1256. // ListMeshes API operation for AWS App Mesh.
  1257. //
  1258. // Returns a list of existing service meshes.
  1259. //
  1260. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1261. // with awserr.Error's Code and Message methods to get detailed information about
  1262. // the error.
  1263. //
  1264. // See the AWS API reference guide for AWS App Mesh's
  1265. // API operation ListMeshes for usage and error information.
  1266. //
  1267. // Returned Error Codes:
  1268. // * ErrCodeBadRequestException "BadRequestException"
  1269. // The request syntax was malformed. Check your request syntax and try again.
  1270. //
  1271. // * ErrCodeForbiddenException "ForbiddenException"
  1272. // You do not have permissions to perform this action.
  1273. //
  1274. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  1275. // The request processing has failed because of an unknown error, exception,
  1276. // or failure.
  1277. //
  1278. // * ErrCodeNotFoundException "NotFoundException"
  1279. // The specified resource does not exist. Check your request syntax and try
  1280. // again.
  1281. //
  1282. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1283. // The request has failed due to a temporary failure of the service.
  1284. //
  1285. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1286. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  1287. // for your account. For best results, use an increasing or variable sleep interval
  1288. // between requests.
  1289. //
  1290. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListMeshes
  1291. func (c *AppMesh) ListMeshes(input *ListMeshesInput) (*ListMeshesOutput, error) {
  1292. req, out := c.ListMeshesRequest(input)
  1293. return out, req.Send()
  1294. }
  1295. // ListMeshesWithContext is the same as ListMeshes with the addition of
  1296. // the ability to pass a context and additional request options.
  1297. //
  1298. // See ListMeshes for details on how to use this API operation.
  1299. //
  1300. // The context must be non-nil and will be used for request cancellation. If
  1301. // the context is nil a panic will occur. In the future the SDK may create
  1302. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1303. // for more information on using Contexts.
  1304. func (c *AppMesh) ListMeshesWithContext(ctx aws.Context, input *ListMeshesInput, opts ...request.Option) (*ListMeshesOutput, error) {
  1305. req, out := c.ListMeshesRequest(input)
  1306. req.SetContext(ctx)
  1307. req.ApplyOptions(opts...)
  1308. return out, req.Send()
  1309. }
  1310. // ListMeshesPages iterates over the pages of a ListMeshes operation,
  1311. // calling the "fn" function with the response data for each page. To stop
  1312. // iterating, return false from the fn function.
  1313. //
  1314. // See ListMeshes method for more information on how to use this operation.
  1315. //
  1316. // Note: This operation can generate multiple requests to a service.
  1317. //
  1318. // // Example iterating over at most 3 pages of a ListMeshes operation.
  1319. // pageNum := 0
  1320. // err := client.ListMeshesPages(params,
  1321. // func(page *ListMeshesOutput, lastPage bool) bool {
  1322. // pageNum++
  1323. // fmt.Println(page)
  1324. // return pageNum <= 3
  1325. // })
  1326. //
  1327. func (c *AppMesh) ListMeshesPages(input *ListMeshesInput, fn func(*ListMeshesOutput, bool) bool) error {
  1328. return c.ListMeshesPagesWithContext(aws.BackgroundContext(), input, fn)
  1329. }
  1330. // ListMeshesPagesWithContext same as ListMeshesPages except
  1331. // it takes a Context and allows setting request options on the pages.
  1332. //
  1333. // The context must be non-nil and will be used for request cancellation. If
  1334. // the context is nil a panic will occur. In the future the SDK may create
  1335. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1336. // for more information on using Contexts.
  1337. func (c *AppMesh) ListMeshesPagesWithContext(ctx aws.Context, input *ListMeshesInput, fn func(*ListMeshesOutput, bool) bool, opts ...request.Option) error {
  1338. p := request.Pagination{
  1339. NewRequest: func() (*request.Request, error) {
  1340. var inCpy *ListMeshesInput
  1341. if input != nil {
  1342. tmp := *input
  1343. inCpy = &tmp
  1344. }
  1345. req, _ := c.ListMeshesRequest(inCpy)
  1346. req.SetContext(ctx)
  1347. req.ApplyOptions(opts...)
  1348. return req, nil
  1349. },
  1350. }
  1351. cont := true
  1352. for p.Next() && cont {
  1353. cont = fn(p.Page().(*ListMeshesOutput), !p.HasNextPage())
  1354. }
  1355. return p.Err()
  1356. }
  1357. const opListRoutes = "ListRoutes"
  1358. // ListRoutesRequest generates a "aws/request.Request" representing the
  1359. // client's request for the ListRoutes operation. The "output" return
  1360. // value will be populated with the request's response once the request completes
  1361. // successfully.
  1362. //
  1363. // Use "Send" method on the returned Request to send the API call to the service.
  1364. // the "output" return value is not valid until after Send returns without error.
  1365. //
  1366. // See ListRoutes for more information on using the ListRoutes
  1367. // API call, and error handling.
  1368. //
  1369. // This method is useful when you want to inject custom logic or configuration
  1370. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1371. //
  1372. //
  1373. // // Example sending a request using the ListRoutesRequest method.
  1374. // req, resp := client.ListRoutesRequest(params)
  1375. //
  1376. // err := req.Send()
  1377. // if err == nil { // resp is now filled
  1378. // fmt.Println(resp)
  1379. // }
  1380. //
  1381. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListRoutes
  1382. func (c *AppMesh) ListRoutesRequest(input *ListRoutesInput) (req *request.Request, output *ListRoutesOutput) {
  1383. op := &request.Operation{
  1384. Name: opListRoutes,
  1385. HTTPMethod: "GET",
  1386. HTTPPath: "/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes",
  1387. Paginator: &request.Paginator{
  1388. InputTokens: []string{"nextToken"},
  1389. OutputTokens: []string{"nextToken"},
  1390. LimitToken: "limit",
  1391. TruncationToken: "",
  1392. },
  1393. }
  1394. if input == nil {
  1395. input = &ListRoutesInput{}
  1396. }
  1397. output = &ListRoutesOutput{}
  1398. req = c.newRequest(op, input, output)
  1399. return
  1400. }
  1401. // ListRoutes API operation for AWS App Mesh.
  1402. //
  1403. // Returns a list of existing routes in a service mesh.
  1404. //
  1405. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1406. // with awserr.Error's Code and Message methods to get detailed information about
  1407. // the error.
  1408. //
  1409. // See the AWS API reference guide for AWS App Mesh's
  1410. // API operation ListRoutes for usage and error information.
  1411. //
  1412. // Returned Error Codes:
  1413. // * ErrCodeBadRequestException "BadRequestException"
  1414. // The request syntax was malformed. Check your request syntax and try again.
  1415. //
  1416. // * ErrCodeForbiddenException "ForbiddenException"
  1417. // You do not have permissions to perform this action.
  1418. //
  1419. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  1420. // The request processing has failed because of an unknown error, exception,
  1421. // or failure.
  1422. //
  1423. // * ErrCodeNotFoundException "NotFoundException"
  1424. // The specified resource does not exist. Check your request syntax and try
  1425. // again.
  1426. //
  1427. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1428. // The request has failed due to a temporary failure of the service.
  1429. //
  1430. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1431. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  1432. // for your account. For best results, use an increasing or variable sleep interval
  1433. // between requests.
  1434. //
  1435. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListRoutes
  1436. func (c *AppMesh) ListRoutes(input *ListRoutesInput) (*ListRoutesOutput, error) {
  1437. req, out := c.ListRoutesRequest(input)
  1438. return out, req.Send()
  1439. }
  1440. // ListRoutesWithContext is the same as ListRoutes with the addition of
  1441. // the ability to pass a context and additional request options.
  1442. //
  1443. // See ListRoutes for details on how to use this API operation.
  1444. //
  1445. // The context must be non-nil and will be used for request cancellation. If
  1446. // the context is nil a panic will occur. In the future the SDK may create
  1447. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1448. // for more information on using Contexts.
  1449. func (c *AppMesh) ListRoutesWithContext(ctx aws.Context, input *ListRoutesInput, opts ...request.Option) (*ListRoutesOutput, error) {
  1450. req, out := c.ListRoutesRequest(input)
  1451. req.SetContext(ctx)
  1452. req.ApplyOptions(opts...)
  1453. return out, req.Send()
  1454. }
  1455. // ListRoutesPages iterates over the pages of a ListRoutes operation,
  1456. // calling the "fn" function with the response data for each page. To stop
  1457. // iterating, return false from the fn function.
  1458. //
  1459. // See ListRoutes method for more information on how to use this operation.
  1460. //
  1461. // Note: This operation can generate multiple requests to a service.
  1462. //
  1463. // // Example iterating over at most 3 pages of a ListRoutes operation.
  1464. // pageNum := 0
  1465. // err := client.ListRoutesPages(params,
  1466. // func(page *ListRoutesOutput, lastPage bool) bool {
  1467. // pageNum++
  1468. // fmt.Println(page)
  1469. // return pageNum <= 3
  1470. // })
  1471. //
  1472. func (c *AppMesh) ListRoutesPages(input *ListRoutesInput, fn func(*ListRoutesOutput, bool) bool) error {
  1473. return c.ListRoutesPagesWithContext(aws.BackgroundContext(), input, fn)
  1474. }
  1475. // ListRoutesPagesWithContext same as ListRoutesPages except
  1476. // it takes a Context and allows setting request options on the pages.
  1477. //
  1478. // The context must be non-nil and will be used for request cancellation. If
  1479. // the context is nil a panic will occur. In the future the SDK may create
  1480. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1481. // for more information on using Contexts.
  1482. func (c *AppMesh) ListRoutesPagesWithContext(ctx aws.Context, input *ListRoutesInput, fn func(*ListRoutesOutput, bool) bool, opts ...request.Option) error {
  1483. p := request.Pagination{
  1484. NewRequest: func() (*request.Request, error) {
  1485. var inCpy *ListRoutesInput
  1486. if input != nil {
  1487. tmp := *input
  1488. inCpy = &tmp
  1489. }
  1490. req, _ := c.ListRoutesRequest(inCpy)
  1491. req.SetContext(ctx)
  1492. req.ApplyOptions(opts...)
  1493. return req, nil
  1494. },
  1495. }
  1496. cont := true
  1497. for p.Next() && cont {
  1498. cont = fn(p.Page().(*ListRoutesOutput), !p.HasNextPage())
  1499. }
  1500. return p.Err()
  1501. }
  1502. const opListVirtualNodes = "ListVirtualNodes"
  1503. // ListVirtualNodesRequest generates a "aws/request.Request" representing the
  1504. // client's request for the ListVirtualNodes operation. The "output" return
  1505. // value will be populated with the request's response once the request completes
  1506. // successfully.
  1507. //
  1508. // Use "Send" method on the returned Request to send the API call to the service.
  1509. // the "output" return value is not valid until after Send returns without error.
  1510. //
  1511. // See ListVirtualNodes for more information on using the ListVirtualNodes
  1512. // API call, and error handling.
  1513. //
  1514. // This method is useful when you want to inject custom logic or configuration
  1515. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1516. //
  1517. //
  1518. // // Example sending a request using the ListVirtualNodesRequest method.
  1519. // req, resp := client.ListVirtualNodesRequest(params)
  1520. //
  1521. // err := req.Send()
  1522. // if err == nil { // resp is now filled
  1523. // fmt.Println(resp)
  1524. // }
  1525. //
  1526. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListVirtualNodes
  1527. func (c *AppMesh) ListVirtualNodesRequest(input *ListVirtualNodesInput) (req *request.Request, output *ListVirtualNodesOutput) {
  1528. op := &request.Operation{
  1529. Name: opListVirtualNodes,
  1530. HTTPMethod: "GET",
  1531. HTTPPath: "/meshes/{meshName}/virtualNodes",
  1532. Paginator: &request.Paginator{
  1533. InputTokens: []string{"nextToken"},
  1534. OutputTokens: []string{"nextToken"},
  1535. LimitToken: "limit",
  1536. TruncationToken: "",
  1537. },
  1538. }
  1539. if input == nil {
  1540. input = &ListVirtualNodesInput{}
  1541. }
  1542. output = &ListVirtualNodesOutput{}
  1543. req = c.newRequest(op, input, output)
  1544. return
  1545. }
  1546. // ListVirtualNodes API operation for AWS App Mesh.
  1547. //
  1548. // Returns a list of existing virtual nodes.
  1549. //
  1550. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1551. // with awserr.Error's Code and Message methods to get detailed information about
  1552. // the error.
  1553. //
  1554. // See the AWS API reference guide for AWS App Mesh's
  1555. // API operation ListVirtualNodes for usage and error information.
  1556. //
  1557. // Returned Error Codes:
  1558. // * ErrCodeBadRequestException "BadRequestException"
  1559. // The request syntax was malformed. Check your request syntax and try again.
  1560. //
  1561. // * ErrCodeForbiddenException "ForbiddenException"
  1562. // You do not have permissions to perform this action.
  1563. //
  1564. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  1565. // The request processing has failed because of an unknown error, exception,
  1566. // or failure.
  1567. //
  1568. // * ErrCodeNotFoundException "NotFoundException"
  1569. // The specified resource does not exist. Check your request syntax and try
  1570. // again.
  1571. //
  1572. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1573. // The request has failed due to a temporary failure of the service.
  1574. //
  1575. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1576. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  1577. // for your account. For best results, use an increasing or variable sleep interval
  1578. // between requests.
  1579. //
  1580. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListVirtualNodes
  1581. func (c *AppMesh) ListVirtualNodes(input *ListVirtualNodesInput) (*ListVirtualNodesOutput, error) {
  1582. req, out := c.ListVirtualNodesRequest(input)
  1583. return out, req.Send()
  1584. }
  1585. // ListVirtualNodesWithContext is the same as ListVirtualNodes with the addition of
  1586. // the ability to pass a context and additional request options.
  1587. //
  1588. // See ListVirtualNodes for details on how to use this API operation.
  1589. //
  1590. // The context must be non-nil and will be used for request cancellation. If
  1591. // the context is nil a panic will occur. In the future the SDK may create
  1592. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1593. // for more information on using Contexts.
  1594. func (c *AppMesh) ListVirtualNodesWithContext(ctx aws.Context, input *ListVirtualNodesInput, opts ...request.Option) (*ListVirtualNodesOutput, error) {
  1595. req, out := c.ListVirtualNodesRequest(input)
  1596. req.SetContext(ctx)
  1597. req.ApplyOptions(opts...)
  1598. return out, req.Send()
  1599. }
  1600. // ListVirtualNodesPages iterates over the pages of a ListVirtualNodes operation,
  1601. // calling the "fn" function with the response data for each page. To stop
  1602. // iterating, return false from the fn function.
  1603. //
  1604. // See ListVirtualNodes method for more information on how to use this operation.
  1605. //
  1606. // Note: This operation can generate multiple requests to a service.
  1607. //
  1608. // // Example iterating over at most 3 pages of a ListVirtualNodes operation.
  1609. // pageNum := 0
  1610. // err := client.ListVirtualNodesPages(params,
  1611. // func(page *ListVirtualNodesOutput, lastPage bool) bool {
  1612. // pageNum++
  1613. // fmt.Println(page)
  1614. // return pageNum <= 3
  1615. // })
  1616. //
  1617. func (c *AppMesh) ListVirtualNodesPages(input *ListVirtualNodesInput, fn func(*ListVirtualNodesOutput, bool) bool) error {
  1618. return c.ListVirtualNodesPagesWithContext(aws.BackgroundContext(), input, fn)
  1619. }
  1620. // ListVirtualNodesPagesWithContext same as ListVirtualNodesPages except
  1621. // it takes a Context and allows setting request options on the pages.
  1622. //
  1623. // The context must be non-nil and will be used for request cancellation. If
  1624. // the context is nil a panic will occur. In the future the SDK may create
  1625. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1626. // for more information on using Contexts.
  1627. func (c *AppMesh) ListVirtualNodesPagesWithContext(ctx aws.Context, input *ListVirtualNodesInput, fn func(*ListVirtualNodesOutput, bool) bool, opts ...request.Option) error {
  1628. p := request.Pagination{
  1629. NewRequest: func() (*request.Request, error) {
  1630. var inCpy *ListVirtualNodesInput
  1631. if input != nil {
  1632. tmp := *input
  1633. inCpy = &tmp
  1634. }
  1635. req, _ := c.ListVirtualNodesRequest(inCpy)
  1636. req.SetContext(ctx)
  1637. req.ApplyOptions(opts...)
  1638. return req, nil
  1639. },
  1640. }
  1641. cont := true
  1642. for p.Next() && cont {
  1643. cont = fn(p.Page().(*ListVirtualNodesOutput), !p.HasNextPage())
  1644. }
  1645. return p.Err()
  1646. }
  1647. const opListVirtualRouters = "ListVirtualRouters"
  1648. // ListVirtualRoutersRequest generates a "aws/request.Request" representing the
  1649. // client's request for the ListVirtualRouters operation. The "output" return
  1650. // value will be populated with the request's response once the request completes
  1651. // successfully.
  1652. //
  1653. // Use "Send" method on the returned Request to send the API call to the service.
  1654. // the "output" return value is not valid until after Send returns without error.
  1655. //
  1656. // See ListVirtualRouters for more information on using the ListVirtualRouters
  1657. // API call, and error handling.
  1658. //
  1659. // This method is useful when you want to inject custom logic or configuration
  1660. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1661. //
  1662. //
  1663. // // Example sending a request using the ListVirtualRoutersRequest method.
  1664. // req, resp := client.ListVirtualRoutersRequest(params)
  1665. //
  1666. // err := req.Send()
  1667. // if err == nil { // resp is now filled
  1668. // fmt.Println(resp)
  1669. // }
  1670. //
  1671. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListVirtualRouters
  1672. func (c *AppMesh) ListVirtualRoutersRequest(input *ListVirtualRoutersInput) (req *request.Request, output *ListVirtualRoutersOutput) {
  1673. op := &request.Operation{
  1674. Name: opListVirtualRouters,
  1675. HTTPMethod: "GET",
  1676. HTTPPath: "/meshes/{meshName}/virtualRouters",
  1677. Paginator: &request.Paginator{
  1678. InputTokens: []string{"nextToken"},
  1679. OutputTokens: []string{"nextToken"},
  1680. LimitToken: "limit",
  1681. TruncationToken: "",
  1682. },
  1683. }
  1684. if input == nil {
  1685. input = &ListVirtualRoutersInput{}
  1686. }
  1687. output = &ListVirtualRoutersOutput{}
  1688. req = c.newRequest(op, input, output)
  1689. return
  1690. }
  1691. // ListVirtualRouters API operation for AWS App Mesh.
  1692. //
  1693. // Returns a list of existing virtual routers in a service mesh.
  1694. //
  1695. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1696. // with awserr.Error's Code and Message methods to get detailed information about
  1697. // the error.
  1698. //
  1699. // See the AWS API reference guide for AWS App Mesh's
  1700. // API operation ListVirtualRouters for usage and error information.
  1701. //
  1702. // Returned Error Codes:
  1703. // * ErrCodeBadRequestException "BadRequestException"
  1704. // The request syntax was malformed. Check your request syntax and try again.
  1705. //
  1706. // * ErrCodeForbiddenException "ForbiddenException"
  1707. // You do not have permissions to perform this action.
  1708. //
  1709. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  1710. // The request processing has failed because of an unknown error, exception,
  1711. // or failure.
  1712. //
  1713. // * ErrCodeNotFoundException "NotFoundException"
  1714. // The specified resource does not exist. Check your request syntax and try
  1715. // again.
  1716. //
  1717. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1718. // The request has failed due to a temporary failure of the service.
  1719. //
  1720. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1721. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  1722. // for your account. For best results, use an increasing or variable sleep interval
  1723. // between requests.
  1724. //
  1725. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/ListVirtualRouters
  1726. func (c *AppMesh) ListVirtualRouters(input *ListVirtualRoutersInput) (*ListVirtualRoutersOutput, error) {
  1727. req, out := c.ListVirtualRoutersRequest(input)
  1728. return out, req.Send()
  1729. }
  1730. // ListVirtualRoutersWithContext is the same as ListVirtualRouters with the addition of
  1731. // the ability to pass a context and additional request options.
  1732. //
  1733. // See ListVirtualRouters for details on how to use this API operation.
  1734. //
  1735. // The context must be non-nil and will be used for request cancellation. If
  1736. // the context is nil a panic will occur. In the future the SDK may create
  1737. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1738. // for more information on using Contexts.
  1739. func (c *AppMesh) ListVirtualRoutersWithContext(ctx aws.Context, input *ListVirtualRoutersInput, opts ...request.Option) (*ListVirtualRoutersOutput, error) {
  1740. req, out := c.ListVirtualRoutersRequest(input)
  1741. req.SetContext(ctx)
  1742. req.ApplyOptions(opts...)
  1743. return out, req.Send()
  1744. }
  1745. // ListVirtualRoutersPages iterates over the pages of a ListVirtualRouters operation,
  1746. // calling the "fn" function with the response data for each page. To stop
  1747. // iterating, return false from the fn function.
  1748. //
  1749. // See ListVirtualRouters method for more information on how to use this operation.
  1750. //
  1751. // Note: This operation can generate multiple requests to a service.
  1752. //
  1753. // // Example iterating over at most 3 pages of a ListVirtualRouters operation.
  1754. // pageNum := 0
  1755. // err := client.ListVirtualRoutersPages(params,
  1756. // func(page *ListVirtualRoutersOutput, lastPage bool) bool {
  1757. // pageNum++
  1758. // fmt.Println(page)
  1759. // return pageNum <= 3
  1760. // })
  1761. //
  1762. func (c *AppMesh) ListVirtualRoutersPages(input *ListVirtualRoutersInput, fn func(*ListVirtualRoutersOutput, bool) bool) error {
  1763. return c.ListVirtualRoutersPagesWithContext(aws.BackgroundContext(), input, fn)
  1764. }
  1765. // ListVirtualRoutersPagesWithContext same as ListVirtualRoutersPages except
  1766. // it takes a Context and allows setting request options on the pages.
  1767. //
  1768. // The context must be non-nil and will be used for request cancellation. If
  1769. // the context is nil a panic will occur. In the future the SDK may create
  1770. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1771. // for more information on using Contexts.
  1772. func (c *AppMesh) ListVirtualRoutersPagesWithContext(ctx aws.Context, input *ListVirtualRoutersInput, fn func(*ListVirtualRoutersOutput, bool) bool, opts ...request.Option) error {
  1773. p := request.Pagination{
  1774. NewRequest: func() (*request.Request, error) {
  1775. var inCpy *ListVirtualRoutersInput
  1776. if input != nil {
  1777. tmp := *input
  1778. inCpy = &tmp
  1779. }
  1780. req, _ := c.ListVirtualRoutersRequest(inCpy)
  1781. req.SetContext(ctx)
  1782. req.ApplyOptions(opts...)
  1783. return req, nil
  1784. },
  1785. }
  1786. cont := true
  1787. for p.Next() && cont {
  1788. cont = fn(p.Page().(*ListVirtualRoutersOutput), !p.HasNextPage())
  1789. }
  1790. return p.Err()
  1791. }
  1792. const opUpdateRoute = "UpdateRoute"
  1793. // UpdateRouteRequest generates a "aws/request.Request" representing the
  1794. // client's request for the UpdateRoute operation. The "output" return
  1795. // value will be populated with the request's response once the request completes
  1796. // successfully.
  1797. //
  1798. // Use "Send" method on the returned Request to send the API call to the service.
  1799. // the "output" return value is not valid until after Send returns without error.
  1800. //
  1801. // See UpdateRoute for more information on using the UpdateRoute
  1802. // API call, and error handling.
  1803. //
  1804. // This method is useful when you want to inject custom logic or configuration
  1805. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1806. //
  1807. //
  1808. // // Example sending a request using the UpdateRouteRequest method.
  1809. // req, resp := client.UpdateRouteRequest(params)
  1810. //
  1811. // err := req.Send()
  1812. // if err == nil { // resp is now filled
  1813. // fmt.Println(resp)
  1814. // }
  1815. //
  1816. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateRoute
  1817. func (c *AppMesh) UpdateRouteRequest(input *UpdateRouteInput) (req *request.Request, output *UpdateRouteOutput) {
  1818. op := &request.Operation{
  1819. Name: opUpdateRoute,
  1820. HTTPMethod: "PUT",
  1821. HTTPPath: "/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes/{routeName}",
  1822. }
  1823. if input == nil {
  1824. input = &UpdateRouteInput{}
  1825. }
  1826. output = &UpdateRouteOutput{}
  1827. req = c.newRequest(op, input, output)
  1828. return
  1829. }
  1830. // UpdateRoute API operation for AWS App Mesh.
  1831. //
  1832. // Updates an existing route for a specified service mesh and virtual router.
  1833. //
  1834. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1835. // with awserr.Error's Code and Message methods to get detailed information about
  1836. // the error.
  1837. //
  1838. // See the AWS API reference guide for AWS App Mesh's
  1839. // API operation UpdateRoute for usage and error information.
  1840. //
  1841. // Returned Error Codes:
  1842. // * ErrCodeBadRequestException "BadRequestException"
  1843. // The request syntax was malformed. Check your request syntax and try again.
  1844. //
  1845. // * ErrCodeConflictException "ConflictException"
  1846. // The request contains a client token that was used for a previous update resource
  1847. // call with different specifications. Try the request again with a new client
  1848. // token.
  1849. //
  1850. // * ErrCodeForbiddenException "ForbiddenException"
  1851. // You do not have permissions to perform this action.
  1852. //
  1853. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  1854. // The request processing has failed because of an unknown error, exception,
  1855. // or failure.
  1856. //
  1857. // * ErrCodeLimitExceededException "LimitExceededException"
  1858. // You have exceeded a service limit for your account. For more information,
  1859. // see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html)
  1860. // in the AWS App Mesh User Guide.
  1861. //
  1862. // * ErrCodeNotFoundException "NotFoundException"
  1863. // The specified resource does not exist. Check your request syntax and try
  1864. // again.
  1865. //
  1866. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1867. // The request has failed due to a temporary failure of the service.
  1868. //
  1869. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1870. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  1871. // for your account. For best results, use an increasing or variable sleep interval
  1872. // between requests.
  1873. //
  1874. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateRoute
  1875. func (c *AppMesh) UpdateRoute(input *UpdateRouteInput) (*UpdateRouteOutput, error) {
  1876. req, out := c.UpdateRouteRequest(input)
  1877. return out, req.Send()
  1878. }
  1879. // UpdateRouteWithContext is the same as UpdateRoute with the addition of
  1880. // the ability to pass a context and additional request options.
  1881. //
  1882. // See UpdateRoute for details on how to use this API operation.
  1883. //
  1884. // The context must be non-nil and will be used for request cancellation. If
  1885. // the context is nil a panic will occur. In the future the SDK may create
  1886. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1887. // for more information on using Contexts.
  1888. func (c *AppMesh) UpdateRouteWithContext(ctx aws.Context, input *UpdateRouteInput, opts ...request.Option) (*UpdateRouteOutput, error) {
  1889. req, out := c.UpdateRouteRequest(input)
  1890. req.SetContext(ctx)
  1891. req.ApplyOptions(opts...)
  1892. return out, req.Send()
  1893. }
  1894. const opUpdateVirtualNode = "UpdateVirtualNode"
  1895. // UpdateVirtualNodeRequest generates a "aws/request.Request" representing the
  1896. // client's request for the UpdateVirtualNode operation. The "output" return
  1897. // value will be populated with the request's response once the request completes
  1898. // successfully.
  1899. //
  1900. // Use "Send" method on the returned Request to send the API call to the service.
  1901. // the "output" return value is not valid until after Send returns without error.
  1902. //
  1903. // See UpdateVirtualNode for more information on using the UpdateVirtualNode
  1904. // API call, and error handling.
  1905. //
  1906. // This method is useful when you want to inject custom logic or configuration
  1907. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1908. //
  1909. //
  1910. // // Example sending a request using the UpdateVirtualNodeRequest method.
  1911. // req, resp := client.UpdateVirtualNodeRequest(params)
  1912. //
  1913. // err := req.Send()
  1914. // if err == nil { // resp is now filled
  1915. // fmt.Println(resp)
  1916. // }
  1917. //
  1918. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateVirtualNode
  1919. func (c *AppMesh) UpdateVirtualNodeRequest(input *UpdateVirtualNodeInput) (req *request.Request, output *UpdateVirtualNodeOutput) {
  1920. op := &request.Operation{
  1921. Name: opUpdateVirtualNode,
  1922. HTTPMethod: "PUT",
  1923. HTTPPath: "/meshes/{meshName}/virtualNodes/{virtualNodeName}",
  1924. }
  1925. if input == nil {
  1926. input = &UpdateVirtualNodeInput{}
  1927. }
  1928. output = &UpdateVirtualNodeOutput{}
  1929. req = c.newRequest(op, input, output)
  1930. return
  1931. }
  1932. // UpdateVirtualNode API operation for AWS App Mesh.
  1933. //
  1934. // Updates an existing virtual node in a specified service mesh.
  1935. //
  1936. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1937. // with awserr.Error's Code and Message methods to get detailed information about
  1938. // the error.
  1939. //
  1940. // See the AWS API reference guide for AWS App Mesh's
  1941. // API operation UpdateVirtualNode for usage and error information.
  1942. //
  1943. // Returned Error Codes:
  1944. // * ErrCodeBadRequestException "BadRequestException"
  1945. // The request syntax was malformed. Check your request syntax and try again.
  1946. //
  1947. // * ErrCodeConflictException "ConflictException"
  1948. // The request contains a client token that was used for a previous update resource
  1949. // call with different specifications. Try the request again with a new client
  1950. // token.
  1951. //
  1952. // * ErrCodeForbiddenException "ForbiddenException"
  1953. // You do not have permissions to perform this action.
  1954. //
  1955. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  1956. // The request processing has failed because of an unknown error, exception,
  1957. // or failure.
  1958. //
  1959. // * ErrCodeLimitExceededException "LimitExceededException"
  1960. // You have exceeded a service limit for your account. For more information,
  1961. // see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html)
  1962. // in the AWS App Mesh User Guide.
  1963. //
  1964. // * ErrCodeNotFoundException "NotFoundException"
  1965. // The specified resource does not exist. Check your request syntax and try
  1966. // again.
  1967. //
  1968. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  1969. // The request has failed due to a temporary failure of the service.
  1970. //
  1971. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  1972. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  1973. // for your account. For best results, use an increasing or variable sleep interval
  1974. // between requests.
  1975. //
  1976. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateVirtualNode
  1977. func (c *AppMesh) UpdateVirtualNode(input *UpdateVirtualNodeInput) (*UpdateVirtualNodeOutput, error) {
  1978. req, out := c.UpdateVirtualNodeRequest(input)
  1979. return out, req.Send()
  1980. }
  1981. // UpdateVirtualNodeWithContext is the same as UpdateVirtualNode with the addition of
  1982. // the ability to pass a context and additional request options.
  1983. //
  1984. // See UpdateVirtualNode for details on how to use this API operation.
  1985. //
  1986. // The context must be non-nil and will be used for request cancellation. If
  1987. // the context is nil a panic will occur. In the future the SDK may create
  1988. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1989. // for more information on using Contexts.
  1990. func (c *AppMesh) UpdateVirtualNodeWithContext(ctx aws.Context, input *UpdateVirtualNodeInput, opts ...request.Option) (*UpdateVirtualNodeOutput, error) {
  1991. req, out := c.UpdateVirtualNodeRequest(input)
  1992. req.SetContext(ctx)
  1993. req.ApplyOptions(opts...)
  1994. return out, req.Send()
  1995. }
  1996. const opUpdateVirtualRouter = "UpdateVirtualRouter"
  1997. // UpdateVirtualRouterRequest generates a "aws/request.Request" representing the
  1998. // client's request for the UpdateVirtualRouter operation. The "output" return
  1999. // value will be populated with the request's response once the request completes
  2000. // successfully.
  2001. //
  2002. // Use "Send" method on the returned Request to send the API call to the service.
  2003. // the "output" return value is not valid until after Send returns without error.
  2004. //
  2005. // See UpdateVirtualRouter for more information on using the UpdateVirtualRouter
  2006. // API call, and error handling.
  2007. //
  2008. // This method is useful when you want to inject custom logic or configuration
  2009. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2010. //
  2011. //
  2012. // // Example sending a request using the UpdateVirtualRouterRequest method.
  2013. // req, resp := client.UpdateVirtualRouterRequest(params)
  2014. //
  2015. // err := req.Send()
  2016. // if err == nil { // resp is now filled
  2017. // fmt.Println(resp)
  2018. // }
  2019. //
  2020. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateVirtualRouter
  2021. func (c *AppMesh) UpdateVirtualRouterRequest(input *UpdateVirtualRouterInput) (req *request.Request, output *UpdateVirtualRouterOutput) {
  2022. op := &request.Operation{
  2023. Name: opUpdateVirtualRouter,
  2024. HTTPMethod: "PUT",
  2025. HTTPPath: "/meshes/{meshName}/virtualRouters/{virtualRouterName}",
  2026. }
  2027. if input == nil {
  2028. input = &UpdateVirtualRouterInput{}
  2029. }
  2030. output = &UpdateVirtualRouterOutput{}
  2031. req = c.newRequest(op, input, output)
  2032. return
  2033. }
  2034. // UpdateVirtualRouter API operation for AWS App Mesh.
  2035. //
  2036. // Updates an existing virtual router in a specified service mesh.
  2037. //
  2038. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2039. // with awserr.Error's Code and Message methods to get detailed information about
  2040. // the error.
  2041. //
  2042. // See the AWS API reference guide for AWS App Mesh's
  2043. // API operation UpdateVirtualRouter for usage and error information.
  2044. //
  2045. // Returned Error Codes:
  2046. // * ErrCodeBadRequestException "BadRequestException"
  2047. // The request syntax was malformed. Check your request syntax and try again.
  2048. //
  2049. // * ErrCodeConflictException "ConflictException"
  2050. // The request contains a client token that was used for a previous update resource
  2051. // call with different specifications. Try the request again with a new client
  2052. // token.
  2053. //
  2054. // * ErrCodeForbiddenException "ForbiddenException"
  2055. // You do not have permissions to perform this action.
  2056. //
  2057. // * ErrCodeInternalServerErrorException "InternalServerErrorException"
  2058. // The request processing has failed because of an unknown error, exception,
  2059. // or failure.
  2060. //
  2061. // * ErrCodeLimitExceededException "LimitExceededException"
  2062. // You have exceeded a service limit for your account. For more information,
  2063. // see Service Limits (https://docs.aws.amazon.com/app-mesh/latest/userguide/service_limits.html)
  2064. // in the AWS App Mesh User Guide.
  2065. //
  2066. // * ErrCodeNotFoundException "NotFoundException"
  2067. // The specified resource does not exist. Check your request syntax and try
  2068. // again.
  2069. //
  2070. // * ErrCodeServiceUnavailableException "ServiceUnavailableException"
  2071. // The request has failed due to a temporary failure of the service.
  2072. //
  2073. // * ErrCodeTooManyRequestsException "TooManyRequestsException"
  2074. // The maximum request rate permitted by the App Mesh APIs has been exceeded
  2075. // for your account. For best results, use an increasing or variable sleep interval
  2076. // between requests.
  2077. //
  2078. // See also, https://docs.aws.amazon.com/goto/WebAPI/appmesh-2018-10-01/UpdateVirtualRouter
  2079. func (c *AppMesh) UpdateVirtualRouter(input *UpdateVirtualRouterInput) (*UpdateVirtualRouterOutput, error) {
  2080. req, out := c.UpdateVirtualRouterRequest(input)
  2081. return out, req.Send()
  2082. }
  2083. // UpdateVirtualRouterWithContext is the same as UpdateVirtualRouter with the addition of
  2084. // the ability to pass a context and additional request options.
  2085. //
  2086. // See UpdateVirtualRouter for details on how to use this API operation.
  2087. //
  2088. // The context must be non-nil and will be used for request cancellation. If
  2089. // the context is nil a panic will occur. In the future the SDK may create
  2090. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2091. // for more information on using Contexts.
  2092. func (c *AppMesh) UpdateVirtualRouterWithContext(ctx aws.Context, input *UpdateVirtualRouterInput, opts ...request.Option) (*UpdateVirtualRouterOutput, error) {
  2093. req, out := c.UpdateVirtualRouterRequest(input)
  2094. req.SetContext(ctx)
  2095. req.ApplyOptions(opts...)
  2096. return out, req.Send()
  2097. }
  2098. type CreateMeshInput struct {
  2099. _ struct{} `type:"structure"`
  2100. // Unique, case-sensitive identifier that you provide to ensure the idempotency
  2101. // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed.
  2102. ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"`
  2103. // The name to use for the service mesh.
  2104. //
  2105. // MeshName is a required field
  2106. MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"`
  2107. }
  2108. // String returns the string representation
  2109. func (s CreateMeshInput) String() string {
  2110. return awsutil.Prettify(s)
  2111. }
  2112. // GoString returns the string representation
  2113. func (s CreateMeshInput) GoString() string {
  2114. return s.String()
  2115. }
  2116. // Validate inspects the fields of the type to determine if they are valid.
  2117. func (s *CreateMeshInput) Validate() error {
  2118. invalidParams := request.ErrInvalidParams{Context: "CreateMeshInput"}
  2119. if s.MeshName == nil {
  2120. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  2121. }
  2122. if s.MeshName != nil && len(*s.MeshName) < 1 {
  2123. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  2124. }
  2125. if invalidParams.Len() > 0 {
  2126. return invalidParams
  2127. }
  2128. return nil
  2129. }
  2130. // SetClientToken sets the ClientToken field's value.
  2131. func (s *CreateMeshInput) SetClientToken(v string) *CreateMeshInput {
  2132. s.ClientToken = &v
  2133. return s
  2134. }
  2135. // SetMeshName sets the MeshName field's value.
  2136. func (s *CreateMeshInput) SetMeshName(v string) *CreateMeshInput {
  2137. s.MeshName = &v
  2138. return s
  2139. }
  2140. type CreateMeshOutput struct {
  2141. _ struct{} `type:"structure" payload:"Mesh"`
  2142. // The full description of your service mesh following the create call.
  2143. Mesh *MeshData `locationName:"mesh" type:"structure"`
  2144. }
  2145. // String returns the string representation
  2146. func (s CreateMeshOutput) String() string {
  2147. return awsutil.Prettify(s)
  2148. }
  2149. // GoString returns the string representation
  2150. func (s CreateMeshOutput) GoString() string {
  2151. return s.String()
  2152. }
  2153. // SetMesh sets the Mesh field's value.
  2154. func (s *CreateMeshOutput) SetMesh(v *MeshData) *CreateMeshOutput {
  2155. s.Mesh = v
  2156. return s
  2157. }
  2158. type CreateRouteInput struct {
  2159. _ struct{} `type:"structure"`
  2160. // Unique, case-sensitive identifier that you provide to ensure the idempotency
  2161. // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed.
  2162. ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"`
  2163. // The name of the service mesh in which to create the route.
  2164. //
  2165. // MeshName is a required field
  2166. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  2167. // The name to use for the route.
  2168. //
  2169. // RouteName is a required field
  2170. RouteName *string `locationName:"routeName" min:"1" type:"string" required:"true"`
  2171. // The route specification to apply.
  2172. //
  2173. // Spec is a required field
  2174. Spec *RouteSpec `locationName:"spec" type:"structure" required:"true"`
  2175. // The name of the virtual router in which to create the route.
  2176. //
  2177. // VirtualRouterName is a required field
  2178. VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"`
  2179. }
  2180. // String returns the string representation
  2181. func (s CreateRouteInput) String() string {
  2182. return awsutil.Prettify(s)
  2183. }
  2184. // GoString returns the string representation
  2185. func (s CreateRouteInput) GoString() string {
  2186. return s.String()
  2187. }
  2188. // Validate inspects the fields of the type to determine if they are valid.
  2189. func (s *CreateRouteInput) Validate() error {
  2190. invalidParams := request.ErrInvalidParams{Context: "CreateRouteInput"}
  2191. if s.MeshName == nil {
  2192. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  2193. }
  2194. if s.MeshName != nil && len(*s.MeshName) < 1 {
  2195. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  2196. }
  2197. if s.RouteName == nil {
  2198. invalidParams.Add(request.NewErrParamRequired("RouteName"))
  2199. }
  2200. if s.RouteName != nil && len(*s.RouteName) < 1 {
  2201. invalidParams.Add(request.NewErrParamMinLen("RouteName", 1))
  2202. }
  2203. if s.Spec == nil {
  2204. invalidParams.Add(request.NewErrParamRequired("Spec"))
  2205. }
  2206. if s.VirtualRouterName == nil {
  2207. invalidParams.Add(request.NewErrParamRequired("VirtualRouterName"))
  2208. }
  2209. if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 {
  2210. invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1))
  2211. }
  2212. if s.Spec != nil {
  2213. if err := s.Spec.Validate(); err != nil {
  2214. invalidParams.AddNested("Spec", err.(request.ErrInvalidParams))
  2215. }
  2216. }
  2217. if invalidParams.Len() > 0 {
  2218. return invalidParams
  2219. }
  2220. return nil
  2221. }
  2222. // SetClientToken sets the ClientToken field's value.
  2223. func (s *CreateRouteInput) SetClientToken(v string) *CreateRouteInput {
  2224. s.ClientToken = &v
  2225. return s
  2226. }
  2227. // SetMeshName sets the MeshName field's value.
  2228. func (s *CreateRouteInput) SetMeshName(v string) *CreateRouteInput {
  2229. s.MeshName = &v
  2230. return s
  2231. }
  2232. // SetRouteName sets the RouteName field's value.
  2233. func (s *CreateRouteInput) SetRouteName(v string) *CreateRouteInput {
  2234. s.RouteName = &v
  2235. return s
  2236. }
  2237. // SetSpec sets the Spec field's value.
  2238. func (s *CreateRouteInput) SetSpec(v *RouteSpec) *CreateRouteInput {
  2239. s.Spec = v
  2240. return s
  2241. }
  2242. // SetVirtualRouterName sets the VirtualRouterName field's value.
  2243. func (s *CreateRouteInput) SetVirtualRouterName(v string) *CreateRouteInput {
  2244. s.VirtualRouterName = &v
  2245. return s
  2246. }
  2247. type CreateRouteOutput struct {
  2248. _ struct{} `type:"structure" payload:"Route"`
  2249. // The full description of your mesh following the create call.
  2250. Route *RouteData `locationName:"route" type:"structure"`
  2251. }
  2252. // String returns the string representation
  2253. func (s CreateRouteOutput) String() string {
  2254. return awsutil.Prettify(s)
  2255. }
  2256. // GoString returns the string representation
  2257. func (s CreateRouteOutput) GoString() string {
  2258. return s.String()
  2259. }
  2260. // SetRoute sets the Route field's value.
  2261. func (s *CreateRouteOutput) SetRoute(v *RouteData) *CreateRouteOutput {
  2262. s.Route = v
  2263. return s
  2264. }
  2265. type CreateVirtualNodeInput struct {
  2266. _ struct{} `type:"structure"`
  2267. // Unique, case-sensitive identifier that you provide to ensure the idempotency
  2268. // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed.
  2269. ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"`
  2270. // The name of the service mesh in which to create the virtual node.
  2271. //
  2272. // MeshName is a required field
  2273. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  2274. // The virtual node specification to apply.
  2275. //
  2276. // Spec is a required field
  2277. Spec *VirtualNodeSpec `locationName:"spec" type:"structure" required:"true"`
  2278. // The name to use for the virtual node.
  2279. //
  2280. // VirtualNodeName is a required field
  2281. VirtualNodeName *string `locationName:"virtualNodeName" min:"1" type:"string" required:"true"`
  2282. }
  2283. // String returns the string representation
  2284. func (s CreateVirtualNodeInput) String() string {
  2285. return awsutil.Prettify(s)
  2286. }
  2287. // GoString returns the string representation
  2288. func (s CreateVirtualNodeInput) GoString() string {
  2289. return s.String()
  2290. }
  2291. // Validate inspects the fields of the type to determine if they are valid.
  2292. func (s *CreateVirtualNodeInput) Validate() error {
  2293. invalidParams := request.ErrInvalidParams{Context: "CreateVirtualNodeInput"}
  2294. if s.MeshName == nil {
  2295. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  2296. }
  2297. if s.MeshName != nil && len(*s.MeshName) < 1 {
  2298. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  2299. }
  2300. if s.Spec == nil {
  2301. invalidParams.Add(request.NewErrParamRequired("Spec"))
  2302. }
  2303. if s.VirtualNodeName == nil {
  2304. invalidParams.Add(request.NewErrParamRequired("VirtualNodeName"))
  2305. }
  2306. if s.VirtualNodeName != nil && len(*s.VirtualNodeName) < 1 {
  2307. invalidParams.Add(request.NewErrParamMinLen("VirtualNodeName", 1))
  2308. }
  2309. if s.Spec != nil {
  2310. if err := s.Spec.Validate(); err != nil {
  2311. invalidParams.AddNested("Spec", err.(request.ErrInvalidParams))
  2312. }
  2313. }
  2314. if invalidParams.Len() > 0 {
  2315. return invalidParams
  2316. }
  2317. return nil
  2318. }
  2319. // SetClientToken sets the ClientToken field's value.
  2320. func (s *CreateVirtualNodeInput) SetClientToken(v string) *CreateVirtualNodeInput {
  2321. s.ClientToken = &v
  2322. return s
  2323. }
  2324. // SetMeshName sets the MeshName field's value.
  2325. func (s *CreateVirtualNodeInput) SetMeshName(v string) *CreateVirtualNodeInput {
  2326. s.MeshName = &v
  2327. return s
  2328. }
  2329. // SetSpec sets the Spec field's value.
  2330. func (s *CreateVirtualNodeInput) SetSpec(v *VirtualNodeSpec) *CreateVirtualNodeInput {
  2331. s.Spec = v
  2332. return s
  2333. }
  2334. // SetVirtualNodeName sets the VirtualNodeName field's value.
  2335. func (s *CreateVirtualNodeInput) SetVirtualNodeName(v string) *CreateVirtualNodeInput {
  2336. s.VirtualNodeName = &v
  2337. return s
  2338. }
  2339. type CreateVirtualNodeOutput struct {
  2340. _ struct{} `type:"structure" payload:"VirtualNode"`
  2341. // The full description of your virtual node following the create call.
  2342. VirtualNode *VirtualNodeData `locationName:"virtualNode" type:"structure"`
  2343. }
  2344. // String returns the string representation
  2345. func (s CreateVirtualNodeOutput) String() string {
  2346. return awsutil.Prettify(s)
  2347. }
  2348. // GoString returns the string representation
  2349. func (s CreateVirtualNodeOutput) GoString() string {
  2350. return s.String()
  2351. }
  2352. // SetVirtualNode sets the VirtualNode field's value.
  2353. func (s *CreateVirtualNodeOutput) SetVirtualNode(v *VirtualNodeData) *CreateVirtualNodeOutput {
  2354. s.VirtualNode = v
  2355. return s
  2356. }
  2357. type CreateVirtualRouterInput struct {
  2358. _ struct{} `type:"structure"`
  2359. // Unique, case-sensitive identifier that you provide to ensure the idempotency
  2360. // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed.
  2361. ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"`
  2362. // The name of the service mesh in which to create the virtual router.
  2363. //
  2364. // MeshName is a required field
  2365. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  2366. // The virtual router specification to apply.
  2367. //
  2368. // Spec is a required field
  2369. Spec *VirtualRouterSpec `locationName:"spec" type:"structure" required:"true"`
  2370. // The name to use for the virtual router.
  2371. //
  2372. // VirtualRouterName is a required field
  2373. VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string" required:"true"`
  2374. }
  2375. // String returns the string representation
  2376. func (s CreateVirtualRouterInput) String() string {
  2377. return awsutil.Prettify(s)
  2378. }
  2379. // GoString returns the string representation
  2380. func (s CreateVirtualRouterInput) GoString() string {
  2381. return s.String()
  2382. }
  2383. // Validate inspects the fields of the type to determine if they are valid.
  2384. func (s *CreateVirtualRouterInput) Validate() error {
  2385. invalidParams := request.ErrInvalidParams{Context: "CreateVirtualRouterInput"}
  2386. if s.MeshName == nil {
  2387. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  2388. }
  2389. if s.MeshName != nil && len(*s.MeshName) < 1 {
  2390. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  2391. }
  2392. if s.Spec == nil {
  2393. invalidParams.Add(request.NewErrParamRequired("Spec"))
  2394. }
  2395. if s.VirtualRouterName == nil {
  2396. invalidParams.Add(request.NewErrParamRequired("VirtualRouterName"))
  2397. }
  2398. if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 {
  2399. invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1))
  2400. }
  2401. if invalidParams.Len() > 0 {
  2402. return invalidParams
  2403. }
  2404. return nil
  2405. }
  2406. // SetClientToken sets the ClientToken field's value.
  2407. func (s *CreateVirtualRouterInput) SetClientToken(v string) *CreateVirtualRouterInput {
  2408. s.ClientToken = &v
  2409. return s
  2410. }
  2411. // SetMeshName sets the MeshName field's value.
  2412. func (s *CreateVirtualRouterInput) SetMeshName(v string) *CreateVirtualRouterInput {
  2413. s.MeshName = &v
  2414. return s
  2415. }
  2416. // SetSpec sets the Spec field's value.
  2417. func (s *CreateVirtualRouterInput) SetSpec(v *VirtualRouterSpec) *CreateVirtualRouterInput {
  2418. s.Spec = v
  2419. return s
  2420. }
  2421. // SetVirtualRouterName sets the VirtualRouterName field's value.
  2422. func (s *CreateVirtualRouterInput) SetVirtualRouterName(v string) *CreateVirtualRouterInput {
  2423. s.VirtualRouterName = &v
  2424. return s
  2425. }
  2426. type CreateVirtualRouterOutput struct {
  2427. _ struct{} `type:"structure" payload:"VirtualRouter"`
  2428. // The full description of your virtual router following the create call.
  2429. VirtualRouter *VirtualRouterData `locationName:"virtualRouter" type:"structure"`
  2430. }
  2431. // String returns the string representation
  2432. func (s CreateVirtualRouterOutput) String() string {
  2433. return awsutil.Prettify(s)
  2434. }
  2435. // GoString returns the string representation
  2436. func (s CreateVirtualRouterOutput) GoString() string {
  2437. return s.String()
  2438. }
  2439. // SetVirtualRouter sets the VirtualRouter field's value.
  2440. func (s *CreateVirtualRouterOutput) SetVirtualRouter(v *VirtualRouterData) *CreateVirtualRouterOutput {
  2441. s.VirtualRouter = v
  2442. return s
  2443. }
  2444. type DeleteMeshInput struct {
  2445. _ struct{} `type:"structure"`
  2446. // The name of the service mesh to delete.
  2447. //
  2448. // MeshName is a required field
  2449. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  2450. }
  2451. // String returns the string representation
  2452. func (s DeleteMeshInput) String() string {
  2453. return awsutil.Prettify(s)
  2454. }
  2455. // GoString returns the string representation
  2456. func (s DeleteMeshInput) GoString() string {
  2457. return s.String()
  2458. }
  2459. // Validate inspects the fields of the type to determine if they are valid.
  2460. func (s *DeleteMeshInput) Validate() error {
  2461. invalidParams := request.ErrInvalidParams{Context: "DeleteMeshInput"}
  2462. if s.MeshName == nil {
  2463. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  2464. }
  2465. if s.MeshName != nil && len(*s.MeshName) < 1 {
  2466. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  2467. }
  2468. if invalidParams.Len() > 0 {
  2469. return invalidParams
  2470. }
  2471. return nil
  2472. }
  2473. // SetMeshName sets the MeshName field's value.
  2474. func (s *DeleteMeshInput) SetMeshName(v string) *DeleteMeshInput {
  2475. s.MeshName = &v
  2476. return s
  2477. }
  2478. type DeleteMeshOutput struct {
  2479. _ struct{} `type:"structure" payload:"Mesh"`
  2480. // The service mesh that was deleted.
  2481. Mesh *MeshData `locationName:"mesh" type:"structure"`
  2482. }
  2483. // String returns the string representation
  2484. func (s DeleteMeshOutput) String() string {
  2485. return awsutil.Prettify(s)
  2486. }
  2487. // GoString returns the string representation
  2488. func (s DeleteMeshOutput) GoString() string {
  2489. return s.String()
  2490. }
  2491. // SetMesh sets the Mesh field's value.
  2492. func (s *DeleteMeshOutput) SetMesh(v *MeshData) *DeleteMeshOutput {
  2493. s.Mesh = v
  2494. return s
  2495. }
  2496. type DeleteRouteInput struct {
  2497. _ struct{} `type:"structure"`
  2498. // The name of the service mesh in which to delete the route.
  2499. //
  2500. // MeshName is a required field
  2501. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  2502. // The name of the route to delete.
  2503. //
  2504. // RouteName is a required field
  2505. RouteName *string `location:"uri" locationName:"routeName" min:"1" type:"string" required:"true"`
  2506. // The name of the virtual router in which to delete the route.
  2507. //
  2508. // VirtualRouterName is a required field
  2509. VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"`
  2510. }
  2511. // String returns the string representation
  2512. func (s DeleteRouteInput) String() string {
  2513. return awsutil.Prettify(s)
  2514. }
  2515. // GoString returns the string representation
  2516. func (s DeleteRouteInput) GoString() string {
  2517. return s.String()
  2518. }
  2519. // Validate inspects the fields of the type to determine if they are valid.
  2520. func (s *DeleteRouteInput) Validate() error {
  2521. invalidParams := request.ErrInvalidParams{Context: "DeleteRouteInput"}
  2522. if s.MeshName == nil {
  2523. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  2524. }
  2525. if s.MeshName != nil && len(*s.MeshName) < 1 {
  2526. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  2527. }
  2528. if s.RouteName == nil {
  2529. invalidParams.Add(request.NewErrParamRequired("RouteName"))
  2530. }
  2531. if s.RouteName != nil && len(*s.RouteName) < 1 {
  2532. invalidParams.Add(request.NewErrParamMinLen("RouteName", 1))
  2533. }
  2534. if s.VirtualRouterName == nil {
  2535. invalidParams.Add(request.NewErrParamRequired("VirtualRouterName"))
  2536. }
  2537. if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 {
  2538. invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1))
  2539. }
  2540. if invalidParams.Len() > 0 {
  2541. return invalidParams
  2542. }
  2543. return nil
  2544. }
  2545. // SetMeshName sets the MeshName field's value.
  2546. func (s *DeleteRouteInput) SetMeshName(v string) *DeleteRouteInput {
  2547. s.MeshName = &v
  2548. return s
  2549. }
  2550. // SetRouteName sets the RouteName field's value.
  2551. func (s *DeleteRouteInput) SetRouteName(v string) *DeleteRouteInput {
  2552. s.RouteName = &v
  2553. return s
  2554. }
  2555. // SetVirtualRouterName sets the VirtualRouterName field's value.
  2556. func (s *DeleteRouteInput) SetVirtualRouterName(v string) *DeleteRouteInput {
  2557. s.VirtualRouterName = &v
  2558. return s
  2559. }
  2560. type DeleteRouteOutput struct {
  2561. _ struct{} `type:"structure" payload:"Route"`
  2562. // The route that was deleted.
  2563. Route *RouteData `locationName:"route" type:"structure"`
  2564. }
  2565. // String returns the string representation
  2566. func (s DeleteRouteOutput) String() string {
  2567. return awsutil.Prettify(s)
  2568. }
  2569. // GoString returns the string representation
  2570. func (s DeleteRouteOutput) GoString() string {
  2571. return s.String()
  2572. }
  2573. // SetRoute sets the Route field's value.
  2574. func (s *DeleteRouteOutput) SetRoute(v *RouteData) *DeleteRouteOutput {
  2575. s.Route = v
  2576. return s
  2577. }
  2578. type DeleteVirtualNodeInput struct {
  2579. _ struct{} `type:"structure"`
  2580. // The name of the service mesh in which to delete the virtual node.
  2581. //
  2582. // MeshName is a required field
  2583. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  2584. // The name of the virtual node to delete.
  2585. //
  2586. // VirtualNodeName is a required field
  2587. VirtualNodeName *string `location:"uri" locationName:"virtualNodeName" min:"1" type:"string" required:"true"`
  2588. }
  2589. // String returns the string representation
  2590. func (s DeleteVirtualNodeInput) String() string {
  2591. return awsutil.Prettify(s)
  2592. }
  2593. // GoString returns the string representation
  2594. func (s DeleteVirtualNodeInput) GoString() string {
  2595. return s.String()
  2596. }
  2597. // Validate inspects the fields of the type to determine if they are valid.
  2598. func (s *DeleteVirtualNodeInput) Validate() error {
  2599. invalidParams := request.ErrInvalidParams{Context: "DeleteVirtualNodeInput"}
  2600. if s.MeshName == nil {
  2601. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  2602. }
  2603. if s.MeshName != nil && len(*s.MeshName) < 1 {
  2604. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  2605. }
  2606. if s.VirtualNodeName == nil {
  2607. invalidParams.Add(request.NewErrParamRequired("VirtualNodeName"))
  2608. }
  2609. if s.VirtualNodeName != nil && len(*s.VirtualNodeName) < 1 {
  2610. invalidParams.Add(request.NewErrParamMinLen("VirtualNodeName", 1))
  2611. }
  2612. if invalidParams.Len() > 0 {
  2613. return invalidParams
  2614. }
  2615. return nil
  2616. }
  2617. // SetMeshName sets the MeshName field's value.
  2618. func (s *DeleteVirtualNodeInput) SetMeshName(v string) *DeleteVirtualNodeInput {
  2619. s.MeshName = &v
  2620. return s
  2621. }
  2622. // SetVirtualNodeName sets the VirtualNodeName field's value.
  2623. func (s *DeleteVirtualNodeInput) SetVirtualNodeName(v string) *DeleteVirtualNodeInput {
  2624. s.VirtualNodeName = &v
  2625. return s
  2626. }
  2627. type DeleteVirtualNodeOutput struct {
  2628. _ struct{} `type:"structure" payload:"VirtualNode"`
  2629. // The virtual node that was deleted.
  2630. VirtualNode *VirtualNodeData `locationName:"virtualNode" type:"structure"`
  2631. }
  2632. // String returns the string representation
  2633. func (s DeleteVirtualNodeOutput) String() string {
  2634. return awsutil.Prettify(s)
  2635. }
  2636. // GoString returns the string representation
  2637. func (s DeleteVirtualNodeOutput) GoString() string {
  2638. return s.String()
  2639. }
  2640. // SetVirtualNode sets the VirtualNode field's value.
  2641. func (s *DeleteVirtualNodeOutput) SetVirtualNode(v *VirtualNodeData) *DeleteVirtualNodeOutput {
  2642. s.VirtualNode = v
  2643. return s
  2644. }
  2645. type DeleteVirtualRouterInput struct {
  2646. _ struct{} `type:"structure"`
  2647. // The name of the service mesh in which to delete the virtual router.
  2648. //
  2649. // MeshName is a required field
  2650. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  2651. // The name of the virtual router to delete.
  2652. //
  2653. // VirtualRouterName is a required field
  2654. VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"`
  2655. }
  2656. // String returns the string representation
  2657. func (s DeleteVirtualRouterInput) String() string {
  2658. return awsutil.Prettify(s)
  2659. }
  2660. // GoString returns the string representation
  2661. func (s DeleteVirtualRouterInput) GoString() string {
  2662. return s.String()
  2663. }
  2664. // Validate inspects the fields of the type to determine if they are valid.
  2665. func (s *DeleteVirtualRouterInput) Validate() error {
  2666. invalidParams := request.ErrInvalidParams{Context: "DeleteVirtualRouterInput"}
  2667. if s.MeshName == nil {
  2668. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  2669. }
  2670. if s.MeshName != nil && len(*s.MeshName) < 1 {
  2671. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  2672. }
  2673. if s.VirtualRouterName == nil {
  2674. invalidParams.Add(request.NewErrParamRequired("VirtualRouterName"))
  2675. }
  2676. if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 {
  2677. invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1))
  2678. }
  2679. if invalidParams.Len() > 0 {
  2680. return invalidParams
  2681. }
  2682. return nil
  2683. }
  2684. // SetMeshName sets the MeshName field's value.
  2685. func (s *DeleteVirtualRouterInput) SetMeshName(v string) *DeleteVirtualRouterInput {
  2686. s.MeshName = &v
  2687. return s
  2688. }
  2689. // SetVirtualRouterName sets the VirtualRouterName field's value.
  2690. func (s *DeleteVirtualRouterInput) SetVirtualRouterName(v string) *DeleteVirtualRouterInput {
  2691. s.VirtualRouterName = &v
  2692. return s
  2693. }
  2694. type DeleteVirtualRouterOutput struct {
  2695. _ struct{} `type:"structure" payload:"VirtualRouter"`
  2696. // The virtual router that was deleted.
  2697. VirtualRouter *VirtualRouterData `locationName:"virtualRouter" type:"structure"`
  2698. }
  2699. // String returns the string representation
  2700. func (s DeleteVirtualRouterOutput) String() string {
  2701. return awsutil.Prettify(s)
  2702. }
  2703. // GoString returns the string representation
  2704. func (s DeleteVirtualRouterOutput) GoString() string {
  2705. return s.String()
  2706. }
  2707. // SetVirtualRouter sets the VirtualRouter field's value.
  2708. func (s *DeleteVirtualRouterOutput) SetVirtualRouter(v *VirtualRouterData) *DeleteVirtualRouterOutput {
  2709. s.VirtualRouter = v
  2710. return s
  2711. }
  2712. type DescribeMeshInput struct {
  2713. _ struct{} `type:"structure"`
  2714. // The name of the service mesh to describe.
  2715. //
  2716. // MeshName is a required field
  2717. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  2718. }
  2719. // String returns the string representation
  2720. func (s DescribeMeshInput) String() string {
  2721. return awsutil.Prettify(s)
  2722. }
  2723. // GoString returns the string representation
  2724. func (s DescribeMeshInput) GoString() string {
  2725. return s.String()
  2726. }
  2727. // Validate inspects the fields of the type to determine if they are valid.
  2728. func (s *DescribeMeshInput) Validate() error {
  2729. invalidParams := request.ErrInvalidParams{Context: "DescribeMeshInput"}
  2730. if s.MeshName == nil {
  2731. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  2732. }
  2733. if s.MeshName != nil && len(*s.MeshName) < 1 {
  2734. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  2735. }
  2736. if invalidParams.Len() > 0 {
  2737. return invalidParams
  2738. }
  2739. return nil
  2740. }
  2741. // SetMeshName sets the MeshName field's value.
  2742. func (s *DescribeMeshInput) SetMeshName(v string) *DescribeMeshInput {
  2743. s.MeshName = &v
  2744. return s
  2745. }
  2746. type DescribeMeshOutput struct {
  2747. _ struct{} `type:"structure" payload:"Mesh"`
  2748. // The full description of your service mesh.
  2749. Mesh *MeshData `locationName:"mesh" type:"structure"`
  2750. }
  2751. // String returns the string representation
  2752. func (s DescribeMeshOutput) String() string {
  2753. return awsutil.Prettify(s)
  2754. }
  2755. // GoString returns the string representation
  2756. func (s DescribeMeshOutput) GoString() string {
  2757. return s.String()
  2758. }
  2759. // SetMesh sets the Mesh field's value.
  2760. func (s *DescribeMeshOutput) SetMesh(v *MeshData) *DescribeMeshOutput {
  2761. s.Mesh = v
  2762. return s
  2763. }
  2764. type DescribeRouteInput struct {
  2765. _ struct{} `type:"structure"`
  2766. // The name of the service mesh in which the route resides.
  2767. //
  2768. // MeshName is a required field
  2769. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  2770. // The name of the route to describe.
  2771. //
  2772. // RouteName is a required field
  2773. RouteName *string `location:"uri" locationName:"routeName" min:"1" type:"string" required:"true"`
  2774. // The name of the virtual router with which the route is associated.
  2775. //
  2776. // VirtualRouterName is a required field
  2777. VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"`
  2778. }
  2779. // String returns the string representation
  2780. func (s DescribeRouteInput) String() string {
  2781. return awsutil.Prettify(s)
  2782. }
  2783. // GoString returns the string representation
  2784. func (s DescribeRouteInput) GoString() string {
  2785. return s.String()
  2786. }
  2787. // Validate inspects the fields of the type to determine if they are valid.
  2788. func (s *DescribeRouteInput) Validate() error {
  2789. invalidParams := request.ErrInvalidParams{Context: "DescribeRouteInput"}
  2790. if s.MeshName == nil {
  2791. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  2792. }
  2793. if s.MeshName != nil && len(*s.MeshName) < 1 {
  2794. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  2795. }
  2796. if s.RouteName == nil {
  2797. invalidParams.Add(request.NewErrParamRequired("RouteName"))
  2798. }
  2799. if s.RouteName != nil && len(*s.RouteName) < 1 {
  2800. invalidParams.Add(request.NewErrParamMinLen("RouteName", 1))
  2801. }
  2802. if s.VirtualRouterName == nil {
  2803. invalidParams.Add(request.NewErrParamRequired("VirtualRouterName"))
  2804. }
  2805. if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 {
  2806. invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1))
  2807. }
  2808. if invalidParams.Len() > 0 {
  2809. return invalidParams
  2810. }
  2811. return nil
  2812. }
  2813. // SetMeshName sets the MeshName field's value.
  2814. func (s *DescribeRouteInput) SetMeshName(v string) *DescribeRouteInput {
  2815. s.MeshName = &v
  2816. return s
  2817. }
  2818. // SetRouteName sets the RouteName field's value.
  2819. func (s *DescribeRouteInput) SetRouteName(v string) *DescribeRouteInput {
  2820. s.RouteName = &v
  2821. return s
  2822. }
  2823. // SetVirtualRouterName sets the VirtualRouterName field's value.
  2824. func (s *DescribeRouteInput) SetVirtualRouterName(v string) *DescribeRouteInput {
  2825. s.VirtualRouterName = &v
  2826. return s
  2827. }
  2828. type DescribeRouteOutput struct {
  2829. _ struct{} `type:"structure" payload:"Route"`
  2830. // The full description of your route.
  2831. Route *RouteData `locationName:"route" type:"structure"`
  2832. }
  2833. // String returns the string representation
  2834. func (s DescribeRouteOutput) String() string {
  2835. return awsutil.Prettify(s)
  2836. }
  2837. // GoString returns the string representation
  2838. func (s DescribeRouteOutput) GoString() string {
  2839. return s.String()
  2840. }
  2841. // SetRoute sets the Route field's value.
  2842. func (s *DescribeRouteOutput) SetRoute(v *RouteData) *DescribeRouteOutput {
  2843. s.Route = v
  2844. return s
  2845. }
  2846. type DescribeVirtualNodeInput struct {
  2847. _ struct{} `type:"structure"`
  2848. // The name of the service mesh in which the virtual node resides.
  2849. //
  2850. // MeshName is a required field
  2851. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  2852. // The name of the virtual node to describe.
  2853. //
  2854. // VirtualNodeName is a required field
  2855. VirtualNodeName *string `location:"uri" locationName:"virtualNodeName" min:"1" type:"string" required:"true"`
  2856. }
  2857. // String returns the string representation
  2858. func (s DescribeVirtualNodeInput) String() string {
  2859. return awsutil.Prettify(s)
  2860. }
  2861. // GoString returns the string representation
  2862. func (s DescribeVirtualNodeInput) GoString() string {
  2863. return s.String()
  2864. }
  2865. // Validate inspects the fields of the type to determine if they are valid.
  2866. func (s *DescribeVirtualNodeInput) Validate() error {
  2867. invalidParams := request.ErrInvalidParams{Context: "DescribeVirtualNodeInput"}
  2868. if s.MeshName == nil {
  2869. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  2870. }
  2871. if s.MeshName != nil && len(*s.MeshName) < 1 {
  2872. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  2873. }
  2874. if s.VirtualNodeName == nil {
  2875. invalidParams.Add(request.NewErrParamRequired("VirtualNodeName"))
  2876. }
  2877. if s.VirtualNodeName != nil && len(*s.VirtualNodeName) < 1 {
  2878. invalidParams.Add(request.NewErrParamMinLen("VirtualNodeName", 1))
  2879. }
  2880. if invalidParams.Len() > 0 {
  2881. return invalidParams
  2882. }
  2883. return nil
  2884. }
  2885. // SetMeshName sets the MeshName field's value.
  2886. func (s *DescribeVirtualNodeInput) SetMeshName(v string) *DescribeVirtualNodeInput {
  2887. s.MeshName = &v
  2888. return s
  2889. }
  2890. // SetVirtualNodeName sets the VirtualNodeName field's value.
  2891. func (s *DescribeVirtualNodeInput) SetVirtualNodeName(v string) *DescribeVirtualNodeInput {
  2892. s.VirtualNodeName = &v
  2893. return s
  2894. }
  2895. type DescribeVirtualNodeOutput struct {
  2896. _ struct{} `type:"structure" payload:"VirtualNode"`
  2897. // The full description of your virtual node.
  2898. VirtualNode *VirtualNodeData `locationName:"virtualNode" type:"structure"`
  2899. }
  2900. // String returns the string representation
  2901. func (s DescribeVirtualNodeOutput) String() string {
  2902. return awsutil.Prettify(s)
  2903. }
  2904. // GoString returns the string representation
  2905. func (s DescribeVirtualNodeOutput) GoString() string {
  2906. return s.String()
  2907. }
  2908. // SetVirtualNode sets the VirtualNode field's value.
  2909. func (s *DescribeVirtualNodeOutput) SetVirtualNode(v *VirtualNodeData) *DescribeVirtualNodeOutput {
  2910. s.VirtualNode = v
  2911. return s
  2912. }
  2913. type DescribeVirtualRouterInput struct {
  2914. _ struct{} `type:"structure"`
  2915. // The name of the service mesh in which the virtual router resides.
  2916. //
  2917. // MeshName is a required field
  2918. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  2919. // The name of the virtual router to describe.
  2920. //
  2921. // VirtualRouterName is a required field
  2922. VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"`
  2923. }
  2924. // String returns the string representation
  2925. func (s DescribeVirtualRouterInput) String() string {
  2926. return awsutil.Prettify(s)
  2927. }
  2928. // GoString returns the string representation
  2929. func (s DescribeVirtualRouterInput) GoString() string {
  2930. return s.String()
  2931. }
  2932. // Validate inspects the fields of the type to determine if they are valid.
  2933. func (s *DescribeVirtualRouterInput) Validate() error {
  2934. invalidParams := request.ErrInvalidParams{Context: "DescribeVirtualRouterInput"}
  2935. if s.MeshName == nil {
  2936. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  2937. }
  2938. if s.MeshName != nil && len(*s.MeshName) < 1 {
  2939. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  2940. }
  2941. if s.VirtualRouterName == nil {
  2942. invalidParams.Add(request.NewErrParamRequired("VirtualRouterName"))
  2943. }
  2944. if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 {
  2945. invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1))
  2946. }
  2947. if invalidParams.Len() > 0 {
  2948. return invalidParams
  2949. }
  2950. return nil
  2951. }
  2952. // SetMeshName sets the MeshName field's value.
  2953. func (s *DescribeVirtualRouterInput) SetMeshName(v string) *DescribeVirtualRouterInput {
  2954. s.MeshName = &v
  2955. return s
  2956. }
  2957. // SetVirtualRouterName sets the VirtualRouterName field's value.
  2958. func (s *DescribeVirtualRouterInput) SetVirtualRouterName(v string) *DescribeVirtualRouterInput {
  2959. s.VirtualRouterName = &v
  2960. return s
  2961. }
  2962. type DescribeVirtualRouterOutput struct {
  2963. _ struct{} `type:"structure" payload:"VirtualRouter"`
  2964. // The full description of your virtual router.
  2965. VirtualRouter *VirtualRouterData `locationName:"virtualRouter" type:"structure"`
  2966. }
  2967. // String returns the string representation
  2968. func (s DescribeVirtualRouterOutput) String() string {
  2969. return awsutil.Prettify(s)
  2970. }
  2971. // GoString returns the string representation
  2972. func (s DescribeVirtualRouterOutput) GoString() string {
  2973. return s.String()
  2974. }
  2975. // SetVirtualRouter sets the VirtualRouter field's value.
  2976. func (s *DescribeVirtualRouterOutput) SetVirtualRouter(v *VirtualRouterData) *DescribeVirtualRouterOutput {
  2977. s.VirtualRouter = v
  2978. return s
  2979. }
  2980. // The DNS service discovery information for your virtual node.
  2981. type DnsServiceDiscovery struct {
  2982. _ struct{} `type:"structure"`
  2983. // The DNS service name for your virtual node.
  2984. ServiceName *string `locationName:"serviceName" type:"string"`
  2985. }
  2986. // String returns the string representation
  2987. func (s DnsServiceDiscovery) String() string {
  2988. return awsutil.Prettify(s)
  2989. }
  2990. // GoString returns the string representation
  2991. func (s DnsServiceDiscovery) GoString() string {
  2992. return s.String()
  2993. }
  2994. // SetServiceName sets the ServiceName field's value.
  2995. func (s *DnsServiceDiscovery) SetServiceName(v string) *DnsServiceDiscovery {
  2996. s.ServiceName = &v
  2997. return s
  2998. }
  2999. // An object representing the health check policy for a virtual node's listener.
  3000. type HealthCheckPolicy struct {
  3001. _ struct{} `type:"structure"`
  3002. // The number of consecutive successful health checks that must occur before
  3003. // declaring listener healthy.
  3004. //
  3005. // HealthyThreshold is a required field
  3006. HealthyThreshold *int64 `locationName:"healthyThreshold" min:"2" type:"integer" required:"true"`
  3007. // The time period in milliseconds between each health check execution.
  3008. //
  3009. // IntervalMillis is a required field
  3010. IntervalMillis *int64 `locationName:"intervalMillis" min:"5000" type:"long" required:"true"`
  3011. // The destination path for the health check request. This is only required
  3012. // if the specified protocol is HTTP; if the protocol is TCP, then this parameter
  3013. // is ignored.
  3014. Path *string `locationName:"path" type:"string"`
  3015. // The destination port for the health check request. This port must match the
  3016. // port defined in the PortMapping for the listener.
  3017. Port *int64 `locationName:"port" min:"1" type:"integer"`
  3018. // The protocol for the health check request.
  3019. //
  3020. // Protocol is a required field
  3021. Protocol *string `locationName:"protocol" type:"string" required:"true" enum:"PortProtocol"`
  3022. // The amount of time to wait when receiving a response from the health check,
  3023. // in milliseconds.
  3024. //
  3025. // TimeoutMillis is a required field
  3026. TimeoutMillis *int64 `locationName:"timeoutMillis" min:"2000" type:"long" required:"true"`
  3027. // The number of consecutive failed health checks that must occur before declaring
  3028. // a virtual node unhealthy.
  3029. //
  3030. // UnhealthyThreshold is a required field
  3031. UnhealthyThreshold *int64 `locationName:"unhealthyThreshold" min:"2" type:"integer" required:"true"`
  3032. }
  3033. // String returns the string representation
  3034. func (s HealthCheckPolicy) String() string {
  3035. return awsutil.Prettify(s)
  3036. }
  3037. // GoString returns the string representation
  3038. func (s HealthCheckPolicy) GoString() string {
  3039. return s.String()
  3040. }
  3041. // Validate inspects the fields of the type to determine if they are valid.
  3042. func (s *HealthCheckPolicy) Validate() error {
  3043. invalidParams := request.ErrInvalidParams{Context: "HealthCheckPolicy"}
  3044. if s.HealthyThreshold == nil {
  3045. invalidParams.Add(request.NewErrParamRequired("HealthyThreshold"))
  3046. }
  3047. if s.HealthyThreshold != nil && *s.HealthyThreshold < 2 {
  3048. invalidParams.Add(request.NewErrParamMinValue("HealthyThreshold", 2))
  3049. }
  3050. if s.IntervalMillis == nil {
  3051. invalidParams.Add(request.NewErrParamRequired("IntervalMillis"))
  3052. }
  3053. if s.IntervalMillis != nil && *s.IntervalMillis < 5000 {
  3054. invalidParams.Add(request.NewErrParamMinValue("IntervalMillis", 5000))
  3055. }
  3056. if s.Port != nil && *s.Port < 1 {
  3057. invalidParams.Add(request.NewErrParamMinValue("Port", 1))
  3058. }
  3059. if s.Protocol == nil {
  3060. invalidParams.Add(request.NewErrParamRequired("Protocol"))
  3061. }
  3062. if s.TimeoutMillis == nil {
  3063. invalidParams.Add(request.NewErrParamRequired("TimeoutMillis"))
  3064. }
  3065. if s.TimeoutMillis != nil && *s.TimeoutMillis < 2000 {
  3066. invalidParams.Add(request.NewErrParamMinValue("TimeoutMillis", 2000))
  3067. }
  3068. if s.UnhealthyThreshold == nil {
  3069. invalidParams.Add(request.NewErrParamRequired("UnhealthyThreshold"))
  3070. }
  3071. if s.UnhealthyThreshold != nil && *s.UnhealthyThreshold < 2 {
  3072. invalidParams.Add(request.NewErrParamMinValue("UnhealthyThreshold", 2))
  3073. }
  3074. if invalidParams.Len() > 0 {
  3075. return invalidParams
  3076. }
  3077. return nil
  3078. }
  3079. // SetHealthyThreshold sets the HealthyThreshold field's value.
  3080. func (s *HealthCheckPolicy) SetHealthyThreshold(v int64) *HealthCheckPolicy {
  3081. s.HealthyThreshold = &v
  3082. return s
  3083. }
  3084. // SetIntervalMillis sets the IntervalMillis field's value.
  3085. func (s *HealthCheckPolicy) SetIntervalMillis(v int64) *HealthCheckPolicy {
  3086. s.IntervalMillis = &v
  3087. return s
  3088. }
  3089. // SetPath sets the Path field's value.
  3090. func (s *HealthCheckPolicy) SetPath(v string) *HealthCheckPolicy {
  3091. s.Path = &v
  3092. return s
  3093. }
  3094. // SetPort sets the Port field's value.
  3095. func (s *HealthCheckPolicy) SetPort(v int64) *HealthCheckPolicy {
  3096. s.Port = &v
  3097. return s
  3098. }
  3099. // SetProtocol sets the Protocol field's value.
  3100. func (s *HealthCheckPolicy) SetProtocol(v string) *HealthCheckPolicy {
  3101. s.Protocol = &v
  3102. return s
  3103. }
  3104. // SetTimeoutMillis sets the TimeoutMillis field's value.
  3105. func (s *HealthCheckPolicy) SetTimeoutMillis(v int64) *HealthCheckPolicy {
  3106. s.TimeoutMillis = &v
  3107. return s
  3108. }
  3109. // SetUnhealthyThreshold sets the UnhealthyThreshold field's value.
  3110. func (s *HealthCheckPolicy) SetUnhealthyThreshold(v int64) *HealthCheckPolicy {
  3111. s.UnhealthyThreshold = &v
  3112. return s
  3113. }
  3114. // An object representing the HTTP routing specification for a route.
  3115. type HttpRoute struct {
  3116. _ struct{} `type:"structure"`
  3117. // The action to take if a match is determined.
  3118. Action *HttpRouteAction `locationName:"action" type:"structure"`
  3119. // The criteria for determining an HTTP request match.
  3120. Match *HttpRouteMatch `locationName:"match" type:"structure"`
  3121. }
  3122. // String returns the string representation
  3123. func (s HttpRoute) String() string {
  3124. return awsutil.Prettify(s)
  3125. }
  3126. // GoString returns the string representation
  3127. func (s HttpRoute) GoString() string {
  3128. return s.String()
  3129. }
  3130. // Validate inspects the fields of the type to determine if they are valid.
  3131. func (s *HttpRoute) Validate() error {
  3132. invalidParams := request.ErrInvalidParams{Context: "HttpRoute"}
  3133. if s.Action != nil {
  3134. if err := s.Action.Validate(); err != nil {
  3135. invalidParams.AddNested("Action", err.(request.ErrInvalidParams))
  3136. }
  3137. }
  3138. if invalidParams.Len() > 0 {
  3139. return invalidParams
  3140. }
  3141. return nil
  3142. }
  3143. // SetAction sets the Action field's value.
  3144. func (s *HttpRoute) SetAction(v *HttpRouteAction) *HttpRoute {
  3145. s.Action = v
  3146. return s
  3147. }
  3148. // SetMatch sets the Match field's value.
  3149. func (s *HttpRoute) SetMatch(v *HttpRouteMatch) *HttpRoute {
  3150. s.Match = v
  3151. return s
  3152. }
  3153. // An object representing the traffic distribution requirements for matched
  3154. // HTTP requests.
  3155. type HttpRouteAction struct {
  3156. _ struct{} `type:"structure"`
  3157. // The targets that traffic is routed to when a request matches the route. You
  3158. // can specify one or more targets and their relative weights with which to
  3159. // distribute traffic.
  3160. WeightedTargets []*WeightedTarget `locationName:"weightedTargets" type:"list"`
  3161. }
  3162. // String returns the string representation
  3163. func (s HttpRouteAction) String() string {
  3164. return awsutil.Prettify(s)
  3165. }
  3166. // GoString returns the string representation
  3167. func (s HttpRouteAction) GoString() string {
  3168. return s.String()
  3169. }
  3170. // Validate inspects the fields of the type to determine if they are valid.
  3171. func (s *HttpRouteAction) Validate() error {
  3172. invalidParams := request.ErrInvalidParams{Context: "HttpRouteAction"}
  3173. if s.WeightedTargets != nil {
  3174. for i, v := range s.WeightedTargets {
  3175. if v == nil {
  3176. continue
  3177. }
  3178. if err := v.Validate(); err != nil {
  3179. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "WeightedTargets", i), err.(request.ErrInvalidParams))
  3180. }
  3181. }
  3182. }
  3183. if invalidParams.Len() > 0 {
  3184. return invalidParams
  3185. }
  3186. return nil
  3187. }
  3188. // SetWeightedTargets sets the WeightedTargets field's value.
  3189. func (s *HttpRouteAction) SetWeightedTargets(v []*WeightedTarget) *HttpRouteAction {
  3190. s.WeightedTargets = v
  3191. return s
  3192. }
  3193. // An object representing the requirements for a route to match HTTP requests
  3194. // for a virtual router.
  3195. type HttpRouteMatch struct {
  3196. _ struct{} `type:"structure"`
  3197. // Specifies the path with which to match requests. This parameter must always
  3198. // start with /, which by itself matches all requests to the virtual router
  3199. // service name. You can also match for path-based routing of requests. For
  3200. // example, if your virtual router service name is my-service.local, and you
  3201. // want the route to match requests to my-service.local/metrics, then your prefix
  3202. // should be /metrics.
  3203. Prefix *string `locationName:"prefix" type:"string"`
  3204. }
  3205. // String returns the string representation
  3206. func (s HttpRouteMatch) String() string {
  3207. return awsutil.Prettify(s)
  3208. }
  3209. // GoString returns the string representation
  3210. func (s HttpRouteMatch) GoString() string {
  3211. return s.String()
  3212. }
  3213. // SetPrefix sets the Prefix field's value.
  3214. func (s *HttpRouteMatch) SetPrefix(v string) *HttpRouteMatch {
  3215. s.Prefix = &v
  3216. return s
  3217. }
  3218. type ListMeshesInput struct {
  3219. _ struct{} `type:"structure"`
  3220. // The maximum number of mesh results returned by ListMeshes in paginated output.
  3221. // When this parameter is used, ListMeshes only returns limit results in a single
  3222. // page along with a nextToken response element. The remaining results of the
  3223. // initial request can be seen by sending another ListMeshes request with the
  3224. // returned nextToken value. This value can be between 1 and 100. If this parameter
  3225. // is not used, then ListMeshes returns up to 100 results and a nextToken value
  3226. // if applicable.
  3227. Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"`
  3228. // The nextToken value returned from a previous paginated ListMeshes request
  3229. // where limit was used and the results exceeded the value of that parameter.
  3230. // Pagination continues from the end of the previous results that returned the
  3231. // nextToken value.
  3232. //
  3233. // This token should be treated as an opaque identifier that is only used to
  3234. // retrieve the next items in a list and not for other programmatic purposes.
  3235. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  3236. }
  3237. // String returns the string representation
  3238. func (s ListMeshesInput) String() string {
  3239. return awsutil.Prettify(s)
  3240. }
  3241. // GoString returns the string representation
  3242. func (s ListMeshesInput) GoString() string {
  3243. return s.String()
  3244. }
  3245. // Validate inspects the fields of the type to determine if they are valid.
  3246. func (s *ListMeshesInput) Validate() error {
  3247. invalidParams := request.ErrInvalidParams{Context: "ListMeshesInput"}
  3248. if s.Limit != nil && *s.Limit < 1 {
  3249. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  3250. }
  3251. if invalidParams.Len() > 0 {
  3252. return invalidParams
  3253. }
  3254. return nil
  3255. }
  3256. // SetLimit sets the Limit field's value.
  3257. func (s *ListMeshesInput) SetLimit(v int64) *ListMeshesInput {
  3258. s.Limit = &v
  3259. return s
  3260. }
  3261. // SetNextToken sets the NextToken field's value.
  3262. func (s *ListMeshesInput) SetNextToken(v string) *ListMeshesInput {
  3263. s.NextToken = &v
  3264. return s
  3265. }
  3266. type ListMeshesOutput struct {
  3267. _ struct{} `type:"structure"`
  3268. // The list of existing service meshes.
  3269. //
  3270. // Meshes is a required field
  3271. Meshes []*MeshRef `locationName:"meshes" type:"list" required:"true"`
  3272. // The nextToken value to include in a future ListMeshes request. When the results
  3273. // of a ListMeshes request exceed limit, this value can be used to retrieve
  3274. // the next page of results. This value is null when there are no more results
  3275. // to return.
  3276. NextToken *string `locationName:"nextToken" type:"string"`
  3277. }
  3278. // String returns the string representation
  3279. func (s ListMeshesOutput) String() string {
  3280. return awsutil.Prettify(s)
  3281. }
  3282. // GoString returns the string representation
  3283. func (s ListMeshesOutput) GoString() string {
  3284. return s.String()
  3285. }
  3286. // SetMeshes sets the Meshes field's value.
  3287. func (s *ListMeshesOutput) SetMeshes(v []*MeshRef) *ListMeshesOutput {
  3288. s.Meshes = v
  3289. return s
  3290. }
  3291. // SetNextToken sets the NextToken field's value.
  3292. func (s *ListMeshesOutput) SetNextToken(v string) *ListMeshesOutput {
  3293. s.NextToken = &v
  3294. return s
  3295. }
  3296. type ListRoutesInput struct {
  3297. _ struct{} `type:"structure"`
  3298. // The maximum number of mesh results returned by ListRoutes in paginated output.
  3299. // When this parameter is used, ListRoutes only returns limit results in a single
  3300. // page along with a nextToken response element. The remaining results of the
  3301. // initial request can be seen by sending another ListRoutes request with the
  3302. // returned nextToken value. This value can be between 1 and 100. If this parameter
  3303. // is not used, then ListRoutes returns up to 100 results and a nextToken value
  3304. // if applicable.
  3305. Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"`
  3306. // The name of the service mesh in which to list routes.
  3307. //
  3308. // MeshName is a required field
  3309. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  3310. // The nextToken value returned from a previous paginated ListRoutes request
  3311. // where limit was used and the results exceeded the value of that parameter.
  3312. // Pagination continues from the end of the previous results that returned the
  3313. // nextToken value.
  3314. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  3315. // The name of the virtual router in which to list routes.
  3316. //
  3317. // VirtualRouterName is a required field
  3318. VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"`
  3319. }
  3320. // String returns the string representation
  3321. func (s ListRoutesInput) String() string {
  3322. return awsutil.Prettify(s)
  3323. }
  3324. // GoString returns the string representation
  3325. func (s ListRoutesInput) GoString() string {
  3326. return s.String()
  3327. }
  3328. // Validate inspects the fields of the type to determine if they are valid.
  3329. func (s *ListRoutesInput) Validate() error {
  3330. invalidParams := request.ErrInvalidParams{Context: "ListRoutesInput"}
  3331. if s.Limit != nil && *s.Limit < 1 {
  3332. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  3333. }
  3334. if s.MeshName == nil {
  3335. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  3336. }
  3337. if s.MeshName != nil && len(*s.MeshName) < 1 {
  3338. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  3339. }
  3340. if s.VirtualRouterName == nil {
  3341. invalidParams.Add(request.NewErrParamRequired("VirtualRouterName"))
  3342. }
  3343. if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 {
  3344. invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1))
  3345. }
  3346. if invalidParams.Len() > 0 {
  3347. return invalidParams
  3348. }
  3349. return nil
  3350. }
  3351. // SetLimit sets the Limit field's value.
  3352. func (s *ListRoutesInput) SetLimit(v int64) *ListRoutesInput {
  3353. s.Limit = &v
  3354. return s
  3355. }
  3356. // SetMeshName sets the MeshName field's value.
  3357. func (s *ListRoutesInput) SetMeshName(v string) *ListRoutesInput {
  3358. s.MeshName = &v
  3359. return s
  3360. }
  3361. // SetNextToken sets the NextToken field's value.
  3362. func (s *ListRoutesInput) SetNextToken(v string) *ListRoutesInput {
  3363. s.NextToken = &v
  3364. return s
  3365. }
  3366. // SetVirtualRouterName sets the VirtualRouterName field's value.
  3367. func (s *ListRoutesInput) SetVirtualRouterName(v string) *ListRoutesInput {
  3368. s.VirtualRouterName = &v
  3369. return s
  3370. }
  3371. type ListRoutesOutput struct {
  3372. _ struct{} `type:"structure"`
  3373. // The nextToken value to include in a future ListRoutes request. When the results
  3374. // of a ListRoutes request exceed limit, this value can be used to retrieve
  3375. // the next page of results. This value is null when there are no more results
  3376. // to return.
  3377. NextToken *string `locationName:"nextToken" type:"string"`
  3378. // The list of existing routes for the specified service mesh and virtual router.
  3379. //
  3380. // Routes is a required field
  3381. Routes []*RouteRef `locationName:"routes" type:"list" required:"true"`
  3382. }
  3383. // String returns the string representation
  3384. func (s ListRoutesOutput) String() string {
  3385. return awsutil.Prettify(s)
  3386. }
  3387. // GoString returns the string representation
  3388. func (s ListRoutesOutput) GoString() string {
  3389. return s.String()
  3390. }
  3391. // SetNextToken sets the NextToken field's value.
  3392. func (s *ListRoutesOutput) SetNextToken(v string) *ListRoutesOutput {
  3393. s.NextToken = &v
  3394. return s
  3395. }
  3396. // SetRoutes sets the Routes field's value.
  3397. func (s *ListRoutesOutput) SetRoutes(v []*RouteRef) *ListRoutesOutput {
  3398. s.Routes = v
  3399. return s
  3400. }
  3401. type ListVirtualNodesInput struct {
  3402. _ struct{} `type:"structure"`
  3403. // The maximum number of mesh results returned by ListVirtualNodes in paginated
  3404. // output. When this parameter is used, ListVirtualNodes only returns limit
  3405. // results in a single page along with a nextToken response element. The remaining
  3406. // results of the initial request can be seen by sending another ListVirtualNodes
  3407. // request with the returned nextToken value. This value can be between 1 and
  3408. // 100. If this parameter is not used, then ListVirtualNodes returns up to 100
  3409. // results and a nextToken value if applicable.
  3410. Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"`
  3411. // The name of the service mesh in which to list virtual nodes.
  3412. //
  3413. // MeshName is a required field
  3414. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  3415. // The nextToken value returned from a previous paginated ListVirtualNodes request
  3416. // where limit was used and the results exceeded the value of that parameter.
  3417. // Pagination continues from the end of the previous results that returned the
  3418. // nextToken value.
  3419. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  3420. }
  3421. // String returns the string representation
  3422. func (s ListVirtualNodesInput) String() string {
  3423. return awsutil.Prettify(s)
  3424. }
  3425. // GoString returns the string representation
  3426. func (s ListVirtualNodesInput) GoString() string {
  3427. return s.String()
  3428. }
  3429. // Validate inspects the fields of the type to determine if they are valid.
  3430. func (s *ListVirtualNodesInput) Validate() error {
  3431. invalidParams := request.ErrInvalidParams{Context: "ListVirtualNodesInput"}
  3432. if s.Limit != nil && *s.Limit < 1 {
  3433. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  3434. }
  3435. if s.MeshName == nil {
  3436. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  3437. }
  3438. if s.MeshName != nil && len(*s.MeshName) < 1 {
  3439. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  3440. }
  3441. if invalidParams.Len() > 0 {
  3442. return invalidParams
  3443. }
  3444. return nil
  3445. }
  3446. // SetLimit sets the Limit field's value.
  3447. func (s *ListVirtualNodesInput) SetLimit(v int64) *ListVirtualNodesInput {
  3448. s.Limit = &v
  3449. return s
  3450. }
  3451. // SetMeshName sets the MeshName field's value.
  3452. func (s *ListVirtualNodesInput) SetMeshName(v string) *ListVirtualNodesInput {
  3453. s.MeshName = &v
  3454. return s
  3455. }
  3456. // SetNextToken sets the NextToken field's value.
  3457. func (s *ListVirtualNodesInput) SetNextToken(v string) *ListVirtualNodesInput {
  3458. s.NextToken = &v
  3459. return s
  3460. }
  3461. type ListVirtualNodesOutput struct {
  3462. _ struct{} `type:"structure"`
  3463. // The nextToken value to include in a future ListVirtualNodes request. When
  3464. // the results of a ListVirtualNodes request exceed limit, this value can be
  3465. // used to retrieve the next page of results. This value is null when there
  3466. // are no more results to return.
  3467. NextToken *string `locationName:"nextToken" type:"string"`
  3468. // The list of existing virtual nodes for the specified service mesh.
  3469. //
  3470. // VirtualNodes is a required field
  3471. VirtualNodes []*VirtualNodeRef `locationName:"virtualNodes" type:"list" required:"true"`
  3472. }
  3473. // String returns the string representation
  3474. func (s ListVirtualNodesOutput) String() string {
  3475. return awsutil.Prettify(s)
  3476. }
  3477. // GoString returns the string representation
  3478. func (s ListVirtualNodesOutput) GoString() string {
  3479. return s.String()
  3480. }
  3481. // SetNextToken sets the NextToken field's value.
  3482. func (s *ListVirtualNodesOutput) SetNextToken(v string) *ListVirtualNodesOutput {
  3483. s.NextToken = &v
  3484. return s
  3485. }
  3486. // SetVirtualNodes sets the VirtualNodes field's value.
  3487. func (s *ListVirtualNodesOutput) SetVirtualNodes(v []*VirtualNodeRef) *ListVirtualNodesOutput {
  3488. s.VirtualNodes = v
  3489. return s
  3490. }
  3491. type ListVirtualRoutersInput struct {
  3492. _ struct{} `type:"structure"`
  3493. // The maximum number of mesh results returned by ListVirtualRouters in paginated
  3494. // output. When this parameter is used, ListVirtualRouters only returns limit
  3495. // results in a single page along with a nextToken response element. The remaining
  3496. // results of the initial request can be seen by sending another ListVirtualRouters
  3497. // request with the returned nextToken value. This value can be between 1 and
  3498. // 100. If this parameter is not used, then ListVirtualRouters returns up to
  3499. // 100 results and a nextToken value if applicable.
  3500. Limit *int64 `location:"querystring" locationName:"limit" min:"1" type:"integer"`
  3501. // The name of the service mesh in which to list virtual routers.
  3502. //
  3503. // MeshName is a required field
  3504. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  3505. // The nextToken value returned from a previous paginated ListVirtualRouters
  3506. // request where limit was used and the results exceeded the value of that parameter.
  3507. // Pagination continues from the end of the previous results that returned the
  3508. // nextToken value.
  3509. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  3510. }
  3511. // String returns the string representation
  3512. func (s ListVirtualRoutersInput) String() string {
  3513. return awsutil.Prettify(s)
  3514. }
  3515. // GoString returns the string representation
  3516. func (s ListVirtualRoutersInput) GoString() string {
  3517. return s.String()
  3518. }
  3519. // Validate inspects the fields of the type to determine if they are valid.
  3520. func (s *ListVirtualRoutersInput) Validate() error {
  3521. invalidParams := request.ErrInvalidParams{Context: "ListVirtualRoutersInput"}
  3522. if s.Limit != nil && *s.Limit < 1 {
  3523. invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
  3524. }
  3525. if s.MeshName == nil {
  3526. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  3527. }
  3528. if s.MeshName != nil && len(*s.MeshName) < 1 {
  3529. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  3530. }
  3531. if invalidParams.Len() > 0 {
  3532. return invalidParams
  3533. }
  3534. return nil
  3535. }
  3536. // SetLimit sets the Limit field's value.
  3537. func (s *ListVirtualRoutersInput) SetLimit(v int64) *ListVirtualRoutersInput {
  3538. s.Limit = &v
  3539. return s
  3540. }
  3541. // SetMeshName sets the MeshName field's value.
  3542. func (s *ListVirtualRoutersInput) SetMeshName(v string) *ListVirtualRoutersInput {
  3543. s.MeshName = &v
  3544. return s
  3545. }
  3546. // SetNextToken sets the NextToken field's value.
  3547. func (s *ListVirtualRoutersInput) SetNextToken(v string) *ListVirtualRoutersInput {
  3548. s.NextToken = &v
  3549. return s
  3550. }
  3551. type ListVirtualRoutersOutput struct {
  3552. _ struct{} `type:"structure"`
  3553. // The nextToken value to include in a future ListVirtualRouters request. When
  3554. // the results of a ListVirtualRouters request exceed limit, this value can
  3555. // be used to retrieve the next page of results. This value is null when there
  3556. // are no more results to return.
  3557. NextToken *string `locationName:"nextToken" type:"string"`
  3558. // The list of existing virtual routers for the specified service mesh.
  3559. //
  3560. // VirtualRouters is a required field
  3561. VirtualRouters []*VirtualRouterRef `locationName:"virtualRouters" type:"list" required:"true"`
  3562. }
  3563. // String returns the string representation
  3564. func (s ListVirtualRoutersOutput) String() string {
  3565. return awsutil.Prettify(s)
  3566. }
  3567. // GoString returns the string representation
  3568. func (s ListVirtualRoutersOutput) GoString() string {
  3569. return s.String()
  3570. }
  3571. // SetNextToken sets the NextToken field's value.
  3572. func (s *ListVirtualRoutersOutput) SetNextToken(v string) *ListVirtualRoutersOutput {
  3573. s.NextToken = &v
  3574. return s
  3575. }
  3576. // SetVirtualRouters sets the VirtualRouters field's value.
  3577. func (s *ListVirtualRoutersOutput) SetVirtualRouters(v []*VirtualRouterRef) *ListVirtualRoutersOutput {
  3578. s.VirtualRouters = v
  3579. return s
  3580. }
  3581. // An object representing a listener for a virtual node.
  3582. type Listener struct {
  3583. _ struct{} `type:"structure"`
  3584. // The health check information for the listener.
  3585. HealthCheck *HealthCheckPolicy `locationName:"healthCheck" type:"structure"`
  3586. // The port mapping information for the listener.
  3587. PortMapping *PortMapping `locationName:"portMapping" type:"structure"`
  3588. }
  3589. // String returns the string representation
  3590. func (s Listener) String() string {
  3591. return awsutil.Prettify(s)
  3592. }
  3593. // GoString returns the string representation
  3594. func (s Listener) GoString() string {
  3595. return s.String()
  3596. }
  3597. // Validate inspects the fields of the type to determine if they are valid.
  3598. func (s *Listener) Validate() error {
  3599. invalidParams := request.ErrInvalidParams{Context: "Listener"}
  3600. if s.HealthCheck != nil {
  3601. if err := s.HealthCheck.Validate(); err != nil {
  3602. invalidParams.AddNested("HealthCheck", err.(request.ErrInvalidParams))
  3603. }
  3604. }
  3605. if s.PortMapping != nil {
  3606. if err := s.PortMapping.Validate(); err != nil {
  3607. invalidParams.AddNested("PortMapping", err.(request.ErrInvalidParams))
  3608. }
  3609. }
  3610. if invalidParams.Len() > 0 {
  3611. return invalidParams
  3612. }
  3613. return nil
  3614. }
  3615. // SetHealthCheck sets the HealthCheck field's value.
  3616. func (s *Listener) SetHealthCheck(v *HealthCheckPolicy) *Listener {
  3617. s.HealthCheck = v
  3618. return s
  3619. }
  3620. // SetPortMapping sets the PortMapping field's value.
  3621. func (s *Listener) SetPortMapping(v *PortMapping) *Listener {
  3622. s.PortMapping = v
  3623. return s
  3624. }
  3625. // An object representing a service mesh returned by a describe operation.
  3626. type MeshData struct {
  3627. _ struct{} `type:"structure"`
  3628. // The name of the service mesh.
  3629. //
  3630. // MeshName is a required field
  3631. MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"`
  3632. // The associated metadata for the service mesh.
  3633. //
  3634. // Metadata is a required field
  3635. Metadata *ResourceMetadata `locationName:"metadata" type:"structure" required:"true"`
  3636. // The status of the service mesh.
  3637. Status *MeshStatus `locationName:"status" type:"structure"`
  3638. }
  3639. // String returns the string representation
  3640. func (s MeshData) String() string {
  3641. return awsutil.Prettify(s)
  3642. }
  3643. // GoString returns the string representation
  3644. func (s MeshData) GoString() string {
  3645. return s.String()
  3646. }
  3647. // SetMeshName sets the MeshName field's value.
  3648. func (s *MeshData) SetMeshName(v string) *MeshData {
  3649. s.MeshName = &v
  3650. return s
  3651. }
  3652. // SetMetadata sets the Metadata field's value.
  3653. func (s *MeshData) SetMetadata(v *ResourceMetadata) *MeshData {
  3654. s.Metadata = v
  3655. return s
  3656. }
  3657. // SetStatus sets the Status field's value.
  3658. func (s *MeshData) SetStatus(v *MeshStatus) *MeshData {
  3659. s.Status = v
  3660. return s
  3661. }
  3662. // An object representing a service mesh returned by a list operation.
  3663. type MeshRef struct {
  3664. _ struct{} `type:"structure"`
  3665. // The full Amazon Resource Name (ARN) of the service mesh.
  3666. Arn *string `locationName:"arn" type:"string"`
  3667. // The name of the service mesh.
  3668. MeshName *string `locationName:"meshName" min:"1" type:"string"`
  3669. }
  3670. // String returns the string representation
  3671. func (s MeshRef) String() string {
  3672. return awsutil.Prettify(s)
  3673. }
  3674. // GoString returns the string representation
  3675. func (s MeshRef) GoString() string {
  3676. return s.String()
  3677. }
  3678. // SetArn sets the Arn field's value.
  3679. func (s *MeshRef) SetArn(v string) *MeshRef {
  3680. s.Arn = &v
  3681. return s
  3682. }
  3683. // SetMeshName sets the MeshName field's value.
  3684. func (s *MeshRef) SetMeshName(v string) *MeshRef {
  3685. s.MeshName = &v
  3686. return s
  3687. }
  3688. // An object representing the status of a service mesh.
  3689. type MeshStatus struct {
  3690. _ struct{} `type:"structure"`
  3691. // The current mesh status.
  3692. Status *string `locationName:"status" type:"string" enum:"MeshStatusCode"`
  3693. }
  3694. // String returns the string representation
  3695. func (s MeshStatus) String() string {
  3696. return awsutil.Prettify(s)
  3697. }
  3698. // GoString returns the string representation
  3699. func (s MeshStatus) GoString() string {
  3700. return s.String()
  3701. }
  3702. // SetStatus sets the Status field's value.
  3703. func (s *MeshStatus) SetStatus(v string) *MeshStatus {
  3704. s.Status = &v
  3705. return s
  3706. }
  3707. // An object representing a virtual node listener port mapping.
  3708. type PortMapping struct {
  3709. _ struct{} `type:"structure"`
  3710. // The port used for the port mapping.
  3711. Port *int64 `locationName:"port" min:"1" type:"integer"`
  3712. // The protocol used for the port mapping.
  3713. Protocol *string `locationName:"protocol" type:"string" enum:"PortProtocol"`
  3714. }
  3715. // String returns the string representation
  3716. func (s PortMapping) String() string {
  3717. return awsutil.Prettify(s)
  3718. }
  3719. // GoString returns the string representation
  3720. func (s PortMapping) GoString() string {
  3721. return s.String()
  3722. }
  3723. // Validate inspects the fields of the type to determine if they are valid.
  3724. func (s *PortMapping) Validate() error {
  3725. invalidParams := request.ErrInvalidParams{Context: "PortMapping"}
  3726. if s.Port != nil && *s.Port < 1 {
  3727. invalidParams.Add(request.NewErrParamMinValue("Port", 1))
  3728. }
  3729. if invalidParams.Len() > 0 {
  3730. return invalidParams
  3731. }
  3732. return nil
  3733. }
  3734. // SetPort sets the Port field's value.
  3735. func (s *PortMapping) SetPort(v int64) *PortMapping {
  3736. s.Port = &v
  3737. return s
  3738. }
  3739. // SetProtocol sets the Protocol field's value.
  3740. func (s *PortMapping) SetProtocol(v string) *PortMapping {
  3741. s.Protocol = &v
  3742. return s
  3743. }
  3744. // An object representing metadata for a resource.
  3745. type ResourceMetadata struct {
  3746. _ struct{} `type:"structure"`
  3747. // The full Amazon Resource Name (ARN) for the resource.
  3748. //
  3749. // After you create a virtual node, set this value (either the full ARN or the
  3750. // truncated resource name, for example, mesh/default/virtualNode/simpleapp,
  3751. // as the APPMESH_VIRTUAL_NODE_NAME environment variable for your task group's
  3752. // Envoy proxy container in your task definition or pod spec. This is then mapped
  3753. // to the node.id and node.cluster Envoy parameters.
  3754. //
  3755. // If you require your Envoy stats or tracing to use a different name, you can
  3756. // override the node.cluster value that is set by APPMESH_VIRTUAL_NODE_NAME
  3757. // with the APPMESH_VIRTUAL_NODE_CLUSTER environment variable.
  3758. Arn *string `locationName:"arn" type:"string"`
  3759. // The Unix epoch timestamp in seconds for when the resource was created.
  3760. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"`
  3761. // The Unix epoch timestamp in seconds for when the resource was last updated.
  3762. LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"`
  3763. // The unique identifier for the resource.
  3764. Uid *string `locationName:"uid" type:"string"`
  3765. // The version of the resource. Resources are created at version 1, and this
  3766. // version is incremented each time they are updated.
  3767. Version *int64 `locationName:"version" type:"long"`
  3768. }
  3769. // String returns the string representation
  3770. func (s ResourceMetadata) String() string {
  3771. return awsutil.Prettify(s)
  3772. }
  3773. // GoString returns the string representation
  3774. func (s ResourceMetadata) GoString() string {
  3775. return s.String()
  3776. }
  3777. // SetArn sets the Arn field's value.
  3778. func (s *ResourceMetadata) SetArn(v string) *ResourceMetadata {
  3779. s.Arn = &v
  3780. return s
  3781. }
  3782. // SetCreatedAt sets the CreatedAt field's value.
  3783. func (s *ResourceMetadata) SetCreatedAt(v time.Time) *ResourceMetadata {
  3784. s.CreatedAt = &v
  3785. return s
  3786. }
  3787. // SetLastUpdatedAt sets the LastUpdatedAt field's value.
  3788. func (s *ResourceMetadata) SetLastUpdatedAt(v time.Time) *ResourceMetadata {
  3789. s.LastUpdatedAt = &v
  3790. return s
  3791. }
  3792. // SetUid sets the Uid field's value.
  3793. func (s *ResourceMetadata) SetUid(v string) *ResourceMetadata {
  3794. s.Uid = &v
  3795. return s
  3796. }
  3797. // SetVersion sets the Version field's value.
  3798. func (s *ResourceMetadata) SetVersion(v int64) *ResourceMetadata {
  3799. s.Version = &v
  3800. return s
  3801. }
  3802. // An object representing a route returned by a describe operation.
  3803. type RouteData struct {
  3804. _ struct{} `type:"structure"`
  3805. // The name of the service mesh in which the route resides.
  3806. //
  3807. // MeshName is a required field
  3808. MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"`
  3809. // The associated metadata for the route.
  3810. Metadata *ResourceMetadata `locationName:"metadata" type:"structure"`
  3811. // The name of the route.
  3812. //
  3813. // RouteName is a required field
  3814. RouteName *string `locationName:"routeName" min:"1" type:"string" required:"true"`
  3815. // The specifications of the route.
  3816. Spec *RouteSpec `locationName:"spec" type:"structure"`
  3817. // The status of the route.
  3818. Status *RouteStatus `locationName:"status" type:"structure"`
  3819. // The virtual router with which the route is associated.
  3820. //
  3821. // VirtualRouterName is a required field
  3822. VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string" required:"true"`
  3823. }
  3824. // String returns the string representation
  3825. func (s RouteData) String() string {
  3826. return awsutil.Prettify(s)
  3827. }
  3828. // GoString returns the string representation
  3829. func (s RouteData) GoString() string {
  3830. return s.String()
  3831. }
  3832. // SetMeshName sets the MeshName field's value.
  3833. func (s *RouteData) SetMeshName(v string) *RouteData {
  3834. s.MeshName = &v
  3835. return s
  3836. }
  3837. // SetMetadata sets the Metadata field's value.
  3838. func (s *RouteData) SetMetadata(v *ResourceMetadata) *RouteData {
  3839. s.Metadata = v
  3840. return s
  3841. }
  3842. // SetRouteName sets the RouteName field's value.
  3843. func (s *RouteData) SetRouteName(v string) *RouteData {
  3844. s.RouteName = &v
  3845. return s
  3846. }
  3847. // SetSpec sets the Spec field's value.
  3848. func (s *RouteData) SetSpec(v *RouteSpec) *RouteData {
  3849. s.Spec = v
  3850. return s
  3851. }
  3852. // SetStatus sets the Status field's value.
  3853. func (s *RouteData) SetStatus(v *RouteStatus) *RouteData {
  3854. s.Status = v
  3855. return s
  3856. }
  3857. // SetVirtualRouterName sets the VirtualRouterName field's value.
  3858. func (s *RouteData) SetVirtualRouterName(v string) *RouteData {
  3859. s.VirtualRouterName = &v
  3860. return s
  3861. }
  3862. // An object representing a route returned by a list operation.
  3863. type RouteRef struct {
  3864. _ struct{} `type:"structure"`
  3865. // The full Amazon Resource Name (ARN) for the route.
  3866. Arn *string `locationName:"arn" type:"string"`
  3867. // The name of the service mesh in which the route resides.
  3868. MeshName *string `locationName:"meshName" min:"1" type:"string"`
  3869. // The name of the route.
  3870. RouteName *string `locationName:"routeName" min:"1" type:"string"`
  3871. // The virtual router with which the route is associated.
  3872. VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string"`
  3873. }
  3874. // String returns the string representation
  3875. func (s RouteRef) String() string {
  3876. return awsutil.Prettify(s)
  3877. }
  3878. // GoString returns the string representation
  3879. func (s RouteRef) GoString() string {
  3880. return s.String()
  3881. }
  3882. // SetArn sets the Arn field's value.
  3883. func (s *RouteRef) SetArn(v string) *RouteRef {
  3884. s.Arn = &v
  3885. return s
  3886. }
  3887. // SetMeshName sets the MeshName field's value.
  3888. func (s *RouteRef) SetMeshName(v string) *RouteRef {
  3889. s.MeshName = &v
  3890. return s
  3891. }
  3892. // SetRouteName sets the RouteName field's value.
  3893. func (s *RouteRef) SetRouteName(v string) *RouteRef {
  3894. s.RouteName = &v
  3895. return s
  3896. }
  3897. // SetVirtualRouterName sets the VirtualRouterName field's value.
  3898. func (s *RouteRef) SetVirtualRouterName(v string) *RouteRef {
  3899. s.VirtualRouterName = &v
  3900. return s
  3901. }
  3902. // An object representing the specification of a route.
  3903. type RouteSpec struct {
  3904. _ struct{} `type:"structure"`
  3905. // The HTTP routing information for the route.
  3906. HttpRoute *HttpRoute `locationName:"httpRoute" type:"structure"`
  3907. }
  3908. // String returns the string representation
  3909. func (s RouteSpec) String() string {
  3910. return awsutil.Prettify(s)
  3911. }
  3912. // GoString returns the string representation
  3913. func (s RouteSpec) GoString() string {
  3914. return s.String()
  3915. }
  3916. // Validate inspects the fields of the type to determine if they are valid.
  3917. func (s *RouteSpec) Validate() error {
  3918. invalidParams := request.ErrInvalidParams{Context: "RouteSpec"}
  3919. if s.HttpRoute != nil {
  3920. if err := s.HttpRoute.Validate(); err != nil {
  3921. invalidParams.AddNested("HttpRoute", err.(request.ErrInvalidParams))
  3922. }
  3923. }
  3924. if invalidParams.Len() > 0 {
  3925. return invalidParams
  3926. }
  3927. return nil
  3928. }
  3929. // SetHttpRoute sets the HttpRoute field's value.
  3930. func (s *RouteSpec) SetHttpRoute(v *HttpRoute) *RouteSpec {
  3931. s.HttpRoute = v
  3932. return s
  3933. }
  3934. // An object representing the current status of a route.
  3935. type RouteStatus struct {
  3936. _ struct{} `type:"structure"`
  3937. // The current status for the route.
  3938. Status *string `locationName:"status" type:"string" enum:"RouteStatusCode"`
  3939. }
  3940. // String returns the string representation
  3941. func (s RouteStatus) String() string {
  3942. return awsutil.Prettify(s)
  3943. }
  3944. // GoString returns the string representation
  3945. func (s RouteStatus) GoString() string {
  3946. return s.String()
  3947. }
  3948. // SetStatus sets the Status field's value.
  3949. func (s *RouteStatus) SetStatus(v string) *RouteStatus {
  3950. s.Status = &v
  3951. return s
  3952. }
  3953. // An object representing the service discovery information for a virtual node.
  3954. type ServiceDiscovery struct {
  3955. _ struct{} `type:"structure"`
  3956. // Specifies the DNS service name for the virtual node.
  3957. Dns *DnsServiceDiscovery `locationName:"dns" type:"structure"`
  3958. }
  3959. // String returns the string representation
  3960. func (s ServiceDiscovery) String() string {
  3961. return awsutil.Prettify(s)
  3962. }
  3963. // GoString returns the string representation
  3964. func (s ServiceDiscovery) GoString() string {
  3965. return s.String()
  3966. }
  3967. // SetDns sets the Dns field's value.
  3968. func (s *ServiceDiscovery) SetDns(v *DnsServiceDiscovery) *ServiceDiscovery {
  3969. s.Dns = v
  3970. return s
  3971. }
  3972. type UpdateRouteInput struct {
  3973. _ struct{} `type:"structure"`
  3974. // Unique, case-sensitive identifier that you provide to ensure the idempotency
  3975. // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed.
  3976. ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"`
  3977. // The name of the service mesh in which the route resides.
  3978. //
  3979. // MeshName is a required field
  3980. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  3981. // The name of the route to update.
  3982. //
  3983. // RouteName is a required field
  3984. RouteName *string `location:"uri" locationName:"routeName" min:"1" type:"string" required:"true"`
  3985. // The new route specification to apply. This overwrites the existing data.
  3986. //
  3987. // Spec is a required field
  3988. Spec *RouteSpec `locationName:"spec" type:"structure" required:"true"`
  3989. // The name of the virtual router with which the route is associated.
  3990. //
  3991. // VirtualRouterName is a required field
  3992. VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"`
  3993. }
  3994. // String returns the string representation
  3995. func (s UpdateRouteInput) String() string {
  3996. return awsutil.Prettify(s)
  3997. }
  3998. // GoString returns the string representation
  3999. func (s UpdateRouteInput) GoString() string {
  4000. return s.String()
  4001. }
  4002. // Validate inspects the fields of the type to determine if they are valid.
  4003. func (s *UpdateRouteInput) Validate() error {
  4004. invalidParams := request.ErrInvalidParams{Context: "UpdateRouteInput"}
  4005. if s.MeshName == nil {
  4006. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  4007. }
  4008. if s.MeshName != nil && len(*s.MeshName) < 1 {
  4009. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  4010. }
  4011. if s.RouteName == nil {
  4012. invalidParams.Add(request.NewErrParamRequired("RouteName"))
  4013. }
  4014. if s.RouteName != nil && len(*s.RouteName) < 1 {
  4015. invalidParams.Add(request.NewErrParamMinLen("RouteName", 1))
  4016. }
  4017. if s.Spec == nil {
  4018. invalidParams.Add(request.NewErrParamRequired("Spec"))
  4019. }
  4020. if s.VirtualRouterName == nil {
  4021. invalidParams.Add(request.NewErrParamRequired("VirtualRouterName"))
  4022. }
  4023. if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 {
  4024. invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1))
  4025. }
  4026. if s.Spec != nil {
  4027. if err := s.Spec.Validate(); err != nil {
  4028. invalidParams.AddNested("Spec", err.(request.ErrInvalidParams))
  4029. }
  4030. }
  4031. if invalidParams.Len() > 0 {
  4032. return invalidParams
  4033. }
  4034. return nil
  4035. }
  4036. // SetClientToken sets the ClientToken field's value.
  4037. func (s *UpdateRouteInput) SetClientToken(v string) *UpdateRouteInput {
  4038. s.ClientToken = &v
  4039. return s
  4040. }
  4041. // SetMeshName sets the MeshName field's value.
  4042. func (s *UpdateRouteInput) SetMeshName(v string) *UpdateRouteInput {
  4043. s.MeshName = &v
  4044. return s
  4045. }
  4046. // SetRouteName sets the RouteName field's value.
  4047. func (s *UpdateRouteInput) SetRouteName(v string) *UpdateRouteInput {
  4048. s.RouteName = &v
  4049. return s
  4050. }
  4051. // SetSpec sets the Spec field's value.
  4052. func (s *UpdateRouteInput) SetSpec(v *RouteSpec) *UpdateRouteInput {
  4053. s.Spec = v
  4054. return s
  4055. }
  4056. // SetVirtualRouterName sets the VirtualRouterName field's value.
  4057. func (s *UpdateRouteInput) SetVirtualRouterName(v string) *UpdateRouteInput {
  4058. s.VirtualRouterName = &v
  4059. return s
  4060. }
  4061. type UpdateRouteOutput struct {
  4062. _ struct{} `type:"structure" payload:"Route"`
  4063. // A full description of the route that was updated.
  4064. Route *RouteData `locationName:"route" type:"structure"`
  4065. }
  4066. // String returns the string representation
  4067. func (s UpdateRouteOutput) String() string {
  4068. return awsutil.Prettify(s)
  4069. }
  4070. // GoString returns the string representation
  4071. func (s UpdateRouteOutput) GoString() string {
  4072. return s.String()
  4073. }
  4074. // SetRoute sets the Route field's value.
  4075. func (s *UpdateRouteOutput) SetRoute(v *RouteData) *UpdateRouteOutput {
  4076. s.Route = v
  4077. return s
  4078. }
  4079. type UpdateVirtualNodeInput struct {
  4080. _ struct{} `type:"structure"`
  4081. // Unique, case-sensitive identifier that you provide to ensure the idempotency
  4082. // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed.
  4083. ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"`
  4084. // The name of the service mesh in which the virtual node resides.
  4085. //
  4086. // MeshName is a required field
  4087. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  4088. // The new virtual node specification to apply. This overwrites the existing
  4089. // data.
  4090. //
  4091. // Spec is a required field
  4092. Spec *VirtualNodeSpec `locationName:"spec" type:"structure" required:"true"`
  4093. // The name of the virtual node to update.
  4094. //
  4095. // VirtualNodeName is a required field
  4096. VirtualNodeName *string `location:"uri" locationName:"virtualNodeName" min:"1" type:"string" required:"true"`
  4097. }
  4098. // String returns the string representation
  4099. func (s UpdateVirtualNodeInput) String() string {
  4100. return awsutil.Prettify(s)
  4101. }
  4102. // GoString returns the string representation
  4103. func (s UpdateVirtualNodeInput) GoString() string {
  4104. return s.String()
  4105. }
  4106. // Validate inspects the fields of the type to determine if they are valid.
  4107. func (s *UpdateVirtualNodeInput) Validate() error {
  4108. invalidParams := request.ErrInvalidParams{Context: "UpdateVirtualNodeInput"}
  4109. if s.MeshName == nil {
  4110. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  4111. }
  4112. if s.MeshName != nil && len(*s.MeshName) < 1 {
  4113. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  4114. }
  4115. if s.Spec == nil {
  4116. invalidParams.Add(request.NewErrParamRequired("Spec"))
  4117. }
  4118. if s.VirtualNodeName == nil {
  4119. invalidParams.Add(request.NewErrParamRequired("VirtualNodeName"))
  4120. }
  4121. if s.VirtualNodeName != nil && len(*s.VirtualNodeName) < 1 {
  4122. invalidParams.Add(request.NewErrParamMinLen("VirtualNodeName", 1))
  4123. }
  4124. if s.Spec != nil {
  4125. if err := s.Spec.Validate(); err != nil {
  4126. invalidParams.AddNested("Spec", err.(request.ErrInvalidParams))
  4127. }
  4128. }
  4129. if invalidParams.Len() > 0 {
  4130. return invalidParams
  4131. }
  4132. return nil
  4133. }
  4134. // SetClientToken sets the ClientToken field's value.
  4135. func (s *UpdateVirtualNodeInput) SetClientToken(v string) *UpdateVirtualNodeInput {
  4136. s.ClientToken = &v
  4137. return s
  4138. }
  4139. // SetMeshName sets the MeshName field's value.
  4140. func (s *UpdateVirtualNodeInput) SetMeshName(v string) *UpdateVirtualNodeInput {
  4141. s.MeshName = &v
  4142. return s
  4143. }
  4144. // SetSpec sets the Spec field's value.
  4145. func (s *UpdateVirtualNodeInput) SetSpec(v *VirtualNodeSpec) *UpdateVirtualNodeInput {
  4146. s.Spec = v
  4147. return s
  4148. }
  4149. // SetVirtualNodeName sets the VirtualNodeName field's value.
  4150. func (s *UpdateVirtualNodeInput) SetVirtualNodeName(v string) *UpdateVirtualNodeInput {
  4151. s.VirtualNodeName = &v
  4152. return s
  4153. }
  4154. type UpdateVirtualNodeOutput struct {
  4155. _ struct{} `type:"structure" payload:"VirtualNode"`
  4156. // A full description of the virtual node that was updated.
  4157. VirtualNode *VirtualNodeData `locationName:"virtualNode" type:"structure"`
  4158. }
  4159. // String returns the string representation
  4160. func (s UpdateVirtualNodeOutput) String() string {
  4161. return awsutil.Prettify(s)
  4162. }
  4163. // GoString returns the string representation
  4164. func (s UpdateVirtualNodeOutput) GoString() string {
  4165. return s.String()
  4166. }
  4167. // SetVirtualNode sets the VirtualNode field's value.
  4168. func (s *UpdateVirtualNodeOutput) SetVirtualNode(v *VirtualNodeData) *UpdateVirtualNodeOutput {
  4169. s.VirtualNode = v
  4170. return s
  4171. }
  4172. type UpdateVirtualRouterInput struct {
  4173. _ struct{} `type:"structure"`
  4174. // Unique, case-sensitive identifier that you provide to ensure the idempotency
  4175. // of therequest. Up to 36 letters, numbers, hyphens, and underscores are allowed.
  4176. ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"`
  4177. // The name of the service mesh in which the virtual router resides.
  4178. //
  4179. // MeshName is a required field
  4180. MeshName *string `location:"uri" locationName:"meshName" min:"1" type:"string" required:"true"`
  4181. // The new virtual router specification to apply. This overwrites the existing
  4182. // data.
  4183. //
  4184. // Spec is a required field
  4185. Spec *VirtualRouterSpec `locationName:"spec" type:"structure" required:"true"`
  4186. // The name of the virtual router to update.
  4187. //
  4188. // VirtualRouterName is a required field
  4189. VirtualRouterName *string `location:"uri" locationName:"virtualRouterName" min:"1" type:"string" required:"true"`
  4190. }
  4191. // String returns the string representation
  4192. func (s UpdateVirtualRouterInput) String() string {
  4193. return awsutil.Prettify(s)
  4194. }
  4195. // GoString returns the string representation
  4196. func (s UpdateVirtualRouterInput) GoString() string {
  4197. return s.String()
  4198. }
  4199. // Validate inspects the fields of the type to determine if they are valid.
  4200. func (s *UpdateVirtualRouterInput) Validate() error {
  4201. invalidParams := request.ErrInvalidParams{Context: "UpdateVirtualRouterInput"}
  4202. if s.MeshName == nil {
  4203. invalidParams.Add(request.NewErrParamRequired("MeshName"))
  4204. }
  4205. if s.MeshName != nil && len(*s.MeshName) < 1 {
  4206. invalidParams.Add(request.NewErrParamMinLen("MeshName", 1))
  4207. }
  4208. if s.Spec == nil {
  4209. invalidParams.Add(request.NewErrParamRequired("Spec"))
  4210. }
  4211. if s.VirtualRouterName == nil {
  4212. invalidParams.Add(request.NewErrParamRequired("VirtualRouterName"))
  4213. }
  4214. if s.VirtualRouterName != nil && len(*s.VirtualRouterName) < 1 {
  4215. invalidParams.Add(request.NewErrParamMinLen("VirtualRouterName", 1))
  4216. }
  4217. if invalidParams.Len() > 0 {
  4218. return invalidParams
  4219. }
  4220. return nil
  4221. }
  4222. // SetClientToken sets the ClientToken field's value.
  4223. func (s *UpdateVirtualRouterInput) SetClientToken(v string) *UpdateVirtualRouterInput {
  4224. s.ClientToken = &v
  4225. return s
  4226. }
  4227. // SetMeshName sets the MeshName field's value.
  4228. func (s *UpdateVirtualRouterInput) SetMeshName(v string) *UpdateVirtualRouterInput {
  4229. s.MeshName = &v
  4230. return s
  4231. }
  4232. // SetSpec sets the Spec field's value.
  4233. func (s *UpdateVirtualRouterInput) SetSpec(v *VirtualRouterSpec) *UpdateVirtualRouterInput {
  4234. s.Spec = v
  4235. return s
  4236. }
  4237. // SetVirtualRouterName sets the VirtualRouterName field's value.
  4238. func (s *UpdateVirtualRouterInput) SetVirtualRouterName(v string) *UpdateVirtualRouterInput {
  4239. s.VirtualRouterName = &v
  4240. return s
  4241. }
  4242. type UpdateVirtualRouterOutput struct {
  4243. _ struct{} `type:"structure" payload:"VirtualRouter"`
  4244. // A full description of the virtual router that was updated.
  4245. VirtualRouter *VirtualRouterData `locationName:"virtualRouter" type:"structure"`
  4246. }
  4247. // String returns the string representation
  4248. func (s UpdateVirtualRouterOutput) String() string {
  4249. return awsutil.Prettify(s)
  4250. }
  4251. // GoString returns the string representation
  4252. func (s UpdateVirtualRouterOutput) GoString() string {
  4253. return s.String()
  4254. }
  4255. // SetVirtualRouter sets the VirtualRouter field's value.
  4256. func (s *UpdateVirtualRouterOutput) SetVirtualRouter(v *VirtualRouterData) *UpdateVirtualRouterOutput {
  4257. s.VirtualRouter = v
  4258. return s
  4259. }
  4260. // An object representing a virtual node returned by a describe operation.
  4261. type VirtualNodeData struct {
  4262. _ struct{} `type:"structure"`
  4263. // The name of the service mesh in which the virtual node resides.
  4264. //
  4265. // MeshName is a required field
  4266. MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"`
  4267. // The associated metadata for the virtual node.
  4268. Metadata *ResourceMetadata `locationName:"metadata" type:"structure"`
  4269. // The specifications of the virtual node.
  4270. Spec *VirtualNodeSpec `locationName:"spec" type:"structure"`
  4271. // The current status for the virtual node.
  4272. Status *VirtualNodeStatus `locationName:"status" type:"structure"`
  4273. // The name of the virtual node.
  4274. //
  4275. // VirtualNodeName is a required field
  4276. VirtualNodeName *string `locationName:"virtualNodeName" min:"1" type:"string" required:"true"`
  4277. }
  4278. // String returns the string representation
  4279. func (s VirtualNodeData) String() string {
  4280. return awsutil.Prettify(s)
  4281. }
  4282. // GoString returns the string representation
  4283. func (s VirtualNodeData) GoString() string {
  4284. return s.String()
  4285. }
  4286. // SetMeshName sets the MeshName field's value.
  4287. func (s *VirtualNodeData) SetMeshName(v string) *VirtualNodeData {
  4288. s.MeshName = &v
  4289. return s
  4290. }
  4291. // SetMetadata sets the Metadata field's value.
  4292. func (s *VirtualNodeData) SetMetadata(v *ResourceMetadata) *VirtualNodeData {
  4293. s.Metadata = v
  4294. return s
  4295. }
  4296. // SetSpec sets the Spec field's value.
  4297. func (s *VirtualNodeData) SetSpec(v *VirtualNodeSpec) *VirtualNodeData {
  4298. s.Spec = v
  4299. return s
  4300. }
  4301. // SetStatus sets the Status field's value.
  4302. func (s *VirtualNodeData) SetStatus(v *VirtualNodeStatus) *VirtualNodeData {
  4303. s.Status = v
  4304. return s
  4305. }
  4306. // SetVirtualNodeName sets the VirtualNodeName field's value.
  4307. func (s *VirtualNodeData) SetVirtualNodeName(v string) *VirtualNodeData {
  4308. s.VirtualNodeName = &v
  4309. return s
  4310. }
  4311. // An object representing a virtual node returned by a list operation.
  4312. type VirtualNodeRef struct {
  4313. _ struct{} `type:"structure"`
  4314. // The full Amazon Resource Name (ARN) for the virtual node.
  4315. Arn *string `locationName:"arn" type:"string"`
  4316. // The name of the service mesh in which the virtual node resides.
  4317. MeshName *string `locationName:"meshName" min:"1" type:"string"`
  4318. // The name of the virtual node.
  4319. VirtualNodeName *string `locationName:"virtualNodeName" min:"1" type:"string"`
  4320. }
  4321. // String returns the string representation
  4322. func (s VirtualNodeRef) String() string {
  4323. return awsutil.Prettify(s)
  4324. }
  4325. // GoString returns the string representation
  4326. func (s VirtualNodeRef) GoString() string {
  4327. return s.String()
  4328. }
  4329. // SetArn sets the Arn field's value.
  4330. func (s *VirtualNodeRef) SetArn(v string) *VirtualNodeRef {
  4331. s.Arn = &v
  4332. return s
  4333. }
  4334. // SetMeshName sets the MeshName field's value.
  4335. func (s *VirtualNodeRef) SetMeshName(v string) *VirtualNodeRef {
  4336. s.MeshName = &v
  4337. return s
  4338. }
  4339. // SetVirtualNodeName sets the VirtualNodeName field's value.
  4340. func (s *VirtualNodeRef) SetVirtualNodeName(v string) *VirtualNodeRef {
  4341. s.VirtualNodeName = &v
  4342. return s
  4343. }
  4344. // An object representing the specification of a virtual node.
  4345. type VirtualNodeSpec struct {
  4346. _ struct{} `type:"structure"`
  4347. // The backends to which the virtual node is expected to send outbound traffic.
  4348. Backends []*string `locationName:"backends" type:"list"`
  4349. // The listeners from which the virtual node is expected to receive inbound
  4350. // traffic.
  4351. Listeners []*Listener `locationName:"listeners" type:"list"`
  4352. // The service discovery information for the virtual node.
  4353. ServiceDiscovery *ServiceDiscovery `locationName:"serviceDiscovery" type:"structure"`
  4354. }
  4355. // String returns the string representation
  4356. func (s VirtualNodeSpec) String() string {
  4357. return awsutil.Prettify(s)
  4358. }
  4359. // GoString returns the string representation
  4360. func (s VirtualNodeSpec) GoString() string {
  4361. return s.String()
  4362. }
  4363. // Validate inspects the fields of the type to determine if they are valid.
  4364. func (s *VirtualNodeSpec) Validate() error {
  4365. invalidParams := request.ErrInvalidParams{Context: "VirtualNodeSpec"}
  4366. if s.Listeners != nil {
  4367. for i, v := range s.Listeners {
  4368. if v == nil {
  4369. continue
  4370. }
  4371. if err := v.Validate(); err != nil {
  4372. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Listeners", i), err.(request.ErrInvalidParams))
  4373. }
  4374. }
  4375. }
  4376. if invalidParams.Len() > 0 {
  4377. return invalidParams
  4378. }
  4379. return nil
  4380. }
  4381. // SetBackends sets the Backends field's value.
  4382. func (s *VirtualNodeSpec) SetBackends(v []*string) *VirtualNodeSpec {
  4383. s.Backends = v
  4384. return s
  4385. }
  4386. // SetListeners sets the Listeners field's value.
  4387. func (s *VirtualNodeSpec) SetListeners(v []*Listener) *VirtualNodeSpec {
  4388. s.Listeners = v
  4389. return s
  4390. }
  4391. // SetServiceDiscovery sets the ServiceDiscovery field's value.
  4392. func (s *VirtualNodeSpec) SetServiceDiscovery(v *ServiceDiscovery) *VirtualNodeSpec {
  4393. s.ServiceDiscovery = v
  4394. return s
  4395. }
  4396. // An object representing the current status of the virtual node.
  4397. type VirtualNodeStatus struct {
  4398. _ struct{} `type:"structure"`
  4399. // The current status of the virtual node.
  4400. Status *string `locationName:"status" type:"string" enum:"VirtualNodeStatusCode"`
  4401. }
  4402. // String returns the string representation
  4403. func (s VirtualNodeStatus) String() string {
  4404. return awsutil.Prettify(s)
  4405. }
  4406. // GoString returns the string representation
  4407. func (s VirtualNodeStatus) GoString() string {
  4408. return s.String()
  4409. }
  4410. // SetStatus sets the Status field's value.
  4411. func (s *VirtualNodeStatus) SetStatus(v string) *VirtualNodeStatus {
  4412. s.Status = &v
  4413. return s
  4414. }
  4415. // An object representing a virtual router returned by a describe operation.
  4416. type VirtualRouterData struct {
  4417. _ struct{} `type:"structure"`
  4418. // The name of the service mesh in which the virtual router resides.
  4419. //
  4420. // MeshName is a required field
  4421. MeshName *string `locationName:"meshName" min:"1" type:"string" required:"true"`
  4422. // The associated metadata for the virtual router.
  4423. Metadata *ResourceMetadata `locationName:"metadata" type:"structure"`
  4424. // The specifications of the virtual router.
  4425. Spec *VirtualRouterSpec `locationName:"spec" type:"structure"`
  4426. // The current status of the virtual router.
  4427. Status *VirtualRouterStatus `locationName:"status" type:"structure"`
  4428. // The name of the virtual router.
  4429. //
  4430. // VirtualRouterName is a required field
  4431. VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string" required:"true"`
  4432. }
  4433. // String returns the string representation
  4434. func (s VirtualRouterData) String() string {
  4435. return awsutil.Prettify(s)
  4436. }
  4437. // GoString returns the string representation
  4438. func (s VirtualRouterData) GoString() string {
  4439. return s.String()
  4440. }
  4441. // SetMeshName sets the MeshName field's value.
  4442. func (s *VirtualRouterData) SetMeshName(v string) *VirtualRouterData {
  4443. s.MeshName = &v
  4444. return s
  4445. }
  4446. // SetMetadata sets the Metadata field's value.
  4447. func (s *VirtualRouterData) SetMetadata(v *ResourceMetadata) *VirtualRouterData {
  4448. s.Metadata = v
  4449. return s
  4450. }
  4451. // SetSpec sets the Spec field's value.
  4452. func (s *VirtualRouterData) SetSpec(v *VirtualRouterSpec) *VirtualRouterData {
  4453. s.Spec = v
  4454. return s
  4455. }
  4456. // SetStatus sets the Status field's value.
  4457. func (s *VirtualRouterData) SetStatus(v *VirtualRouterStatus) *VirtualRouterData {
  4458. s.Status = v
  4459. return s
  4460. }
  4461. // SetVirtualRouterName sets the VirtualRouterName field's value.
  4462. func (s *VirtualRouterData) SetVirtualRouterName(v string) *VirtualRouterData {
  4463. s.VirtualRouterName = &v
  4464. return s
  4465. }
  4466. // An object representing a virtual router returned by a list operation.
  4467. type VirtualRouterRef struct {
  4468. _ struct{} `type:"structure"`
  4469. // The full Amazon Resource Name (ARN) for the virtual router.
  4470. Arn *string `locationName:"arn" type:"string"`
  4471. // The name of the service mesh in which the virtual router resides.
  4472. MeshName *string `locationName:"meshName" min:"1" type:"string"`
  4473. // The name of the virtual router.
  4474. VirtualRouterName *string `locationName:"virtualRouterName" min:"1" type:"string"`
  4475. }
  4476. // String returns the string representation
  4477. func (s VirtualRouterRef) String() string {
  4478. return awsutil.Prettify(s)
  4479. }
  4480. // GoString returns the string representation
  4481. func (s VirtualRouterRef) GoString() string {
  4482. return s.String()
  4483. }
  4484. // SetArn sets the Arn field's value.
  4485. func (s *VirtualRouterRef) SetArn(v string) *VirtualRouterRef {
  4486. s.Arn = &v
  4487. return s
  4488. }
  4489. // SetMeshName sets the MeshName field's value.
  4490. func (s *VirtualRouterRef) SetMeshName(v string) *VirtualRouterRef {
  4491. s.MeshName = &v
  4492. return s
  4493. }
  4494. // SetVirtualRouterName sets the VirtualRouterName field's value.
  4495. func (s *VirtualRouterRef) SetVirtualRouterName(v string) *VirtualRouterRef {
  4496. s.VirtualRouterName = &v
  4497. return s
  4498. }
  4499. // An object representing the specification of a virtual router.
  4500. type VirtualRouterSpec struct {
  4501. _ struct{} `type:"structure"`
  4502. // The service mesh service names to associate with the virtual router.
  4503. ServiceNames []*string `locationName:"serviceNames" type:"list"`
  4504. }
  4505. // String returns the string representation
  4506. func (s VirtualRouterSpec) String() string {
  4507. return awsutil.Prettify(s)
  4508. }
  4509. // GoString returns the string representation
  4510. func (s VirtualRouterSpec) GoString() string {
  4511. return s.String()
  4512. }
  4513. // SetServiceNames sets the ServiceNames field's value.
  4514. func (s *VirtualRouterSpec) SetServiceNames(v []*string) *VirtualRouterSpec {
  4515. s.ServiceNames = v
  4516. return s
  4517. }
  4518. // An object representing the status of a virtual router.
  4519. type VirtualRouterStatus struct {
  4520. _ struct{} `type:"structure"`
  4521. // The current status of the virtual router.
  4522. Status *string `locationName:"status" type:"string" enum:"VirtualRouterStatusCode"`
  4523. }
  4524. // String returns the string representation
  4525. func (s VirtualRouterStatus) String() string {
  4526. return awsutil.Prettify(s)
  4527. }
  4528. // GoString returns the string representation
  4529. func (s VirtualRouterStatus) GoString() string {
  4530. return s.String()
  4531. }
  4532. // SetStatus sets the Status field's value.
  4533. func (s *VirtualRouterStatus) SetStatus(v string) *VirtualRouterStatus {
  4534. s.Status = &v
  4535. return s
  4536. }
  4537. // An object representing a target and its relative weight. Traffic is distributed
  4538. // across targets according to their relative weight. For example, a weighted
  4539. // target with a relative weight of 50 receives five times as much traffic as
  4540. // one with a relative weight of 10.
  4541. type WeightedTarget struct {
  4542. _ struct{} `type:"structure"`
  4543. // The virtual node to associate with the weighted target.
  4544. VirtualNode *string `locationName:"virtualNode" min:"1" type:"string"`
  4545. // The relative weight of the weighted target.
  4546. Weight *int64 `locationName:"weight" type:"integer"`
  4547. }
  4548. // String returns the string representation
  4549. func (s WeightedTarget) String() string {
  4550. return awsutil.Prettify(s)
  4551. }
  4552. // GoString returns the string representation
  4553. func (s WeightedTarget) GoString() string {
  4554. return s.String()
  4555. }
  4556. // Validate inspects the fields of the type to determine if they are valid.
  4557. func (s *WeightedTarget) Validate() error {
  4558. invalidParams := request.ErrInvalidParams{Context: "WeightedTarget"}
  4559. if s.VirtualNode != nil && len(*s.VirtualNode) < 1 {
  4560. invalidParams.Add(request.NewErrParamMinLen("VirtualNode", 1))
  4561. }
  4562. if invalidParams.Len() > 0 {
  4563. return invalidParams
  4564. }
  4565. return nil
  4566. }
  4567. // SetVirtualNode sets the VirtualNode field's value.
  4568. func (s *WeightedTarget) SetVirtualNode(v string) *WeightedTarget {
  4569. s.VirtualNode = &v
  4570. return s
  4571. }
  4572. // SetWeight sets the Weight field's value.
  4573. func (s *WeightedTarget) SetWeight(v int64) *WeightedTarget {
  4574. s.Weight = &v
  4575. return s
  4576. }
  4577. const (
  4578. // MeshStatusCodeActive is a MeshStatusCode enum value
  4579. MeshStatusCodeActive = "ACTIVE"
  4580. // MeshStatusCodeDeleted is a MeshStatusCode enum value
  4581. MeshStatusCodeDeleted = "DELETED"
  4582. // MeshStatusCodeInactive is a MeshStatusCode enum value
  4583. MeshStatusCodeInactive = "INACTIVE"
  4584. )
  4585. const (
  4586. // PortProtocolHttp is a PortProtocol enum value
  4587. PortProtocolHttp = "http"
  4588. // PortProtocolTcp is a PortProtocol enum value
  4589. PortProtocolTcp = "tcp"
  4590. )
  4591. const (
  4592. // RouteStatusCodeActive is a RouteStatusCode enum value
  4593. RouteStatusCodeActive = "ACTIVE"
  4594. // RouteStatusCodeDeleted is a RouteStatusCode enum value
  4595. RouteStatusCodeDeleted = "DELETED"
  4596. // RouteStatusCodeInactive is a RouteStatusCode enum value
  4597. RouteStatusCodeInactive = "INACTIVE"
  4598. )
  4599. const (
  4600. // VirtualNodeStatusCodeActive is a VirtualNodeStatusCode enum value
  4601. VirtualNodeStatusCodeActive = "ACTIVE"
  4602. // VirtualNodeStatusCodeDeleted is a VirtualNodeStatusCode enum value
  4603. VirtualNodeStatusCodeDeleted = "DELETED"
  4604. // VirtualNodeStatusCodeInactive is a VirtualNodeStatusCode enum value
  4605. VirtualNodeStatusCodeInactive = "INACTIVE"
  4606. )
  4607. const (
  4608. // VirtualRouterStatusCodeActive is a VirtualRouterStatusCode enum value
  4609. VirtualRouterStatusCodeActive = "ACTIVE"
  4610. // VirtualRouterStatusCodeDeleted is a VirtualRouterStatusCode enum value
  4611. VirtualRouterStatusCodeDeleted = "DELETED"
  4612. // VirtualRouterStatusCodeInactive is a VirtualRouterStatusCode enum value
  4613. VirtualRouterStatusCodeInactive = "INACTIVE"
  4614. )