api.go 162 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package amplify
  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 opCreateApp = "CreateApp"
  11. // CreateAppRequest generates a "aws/request.Request" representing the
  12. // client's request for the CreateApp 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 CreateApp for more information on using the CreateApp
  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 CreateAppRequest method.
  27. // req, resp := client.CreateAppRequest(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/amplify-2017-07-25/CreateApp
  35. func (c *Amplify) CreateAppRequest(input *CreateAppInput) (req *request.Request, output *CreateAppOutput) {
  36. op := &request.Operation{
  37. Name: opCreateApp,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/apps",
  40. }
  41. if input == nil {
  42. input = &CreateAppInput{}
  43. }
  44. output = &CreateAppOutput{}
  45. req = c.newRequest(op, input, output)
  46. return
  47. }
  48. // CreateApp API operation for AWS Amplify.
  49. //
  50. // Creates a new Amplify App.
  51. //
  52. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  53. // with awserr.Error's Code and Message methods to get detailed information about
  54. // the error.
  55. //
  56. // See the AWS API reference guide for AWS Amplify's
  57. // API operation CreateApp for usage and error information.
  58. //
  59. // Returned Error Codes:
  60. // * ErrCodeBadRequestException "BadRequestException"
  61. // Exception thrown when a request contains unexpected data.
  62. //
  63. // * ErrCodeUnauthorizedException "UnauthorizedException"
  64. // Exception thrown when an operation fails due to a lack of access.
  65. //
  66. // * ErrCodeInternalFailureException "InternalFailureException"
  67. // Exception thrown when the service fails to perform an operation due to an
  68. // internal issue.
  69. //
  70. // * ErrCodeLimitExceededException "LimitExceededException"
  71. // Exception thrown when a resource could not be created because of service
  72. // limits.
  73. //
  74. // * ErrCodeDependentServiceFailureException "DependentServiceFailureException"
  75. // Exception thrown when an operation fails due to a dependent service throwing
  76. // an exception.
  77. //
  78. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/CreateApp
  79. func (c *Amplify) CreateApp(input *CreateAppInput) (*CreateAppOutput, error) {
  80. req, out := c.CreateAppRequest(input)
  81. return out, req.Send()
  82. }
  83. // CreateAppWithContext is the same as CreateApp with the addition of
  84. // the ability to pass a context and additional request options.
  85. //
  86. // See CreateApp for details on how to use this API operation.
  87. //
  88. // The context must be non-nil and will be used for request cancellation. If
  89. // the context is nil a panic will occur. In the future the SDK may create
  90. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  91. // for more information on using Contexts.
  92. func (c *Amplify) CreateAppWithContext(ctx aws.Context, input *CreateAppInput, opts ...request.Option) (*CreateAppOutput, error) {
  93. req, out := c.CreateAppRequest(input)
  94. req.SetContext(ctx)
  95. req.ApplyOptions(opts...)
  96. return out, req.Send()
  97. }
  98. const opCreateBranch = "CreateBranch"
  99. // CreateBranchRequest generates a "aws/request.Request" representing the
  100. // client's request for the CreateBranch operation. The "output" return
  101. // value will be populated with the request's response once the request completes
  102. // successfully.
  103. //
  104. // Use "Send" method on the returned Request to send the API call to the service.
  105. // the "output" return value is not valid until after Send returns without error.
  106. //
  107. // See CreateBranch for more information on using the CreateBranch
  108. // API call, and error handling.
  109. //
  110. // This method is useful when you want to inject custom logic or configuration
  111. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  112. //
  113. //
  114. // // Example sending a request using the CreateBranchRequest method.
  115. // req, resp := client.CreateBranchRequest(params)
  116. //
  117. // err := req.Send()
  118. // if err == nil { // resp is now filled
  119. // fmt.Println(resp)
  120. // }
  121. //
  122. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/CreateBranch
  123. func (c *Amplify) CreateBranchRequest(input *CreateBranchInput) (req *request.Request, output *CreateBranchOutput) {
  124. op := &request.Operation{
  125. Name: opCreateBranch,
  126. HTTPMethod: "POST",
  127. HTTPPath: "/apps/{appId}/branches",
  128. }
  129. if input == nil {
  130. input = &CreateBranchInput{}
  131. }
  132. output = &CreateBranchOutput{}
  133. req = c.newRequest(op, input, output)
  134. return
  135. }
  136. // CreateBranch API operation for AWS Amplify.
  137. //
  138. // Creates a new Branch for an Amplify App.
  139. //
  140. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  141. // with awserr.Error's Code and Message methods to get detailed information about
  142. // the error.
  143. //
  144. // See the AWS API reference guide for AWS Amplify's
  145. // API operation CreateBranch for usage and error information.
  146. //
  147. // Returned Error Codes:
  148. // * ErrCodeBadRequestException "BadRequestException"
  149. // Exception thrown when a request contains unexpected data.
  150. //
  151. // * ErrCodeUnauthorizedException "UnauthorizedException"
  152. // Exception thrown when an operation fails due to a lack of access.
  153. //
  154. // * ErrCodeNotFoundException "NotFoundException"
  155. // Exception thrown when an entity has not been found during an operation.
  156. //
  157. // * ErrCodeInternalFailureException "InternalFailureException"
  158. // Exception thrown when the service fails to perform an operation due to an
  159. // internal issue.
  160. //
  161. // * ErrCodeLimitExceededException "LimitExceededException"
  162. // Exception thrown when a resource could not be created because of service
  163. // limits.
  164. //
  165. // * ErrCodeDependentServiceFailureException "DependentServiceFailureException"
  166. // Exception thrown when an operation fails due to a dependent service throwing
  167. // an exception.
  168. //
  169. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/CreateBranch
  170. func (c *Amplify) CreateBranch(input *CreateBranchInput) (*CreateBranchOutput, error) {
  171. req, out := c.CreateBranchRequest(input)
  172. return out, req.Send()
  173. }
  174. // CreateBranchWithContext is the same as CreateBranch with the addition of
  175. // the ability to pass a context and additional request options.
  176. //
  177. // See CreateBranch for details on how to use this API operation.
  178. //
  179. // The context must be non-nil and will be used for request cancellation. If
  180. // the context is nil a panic will occur. In the future the SDK may create
  181. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  182. // for more information on using Contexts.
  183. func (c *Amplify) CreateBranchWithContext(ctx aws.Context, input *CreateBranchInput, opts ...request.Option) (*CreateBranchOutput, error) {
  184. req, out := c.CreateBranchRequest(input)
  185. req.SetContext(ctx)
  186. req.ApplyOptions(opts...)
  187. return out, req.Send()
  188. }
  189. const opCreateDomainAssociation = "CreateDomainAssociation"
  190. // CreateDomainAssociationRequest generates a "aws/request.Request" representing the
  191. // client's request for the CreateDomainAssociation operation. The "output" return
  192. // value will be populated with the request's response once the request completes
  193. // successfully.
  194. //
  195. // Use "Send" method on the returned Request to send the API call to the service.
  196. // the "output" return value is not valid until after Send returns without error.
  197. //
  198. // See CreateDomainAssociation for more information on using the CreateDomainAssociation
  199. // API call, and error handling.
  200. //
  201. // This method is useful when you want to inject custom logic or configuration
  202. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  203. //
  204. //
  205. // // Example sending a request using the CreateDomainAssociationRequest method.
  206. // req, resp := client.CreateDomainAssociationRequest(params)
  207. //
  208. // err := req.Send()
  209. // if err == nil { // resp is now filled
  210. // fmt.Println(resp)
  211. // }
  212. //
  213. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/CreateDomainAssociation
  214. func (c *Amplify) CreateDomainAssociationRequest(input *CreateDomainAssociationInput) (req *request.Request, output *CreateDomainAssociationOutput) {
  215. op := &request.Operation{
  216. Name: opCreateDomainAssociation,
  217. HTTPMethod: "POST",
  218. HTTPPath: "/apps/{appId}/domains",
  219. }
  220. if input == nil {
  221. input = &CreateDomainAssociationInput{}
  222. }
  223. output = &CreateDomainAssociationOutput{}
  224. req = c.newRequest(op, input, output)
  225. return
  226. }
  227. // CreateDomainAssociation API operation for AWS Amplify.
  228. //
  229. // Create a new DomainAssociation on an App
  230. //
  231. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  232. // with awserr.Error's Code and Message methods to get detailed information about
  233. // the error.
  234. //
  235. // See the AWS API reference guide for AWS Amplify's
  236. // API operation CreateDomainAssociation for usage and error information.
  237. //
  238. // Returned Error Codes:
  239. // * ErrCodeBadRequestException "BadRequestException"
  240. // Exception thrown when a request contains unexpected data.
  241. //
  242. // * ErrCodeUnauthorizedException "UnauthorizedException"
  243. // Exception thrown when an operation fails due to a lack of access.
  244. //
  245. // * ErrCodeNotFoundException "NotFoundException"
  246. // Exception thrown when an entity has not been found during an operation.
  247. //
  248. // * ErrCodeInternalFailureException "InternalFailureException"
  249. // Exception thrown when the service fails to perform an operation due to an
  250. // internal issue.
  251. //
  252. // * ErrCodeLimitExceededException "LimitExceededException"
  253. // Exception thrown when a resource could not be created because of service
  254. // limits.
  255. //
  256. // * ErrCodeDependentServiceFailureException "DependentServiceFailureException"
  257. // Exception thrown when an operation fails due to a dependent service throwing
  258. // an exception.
  259. //
  260. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/CreateDomainAssociation
  261. func (c *Amplify) CreateDomainAssociation(input *CreateDomainAssociationInput) (*CreateDomainAssociationOutput, error) {
  262. req, out := c.CreateDomainAssociationRequest(input)
  263. return out, req.Send()
  264. }
  265. // CreateDomainAssociationWithContext is the same as CreateDomainAssociation with the addition of
  266. // the ability to pass a context and additional request options.
  267. //
  268. // See CreateDomainAssociation for details on how to use this API operation.
  269. //
  270. // The context must be non-nil and will be used for request cancellation. If
  271. // the context is nil a panic will occur. In the future the SDK may create
  272. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  273. // for more information on using Contexts.
  274. func (c *Amplify) CreateDomainAssociationWithContext(ctx aws.Context, input *CreateDomainAssociationInput, opts ...request.Option) (*CreateDomainAssociationOutput, error) {
  275. req, out := c.CreateDomainAssociationRequest(input)
  276. req.SetContext(ctx)
  277. req.ApplyOptions(opts...)
  278. return out, req.Send()
  279. }
  280. const opDeleteApp = "DeleteApp"
  281. // DeleteAppRequest generates a "aws/request.Request" representing the
  282. // client's request for the DeleteApp operation. The "output" return
  283. // value will be populated with the request's response once the request completes
  284. // successfully.
  285. //
  286. // Use "Send" method on the returned Request to send the API call to the service.
  287. // the "output" return value is not valid until after Send returns without error.
  288. //
  289. // See DeleteApp for more information on using the DeleteApp
  290. // API call, and error handling.
  291. //
  292. // This method is useful when you want to inject custom logic or configuration
  293. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  294. //
  295. //
  296. // // Example sending a request using the DeleteAppRequest method.
  297. // req, resp := client.DeleteAppRequest(params)
  298. //
  299. // err := req.Send()
  300. // if err == nil { // resp is now filled
  301. // fmt.Println(resp)
  302. // }
  303. //
  304. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/DeleteApp
  305. func (c *Amplify) DeleteAppRequest(input *DeleteAppInput) (req *request.Request, output *DeleteAppOutput) {
  306. op := &request.Operation{
  307. Name: opDeleteApp,
  308. HTTPMethod: "DELETE",
  309. HTTPPath: "/apps/{appId}",
  310. }
  311. if input == nil {
  312. input = &DeleteAppInput{}
  313. }
  314. output = &DeleteAppOutput{}
  315. req = c.newRequest(op, input, output)
  316. return
  317. }
  318. // DeleteApp API operation for AWS Amplify.
  319. //
  320. // Delete an existing Amplify App by appId.
  321. //
  322. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  323. // with awserr.Error's Code and Message methods to get detailed information about
  324. // the error.
  325. //
  326. // See the AWS API reference guide for AWS Amplify's
  327. // API operation DeleteApp for usage and error information.
  328. //
  329. // Returned Error Codes:
  330. // * ErrCodeBadRequestException "BadRequestException"
  331. // Exception thrown when a request contains unexpected data.
  332. //
  333. // * ErrCodeNotFoundException "NotFoundException"
  334. // Exception thrown when an entity has not been found during an operation.
  335. //
  336. // * ErrCodeUnauthorizedException "UnauthorizedException"
  337. // Exception thrown when an operation fails due to a lack of access.
  338. //
  339. // * ErrCodeInternalFailureException "InternalFailureException"
  340. // Exception thrown when the service fails to perform an operation due to an
  341. // internal issue.
  342. //
  343. // * ErrCodeDependentServiceFailureException "DependentServiceFailureException"
  344. // Exception thrown when an operation fails due to a dependent service throwing
  345. // an exception.
  346. //
  347. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/DeleteApp
  348. func (c *Amplify) DeleteApp(input *DeleteAppInput) (*DeleteAppOutput, error) {
  349. req, out := c.DeleteAppRequest(input)
  350. return out, req.Send()
  351. }
  352. // DeleteAppWithContext is the same as DeleteApp with the addition of
  353. // the ability to pass a context and additional request options.
  354. //
  355. // See DeleteApp for details on how to use this API operation.
  356. //
  357. // The context must be non-nil and will be used for request cancellation. If
  358. // the context is nil a panic will occur. In the future the SDK may create
  359. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  360. // for more information on using Contexts.
  361. func (c *Amplify) DeleteAppWithContext(ctx aws.Context, input *DeleteAppInput, opts ...request.Option) (*DeleteAppOutput, error) {
  362. req, out := c.DeleteAppRequest(input)
  363. req.SetContext(ctx)
  364. req.ApplyOptions(opts...)
  365. return out, req.Send()
  366. }
  367. const opDeleteBranch = "DeleteBranch"
  368. // DeleteBranchRequest generates a "aws/request.Request" representing the
  369. // client's request for the DeleteBranch operation. The "output" return
  370. // value will be populated with the request's response once the request completes
  371. // successfully.
  372. //
  373. // Use "Send" method on the returned Request to send the API call to the service.
  374. // the "output" return value is not valid until after Send returns without error.
  375. //
  376. // See DeleteBranch for more information on using the DeleteBranch
  377. // API call, and error handling.
  378. //
  379. // This method is useful when you want to inject custom logic or configuration
  380. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  381. //
  382. //
  383. // // Example sending a request using the DeleteBranchRequest method.
  384. // req, resp := client.DeleteBranchRequest(params)
  385. //
  386. // err := req.Send()
  387. // if err == nil { // resp is now filled
  388. // fmt.Println(resp)
  389. // }
  390. //
  391. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/DeleteBranch
  392. func (c *Amplify) DeleteBranchRequest(input *DeleteBranchInput) (req *request.Request, output *DeleteBranchOutput) {
  393. op := &request.Operation{
  394. Name: opDeleteBranch,
  395. HTTPMethod: "DELETE",
  396. HTTPPath: "/apps/{appId}/branches/{branchName}",
  397. }
  398. if input == nil {
  399. input = &DeleteBranchInput{}
  400. }
  401. output = &DeleteBranchOutput{}
  402. req = c.newRequest(op, input, output)
  403. return
  404. }
  405. // DeleteBranch API operation for AWS Amplify.
  406. //
  407. // Deletes a branch for an Amplify App.
  408. //
  409. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  410. // with awserr.Error's Code and Message methods to get detailed information about
  411. // the error.
  412. //
  413. // See the AWS API reference guide for AWS Amplify's
  414. // API operation DeleteBranch for usage and error information.
  415. //
  416. // Returned Error Codes:
  417. // * ErrCodeBadRequestException "BadRequestException"
  418. // Exception thrown when a request contains unexpected data.
  419. //
  420. // * ErrCodeUnauthorizedException "UnauthorizedException"
  421. // Exception thrown when an operation fails due to a lack of access.
  422. //
  423. // * ErrCodeNotFoundException "NotFoundException"
  424. // Exception thrown when an entity has not been found during an operation.
  425. //
  426. // * ErrCodeInternalFailureException "InternalFailureException"
  427. // Exception thrown when the service fails to perform an operation due to an
  428. // internal issue.
  429. //
  430. // * ErrCodeDependentServiceFailureException "DependentServiceFailureException"
  431. // Exception thrown when an operation fails due to a dependent service throwing
  432. // an exception.
  433. //
  434. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/DeleteBranch
  435. func (c *Amplify) DeleteBranch(input *DeleteBranchInput) (*DeleteBranchOutput, error) {
  436. req, out := c.DeleteBranchRequest(input)
  437. return out, req.Send()
  438. }
  439. // DeleteBranchWithContext is the same as DeleteBranch with the addition of
  440. // the ability to pass a context and additional request options.
  441. //
  442. // See DeleteBranch 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 *Amplify) DeleteBranchWithContext(ctx aws.Context, input *DeleteBranchInput, opts ...request.Option) (*DeleteBranchOutput, error) {
  449. req, out := c.DeleteBranchRequest(input)
  450. req.SetContext(ctx)
  451. req.ApplyOptions(opts...)
  452. return out, req.Send()
  453. }
  454. const opDeleteDomainAssociation = "DeleteDomainAssociation"
  455. // DeleteDomainAssociationRequest generates a "aws/request.Request" representing the
  456. // client's request for the DeleteDomainAssociation 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 DeleteDomainAssociation for more information on using the DeleteDomainAssociation
  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 DeleteDomainAssociationRequest method.
  471. // req, resp := client.DeleteDomainAssociationRequest(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/amplify-2017-07-25/DeleteDomainAssociation
  479. func (c *Amplify) DeleteDomainAssociationRequest(input *DeleteDomainAssociationInput) (req *request.Request, output *DeleteDomainAssociationOutput) {
  480. op := &request.Operation{
  481. Name: opDeleteDomainAssociation,
  482. HTTPMethod: "DELETE",
  483. HTTPPath: "/apps/{appId}/domains/{domainName}",
  484. }
  485. if input == nil {
  486. input = &DeleteDomainAssociationInput{}
  487. }
  488. output = &DeleteDomainAssociationOutput{}
  489. req = c.newRequest(op, input, output)
  490. return
  491. }
  492. // DeleteDomainAssociation API operation for AWS Amplify.
  493. //
  494. // Deletes a DomainAssociation.
  495. //
  496. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  497. // with awserr.Error's Code and Message methods to get detailed information about
  498. // the error.
  499. //
  500. // See the AWS API reference guide for AWS Amplify's
  501. // API operation DeleteDomainAssociation for usage and error information.
  502. //
  503. // Returned Error Codes:
  504. // * ErrCodeBadRequestException "BadRequestException"
  505. // Exception thrown when a request contains unexpected data.
  506. //
  507. // * ErrCodeUnauthorizedException "UnauthorizedException"
  508. // Exception thrown when an operation fails due to a lack of access.
  509. //
  510. // * ErrCodeNotFoundException "NotFoundException"
  511. // Exception thrown when an entity has not been found during an operation.
  512. //
  513. // * ErrCodeInternalFailureException "InternalFailureException"
  514. // Exception thrown when the service fails to perform an operation due to an
  515. // internal issue.
  516. //
  517. // * ErrCodeDependentServiceFailureException "DependentServiceFailureException"
  518. // Exception thrown when an operation fails due to a dependent service throwing
  519. // an exception.
  520. //
  521. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/DeleteDomainAssociation
  522. func (c *Amplify) DeleteDomainAssociation(input *DeleteDomainAssociationInput) (*DeleteDomainAssociationOutput, error) {
  523. req, out := c.DeleteDomainAssociationRequest(input)
  524. return out, req.Send()
  525. }
  526. // DeleteDomainAssociationWithContext is the same as DeleteDomainAssociation with the addition of
  527. // the ability to pass a context and additional request options.
  528. //
  529. // See DeleteDomainAssociation for details on how to use this API operation.
  530. //
  531. // The context must be non-nil and will be used for request cancellation. If
  532. // the context is nil a panic will occur. In the future the SDK may create
  533. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  534. // for more information on using Contexts.
  535. func (c *Amplify) DeleteDomainAssociationWithContext(ctx aws.Context, input *DeleteDomainAssociationInput, opts ...request.Option) (*DeleteDomainAssociationOutput, error) {
  536. req, out := c.DeleteDomainAssociationRequest(input)
  537. req.SetContext(ctx)
  538. req.ApplyOptions(opts...)
  539. return out, req.Send()
  540. }
  541. const opDeleteJob = "DeleteJob"
  542. // DeleteJobRequest generates a "aws/request.Request" representing the
  543. // client's request for the DeleteJob operation. The "output" return
  544. // value will be populated with the request's response once the request completes
  545. // successfully.
  546. //
  547. // Use "Send" method on the returned Request to send the API call to the service.
  548. // the "output" return value is not valid until after Send returns without error.
  549. //
  550. // See DeleteJob for more information on using the DeleteJob
  551. // API call, and error handling.
  552. //
  553. // This method is useful when you want to inject custom logic or configuration
  554. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  555. //
  556. //
  557. // // Example sending a request using the DeleteJobRequest method.
  558. // req, resp := client.DeleteJobRequest(params)
  559. //
  560. // err := req.Send()
  561. // if err == nil { // resp is now filled
  562. // fmt.Println(resp)
  563. // }
  564. //
  565. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/DeleteJob
  566. func (c *Amplify) DeleteJobRequest(input *DeleteJobInput) (req *request.Request, output *DeleteJobOutput) {
  567. op := &request.Operation{
  568. Name: opDeleteJob,
  569. HTTPMethod: "DELETE",
  570. HTTPPath: "/apps/{appId}/branches/{branchName}/jobs/{jobId}",
  571. }
  572. if input == nil {
  573. input = &DeleteJobInput{}
  574. }
  575. output = &DeleteJobOutput{}
  576. req = c.newRequest(op, input, output)
  577. return
  578. }
  579. // DeleteJob API operation for AWS Amplify.
  580. //
  581. // Delete a job, for an Amplify branch, part of Amplify App.
  582. //
  583. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  584. // with awserr.Error's Code and Message methods to get detailed information about
  585. // the error.
  586. //
  587. // See the AWS API reference guide for AWS Amplify's
  588. // API operation DeleteJob for usage and error information.
  589. //
  590. // Returned Error Codes:
  591. // * ErrCodeBadRequestException "BadRequestException"
  592. // Exception thrown when a request contains unexpected data.
  593. //
  594. // * ErrCodeUnauthorizedException "UnauthorizedException"
  595. // Exception thrown when an operation fails due to a lack of access.
  596. //
  597. // * ErrCodeInternalFailureException "InternalFailureException"
  598. // Exception thrown when the service fails to perform an operation due to an
  599. // internal issue.
  600. //
  601. // * ErrCodeNotFoundException "NotFoundException"
  602. // Exception thrown when an entity has not been found during an operation.
  603. //
  604. // * ErrCodeLimitExceededException "LimitExceededException"
  605. // Exception thrown when a resource could not be created because of service
  606. // limits.
  607. //
  608. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/DeleteJob
  609. func (c *Amplify) DeleteJob(input *DeleteJobInput) (*DeleteJobOutput, error) {
  610. req, out := c.DeleteJobRequest(input)
  611. return out, req.Send()
  612. }
  613. // DeleteJobWithContext is the same as DeleteJob with the addition of
  614. // the ability to pass a context and additional request options.
  615. //
  616. // See DeleteJob for details on how to use this API operation.
  617. //
  618. // The context must be non-nil and will be used for request cancellation. If
  619. // the context is nil a panic will occur. In the future the SDK may create
  620. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  621. // for more information on using Contexts.
  622. func (c *Amplify) DeleteJobWithContext(ctx aws.Context, input *DeleteJobInput, opts ...request.Option) (*DeleteJobOutput, error) {
  623. req, out := c.DeleteJobRequest(input)
  624. req.SetContext(ctx)
  625. req.ApplyOptions(opts...)
  626. return out, req.Send()
  627. }
  628. const opGetApp = "GetApp"
  629. // GetAppRequest generates a "aws/request.Request" representing the
  630. // client's request for the GetApp operation. The "output" return
  631. // value will be populated with the request's response once the request completes
  632. // successfully.
  633. //
  634. // Use "Send" method on the returned Request to send the API call to the service.
  635. // the "output" return value is not valid until after Send returns without error.
  636. //
  637. // See GetApp for more information on using the GetApp
  638. // API call, and error handling.
  639. //
  640. // This method is useful when you want to inject custom logic or configuration
  641. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  642. //
  643. //
  644. // // Example sending a request using the GetAppRequest method.
  645. // req, resp := client.GetAppRequest(params)
  646. //
  647. // err := req.Send()
  648. // if err == nil { // resp is now filled
  649. // fmt.Println(resp)
  650. // }
  651. //
  652. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/GetApp
  653. func (c *Amplify) GetAppRequest(input *GetAppInput) (req *request.Request, output *GetAppOutput) {
  654. op := &request.Operation{
  655. Name: opGetApp,
  656. HTTPMethod: "GET",
  657. HTTPPath: "/apps/{appId}",
  658. }
  659. if input == nil {
  660. input = &GetAppInput{}
  661. }
  662. output = &GetAppOutput{}
  663. req = c.newRequest(op, input, output)
  664. return
  665. }
  666. // GetApp API operation for AWS Amplify.
  667. //
  668. // Retrieves an existing Amplify App by appId.
  669. //
  670. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  671. // with awserr.Error's Code and Message methods to get detailed information about
  672. // the error.
  673. //
  674. // See the AWS API reference guide for AWS Amplify's
  675. // API operation GetApp for usage and error information.
  676. //
  677. // Returned Error Codes:
  678. // * ErrCodeBadRequestException "BadRequestException"
  679. // Exception thrown when a request contains unexpected data.
  680. //
  681. // * ErrCodeNotFoundException "NotFoundException"
  682. // Exception thrown when an entity has not been found during an operation.
  683. //
  684. // * ErrCodeUnauthorizedException "UnauthorizedException"
  685. // Exception thrown when an operation fails due to a lack of access.
  686. //
  687. // * ErrCodeInternalFailureException "InternalFailureException"
  688. // Exception thrown when the service fails to perform an operation due to an
  689. // internal issue.
  690. //
  691. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/GetApp
  692. func (c *Amplify) GetApp(input *GetAppInput) (*GetAppOutput, error) {
  693. req, out := c.GetAppRequest(input)
  694. return out, req.Send()
  695. }
  696. // GetAppWithContext is the same as GetApp with the addition of
  697. // the ability to pass a context and additional request options.
  698. //
  699. // See GetApp for details on how to use this API operation.
  700. //
  701. // The context must be non-nil and will be used for request cancellation. If
  702. // the context is nil a panic will occur. In the future the SDK may create
  703. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  704. // for more information on using Contexts.
  705. func (c *Amplify) GetAppWithContext(ctx aws.Context, input *GetAppInput, opts ...request.Option) (*GetAppOutput, error) {
  706. req, out := c.GetAppRequest(input)
  707. req.SetContext(ctx)
  708. req.ApplyOptions(opts...)
  709. return out, req.Send()
  710. }
  711. const opGetBranch = "GetBranch"
  712. // GetBranchRequest generates a "aws/request.Request" representing the
  713. // client's request for the GetBranch operation. The "output" return
  714. // value will be populated with the request's response once the request completes
  715. // successfully.
  716. //
  717. // Use "Send" method on the returned Request to send the API call to the service.
  718. // the "output" return value is not valid until after Send returns without error.
  719. //
  720. // See GetBranch for more information on using the GetBranch
  721. // API call, and error handling.
  722. //
  723. // This method is useful when you want to inject custom logic or configuration
  724. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  725. //
  726. //
  727. // // Example sending a request using the GetBranchRequest method.
  728. // req, resp := client.GetBranchRequest(params)
  729. //
  730. // err := req.Send()
  731. // if err == nil { // resp is now filled
  732. // fmt.Println(resp)
  733. // }
  734. //
  735. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/GetBranch
  736. func (c *Amplify) GetBranchRequest(input *GetBranchInput) (req *request.Request, output *GetBranchOutput) {
  737. op := &request.Operation{
  738. Name: opGetBranch,
  739. HTTPMethod: "GET",
  740. HTTPPath: "/apps/{appId}/branches/{branchName}",
  741. }
  742. if input == nil {
  743. input = &GetBranchInput{}
  744. }
  745. output = &GetBranchOutput{}
  746. req = c.newRequest(op, input, output)
  747. return
  748. }
  749. // GetBranch API operation for AWS Amplify.
  750. //
  751. // Retrieves a branch for an Amplify App.
  752. //
  753. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  754. // with awserr.Error's Code and Message methods to get detailed information about
  755. // the error.
  756. //
  757. // See the AWS API reference guide for AWS Amplify's
  758. // API operation GetBranch for usage and error information.
  759. //
  760. // Returned Error Codes:
  761. // * ErrCodeBadRequestException "BadRequestException"
  762. // Exception thrown when a request contains unexpected data.
  763. //
  764. // * ErrCodeUnauthorizedException "UnauthorizedException"
  765. // Exception thrown when an operation fails due to a lack of access.
  766. //
  767. // * ErrCodeNotFoundException "NotFoundException"
  768. // Exception thrown when an entity has not been found during an operation.
  769. //
  770. // * ErrCodeInternalFailureException "InternalFailureException"
  771. // Exception thrown when the service fails to perform an operation due to an
  772. // internal issue.
  773. //
  774. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/GetBranch
  775. func (c *Amplify) GetBranch(input *GetBranchInput) (*GetBranchOutput, error) {
  776. req, out := c.GetBranchRequest(input)
  777. return out, req.Send()
  778. }
  779. // GetBranchWithContext is the same as GetBranch with the addition of
  780. // the ability to pass a context and additional request options.
  781. //
  782. // See GetBranch for details on how to use this API operation.
  783. //
  784. // The context must be non-nil and will be used for request cancellation. If
  785. // the context is nil a panic will occur. In the future the SDK may create
  786. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  787. // for more information on using Contexts.
  788. func (c *Amplify) GetBranchWithContext(ctx aws.Context, input *GetBranchInput, opts ...request.Option) (*GetBranchOutput, error) {
  789. req, out := c.GetBranchRequest(input)
  790. req.SetContext(ctx)
  791. req.ApplyOptions(opts...)
  792. return out, req.Send()
  793. }
  794. const opGetDomainAssociation = "GetDomainAssociation"
  795. // GetDomainAssociationRequest generates a "aws/request.Request" representing the
  796. // client's request for the GetDomainAssociation operation. The "output" return
  797. // value will be populated with the request's response once the request completes
  798. // successfully.
  799. //
  800. // Use "Send" method on the returned Request to send the API call to the service.
  801. // the "output" return value is not valid until after Send returns without error.
  802. //
  803. // See GetDomainAssociation for more information on using the GetDomainAssociation
  804. // API call, and error handling.
  805. //
  806. // This method is useful when you want to inject custom logic or configuration
  807. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  808. //
  809. //
  810. // // Example sending a request using the GetDomainAssociationRequest method.
  811. // req, resp := client.GetDomainAssociationRequest(params)
  812. //
  813. // err := req.Send()
  814. // if err == nil { // resp is now filled
  815. // fmt.Println(resp)
  816. // }
  817. //
  818. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/GetDomainAssociation
  819. func (c *Amplify) GetDomainAssociationRequest(input *GetDomainAssociationInput) (req *request.Request, output *GetDomainAssociationOutput) {
  820. op := &request.Operation{
  821. Name: opGetDomainAssociation,
  822. HTTPMethod: "GET",
  823. HTTPPath: "/apps/{appId}/domains/{domainName}",
  824. }
  825. if input == nil {
  826. input = &GetDomainAssociationInput{}
  827. }
  828. output = &GetDomainAssociationOutput{}
  829. req = c.newRequest(op, input, output)
  830. return
  831. }
  832. // GetDomainAssociation API operation for AWS Amplify.
  833. //
  834. // Retrieves domain info that corresponds to an appId and domainName.
  835. //
  836. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  837. // with awserr.Error's Code and Message methods to get detailed information about
  838. // the error.
  839. //
  840. // See the AWS API reference guide for AWS Amplify's
  841. // API operation GetDomainAssociation for usage and error information.
  842. //
  843. // Returned Error Codes:
  844. // * ErrCodeBadRequestException "BadRequestException"
  845. // Exception thrown when a request contains unexpected data.
  846. //
  847. // * ErrCodeUnauthorizedException "UnauthorizedException"
  848. // Exception thrown when an operation fails due to a lack of access.
  849. //
  850. // * ErrCodeNotFoundException "NotFoundException"
  851. // Exception thrown when an entity has not been found during an operation.
  852. //
  853. // * ErrCodeInternalFailureException "InternalFailureException"
  854. // Exception thrown when the service fails to perform an operation due to an
  855. // internal issue.
  856. //
  857. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/GetDomainAssociation
  858. func (c *Amplify) GetDomainAssociation(input *GetDomainAssociationInput) (*GetDomainAssociationOutput, error) {
  859. req, out := c.GetDomainAssociationRequest(input)
  860. return out, req.Send()
  861. }
  862. // GetDomainAssociationWithContext is the same as GetDomainAssociation with the addition of
  863. // the ability to pass a context and additional request options.
  864. //
  865. // See GetDomainAssociation for details on how to use this API operation.
  866. //
  867. // The context must be non-nil and will be used for request cancellation. If
  868. // the context is nil a panic will occur. In the future the SDK may create
  869. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  870. // for more information on using Contexts.
  871. func (c *Amplify) GetDomainAssociationWithContext(ctx aws.Context, input *GetDomainAssociationInput, opts ...request.Option) (*GetDomainAssociationOutput, error) {
  872. req, out := c.GetDomainAssociationRequest(input)
  873. req.SetContext(ctx)
  874. req.ApplyOptions(opts...)
  875. return out, req.Send()
  876. }
  877. const opGetJob = "GetJob"
  878. // GetJobRequest generates a "aws/request.Request" representing the
  879. // client's request for the GetJob operation. The "output" return
  880. // value will be populated with the request's response once the request completes
  881. // successfully.
  882. //
  883. // Use "Send" method on the returned Request to send the API call to the service.
  884. // the "output" return value is not valid until after Send returns without error.
  885. //
  886. // See GetJob for more information on using the GetJob
  887. // API call, and error handling.
  888. //
  889. // This method is useful when you want to inject custom logic or configuration
  890. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  891. //
  892. //
  893. // // Example sending a request using the GetJobRequest method.
  894. // req, resp := client.GetJobRequest(params)
  895. //
  896. // err := req.Send()
  897. // if err == nil { // resp is now filled
  898. // fmt.Println(resp)
  899. // }
  900. //
  901. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/GetJob
  902. func (c *Amplify) GetJobRequest(input *GetJobInput) (req *request.Request, output *GetJobOutput) {
  903. op := &request.Operation{
  904. Name: opGetJob,
  905. HTTPMethod: "GET",
  906. HTTPPath: "/apps/{appId}/branches/{branchName}/jobs/{jobId}",
  907. }
  908. if input == nil {
  909. input = &GetJobInput{}
  910. }
  911. output = &GetJobOutput{}
  912. req = c.newRequest(op, input, output)
  913. return
  914. }
  915. // GetJob API operation for AWS Amplify.
  916. //
  917. // Get a job for a branch, part of an Amplify App.
  918. //
  919. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  920. // with awserr.Error's Code and Message methods to get detailed information about
  921. // the error.
  922. //
  923. // See the AWS API reference guide for AWS Amplify's
  924. // API operation GetJob for usage and error information.
  925. //
  926. // Returned Error Codes:
  927. // * ErrCodeBadRequestException "BadRequestException"
  928. // Exception thrown when a request contains unexpected data.
  929. //
  930. // * ErrCodeUnauthorizedException "UnauthorizedException"
  931. // Exception thrown when an operation fails due to a lack of access.
  932. //
  933. // * ErrCodeInternalFailureException "InternalFailureException"
  934. // Exception thrown when the service fails to perform an operation due to an
  935. // internal issue.
  936. //
  937. // * ErrCodeNotFoundException "NotFoundException"
  938. // Exception thrown when an entity has not been found during an operation.
  939. //
  940. // * ErrCodeLimitExceededException "LimitExceededException"
  941. // Exception thrown when a resource could not be created because of service
  942. // limits.
  943. //
  944. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/GetJob
  945. func (c *Amplify) GetJob(input *GetJobInput) (*GetJobOutput, error) {
  946. req, out := c.GetJobRequest(input)
  947. return out, req.Send()
  948. }
  949. // GetJobWithContext is the same as GetJob with the addition of
  950. // the ability to pass a context and additional request options.
  951. //
  952. // See GetJob for details on how to use this API operation.
  953. //
  954. // The context must be non-nil and will be used for request cancellation. If
  955. // the context is nil a panic will occur. In the future the SDK may create
  956. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  957. // for more information on using Contexts.
  958. func (c *Amplify) GetJobWithContext(ctx aws.Context, input *GetJobInput, opts ...request.Option) (*GetJobOutput, error) {
  959. req, out := c.GetJobRequest(input)
  960. req.SetContext(ctx)
  961. req.ApplyOptions(opts...)
  962. return out, req.Send()
  963. }
  964. const opListApps = "ListApps"
  965. // ListAppsRequest generates a "aws/request.Request" representing the
  966. // client's request for the ListApps operation. The "output" return
  967. // value will be populated with the request's response once the request completes
  968. // successfully.
  969. //
  970. // Use "Send" method on the returned Request to send the API call to the service.
  971. // the "output" return value is not valid until after Send returns without error.
  972. //
  973. // See ListApps for more information on using the ListApps
  974. // API call, and error handling.
  975. //
  976. // This method is useful when you want to inject custom logic or configuration
  977. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  978. //
  979. //
  980. // // Example sending a request using the ListAppsRequest method.
  981. // req, resp := client.ListAppsRequest(params)
  982. //
  983. // err := req.Send()
  984. // if err == nil { // resp is now filled
  985. // fmt.Println(resp)
  986. // }
  987. //
  988. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/ListApps
  989. func (c *Amplify) ListAppsRequest(input *ListAppsInput) (req *request.Request, output *ListAppsOutput) {
  990. op := &request.Operation{
  991. Name: opListApps,
  992. HTTPMethod: "GET",
  993. HTTPPath: "/apps",
  994. }
  995. if input == nil {
  996. input = &ListAppsInput{}
  997. }
  998. output = &ListAppsOutput{}
  999. req = c.newRequest(op, input, output)
  1000. return
  1001. }
  1002. // ListApps API operation for AWS Amplify.
  1003. //
  1004. // Lists existing Amplify Apps.
  1005. //
  1006. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1007. // with awserr.Error's Code and Message methods to get detailed information about
  1008. // the error.
  1009. //
  1010. // See the AWS API reference guide for AWS Amplify's
  1011. // API operation ListApps for usage and error information.
  1012. //
  1013. // Returned Error Codes:
  1014. // * ErrCodeBadRequestException "BadRequestException"
  1015. // Exception thrown when a request contains unexpected data.
  1016. //
  1017. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1018. // Exception thrown when an operation fails due to a lack of access.
  1019. //
  1020. // * ErrCodeInternalFailureException "InternalFailureException"
  1021. // Exception thrown when the service fails to perform an operation due to an
  1022. // internal issue.
  1023. //
  1024. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/ListApps
  1025. func (c *Amplify) ListApps(input *ListAppsInput) (*ListAppsOutput, error) {
  1026. req, out := c.ListAppsRequest(input)
  1027. return out, req.Send()
  1028. }
  1029. // ListAppsWithContext is the same as ListApps with the addition of
  1030. // the ability to pass a context and additional request options.
  1031. //
  1032. // See ListApps for details on how to use this API operation.
  1033. //
  1034. // The context must be non-nil and will be used for request cancellation. If
  1035. // the context is nil a panic will occur. In the future the SDK may create
  1036. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1037. // for more information on using Contexts.
  1038. func (c *Amplify) ListAppsWithContext(ctx aws.Context, input *ListAppsInput, opts ...request.Option) (*ListAppsOutput, error) {
  1039. req, out := c.ListAppsRequest(input)
  1040. req.SetContext(ctx)
  1041. req.ApplyOptions(opts...)
  1042. return out, req.Send()
  1043. }
  1044. const opListBranches = "ListBranches"
  1045. // ListBranchesRequest generates a "aws/request.Request" representing the
  1046. // client's request for the ListBranches operation. The "output" return
  1047. // value will be populated with the request's response once the request completes
  1048. // successfully.
  1049. //
  1050. // Use "Send" method on the returned Request to send the API call to the service.
  1051. // the "output" return value is not valid until after Send returns without error.
  1052. //
  1053. // See ListBranches for more information on using the ListBranches
  1054. // API call, and error handling.
  1055. //
  1056. // This method is useful when you want to inject custom logic or configuration
  1057. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1058. //
  1059. //
  1060. // // Example sending a request using the ListBranchesRequest method.
  1061. // req, resp := client.ListBranchesRequest(params)
  1062. //
  1063. // err := req.Send()
  1064. // if err == nil { // resp is now filled
  1065. // fmt.Println(resp)
  1066. // }
  1067. //
  1068. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/ListBranches
  1069. func (c *Amplify) ListBranchesRequest(input *ListBranchesInput) (req *request.Request, output *ListBranchesOutput) {
  1070. op := &request.Operation{
  1071. Name: opListBranches,
  1072. HTTPMethod: "GET",
  1073. HTTPPath: "/apps/{appId}/branches",
  1074. }
  1075. if input == nil {
  1076. input = &ListBranchesInput{}
  1077. }
  1078. output = &ListBranchesOutput{}
  1079. req = c.newRequest(op, input, output)
  1080. return
  1081. }
  1082. // ListBranches API operation for AWS Amplify.
  1083. //
  1084. // Lists branches for an Amplify App.
  1085. //
  1086. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1087. // with awserr.Error's Code and Message methods to get detailed information about
  1088. // the error.
  1089. //
  1090. // See the AWS API reference guide for AWS Amplify's
  1091. // API operation ListBranches for usage and error information.
  1092. //
  1093. // Returned Error Codes:
  1094. // * ErrCodeBadRequestException "BadRequestException"
  1095. // Exception thrown when a request contains unexpected data.
  1096. //
  1097. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1098. // Exception thrown when an operation fails due to a lack of access.
  1099. //
  1100. // * ErrCodeInternalFailureException "InternalFailureException"
  1101. // Exception thrown when the service fails to perform an operation due to an
  1102. // internal issue.
  1103. //
  1104. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/ListBranches
  1105. func (c *Amplify) ListBranches(input *ListBranchesInput) (*ListBranchesOutput, error) {
  1106. req, out := c.ListBranchesRequest(input)
  1107. return out, req.Send()
  1108. }
  1109. // ListBranchesWithContext is the same as ListBranches with the addition of
  1110. // the ability to pass a context and additional request options.
  1111. //
  1112. // See ListBranches for details on how to use this API operation.
  1113. //
  1114. // The context must be non-nil and will be used for request cancellation. If
  1115. // the context is nil a panic will occur. In the future the SDK may create
  1116. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1117. // for more information on using Contexts.
  1118. func (c *Amplify) ListBranchesWithContext(ctx aws.Context, input *ListBranchesInput, opts ...request.Option) (*ListBranchesOutput, error) {
  1119. req, out := c.ListBranchesRequest(input)
  1120. req.SetContext(ctx)
  1121. req.ApplyOptions(opts...)
  1122. return out, req.Send()
  1123. }
  1124. const opListDomainAssociations = "ListDomainAssociations"
  1125. // ListDomainAssociationsRequest generates a "aws/request.Request" representing the
  1126. // client's request for the ListDomainAssociations operation. The "output" return
  1127. // value will be populated with the request's response once the request completes
  1128. // successfully.
  1129. //
  1130. // Use "Send" method on the returned Request to send the API call to the service.
  1131. // the "output" return value is not valid until after Send returns without error.
  1132. //
  1133. // See ListDomainAssociations for more information on using the ListDomainAssociations
  1134. // API call, and error handling.
  1135. //
  1136. // This method is useful when you want to inject custom logic or configuration
  1137. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1138. //
  1139. //
  1140. // // Example sending a request using the ListDomainAssociationsRequest method.
  1141. // req, resp := client.ListDomainAssociationsRequest(params)
  1142. //
  1143. // err := req.Send()
  1144. // if err == nil { // resp is now filled
  1145. // fmt.Println(resp)
  1146. // }
  1147. //
  1148. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/ListDomainAssociations
  1149. func (c *Amplify) ListDomainAssociationsRequest(input *ListDomainAssociationsInput) (req *request.Request, output *ListDomainAssociationsOutput) {
  1150. op := &request.Operation{
  1151. Name: opListDomainAssociations,
  1152. HTTPMethod: "GET",
  1153. HTTPPath: "/apps/{appId}/domains",
  1154. }
  1155. if input == nil {
  1156. input = &ListDomainAssociationsInput{}
  1157. }
  1158. output = &ListDomainAssociationsOutput{}
  1159. req = c.newRequest(op, input, output)
  1160. return
  1161. }
  1162. // ListDomainAssociations API operation for AWS Amplify.
  1163. //
  1164. // List domains with an app
  1165. //
  1166. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1167. // with awserr.Error's Code and Message methods to get detailed information about
  1168. // the error.
  1169. //
  1170. // See the AWS API reference guide for AWS Amplify's
  1171. // API operation ListDomainAssociations for usage and error information.
  1172. //
  1173. // Returned Error Codes:
  1174. // * ErrCodeBadRequestException "BadRequestException"
  1175. // Exception thrown when a request contains unexpected data.
  1176. //
  1177. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1178. // Exception thrown when an operation fails due to a lack of access.
  1179. //
  1180. // * ErrCodeInternalFailureException "InternalFailureException"
  1181. // Exception thrown when the service fails to perform an operation due to an
  1182. // internal issue.
  1183. //
  1184. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/ListDomainAssociations
  1185. func (c *Amplify) ListDomainAssociations(input *ListDomainAssociationsInput) (*ListDomainAssociationsOutput, error) {
  1186. req, out := c.ListDomainAssociationsRequest(input)
  1187. return out, req.Send()
  1188. }
  1189. // ListDomainAssociationsWithContext is the same as ListDomainAssociations with the addition of
  1190. // the ability to pass a context and additional request options.
  1191. //
  1192. // See ListDomainAssociations for details on how to use this API operation.
  1193. //
  1194. // The context must be non-nil and will be used for request cancellation. If
  1195. // the context is nil a panic will occur. In the future the SDK may create
  1196. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1197. // for more information on using Contexts.
  1198. func (c *Amplify) ListDomainAssociationsWithContext(ctx aws.Context, input *ListDomainAssociationsInput, opts ...request.Option) (*ListDomainAssociationsOutput, error) {
  1199. req, out := c.ListDomainAssociationsRequest(input)
  1200. req.SetContext(ctx)
  1201. req.ApplyOptions(opts...)
  1202. return out, req.Send()
  1203. }
  1204. const opListJobs = "ListJobs"
  1205. // ListJobsRequest generates a "aws/request.Request" representing the
  1206. // client's request for the ListJobs operation. The "output" return
  1207. // value will be populated with the request's response once the request completes
  1208. // successfully.
  1209. //
  1210. // Use "Send" method on the returned Request to send the API call to the service.
  1211. // the "output" return value is not valid until after Send returns without error.
  1212. //
  1213. // See ListJobs for more information on using the ListJobs
  1214. // API call, and error handling.
  1215. //
  1216. // This method is useful when you want to inject custom logic or configuration
  1217. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1218. //
  1219. //
  1220. // // Example sending a request using the ListJobsRequest method.
  1221. // req, resp := client.ListJobsRequest(params)
  1222. //
  1223. // err := req.Send()
  1224. // if err == nil { // resp is now filled
  1225. // fmt.Println(resp)
  1226. // }
  1227. //
  1228. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/ListJobs
  1229. func (c *Amplify) ListJobsRequest(input *ListJobsInput) (req *request.Request, output *ListJobsOutput) {
  1230. op := &request.Operation{
  1231. Name: opListJobs,
  1232. HTTPMethod: "GET",
  1233. HTTPPath: "/apps/{appId}/branches/{branchName}/jobs",
  1234. }
  1235. if input == nil {
  1236. input = &ListJobsInput{}
  1237. }
  1238. output = &ListJobsOutput{}
  1239. req = c.newRequest(op, input, output)
  1240. return
  1241. }
  1242. // ListJobs API operation for AWS Amplify.
  1243. //
  1244. // List Jobs for a branch, part of an Amplify App.
  1245. //
  1246. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1247. // with awserr.Error's Code and Message methods to get detailed information about
  1248. // the error.
  1249. //
  1250. // See the AWS API reference guide for AWS Amplify's
  1251. // API operation ListJobs for usage and error information.
  1252. //
  1253. // Returned Error Codes:
  1254. // * ErrCodeBadRequestException "BadRequestException"
  1255. // Exception thrown when a request contains unexpected data.
  1256. //
  1257. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1258. // Exception thrown when an operation fails due to a lack of access.
  1259. //
  1260. // * ErrCodeInternalFailureException "InternalFailureException"
  1261. // Exception thrown when the service fails to perform an operation due to an
  1262. // internal issue.
  1263. //
  1264. // * ErrCodeLimitExceededException "LimitExceededException"
  1265. // Exception thrown when a resource could not be created because of service
  1266. // limits.
  1267. //
  1268. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/ListJobs
  1269. func (c *Amplify) ListJobs(input *ListJobsInput) (*ListJobsOutput, error) {
  1270. req, out := c.ListJobsRequest(input)
  1271. return out, req.Send()
  1272. }
  1273. // ListJobsWithContext is the same as ListJobs with the addition of
  1274. // the ability to pass a context and additional request options.
  1275. //
  1276. // See ListJobs for details on how to use this API operation.
  1277. //
  1278. // The context must be non-nil and will be used for request cancellation. If
  1279. // the context is nil a panic will occur. In the future the SDK may create
  1280. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1281. // for more information on using Contexts.
  1282. func (c *Amplify) ListJobsWithContext(ctx aws.Context, input *ListJobsInput, opts ...request.Option) (*ListJobsOutput, error) {
  1283. req, out := c.ListJobsRequest(input)
  1284. req.SetContext(ctx)
  1285. req.ApplyOptions(opts...)
  1286. return out, req.Send()
  1287. }
  1288. const opStartJob = "StartJob"
  1289. // StartJobRequest generates a "aws/request.Request" representing the
  1290. // client's request for the StartJob operation. The "output" return
  1291. // value will be populated with the request's response once the request completes
  1292. // successfully.
  1293. //
  1294. // Use "Send" method on the returned Request to send the API call to the service.
  1295. // the "output" return value is not valid until after Send returns without error.
  1296. //
  1297. // See StartJob for more information on using the StartJob
  1298. // API call, and error handling.
  1299. //
  1300. // This method is useful when you want to inject custom logic or configuration
  1301. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1302. //
  1303. //
  1304. // // Example sending a request using the StartJobRequest method.
  1305. // req, resp := client.StartJobRequest(params)
  1306. //
  1307. // err := req.Send()
  1308. // if err == nil { // resp is now filled
  1309. // fmt.Println(resp)
  1310. // }
  1311. //
  1312. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/StartJob
  1313. func (c *Amplify) StartJobRequest(input *StartJobInput) (req *request.Request, output *StartJobOutput) {
  1314. op := &request.Operation{
  1315. Name: opStartJob,
  1316. HTTPMethod: "POST",
  1317. HTTPPath: "/apps/{appId}/branches/{branchName}/jobs",
  1318. }
  1319. if input == nil {
  1320. input = &StartJobInput{}
  1321. }
  1322. output = &StartJobOutput{}
  1323. req = c.newRequest(op, input, output)
  1324. return
  1325. }
  1326. // StartJob API operation for AWS Amplify.
  1327. //
  1328. // Starts a new job for a branch, part of an Amplify App.
  1329. //
  1330. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1331. // with awserr.Error's Code and Message methods to get detailed information about
  1332. // the error.
  1333. //
  1334. // See the AWS API reference guide for AWS Amplify's
  1335. // API operation StartJob for usage and error information.
  1336. //
  1337. // Returned Error Codes:
  1338. // * ErrCodeBadRequestException "BadRequestException"
  1339. // Exception thrown when a request contains unexpected data.
  1340. //
  1341. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1342. // Exception thrown when an operation fails due to a lack of access.
  1343. //
  1344. // * ErrCodeInternalFailureException "InternalFailureException"
  1345. // Exception thrown when the service fails to perform an operation due to an
  1346. // internal issue.
  1347. //
  1348. // * ErrCodeNotFoundException "NotFoundException"
  1349. // Exception thrown when an entity has not been found during an operation.
  1350. //
  1351. // * ErrCodeLimitExceededException "LimitExceededException"
  1352. // Exception thrown when a resource could not be created because of service
  1353. // limits.
  1354. //
  1355. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/StartJob
  1356. func (c *Amplify) StartJob(input *StartJobInput) (*StartJobOutput, error) {
  1357. req, out := c.StartJobRequest(input)
  1358. return out, req.Send()
  1359. }
  1360. // StartJobWithContext is the same as StartJob with the addition of
  1361. // the ability to pass a context and additional request options.
  1362. //
  1363. // See StartJob for details on how to use this API operation.
  1364. //
  1365. // The context must be non-nil and will be used for request cancellation. If
  1366. // the context is nil a panic will occur. In the future the SDK may create
  1367. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1368. // for more information on using Contexts.
  1369. func (c *Amplify) StartJobWithContext(ctx aws.Context, input *StartJobInput, opts ...request.Option) (*StartJobOutput, error) {
  1370. req, out := c.StartJobRequest(input)
  1371. req.SetContext(ctx)
  1372. req.ApplyOptions(opts...)
  1373. return out, req.Send()
  1374. }
  1375. const opStopJob = "StopJob"
  1376. // StopJobRequest generates a "aws/request.Request" representing the
  1377. // client's request for the StopJob operation. The "output" return
  1378. // value will be populated with the request's response once the request completes
  1379. // successfully.
  1380. //
  1381. // Use "Send" method on the returned Request to send the API call to the service.
  1382. // the "output" return value is not valid until after Send returns without error.
  1383. //
  1384. // See StopJob for more information on using the StopJob
  1385. // API call, and error handling.
  1386. //
  1387. // This method is useful when you want to inject custom logic or configuration
  1388. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1389. //
  1390. //
  1391. // // Example sending a request using the StopJobRequest method.
  1392. // req, resp := client.StopJobRequest(params)
  1393. //
  1394. // err := req.Send()
  1395. // if err == nil { // resp is now filled
  1396. // fmt.Println(resp)
  1397. // }
  1398. //
  1399. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/StopJob
  1400. func (c *Amplify) StopJobRequest(input *StopJobInput) (req *request.Request, output *StopJobOutput) {
  1401. op := &request.Operation{
  1402. Name: opStopJob,
  1403. HTTPMethod: "DELETE",
  1404. HTTPPath: "/apps/{appId}/branches/{branchName}/jobs/{jobId}/stop",
  1405. }
  1406. if input == nil {
  1407. input = &StopJobInput{}
  1408. }
  1409. output = &StopJobOutput{}
  1410. req = c.newRequest(op, input, output)
  1411. return
  1412. }
  1413. // StopJob API operation for AWS Amplify.
  1414. //
  1415. // Stop a job that is in progress, for an Amplify branch, part of Amplify App.
  1416. //
  1417. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1418. // with awserr.Error's Code and Message methods to get detailed information about
  1419. // the error.
  1420. //
  1421. // See the AWS API reference guide for AWS Amplify's
  1422. // API operation StopJob for usage and error information.
  1423. //
  1424. // Returned Error Codes:
  1425. // * ErrCodeBadRequestException "BadRequestException"
  1426. // Exception thrown when a request contains unexpected data.
  1427. //
  1428. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1429. // Exception thrown when an operation fails due to a lack of access.
  1430. //
  1431. // * ErrCodeInternalFailureException "InternalFailureException"
  1432. // Exception thrown when the service fails to perform an operation due to an
  1433. // internal issue.
  1434. //
  1435. // * ErrCodeNotFoundException "NotFoundException"
  1436. // Exception thrown when an entity has not been found during an operation.
  1437. //
  1438. // * ErrCodeLimitExceededException "LimitExceededException"
  1439. // Exception thrown when a resource could not be created because of service
  1440. // limits.
  1441. //
  1442. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/StopJob
  1443. func (c *Amplify) StopJob(input *StopJobInput) (*StopJobOutput, error) {
  1444. req, out := c.StopJobRequest(input)
  1445. return out, req.Send()
  1446. }
  1447. // StopJobWithContext is the same as StopJob with the addition of
  1448. // the ability to pass a context and additional request options.
  1449. //
  1450. // See StopJob for details on how to use this API operation.
  1451. //
  1452. // The context must be non-nil and will be used for request cancellation. If
  1453. // the context is nil a panic will occur. In the future the SDK may create
  1454. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1455. // for more information on using Contexts.
  1456. func (c *Amplify) StopJobWithContext(ctx aws.Context, input *StopJobInput, opts ...request.Option) (*StopJobOutput, error) {
  1457. req, out := c.StopJobRequest(input)
  1458. req.SetContext(ctx)
  1459. req.ApplyOptions(opts...)
  1460. return out, req.Send()
  1461. }
  1462. const opUpdateApp = "UpdateApp"
  1463. // UpdateAppRequest generates a "aws/request.Request" representing the
  1464. // client's request for the UpdateApp operation. The "output" return
  1465. // value will be populated with the request's response once the request completes
  1466. // successfully.
  1467. //
  1468. // Use "Send" method on the returned Request to send the API call to the service.
  1469. // the "output" return value is not valid until after Send returns without error.
  1470. //
  1471. // See UpdateApp for more information on using the UpdateApp
  1472. // API call, and error handling.
  1473. //
  1474. // This method is useful when you want to inject custom logic or configuration
  1475. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1476. //
  1477. //
  1478. // // Example sending a request using the UpdateAppRequest method.
  1479. // req, resp := client.UpdateAppRequest(params)
  1480. //
  1481. // err := req.Send()
  1482. // if err == nil { // resp is now filled
  1483. // fmt.Println(resp)
  1484. // }
  1485. //
  1486. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/UpdateApp
  1487. func (c *Amplify) UpdateAppRequest(input *UpdateAppInput) (req *request.Request, output *UpdateAppOutput) {
  1488. op := &request.Operation{
  1489. Name: opUpdateApp,
  1490. HTTPMethod: "POST",
  1491. HTTPPath: "/apps/{appId}",
  1492. }
  1493. if input == nil {
  1494. input = &UpdateAppInput{}
  1495. }
  1496. output = &UpdateAppOutput{}
  1497. req = c.newRequest(op, input, output)
  1498. return
  1499. }
  1500. // UpdateApp API operation for AWS Amplify.
  1501. //
  1502. // Updates an existing Amplify App.
  1503. //
  1504. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1505. // with awserr.Error's Code and Message methods to get detailed information about
  1506. // the error.
  1507. //
  1508. // See the AWS API reference guide for AWS Amplify's
  1509. // API operation UpdateApp for usage and error information.
  1510. //
  1511. // Returned Error Codes:
  1512. // * ErrCodeBadRequestException "BadRequestException"
  1513. // Exception thrown when a request contains unexpected data.
  1514. //
  1515. // * ErrCodeNotFoundException "NotFoundException"
  1516. // Exception thrown when an entity has not been found during an operation.
  1517. //
  1518. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1519. // Exception thrown when an operation fails due to a lack of access.
  1520. //
  1521. // * ErrCodeInternalFailureException "InternalFailureException"
  1522. // Exception thrown when the service fails to perform an operation due to an
  1523. // internal issue.
  1524. //
  1525. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/UpdateApp
  1526. func (c *Amplify) UpdateApp(input *UpdateAppInput) (*UpdateAppOutput, error) {
  1527. req, out := c.UpdateAppRequest(input)
  1528. return out, req.Send()
  1529. }
  1530. // UpdateAppWithContext is the same as UpdateApp with the addition of
  1531. // the ability to pass a context and additional request options.
  1532. //
  1533. // See UpdateApp for details on how to use this API operation.
  1534. //
  1535. // The context must be non-nil and will be used for request cancellation. If
  1536. // the context is nil a panic will occur. In the future the SDK may create
  1537. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1538. // for more information on using Contexts.
  1539. func (c *Amplify) UpdateAppWithContext(ctx aws.Context, input *UpdateAppInput, opts ...request.Option) (*UpdateAppOutput, error) {
  1540. req, out := c.UpdateAppRequest(input)
  1541. req.SetContext(ctx)
  1542. req.ApplyOptions(opts...)
  1543. return out, req.Send()
  1544. }
  1545. const opUpdateBranch = "UpdateBranch"
  1546. // UpdateBranchRequest generates a "aws/request.Request" representing the
  1547. // client's request for the UpdateBranch operation. The "output" return
  1548. // value will be populated with the request's response once the request completes
  1549. // successfully.
  1550. //
  1551. // Use "Send" method on the returned Request to send the API call to the service.
  1552. // the "output" return value is not valid until after Send returns without error.
  1553. //
  1554. // See UpdateBranch for more information on using the UpdateBranch
  1555. // API call, and error handling.
  1556. //
  1557. // This method is useful when you want to inject custom logic or configuration
  1558. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1559. //
  1560. //
  1561. // // Example sending a request using the UpdateBranchRequest method.
  1562. // req, resp := client.UpdateBranchRequest(params)
  1563. //
  1564. // err := req.Send()
  1565. // if err == nil { // resp is now filled
  1566. // fmt.Println(resp)
  1567. // }
  1568. //
  1569. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/UpdateBranch
  1570. func (c *Amplify) UpdateBranchRequest(input *UpdateBranchInput) (req *request.Request, output *UpdateBranchOutput) {
  1571. op := &request.Operation{
  1572. Name: opUpdateBranch,
  1573. HTTPMethod: "POST",
  1574. HTTPPath: "/apps/{appId}/branches/{branchName}",
  1575. }
  1576. if input == nil {
  1577. input = &UpdateBranchInput{}
  1578. }
  1579. output = &UpdateBranchOutput{}
  1580. req = c.newRequest(op, input, output)
  1581. return
  1582. }
  1583. // UpdateBranch API operation for AWS Amplify.
  1584. //
  1585. // Updates a branch for an Amplify App.
  1586. //
  1587. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1588. // with awserr.Error's Code and Message methods to get detailed information about
  1589. // the error.
  1590. //
  1591. // See the AWS API reference guide for AWS Amplify's
  1592. // API operation UpdateBranch for usage and error information.
  1593. //
  1594. // Returned Error Codes:
  1595. // * ErrCodeBadRequestException "BadRequestException"
  1596. // Exception thrown when a request contains unexpected data.
  1597. //
  1598. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1599. // Exception thrown when an operation fails due to a lack of access.
  1600. //
  1601. // * ErrCodeNotFoundException "NotFoundException"
  1602. // Exception thrown when an entity has not been found during an operation.
  1603. //
  1604. // * ErrCodeInternalFailureException "InternalFailureException"
  1605. // Exception thrown when the service fails to perform an operation due to an
  1606. // internal issue.
  1607. //
  1608. // * ErrCodeDependentServiceFailureException "DependentServiceFailureException"
  1609. // Exception thrown when an operation fails due to a dependent service throwing
  1610. // an exception.
  1611. //
  1612. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/UpdateBranch
  1613. func (c *Amplify) UpdateBranch(input *UpdateBranchInput) (*UpdateBranchOutput, error) {
  1614. req, out := c.UpdateBranchRequest(input)
  1615. return out, req.Send()
  1616. }
  1617. // UpdateBranchWithContext is the same as UpdateBranch with the addition of
  1618. // the ability to pass a context and additional request options.
  1619. //
  1620. // See UpdateBranch for details on how to use this API operation.
  1621. //
  1622. // The context must be non-nil and will be used for request cancellation. If
  1623. // the context is nil a panic will occur. In the future the SDK may create
  1624. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1625. // for more information on using Contexts.
  1626. func (c *Amplify) UpdateBranchWithContext(ctx aws.Context, input *UpdateBranchInput, opts ...request.Option) (*UpdateBranchOutput, error) {
  1627. req, out := c.UpdateBranchRequest(input)
  1628. req.SetContext(ctx)
  1629. req.ApplyOptions(opts...)
  1630. return out, req.Send()
  1631. }
  1632. const opUpdateDomainAssociation = "UpdateDomainAssociation"
  1633. // UpdateDomainAssociationRequest generates a "aws/request.Request" representing the
  1634. // client's request for the UpdateDomainAssociation operation. The "output" return
  1635. // value will be populated with the request's response once the request completes
  1636. // successfully.
  1637. //
  1638. // Use "Send" method on the returned Request to send the API call to the service.
  1639. // the "output" return value is not valid until after Send returns without error.
  1640. //
  1641. // See UpdateDomainAssociation for more information on using the UpdateDomainAssociation
  1642. // API call, and error handling.
  1643. //
  1644. // This method is useful when you want to inject custom logic or configuration
  1645. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1646. //
  1647. //
  1648. // // Example sending a request using the UpdateDomainAssociationRequest method.
  1649. // req, resp := client.UpdateDomainAssociationRequest(params)
  1650. //
  1651. // err := req.Send()
  1652. // if err == nil { // resp is now filled
  1653. // fmt.Println(resp)
  1654. // }
  1655. //
  1656. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/UpdateDomainAssociation
  1657. func (c *Amplify) UpdateDomainAssociationRequest(input *UpdateDomainAssociationInput) (req *request.Request, output *UpdateDomainAssociationOutput) {
  1658. op := &request.Operation{
  1659. Name: opUpdateDomainAssociation,
  1660. HTTPMethod: "POST",
  1661. HTTPPath: "/apps/{appId}/domains/{domainName}",
  1662. }
  1663. if input == nil {
  1664. input = &UpdateDomainAssociationInput{}
  1665. }
  1666. output = &UpdateDomainAssociationOutput{}
  1667. req = c.newRequest(op, input, output)
  1668. return
  1669. }
  1670. // UpdateDomainAssociation API operation for AWS Amplify.
  1671. //
  1672. // Create a new DomainAssociation on an App
  1673. //
  1674. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1675. // with awserr.Error's Code and Message methods to get detailed information about
  1676. // the error.
  1677. //
  1678. // See the AWS API reference guide for AWS Amplify's
  1679. // API operation UpdateDomainAssociation for usage and error information.
  1680. //
  1681. // Returned Error Codes:
  1682. // * ErrCodeBadRequestException "BadRequestException"
  1683. // Exception thrown when a request contains unexpected data.
  1684. //
  1685. // * ErrCodeUnauthorizedException "UnauthorizedException"
  1686. // Exception thrown when an operation fails due to a lack of access.
  1687. //
  1688. // * ErrCodeNotFoundException "NotFoundException"
  1689. // Exception thrown when an entity has not been found during an operation.
  1690. //
  1691. // * ErrCodeInternalFailureException "InternalFailureException"
  1692. // Exception thrown when the service fails to perform an operation due to an
  1693. // internal issue.
  1694. //
  1695. // * ErrCodeDependentServiceFailureException "DependentServiceFailureException"
  1696. // Exception thrown when an operation fails due to a dependent service throwing
  1697. // an exception.
  1698. //
  1699. // See also, https://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/UpdateDomainAssociation
  1700. func (c *Amplify) UpdateDomainAssociation(input *UpdateDomainAssociationInput) (*UpdateDomainAssociationOutput, error) {
  1701. req, out := c.UpdateDomainAssociationRequest(input)
  1702. return out, req.Send()
  1703. }
  1704. // UpdateDomainAssociationWithContext is the same as UpdateDomainAssociation with the addition of
  1705. // the ability to pass a context and additional request options.
  1706. //
  1707. // See UpdateDomainAssociation for details on how to use this API operation.
  1708. //
  1709. // The context must be non-nil and will be used for request cancellation. If
  1710. // the context is nil a panic will occur. In the future the SDK may create
  1711. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1712. // for more information on using Contexts.
  1713. func (c *Amplify) UpdateDomainAssociationWithContext(ctx aws.Context, input *UpdateDomainAssociationInput, opts ...request.Option) (*UpdateDomainAssociationOutput, error) {
  1714. req, out := c.UpdateDomainAssociationRequest(input)
  1715. req.SetContext(ctx)
  1716. req.ApplyOptions(opts...)
  1717. return out, req.Send()
  1718. }
  1719. // Amplify App represents different branches of a repository for building, deploying,
  1720. // and hosting.
  1721. type App struct {
  1722. _ struct{} `type:"structure"`
  1723. // ARN for the Amplify App.
  1724. //
  1725. // AppArn is a required field
  1726. AppArn *string `locationName:"appArn" type:"string" required:"true"`
  1727. // Unique Id for the Amplify App.
  1728. //
  1729. // AppId is a required field
  1730. AppId *string `locationName:"appId" min:"1" type:"string" required:"true"`
  1731. // Basic Authorization credentials for branches for the Amplify App.
  1732. BasicAuthCredentials *string `locationName:"basicAuthCredentials" type:"string"`
  1733. // BuildSpec content for Amplify App.
  1734. BuildSpec *string `locationName:"buildSpec" min:"1" type:"string"`
  1735. // Create date / time for the Amplify App.
  1736. //
  1737. // CreateTime is a required field
  1738. CreateTime *time.Time `locationName:"createTime" type:"timestamp" required:"true"`
  1739. // Custom redirect / rewrite rules for the Amplify App.
  1740. CustomRules []*CustomRule `locationName:"customRules" type:"list"`
  1741. // Default domain for the Amplify App.
  1742. //
  1743. // DefaultDomain is a required field
  1744. DefaultDomain *string `locationName:"defaultDomain" min:"1" type:"string" required:"true"`
  1745. // Description for the Amplify App.
  1746. //
  1747. // Description is a required field
  1748. Description *string `locationName:"description" type:"string" required:"true"`
  1749. // Enables Basic Authorization for branches for the Amplify App.
  1750. //
  1751. // EnableBasicAuth is a required field
  1752. EnableBasicAuth *bool `locationName:"enableBasicAuth" type:"boolean" required:"true"`
  1753. // Enables auto-building of branches for the Amplify App.
  1754. //
  1755. // EnableBranchAutoBuild is a required field
  1756. EnableBranchAutoBuild *bool `locationName:"enableBranchAutoBuild" type:"boolean" required:"true"`
  1757. // Environment Variables for the Amplify App.
  1758. //
  1759. // EnvironmentVariables is a required field
  1760. EnvironmentVariables map[string]*string `locationName:"environmentVariables" type:"map" required:"true"`
  1761. // IAM service role ARN for the Amplify App.
  1762. IamServiceRoleArn *string `locationName:"iamServiceRoleArn" min:"1" type:"string"`
  1763. // Name for the Amplify App.
  1764. //
  1765. // Name is a required field
  1766. Name *string `locationName:"name" min:"1" type:"string" required:"true"`
  1767. // Platform for the Amplify App.
  1768. //
  1769. // Platform is a required field
  1770. Platform *string `locationName:"platform" type:"string" required:"true" enum:"Platform"`
  1771. // Structure with Production Branch information.
  1772. ProductionBranch *ProductionBranch `locationName:"productionBranch" type:"structure"`
  1773. // Repository for the Amplify App.
  1774. //
  1775. // Repository is a required field
  1776. Repository *string `locationName:"repository" type:"string" required:"true"`
  1777. // Tag for Amplify App.
  1778. Tags map[string]*string `locationName:"tags" type:"map"`
  1779. // Update date / time for the Amplify App.
  1780. //
  1781. // UpdateTime is a required field
  1782. UpdateTime *time.Time `locationName:"updateTime" type:"timestamp" required:"true"`
  1783. }
  1784. // String returns the string representation
  1785. func (s App) String() string {
  1786. return awsutil.Prettify(s)
  1787. }
  1788. // GoString returns the string representation
  1789. func (s App) GoString() string {
  1790. return s.String()
  1791. }
  1792. // SetAppArn sets the AppArn field's value.
  1793. func (s *App) SetAppArn(v string) *App {
  1794. s.AppArn = &v
  1795. return s
  1796. }
  1797. // SetAppId sets the AppId field's value.
  1798. func (s *App) SetAppId(v string) *App {
  1799. s.AppId = &v
  1800. return s
  1801. }
  1802. // SetBasicAuthCredentials sets the BasicAuthCredentials field's value.
  1803. func (s *App) SetBasicAuthCredentials(v string) *App {
  1804. s.BasicAuthCredentials = &v
  1805. return s
  1806. }
  1807. // SetBuildSpec sets the BuildSpec field's value.
  1808. func (s *App) SetBuildSpec(v string) *App {
  1809. s.BuildSpec = &v
  1810. return s
  1811. }
  1812. // SetCreateTime sets the CreateTime field's value.
  1813. func (s *App) SetCreateTime(v time.Time) *App {
  1814. s.CreateTime = &v
  1815. return s
  1816. }
  1817. // SetCustomRules sets the CustomRules field's value.
  1818. func (s *App) SetCustomRules(v []*CustomRule) *App {
  1819. s.CustomRules = v
  1820. return s
  1821. }
  1822. // SetDefaultDomain sets the DefaultDomain field's value.
  1823. func (s *App) SetDefaultDomain(v string) *App {
  1824. s.DefaultDomain = &v
  1825. return s
  1826. }
  1827. // SetDescription sets the Description field's value.
  1828. func (s *App) SetDescription(v string) *App {
  1829. s.Description = &v
  1830. return s
  1831. }
  1832. // SetEnableBasicAuth sets the EnableBasicAuth field's value.
  1833. func (s *App) SetEnableBasicAuth(v bool) *App {
  1834. s.EnableBasicAuth = &v
  1835. return s
  1836. }
  1837. // SetEnableBranchAutoBuild sets the EnableBranchAutoBuild field's value.
  1838. func (s *App) SetEnableBranchAutoBuild(v bool) *App {
  1839. s.EnableBranchAutoBuild = &v
  1840. return s
  1841. }
  1842. // SetEnvironmentVariables sets the EnvironmentVariables field's value.
  1843. func (s *App) SetEnvironmentVariables(v map[string]*string) *App {
  1844. s.EnvironmentVariables = v
  1845. return s
  1846. }
  1847. // SetIamServiceRoleArn sets the IamServiceRoleArn field's value.
  1848. func (s *App) SetIamServiceRoleArn(v string) *App {
  1849. s.IamServiceRoleArn = &v
  1850. return s
  1851. }
  1852. // SetName sets the Name field's value.
  1853. func (s *App) SetName(v string) *App {
  1854. s.Name = &v
  1855. return s
  1856. }
  1857. // SetPlatform sets the Platform field's value.
  1858. func (s *App) SetPlatform(v string) *App {
  1859. s.Platform = &v
  1860. return s
  1861. }
  1862. // SetProductionBranch sets the ProductionBranch field's value.
  1863. func (s *App) SetProductionBranch(v *ProductionBranch) *App {
  1864. s.ProductionBranch = v
  1865. return s
  1866. }
  1867. // SetRepository sets the Repository field's value.
  1868. func (s *App) SetRepository(v string) *App {
  1869. s.Repository = &v
  1870. return s
  1871. }
  1872. // SetTags sets the Tags field's value.
  1873. func (s *App) SetTags(v map[string]*string) *App {
  1874. s.Tags = v
  1875. return s
  1876. }
  1877. // SetUpdateTime sets the UpdateTime field's value.
  1878. func (s *App) SetUpdateTime(v time.Time) *App {
  1879. s.UpdateTime = &v
  1880. return s
  1881. }
  1882. // Branch for an Amplify App, which maps to a 3rd party repository branch.
  1883. type Branch struct {
  1884. _ struct{} `type:"structure"`
  1885. // Id of the active job for a branch, part of an Amplify App.
  1886. //
  1887. // ActiveJobId is a required field
  1888. ActiveJobId *string `locationName:"activeJobId" type:"string" required:"true"`
  1889. // Basic Authorization credentials for a branch, part of an Amplify App.
  1890. BasicAuthCredentials *string `locationName:"basicAuthCredentials" type:"string"`
  1891. // ARN for a branch, part of an Amplify App.
  1892. //
  1893. // BranchArn is a required field
  1894. BranchArn *string `locationName:"branchArn" type:"string" required:"true"`
  1895. // Name for a branch, part of an Amplify App.
  1896. //
  1897. // BranchName is a required field
  1898. BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"`
  1899. // BuildSpec content for branch for Amplify App.
  1900. BuildSpec *string `locationName:"buildSpec" min:"1" type:"string"`
  1901. // Creation date and time for a branch, part of an Amplify App.
  1902. //
  1903. // CreateTime is a required field
  1904. CreateTime *time.Time `locationName:"createTime" type:"timestamp" required:"true"`
  1905. // Custom domains for a branch, part of an Amplify App.
  1906. //
  1907. // CustomDomains is a required field
  1908. CustomDomains []*string `locationName:"customDomains" type:"list" required:"true"`
  1909. // Description for a branch, part of an Amplify App.
  1910. //
  1911. // Description is a required field
  1912. Description *string `locationName:"description" type:"string" required:"true"`
  1913. // Display name for a branch, part of an Amplify App.
  1914. DisplayName *string `locationName:"displayName" type:"string"`
  1915. // Enables auto-building on push for a branch, part of an Amplify App.
  1916. //
  1917. // EnableAutoBuild is a required field
  1918. EnableAutoBuild *bool `locationName:"enableAutoBuild" type:"boolean" required:"true"`
  1919. // Enables Basic Authorization for a branch, part of an Amplify App.
  1920. //
  1921. // EnableBasicAuth is a required field
  1922. EnableBasicAuth *bool `locationName:"enableBasicAuth" type:"boolean" required:"true"`
  1923. // Enables notifications for a branch, part of an Amplify App.
  1924. //
  1925. // EnableNotification is a required field
  1926. EnableNotification *bool `locationName:"enableNotification" type:"boolean" required:"true"`
  1927. // Environment Variables specific to a branch, part of an Amplify App.
  1928. //
  1929. // EnvironmentVariables is a required field
  1930. EnvironmentVariables map[string]*string `locationName:"environmentVariables" type:"map" required:"true"`
  1931. // Framework for a branch, part of an Amplify App.
  1932. //
  1933. // Framework is a required field
  1934. Framework *string `locationName:"framework" type:"string" required:"true"`
  1935. // Stage for a branch, part of an Amplify App.
  1936. //
  1937. // Stage is a required field
  1938. Stage *string `locationName:"stage" type:"string" required:"true" enum:"Stage"`
  1939. // Tag for branch for Amplify App.
  1940. Tags map[string]*string `locationName:"tags" type:"map"`
  1941. // Thumbnail Url for the branch.
  1942. ThumbnailUrl *string `locationName:"thumbnailUrl" min:"1" type:"string"`
  1943. // Total number of Jobs part of an Amplify App.
  1944. //
  1945. // TotalNumberOfJobs is a required field
  1946. TotalNumberOfJobs *string `locationName:"totalNumberOfJobs" type:"string" required:"true"`
  1947. // The content TTL for the website in seconds.
  1948. //
  1949. // Ttl is a required field
  1950. Ttl *string `locationName:"ttl" type:"string" required:"true"`
  1951. // Last updated date and time for a branch, part of an Amplify App.
  1952. //
  1953. // UpdateTime is a required field
  1954. UpdateTime *time.Time `locationName:"updateTime" type:"timestamp" required:"true"`
  1955. }
  1956. // String returns the string representation
  1957. func (s Branch) String() string {
  1958. return awsutil.Prettify(s)
  1959. }
  1960. // GoString returns the string representation
  1961. func (s Branch) GoString() string {
  1962. return s.String()
  1963. }
  1964. // SetActiveJobId sets the ActiveJobId field's value.
  1965. func (s *Branch) SetActiveJobId(v string) *Branch {
  1966. s.ActiveJobId = &v
  1967. return s
  1968. }
  1969. // SetBasicAuthCredentials sets the BasicAuthCredentials field's value.
  1970. func (s *Branch) SetBasicAuthCredentials(v string) *Branch {
  1971. s.BasicAuthCredentials = &v
  1972. return s
  1973. }
  1974. // SetBranchArn sets the BranchArn field's value.
  1975. func (s *Branch) SetBranchArn(v string) *Branch {
  1976. s.BranchArn = &v
  1977. return s
  1978. }
  1979. // SetBranchName sets the BranchName field's value.
  1980. func (s *Branch) SetBranchName(v string) *Branch {
  1981. s.BranchName = &v
  1982. return s
  1983. }
  1984. // SetBuildSpec sets the BuildSpec field's value.
  1985. func (s *Branch) SetBuildSpec(v string) *Branch {
  1986. s.BuildSpec = &v
  1987. return s
  1988. }
  1989. // SetCreateTime sets the CreateTime field's value.
  1990. func (s *Branch) SetCreateTime(v time.Time) *Branch {
  1991. s.CreateTime = &v
  1992. return s
  1993. }
  1994. // SetCustomDomains sets the CustomDomains field's value.
  1995. func (s *Branch) SetCustomDomains(v []*string) *Branch {
  1996. s.CustomDomains = v
  1997. return s
  1998. }
  1999. // SetDescription sets the Description field's value.
  2000. func (s *Branch) SetDescription(v string) *Branch {
  2001. s.Description = &v
  2002. return s
  2003. }
  2004. // SetDisplayName sets the DisplayName field's value.
  2005. func (s *Branch) SetDisplayName(v string) *Branch {
  2006. s.DisplayName = &v
  2007. return s
  2008. }
  2009. // SetEnableAutoBuild sets the EnableAutoBuild field's value.
  2010. func (s *Branch) SetEnableAutoBuild(v bool) *Branch {
  2011. s.EnableAutoBuild = &v
  2012. return s
  2013. }
  2014. // SetEnableBasicAuth sets the EnableBasicAuth field's value.
  2015. func (s *Branch) SetEnableBasicAuth(v bool) *Branch {
  2016. s.EnableBasicAuth = &v
  2017. return s
  2018. }
  2019. // SetEnableNotification sets the EnableNotification field's value.
  2020. func (s *Branch) SetEnableNotification(v bool) *Branch {
  2021. s.EnableNotification = &v
  2022. return s
  2023. }
  2024. // SetEnvironmentVariables sets the EnvironmentVariables field's value.
  2025. func (s *Branch) SetEnvironmentVariables(v map[string]*string) *Branch {
  2026. s.EnvironmentVariables = v
  2027. return s
  2028. }
  2029. // SetFramework sets the Framework field's value.
  2030. func (s *Branch) SetFramework(v string) *Branch {
  2031. s.Framework = &v
  2032. return s
  2033. }
  2034. // SetStage sets the Stage field's value.
  2035. func (s *Branch) SetStage(v string) *Branch {
  2036. s.Stage = &v
  2037. return s
  2038. }
  2039. // SetTags sets the Tags field's value.
  2040. func (s *Branch) SetTags(v map[string]*string) *Branch {
  2041. s.Tags = v
  2042. return s
  2043. }
  2044. // SetThumbnailUrl sets the ThumbnailUrl field's value.
  2045. func (s *Branch) SetThumbnailUrl(v string) *Branch {
  2046. s.ThumbnailUrl = &v
  2047. return s
  2048. }
  2049. // SetTotalNumberOfJobs sets the TotalNumberOfJobs field's value.
  2050. func (s *Branch) SetTotalNumberOfJobs(v string) *Branch {
  2051. s.TotalNumberOfJobs = &v
  2052. return s
  2053. }
  2054. // SetTtl sets the Ttl field's value.
  2055. func (s *Branch) SetTtl(v string) *Branch {
  2056. s.Ttl = &v
  2057. return s
  2058. }
  2059. // SetUpdateTime sets the UpdateTime field's value.
  2060. func (s *Branch) SetUpdateTime(v time.Time) *Branch {
  2061. s.UpdateTime = &v
  2062. return s
  2063. }
  2064. // Request structure used to create Apps in Amplify.
  2065. type CreateAppInput struct {
  2066. _ struct{} `type:"structure"`
  2067. // Credentials for Basic Authorization for an Amplify App.
  2068. BasicAuthCredentials *string `locationName:"basicAuthCredentials" type:"string"`
  2069. // BuildSpec for an Amplify App
  2070. BuildSpec *string `locationName:"buildSpec" min:"1" type:"string"`
  2071. // Custom rewrite / redirect rules for an Amplify App.
  2072. CustomRules []*CustomRule `locationName:"customRules" type:"list"`
  2073. // Description for an Amplify App
  2074. Description *string `locationName:"description" type:"string"`
  2075. // Enable Basic Authorization for an Amplify App, this will apply to all branches
  2076. // part of this App.
  2077. EnableBasicAuth *bool `locationName:"enableBasicAuth" type:"boolean"`
  2078. // Enable the auto building of branches for an Amplify App.
  2079. EnableBranchAutoBuild *bool `locationName:"enableBranchAutoBuild" type:"boolean"`
  2080. // Environment variables map for an Amplify App.
  2081. EnvironmentVariables map[string]*string `locationName:"environmentVariables" type:"map"`
  2082. // AWS IAM service role for an Amplify App
  2083. IamServiceRoleArn *string `locationName:"iamServiceRoleArn" min:"1" type:"string"`
  2084. // Name for the Amplify App
  2085. //
  2086. // Name is a required field
  2087. Name *string `locationName:"name" min:"1" type:"string" required:"true"`
  2088. // OAuth token for 3rd party source control system for an Amplify App, used
  2089. // to create webhook and read-only deploy key. OAuth token is not stored.
  2090. //
  2091. // OauthToken is a required field
  2092. OauthToken *string `locationName:"oauthToken" type:"string" required:"true"`
  2093. // Platform / framework for an Amplify App
  2094. //
  2095. // Platform is a required field
  2096. Platform *string `locationName:"platform" type:"string" required:"true" enum:"Platform"`
  2097. // Repository for an Amplify App
  2098. //
  2099. // Repository is a required field
  2100. Repository *string `locationName:"repository" type:"string" required:"true"`
  2101. // Tag for an Amplify App
  2102. Tags map[string]*string `locationName:"tags" type:"map"`
  2103. }
  2104. // String returns the string representation
  2105. func (s CreateAppInput) String() string {
  2106. return awsutil.Prettify(s)
  2107. }
  2108. // GoString returns the string representation
  2109. func (s CreateAppInput) GoString() string {
  2110. return s.String()
  2111. }
  2112. // Validate inspects the fields of the type to determine if they are valid.
  2113. func (s *CreateAppInput) Validate() error {
  2114. invalidParams := request.ErrInvalidParams{Context: "CreateAppInput"}
  2115. if s.BuildSpec != nil && len(*s.BuildSpec) < 1 {
  2116. invalidParams.Add(request.NewErrParamMinLen("BuildSpec", 1))
  2117. }
  2118. if s.IamServiceRoleArn != nil && len(*s.IamServiceRoleArn) < 1 {
  2119. invalidParams.Add(request.NewErrParamMinLen("IamServiceRoleArn", 1))
  2120. }
  2121. if s.Name == nil {
  2122. invalidParams.Add(request.NewErrParamRequired("Name"))
  2123. }
  2124. if s.Name != nil && len(*s.Name) < 1 {
  2125. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  2126. }
  2127. if s.OauthToken == nil {
  2128. invalidParams.Add(request.NewErrParamRequired("OauthToken"))
  2129. }
  2130. if s.Platform == nil {
  2131. invalidParams.Add(request.NewErrParamRequired("Platform"))
  2132. }
  2133. if s.Repository == nil {
  2134. invalidParams.Add(request.NewErrParamRequired("Repository"))
  2135. }
  2136. if s.CustomRules != nil {
  2137. for i, v := range s.CustomRules {
  2138. if v == nil {
  2139. continue
  2140. }
  2141. if err := v.Validate(); err != nil {
  2142. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CustomRules", i), err.(request.ErrInvalidParams))
  2143. }
  2144. }
  2145. }
  2146. if invalidParams.Len() > 0 {
  2147. return invalidParams
  2148. }
  2149. return nil
  2150. }
  2151. // SetBasicAuthCredentials sets the BasicAuthCredentials field's value.
  2152. func (s *CreateAppInput) SetBasicAuthCredentials(v string) *CreateAppInput {
  2153. s.BasicAuthCredentials = &v
  2154. return s
  2155. }
  2156. // SetBuildSpec sets the BuildSpec field's value.
  2157. func (s *CreateAppInput) SetBuildSpec(v string) *CreateAppInput {
  2158. s.BuildSpec = &v
  2159. return s
  2160. }
  2161. // SetCustomRules sets the CustomRules field's value.
  2162. func (s *CreateAppInput) SetCustomRules(v []*CustomRule) *CreateAppInput {
  2163. s.CustomRules = v
  2164. return s
  2165. }
  2166. // SetDescription sets the Description field's value.
  2167. func (s *CreateAppInput) SetDescription(v string) *CreateAppInput {
  2168. s.Description = &v
  2169. return s
  2170. }
  2171. // SetEnableBasicAuth sets the EnableBasicAuth field's value.
  2172. func (s *CreateAppInput) SetEnableBasicAuth(v bool) *CreateAppInput {
  2173. s.EnableBasicAuth = &v
  2174. return s
  2175. }
  2176. // SetEnableBranchAutoBuild sets the EnableBranchAutoBuild field's value.
  2177. func (s *CreateAppInput) SetEnableBranchAutoBuild(v bool) *CreateAppInput {
  2178. s.EnableBranchAutoBuild = &v
  2179. return s
  2180. }
  2181. // SetEnvironmentVariables sets the EnvironmentVariables field's value.
  2182. func (s *CreateAppInput) SetEnvironmentVariables(v map[string]*string) *CreateAppInput {
  2183. s.EnvironmentVariables = v
  2184. return s
  2185. }
  2186. // SetIamServiceRoleArn sets the IamServiceRoleArn field's value.
  2187. func (s *CreateAppInput) SetIamServiceRoleArn(v string) *CreateAppInput {
  2188. s.IamServiceRoleArn = &v
  2189. return s
  2190. }
  2191. // SetName sets the Name field's value.
  2192. func (s *CreateAppInput) SetName(v string) *CreateAppInput {
  2193. s.Name = &v
  2194. return s
  2195. }
  2196. // SetOauthToken sets the OauthToken field's value.
  2197. func (s *CreateAppInput) SetOauthToken(v string) *CreateAppInput {
  2198. s.OauthToken = &v
  2199. return s
  2200. }
  2201. // SetPlatform sets the Platform field's value.
  2202. func (s *CreateAppInput) SetPlatform(v string) *CreateAppInput {
  2203. s.Platform = &v
  2204. return s
  2205. }
  2206. // SetRepository sets the Repository field's value.
  2207. func (s *CreateAppInput) SetRepository(v string) *CreateAppInput {
  2208. s.Repository = &v
  2209. return s
  2210. }
  2211. // SetTags sets the Tags field's value.
  2212. func (s *CreateAppInput) SetTags(v map[string]*string) *CreateAppInput {
  2213. s.Tags = v
  2214. return s
  2215. }
  2216. type CreateAppOutput struct {
  2217. _ struct{} `type:"structure"`
  2218. // Amplify App represents different branches of a repository for building, deploying,
  2219. // and hosting.
  2220. //
  2221. // App is a required field
  2222. App *App `locationName:"app" type:"structure" required:"true"`
  2223. }
  2224. // String returns the string representation
  2225. func (s CreateAppOutput) String() string {
  2226. return awsutil.Prettify(s)
  2227. }
  2228. // GoString returns the string representation
  2229. func (s CreateAppOutput) GoString() string {
  2230. return s.String()
  2231. }
  2232. // SetApp sets the App field's value.
  2233. func (s *CreateAppOutput) SetApp(v *App) *CreateAppOutput {
  2234. s.App = v
  2235. return s
  2236. }
  2237. // Request structure for a branch create request.
  2238. type CreateBranchInput struct {
  2239. _ struct{} `type:"structure"`
  2240. // Unique Id for an Amplify App.
  2241. //
  2242. // AppId is a required field
  2243. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  2244. // Basic Authorization credentials for the branch.
  2245. BasicAuthCredentials *string `locationName:"basicAuthCredentials" type:"string"`
  2246. // Name for the branch.
  2247. //
  2248. // BranchName is a required field
  2249. BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"`
  2250. // BuildSpec for the branch.
  2251. BuildSpec *string `locationName:"buildSpec" min:"1" type:"string"`
  2252. // Description for the branch.
  2253. Description *string `locationName:"description" type:"string"`
  2254. // Enables auto building for the branch.
  2255. EnableAutoBuild *bool `locationName:"enableAutoBuild" type:"boolean"`
  2256. // Enables Basic Auth for the branch.
  2257. EnableBasicAuth *bool `locationName:"enableBasicAuth" type:"boolean"`
  2258. // Enables notifications for the branch.
  2259. EnableNotification *bool `locationName:"enableNotification" type:"boolean"`
  2260. // Environment Variables for the branch.
  2261. EnvironmentVariables map[string]*string `locationName:"environmentVariables" type:"map"`
  2262. // Framework for the branch.
  2263. Framework *string `locationName:"framework" type:"string"`
  2264. // Stage for the branch.
  2265. Stage *string `locationName:"stage" type:"string" enum:"Stage"`
  2266. // Tag for the branch.
  2267. Tags map[string]*string `locationName:"tags" type:"map"`
  2268. // The content TTL for the website in seconds.
  2269. Ttl *string `locationName:"ttl" type:"string"`
  2270. }
  2271. // String returns the string representation
  2272. func (s CreateBranchInput) String() string {
  2273. return awsutil.Prettify(s)
  2274. }
  2275. // GoString returns the string representation
  2276. func (s CreateBranchInput) GoString() string {
  2277. return s.String()
  2278. }
  2279. // Validate inspects the fields of the type to determine if they are valid.
  2280. func (s *CreateBranchInput) Validate() error {
  2281. invalidParams := request.ErrInvalidParams{Context: "CreateBranchInput"}
  2282. if s.AppId == nil {
  2283. invalidParams.Add(request.NewErrParamRequired("AppId"))
  2284. }
  2285. if s.AppId != nil && len(*s.AppId) < 1 {
  2286. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  2287. }
  2288. if s.BranchName == nil {
  2289. invalidParams.Add(request.NewErrParamRequired("BranchName"))
  2290. }
  2291. if s.BranchName != nil && len(*s.BranchName) < 1 {
  2292. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  2293. }
  2294. if s.BuildSpec != nil && len(*s.BuildSpec) < 1 {
  2295. invalidParams.Add(request.NewErrParamMinLen("BuildSpec", 1))
  2296. }
  2297. if invalidParams.Len() > 0 {
  2298. return invalidParams
  2299. }
  2300. return nil
  2301. }
  2302. // SetAppId sets the AppId field's value.
  2303. func (s *CreateBranchInput) SetAppId(v string) *CreateBranchInput {
  2304. s.AppId = &v
  2305. return s
  2306. }
  2307. // SetBasicAuthCredentials sets the BasicAuthCredentials field's value.
  2308. func (s *CreateBranchInput) SetBasicAuthCredentials(v string) *CreateBranchInput {
  2309. s.BasicAuthCredentials = &v
  2310. return s
  2311. }
  2312. // SetBranchName sets the BranchName field's value.
  2313. func (s *CreateBranchInput) SetBranchName(v string) *CreateBranchInput {
  2314. s.BranchName = &v
  2315. return s
  2316. }
  2317. // SetBuildSpec sets the BuildSpec field's value.
  2318. func (s *CreateBranchInput) SetBuildSpec(v string) *CreateBranchInput {
  2319. s.BuildSpec = &v
  2320. return s
  2321. }
  2322. // SetDescription sets the Description field's value.
  2323. func (s *CreateBranchInput) SetDescription(v string) *CreateBranchInput {
  2324. s.Description = &v
  2325. return s
  2326. }
  2327. // SetEnableAutoBuild sets the EnableAutoBuild field's value.
  2328. func (s *CreateBranchInput) SetEnableAutoBuild(v bool) *CreateBranchInput {
  2329. s.EnableAutoBuild = &v
  2330. return s
  2331. }
  2332. // SetEnableBasicAuth sets the EnableBasicAuth field's value.
  2333. func (s *CreateBranchInput) SetEnableBasicAuth(v bool) *CreateBranchInput {
  2334. s.EnableBasicAuth = &v
  2335. return s
  2336. }
  2337. // SetEnableNotification sets the EnableNotification field's value.
  2338. func (s *CreateBranchInput) SetEnableNotification(v bool) *CreateBranchInput {
  2339. s.EnableNotification = &v
  2340. return s
  2341. }
  2342. // SetEnvironmentVariables sets the EnvironmentVariables field's value.
  2343. func (s *CreateBranchInput) SetEnvironmentVariables(v map[string]*string) *CreateBranchInput {
  2344. s.EnvironmentVariables = v
  2345. return s
  2346. }
  2347. // SetFramework sets the Framework field's value.
  2348. func (s *CreateBranchInput) SetFramework(v string) *CreateBranchInput {
  2349. s.Framework = &v
  2350. return s
  2351. }
  2352. // SetStage sets the Stage field's value.
  2353. func (s *CreateBranchInput) SetStage(v string) *CreateBranchInput {
  2354. s.Stage = &v
  2355. return s
  2356. }
  2357. // SetTags sets the Tags field's value.
  2358. func (s *CreateBranchInput) SetTags(v map[string]*string) *CreateBranchInput {
  2359. s.Tags = v
  2360. return s
  2361. }
  2362. // SetTtl sets the Ttl field's value.
  2363. func (s *CreateBranchInput) SetTtl(v string) *CreateBranchInput {
  2364. s.Ttl = &v
  2365. return s
  2366. }
  2367. // Result structure for create branch request.
  2368. type CreateBranchOutput struct {
  2369. _ struct{} `type:"structure"`
  2370. // Branch structure for an Amplify App.
  2371. //
  2372. // Branch is a required field
  2373. Branch *Branch `locationName:"branch" type:"structure" required:"true"`
  2374. }
  2375. // String returns the string representation
  2376. func (s CreateBranchOutput) String() string {
  2377. return awsutil.Prettify(s)
  2378. }
  2379. // GoString returns the string representation
  2380. func (s CreateBranchOutput) GoString() string {
  2381. return s.String()
  2382. }
  2383. // SetBranch sets the Branch field's value.
  2384. func (s *CreateBranchOutput) SetBranch(v *Branch) *CreateBranchOutput {
  2385. s.Branch = v
  2386. return s
  2387. }
  2388. // Request structure for create Domain Association request.
  2389. type CreateDomainAssociationInput struct {
  2390. _ struct{} `type:"structure"`
  2391. // Unique Id for an Amplify App.
  2392. //
  2393. // AppId is a required field
  2394. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  2395. // Domain name for the Domain Association.
  2396. //
  2397. // DomainName is a required field
  2398. DomainName *string `locationName:"domainName" type:"string" required:"true"`
  2399. // Enables automated creation of Subdomains for branches.
  2400. EnableAutoSubDomain *bool `locationName:"enableAutoSubDomain" type:"boolean"`
  2401. // Setting structure for the Subdomain.
  2402. //
  2403. // SubDomainSettings is a required field
  2404. SubDomainSettings []*SubDomainSetting `locationName:"subDomainSettings" type:"list" required:"true"`
  2405. }
  2406. // String returns the string representation
  2407. func (s CreateDomainAssociationInput) String() string {
  2408. return awsutil.Prettify(s)
  2409. }
  2410. // GoString returns the string representation
  2411. func (s CreateDomainAssociationInput) GoString() string {
  2412. return s.String()
  2413. }
  2414. // Validate inspects the fields of the type to determine if they are valid.
  2415. func (s *CreateDomainAssociationInput) Validate() error {
  2416. invalidParams := request.ErrInvalidParams{Context: "CreateDomainAssociationInput"}
  2417. if s.AppId == nil {
  2418. invalidParams.Add(request.NewErrParamRequired("AppId"))
  2419. }
  2420. if s.AppId != nil && len(*s.AppId) < 1 {
  2421. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  2422. }
  2423. if s.DomainName == nil {
  2424. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  2425. }
  2426. if s.SubDomainSettings == nil {
  2427. invalidParams.Add(request.NewErrParamRequired("SubDomainSettings"))
  2428. }
  2429. if s.SubDomainSettings != nil {
  2430. for i, v := range s.SubDomainSettings {
  2431. if v == nil {
  2432. continue
  2433. }
  2434. if err := v.Validate(); err != nil {
  2435. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SubDomainSettings", i), err.(request.ErrInvalidParams))
  2436. }
  2437. }
  2438. }
  2439. if invalidParams.Len() > 0 {
  2440. return invalidParams
  2441. }
  2442. return nil
  2443. }
  2444. // SetAppId sets the AppId field's value.
  2445. func (s *CreateDomainAssociationInput) SetAppId(v string) *CreateDomainAssociationInput {
  2446. s.AppId = &v
  2447. return s
  2448. }
  2449. // SetDomainName sets the DomainName field's value.
  2450. func (s *CreateDomainAssociationInput) SetDomainName(v string) *CreateDomainAssociationInput {
  2451. s.DomainName = &v
  2452. return s
  2453. }
  2454. // SetEnableAutoSubDomain sets the EnableAutoSubDomain field's value.
  2455. func (s *CreateDomainAssociationInput) SetEnableAutoSubDomain(v bool) *CreateDomainAssociationInput {
  2456. s.EnableAutoSubDomain = &v
  2457. return s
  2458. }
  2459. // SetSubDomainSettings sets the SubDomainSettings field's value.
  2460. func (s *CreateDomainAssociationInput) SetSubDomainSettings(v []*SubDomainSetting) *CreateDomainAssociationInput {
  2461. s.SubDomainSettings = v
  2462. return s
  2463. }
  2464. // Result structure for the create Domain Association request.
  2465. type CreateDomainAssociationOutput struct {
  2466. _ struct{} `type:"structure"`
  2467. // Domain Association structure.
  2468. //
  2469. // DomainAssociation is a required field
  2470. DomainAssociation *DomainAssociation `locationName:"domainAssociation" type:"structure" required:"true"`
  2471. }
  2472. // String returns the string representation
  2473. func (s CreateDomainAssociationOutput) String() string {
  2474. return awsutil.Prettify(s)
  2475. }
  2476. // GoString returns the string representation
  2477. func (s CreateDomainAssociationOutput) GoString() string {
  2478. return s.String()
  2479. }
  2480. // SetDomainAssociation sets the DomainAssociation field's value.
  2481. func (s *CreateDomainAssociationOutput) SetDomainAssociation(v *DomainAssociation) *CreateDomainAssociationOutput {
  2482. s.DomainAssociation = v
  2483. return s
  2484. }
  2485. // Custom rewrite / redirect rule.
  2486. type CustomRule struct {
  2487. _ struct{} `type:"structure"`
  2488. // The condition for a URL rewrite or redirect rule, e.g. country code.
  2489. Condition *string `locationName:"condition" min:"1" type:"string"`
  2490. // The source pattern for a URL rewrite or redirect rule.
  2491. //
  2492. // Source is a required field
  2493. Source *string `locationName:"source" min:"1" type:"string" required:"true"`
  2494. // The status code for a URL rewrite or redirect rule.
  2495. Status *string `locationName:"status" min:"3" type:"string"`
  2496. // The target pattern for a URL rewrite or redirect rule.
  2497. //
  2498. // Target is a required field
  2499. Target *string `locationName:"target" min:"1" type:"string" required:"true"`
  2500. }
  2501. // String returns the string representation
  2502. func (s CustomRule) String() string {
  2503. return awsutil.Prettify(s)
  2504. }
  2505. // GoString returns the string representation
  2506. func (s CustomRule) GoString() string {
  2507. return s.String()
  2508. }
  2509. // Validate inspects the fields of the type to determine if they are valid.
  2510. func (s *CustomRule) Validate() error {
  2511. invalidParams := request.ErrInvalidParams{Context: "CustomRule"}
  2512. if s.Condition != nil && len(*s.Condition) < 1 {
  2513. invalidParams.Add(request.NewErrParamMinLen("Condition", 1))
  2514. }
  2515. if s.Source == nil {
  2516. invalidParams.Add(request.NewErrParamRequired("Source"))
  2517. }
  2518. if s.Source != nil && len(*s.Source) < 1 {
  2519. invalidParams.Add(request.NewErrParamMinLen("Source", 1))
  2520. }
  2521. if s.Status != nil && len(*s.Status) < 3 {
  2522. invalidParams.Add(request.NewErrParamMinLen("Status", 3))
  2523. }
  2524. if s.Target == nil {
  2525. invalidParams.Add(request.NewErrParamRequired("Target"))
  2526. }
  2527. if s.Target != nil && len(*s.Target) < 1 {
  2528. invalidParams.Add(request.NewErrParamMinLen("Target", 1))
  2529. }
  2530. if invalidParams.Len() > 0 {
  2531. return invalidParams
  2532. }
  2533. return nil
  2534. }
  2535. // SetCondition sets the Condition field's value.
  2536. func (s *CustomRule) SetCondition(v string) *CustomRule {
  2537. s.Condition = &v
  2538. return s
  2539. }
  2540. // SetSource sets the Source field's value.
  2541. func (s *CustomRule) SetSource(v string) *CustomRule {
  2542. s.Source = &v
  2543. return s
  2544. }
  2545. // SetStatus sets the Status field's value.
  2546. func (s *CustomRule) SetStatus(v string) *CustomRule {
  2547. s.Status = &v
  2548. return s
  2549. }
  2550. // SetTarget sets the Target field's value.
  2551. func (s *CustomRule) SetTarget(v string) *CustomRule {
  2552. s.Target = &v
  2553. return s
  2554. }
  2555. // Request structure for an Amplify App delete request.
  2556. type DeleteAppInput struct {
  2557. _ struct{} `type:"structure"`
  2558. // Unique Id for an Amplify App.
  2559. //
  2560. // AppId is a required field
  2561. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  2562. }
  2563. // String returns the string representation
  2564. func (s DeleteAppInput) String() string {
  2565. return awsutil.Prettify(s)
  2566. }
  2567. // GoString returns the string representation
  2568. func (s DeleteAppInput) GoString() string {
  2569. return s.String()
  2570. }
  2571. // Validate inspects the fields of the type to determine if they are valid.
  2572. func (s *DeleteAppInput) Validate() error {
  2573. invalidParams := request.ErrInvalidParams{Context: "DeleteAppInput"}
  2574. if s.AppId == nil {
  2575. invalidParams.Add(request.NewErrParamRequired("AppId"))
  2576. }
  2577. if s.AppId != nil && len(*s.AppId) < 1 {
  2578. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  2579. }
  2580. if invalidParams.Len() > 0 {
  2581. return invalidParams
  2582. }
  2583. return nil
  2584. }
  2585. // SetAppId sets the AppId field's value.
  2586. func (s *DeleteAppInput) SetAppId(v string) *DeleteAppInput {
  2587. s.AppId = &v
  2588. return s
  2589. }
  2590. // Result structure for an Amplify App delete request.
  2591. type DeleteAppOutput struct {
  2592. _ struct{} `type:"structure"`
  2593. // Amplify App represents different branches of a repository for building, deploying,
  2594. // and hosting.
  2595. //
  2596. // App is a required field
  2597. App *App `locationName:"app" type:"structure" required:"true"`
  2598. }
  2599. // String returns the string representation
  2600. func (s DeleteAppOutput) String() string {
  2601. return awsutil.Prettify(s)
  2602. }
  2603. // GoString returns the string representation
  2604. func (s DeleteAppOutput) GoString() string {
  2605. return s.String()
  2606. }
  2607. // SetApp sets the App field's value.
  2608. func (s *DeleteAppOutput) SetApp(v *App) *DeleteAppOutput {
  2609. s.App = v
  2610. return s
  2611. }
  2612. // Request structure for delete branch request.
  2613. type DeleteBranchInput struct {
  2614. _ struct{} `type:"structure"`
  2615. // Unique Id for an Amplify App.
  2616. //
  2617. // AppId is a required field
  2618. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  2619. // Name for the branch.
  2620. //
  2621. // BranchName is a required field
  2622. BranchName *string `location:"uri" locationName:"branchName" min:"1" type:"string" required:"true"`
  2623. }
  2624. // String returns the string representation
  2625. func (s DeleteBranchInput) String() string {
  2626. return awsutil.Prettify(s)
  2627. }
  2628. // GoString returns the string representation
  2629. func (s DeleteBranchInput) GoString() string {
  2630. return s.String()
  2631. }
  2632. // Validate inspects the fields of the type to determine if they are valid.
  2633. func (s *DeleteBranchInput) Validate() error {
  2634. invalidParams := request.ErrInvalidParams{Context: "DeleteBranchInput"}
  2635. if s.AppId == nil {
  2636. invalidParams.Add(request.NewErrParamRequired("AppId"))
  2637. }
  2638. if s.AppId != nil && len(*s.AppId) < 1 {
  2639. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  2640. }
  2641. if s.BranchName == nil {
  2642. invalidParams.Add(request.NewErrParamRequired("BranchName"))
  2643. }
  2644. if s.BranchName != nil && len(*s.BranchName) < 1 {
  2645. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  2646. }
  2647. if invalidParams.Len() > 0 {
  2648. return invalidParams
  2649. }
  2650. return nil
  2651. }
  2652. // SetAppId sets the AppId field's value.
  2653. func (s *DeleteBranchInput) SetAppId(v string) *DeleteBranchInput {
  2654. s.AppId = &v
  2655. return s
  2656. }
  2657. // SetBranchName sets the BranchName field's value.
  2658. func (s *DeleteBranchInput) SetBranchName(v string) *DeleteBranchInput {
  2659. s.BranchName = &v
  2660. return s
  2661. }
  2662. // Result structure for delete branch request.
  2663. type DeleteBranchOutput struct {
  2664. _ struct{} `type:"structure"`
  2665. // Branch structure for an Amplify App.
  2666. //
  2667. // Branch is a required field
  2668. Branch *Branch `locationName:"branch" type:"structure" required:"true"`
  2669. }
  2670. // String returns the string representation
  2671. func (s DeleteBranchOutput) String() string {
  2672. return awsutil.Prettify(s)
  2673. }
  2674. // GoString returns the string representation
  2675. func (s DeleteBranchOutput) GoString() string {
  2676. return s.String()
  2677. }
  2678. // SetBranch sets the Branch field's value.
  2679. func (s *DeleteBranchOutput) SetBranch(v *Branch) *DeleteBranchOutput {
  2680. s.Branch = v
  2681. return s
  2682. }
  2683. // Request structure for the delete Domain Association request.
  2684. type DeleteDomainAssociationInput struct {
  2685. _ struct{} `type:"structure"`
  2686. // Unique Id for an Amplify App.
  2687. //
  2688. // AppId is a required field
  2689. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  2690. // Name of the domain.
  2691. //
  2692. // DomainName is a required field
  2693. DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"`
  2694. }
  2695. // String returns the string representation
  2696. func (s DeleteDomainAssociationInput) String() string {
  2697. return awsutil.Prettify(s)
  2698. }
  2699. // GoString returns the string representation
  2700. func (s DeleteDomainAssociationInput) GoString() string {
  2701. return s.String()
  2702. }
  2703. // Validate inspects the fields of the type to determine if they are valid.
  2704. func (s *DeleteDomainAssociationInput) Validate() error {
  2705. invalidParams := request.ErrInvalidParams{Context: "DeleteDomainAssociationInput"}
  2706. if s.AppId == nil {
  2707. invalidParams.Add(request.NewErrParamRequired("AppId"))
  2708. }
  2709. if s.AppId != nil && len(*s.AppId) < 1 {
  2710. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  2711. }
  2712. if s.DomainName == nil {
  2713. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  2714. }
  2715. if s.DomainName != nil && len(*s.DomainName) < 1 {
  2716. invalidParams.Add(request.NewErrParamMinLen("DomainName", 1))
  2717. }
  2718. if invalidParams.Len() > 0 {
  2719. return invalidParams
  2720. }
  2721. return nil
  2722. }
  2723. // SetAppId sets the AppId field's value.
  2724. func (s *DeleteDomainAssociationInput) SetAppId(v string) *DeleteDomainAssociationInput {
  2725. s.AppId = &v
  2726. return s
  2727. }
  2728. // SetDomainName sets the DomainName field's value.
  2729. func (s *DeleteDomainAssociationInput) SetDomainName(v string) *DeleteDomainAssociationInput {
  2730. s.DomainName = &v
  2731. return s
  2732. }
  2733. type DeleteDomainAssociationOutput struct {
  2734. _ struct{} `type:"structure"`
  2735. // Structure for Domain Association, which associates a custom domain with an
  2736. // Amplify App.
  2737. //
  2738. // DomainAssociation is a required field
  2739. DomainAssociation *DomainAssociation `locationName:"domainAssociation" type:"structure" required:"true"`
  2740. }
  2741. // String returns the string representation
  2742. func (s DeleteDomainAssociationOutput) String() string {
  2743. return awsutil.Prettify(s)
  2744. }
  2745. // GoString returns the string representation
  2746. func (s DeleteDomainAssociationOutput) GoString() string {
  2747. return s.String()
  2748. }
  2749. // SetDomainAssociation sets the DomainAssociation field's value.
  2750. func (s *DeleteDomainAssociationOutput) SetDomainAssociation(v *DomainAssociation) *DeleteDomainAssociationOutput {
  2751. s.DomainAssociation = v
  2752. return s
  2753. }
  2754. // Request structure for delete job request.
  2755. type DeleteJobInput struct {
  2756. _ struct{} `type:"structure"`
  2757. // Unique Id for an Amplify App.
  2758. //
  2759. // AppId is a required field
  2760. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  2761. // Name for the branch, for the Job.
  2762. //
  2763. // BranchName is a required field
  2764. BranchName *string `location:"uri" locationName:"branchName" min:"1" type:"string" required:"true"`
  2765. // Unique Id for the Job.
  2766. //
  2767. // JobId is a required field
  2768. JobId *string `location:"uri" locationName:"jobId" type:"string" required:"true"`
  2769. }
  2770. // String returns the string representation
  2771. func (s DeleteJobInput) String() string {
  2772. return awsutil.Prettify(s)
  2773. }
  2774. // GoString returns the string representation
  2775. func (s DeleteJobInput) GoString() string {
  2776. return s.String()
  2777. }
  2778. // Validate inspects the fields of the type to determine if they are valid.
  2779. func (s *DeleteJobInput) Validate() error {
  2780. invalidParams := request.ErrInvalidParams{Context: "DeleteJobInput"}
  2781. if s.AppId == nil {
  2782. invalidParams.Add(request.NewErrParamRequired("AppId"))
  2783. }
  2784. if s.AppId != nil && len(*s.AppId) < 1 {
  2785. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  2786. }
  2787. if s.BranchName == nil {
  2788. invalidParams.Add(request.NewErrParamRequired("BranchName"))
  2789. }
  2790. if s.BranchName != nil && len(*s.BranchName) < 1 {
  2791. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  2792. }
  2793. if s.JobId == nil {
  2794. invalidParams.Add(request.NewErrParamRequired("JobId"))
  2795. }
  2796. if s.JobId != nil && len(*s.JobId) < 1 {
  2797. invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
  2798. }
  2799. if invalidParams.Len() > 0 {
  2800. return invalidParams
  2801. }
  2802. return nil
  2803. }
  2804. // SetAppId sets the AppId field's value.
  2805. func (s *DeleteJobInput) SetAppId(v string) *DeleteJobInput {
  2806. s.AppId = &v
  2807. return s
  2808. }
  2809. // SetBranchName sets the BranchName field's value.
  2810. func (s *DeleteJobInput) SetBranchName(v string) *DeleteJobInput {
  2811. s.BranchName = &v
  2812. return s
  2813. }
  2814. // SetJobId sets the JobId field's value.
  2815. func (s *DeleteJobInput) SetJobId(v string) *DeleteJobInput {
  2816. s.JobId = &v
  2817. return s
  2818. }
  2819. // Result structure for the delete job request.
  2820. type DeleteJobOutput struct {
  2821. _ struct{} `type:"structure"`
  2822. // Structure for the summary of a Job.
  2823. //
  2824. // JobSummary is a required field
  2825. JobSummary *JobSummary `locationName:"jobSummary" type:"structure" required:"true"`
  2826. }
  2827. // String returns the string representation
  2828. func (s DeleteJobOutput) String() string {
  2829. return awsutil.Prettify(s)
  2830. }
  2831. // GoString returns the string representation
  2832. func (s DeleteJobOutput) GoString() string {
  2833. return s.String()
  2834. }
  2835. // SetJobSummary sets the JobSummary field's value.
  2836. func (s *DeleteJobOutput) SetJobSummary(v *JobSummary) *DeleteJobOutput {
  2837. s.JobSummary = v
  2838. return s
  2839. }
  2840. // Structure for Domain Association, which associates a custom domain with an
  2841. // Amplify App.
  2842. type DomainAssociation struct {
  2843. _ struct{} `type:"structure"`
  2844. // DNS Record for certificate verification.
  2845. //
  2846. // CertificateVerificationDNSRecord is a required field
  2847. CertificateVerificationDNSRecord *string `locationName:"certificateVerificationDNSRecord" type:"string" required:"true"`
  2848. // ARN for the Domain Association.
  2849. //
  2850. // DomainAssociationArn is a required field
  2851. DomainAssociationArn *string `locationName:"domainAssociationArn" type:"string" required:"true"`
  2852. // Name of the domain.
  2853. //
  2854. // DomainName is a required field
  2855. DomainName *string `locationName:"domainName" type:"string" required:"true"`
  2856. // Status fo the Domain Association.
  2857. //
  2858. // DomainStatus is a required field
  2859. DomainStatus *string `locationName:"domainStatus" type:"string" required:"true" enum:"DomainStatus"`
  2860. // Enables automated creation of Subdomains for branches.
  2861. //
  2862. // EnableAutoSubDomain is a required field
  2863. EnableAutoSubDomain *bool `locationName:"enableAutoSubDomain" type:"boolean" required:"true"`
  2864. // Reason for the current status of the Domain Association.
  2865. //
  2866. // StatusReason is a required field
  2867. StatusReason *string `locationName:"statusReason" type:"string" required:"true"`
  2868. // Subdomains for the Domain Association.
  2869. //
  2870. // SubDomains is a required field
  2871. SubDomains []*SubDomain `locationName:"subDomains" type:"list" required:"true"`
  2872. }
  2873. // String returns the string representation
  2874. func (s DomainAssociation) String() string {
  2875. return awsutil.Prettify(s)
  2876. }
  2877. // GoString returns the string representation
  2878. func (s DomainAssociation) GoString() string {
  2879. return s.String()
  2880. }
  2881. // SetCertificateVerificationDNSRecord sets the CertificateVerificationDNSRecord field's value.
  2882. func (s *DomainAssociation) SetCertificateVerificationDNSRecord(v string) *DomainAssociation {
  2883. s.CertificateVerificationDNSRecord = &v
  2884. return s
  2885. }
  2886. // SetDomainAssociationArn sets the DomainAssociationArn field's value.
  2887. func (s *DomainAssociation) SetDomainAssociationArn(v string) *DomainAssociation {
  2888. s.DomainAssociationArn = &v
  2889. return s
  2890. }
  2891. // SetDomainName sets the DomainName field's value.
  2892. func (s *DomainAssociation) SetDomainName(v string) *DomainAssociation {
  2893. s.DomainName = &v
  2894. return s
  2895. }
  2896. // SetDomainStatus sets the DomainStatus field's value.
  2897. func (s *DomainAssociation) SetDomainStatus(v string) *DomainAssociation {
  2898. s.DomainStatus = &v
  2899. return s
  2900. }
  2901. // SetEnableAutoSubDomain sets the EnableAutoSubDomain field's value.
  2902. func (s *DomainAssociation) SetEnableAutoSubDomain(v bool) *DomainAssociation {
  2903. s.EnableAutoSubDomain = &v
  2904. return s
  2905. }
  2906. // SetStatusReason sets the StatusReason field's value.
  2907. func (s *DomainAssociation) SetStatusReason(v string) *DomainAssociation {
  2908. s.StatusReason = &v
  2909. return s
  2910. }
  2911. // SetSubDomains sets the SubDomains field's value.
  2912. func (s *DomainAssociation) SetSubDomains(v []*SubDomain) *DomainAssociation {
  2913. s.SubDomains = v
  2914. return s
  2915. }
  2916. // Request structure for get App request.
  2917. type GetAppInput struct {
  2918. _ struct{} `type:"structure"`
  2919. // Unique Id for an Amplify App.
  2920. //
  2921. // AppId is a required field
  2922. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  2923. }
  2924. // String returns the string representation
  2925. func (s GetAppInput) String() string {
  2926. return awsutil.Prettify(s)
  2927. }
  2928. // GoString returns the string representation
  2929. func (s GetAppInput) GoString() string {
  2930. return s.String()
  2931. }
  2932. // Validate inspects the fields of the type to determine if they are valid.
  2933. func (s *GetAppInput) Validate() error {
  2934. invalidParams := request.ErrInvalidParams{Context: "GetAppInput"}
  2935. if s.AppId == nil {
  2936. invalidParams.Add(request.NewErrParamRequired("AppId"))
  2937. }
  2938. if s.AppId != nil && len(*s.AppId) < 1 {
  2939. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  2940. }
  2941. if invalidParams.Len() > 0 {
  2942. return invalidParams
  2943. }
  2944. return nil
  2945. }
  2946. // SetAppId sets the AppId field's value.
  2947. func (s *GetAppInput) SetAppId(v string) *GetAppInput {
  2948. s.AppId = &v
  2949. return s
  2950. }
  2951. type GetAppOutput struct {
  2952. _ struct{} `type:"structure"`
  2953. // Amplify App represents different branches of a repository for building, deploying,
  2954. // and hosting.
  2955. //
  2956. // App is a required field
  2957. App *App `locationName:"app" type:"structure" required:"true"`
  2958. }
  2959. // String returns the string representation
  2960. func (s GetAppOutput) String() string {
  2961. return awsutil.Prettify(s)
  2962. }
  2963. // GoString returns the string representation
  2964. func (s GetAppOutput) GoString() string {
  2965. return s.String()
  2966. }
  2967. // SetApp sets the App field's value.
  2968. func (s *GetAppOutput) SetApp(v *App) *GetAppOutput {
  2969. s.App = v
  2970. return s
  2971. }
  2972. // Result structure for get branch request.
  2973. type GetBranchInput struct {
  2974. _ struct{} `type:"structure"`
  2975. // Unique Id for an Amplify App.
  2976. //
  2977. // AppId is a required field
  2978. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  2979. // Name for the branch.
  2980. //
  2981. // BranchName is a required field
  2982. BranchName *string `location:"uri" locationName:"branchName" min:"1" type:"string" required:"true"`
  2983. }
  2984. // String returns the string representation
  2985. func (s GetBranchInput) String() string {
  2986. return awsutil.Prettify(s)
  2987. }
  2988. // GoString returns the string representation
  2989. func (s GetBranchInput) GoString() string {
  2990. return s.String()
  2991. }
  2992. // Validate inspects the fields of the type to determine if they are valid.
  2993. func (s *GetBranchInput) Validate() error {
  2994. invalidParams := request.ErrInvalidParams{Context: "GetBranchInput"}
  2995. if s.AppId == nil {
  2996. invalidParams.Add(request.NewErrParamRequired("AppId"))
  2997. }
  2998. if s.AppId != nil && len(*s.AppId) < 1 {
  2999. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  3000. }
  3001. if s.BranchName == nil {
  3002. invalidParams.Add(request.NewErrParamRequired("BranchName"))
  3003. }
  3004. if s.BranchName != nil && len(*s.BranchName) < 1 {
  3005. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  3006. }
  3007. if invalidParams.Len() > 0 {
  3008. return invalidParams
  3009. }
  3010. return nil
  3011. }
  3012. // SetAppId sets the AppId field's value.
  3013. func (s *GetBranchInput) SetAppId(v string) *GetBranchInput {
  3014. s.AppId = &v
  3015. return s
  3016. }
  3017. // SetBranchName sets the BranchName field's value.
  3018. func (s *GetBranchInput) SetBranchName(v string) *GetBranchInput {
  3019. s.BranchName = &v
  3020. return s
  3021. }
  3022. type GetBranchOutput struct {
  3023. _ struct{} `type:"structure"`
  3024. // Branch for an Amplify App, which maps to a 3rd party repository branch.
  3025. //
  3026. // Branch is a required field
  3027. Branch *Branch `locationName:"branch" type:"structure" required:"true"`
  3028. }
  3029. // String returns the string representation
  3030. func (s GetBranchOutput) String() string {
  3031. return awsutil.Prettify(s)
  3032. }
  3033. // GoString returns the string representation
  3034. func (s GetBranchOutput) GoString() string {
  3035. return s.String()
  3036. }
  3037. // SetBranch sets the Branch field's value.
  3038. func (s *GetBranchOutput) SetBranch(v *Branch) *GetBranchOutput {
  3039. s.Branch = v
  3040. return s
  3041. }
  3042. // Request structure for the get Domain Association request.
  3043. type GetDomainAssociationInput struct {
  3044. _ struct{} `type:"structure"`
  3045. // Unique Id for an Amplify App.
  3046. //
  3047. // AppId is a required field
  3048. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  3049. // Name of the domain.
  3050. //
  3051. // DomainName is a required field
  3052. DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"`
  3053. }
  3054. // String returns the string representation
  3055. func (s GetDomainAssociationInput) String() string {
  3056. return awsutil.Prettify(s)
  3057. }
  3058. // GoString returns the string representation
  3059. func (s GetDomainAssociationInput) GoString() string {
  3060. return s.String()
  3061. }
  3062. // Validate inspects the fields of the type to determine if they are valid.
  3063. func (s *GetDomainAssociationInput) Validate() error {
  3064. invalidParams := request.ErrInvalidParams{Context: "GetDomainAssociationInput"}
  3065. if s.AppId == nil {
  3066. invalidParams.Add(request.NewErrParamRequired("AppId"))
  3067. }
  3068. if s.AppId != nil && len(*s.AppId) < 1 {
  3069. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  3070. }
  3071. if s.DomainName == nil {
  3072. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  3073. }
  3074. if s.DomainName != nil && len(*s.DomainName) < 1 {
  3075. invalidParams.Add(request.NewErrParamMinLen("DomainName", 1))
  3076. }
  3077. if invalidParams.Len() > 0 {
  3078. return invalidParams
  3079. }
  3080. return nil
  3081. }
  3082. // SetAppId sets the AppId field's value.
  3083. func (s *GetDomainAssociationInput) SetAppId(v string) *GetDomainAssociationInput {
  3084. s.AppId = &v
  3085. return s
  3086. }
  3087. // SetDomainName sets the DomainName field's value.
  3088. func (s *GetDomainAssociationInput) SetDomainName(v string) *GetDomainAssociationInput {
  3089. s.DomainName = &v
  3090. return s
  3091. }
  3092. // Result structure for the get Domain Association request.
  3093. type GetDomainAssociationOutput struct {
  3094. _ struct{} `type:"structure"`
  3095. // Domain Association structure.
  3096. //
  3097. // DomainAssociation is a required field
  3098. DomainAssociation *DomainAssociation `locationName:"domainAssociation" type:"structure" required:"true"`
  3099. }
  3100. // String returns the string representation
  3101. func (s GetDomainAssociationOutput) String() string {
  3102. return awsutil.Prettify(s)
  3103. }
  3104. // GoString returns the string representation
  3105. func (s GetDomainAssociationOutput) GoString() string {
  3106. return s.String()
  3107. }
  3108. // SetDomainAssociation sets the DomainAssociation field's value.
  3109. func (s *GetDomainAssociationOutput) SetDomainAssociation(v *DomainAssociation) *GetDomainAssociationOutput {
  3110. s.DomainAssociation = v
  3111. return s
  3112. }
  3113. // Request structure for get job request.
  3114. type GetJobInput struct {
  3115. _ struct{} `type:"structure"`
  3116. // Unique Id for an Amplify App.
  3117. //
  3118. // AppId is a required field
  3119. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  3120. // Name for the branch, for the Job.
  3121. //
  3122. // BranchName is a required field
  3123. BranchName *string `location:"uri" locationName:"branchName" min:"1" type:"string" required:"true"`
  3124. // Unique Id for the Job.
  3125. //
  3126. // JobId is a required field
  3127. JobId *string `location:"uri" locationName:"jobId" type:"string" required:"true"`
  3128. }
  3129. // String returns the string representation
  3130. func (s GetJobInput) String() string {
  3131. return awsutil.Prettify(s)
  3132. }
  3133. // GoString returns the string representation
  3134. func (s GetJobInput) GoString() string {
  3135. return s.String()
  3136. }
  3137. // Validate inspects the fields of the type to determine if they are valid.
  3138. func (s *GetJobInput) Validate() error {
  3139. invalidParams := request.ErrInvalidParams{Context: "GetJobInput"}
  3140. if s.AppId == nil {
  3141. invalidParams.Add(request.NewErrParamRequired("AppId"))
  3142. }
  3143. if s.AppId != nil && len(*s.AppId) < 1 {
  3144. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  3145. }
  3146. if s.BranchName == nil {
  3147. invalidParams.Add(request.NewErrParamRequired("BranchName"))
  3148. }
  3149. if s.BranchName != nil && len(*s.BranchName) < 1 {
  3150. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  3151. }
  3152. if s.JobId == nil {
  3153. invalidParams.Add(request.NewErrParamRequired("JobId"))
  3154. }
  3155. if s.JobId != nil && len(*s.JobId) < 1 {
  3156. invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
  3157. }
  3158. if invalidParams.Len() > 0 {
  3159. return invalidParams
  3160. }
  3161. return nil
  3162. }
  3163. // SetAppId sets the AppId field's value.
  3164. func (s *GetJobInput) SetAppId(v string) *GetJobInput {
  3165. s.AppId = &v
  3166. return s
  3167. }
  3168. // SetBranchName sets the BranchName field's value.
  3169. func (s *GetJobInput) SetBranchName(v string) *GetJobInput {
  3170. s.BranchName = &v
  3171. return s
  3172. }
  3173. // SetJobId sets the JobId field's value.
  3174. func (s *GetJobInput) SetJobId(v string) *GetJobInput {
  3175. s.JobId = &v
  3176. return s
  3177. }
  3178. type GetJobOutput struct {
  3179. _ struct{} `type:"structure"`
  3180. // Structure for an execution job for an Amplify App.
  3181. //
  3182. // Job is a required field
  3183. Job *Job `locationName:"job" type:"structure" required:"true"`
  3184. }
  3185. // String returns the string representation
  3186. func (s GetJobOutput) String() string {
  3187. return awsutil.Prettify(s)
  3188. }
  3189. // GoString returns the string representation
  3190. func (s GetJobOutput) GoString() string {
  3191. return s.String()
  3192. }
  3193. // SetJob sets the Job field's value.
  3194. func (s *GetJobOutput) SetJob(v *Job) *GetJobOutput {
  3195. s.Job = v
  3196. return s
  3197. }
  3198. // Structure for an execution job for an Amplify App.
  3199. type Job struct {
  3200. _ struct{} `type:"structure"`
  3201. // Execution steps for an execution job, for an Amplify App.
  3202. //
  3203. // Steps is a required field
  3204. Steps []*Step `locationName:"steps" type:"list" required:"true"`
  3205. // Summary for an execution job for an Amplify App.
  3206. //
  3207. // Summary is a required field
  3208. Summary *JobSummary `locationName:"summary" type:"structure" required:"true"`
  3209. }
  3210. // String returns the string representation
  3211. func (s Job) String() string {
  3212. return awsutil.Prettify(s)
  3213. }
  3214. // GoString returns the string representation
  3215. func (s Job) GoString() string {
  3216. return s.String()
  3217. }
  3218. // SetSteps sets the Steps field's value.
  3219. func (s *Job) SetSteps(v []*Step) *Job {
  3220. s.Steps = v
  3221. return s
  3222. }
  3223. // SetSummary sets the Summary field's value.
  3224. func (s *Job) SetSummary(v *JobSummary) *Job {
  3225. s.Summary = v
  3226. return s
  3227. }
  3228. // Structure for the summary of a Job.
  3229. type JobSummary struct {
  3230. _ struct{} `type:"structure"`
  3231. // Commit Id from 3rd party repository provider for the Job.
  3232. //
  3233. // CommitId is a required field
  3234. CommitId *string `locationName:"commitId" type:"string" required:"true"`
  3235. // Commit message from 3rd party repository provider for the Job.
  3236. //
  3237. // CommitMessage is a required field
  3238. CommitMessage *string `locationName:"commitMessage" type:"string" required:"true"`
  3239. // Commit date / time for the Job.
  3240. //
  3241. // CommitTime is a required field
  3242. CommitTime *time.Time `locationName:"commitTime" type:"timestamp" required:"true"`
  3243. // End date / time for the Job.
  3244. EndTime *time.Time `locationName:"endTime" type:"timestamp"`
  3245. // Arn for the Job.
  3246. //
  3247. // JobArn is a required field
  3248. JobArn *string `locationName:"jobArn" type:"string" required:"true"`
  3249. // Unique Id for the Job.
  3250. //
  3251. // JobId is a required field
  3252. JobId *string `locationName:"jobId" type:"string" required:"true"`
  3253. // Type for the Job.
  3254. //
  3255. // JobType is a required field
  3256. JobType *string `locationName:"jobType" type:"string" required:"true" enum:"JobType"`
  3257. // Start date / time for the Job.
  3258. //
  3259. // StartTime is a required field
  3260. StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"`
  3261. // Status for the Job.
  3262. //
  3263. // Status is a required field
  3264. Status *string `locationName:"status" type:"string" required:"true" enum:"JobStatus"`
  3265. }
  3266. // String returns the string representation
  3267. func (s JobSummary) String() string {
  3268. return awsutil.Prettify(s)
  3269. }
  3270. // GoString returns the string representation
  3271. func (s JobSummary) GoString() string {
  3272. return s.String()
  3273. }
  3274. // SetCommitId sets the CommitId field's value.
  3275. func (s *JobSummary) SetCommitId(v string) *JobSummary {
  3276. s.CommitId = &v
  3277. return s
  3278. }
  3279. // SetCommitMessage sets the CommitMessage field's value.
  3280. func (s *JobSummary) SetCommitMessage(v string) *JobSummary {
  3281. s.CommitMessage = &v
  3282. return s
  3283. }
  3284. // SetCommitTime sets the CommitTime field's value.
  3285. func (s *JobSummary) SetCommitTime(v time.Time) *JobSummary {
  3286. s.CommitTime = &v
  3287. return s
  3288. }
  3289. // SetEndTime sets the EndTime field's value.
  3290. func (s *JobSummary) SetEndTime(v time.Time) *JobSummary {
  3291. s.EndTime = &v
  3292. return s
  3293. }
  3294. // SetJobArn sets the JobArn field's value.
  3295. func (s *JobSummary) SetJobArn(v string) *JobSummary {
  3296. s.JobArn = &v
  3297. return s
  3298. }
  3299. // SetJobId sets the JobId field's value.
  3300. func (s *JobSummary) SetJobId(v string) *JobSummary {
  3301. s.JobId = &v
  3302. return s
  3303. }
  3304. // SetJobType sets the JobType field's value.
  3305. func (s *JobSummary) SetJobType(v string) *JobSummary {
  3306. s.JobType = &v
  3307. return s
  3308. }
  3309. // SetStartTime sets the StartTime field's value.
  3310. func (s *JobSummary) SetStartTime(v time.Time) *JobSummary {
  3311. s.StartTime = &v
  3312. return s
  3313. }
  3314. // SetStatus sets the Status field's value.
  3315. func (s *JobSummary) SetStatus(v string) *JobSummary {
  3316. s.Status = &v
  3317. return s
  3318. }
  3319. // Request structure for an Amplify App list request.
  3320. type ListAppsInput struct {
  3321. _ struct{} `type:"structure"`
  3322. // Maximum number of records to list in a single response.
  3323. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  3324. // Pagination token. If non-null pagination token is returned in a result, then
  3325. // pass its value in another request to fetch more entries.
  3326. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  3327. }
  3328. // String returns the string representation
  3329. func (s ListAppsInput) String() string {
  3330. return awsutil.Prettify(s)
  3331. }
  3332. // GoString returns the string representation
  3333. func (s ListAppsInput) GoString() string {
  3334. return s.String()
  3335. }
  3336. // Validate inspects the fields of the type to determine if they are valid.
  3337. func (s *ListAppsInput) Validate() error {
  3338. invalidParams := request.ErrInvalidParams{Context: "ListAppsInput"}
  3339. if s.MaxResults != nil && *s.MaxResults < 1 {
  3340. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3341. }
  3342. if invalidParams.Len() > 0 {
  3343. return invalidParams
  3344. }
  3345. return nil
  3346. }
  3347. // SetMaxResults sets the MaxResults field's value.
  3348. func (s *ListAppsInput) SetMaxResults(v int64) *ListAppsInput {
  3349. s.MaxResults = &v
  3350. return s
  3351. }
  3352. // SetNextToken sets the NextToken field's value.
  3353. func (s *ListAppsInput) SetNextToken(v string) *ListAppsInput {
  3354. s.NextToken = &v
  3355. return s
  3356. }
  3357. // Result structure for an Amplify App list request.
  3358. type ListAppsOutput struct {
  3359. _ struct{} `type:"structure"`
  3360. // List of Amplify Apps.
  3361. //
  3362. // Apps is a required field
  3363. Apps []*App `locationName:"apps" type:"list" required:"true"`
  3364. // Pagination token. Set to null to start listing Apps from start. If non-null
  3365. // pagination token is returned in a result, then pass its value in here to
  3366. // list more projects.
  3367. NextToken *string `locationName:"nextToken" type:"string"`
  3368. }
  3369. // String returns the string representation
  3370. func (s ListAppsOutput) String() string {
  3371. return awsutil.Prettify(s)
  3372. }
  3373. // GoString returns the string representation
  3374. func (s ListAppsOutput) GoString() string {
  3375. return s.String()
  3376. }
  3377. // SetApps sets the Apps field's value.
  3378. func (s *ListAppsOutput) SetApps(v []*App) *ListAppsOutput {
  3379. s.Apps = v
  3380. return s
  3381. }
  3382. // SetNextToken sets the NextToken field's value.
  3383. func (s *ListAppsOutput) SetNextToken(v string) *ListAppsOutput {
  3384. s.NextToken = &v
  3385. return s
  3386. }
  3387. // Request structure for list branches request.
  3388. type ListBranchesInput struct {
  3389. _ struct{} `type:"structure"`
  3390. // Unique Id for an Amplify App.
  3391. //
  3392. // AppId is a required field
  3393. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  3394. // Maximum number of records to list in a single response.
  3395. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  3396. // Pagination token. Set to null to start listing branches from start. If a
  3397. // non-null pagination token is returned in a result, then pass its value in
  3398. // here to list more branches.
  3399. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  3400. }
  3401. // String returns the string representation
  3402. func (s ListBranchesInput) String() string {
  3403. return awsutil.Prettify(s)
  3404. }
  3405. // GoString returns the string representation
  3406. func (s ListBranchesInput) GoString() string {
  3407. return s.String()
  3408. }
  3409. // Validate inspects the fields of the type to determine if they are valid.
  3410. func (s *ListBranchesInput) Validate() error {
  3411. invalidParams := request.ErrInvalidParams{Context: "ListBranchesInput"}
  3412. if s.AppId == nil {
  3413. invalidParams.Add(request.NewErrParamRequired("AppId"))
  3414. }
  3415. if s.AppId != nil && len(*s.AppId) < 1 {
  3416. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  3417. }
  3418. if s.MaxResults != nil && *s.MaxResults < 1 {
  3419. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3420. }
  3421. if invalidParams.Len() > 0 {
  3422. return invalidParams
  3423. }
  3424. return nil
  3425. }
  3426. // SetAppId sets the AppId field's value.
  3427. func (s *ListBranchesInput) SetAppId(v string) *ListBranchesInput {
  3428. s.AppId = &v
  3429. return s
  3430. }
  3431. // SetMaxResults sets the MaxResults field's value.
  3432. func (s *ListBranchesInput) SetMaxResults(v int64) *ListBranchesInput {
  3433. s.MaxResults = &v
  3434. return s
  3435. }
  3436. // SetNextToken sets the NextToken field's value.
  3437. func (s *ListBranchesInput) SetNextToken(v string) *ListBranchesInput {
  3438. s.NextToken = &v
  3439. return s
  3440. }
  3441. // Result structure for list branches request.
  3442. type ListBranchesOutput struct {
  3443. _ struct{} `type:"structure"`
  3444. // List of branches for an Amplify App.
  3445. //
  3446. // Branches is a required field
  3447. Branches []*Branch `locationName:"branches" type:"list" required:"true"`
  3448. // Pagination token. If non-null pagination token is returned in a result, then
  3449. // pass its value in another request to fetch more entries.
  3450. NextToken *string `locationName:"nextToken" type:"string"`
  3451. }
  3452. // String returns the string representation
  3453. func (s ListBranchesOutput) String() string {
  3454. return awsutil.Prettify(s)
  3455. }
  3456. // GoString returns the string representation
  3457. func (s ListBranchesOutput) GoString() string {
  3458. return s.String()
  3459. }
  3460. // SetBranches sets the Branches field's value.
  3461. func (s *ListBranchesOutput) SetBranches(v []*Branch) *ListBranchesOutput {
  3462. s.Branches = v
  3463. return s
  3464. }
  3465. // SetNextToken sets the NextToken field's value.
  3466. func (s *ListBranchesOutput) SetNextToken(v string) *ListBranchesOutput {
  3467. s.NextToken = &v
  3468. return s
  3469. }
  3470. // Request structure for the list Domain Associations request.
  3471. type ListDomainAssociationsInput struct {
  3472. _ struct{} `type:"structure"`
  3473. // Unique Id for an Amplify App.
  3474. //
  3475. // AppId is a required field
  3476. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  3477. // Maximum number of records to list in a single response.
  3478. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  3479. // Pagination token. Set to null to start listing Apps from start. If non-null
  3480. // pagination token is returned in a result, then pass its value in here to
  3481. // list more projects.
  3482. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  3483. }
  3484. // String returns the string representation
  3485. func (s ListDomainAssociationsInput) String() string {
  3486. return awsutil.Prettify(s)
  3487. }
  3488. // GoString returns the string representation
  3489. func (s ListDomainAssociationsInput) GoString() string {
  3490. return s.String()
  3491. }
  3492. // Validate inspects the fields of the type to determine if they are valid.
  3493. func (s *ListDomainAssociationsInput) Validate() error {
  3494. invalidParams := request.ErrInvalidParams{Context: "ListDomainAssociationsInput"}
  3495. if s.AppId == nil {
  3496. invalidParams.Add(request.NewErrParamRequired("AppId"))
  3497. }
  3498. if s.AppId != nil && len(*s.AppId) < 1 {
  3499. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  3500. }
  3501. if s.MaxResults != nil && *s.MaxResults < 1 {
  3502. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3503. }
  3504. if invalidParams.Len() > 0 {
  3505. return invalidParams
  3506. }
  3507. return nil
  3508. }
  3509. // SetAppId sets the AppId field's value.
  3510. func (s *ListDomainAssociationsInput) SetAppId(v string) *ListDomainAssociationsInput {
  3511. s.AppId = &v
  3512. return s
  3513. }
  3514. // SetMaxResults sets the MaxResults field's value.
  3515. func (s *ListDomainAssociationsInput) SetMaxResults(v int64) *ListDomainAssociationsInput {
  3516. s.MaxResults = &v
  3517. return s
  3518. }
  3519. // SetNextToken sets the NextToken field's value.
  3520. func (s *ListDomainAssociationsInput) SetNextToken(v string) *ListDomainAssociationsInput {
  3521. s.NextToken = &v
  3522. return s
  3523. }
  3524. // Result structure for the list Domain Association request.
  3525. type ListDomainAssociationsOutput struct {
  3526. _ struct{} `type:"structure"`
  3527. // List of Domain Associations.
  3528. //
  3529. // DomainAssociations is a required field
  3530. DomainAssociations []*DomainAssociation `locationName:"domainAssociations" type:"list" required:"true"`
  3531. // Pagination token. If non-null pagination token is returned in a result, then
  3532. // pass its value in another request to fetch more entries.
  3533. NextToken *string `locationName:"nextToken" type:"string"`
  3534. }
  3535. // String returns the string representation
  3536. func (s ListDomainAssociationsOutput) String() string {
  3537. return awsutil.Prettify(s)
  3538. }
  3539. // GoString returns the string representation
  3540. func (s ListDomainAssociationsOutput) GoString() string {
  3541. return s.String()
  3542. }
  3543. // SetDomainAssociations sets the DomainAssociations field's value.
  3544. func (s *ListDomainAssociationsOutput) SetDomainAssociations(v []*DomainAssociation) *ListDomainAssociationsOutput {
  3545. s.DomainAssociations = v
  3546. return s
  3547. }
  3548. // SetNextToken sets the NextToken field's value.
  3549. func (s *ListDomainAssociationsOutput) SetNextToken(v string) *ListDomainAssociationsOutput {
  3550. s.NextToken = &v
  3551. return s
  3552. }
  3553. // Request structure for list job request.
  3554. type ListJobsInput struct {
  3555. _ struct{} `type:"structure"`
  3556. // Unique Id for an Amplify App.
  3557. //
  3558. // AppId is a required field
  3559. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  3560. // Name for a branch.
  3561. //
  3562. // BranchName is a required field
  3563. BranchName *string `location:"uri" locationName:"branchName" min:"1" type:"string" required:"true"`
  3564. // Maximum number of records to list in a single response.
  3565. MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"`
  3566. // Pagination token. Set to null to start listing steps from start. If a non-null
  3567. // pagination token is returned in a result, then pass its value in here to
  3568. // list more steps.
  3569. NextToken *string `location:"querystring" locationName:"nextToken" type:"string"`
  3570. }
  3571. // String returns the string representation
  3572. func (s ListJobsInput) String() string {
  3573. return awsutil.Prettify(s)
  3574. }
  3575. // GoString returns the string representation
  3576. func (s ListJobsInput) GoString() string {
  3577. return s.String()
  3578. }
  3579. // Validate inspects the fields of the type to determine if they are valid.
  3580. func (s *ListJobsInput) Validate() error {
  3581. invalidParams := request.ErrInvalidParams{Context: "ListJobsInput"}
  3582. if s.AppId == nil {
  3583. invalidParams.Add(request.NewErrParamRequired("AppId"))
  3584. }
  3585. if s.AppId != nil && len(*s.AppId) < 1 {
  3586. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  3587. }
  3588. if s.BranchName == nil {
  3589. invalidParams.Add(request.NewErrParamRequired("BranchName"))
  3590. }
  3591. if s.BranchName != nil && len(*s.BranchName) < 1 {
  3592. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  3593. }
  3594. if s.MaxResults != nil && *s.MaxResults < 1 {
  3595. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3596. }
  3597. if invalidParams.Len() > 0 {
  3598. return invalidParams
  3599. }
  3600. return nil
  3601. }
  3602. // SetAppId sets the AppId field's value.
  3603. func (s *ListJobsInput) SetAppId(v string) *ListJobsInput {
  3604. s.AppId = &v
  3605. return s
  3606. }
  3607. // SetBranchName sets the BranchName field's value.
  3608. func (s *ListJobsInput) SetBranchName(v string) *ListJobsInput {
  3609. s.BranchName = &v
  3610. return s
  3611. }
  3612. // SetMaxResults sets the MaxResults field's value.
  3613. func (s *ListJobsInput) SetMaxResults(v int64) *ListJobsInput {
  3614. s.MaxResults = &v
  3615. return s
  3616. }
  3617. // SetNextToken sets the NextToken field's value.
  3618. func (s *ListJobsInput) SetNextToken(v string) *ListJobsInput {
  3619. s.NextToken = &v
  3620. return s
  3621. }
  3622. // Maximum number of records to list in a single response.
  3623. type ListJobsOutput struct {
  3624. _ struct{} `type:"structure"`
  3625. // Result structure for list job result request.
  3626. //
  3627. // JobSummaries is a required field
  3628. JobSummaries []*JobSummary `locationName:"jobSummaries" type:"list" required:"true"`
  3629. // Pagination token. If non-null pagination token is returned in a result, then
  3630. // pass its value in another request to fetch more entries.
  3631. NextToken *string `locationName:"nextToken" type:"string"`
  3632. }
  3633. // String returns the string representation
  3634. func (s ListJobsOutput) String() string {
  3635. return awsutil.Prettify(s)
  3636. }
  3637. // GoString returns the string representation
  3638. func (s ListJobsOutput) GoString() string {
  3639. return s.String()
  3640. }
  3641. // SetJobSummaries sets the JobSummaries field's value.
  3642. func (s *ListJobsOutput) SetJobSummaries(v []*JobSummary) *ListJobsOutput {
  3643. s.JobSummaries = v
  3644. return s
  3645. }
  3646. // SetNextToken sets the NextToken field's value.
  3647. func (s *ListJobsOutput) SetNextToken(v string) *ListJobsOutput {
  3648. s.NextToken = &v
  3649. return s
  3650. }
  3651. // Structure with Production Branch information.
  3652. type ProductionBranch struct {
  3653. _ struct{} `type:"structure"`
  3654. // Branch Name for Production Branch.
  3655. BranchName *string `locationName:"branchName" min:"1" type:"string"`
  3656. // Last Deploy Time of Production Branch.
  3657. LastDeployTime *time.Time `locationName:"lastDeployTime" type:"timestamp"`
  3658. // Status of Production Branch.
  3659. Status *string `locationName:"status" min:"3" type:"string"`
  3660. // Thumbnail Url for Production Branch.
  3661. ThumbnailUrl *string `locationName:"thumbnailUrl" min:"1" type:"string"`
  3662. }
  3663. // String returns the string representation
  3664. func (s ProductionBranch) String() string {
  3665. return awsutil.Prettify(s)
  3666. }
  3667. // GoString returns the string representation
  3668. func (s ProductionBranch) GoString() string {
  3669. return s.String()
  3670. }
  3671. // SetBranchName sets the BranchName field's value.
  3672. func (s *ProductionBranch) SetBranchName(v string) *ProductionBranch {
  3673. s.BranchName = &v
  3674. return s
  3675. }
  3676. // SetLastDeployTime sets the LastDeployTime field's value.
  3677. func (s *ProductionBranch) SetLastDeployTime(v time.Time) *ProductionBranch {
  3678. s.LastDeployTime = &v
  3679. return s
  3680. }
  3681. // SetStatus sets the Status field's value.
  3682. func (s *ProductionBranch) SetStatus(v string) *ProductionBranch {
  3683. s.Status = &v
  3684. return s
  3685. }
  3686. // SetThumbnailUrl sets the ThumbnailUrl field's value.
  3687. func (s *ProductionBranch) SetThumbnailUrl(v string) *ProductionBranch {
  3688. s.ThumbnailUrl = &v
  3689. return s
  3690. }
  3691. // Request structure for Start job request.
  3692. type StartJobInput struct {
  3693. _ struct{} `type:"structure"`
  3694. // Unique Id for an Amplify App.
  3695. //
  3696. // AppId is a required field
  3697. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  3698. // Name for the branch, for the Job.
  3699. //
  3700. // BranchName is a required field
  3701. BranchName *string `location:"uri" locationName:"branchName" min:"1" type:"string" required:"true"`
  3702. // Commit Id from 3rd party repository provider for the Job.
  3703. CommitId *string `locationName:"commitId" type:"string"`
  3704. // Commit message from 3rd party repository provider for the Job.
  3705. CommitMessage *string `locationName:"commitMessage" type:"string"`
  3706. // Commit date / time for the Job.
  3707. CommitTime *time.Time `locationName:"commitTime" type:"timestamp"`
  3708. // Unique Id for the Job.
  3709. JobId *string `locationName:"jobId" type:"string"`
  3710. // Reason for the Job.
  3711. JobReason *string `locationName:"jobReason" type:"string"`
  3712. // Type for the Job.
  3713. //
  3714. // JobType is a required field
  3715. JobType *string `locationName:"jobType" type:"string" required:"true" enum:"JobType"`
  3716. }
  3717. // String returns the string representation
  3718. func (s StartJobInput) String() string {
  3719. return awsutil.Prettify(s)
  3720. }
  3721. // GoString returns the string representation
  3722. func (s StartJobInput) GoString() string {
  3723. return s.String()
  3724. }
  3725. // Validate inspects the fields of the type to determine if they are valid.
  3726. func (s *StartJobInput) Validate() error {
  3727. invalidParams := request.ErrInvalidParams{Context: "StartJobInput"}
  3728. if s.AppId == nil {
  3729. invalidParams.Add(request.NewErrParamRequired("AppId"))
  3730. }
  3731. if s.AppId != nil && len(*s.AppId) < 1 {
  3732. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  3733. }
  3734. if s.BranchName == nil {
  3735. invalidParams.Add(request.NewErrParamRequired("BranchName"))
  3736. }
  3737. if s.BranchName != nil && len(*s.BranchName) < 1 {
  3738. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  3739. }
  3740. if s.JobType == nil {
  3741. invalidParams.Add(request.NewErrParamRequired("JobType"))
  3742. }
  3743. if invalidParams.Len() > 0 {
  3744. return invalidParams
  3745. }
  3746. return nil
  3747. }
  3748. // SetAppId sets the AppId field's value.
  3749. func (s *StartJobInput) SetAppId(v string) *StartJobInput {
  3750. s.AppId = &v
  3751. return s
  3752. }
  3753. // SetBranchName sets the BranchName field's value.
  3754. func (s *StartJobInput) SetBranchName(v string) *StartJobInput {
  3755. s.BranchName = &v
  3756. return s
  3757. }
  3758. // SetCommitId sets the CommitId field's value.
  3759. func (s *StartJobInput) SetCommitId(v string) *StartJobInput {
  3760. s.CommitId = &v
  3761. return s
  3762. }
  3763. // SetCommitMessage sets the CommitMessage field's value.
  3764. func (s *StartJobInput) SetCommitMessage(v string) *StartJobInput {
  3765. s.CommitMessage = &v
  3766. return s
  3767. }
  3768. // SetCommitTime sets the CommitTime field's value.
  3769. func (s *StartJobInput) SetCommitTime(v time.Time) *StartJobInput {
  3770. s.CommitTime = &v
  3771. return s
  3772. }
  3773. // SetJobId sets the JobId field's value.
  3774. func (s *StartJobInput) SetJobId(v string) *StartJobInput {
  3775. s.JobId = &v
  3776. return s
  3777. }
  3778. // SetJobReason sets the JobReason field's value.
  3779. func (s *StartJobInput) SetJobReason(v string) *StartJobInput {
  3780. s.JobReason = &v
  3781. return s
  3782. }
  3783. // SetJobType sets the JobType field's value.
  3784. func (s *StartJobInput) SetJobType(v string) *StartJobInput {
  3785. s.JobType = &v
  3786. return s
  3787. }
  3788. // Result structure for run job request.
  3789. type StartJobOutput struct {
  3790. _ struct{} `type:"structure"`
  3791. // Summary for the Job.
  3792. //
  3793. // JobSummary is a required field
  3794. JobSummary *JobSummary `locationName:"jobSummary" type:"structure" required:"true"`
  3795. }
  3796. // String returns the string representation
  3797. func (s StartJobOutput) String() string {
  3798. return awsutil.Prettify(s)
  3799. }
  3800. // GoString returns the string representation
  3801. func (s StartJobOutput) GoString() string {
  3802. return s.String()
  3803. }
  3804. // SetJobSummary sets the JobSummary field's value.
  3805. func (s *StartJobOutput) SetJobSummary(v *JobSummary) *StartJobOutput {
  3806. s.JobSummary = v
  3807. return s
  3808. }
  3809. // Structure for an execution step for an execution job, for an Amplify App.
  3810. type Step struct {
  3811. _ struct{} `type:"structure"`
  3812. // Url to teh artifact for the execution step.
  3813. ArtifactsUrl *string `locationName:"artifactsUrl" type:"string"`
  3814. // End date/ time of the execution step.
  3815. //
  3816. // EndTime is a required field
  3817. EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"`
  3818. // Url to the logs for the execution step.
  3819. LogUrl *string `locationName:"logUrl" type:"string"`
  3820. // List of screenshot Urls for the execution step, if relevant.
  3821. Screenshots map[string]*string `locationName:"screenshots" type:"map"`
  3822. // Start date/ time of the execution step.
  3823. //
  3824. // StartTime is a required field
  3825. StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"`
  3826. // Status of the execution step.
  3827. //
  3828. // Status is a required field
  3829. Status *string `locationName:"status" type:"string" required:"true" enum:"JobStatus"`
  3830. // Name of the execution step.
  3831. //
  3832. // StepName is a required field
  3833. StepName *string `locationName:"stepName" type:"string" required:"true"`
  3834. }
  3835. // String returns the string representation
  3836. func (s Step) String() string {
  3837. return awsutil.Prettify(s)
  3838. }
  3839. // GoString returns the string representation
  3840. func (s Step) GoString() string {
  3841. return s.String()
  3842. }
  3843. // SetArtifactsUrl sets the ArtifactsUrl field's value.
  3844. func (s *Step) SetArtifactsUrl(v string) *Step {
  3845. s.ArtifactsUrl = &v
  3846. return s
  3847. }
  3848. // SetEndTime sets the EndTime field's value.
  3849. func (s *Step) SetEndTime(v time.Time) *Step {
  3850. s.EndTime = &v
  3851. return s
  3852. }
  3853. // SetLogUrl sets the LogUrl field's value.
  3854. func (s *Step) SetLogUrl(v string) *Step {
  3855. s.LogUrl = &v
  3856. return s
  3857. }
  3858. // SetScreenshots sets the Screenshots field's value.
  3859. func (s *Step) SetScreenshots(v map[string]*string) *Step {
  3860. s.Screenshots = v
  3861. return s
  3862. }
  3863. // SetStartTime sets the StartTime field's value.
  3864. func (s *Step) SetStartTime(v time.Time) *Step {
  3865. s.StartTime = &v
  3866. return s
  3867. }
  3868. // SetStatus sets the Status field's value.
  3869. func (s *Step) SetStatus(v string) *Step {
  3870. s.Status = &v
  3871. return s
  3872. }
  3873. // SetStepName sets the StepName field's value.
  3874. func (s *Step) SetStepName(v string) *Step {
  3875. s.StepName = &v
  3876. return s
  3877. }
  3878. // Request structure for stop job request.
  3879. type StopJobInput struct {
  3880. _ struct{} `type:"structure"`
  3881. // Unique Id for an Amplify App.
  3882. //
  3883. // AppId is a required field
  3884. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  3885. // Name for the branch, for the Job.
  3886. //
  3887. // BranchName is a required field
  3888. BranchName *string `location:"uri" locationName:"branchName" min:"1" type:"string" required:"true"`
  3889. // Unique Id for the Job.
  3890. //
  3891. // JobId is a required field
  3892. JobId *string `location:"uri" locationName:"jobId" type:"string" required:"true"`
  3893. }
  3894. // String returns the string representation
  3895. func (s StopJobInput) String() string {
  3896. return awsutil.Prettify(s)
  3897. }
  3898. // GoString returns the string representation
  3899. func (s StopJobInput) GoString() string {
  3900. return s.String()
  3901. }
  3902. // Validate inspects the fields of the type to determine if they are valid.
  3903. func (s *StopJobInput) Validate() error {
  3904. invalidParams := request.ErrInvalidParams{Context: "StopJobInput"}
  3905. if s.AppId == nil {
  3906. invalidParams.Add(request.NewErrParamRequired("AppId"))
  3907. }
  3908. if s.AppId != nil && len(*s.AppId) < 1 {
  3909. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  3910. }
  3911. if s.BranchName == nil {
  3912. invalidParams.Add(request.NewErrParamRequired("BranchName"))
  3913. }
  3914. if s.BranchName != nil && len(*s.BranchName) < 1 {
  3915. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  3916. }
  3917. if s.JobId == nil {
  3918. invalidParams.Add(request.NewErrParamRequired("JobId"))
  3919. }
  3920. if s.JobId != nil && len(*s.JobId) < 1 {
  3921. invalidParams.Add(request.NewErrParamMinLen("JobId", 1))
  3922. }
  3923. if invalidParams.Len() > 0 {
  3924. return invalidParams
  3925. }
  3926. return nil
  3927. }
  3928. // SetAppId sets the AppId field's value.
  3929. func (s *StopJobInput) SetAppId(v string) *StopJobInput {
  3930. s.AppId = &v
  3931. return s
  3932. }
  3933. // SetBranchName sets the BranchName field's value.
  3934. func (s *StopJobInput) SetBranchName(v string) *StopJobInput {
  3935. s.BranchName = &v
  3936. return s
  3937. }
  3938. // SetJobId sets the JobId field's value.
  3939. func (s *StopJobInput) SetJobId(v string) *StopJobInput {
  3940. s.JobId = &v
  3941. return s
  3942. }
  3943. // Result structure for the stop job request.
  3944. type StopJobOutput struct {
  3945. _ struct{} `type:"structure"`
  3946. // Summary for the Job.
  3947. //
  3948. // JobSummary is a required field
  3949. JobSummary *JobSummary `locationName:"jobSummary" type:"structure" required:"true"`
  3950. }
  3951. // String returns the string representation
  3952. func (s StopJobOutput) String() string {
  3953. return awsutil.Prettify(s)
  3954. }
  3955. // GoString returns the string representation
  3956. func (s StopJobOutput) GoString() string {
  3957. return s.String()
  3958. }
  3959. // SetJobSummary sets the JobSummary field's value.
  3960. func (s *StopJobOutput) SetJobSummary(v *JobSummary) *StopJobOutput {
  3961. s.JobSummary = v
  3962. return s
  3963. }
  3964. // Subdomain for the Domain Association.
  3965. type SubDomain struct {
  3966. _ struct{} `type:"structure"`
  3967. // DNS record for the Subdomain.
  3968. //
  3969. // DnsRecord is a required field
  3970. DnsRecord *string `locationName:"dnsRecord" type:"string" required:"true"`
  3971. // Setting structure for the Subdomain.
  3972. //
  3973. // SubDomainSetting is a required field
  3974. SubDomainSetting *SubDomainSetting `locationName:"subDomainSetting" type:"structure" required:"true"`
  3975. // Verified status of the Subdomain
  3976. //
  3977. // Verified is a required field
  3978. Verified *bool `locationName:"verified" type:"boolean" required:"true"`
  3979. }
  3980. // String returns the string representation
  3981. func (s SubDomain) String() string {
  3982. return awsutil.Prettify(s)
  3983. }
  3984. // GoString returns the string representation
  3985. func (s SubDomain) GoString() string {
  3986. return s.String()
  3987. }
  3988. // SetDnsRecord sets the DnsRecord field's value.
  3989. func (s *SubDomain) SetDnsRecord(v string) *SubDomain {
  3990. s.DnsRecord = &v
  3991. return s
  3992. }
  3993. // SetSubDomainSetting sets the SubDomainSetting field's value.
  3994. func (s *SubDomain) SetSubDomainSetting(v *SubDomainSetting) *SubDomain {
  3995. s.SubDomainSetting = v
  3996. return s
  3997. }
  3998. // SetVerified sets the Verified field's value.
  3999. func (s *SubDomain) SetVerified(v bool) *SubDomain {
  4000. s.Verified = &v
  4001. return s
  4002. }
  4003. // Setting for the Subdomain.
  4004. type SubDomainSetting struct {
  4005. _ struct{} `type:"structure"`
  4006. // Branch name setting for the Subdomain.
  4007. //
  4008. // BranchName is a required field
  4009. BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"`
  4010. // Prefix setting for the Subdomain.
  4011. //
  4012. // Prefix is a required field
  4013. Prefix *string `locationName:"prefix" type:"string" required:"true"`
  4014. }
  4015. // String returns the string representation
  4016. func (s SubDomainSetting) String() string {
  4017. return awsutil.Prettify(s)
  4018. }
  4019. // GoString returns the string representation
  4020. func (s SubDomainSetting) GoString() string {
  4021. return s.String()
  4022. }
  4023. // Validate inspects the fields of the type to determine if they are valid.
  4024. func (s *SubDomainSetting) Validate() error {
  4025. invalidParams := request.ErrInvalidParams{Context: "SubDomainSetting"}
  4026. if s.BranchName == nil {
  4027. invalidParams.Add(request.NewErrParamRequired("BranchName"))
  4028. }
  4029. if s.BranchName != nil && len(*s.BranchName) < 1 {
  4030. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  4031. }
  4032. if s.Prefix == nil {
  4033. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  4034. }
  4035. if invalidParams.Len() > 0 {
  4036. return invalidParams
  4037. }
  4038. return nil
  4039. }
  4040. // SetBranchName sets the BranchName field's value.
  4041. func (s *SubDomainSetting) SetBranchName(v string) *SubDomainSetting {
  4042. s.BranchName = &v
  4043. return s
  4044. }
  4045. // SetPrefix sets the Prefix field's value.
  4046. func (s *SubDomainSetting) SetPrefix(v string) *SubDomainSetting {
  4047. s.Prefix = &v
  4048. return s
  4049. }
  4050. // Request structure for update App request.
  4051. type UpdateAppInput struct {
  4052. _ struct{} `type:"structure"`
  4053. // Unique Id for an Amplify App.
  4054. //
  4055. // AppId is a required field
  4056. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  4057. // Basic Authorization credentials for an Amplify App.
  4058. BasicAuthCredentials *string `locationName:"basicAuthCredentials" type:"string"`
  4059. // BuildSpec for an Amplify App.
  4060. BuildSpec *string `locationName:"buildSpec" min:"1" type:"string"`
  4061. // Custom redirect / rewrite rules for an Amplify App.
  4062. CustomRules []*CustomRule `locationName:"customRules" type:"list"`
  4063. // Description for an Amplify App.
  4064. Description *string `locationName:"description" type:"string"`
  4065. // Enables Basic Authorization for an Amplify App.
  4066. EnableBasicAuth *bool `locationName:"enableBasicAuth" type:"boolean"`
  4067. // Enables branch auto-building for an Amplify App.
  4068. EnableBranchAutoBuild *bool `locationName:"enableBranchAutoBuild" type:"boolean"`
  4069. // Environment Variables for an Amplify App.
  4070. EnvironmentVariables map[string]*string `locationName:"environmentVariables" type:"map"`
  4071. // IAM service role for an Amplify App.
  4072. IamServiceRoleArn *string `locationName:"iamServiceRoleArn" min:"1" type:"string"`
  4073. // Name for an Amplify App.
  4074. Name *string `locationName:"name" min:"1" type:"string"`
  4075. // Platform for an Amplify App.
  4076. Platform *string `locationName:"platform" type:"string" enum:"Platform"`
  4077. }
  4078. // String returns the string representation
  4079. func (s UpdateAppInput) String() string {
  4080. return awsutil.Prettify(s)
  4081. }
  4082. // GoString returns the string representation
  4083. func (s UpdateAppInput) GoString() string {
  4084. return s.String()
  4085. }
  4086. // Validate inspects the fields of the type to determine if they are valid.
  4087. func (s *UpdateAppInput) Validate() error {
  4088. invalidParams := request.ErrInvalidParams{Context: "UpdateAppInput"}
  4089. if s.AppId == nil {
  4090. invalidParams.Add(request.NewErrParamRequired("AppId"))
  4091. }
  4092. if s.AppId != nil && len(*s.AppId) < 1 {
  4093. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  4094. }
  4095. if s.BuildSpec != nil && len(*s.BuildSpec) < 1 {
  4096. invalidParams.Add(request.NewErrParamMinLen("BuildSpec", 1))
  4097. }
  4098. if s.IamServiceRoleArn != nil && len(*s.IamServiceRoleArn) < 1 {
  4099. invalidParams.Add(request.NewErrParamMinLen("IamServiceRoleArn", 1))
  4100. }
  4101. if s.Name != nil && len(*s.Name) < 1 {
  4102. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  4103. }
  4104. if s.CustomRules != nil {
  4105. for i, v := range s.CustomRules {
  4106. if v == nil {
  4107. continue
  4108. }
  4109. if err := v.Validate(); err != nil {
  4110. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CustomRules", i), err.(request.ErrInvalidParams))
  4111. }
  4112. }
  4113. }
  4114. if invalidParams.Len() > 0 {
  4115. return invalidParams
  4116. }
  4117. return nil
  4118. }
  4119. // SetAppId sets the AppId field's value.
  4120. func (s *UpdateAppInput) SetAppId(v string) *UpdateAppInput {
  4121. s.AppId = &v
  4122. return s
  4123. }
  4124. // SetBasicAuthCredentials sets the BasicAuthCredentials field's value.
  4125. func (s *UpdateAppInput) SetBasicAuthCredentials(v string) *UpdateAppInput {
  4126. s.BasicAuthCredentials = &v
  4127. return s
  4128. }
  4129. // SetBuildSpec sets the BuildSpec field's value.
  4130. func (s *UpdateAppInput) SetBuildSpec(v string) *UpdateAppInput {
  4131. s.BuildSpec = &v
  4132. return s
  4133. }
  4134. // SetCustomRules sets the CustomRules field's value.
  4135. func (s *UpdateAppInput) SetCustomRules(v []*CustomRule) *UpdateAppInput {
  4136. s.CustomRules = v
  4137. return s
  4138. }
  4139. // SetDescription sets the Description field's value.
  4140. func (s *UpdateAppInput) SetDescription(v string) *UpdateAppInput {
  4141. s.Description = &v
  4142. return s
  4143. }
  4144. // SetEnableBasicAuth sets the EnableBasicAuth field's value.
  4145. func (s *UpdateAppInput) SetEnableBasicAuth(v bool) *UpdateAppInput {
  4146. s.EnableBasicAuth = &v
  4147. return s
  4148. }
  4149. // SetEnableBranchAutoBuild sets the EnableBranchAutoBuild field's value.
  4150. func (s *UpdateAppInput) SetEnableBranchAutoBuild(v bool) *UpdateAppInput {
  4151. s.EnableBranchAutoBuild = &v
  4152. return s
  4153. }
  4154. // SetEnvironmentVariables sets the EnvironmentVariables field's value.
  4155. func (s *UpdateAppInput) SetEnvironmentVariables(v map[string]*string) *UpdateAppInput {
  4156. s.EnvironmentVariables = v
  4157. return s
  4158. }
  4159. // SetIamServiceRoleArn sets the IamServiceRoleArn field's value.
  4160. func (s *UpdateAppInput) SetIamServiceRoleArn(v string) *UpdateAppInput {
  4161. s.IamServiceRoleArn = &v
  4162. return s
  4163. }
  4164. // SetName sets the Name field's value.
  4165. func (s *UpdateAppInput) SetName(v string) *UpdateAppInput {
  4166. s.Name = &v
  4167. return s
  4168. }
  4169. // SetPlatform sets the Platform field's value.
  4170. func (s *UpdateAppInput) SetPlatform(v string) *UpdateAppInput {
  4171. s.Platform = &v
  4172. return s
  4173. }
  4174. // Result structure for an Amplify App update request.
  4175. type UpdateAppOutput struct {
  4176. _ struct{} `type:"structure"`
  4177. // App structure for the updated App.
  4178. //
  4179. // App is a required field
  4180. App *App `locationName:"app" type:"structure" required:"true"`
  4181. }
  4182. // String returns the string representation
  4183. func (s UpdateAppOutput) String() string {
  4184. return awsutil.Prettify(s)
  4185. }
  4186. // GoString returns the string representation
  4187. func (s UpdateAppOutput) GoString() string {
  4188. return s.String()
  4189. }
  4190. // SetApp sets the App field's value.
  4191. func (s *UpdateAppOutput) SetApp(v *App) *UpdateAppOutput {
  4192. s.App = v
  4193. return s
  4194. }
  4195. // Request structure for update branch request.
  4196. type UpdateBranchInput struct {
  4197. _ struct{} `type:"structure"`
  4198. // Unique Id for an Amplify App.
  4199. //
  4200. // AppId is a required field
  4201. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  4202. // Basic Authorization credentials for the branch.
  4203. BasicAuthCredentials *string `locationName:"basicAuthCredentials" type:"string"`
  4204. // Name for the branch.
  4205. //
  4206. // BranchName is a required field
  4207. BranchName *string `location:"uri" locationName:"branchName" min:"1" type:"string" required:"true"`
  4208. // BuildSpec for the branch.
  4209. BuildSpec *string `locationName:"buildSpec" min:"1" type:"string"`
  4210. // Description for the branch.
  4211. Description *string `locationName:"description" type:"string"`
  4212. // Enables auto building for the branch.
  4213. EnableAutoBuild *bool `locationName:"enableAutoBuild" type:"boolean"`
  4214. // Enables Basic Auth for the branch.
  4215. EnableBasicAuth *bool `locationName:"enableBasicAuth" type:"boolean"`
  4216. // Enables notifications for the branch.
  4217. EnableNotification *bool `locationName:"enableNotification" type:"boolean"`
  4218. // Environment Variables for the branch.
  4219. EnvironmentVariables map[string]*string `locationName:"environmentVariables" type:"map"`
  4220. // Framework for the branch.
  4221. Framework *string `locationName:"framework" type:"string"`
  4222. // Stage for the branch.
  4223. Stage *string `locationName:"stage" type:"string" enum:"Stage"`
  4224. // The content TTL for the website in seconds.
  4225. Ttl *string `locationName:"ttl" type:"string"`
  4226. }
  4227. // String returns the string representation
  4228. func (s UpdateBranchInput) String() string {
  4229. return awsutil.Prettify(s)
  4230. }
  4231. // GoString returns the string representation
  4232. func (s UpdateBranchInput) GoString() string {
  4233. return s.String()
  4234. }
  4235. // Validate inspects the fields of the type to determine if they are valid.
  4236. func (s *UpdateBranchInput) Validate() error {
  4237. invalidParams := request.ErrInvalidParams{Context: "UpdateBranchInput"}
  4238. if s.AppId == nil {
  4239. invalidParams.Add(request.NewErrParamRequired("AppId"))
  4240. }
  4241. if s.AppId != nil && len(*s.AppId) < 1 {
  4242. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  4243. }
  4244. if s.BranchName == nil {
  4245. invalidParams.Add(request.NewErrParamRequired("BranchName"))
  4246. }
  4247. if s.BranchName != nil && len(*s.BranchName) < 1 {
  4248. invalidParams.Add(request.NewErrParamMinLen("BranchName", 1))
  4249. }
  4250. if s.BuildSpec != nil && len(*s.BuildSpec) < 1 {
  4251. invalidParams.Add(request.NewErrParamMinLen("BuildSpec", 1))
  4252. }
  4253. if invalidParams.Len() > 0 {
  4254. return invalidParams
  4255. }
  4256. return nil
  4257. }
  4258. // SetAppId sets the AppId field's value.
  4259. func (s *UpdateBranchInput) SetAppId(v string) *UpdateBranchInput {
  4260. s.AppId = &v
  4261. return s
  4262. }
  4263. // SetBasicAuthCredentials sets the BasicAuthCredentials field's value.
  4264. func (s *UpdateBranchInput) SetBasicAuthCredentials(v string) *UpdateBranchInput {
  4265. s.BasicAuthCredentials = &v
  4266. return s
  4267. }
  4268. // SetBranchName sets the BranchName field's value.
  4269. func (s *UpdateBranchInput) SetBranchName(v string) *UpdateBranchInput {
  4270. s.BranchName = &v
  4271. return s
  4272. }
  4273. // SetBuildSpec sets the BuildSpec field's value.
  4274. func (s *UpdateBranchInput) SetBuildSpec(v string) *UpdateBranchInput {
  4275. s.BuildSpec = &v
  4276. return s
  4277. }
  4278. // SetDescription sets the Description field's value.
  4279. func (s *UpdateBranchInput) SetDescription(v string) *UpdateBranchInput {
  4280. s.Description = &v
  4281. return s
  4282. }
  4283. // SetEnableAutoBuild sets the EnableAutoBuild field's value.
  4284. func (s *UpdateBranchInput) SetEnableAutoBuild(v bool) *UpdateBranchInput {
  4285. s.EnableAutoBuild = &v
  4286. return s
  4287. }
  4288. // SetEnableBasicAuth sets the EnableBasicAuth field's value.
  4289. func (s *UpdateBranchInput) SetEnableBasicAuth(v bool) *UpdateBranchInput {
  4290. s.EnableBasicAuth = &v
  4291. return s
  4292. }
  4293. // SetEnableNotification sets the EnableNotification field's value.
  4294. func (s *UpdateBranchInput) SetEnableNotification(v bool) *UpdateBranchInput {
  4295. s.EnableNotification = &v
  4296. return s
  4297. }
  4298. // SetEnvironmentVariables sets the EnvironmentVariables field's value.
  4299. func (s *UpdateBranchInput) SetEnvironmentVariables(v map[string]*string) *UpdateBranchInput {
  4300. s.EnvironmentVariables = v
  4301. return s
  4302. }
  4303. // SetFramework sets the Framework field's value.
  4304. func (s *UpdateBranchInput) SetFramework(v string) *UpdateBranchInput {
  4305. s.Framework = &v
  4306. return s
  4307. }
  4308. // SetStage sets the Stage field's value.
  4309. func (s *UpdateBranchInput) SetStage(v string) *UpdateBranchInput {
  4310. s.Stage = &v
  4311. return s
  4312. }
  4313. // SetTtl sets the Ttl field's value.
  4314. func (s *UpdateBranchInput) SetTtl(v string) *UpdateBranchInput {
  4315. s.Ttl = &v
  4316. return s
  4317. }
  4318. // Result structure for update branch request.
  4319. type UpdateBranchOutput struct {
  4320. _ struct{} `type:"structure"`
  4321. // Branch structure for an Amplify App.
  4322. //
  4323. // Branch is a required field
  4324. Branch *Branch `locationName:"branch" type:"structure" required:"true"`
  4325. }
  4326. // String returns the string representation
  4327. func (s UpdateBranchOutput) String() string {
  4328. return awsutil.Prettify(s)
  4329. }
  4330. // GoString returns the string representation
  4331. func (s UpdateBranchOutput) GoString() string {
  4332. return s.String()
  4333. }
  4334. // SetBranch sets the Branch field's value.
  4335. func (s *UpdateBranchOutput) SetBranch(v *Branch) *UpdateBranchOutput {
  4336. s.Branch = v
  4337. return s
  4338. }
  4339. // Request structure for update Domain Association request.
  4340. type UpdateDomainAssociationInput struct {
  4341. _ struct{} `type:"structure"`
  4342. // Unique Id for an Amplify App.
  4343. //
  4344. // AppId is a required field
  4345. AppId *string `location:"uri" locationName:"appId" min:"1" type:"string" required:"true"`
  4346. // Name of the domain.
  4347. //
  4348. // DomainName is a required field
  4349. DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"`
  4350. // Enables automated creation of Subdomains for branches.
  4351. EnableAutoSubDomain *bool `locationName:"enableAutoSubDomain" type:"boolean"`
  4352. // Setting structure for the Subdomain.
  4353. //
  4354. // SubDomainSettings is a required field
  4355. SubDomainSettings []*SubDomainSetting `locationName:"subDomainSettings" type:"list" required:"true"`
  4356. }
  4357. // String returns the string representation
  4358. func (s UpdateDomainAssociationInput) String() string {
  4359. return awsutil.Prettify(s)
  4360. }
  4361. // GoString returns the string representation
  4362. func (s UpdateDomainAssociationInput) GoString() string {
  4363. return s.String()
  4364. }
  4365. // Validate inspects the fields of the type to determine if they are valid.
  4366. func (s *UpdateDomainAssociationInput) Validate() error {
  4367. invalidParams := request.ErrInvalidParams{Context: "UpdateDomainAssociationInput"}
  4368. if s.AppId == nil {
  4369. invalidParams.Add(request.NewErrParamRequired("AppId"))
  4370. }
  4371. if s.AppId != nil && len(*s.AppId) < 1 {
  4372. invalidParams.Add(request.NewErrParamMinLen("AppId", 1))
  4373. }
  4374. if s.DomainName == nil {
  4375. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  4376. }
  4377. if s.DomainName != nil && len(*s.DomainName) < 1 {
  4378. invalidParams.Add(request.NewErrParamMinLen("DomainName", 1))
  4379. }
  4380. if s.SubDomainSettings == nil {
  4381. invalidParams.Add(request.NewErrParamRequired("SubDomainSettings"))
  4382. }
  4383. if s.SubDomainSettings != nil {
  4384. for i, v := range s.SubDomainSettings {
  4385. if v == nil {
  4386. continue
  4387. }
  4388. if err := v.Validate(); err != nil {
  4389. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SubDomainSettings", i), err.(request.ErrInvalidParams))
  4390. }
  4391. }
  4392. }
  4393. if invalidParams.Len() > 0 {
  4394. return invalidParams
  4395. }
  4396. return nil
  4397. }
  4398. // SetAppId sets the AppId field's value.
  4399. func (s *UpdateDomainAssociationInput) SetAppId(v string) *UpdateDomainAssociationInput {
  4400. s.AppId = &v
  4401. return s
  4402. }
  4403. // SetDomainName sets the DomainName field's value.
  4404. func (s *UpdateDomainAssociationInput) SetDomainName(v string) *UpdateDomainAssociationInput {
  4405. s.DomainName = &v
  4406. return s
  4407. }
  4408. // SetEnableAutoSubDomain sets the EnableAutoSubDomain field's value.
  4409. func (s *UpdateDomainAssociationInput) SetEnableAutoSubDomain(v bool) *UpdateDomainAssociationInput {
  4410. s.EnableAutoSubDomain = &v
  4411. return s
  4412. }
  4413. // SetSubDomainSettings sets the SubDomainSettings field's value.
  4414. func (s *UpdateDomainAssociationInput) SetSubDomainSettings(v []*SubDomainSetting) *UpdateDomainAssociationInput {
  4415. s.SubDomainSettings = v
  4416. return s
  4417. }
  4418. // Result structure for the update Domain Association request.
  4419. type UpdateDomainAssociationOutput struct {
  4420. _ struct{} `type:"structure"`
  4421. // Domain Association structure.
  4422. //
  4423. // DomainAssociation is a required field
  4424. DomainAssociation *DomainAssociation `locationName:"domainAssociation" type:"structure" required:"true"`
  4425. }
  4426. // String returns the string representation
  4427. func (s UpdateDomainAssociationOutput) String() string {
  4428. return awsutil.Prettify(s)
  4429. }
  4430. // GoString returns the string representation
  4431. func (s UpdateDomainAssociationOutput) GoString() string {
  4432. return s.String()
  4433. }
  4434. // SetDomainAssociation sets the DomainAssociation field's value.
  4435. func (s *UpdateDomainAssociationOutput) SetDomainAssociation(v *DomainAssociation) *UpdateDomainAssociationOutput {
  4436. s.DomainAssociation = v
  4437. return s
  4438. }
  4439. const (
  4440. // DomainStatusPendingVerification is a DomainStatus enum value
  4441. DomainStatusPendingVerification = "PENDING_VERIFICATION"
  4442. // DomainStatusInProgress is a DomainStatus enum value
  4443. DomainStatusInProgress = "IN_PROGRESS"
  4444. // DomainStatusAvailable is a DomainStatus enum value
  4445. DomainStatusAvailable = "AVAILABLE"
  4446. // DomainStatusPendingDeployment is a DomainStatus enum value
  4447. DomainStatusPendingDeployment = "PENDING_DEPLOYMENT"
  4448. // DomainStatusFailed is a DomainStatus enum value
  4449. DomainStatusFailed = "FAILED"
  4450. )
  4451. const (
  4452. // JobStatusPending is a JobStatus enum value
  4453. JobStatusPending = "PENDING"
  4454. // JobStatusProvisioning is a JobStatus enum value
  4455. JobStatusProvisioning = "PROVISIONING"
  4456. // JobStatusRunning is a JobStatus enum value
  4457. JobStatusRunning = "RUNNING"
  4458. // JobStatusFailed is a JobStatus enum value
  4459. JobStatusFailed = "FAILED"
  4460. // JobStatusSucceed is a JobStatus enum value
  4461. JobStatusSucceed = "SUCCEED"
  4462. // JobStatusCancelling is a JobStatus enum value
  4463. JobStatusCancelling = "CANCELLING"
  4464. // JobStatusCancelled is a JobStatus enum value
  4465. JobStatusCancelled = "CANCELLED"
  4466. )
  4467. const (
  4468. // JobTypeRelease is a JobType enum value
  4469. JobTypeRelease = "RELEASE"
  4470. // JobTypeRetry is a JobType enum value
  4471. JobTypeRetry = "RETRY"
  4472. // JobTypeWebHook is a JobType enum value
  4473. JobTypeWebHook = "WEB_HOOK"
  4474. )
  4475. const (
  4476. // PlatformIos is a Platform enum value
  4477. PlatformIos = "IOS"
  4478. // PlatformAndroid is a Platform enum value
  4479. PlatformAndroid = "ANDROID"
  4480. // PlatformWeb is a Platform enum value
  4481. PlatformWeb = "WEB"
  4482. // PlatformReactNative is a Platform enum value
  4483. PlatformReactNative = "REACT_NATIVE"
  4484. )
  4485. const (
  4486. // StageProduction is a Stage enum value
  4487. StageProduction = "PRODUCTION"
  4488. // StageBeta is a Stage enum value
  4489. StageBeta = "BETA"
  4490. // StageDevelopment is a Stage enum value
  4491. StageDevelopment = "DEVELOPMENT"
  4492. // StageExperimental is a Stage enum value
  4493. StageExperimental = "EXPERIMENTAL"
  4494. )