api.go 125 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package globalaccelerator
  3. import (
  4. "fmt"
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws"
  7. "github.com/aws/aws-sdk-go/aws/awsutil"
  8. "github.com/aws/aws-sdk-go/aws/request"
  9. "github.com/aws/aws-sdk-go/private/protocol"
  10. "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
  11. )
  12. const opCreateAccelerator = "CreateAccelerator"
  13. // CreateAcceleratorRequest generates a "aws/request.Request" representing the
  14. // client's request for the CreateAccelerator operation. The "output" return
  15. // value will be populated with the request's response once the request completes
  16. // successfully.
  17. //
  18. // Use "Send" method on the returned Request to send the API call to the service.
  19. // the "output" return value is not valid until after Send returns without error.
  20. //
  21. // See CreateAccelerator for more information on using the CreateAccelerator
  22. // API call, and error handling.
  23. //
  24. // This method is useful when you want to inject custom logic or configuration
  25. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  26. //
  27. //
  28. // // Example sending a request using the CreateAcceleratorRequest method.
  29. // req, resp := client.CreateAcceleratorRequest(params)
  30. //
  31. // err := req.Send()
  32. // if err == nil { // resp is now filled
  33. // fmt.Println(resp)
  34. // }
  35. //
  36. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateAccelerator
  37. func (c *GlobalAccelerator) CreateAcceleratorRequest(input *CreateAcceleratorInput) (req *request.Request, output *CreateAcceleratorOutput) {
  38. op := &request.Operation{
  39. Name: opCreateAccelerator,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &CreateAcceleratorInput{}
  45. }
  46. output = &CreateAcceleratorOutput{}
  47. req = c.newRequest(op, input, output)
  48. return
  49. }
  50. // CreateAccelerator API operation for AWS Global Accelerator.
  51. //
  52. // Create an accelerator. An accelerator includes one or more listeners that
  53. // process inbound connections and direct traffic to one or more endpoint groups,
  54. // each of which includes endpoints, such as Network Load Balancers. To see
  55. // an AWS CLI example of creating an accelerator, scroll down to Example.
  56. //
  57. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  58. // with awserr.Error's Code and Message methods to get detailed information about
  59. // the error.
  60. //
  61. // See the AWS API reference guide for AWS Global Accelerator's
  62. // API operation CreateAccelerator for usage and error information.
  63. //
  64. // Returned Error Codes:
  65. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  66. // There was an internal error for AWS Global Accelerator.
  67. //
  68. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  69. // An argument that you specified is invalid.
  70. //
  71. // * ErrCodeLimitExceededException "LimitExceededException"
  72. // Processing your request would cause you to exceed an AWS Global Accelerator
  73. // limit.
  74. //
  75. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateAccelerator
  76. func (c *GlobalAccelerator) CreateAccelerator(input *CreateAcceleratorInput) (*CreateAcceleratorOutput, error) {
  77. req, out := c.CreateAcceleratorRequest(input)
  78. return out, req.Send()
  79. }
  80. // CreateAcceleratorWithContext is the same as CreateAccelerator with the addition of
  81. // the ability to pass a context and additional request options.
  82. //
  83. // See CreateAccelerator for details on how to use this API operation.
  84. //
  85. // The context must be non-nil and will be used for request cancellation. If
  86. // the context is nil a panic will occur. In the future the SDK may create
  87. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  88. // for more information on using Contexts.
  89. func (c *GlobalAccelerator) CreateAcceleratorWithContext(ctx aws.Context, input *CreateAcceleratorInput, opts ...request.Option) (*CreateAcceleratorOutput, error) {
  90. req, out := c.CreateAcceleratorRequest(input)
  91. req.SetContext(ctx)
  92. req.ApplyOptions(opts...)
  93. return out, req.Send()
  94. }
  95. const opCreateEndpointGroup = "CreateEndpointGroup"
  96. // CreateEndpointGroupRequest generates a "aws/request.Request" representing the
  97. // client's request for the CreateEndpointGroup operation. The "output" return
  98. // value will be populated with the request's response once the request completes
  99. // successfully.
  100. //
  101. // Use "Send" method on the returned Request to send the API call to the service.
  102. // the "output" return value is not valid until after Send returns without error.
  103. //
  104. // See CreateEndpointGroup for more information on using the CreateEndpointGroup
  105. // API call, and error handling.
  106. //
  107. // This method is useful when you want to inject custom logic or configuration
  108. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  109. //
  110. //
  111. // // Example sending a request using the CreateEndpointGroupRequest method.
  112. // req, resp := client.CreateEndpointGroupRequest(params)
  113. //
  114. // err := req.Send()
  115. // if err == nil { // resp is now filled
  116. // fmt.Println(resp)
  117. // }
  118. //
  119. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateEndpointGroup
  120. func (c *GlobalAccelerator) CreateEndpointGroupRequest(input *CreateEndpointGroupInput) (req *request.Request, output *CreateEndpointGroupOutput) {
  121. op := &request.Operation{
  122. Name: opCreateEndpointGroup,
  123. HTTPMethod: "POST",
  124. HTTPPath: "/",
  125. }
  126. if input == nil {
  127. input = &CreateEndpointGroupInput{}
  128. }
  129. output = &CreateEndpointGroupOutput{}
  130. req = c.newRequest(op, input, output)
  131. return
  132. }
  133. // CreateEndpointGroup API operation for AWS Global Accelerator.
  134. //
  135. // Create an endpoint group for the specified listener. An endpoint group is
  136. // a collection of endpoints in one AWS Region. To see an AWS CLI example of
  137. // creating an endpoint group, scroll down to Example.
  138. //
  139. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  140. // with awserr.Error's Code and Message methods to get detailed information about
  141. // the error.
  142. //
  143. // See the AWS API reference guide for AWS Global Accelerator's
  144. // API operation CreateEndpointGroup for usage and error information.
  145. //
  146. // Returned Error Codes:
  147. // * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException"
  148. // The accelerator that you specified doesn't exist.
  149. //
  150. // * ErrCodeEndpointGroupAlreadyExistsException "EndpointGroupAlreadyExistsException"
  151. // The endpoint group that you specified already exists.
  152. //
  153. // * ErrCodeListenerNotFoundException "ListenerNotFoundException"
  154. // The listener that you specified doesn't exist.
  155. //
  156. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  157. // There was an internal error for AWS Global Accelerator.
  158. //
  159. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  160. // An argument that you specified is invalid.
  161. //
  162. // * ErrCodeLimitExceededException "LimitExceededException"
  163. // Processing your request would cause you to exceed an AWS Global Accelerator
  164. // limit.
  165. //
  166. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateEndpointGroup
  167. func (c *GlobalAccelerator) CreateEndpointGroup(input *CreateEndpointGroupInput) (*CreateEndpointGroupOutput, error) {
  168. req, out := c.CreateEndpointGroupRequest(input)
  169. return out, req.Send()
  170. }
  171. // CreateEndpointGroupWithContext is the same as CreateEndpointGroup with the addition of
  172. // the ability to pass a context and additional request options.
  173. //
  174. // See CreateEndpointGroup for details on how to use this API operation.
  175. //
  176. // The context must be non-nil and will be used for request cancellation. If
  177. // the context is nil a panic will occur. In the future the SDK may create
  178. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  179. // for more information on using Contexts.
  180. func (c *GlobalAccelerator) CreateEndpointGroupWithContext(ctx aws.Context, input *CreateEndpointGroupInput, opts ...request.Option) (*CreateEndpointGroupOutput, error) {
  181. req, out := c.CreateEndpointGroupRequest(input)
  182. req.SetContext(ctx)
  183. req.ApplyOptions(opts...)
  184. return out, req.Send()
  185. }
  186. const opCreateListener = "CreateListener"
  187. // CreateListenerRequest generates a "aws/request.Request" representing the
  188. // client's request for the CreateListener operation. The "output" return
  189. // value will be populated with the request's response once the request completes
  190. // successfully.
  191. //
  192. // Use "Send" method on the returned Request to send the API call to the service.
  193. // the "output" return value is not valid until after Send returns without error.
  194. //
  195. // See CreateListener for more information on using the CreateListener
  196. // API call, and error handling.
  197. //
  198. // This method is useful when you want to inject custom logic or configuration
  199. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  200. //
  201. //
  202. // // Example sending a request using the CreateListenerRequest method.
  203. // req, resp := client.CreateListenerRequest(params)
  204. //
  205. // err := req.Send()
  206. // if err == nil { // resp is now filled
  207. // fmt.Println(resp)
  208. // }
  209. //
  210. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateListener
  211. func (c *GlobalAccelerator) CreateListenerRequest(input *CreateListenerInput) (req *request.Request, output *CreateListenerOutput) {
  212. op := &request.Operation{
  213. Name: opCreateListener,
  214. HTTPMethod: "POST",
  215. HTTPPath: "/",
  216. }
  217. if input == nil {
  218. input = &CreateListenerInput{}
  219. }
  220. output = &CreateListenerOutput{}
  221. req = c.newRequest(op, input, output)
  222. return
  223. }
  224. // CreateListener API operation for AWS Global Accelerator.
  225. //
  226. // Create a listener to process inbound connections from clients to an accelerator.
  227. // Connections arrive to assigned static IP addresses on a port, port range,
  228. // or list of port ranges that you specify. To see an AWS CLI example of creating
  229. // a listener, scroll down to Example.
  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 Global Accelerator's
  236. // API operation CreateListener for usage and error information.
  237. //
  238. // Returned Error Codes:
  239. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  240. // An argument that you specified is invalid.
  241. //
  242. // * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException"
  243. // The accelerator that you specified doesn't exist.
  244. //
  245. // * ErrCodeInvalidPortRangeException "InvalidPortRangeException"
  246. // The port numbers that you specified are not valid numbers or are not unique
  247. // for this accelerator.
  248. //
  249. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  250. // There was an internal error for AWS Global Accelerator.
  251. //
  252. // * ErrCodeLimitExceededException "LimitExceededException"
  253. // Processing your request would cause you to exceed an AWS Global Accelerator
  254. // limit.
  255. //
  256. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateListener
  257. func (c *GlobalAccelerator) CreateListener(input *CreateListenerInput) (*CreateListenerOutput, error) {
  258. req, out := c.CreateListenerRequest(input)
  259. return out, req.Send()
  260. }
  261. // CreateListenerWithContext is the same as CreateListener with the addition of
  262. // the ability to pass a context and additional request options.
  263. //
  264. // See CreateListener for details on how to use this API operation.
  265. //
  266. // The context must be non-nil and will be used for request cancellation. If
  267. // the context is nil a panic will occur. In the future the SDK may create
  268. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  269. // for more information on using Contexts.
  270. func (c *GlobalAccelerator) CreateListenerWithContext(ctx aws.Context, input *CreateListenerInput, opts ...request.Option) (*CreateListenerOutput, error) {
  271. req, out := c.CreateListenerRequest(input)
  272. req.SetContext(ctx)
  273. req.ApplyOptions(opts...)
  274. return out, req.Send()
  275. }
  276. const opDeleteAccelerator = "DeleteAccelerator"
  277. // DeleteAcceleratorRequest generates a "aws/request.Request" representing the
  278. // client's request for the DeleteAccelerator operation. The "output" return
  279. // value will be populated with the request's response once the request completes
  280. // successfully.
  281. //
  282. // Use "Send" method on the returned Request to send the API call to the service.
  283. // the "output" return value is not valid until after Send returns without error.
  284. //
  285. // See DeleteAccelerator for more information on using the DeleteAccelerator
  286. // API call, and error handling.
  287. //
  288. // This method is useful when you want to inject custom logic or configuration
  289. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  290. //
  291. //
  292. // // Example sending a request using the DeleteAcceleratorRequest method.
  293. // req, resp := client.DeleteAcceleratorRequest(params)
  294. //
  295. // err := req.Send()
  296. // if err == nil { // resp is now filled
  297. // fmt.Println(resp)
  298. // }
  299. //
  300. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteAccelerator
  301. func (c *GlobalAccelerator) DeleteAcceleratorRequest(input *DeleteAcceleratorInput) (req *request.Request, output *DeleteAcceleratorOutput) {
  302. op := &request.Operation{
  303. Name: opDeleteAccelerator,
  304. HTTPMethod: "POST",
  305. HTTPPath: "/",
  306. }
  307. if input == nil {
  308. input = &DeleteAcceleratorInput{}
  309. }
  310. output = &DeleteAcceleratorOutput{}
  311. req = c.newRequest(op, input, output)
  312. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  313. return
  314. }
  315. // DeleteAccelerator API operation for AWS Global Accelerator.
  316. //
  317. // Delete an accelerator. Note: before you can delete an accelerator, you must
  318. // disable it and remove all dependent resources (listeners and endpoint groups).
  319. //
  320. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  321. // with awserr.Error's Code and Message methods to get detailed information about
  322. // the error.
  323. //
  324. // See the AWS API reference guide for AWS Global Accelerator's
  325. // API operation DeleteAccelerator for usage and error information.
  326. //
  327. // Returned Error Codes:
  328. // * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException"
  329. // The accelerator that you specified doesn't exist.
  330. //
  331. // * ErrCodeAcceleratorNotDisabledException "AcceleratorNotDisabledException"
  332. // The accelerator that you specified could not be disabled.
  333. //
  334. // * ErrCodeAssociatedListenerFoundException "AssociatedListenerFoundException"
  335. // The accelerator that you specified has a listener associated with it. You
  336. // must remove all dependent resources from an accelerator before you can delete
  337. // it.
  338. //
  339. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  340. // There was an internal error for AWS Global Accelerator.
  341. //
  342. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  343. // An argument that you specified is invalid.
  344. //
  345. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteAccelerator
  346. func (c *GlobalAccelerator) DeleteAccelerator(input *DeleteAcceleratorInput) (*DeleteAcceleratorOutput, error) {
  347. req, out := c.DeleteAcceleratorRequest(input)
  348. return out, req.Send()
  349. }
  350. // DeleteAcceleratorWithContext is the same as DeleteAccelerator with the addition of
  351. // the ability to pass a context and additional request options.
  352. //
  353. // See DeleteAccelerator for details on how to use this API operation.
  354. //
  355. // The context must be non-nil and will be used for request cancellation. If
  356. // the context is nil a panic will occur. In the future the SDK may create
  357. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  358. // for more information on using Contexts.
  359. func (c *GlobalAccelerator) DeleteAcceleratorWithContext(ctx aws.Context, input *DeleteAcceleratorInput, opts ...request.Option) (*DeleteAcceleratorOutput, error) {
  360. req, out := c.DeleteAcceleratorRequest(input)
  361. req.SetContext(ctx)
  362. req.ApplyOptions(opts...)
  363. return out, req.Send()
  364. }
  365. const opDeleteEndpointGroup = "DeleteEndpointGroup"
  366. // DeleteEndpointGroupRequest generates a "aws/request.Request" representing the
  367. // client's request for the DeleteEndpointGroup operation. The "output" return
  368. // value will be populated with the request's response once the request completes
  369. // successfully.
  370. //
  371. // Use "Send" method on the returned Request to send the API call to the service.
  372. // the "output" return value is not valid until after Send returns without error.
  373. //
  374. // See DeleteEndpointGroup for more information on using the DeleteEndpointGroup
  375. // API call, and error handling.
  376. //
  377. // This method is useful when you want to inject custom logic or configuration
  378. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  379. //
  380. //
  381. // // Example sending a request using the DeleteEndpointGroupRequest method.
  382. // req, resp := client.DeleteEndpointGroupRequest(params)
  383. //
  384. // err := req.Send()
  385. // if err == nil { // resp is now filled
  386. // fmt.Println(resp)
  387. // }
  388. //
  389. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteEndpointGroup
  390. func (c *GlobalAccelerator) DeleteEndpointGroupRequest(input *DeleteEndpointGroupInput) (req *request.Request, output *DeleteEndpointGroupOutput) {
  391. op := &request.Operation{
  392. Name: opDeleteEndpointGroup,
  393. HTTPMethod: "POST",
  394. HTTPPath: "/",
  395. }
  396. if input == nil {
  397. input = &DeleteEndpointGroupInput{}
  398. }
  399. output = &DeleteEndpointGroupOutput{}
  400. req = c.newRequest(op, input, output)
  401. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  402. return
  403. }
  404. // DeleteEndpointGroup API operation for AWS Global Accelerator.
  405. //
  406. // Delete an endpoint group from a listener.
  407. //
  408. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  409. // with awserr.Error's Code and Message methods to get detailed information about
  410. // the error.
  411. //
  412. // See the AWS API reference guide for AWS Global Accelerator's
  413. // API operation DeleteEndpointGroup for usage and error information.
  414. //
  415. // Returned Error Codes:
  416. // * ErrCodeEndpointGroupNotFoundException "EndpointGroupNotFoundException"
  417. // The endpoint group that you specified doesn't exist.
  418. //
  419. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  420. // There was an internal error for AWS Global Accelerator.
  421. //
  422. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteEndpointGroup
  423. func (c *GlobalAccelerator) DeleteEndpointGroup(input *DeleteEndpointGroupInput) (*DeleteEndpointGroupOutput, error) {
  424. req, out := c.DeleteEndpointGroupRequest(input)
  425. return out, req.Send()
  426. }
  427. // DeleteEndpointGroupWithContext is the same as DeleteEndpointGroup with the addition of
  428. // the ability to pass a context and additional request options.
  429. //
  430. // See DeleteEndpointGroup for details on how to use this API operation.
  431. //
  432. // The context must be non-nil and will be used for request cancellation. If
  433. // the context is nil a panic will occur. In the future the SDK may create
  434. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  435. // for more information on using Contexts.
  436. func (c *GlobalAccelerator) DeleteEndpointGroupWithContext(ctx aws.Context, input *DeleteEndpointGroupInput, opts ...request.Option) (*DeleteEndpointGroupOutput, error) {
  437. req, out := c.DeleteEndpointGroupRequest(input)
  438. req.SetContext(ctx)
  439. req.ApplyOptions(opts...)
  440. return out, req.Send()
  441. }
  442. const opDeleteListener = "DeleteListener"
  443. // DeleteListenerRequest generates a "aws/request.Request" representing the
  444. // client's request for the DeleteListener operation. The "output" return
  445. // value will be populated with the request's response once the request completes
  446. // successfully.
  447. //
  448. // Use "Send" method on the returned Request to send the API call to the service.
  449. // the "output" return value is not valid until after Send returns without error.
  450. //
  451. // See DeleteListener for more information on using the DeleteListener
  452. // API call, and error handling.
  453. //
  454. // This method is useful when you want to inject custom logic or configuration
  455. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  456. //
  457. //
  458. // // Example sending a request using the DeleteListenerRequest method.
  459. // req, resp := client.DeleteListenerRequest(params)
  460. //
  461. // err := req.Send()
  462. // if err == nil { // resp is now filled
  463. // fmt.Println(resp)
  464. // }
  465. //
  466. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteListener
  467. func (c *GlobalAccelerator) DeleteListenerRequest(input *DeleteListenerInput) (req *request.Request, output *DeleteListenerOutput) {
  468. op := &request.Operation{
  469. Name: opDeleteListener,
  470. HTTPMethod: "POST",
  471. HTTPPath: "/",
  472. }
  473. if input == nil {
  474. input = &DeleteListenerInput{}
  475. }
  476. output = &DeleteListenerOutput{}
  477. req = c.newRequest(op, input, output)
  478. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  479. return
  480. }
  481. // DeleteListener API operation for AWS Global Accelerator.
  482. //
  483. // Delete a listener from an accelerator.
  484. //
  485. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  486. // with awserr.Error's Code and Message methods to get detailed information about
  487. // the error.
  488. //
  489. // See the AWS API reference guide for AWS Global Accelerator's
  490. // API operation DeleteListener for usage and error information.
  491. //
  492. // Returned Error Codes:
  493. // * ErrCodeListenerNotFoundException "ListenerNotFoundException"
  494. // The listener that you specified doesn't exist.
  495. //
  496. // * ErrCodeAssociatedEndpointGroupFoundException "AssociatedEndpointGroupFoundException"
  497. // The listener that you specified has an endpoint group associated with it.
  498. // You must remove all dependent resources from a listener before you can delete
  499. // it.
  500. //
  501. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  502. // There was an internal error for AWS Global Accelerator.
  503. //
  504. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteListener
  505. func (c *GlobalAccelerator) DeleteListener(input *DeleteListenerInput) (*DeleteListenerOutput, error) {
  506. req, out := c.DeleteListenerRequest(input)
  507. return out, req.Send()
  508. }
  509. // DeleteListenerWithContext is the same as DeleteListener with the addition of
  510. // the ability to pass a context and additional request options.
  511. //
  512. // See DeleteListener for details on how to use this API operation.
  513. //
  514. // The context must be non-nil and will be used for request cancellation. If
  515. // the context is nil a panic will occur. In the future the SDK may create
  516. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  517. // for more information on using Contexts.
  518. func (c *GlobalAccelerator) DeleteListenerWithContext(ctx aws.Context, input *DeleteListenerInput, opts ...request.Option) (*DeleteListenerOutput, error) {
  519. req, out := c.DeleteListenerRequest(input)
  520. req.SetContext(ctx)
  521. req.ApplyOptions(opts...)
  522. return out, req.Send()
  523. }
  524. const opDescribeAccelerator = "DescribeAccelerator"
  525. // DescribeAcceleratorRequest generates a "aws/request.Request" representing the
  526. // client's request for the DescribeAccelerator operation. The "output" return
  527. // value will be populated with the request's response once the request completes
  528. // successfully.
  529. //
  530. // Use "Send" method on the returned Request to send the API call to the service.
  531. // the "output" return value is not valid until after Send returns without error.
  532. //
  533. // See DescribeAccelerator for more information on using the DescribeAccelerator
  534. // API call, and error handling.
  535. //
  536. // This method is useful when you want to inject custom logic or configuration
  537. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  538. //
  539. //
  540. // // Example sending a request using the DescribeAcceleratorRequest method.
  541. // req, resp := client.DescribeAcceleratorRequest(params)
  542. //
  543. // err := req.Send()
  544. // if err == nil { // resp is now filled
  545. // fmt.Println(resp)
  546. // }
  547. //
  548. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeAccelerator
  549. func (c *GlobalAccelerator) DescribeAcceleratorRequest(input *DescribeAcceleratorInput) (req *request.Request, output *DescribeAcceleratorOutput) {
  550. op := &request.Operation{
  551. Name: opDescribeAccelerator,
  552. HTTPMethod: "POST",
  553. HTTPPath: "/",
  554. }
  555. if input == nil {
  556. input = &DescribeAcceleratorInput{}
  557. }
  558. output = &DescribeAcceleratorOutput{}
  559. req = c.newRequest(op, input, output)
  560. return
  561. }
  562. // DescribeAccelerator API operation for AWS Global Accelerator.
  563. //
  564. // Describe an accelerator. To see an AWS CLI example of describing an accelerator,
  565. // scroll down to Example.
  566. //
  567. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  568. // with awserr.Error's Code and Message methods to get detailed information about
  569. // the error.
  570. //
  571. // See the AWS API reference guide for AWS Global Accelerator's
  572. // API operation DescribeAccelerator for usage and error information.
  573. //
  574. // Returned Error Codes:
  575. // * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException"
  576. // The accelerator that you specified doesn't exist.
  577. //
  578. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  579. // There was an internal error for AWS Global Accelerator.
  580. //
  581. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  582. // An argument that you specified is invalid.
  583. //
  584. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeAccelerator
  585. func (c *GlobalAccelerator) DescribeAccelerator(input *DescribeAcceleratorInput) (*DescribeAcceleratorOutput, error) {
  586. req, out := c.DescribeAcceleratorRequest(input)
  587. return out, req.Send()
  588. }
  589. // DescribeAcceleratorWithContext is the same as DescribeAccelerator with the addition of
  590. // the ability to pass a context and additional request options.
  591. //
  592. // See DescribeAccelerator for details on how to use this API operation.
  593. //
  594. // The context must be non-nil and will be used for request cancellation. If
  595. // the context is nil a panic will occur. In the future the SDK may create
  596. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  597. // for more information on using Contexts.
  598. func (c *GlobalAccelerator) DescribeAcceleratorWithContext(ctx aws.Context, input *DescribeAcceleratorInput, opts ...request.Option) (*DescribeAcceleratorOutput, error) {
  599. req, out := c.DescribeAcceleratorRequest(input)
  600. req.SetContext(ctx)
  601. req.ApplyOptions(opts...)
  602. return out, req.Send()
  603. }
  604. const opDescribeAcceleratorAttributes = "DescribeAcceleratorAttributes"
  605. // DescribeAcceleratorAttributesRequest generates a "aws/request.Request" representing the
  606. // client's request for the DescribeAcceleratorAttributes operation. The "output" return
  607. // value will be populated with the request's response once the request completes
  608. // successfully.
  609. //
  610. // Use "Send" method on the returned Request to send the API call to the service.
  611. // the "output" return value is not valid until after Send returns without error.
  612. //
  613. // See DescribeAcceleratorAttributes for more information on using the DescribeAcceleratorAttributes
  614. // API call, and error handling.
  615. //
  616. // This method is useful when you want to inject custom logic or configuration
  617. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  618. //
  619. //
  620. // // Example sending a request using the DescribeAcceleratorAttributesRequest method.
  621. // req, resp := client.DescribeAcceleratorAttributesRequest(params)
  622. //
  623. // err := req.Send()
  624. // if err == nil { // resp is now filled
  625. // fmt.Println(resp)
  626. // }
  627. //
  628. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeAcceleratorAttributes
  629. func (c *GlobalAccelerator) DescribeAcceleratorAttributesRequest(input *DescribeAcceleratorAttributesInput) (req *request.Request, output *DescribeAcceleratorAttributesOutput) {
  630. op := &request.Operation{
  631. Name: opDescribeAcceleratorAttributes,
  632. HTTPMethod: "POST",
  633. HTTPPath: "/",
  634. }
  635. if input == nil {
  636. input = &DescribeAcceleratorAttributesInput{}
  637. }
  638. output = &DescribeAcceleratorAttributesOutput{}
  639. req = c.newRequest(op, input, output)
  640. return
  641. }
  642. // DescribeAcceleratorAttributes API operation for AWS Global Accelerator.
  643. //
  644. // Describe the attributes of an accelerator.
  645. //
  646. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  647. // with awserr.Error's Code and Message methods to get detailed information about
  648. // the error.
  649. //
  650. // See the AWS API reference guide for AWS Global Accelerator's
  651. // API operation DescribeAcceleratorAttributes for usage and error information.
  652. //
  653. // Returned Error Codes:
  654. // * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException"
  655. // The accelerator that you specified doesn't exist.
  656. //
  657. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  658. // There was an internal error for AWS Global Accelerator.
  659. //
  660. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  661. // An argument that you specified is invalid.
  662. //
  663. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeAcceleratorAttributes
  664. func (c *GlobalAccelerator) DescribeAcceleratorAttributes(input *DescribeAcceleratorAttributesInput) (*DescribeAcceleratorAttributesOutput, error) {
  665. req, out := c.DescribeAcceleratorAttributesRequest(input)
  666. return out, req.Send()
  667. }
  668. // DescribeAcceleratorAttributesWithContext is the same as DescribeAcceleratorAttributes with the addition of
  669. // the ability to pass a context and additional request options.
  670. //
  671. // See DescribeAcceleratorAttributes for details on how to use this API operation.
  672. //
  673. // The context must be non-nil and will be used for request cancellation. If
  674. // the context is nil a panic will occur. In the future the SDK may create
  675. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  676. // for more information on using Contexts.
  677. func (c *GlobalAccelerator) DescribeAcceleratorAttributesWithContext(ctx aws.Context, input *DescribeAcceleratorAttributesInput, opts ...request.Option) (*DescribeAcceleratorAttributesOutput, error) {
  678. req, out := c.DescribeAcceleratorAttributesRequest(input)
  679. req.SetContext(ctx)
  680. req.ApplyOptions(opts...)
  681. return out, req.Send()
  682. }
  683. const opDescribeEndpointGroup = "DescribeEndpointGroup"
  684. // DescribeEndpointGroupRequest generates a "aws/request.Request" representing the
  685. // client's request for the DescribeEndpointGroup operation. The "output" return
  686. // value will be populated with the request's response once the request completes
  687. // successfully.
  688. //
  689. // Use "Send" method on the returned Request to send the API call to the service.
  690. // the "output" return value is not valid until after Send returns without error.
  691. //
  692. // See DescribeEndpointGroup for more information on using the DescribeEndpointGroup
  693. // API call, and error handling.
  694. //
  695. // This method is useful when you want to inject custom logic or configuration
  696. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  697. //
  698. //
  699. // // Example sending a request using the DescribeEndpointGroupRequest method.
  700. // req, resp := client.DescribeEndpointGroupRequest(params)
  701. //
  702. // err := req.Send()
  703. // if err == nil { // resp is now filled
  704. // fmt.Println(resp)
  705. // }
  706. //
  707. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeEndpointGroup
  708. func (c *GlobalAccelerator) DescribeEndpointGroupRequest(input *DescribeEndpointGroupInput) (req *request.Request, output *DescribeEndpointGroupOutput) {
  709. op := &request.Operation{
  710. Name: opDescribeEndpointGroup,
  711. HTTPMethod: "POST",
  712. HTTPPath: "/",
  713. }
  714. if input == nil {
  715. input = &DescribeEndpointGroupInput{}
  716. }
  717. output = &DescribeEndpointGroupOutput{}
  718. req = c.newRequest(op, input, output)
  719. return
  720. }
  721. // DescribeEndpointGroup API operation for AWS Global Accelerator.
  722. //
  723. // Describe an endpoint group.
  724. //
  725. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  726. // with awserr.Error's Code and Message methods to get detailed information about
  727. // the error.
  728. //
  729. // See the AWS API reference guide for AWS Global Accelerator's
  730. // API operation DescribeEndpointGroup for usage and error information.
  731. //
  732. // Returned Error Codes:
  733. // * ErrCodeEndpointGroupNotFoundException "EndpointGroupNotFoundException"
  734. // The endpoint group that you specified doesn't exist.
  735. //
  736. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  737. // There was an internal error for AWS Global Accelerator.
  738. //
  739. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeEndpointGroup
  740. func (c *GlobalAccelerator) DescribeEndpointGroup(input *DescribeEndpointGroupInput) (*DescribeEndpointGroupOutput, error) {
  741. req, out := c.DescribeEndpointGroupRequest(input)
  742. return out, req.Send()
  743. }
  744. // DescribeEndpointGroupWithContext is the same as DescribeEndpointGroup with the addition of
  745. // the ability to pass a context and additional request options.
  746. //
  747. // See DescribeEndpointGroup for details on how to use this API operation.
  748. //
  749. // The context must be non-nil and will be used for request cancellation. If
  750. // the context is nil a panic will occur. In the future the SDK may create
  751. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  752. // for more information on using Contexts.
  753. func (c *GlobalAccelerator) DescribeEndpointGroupWithContext(ctx aws.Context, input *DescribeEndpointGroupInput, opts ...request.Option) (*DescribeEndpointGroupOutput, error) {
  754. req, out := c.DescribeEndpointGroupRequest(input)
  755. req.SetContext(ctx)
  756. req.ApplyOptions(opts...)
  757. return out, req.Send()
  758. }
  759. const opDescribeListener = "DescribeListener"
  760. // DescribeListenerRequest generates a "aws/request.Request" representing the
  761. // client's request for the DescribeListener operation. The "output" return
  762. // value will be populated with the request's response once the request completes
  763. // successfully.
  764. //
  765. // Use "Send" method on the returned Request to send the API call to the service.
  766. // the "output" return value is not valid until after Send returns without error.
  767. //
  768. // See DescribeListener for more information on using the DescribeListener
  769. // API call, and error handling.
  770. //
  771. // This method is useful when you want to inject custom logic or configuration
  772. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  773. //
  774. //
  775. // // Example sending a request using the DescribeListenerRequest method.
  776. // req, resp := client.DescribeListenerRequest(params)
  777. //
  778. // err := req.Send()
  779. // if err == nil { // resp is now filled
  780. // fmt.Println(resp)
  781. // }
  782. //
  783. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeListener
  784. func (c *GlobalAccelerator) DescribeListenerRequest(input *DescribeListenerInput) (req *request.Request, output *DescribeListenerOutput) {
  785. op := &request.Operation{
  786. Name: opDescribeListener,
  787. HTTPMethod: "POST",
  788. HTTPPath: "/",
  789. }
  790. if input == nil {
  791. input = &DescribeListenerInput{}
  792. }
  793. output = &DescribeListenerOutput{}
  794. req = c.newRequest(op, input, output)
  795. return
  796. }
  797. // DescribeListener API operation for AWS Global Accelerator.
  798. //
  799. // Describe a listener.
  800. //
  801. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  802. // with awserr.Error's Code and Message methods to get detailed information about
  803. // the error.
  804. //
  805. // See the AWS API reference guide for AWS Global Accelerator's
  806. // API operation DescribeListener for usage and error information.
  807. //
  808. // Returned Error Codes:
  809. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  810. // An argument that you specified is invalid.
  811. //
  812. // * ErrCodeListenerNotFoundException "ListenerNotFoundException"
  813. // The listener that you specified doesn't exist.
  814. //
  815. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  816. // There was an internal error for AWS Global Accelerator.
  817. //
  818. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeListener
  819. func (c *GlobalAccelerator) DescribeListener(input *DescribeListenerInput) (*DescribeListenerOutput, error) {
  820. req, out := c.DescribeListenerRequest(input)
  821. return out, req.Send()
  822. }
  823. // DescribeListenerWithContext is the same as DescribeListener with the addition of
  824. // the ability to pass a context and additional request options.
  825. //
  826. // See DescribeListener for details on how to use this API operation.
  827. //
  828. // The context must be non-nil and will be used for request cancellation. If
  829. // the context is nil a panic will occur. In the future the SDK may create
  830. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  831. // for more information on using Contexts.
  832. func (c *GlobalAccelerator) DescribeListenerWithContext(ctx aws.Context, input *DescribeListenerInput, opts ...request.Option) (*DescribeListenerOutput, error) {
  833. req, out := c.DescribeListenerRequest(input)
  834. req.SetContext(ctx)
  835. req.ApplyOptions(opts...)
  836. return out, req.Send()
  837. }
  838. const opListAccelerators = "ListAccelerators"
  839. // ListAcceleratorsRequest generates a "aws/request.Request" representing the
  840. // client's request for the ListAccelerators operation. The "output" return
  841. // value will be populated with the request's response once the request completes
  842. // successfully.
  843. //
  844. // Use "Send" method on the returned Request to send the API call to the service.
  845. // the "output" return value is not valid until after Send returns without error.
  846. //
  847. // See ListAccelerators for more information on using the ListAccelerators
  848. // API call, and error handling.
  849. //
  850. // This method is useful when you want to inject custom logic or configuration
  851. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  852. //
  853. //
  854. // // Example sending a request using the ListAcceleratorsRequest method.
  855. // req, resp := client.ListAcceleratorsRequest(params)
  856. //
  857. // err := req.Send()
  858. // if err == nil { // resp is now filled
  859. // fmt.Println(resp)
  860. // }
  861. //
  862. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListAccelerators
  863. func (c *GlobalAccelerator) ListAcceleratorsRequest(input *ListAcceleratorsInput) (req *request.Request, output *ListAcceleratorsOutput) {
  864. op := &request.Operation{
  865. Name: opListAccelerators,
  866. HTTPMethod: "POST",
  867. HTTPPath: "/",
  868. }
  869. if input == nil {
  870. input = &ListAcceleratorsInput{}
  871. }
  872. output = &ListAcceleratorsOutput{}
  873. req = c.newRequest(op, input, output)
  874. return
  875. }
  876. // ListAccelerators API operation for AWS Global Accelerator.
  877. //
  878. // List the accelerators for an AWS account.
  879. //
  880. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  881. // with awserr.Error's Code and Message methods to get detailed information about
  882. // the error.
  883. //
  884. // See the AWS API reference guide for AWS Global Accelerator's
  885. // API operation ListAccelerators for usage and error information.
  886. //
  887. // Returned Error Codes:
  888. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  889. // There isn't another item to return.
  890. //
  891. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  892. // There was an internal error for AWS Global Accelerator.
  893. //
  894. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListAccelerators
  895. func (c *GlobalAccelerator) ListAccelerators(input *ListAcceleratorsInput) (*ListAcceleratorsOutput, error) {
  896. req, out := c.ListAcceleratorsRequest(input)
  897. return out, req.Send()
  898. }
  899. // ListAcceleratorsWithContext is the same as ListAccelerators with the addition of
  900. // the ability to pass a context and additional request options.
  901. //
  902. // See ListAccelerators for details on how to use this API operation.
  903. //
  904. // The context must be non-nil and will be used for request cancellation. If
  905. // the context is nil a panic will occur. In the future the SDK may create
  906. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  907. // for more information on using Contexts.
  908. func (c *GlobalAccelerator) ListAcceleratorsWithContext(ctx aws.Context, input *ListAcceleratorsInput, opts ...request.Option) (*ListAcceleratorsOutput, error) {
  909. req, out := c.ListAcceleratorsRequest(input)
  910. req.SetContext(ctx)
  911. req.ApplyOptions(opts...)
  912. return out, req.Send()
  913. }
  914. const opListEndpointGroups = "ListEndpointGroups"
  915. // ListEndpointGroupsRequest generates a "aws/request.Request" representing the
  916. // client's request for the ListEndpointGroups operation. The "output" return
  917. // value will be populated with the request's response once the request completes
  918. // successfully.
  919. //
  920. // Use "Send" method on the returned Request to send the API call to the service.
  921. // the "output" return value is not valid until after Send returns without error.
  922. //
  923. // See ListEndpointGroups for more information on using the ListEndpointGroups
  924. // API call, and error handling.
  925. //
  926. // This method is useful when you want to inject custom logic or configuration
  927. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  928. //
  929. //
  930. // // Example sending a request using the ListEndpointGroupsRequest method.
  931. // req, resp := client.ListEndpointGroupsRequest(params)
  932. //
  933. // err := req.Send()
  934. // if err == nil { // resp is now filled
  935. // fmt.Println(resp)
  936. // }
  937. //
  938. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListEndpointGroups
  939. func (c *GlobalAccelerator) ListEndpointGroupsRequest(input *ListEndpointGroupsInput) (req *request.Request, output *ListEndpointGroupsOutput) {
  940. op := &request.Operation{
  941. Name: opListEndpointGroups,
  942. HTTPMethod: "POST",
  943. HTTPPath: "/",
  944. }
  945. if input == nil {
  946. input = &ListEndpointGroupsInput{}
  947. }
  948. output = &ListEndpointGroupsOutput{}
  949. req = c.newRequest(op, input, output)
  950. return
  951. }
  952. // ListEndpointGroups API operation for AWS Global Accelerator.
  953. //
  954. // List the endpoint groups that are associated with a listener.
  955. //
  956. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  957. // with awserr.Error's Code and Message methods to get detailed information about
  958. // the error.
  959. //
  960. // See the AWS API reference guide for AWS Global Accelerator's
  961. // API operation ListEndpointGroups for usage and error information.
  962. //
  963. // Returned Error Codes:
  964. // * ErrCodeListenerNotFoundException "ListenerNotFoundException"
  965. // The listener that you specified doesn't exist.
  966. //
  967. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  968. // There isn't another item to return.
  969. //
  970. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  971. // An argument that you specified is invalid.
  972. //
  973. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  974. // There was an internal error for AWS Global Accelerator.
  975. //
  976. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListEndpointGroups
  977. func (c *GlobalAccelerator) ListEndpointGroups(input *ListEndpointGroupsInput) (*ListEndpointGroupsOutput, error) {
  978. req, out := c.ListEndpointGroupsRequest(input)
  979. return out, req.Send()
  980. }
  981. // ListEndpointGroupsWithContext is the same as ListEndpointGroups with the addition of
  982. // the ability to pass a context and additional request options.
  983. //
  984. // See ListEndpointGroups for details on how to use this API operation.
  985. //
  986. // The context must be non-nil and will be used for request cancellation. If
  987. // the context is nil a panic will occur. In the future the SDK may create
  988. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  989. // for more information on using Contexts.
  990. func (c *GlobalAccelerator) ListEndpointGroupsWithContext(ctx aws.Context, input *ListEndpointGroupsInput, opts ...request.Option) (*ListEndpointGroupsOutput, error) {
  991. req, out := c.ListEndpointGroupsRequest(input)
  992. req.SetContext(ctx)
  993. req.ApplyOptions(opts...)
  994. return out, req.Send()
  995. }
  996. const opListListeners = "ListListeners"
  997. // ListListenersRequest generates a "aws/request.Request" representing the
  998. // client's request for the ListListeners operation. The "output" return
  999. // value will be populated with the request's response once the request completes
  1000. // successfully.
  1001. //
  1002. // Use "Send" method on the returned Request to send the API call to the service.
  1003. // the "output" return value is not valid until after Send returns without error.
  1004. //
  1005. // See ListListeners for more information on using the ListListeners
  1006. // API call, and error handling.
  1007. //
  1008. // This method is useful when you want to inject custom logic or configuration
  1009. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1010. //
  1011. //
  1012. // // Example sending a request using the ListListenersRequest method.
  1013. // req, resp := client.ListListenersRequest(params)
  1014. //
  1015. // err := req.Send()
  1016. // if err == nil { // resp is now filled
  1017. // fmt.Println(resp)
  1018. // }
  1019. //
  1020. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListListeners
  1021. func (c *GlobalAccelerator) ListListenersRequest(input *ListListenersInput) (req *request.Request, output *ListListenersOutput) {
  1022. op := &request.Operation{
  1023. Name: opListListeners,
  1024. HTTPMethod: "POST",
  1025. HTTPPath: "/",
  1026. }
  1027. if input == nil {
  1028. input = &ListListenersInput{}
  1029. }
  1030. output = &ListListenersOutput{}
  1031. req = c.newRequest(op, input, output)
  1032. return
  1033. }
  1034. // ListListeners API operation for AWS Global Accelerator.
  1035. //
  1036. // List the listeners for an accelerator.
  1037. //
  1038. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1039. // with awserr.Error's Code and Message methods to get detailed information about
  1040. // the error.
  1041. //
  1042. // See the AWS API reference guide for AWS Global Accelerator's
  1043. // API operation ListListeners for usage and error information.
  1044. //
  1045. // Returned Error Codes:
  1046. // * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException"
  1047. // The accelerator that you specified doesn't exist.
  1048. //
  1049. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  1050. // There isn't another item to return.
  1051. //
  1052. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  1053. // There was an internal error for AWS Global Accelerator.
  1054. //
  1055. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListListeners
  1056. func (c *GlobalAccelerator) ListListeners(input *ListListenersInput) (*ListListenersOutput, error) {
  1057. req, out := c.ListListenersRequest(input)
  1058. return out, req.Send()
  1059. }
  1060. // ListListenersWithContext is the same as ListListeners with the addition of
  1061. // the ability to pass a context and additional request options.
  1062. //
  1063. // See ListListeners for details on how to use this API operation.
  1064. //
  1065. // The context must be non-nil and will be used for request cancellation. If
  1066. // the context is nil a panic will occur. In the future the SDK may create
  1067. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1068. // for more information on using Contexts.
  1069. func (c *GlobalAccelerator) ListListenersWithContext(ctx aws.Context, input *ListListenersInput, opts ...request.Option) (*ListListenersOutput, error) {
  1070. req, out := c.ListListenersRequest(input)
  1071. req.SetContext(ctx)
  1072. req.ApplyOptions(opts...)
  1073. return out, req.Send()
  1074. }
  1075. const opUpdateAccelerator = "UpdateAccelerator"
  1076. // UpdateAcceleratorRequest generates a "aws/request.Request" representing the
  1077. // client's request for the UpdateAccelerator operation. The "output" return
  1078. // value will be populated with the request's response once the request completes
  1079. // successfully.
  1080. //
  1081. // Use "Send" method on the returned Request to send the API call to the service.
  1082. // the "output" return value is not valid until after Send returns without error.
  1083. //
  1084. // See UpdateAccelerator for more information on using the UpdateAccelerator
  1085. // API call, and error handling.
  1086. //
  1087. // This method is useful when you want to inject custom logic or configuration
  1088. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1089. //
  1090. //
  1091. // // Example sending a request using the UpdateAcceleratorRequest method.
  1092. // req, resp := client.UpdateAcceleratorRequest(params)
  1093. //
  1094. // err := req.Send()
  1095. // if err == nil { // resp is now filled
  1096. // fmt.Println(resp)
  1097. // }
  1098. //
  1099. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateAccelerator
  1100. func (c *GlobalAccelerator) UpdateAcceleratorRequest(input *UpdateAcceleratorInput) (req *request.Request, output *UpdateAcceleratorOutput) {
  1101. op := &request.Operation{
  1102. Name: opUpdateAccelerator,
  1103. HTTPMethod: "POST",
  1104. HTTPPath: "/",
  1105. }
  1106. if input == nil {
  1107. input = &UpdateAcceleratorInput{}
  1108. }
  1109. output = &UpdateAcceleratorOutput{}
  1110. req = c.newRequest(op, input, output)
  1111. return
  1112. }
  1113. // UpdateAccelerator API operation for AWS Global Accelerator.
  1114. //
  1115. // Update an accelerator.
  1116. //
  1117. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1118. // with awserr.Error's Code and Message methods to get detailed information about
  1119. // the error.
  1120. //
  1121. // See the AWS API reference guide for AWS Global Accelerator's
  1122. // API operation UpdateAccelerator for usage and error information.
  1123. //
  1124. // Returned Error Codes:
  1125. // * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException"
  1126. // The accelerator that you specified doesn't exist.
  1127. //
  1128. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  1129. // There was an internal error for AWS Global Accelerator.
  1130. //
  1131. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  1132. // An argument that you specified is invalid.
  1133. //
  1134. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateAccelerator
  1135. func (c *GlobalAccelerator) UpdateAccelerator(input *UpdateAcceleratorInput) (*UpdateAcceleratorOutput, error) {
  1136. req, out := c.UpdateAcceleratorRequest(input)
  1137. return out, req.Send()
  1138. }
  1139. // UpdateAcceleratorWithContext is the same as UpdateAccelerator with the addition of
  1140. // the ability to pass a context and additional request options.
  1141. //
  1142. // See UpdateAccelerator for details on how to use this API operation.
  1143. //
  1144. // The context must be non-nil and will be used for request cancellation. If
  1145. // the context is nil a panic will occur. In the future the SDK may create
  1146. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1147. // for more information on using Contexts.
  1148. func (c *GlobalAccelerator) UpdateAcceleratorWithContext(ctx aws.Context, input *UpdateAcceleratorInput, opts ...request.Option) (*UpdateAcceleratorOutput, error) {
  1149. req, out := c.UpdateAcceleratorRequest(input)
  1150. req.SetContext(ctx)
  1151. req.ApplyOptions(opts...)
  1152. return out, req.Send()
  1153. }
  1154. const opUpdateAcceleratorAttributes = "UpdateAcceleratorAttributes"
  1155. // UpdateAcceleratorAttributesRequest generates a "aws/request.Request" representing the
  1156. // client's request for the UpdateAcceleratorAttributes operation. The "output" return
  1157. // value will be populated with the request's response once the request completes
  1158. // successfully.
  1159. //
  1160. // Use "Send" method on the returned Request to send the API call to the service.
  1161. // the "output" return value is not valid until after Send returns without error.
  1162. //
  1163. // See UpdateAcceleratorAttributes for more information on using the UpdateAcceleratorAttributes
  1164. // API call, and error handling.
  1165. //
  1166. // This method is useful when you want to inject custom logic or configuration
  1167. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1168. //
  1169. //
  1170. // // Example sending a request using the UpdateAcceleratorAttributesRequest method.
  1171. // req, resp := client.UpdateAcceleratorAttributesRequest(params)
  1172. //
  1173. // err := req.Send()
  1174. // if err == nil { // resp is now filled
  1175. // fmt.Println(resp)
  1176. // }
  1177. //
  1178. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateAcceleratorAttributes
  1179. func (c *GlobalAccelerator) UpdateAcceleratorAttributesRequest(input *UpdateAcceleratorAttributesInput) (req *request.Request, output *UpdateAcceleratorAttributesOutput) {
  1180. op := &request.Operation{
  1181. Name: opUpdateAcceleratorAttributes,
  1182. HTTPMethod: "POST",
  1183. HTTPPath: "/",
  1184. }
  1185. if input == nil {
  1186. input = &UpdateAcceleratorAttributesInput{}
  1187. }
  1188. output = &UpdateAcceleratorAttributesOutput{}
  1189. req = c.newRequest(op, input, output)
  1190. return
  1191. }
  1192. // UpdateAcceleratorAttributes API operation for AWS Global Accelerator.
  1193. //
  1194. // Update the attributes for an accelerator. To see an AWS CLI example of updating
  1195. // an accelerator to enable flow logs, scroll down to Example.
  1196. //
  1197. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1198. // with awserr.Error's Code and Message methods to get detailed information about
  1199. // the error.
  1200. //
  1201. // See the AWS API reference guide for AWS Global Accelerator's
  1202. // API operation UpdateAcceleratorAttributes for usage and error information.
  1203. //
  1204. // Returned Error Codes:
  1205. // * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException"
  1206. // The accelerator that you specified doesn't exist.
  1207. //
  1208. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  1209. // There was an internal error for AWS Global Accelerator.
  1210. //
  1211. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  1212. // An argument that you specified is invalid.
  1213. //
  1214. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateAcceleratorAttributes
  1215. func (c *GlobalAccelerator) UpdateAcceleratorAttributes(input *UpdateAcceleratorAttributesInput) (*UpdateAcceleratorAttributesOutput, error) {
  1216. req, out := c.UpdateAcceleratorAttributesRequest(input)
  1217. return out, req.Send()
  1218. }
  1219. // UpdateAcceleratorAttributesWithContext is the same as UpdateAcceleratorAttributes with the addition of
  1220. // the ability to pass a context and additional request options.
  1221. //
  1222. // See UpdateAcceleratorAttributes for details on how to use this API operation.
  1223. //
  1224. // The context must be non-nil and will be used for request cancellation. If
  1225. // the context is nil a panic will occur. In the future the SDK may create
  1226. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1227. // for more information on using Contexts.
  1228. func (c *GlobalAccelerator) UpdateAcceleratorAttributesWithContext(ctx aws.Context, input *UpdateAcceleratorAttributesInput, opts ...request.Option) (*UpdateAcceleratorAttributesOutput, error) {
  1229. req, out := c.UpdateAcceleratorAttributesRequest(input)
  1230. req.SetContext(ctx)
  1231. req.ApplyOptions(opts...)
  1232. return out, req.Send()
  1233. }
  1234. const opUpdateEndpointGroup = "UpdateEndpointGroup"
  1235. // UpdateEndpointGroupRequest generates a "aws/request.Request" representing the
  1236. // client's request for the UpdateEndpointGroup operation. The "output" return
  1237. // value will be populated with the request's response once the request completes
  1238. // successfully.
  1239. //
  1240. // Use "Send" method on the returned Request to send the API call to the service.
  1241. // the "output" return value is not valid until after Send returns without error.
  1242. //
  1243. // See UpdateEndpointGroup for more information on using the UpdateEndpointGroup
  1244. // API call, and error handling.
  1245. //
  1246. // This method is useful when you want to inject custom logic or configuration
  1247. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1248. //
  1249. //
  1250. // // Example sending a request using the UpdateEndpointGroupRequest method.
  1251. // req, resp := client.UpdateEndpointGroupRequest(params)
  1252. //
  1253. // err := req.Send()
  1254. // if err == nil { // resp is now filled
  1255. // fmt.Println(resp)
  1256. // }
  1257. //
  1258. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateEndpointGroup
  1259. func (c *GlobalAccelerator) UpdateEndpointGroupRequest(input *UpdateEndpointGroupInput) (req *request.Request, output *UpdateEndpointGroupOutput) {
  1260. op := &request.Operation{
  1261. Name: opUpdateEndpointGroup,
  1262. HTTPMethod: "POST",
  1263. HTTPPath: "/",
  1264. }
  1265. if input == nil {
  1266. input = &UpdateEndpointGroupInput{}
  1267. }
  1268. output = &UpdateEndpointGroupOutput{}
  1269. req = c.newRequest(op, input, output)
  1270. return
  1271. }
  1272. // UpdateEndpointGroup API operation for AWS Global Accelerator.
  1273. //
  1274. // Update an endpoint group. To see an AWS CLI example of updating an endpoint
  1275. // group, scroll down to Example.
  1276. //
  1277. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1278. // with awserr.Error's Code and Message methods to get detailed information about
  1279. // the error.
  1280. //
  1281. // See the AWS API reference guide for AWS Global Accelerator's
  1282. // API operation UpdateEndpointGroup for usage and error information.
  1283. //
  1284. // Returned Error Codes:
  1285. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  1286. // An argument that you specified is invalid.
  1287. //
  1288. // * ErrCodeEndpointGroupNotFoundException "EndpointGroupNotFoundException"
  1289. // The endpoint group that you specified doesn't exist.
  1290. //
  1291. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  1292. // There was an internal error for AWS Global Accelerator.
  1293. //
  1294. // * ErrCodeLimitExceededException "LimitExceededException"
  1295. // Processing your request would cause you to exceed an AWS Global Accelerator
  1296. // limit.
  1297. //
  1298. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateEndpointGroup
  1299. func (c *GlobalAccelerator) UpdateEndpointGroup(input *UpdateEndpointGroupInput) (*UpdateEndpointGroupOutput, error) {
  1300. req, out := c.UpdateEndpointGroupRequest(input)
  1301. return out, req.Send()
  1302. }
  1303. // UpdateEndpointGroupWithContext is the same as UpdateEndpointGroup with the addition of
  1304. // the ability to pass a context and additional request options.
  1305. //
  1306. // See UpdateEndpointGroup for details on how to use this API operation.
  1307. //
  1308. // The context must be non-nil and will be used for request cancellation. If
  1309. // the context is nil a panic will occur. In the future the SDK may create
  1310. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1311. // for more information on using Contexts.
  1312. func (c *GlobalAccelerator) UpdateEndpointGroupWithContext(ctx aws.Context, input *UpdateEndpointGroupInput, opts ...request.Option) (*UpdateEndpointGroupOutput, error) {
  1313. req, out := c.UpdateEndpointGroupRequest(input)
  1314. req.SetContext(ctx)
  1315. req.ApplyOptions(opts...)
  1316. return out, req.Send()
  1317. }
  1318. const opUpdateListener = "UpdateListener"
  1319. // UpdateListenerRequest generates a "aws/request.Request" representing the
  1320. // client's request for the UpdateListener operation. The "output" return
  1321. // value will be populated with the request's response once the request completes
  1322. // successfully.
  1323. //
  1324. // Use "Send" method on the returned Request to send the API call to the service.
  1325. // the "output" return value is not valid until after Send returns without error.
  1326. //
  1327. // See UpdateListener for more information on using the UpdateListener
  1328. // API call, and error handling.
  1329. //
  1330. // This method is useful when you want to inject custom logic or configuration
  1331. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1332. //
  1333. //
  1334. // // Example sending a request using the UpdateListenerRequest method.
  1335. // req, resp := client.UpdateListenerRequest(params)
  1336. //
  1337. // err := req.Send()
  1338. // if err == nil { // resp is now filled
  1339. // fmt.Println(resp)
  1340. // }
  1341. //
  1342. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateListener
  1343. func (c *GlobalAccelerator) UpdateListenerRequest(input *UpdateListenerInput) (req *request.Request, output *UpdateListenerOutput) {
  1344. op := &request.Operation{
  1345. Name: opUpdateListener,
  1346. HTTPMethod: "POST",
  1347. HTTPPath: "/",
  1348. }
  1349. if input == nil {
  1350. input = &UpdateListenerInput{}
  1351. }
  1352. output = &UpdateListenerOutput{}
  1353. req = c.newRequest(op, input, output)
  1354. return
  1355. }
  1356. // UpdateListener API operation for AWS Global Accelerator.
  1357. //
  1358. // Update a listener.
  1359. //
  1360. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1361. // with awserr.Error's Code and Message methods to get detailed information about
  1362. // the error.
  1363. //
  1364. // See the AWS API reference guide for AWS Global Accelerator's
  1365. // API operation UpdateListener for usage and error information.
  1366. //
  1367. // Returned Error Codes:
  1368. // * ErrCodeInvalidArgumentException "InvalidArgumentException"
  1369. // An argument that you specified is invalid.
  1370. //
  1371. // * ErrCodeInvalidPortRangeException "InvalidPortRangeException"
  1372. // The port numbers that you specified are not valid numbers or are not unique
  1373. // for this accelerator.
  1374. //
  1375. // * ErrCodeListenerNotFoundException "ListenerNotFoundException"
  1376. // The listener that you specified doesn't exist.
  1377. //
  1378. // * ErrCodeInternalServiceErrorException "InternalServiceErrorException"
  1379. // There was an internal error for AWS Global Accelerator.
  1380. //
  1381. // * ErrCodeLimitExceededException "LimitExceededException"
  1382. // Processing your request would cause you to exceed an AWS Global Accelerator
  1383. // limit.
  1384. //
  1385. // See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateListener
  1386. func (c *GlobalAccelerator) UpdateListener(input *UpdateListenerInput) (*UpdateListenerOutput, error) {
  1387. req, out := c.UpdateListenerRequest(input)
  1388. return out, req.Send()
  1389. }
  1390. // UpdateListenerWithContext is the same as UpdateListener with the addition of
  1391. // the ability to pass a context and additional request options.
  1392. //
  1393. // See UpdateListener for details on how to use this API operation.
  1394. //
  1395. // The context must be non-nil and will be used for request cancellation. If
  1396. // the context is nil a panic will occur. In the future the SDK may create
  1397. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1398. // for more information on using Contexts.
  1399. func (c *GlobalAccelerator) UpdateListenerWithContext(ctx aws.Context, input *UpdateListenerInput, opts ...request.Option) (*UpdateListenerOutput, error) {
  1400. req, out := c.UpdateListenerRequest(input)
  1401. req.SetContext(ctx)
  1402. req.ApplyOptions(opts...)
  1403. return out, req.Send()
  1404. }
  1405. // An accelerator is a complex type that includes one or more listeners that
  1406. // process inbound connections and then direct traffic to one or more endpoint
  1407. // groups, each of which includes endpoints, such as load balancers.
  1408. type Accelerator struct {
  1409. _ struct{} `type:"structure"`
  1410. // The Amazon Resource Name (ARN) of the accelerator.
  1411. AcceleratorArn *string `type:"string"`
  1412. // The date and time that the accelerator was created.
  1413. CreatedTime *time.Time `type:"timestamp"`
  1414. // Indicates whether theaccelerator is enabled. The value is true or false.
  1415. // The default value is true.
  1416. //
  1417. // If the value is set to true, the accelerator cannot be deleted. If set to
  1418. // false, accelerator can be deleted.
  1419. Enabled *bool `type:"boolean"`
  1420. // The value for the address type must be IPv4.
  1421. IpAddressType *string `type:"string" enum:"IpAddressType"`
  1422. // IP address set associated with the accelerator.
  1423. IpSets []*IpSet `type:"list"`
  1424. // The date and time that the accelerator was last modified.
  1425. LastModifiedTime *time.Time `type:"timestamp"`
  1426. // The name of the accelerator. The name can have a maximum of 32 characters,
  1427. // must contain only alphanumeric characters or hyphens (-), and must not begin
  1428. // or end with a hyphen.
  1429. Name *string `type:"string"`
  1430. // Describes the deployment status of the accelerator.
  1431. Status *string `type:"string" enum:"AcceleratorStatus"`
  1432. }
  1433. // String returns the string representation
  1434. func (s Accelerator) String() string {
  1435. return awsutil.Prettify(s)
  1436. }
  1437. // GoString returns the string representation
  1438. func (s Accelerator) GoString() string {
  1439. return s.String()
  1440. }
  1441. // SetAcceleratorArn sets the AcceleratorArn field's value.
  1442. func (s *Accelerator) SetAcceleratorArn(v string) *Accelerator {
  1443. s.AcceleratorArn = &v
  1444. return s
  1445. }
  1446. // SetCreatedTime sets the CreatedTime field's value.
  1447. func (s *Accelerator) SetCreatedTime(v time.Time) *Accelerator {
  1448. s.CreatedTime = &v
  1449. return s
  1450. }
  1451. // SetEnabled sets the Enabled field's value.
  1452. func (s *Accelerator) SetEnabled(v bool) *Accelerator {
  1453. s.Enabled = &v
  1454. return s
  1455. }
  1456. // SetIpAddressType sets the IpAddressType field's value.
  1457. func (s *Accelerator) SetIpAddressType(v string) *Accelerator {
  1458. s.IpAddressType = &v
  1459. return s
  1460. }
  1461. // SetIpSets sets the IpSets field's value.
  1462. func (s *Accelerator) SetIpSets(v []*IpSet) *Accelerator {
  1463. s.IpSets = v
  1464. return s
  1465. }
  1466. // SetLastModifiedTime sets the LastModifiedTime field's value.
  1467. func (s *Accelerator) SetLastModifiedTime(v time.Time) *Accelerator {
  1468. s.LastModifiedTime = &v
  1469. return s
  1470. }
  1471. // SetName sets the Name field's value.
  1472. func (s *Accelerator) SetName(v string) *Accelerator {
  1473. s.Name = &v
  1474. return s
  1475. }
  1476. // SetStatus sets the Status field's value.
  1477. func (s *Accelerator) SetStatus(v string) *Accelerator {
  1478. s.Status = &v
  1479. return s
  1480. }
  1481. // Attributes of an accelerator.
  1482. type AcceleratorAttributes struct {
  1483. _ struct{} `type:"structure"`
  1484. // Indicates whether flow logs are enabled. The default value is false. If the
  1485. // value is true, FlowLogsS3Bucket and FlowLogsS3Prefix must be specified.
  1486. //
  1487. // For more information, see Flow Logs (https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html)
  1488. // in the AWS Global Accelerator Developer Guide.
  1489. FlowLogsEnabled *bool `type:"boolean"`
  1490. // The name of the Amazon S3 bucket for the flow logs. Attribute is required
  1491. // if FlowLogsEnabled is true. The bucket must exist and have a bucket policy
  1492. // that grants AWS Global Accelerator permission to write to the bucket.
  1493. FlowLogsS3Bucket *string `type:"string"`
  1494. // The prefix for the location in the Amazon S3 bucket for the flow logs. Attribute
  1495. // is required if FlowLogsEnabled is true. If you don’t specify a prefix, the
  1496. // flow logs are stored in the root of the bucket.
  1497. FlowLogsS3Prefix *string `type:"string"`
  1498. }
  1499. // String returns the string representation
  1500. func (s AcceleratorAttributes) String() string {
  1501. return awsutil.Prettify(s)
  1502. }
  1503. // GoString returns the string representation
  1504. func (s AcceleratorAttributes) GoString() string {
  1505. return s.String()
  1506. }
  1507. // SetFlowLogsEnabled sets the FlowLogsEnabled field's value.
  1508. func (s *AcceleratorAttributes) SetFlowLogsEnabled(v bool) *AcceleratorAttributes {
  1509. s.FlowLogsEnabled = &v
  1510. return s
  1511. }
  1512. // SetFlowLogsS3Bucket sets the FlowLogsS3Bucket field's value.
  1513. func (s *AcceleratorAttributes) SetFlowLogsS3Bucket(v string) *AcceleratorAttributes {
  1514. s.FlowLogsS3Bucket = &v
  1515. return s
  1516. }
  1517. // SetFlowLogsS3Prefix sets the FlowLogsS3Prefix field's value.
  1518. func (s *AcceleratorAttributes) SetFlowLogsS3Prefix(v string) *AcceleratorAttributes {
  1519. s.FlowLogsS3Prefix = &v
  1520. return s
  1521. }
  1522. type CreateAcceleratorInput struct {
  1523. _ struct{} `type:"structure"`
  1524. // Indicates whether an accelerator is enabled. The value is true or false.
  1525. // The default value is true.
  1526. //
  1527. // If the value is set to true, an accelerator cannot be deleted. If set to
  1528. // false, the accelerator can be deleted.
  1529. Enabled *bool `type:"boolean"`
  1530. // A unique, case-sensitive identifier that you provide to ensure the idempotency—that
  1531. // is, the uniqueness—of an accelerator.
  1532. //
  1533. // IdempotencyToken is a required field
  1534. IdempotencyToken *string `type:"string" required:"true"`
  1535. // The value for the address type must be IPv4.
  1536. IpAddressType *string `type:"string" enum:"IpAddressType"`
  1537. // The name of an accelerator. The name can have a maximum of 32 characters,
  1538. // must contain only alphanumeric characters or hyphens (-), and must not begin
  1539. // or end with a hyphen.
  1540. //
  1541. // Name is a required field
  1542. Name *string `type:"string" required:"true"`
  1543. }
  1544. // String returns the string representation
  1545. func (s CreateAcceleratorInput) String() string {
  1546. return awsutil.Prettify(s)
  1547. }
  1548. // GoString returns the string representation
  1549. func (s CreateAcceleratorInput) GoString() string {
  1550. return s.String()
  1551. }
  1552. // Validate inspects the fields of the type to determine if they are valid.
  1553. func (s *CreateAcceleratorInput) Validate() error {
  1554. invalidParams := request.ErrInvalidParams{Context: "CreateAcceleratorInput"}
  1555. if s.IdempotencyToken == nil {
  1556. invalidParams.Add(request.NewErrParamRequired("IdempotencyToken"))
  1557. }
  1558. if s.Name == nil {
  1559. invalidParams.Add(request.NewErrParamRequired("Name"))
  1560. }
  1561. if invalidParams.Len() > 0 {
  1562. return invalidParams
  1563. }
  1564. return nil
  1565. }
  1566. // SetEnabled sets the Enabled field's value.
  1567. func (s *CreateAcceleratorInput) SetEnabled(v bool) *CreateAcceleratorInput {
  1568. s.Enabled = &v
  1569. return s
  1570. }
  1571. // SetIdempotencyToken sets the IdempotencyToken field's value.
  1572. func (s *CreateAcceleratorInput) SetIdempotencyToken(v string) *CreateAcceleratorInput {
  1573. s.IdempotencyToken = &v
  1574. return s
  1575. }
  1576. // SetIpAddressType sets the IpAddressType field's value.
  1577. func (s *CreateAcceleratorInput) SetIpAddressType(v string) *CreateAcceleratorInput {
  1578. s.IpAddressType = &v
  1579. return s
  1580. }
  1581. // SetName sets the Name field's value.
  1582. func (s *CreateAcceleratorInput) SetName(v string) *CreateAcceleratorInput {
  1583. s.Name = &v
  1584. return s
  1585. }
  1586. type CreateAcceleratorOutput struct {
  1587. _ struct{} `type:"structure"`
  1588. // The accelerator that is created by specifying a listener and the supported
  1589. // IP address types.
  1590. Accelerator *Accelerator `type:"structure"`
  1591. }
  1592. // String returns the string representation
  1593. func (s CreateAcceleratorOutput) String() string {
  1594. return awsutil.Prettify(s)
  1595. }
  1596. // GoString returns the string representation
  1597. func (s CreateAcceleratorOutput) GoString() string {
  1598. return s.String()
  1599. }
  1600. // SetAccelerator sets the Accelerator field's value.
  1601. func (s *CreateAcceleratorOutput) SetAccelerator(v *Accelerator) *CreateAcceleratorOutput {
  1602. s.Accelerator = v
  1603. return s
  1604. }
  1605. type CreateEndpointGroupInput struct {
  1606. _ struct{} `type:"structure"`
  1607. // The list of endpoint objects.
  1608. EndpointConfigurations []*EndpointConfiguration `type:"list"`
  1609. // The name of the AWS Region where the endpoint group is located. A listener
  1610. // can have only one endpoint group in a specific Region.
  1611. //
  1612. // EndpointGroupRegion is a required field
  1613. EndpointGroupRegion *string `type:"string" required:"true"`
  1614. // The time—10 seconds or 30 seconds—between each health check for an endpoint.
  1615. // The default value is 30.
  1616. HealthCheckIntervalSeconds *int64 `min:"10" type:"integer"`
  1617. // If the protocol is HTTP/S, then this specifies the path that is the destination
  1618. // for health check targets. The default value is slash (/).
  1619. HealthCheckPath *string `type:"string"`
  1620. // The port that AWS Global Accelerator uses to check the health of endpoints
  1621. // that are part of this endpoint group. The default port is the listener port
  1622. // that this endpoint group is associated with. If listener port is a list of
  1623. // ports, Global Accelerator uses the first port in the list.
  1624. HealthCheckPort *int64 `min:"1" type:"integer"`
  1625. // The protocol that AWS Global Accelerator uses to check the health of endpoints
  1626. // that are part of this endpoint group. The default value is TCP.
  1627. HealthCheckProtocol *string `type:"string" enum:"HealthCheckProtocol"`
  1628. // A unique, case-sensitive identifier that you provide to ensure the idempotency—that
  1629. // is, the uniqueness—of the request.
  1630. //
  1631. // IdempotencyToken is a required field
  1632. IdempotencyToken *string `type:"string" required:"true"`
  1633. // The Amazon Resource Name (ARN) of the listener.
  1634. //
  1635. // ListenerArn is a required field
  1636. ListenerArn *string `type:"string" required:"true"`
  1637. // The number of consecutive health checks required to set the state of a healthy
  1638. // endpoint to unhealthy, or to set an unhealthy endpoint to healthy. The default
  1639. // value is 3.
  1640. ThresholdCount *int64 `min:"1" type:"integer"`
  1641. // The percentage of traffic to send to an AWS Region. Additional traffic is
  1642. // distributed to other endpoint groups for this listener.
  1643. //
  1644. // Use this action to increase (dial up) or decrease (dial down) traffic to
  1645. // a specific Region. The percentage is applied to the traffic that would otherwise
  1646. // have been routed to the Region based on optimal routing.
  1647. //
  1648. // The default value is 100.
  1649. TrafficDialPercentage *float64 `type:"float"`
  1650. }
  1651. // String returns the string representation
  1652. func (s CreateEndpointGroupInput) String() string {
  1653. return awsutil.Prettify(s)
  1654. }
  1655. // GoString returns the string representation
  1656. func (s CreateEndpointGroupInput) GoString() string {
  1657. return s.String()
  1658. }
  1659. // Validate inspects the fields of the type to determine if they are valid.
  1660. func (s *CreateEndpointGroupInput) Validate() error {
  1661. invalidParams := request.ErrInvalidParams{Context: "CreateEndpointGroupInput"}
  1662. if s.EndpointGroupRegion == nil {
  1663. invalidParams.Add(request.NewErrParamRequired("EndpointGroupRegion"))
  1664. }
  1665. if s.HealthCheckIntervalSeconds != nil && *s.HealthCheckIntervalSeconds < 10 {
  1666. invalidParams.Add(request.NewErrParamMinValue("HealthCheckIntervalSeconds", 10))
  1667. }
  1668. if s.HealthCheckPort != nil && *s.HealthCheckPort < 1 {
  1669. invalidParams.Add(request.NewErrParamMinValue("HealthCheckPort", 1))
  1670. }
  1671. if s.IdempotencyToken == nil {
  1672. invalidParams.Add(request.NewErrParamRequired("IdempotencyToken"))
  1673. }
  1674. if s.ListenerArn == nil {
  1675. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  1676. }
  1677. if s.ThresholdCount != nil && *s.ThresholdCount < 1 {
  1678. invalidParams.Add(request.NewErrParamMinValue("ThresholdCount", 1))
  1679. }
  1680. if invalidParams.Len() > 0 {
  1681. return invalidParams
  1682. }
  1683. return nil
  1684. }
  1685. // SetEndpointConfigurations sets the EndpointConfigurations field's value.
  1686. func (s *CreateEndpointGroupInput) SetEndpointConfigurations(v []*EndpointConfiguration) *CreateEndpointGroupInput {
  1687. s.EndpointConfigurations = v
  1688. return s
  1689. }
  1690. // SetEndpointGroupRegion sets the EndpointGroupRegion field's value.
  1691. func (s *CreateEndpointGroupInput) SetEndpointGroupRegion(v string) *CreateEndpointGroupInput {
  1692. s.EndpointGroupRegion = &v
  1693. return s
  1694. }
  1695. // SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value.
  1696. func (s *CreateEndpointGroupInput) SetHealthCheckIntervalSeconds(v int64) *CreateEndpointGroupInput {
  1697. s.HealthCheckIntervalSeconds = &v
  1698. return s
  1699. }
  1700. // SetHealthCheckPath sets the HealthCheckPath field's value.
  1701. func (s *CreateEndpointGroupInput) SetHealthCheckPath(v string) *CreateEndpointGroupInput {
  1702. s.HealthCheckPath = &v
  1703. return s
  1704. }
  1705. // SetHealthCheckPort sets the HealthCheckPort field's value.
  1706. func (s *CreateEndpointGroupInput) SetHealthCheckPort(v int64) *CreateEndpointGroupInput {
  1707. s.HealthCheckPort = &v
  1708. return s
  1709. }
  1710. // SetHealthCheckProtocol sets the HealthCheckProtocol field's value.
  1711. func (s *CreateEndpointGroupInput) SetHealthCheckProtocol(v string) *CreateEndpointGroupInput {
  1712. s.HealthCheckProtocol = &v
  1713. return s
  1714. }
  1715. // SetIdempotencyToken sets the IdempotencyToken field's value.
  1716. func (s *CreateEndpointGroupInput) SetIdempotencyToken(v string) *CreateEndpointGroupInput {
  1717. s.IdempotencyToken = &v
  1718. return s
  1719. }
  1720. // SetListenerArn sets the ListenerArn field's value.
  1721. func (s *CreateEndpointGroupInput) SetListenerArn(v string) *CreateEndpointGroupInput {
  1722. s.ListenerArn = &v
  1723. return s
  1724. }
  1725. // SetThresholdCount sets the ThresholdCount field's value.
  1726. func (s *CreateEndpointGroupInput) SetThresholdCount(v int64) *CreateEndpointGroupInput {
  1727. s.ThresholdCount = &v
  1728. return s
  1729. }
  1730. // SetTrafficDialPercentage sets the TrafficDialPercentage field's value.
  1731. func (s *CreateEndpointGroupInput) SetTrafficDialPercentage(v float64) *CreateEndpointGroupInput {
  1732. s.TrafficDialPercentage = &v
  1733. return s
  1734. }
  1735. type CreateEndpointGroupOutput struct {
  1736. _ struct{} `type:"structure"`
  1737. // The information about the endpoint group that was created.
  1738. EndpointGroup *EndpointGroup `type:"structure"`
  1739. }
  1740. // String returns the string representation
  1741. func (s CreateEndpointGroupOutput) String() string {
  1742. return awsutil.Prettify(s)
  1743. }
  1744. // GoString returns the string representation
  1745. func (s CreateEndpointGroupOutput) GoString() string {
  1746. return s.String()
  1747. }
  1748. // SetEndpointGroup sets the EndpointGroup field's value.
  1749. func (s *CreateEndpointGroupOutput) SetEndpointGroup(v *EndpointGroup) *CreateEndpointGroupOutput {
  1750. s.EndpointGroup = v
  1751. return s
  1752. }
  1753. type CreateListenerInput struct {
  1754. _ struct{} `type:"structure"`
  1755. // The Amazon Resource Name (ARN) of your accelerator.
  1756. //
  1757. // AcceleratorArn is a required field
  1758. AcceleratorArn *string `type:"string" required:"true"`
  1759. // Client affinity lets you direct all requests from a user to the same endpoint,
  1760. // if you have stateful applications, regardless of the port and protocol of
  1761. // the client request. Clienty affinity gives you control over whether to always
  1762. // route each client to the same specific endpoint.
  1763. //
  1764. // AWS Global Accelerator uses a consistent-flow hashing algorithm to choose
  1765. // the optimal endpoint for a connection. If client affinity is NONE, Global
  1766. // Accelerator uses the "five-tuple" (5-tuple) properties—source IP address,
  1767. // source port, destination IP address, destination port, and protocol—to select
  1768. // the hash value, and then chooses the best endpoint. However, with this setting,
  1769. // if someone uses different ports to connect to Global Accelerator, their connections
  1770. // might not be always routed to the same endpoint because the hash value changes.
  1771. //
  1772. // If you want a given client to always be routed to the same endpoint, set
  1773. // client affinity to SOURCE_IP instead. When you use the SOURCE_IP setting,
  1774. // Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client)
  1775. // IP address and destination IP address—to select the hash value.
  1776. //
  1777. // The default value is NONE.
  1778. ClientAffinity *string `type:"string" enum:"ClientAffinity"`
  1779. // A unique, case-sensitive identifier that you provide to ensure the idempotency—that
  1780. // is, the uniqueness—of the request.
  1781. //
  1782. // IdempotencyToken is a required field
  1783. IdempotencyToken *string `type:"string" required:"true"`
  1784. // The list of port ranges to support for connections from clients to your accelerator.
  1785. //
  1786. // PortRanges is a required field
  1787. PortRanges []*PortRange `min:"1" type:"list" required:"true"`
  1788. // The protocol for connections from clients to your accelerator.
  1789. //
  1790. // Protocol is a required field
  1791. Protocol *string `type:"string" required:"true" enum:"Protocol"`
  1792. }
  1793. // String returns the string representation
  1794. func (s CreateListenerInput) String() string {
  1795. return awsutil.Prettify(s)
  1796. }
  1797. // GoString returns the string representation
  1798. func (s CreateListenerInput) GoString() string {
  1799. return s.String()
  1800. }
  1801. // Validate inspects the fields of the type to determine if they are valid.
  1802. func (s *CreateListenerInput) Validate() error {
  1803. invalidParams := request.ErrInvalidParams{Context: "CreateListenerInput"}
  1804. if s.AcceleratorArn == nil {
  1805. invalidParams.Add(request.NewErrParamRequired("AcceleratorArn"))
  1806. }
  1807. if s.IdempotencyToken == nil {
  1808. invalidParams.Add(request.NewErrParamRequired("IdempotencyToken"))
  1809. }
  1810. if s.PortRanges == nil {
  1811. invalidParams.Add(request.NewErrParamRequired("PortRanges"))
  1812. }
  1813. if s.PortRanges != nil && len(s.PortRanges) < 1 {
  1814. invalidParams.Add(request.NewErrParamMinLen("PortRanges", 1))
  1815. }
  1816. if s.Protocol == nil {
  1817. invalidParams.Add(request.NewErrParamRequired("Protocol"))
  1818. }
  1819. if s.PortRanges != nil {
  1820. for i, v := range s.PortRanges {
  1821. if v == nil {
  1822. continue
  1823. }
  1824. if err := v.Validate(); err != nil {
  1825. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PortRanges", i), err.(request.ErrInvalidParams))
  1826. }
  1827. }
  1828. }
  1829. if invalidParams.Len() > 0 {
  1830. return invalidParams
  1831. }
  1832. return nil
  1833. }
  1834. // SetAcceleratorArn sets the AcceleratorArn field's value.
  1835. func (s *CreateListenerInput) SetAcceleratorArn(v string) *CreateListenerInput {
  1836. s.AcceleratorArn = &v
  1837. return s
  1838. }
  1839. // SetClientAffinity sets the ClientAffinity field's value.
  1840. func (s *CreateListenerInput) SetClientAffinity(v string) *CreateListenerInput {
  1841. s.ClientAffinity = &v
  1842. return s
  1843. }
  1844. // SetIdempotencyToken sets the IdempotencyToken field's value.
  1845. func (s *CreateListenerInput) SetIdempotencyToken(v string) *CreateListenerInput {
  1846. s.IdempotencyToken = &v
  1847. return s
  1848. }
  1849. // SetPortRanges sets the PortRanges field's value.
  1850. func (s *CreateListenerInput) SetPortRanges(v []*PortRange) *CreateListenerInput {
  1851. s.PortRanges = v
  1852. return s
  1853. }
  1854. // SetProtocol sets the Protocol field's value.
  1855. func (s *CreateListenerInput) SetProtocol(v string) *CreateListenerInput {
  1856. s.Protocol = &v
  1857. return s
  1858. }
  1859. type CreateListenerOutput struct {
  1860. _ struct{} `type:"structure"`
  1861. // The listener that you've created.
  1862. Listener *Listener `type:"structure"`
  1863. }
  1864. // String returns the string representation
  1865. func (s CreateListenerOutput) String() string {
  1866. return awsutil.Prettify(s)
  1867. }
  1868. // GoString returns the string representation
  1869. func (s CreateListenerOutput) GoString() string {
  1870. return s.String()
  1871. }
  1872. // SetListener sets the Listener field's value.
  1873. func (s *CreateListenerOutput) SetListener(v *Listener) *CreateListenerOutput {
  1874. s.Listener = v
  1875. return s
  1876. }
  1877. type DeleteAcceleratorInput struct {
  1878. _ struct{} `type:"structure"`
  1879. // The Amazon Resource Name (ARN) of an accelerator.
  1880. //
  1881. // AcceleratorArn is a required field
  1882. AcceleratorArn *string `type:"string" required:"true"`
  1883. }
  1884. // String returns the string representation
  1885. func (s DeleteAcceleratorInput) String() string {
  1886. return awsutil.Prettify(s)
  1887. }
  1888. // GoString returns the string representation
  1889. func (s DeleteAcceleratorInput) GoString() string {
  1890. return s.String()
  1891. }
  1892. // Validate inspects the fields of the type to determine if they are valid.
  1893. func (s *DeleteAcceleratorInput) Validate() error {
  1894. invalidParams := request.ErrInvalidParams{Context: "DeleteAcceleratorInput"}
  1895. if s.AcceleratorArn == nil {
  1896. invalidParams.Add(request.NewErrParamRequired("AcceleratorArn"))
  1897. }
  1898. if invalidParams.Len() > 0 {
  1899. return invalidParams
  1900. }
  1901. return nil
  1902. }
  1903. // SetAcceleratorArn sets the AcceleratorArn field's value.
  1904. func (s *DeleteAcceleratorInput) SetAcceleratorArn(v string) *DeleteAcceleratorInput {
  1905. s.AcceleratorArn = &v
  1906. return s
  1907. }
  1908. type DeleteAcceleratorOutput struct {
  1909. _ struct{} `type:"structure"`
  1910. }
  1911. // String returns the string representation
  1912. func (s DeleteAcceleratorOutput) String() string {
  1913. return awsutil.Prettify(s)
  1914. }
  1915. // GoString returns the string representation
  1916. func (s DeleteAcceleratorOutput) GoString() string {
  1917. return s.String()
  1918. }
  1919. type DeleteEndpointGroupInput struct {
  1920. _ struct{} `type:"structure"`
  1921. // The Amazon Resource Name (ARN) of the endpoint group to delete.
  1922. //
  1923. // EndpointGroupArn is a required field
  1924. EndpointGroupArn *string `type:"string" required:"true"`
  1925. }
  1926. // String returns the string representation
  1927. func (s DeleteEndpointGroupInput) String() string {
  1928. return awsutil.Prettify(s)
  1929. }
  1930. // GoString returns the string representation
  1931. func (s DeleteEndpointGroupInput) GoString() string {
  1932. return s.String()
  1933. }
  1934. // Validate inspects the fields of the type to determine if they are valid.
  1935. func (s *DeleteEndpointGroupInput) Validate() error {
  1936. invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointGroupInput"}
  1937. if s.EndpointGroupArn == nil {
  1938. invalidParams.Add(request.NewErrParamRequired("EndpointGroupArn"))
  1939. }
  1940. if invalidParams.Len() > 0 {
  1941. return invalidParams
  1942. }
  1943. return nil
  1944. }
  1945. // SetEndpointGroupArn sets the EndpointGroupArn field's value.
  1946. func (s *DeleteEndpointGroupInput) SetEndpointGroupArn(v string) *DeleteEndpointGroupInput {
  1947. s.EndpointGroupArn = &v
  1948. return s
  1949. }
  1950. type DeleteEndpointGroupOutput struct {
  1951. _ struct{} `type:"structure"`
  1952. }
  1953. // String returns the string representation
  1954. func (s DeleteEndpointGroupOutput) String() string {
  1955. return awsutil.Prettify(s)
  1956. }
  1957. // GoString returns the string representation
  1958. func (s DeleteEndpointGroupOutput) GoString() string {
  1959. return s.String()
  1960. }
  1961. type DeleteListenerInput struct {
  1962. _ struct{} `type:"structure"`
  1963. // The Amazon Resource Name (ARN) of the listener.
  1964. //
  1965. // ListenerArn is a required field
  1966. ListenerArn *string `type:"string" required:"true"`
  1967. }
  1968. // String returns the string representation
  1969. func (s DeleteListenerInput) String() string {
  1970. return awsutil.Prettify(s)
  1971. }
  1972. // GoString returns the string representation
  1973. func (s DeleteListenerInput) GoString() string {
  1974. return s.String()
  1975. }
  1976. // Validate inspects the fields of the type to determine if they are valid.
  1977. func (s *DeleteListenerInput) Validate() error {
  1978. invalidParams := request.ErrInvalidParams{Context: "DeleteListenerInput"}
  1979. if s.ListenerArn == nil {
  1980. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  1981. }
  1982. if invalidParams.Len() > 0 {
  1983. return invalidParams
  1984. }
  1985. return nil
  1986. }
  1987. // SetListenerArn sets the ListenerArn field's value.
  1988. func (s *DeleteListenerInput) SetListenerArn(v string) *DeleteListenerInput {
  1989. s.ListenerArn = &v
  1990. return s
  1991. }
  1992. type DeleteListenerOutput struct {
  1993. _ struct{} `type:"structure"`
  1994. }
  1995. // String returns the string representation
  1996. func (s DeleteListenerOutput) String() string {
  1997. return awsutil.Prettify(s)
  1998. }
  1999. // GoString returns the string representation
  2000. func (s DeleteListenerOutput) GoString() string {
  2001. return s.String()
  2002. }
  2003. type DescribeAcceleratorAttributesInput struct {
  2004. _ struct{} `type:"structure"`
  2005. // The Amazon Resource Name (ARN) of the accelerator with the attributes that
  2006. // you want to describe. Value is required.
  2007. AcceleratorArn *string `type:"string"`
  2008. }
  2009. // String returns the string representation
  2010. func (s DescribeAcceleratorAttributesInput) String() string {
  2011. return awsutil.Prettify(s)
  2012. }
  2013. // GoString returns the string representation
  2014. func (s DescribeAcceleratorAttributesInput) GoString() string {
  2015. return s.String()
  2016. }
  2017. // SetAcceleratorArn sets the AcceleratorArn field's value.
  2018. func (s *DescribeAcceleratorAttributesInput) SetAcceleratorArn(v string) *DescribeAcceleratorAttributesInput {
  2019. s.AcceleratorArn = &v
  2020. return s
  2021. }
  2022. type DescribeAcceleratorAttributesOutput struct {
  2023. _ struct{} `type:"structure"`
  2024. // The attributes of the accelerator.
  2025. AcceleratorAttributes *AcceleratorAttributes `type:"structure"`
  2026. }
  2027. // String returns the string representation
  2028. func (s DescribeAcceleratorAttributesOutput) String() string {
  2029. return awsutil.Prettify(s)
  2030. }
  2031. // GoString returns the string representation
  2032. func (s DescribeAcceleratorAttributesOutput) GoString() string {
  2033. return s.String()
  2034. }
  2035. // SetAcceleratorAttributes sets the AcceleratorAttributes field's value.
  2036. func (s *DescribeAcceleratorAttributesOutput) SetAcceleratorAttributes(v *AcceleratorAttributes) *DescribeAcceleratorAttributesOutput {
  2037. s.AcceleratorAttributes = v
  2038. return s
  2039. }
  2040. type DescribeAcceleratorInput struct {
  2041. _ struct{} `type:"structure"`
  2042. // The Amazon Resource Name (ARN) of the accelerator to describe.
  2043. //
  2044. // AcceleratorArn is a required field
  2045. AcceleratorArn *string `type:"string" required:"true"`
  2046. }
  2047. // String returns the string representation
  2048. func (s DescribeAcceleratorInput) String() string {
  2049. return awsutil.Prettify(s)
  2050. }
  2051. // GoString returns the string representation
  2052. func (s DescribeAcceleratorInput) GoString() string {
  2053. return s.String()
  2054. }
  2055. // Validate inspects the fields of the type to determine if they are valid.
  2056. func (s *DescribeAcceleratorInput) Validate() error {
  2057. invalidParams := request.ErrInvalidParams{Context: "DescribeAcceleratorInput"}
  2058. if s.AcceleratorArn == nil {
  2059. invalidParams.Add(request.NewErrParamRequired("AcceleratorArn"))
  2060. }
  2061. if invalidParams.Len() > 0 {
  2062. return invalidParams
  2063. }
  2064. return nil
  2065. }
  2066. // SetAcceleratorArn sets the AcceleratorArn field's value.
  2067. func (s *DescribeAcceleratorInput) SetAcceleratorArn(v string) *DescribeAcceleratorInput {
  2068. s.AcceleratorArn = &v
  2069. return s
  2070. }
  2071. type DescribeAcceleratorOutput struct {
  2072. _ struct{} `type:"structure"`
  2073. // The description of the accelerator.
  2074. Accelerator *Accelerator `type:"structure"`
  2075. }
  2076. // String returns the string representation
  2077. func (s DescribeAcceleratorOutput) String() string {
  2078. return awsutil.Prettify(s)
  2079. }
  2080. // GoString returns the string representation
  2081. func (s DescribeAcceleratorOutput) GoString() string {
  2082. return s.String()
  2083. }
  2084. // SetAccelerator sets the Accelerator field's value.
  2085. func (s *DescribeAcceleratorOutput) SetAccelerator(v *Accelerator) *DescribeAcceleratorOutput {
  2086. s.Accelerator = v
  2087. return s
  2088. }
  2089. type DescribeEndpointGroupInput struct {
  2090. _ struct{} `type:"structure"`
  2091. // The Amazon Resource Name (ARN) of the endpoint group to describe.
  2092. //
  2093. // EndpointGroupArn is a required field
  2094. EndpointGroupArn *string `type:"string" required:"true"`
  2095. }
  2096. // String returns the string representation
  2097. func (s DescribeEndpointGroupInput) String() string {
  2098. return awsutil.Prettify(s)
  2099. }
  2100. // GoString returns the string representation
  2101. func (s DescribeEndpointGroupInput) GoString() string {
  2102. return s.String()
  2103. }
  2104. // Validate inspects the fields of the type to determine if they are valid.
  2105. func (s *DescribeEndpointGroupInput) Validate() error {
  2106. invalidParams := request.ErrInvalidParams{Context: "DescribeEndpointGroupInput"}
  2107. if s.EndpointGroupArn == nil {
  2108. invalidParams.Add(request.NewErrParamRequired("EndpointGroupArn"))
  2109. }
  2110. if invalidParams.Len() > 0 {
  2111. return invalidParams
  2112. }
  2113. return nil
  2114. }
  2115. // SetEndpointGroupArn sets the EndpointGroupArn field's value.
  2116. func (s *DescribeEndpointGroupInput) SetEndpointGroupArn(v string) *DescribeEndpointGroupInput {
  2117. s.EndpointGroupArn = &v
  2118. return s
  2119. }
  2120. type DescribeEndpointGroupOutput struct {
  2121. _ struct{} `type:"structure"`
  2122. // The description of an endpoint group.
  2123. EndpointGroup *EndpointGroup `type:"structure"`
  2124. }
  2125. // String returns the string representation
  2126. func (s DescribeEndpointGroupOutput) String() string {
  2127. return awsutil.Prettify(s)
  2128. }
  2129. // GoString returns the string representation
  2130. func (s DescribeEndpointGroupOutput) GoString() string {
  2131. return s.String()
  2132. }
  2133. // SetEndpointGroup sets the EndpointGroup field's value.
  2134. func (s *DescribeEndpointGroupOutput) SetEndpointGroup(v *EndpointGroup) *DescribeEndpointGroupOutput {
  2135. s.EndpointGroup = v
  2136. return s
  2137. }
  2138. type DescribeListenerInput struct {
  2139. _ struct{} `type:"structure"`
  2140. // The Amazon Resource Name (ARN) of the listener to describe.
  2141. //
  2142. // ListenerArn is a required field
  2143. ListenerArn *string `type:"string" required:"true"`
  2144. }
  2145. // String returns the string representation
  2146. func (s DescribeListenerInput) String() string {
  2147. return awsutil.Prettify(s)
  2148. }
  2149. // GoString returns the string representation
  2150. func (s DescribeListenerInput) GoString() string {
  2151. return s.String()
  2152. }
  2153. // Validate inspects the fields of the type to determine if they are valid.
  2154. func (s *DescribeListenerInput) Validate() error {
  2155. invalidParams := request.ErrInvalidParams{Context: "DescribeListenerInput"}
  2156. if s.ListenerArn == nil {
  2157. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  2158. }
  2159. if invalidParams.Len() > 0 {
  2160. return invalidParams
  2161. }
  2162. return nil
  2163. }
  2164. // SetListenerArn sets the ListenerArn field's value.
  2165. func (s *DescribeListenerInput) SetListenerArn(v string) *DescribeListenerInput {
  2166. s.ListenerArn = &v
  2167. return s
  2168. }
  2169. type DescribeListenerOutput struct {
  2170. _ struct{} `type:"structure"`
  2171. // The description of a listener.
  2172. Listener *Listener `type:"structure"`
  2173. }
  2174. // String returns the string representation
  2175. func (s DescribeListenerOutput) String() string {
  2176. return awsutil.Prettify(s)
  2177. }
  2178. // GoString returns the string representation
  2179. func (s DescribeListenerOutput) GoString() string {
  2180. return s.String()
  2181. }
  2182. // SetListener sets the Listener field's value.
  2183. func (s *DescribeListenerOutput) SetListener(v *Listener) *DescribeListenerOutput {
  2184. s.Listener = v
  2185. return s
  2186. }
  2187. // A complex type for endpoints.
  2188. type EndpointConfiguration struct {
  2189. _ struct{} `type:"structure"`
  2190. // An ID for the endpoint. If the endpoint is a Network Load Balancer or Application
  2191. // Load Balancer, this is the Amazon Resource Name (ARN) of the resource. If
  2192. // the endpoint is an Elastic IP address, this is the Elastic IP address allocation
  2193. // ID.
  2194. EndpointId *string `type:"string"`
  2195. // The weight associated with the endpoint. When you add weights to endpoints,
  2196. // you configure AWS Global Accelerator to route traffic based on proportions
  2197. // that you specify. For example, you might specify endpoint weights of 4, 5,
  2198. // 5, and 6 (sum=20). The result is that 4/20 of your traffic, on average, is
  2199. // routed to the first endpoint, 5/20 is routed both to the second and third
  2200. // endpoints, and 6/20 is routed to the last endpoint. For more information,
  2201. // see Endpoint Weights (https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html)
  2202. // in the AWS Global Accelerator Developer Guide.
  2203. Weight *int64 `type:"integer"`
  2204. }
  2205. // String returns the string representation
  2206. func (s EndpointConfiguration) String() string {
  2207. return awsutil.Prettify(s)
  2208. }
  2209. // GoString returns the string representation
  2210. func (s EndpointConfiguration) GoString() string {
  2211. return s.String()
  2212. }
  2213. // SetEndpointId sets the EndpointId field's value.
  2214. func (s *EndpointConfiguration) SetEndpointId(v string) *EndpointConfiguration {
  2215. s.EndpointId = &v
  2216. return s
  2217. }
  2218. // SetWeight sets the Weight field's value.
  2219. func (s *EndpointConfiguration) SetWeight(v int64) *EndpointConfiguration {
  2220. s.Weight = &v
  2221. return s
  2222. }
  2223. // A complex type for an endpoint. Each endpoint group can include one or more
  2224. // endpoints, such as load balancers.
  2225. type EndpointDescription struct {
  2226. _ struct{} `type:"structure"`
  2227. // An ID for the endpoint. If the endpoint is a Network Load Balancer or Application
  2228. // Load Balancer, this is the Amazon Resource Name (ARN) of the resource. If
  2229. // the endpoint is an Elastic IP address, this is the Elastic IP address allocation
  2230. // ID.
  2231. EndpointId *string `type:"string"`
  2232. // The reason code associated with why the endpoint is not healthy. If the endpoint
  2233. // state is healthy, a reason code is not provided.
  2234. //
  2235. // If the endpoint state is unhealthy, the reason code can be one of the following
  2236. // values:
  2237. //
  2238. // * Timeout: The health check requests to the endpoint are timing out before
  2239. // returning a status.
  2240. //
  2241. // * Failed: The health check failed, for example because the endpoint response
  2242. // was invalid (malformed).
  2243. //
  2244. // If the endpoint state is initial, the reason code can be one of the following
  2245. // values:
  2246. //
  2247. // * ProvisioningInProgress: The endpoint is in the process of being provisioned.
  2248. //
  2249. // * InitialHealthChecking: Global Accelerator is still setting up the minimum
  2250. // number of health checks for the endpoint that are required to determine
  2251. // its health status.
  2252. HealthReason *string `type:"string"`
  2253. // The health status of the endpoint.
  2254. HealthState *string `type:"string" enum:"HealthState"`
  2255. // The weight associated with the endpoint. When you add weights to endpoints,
  2256. // you configure AWS Global Accelerator to route traffic based on proportions
  2257. // that you specify. For example, you might specify endpoint weights of 4, 5,
  2258. // 5, and 6 (sum=20). The result is that 4/20 of your traffic, on average, is
  2259. // routed to the first endpoint, 5/20 is routed both to the second and third
  2260. // endpoints, and 6/20 is routed to the last endpoint. For more information,
  2261. // see Endpoint Weights (https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html)
  2262. // in the AWS Global Accelerator Developer Guide.
  2263. Weight *int64 `type:"integer"`
  2264. }
  2265. // String returns the string representation
  2266. func (s EndpointDescription) String() string {
  2267. return awsutil.Prettify(s)
  2268. }
  2269. // GoString returns the string representation
  2270. func (s EndpointDescription) GoString() string {
  2271. return s.String()
  2272. }
  2273. // SetEndpointId sets the EndpointId field's value.
  2274. func (s *EndpointDescription) SetEndpointId(v string) *EndpointDescription {
  2275. s.EndpointId = &v
  2276. return s
  2277. }
  2278. // SetHealthReason sets the HealthReason field's value.
  2279. func (s *EndpointDescription) SetHealthReason(v string) *EndpointDescription {
  2280. s.HealthReason = &v
  2281. return s
  2282. }
  2283. // SetHealthState sets the HealthState field's value.
  2284. func (s *EndpointDescription) SetHealthState(v string) *EndpointDescription {
  2285. s.HealthState = &v
  2286. return s
  2287. }
  2288. // SetWeight sets the Weight field's value.
  2289. func (s *EndpointDescription) SetWeight(v int64) *EndpointDescription {
  2290. s.Weight = &v
  2291. return s
  2292. }
  2293. // A complex type for the endpoint group. An AWS Region can have only one endpoint
  2294. // group for a specific listener.
  2295. type EndpointGroup struct {
  2296. _ struct{} `type:"structure"`
  2297. // The list of endpoint objects.
  2298. EndpointDescriptions []*EndpointDescription `type:"list"`
  2299. // The Amazon Resource Name (ARN) of the endpoint group.
  2300. EndpointGroupArn *string `type:"string"`
  2301. // The AWS Region that this endpoint group belongs.
  2302. EndpointGroupRegion *string `type:"string"`
  2303. // The time—10 seconds or 30 seconds—between health checks for each endpoint.
  2304. // The default value is 30.
  2305. HealthCheckIntervalSeconds *int64 `min:"10" type:"integer"`
  2306. // If the protocol is HTTP/S, then this value provides the ping path that Global
  2307. // Accelerator uses for the destination on the endpoints for health checks.
  2308. // The default is slash (/).
  2309. HealthCheckPath *string `type:"string"`
  2310. // The port that Global Accelerator uses to perform health checks on endpoints
  2311. // that are part of this endpoint group.
  2312. //
  2313. // The default port is the port for the listener that this endpoint group is
  2314. // associated with. If the listener port is a list, Global Accelerator uses
  2315. // the first specified port in the list of ports.
  2316. HealthCheckPort *int64 `min:"1" type:"integer"`
  2317. // The protocol that Global Accelerator uses to perform health checks on endpoints
  2318. // that are part of this endpoint group. The default value is TCP.
  2319. HealthCheckProtocol *string `type:"string" enum:"HealthCheckProtocol"`
  2320. // The number of consecutive health checks required to set the state of a healthy
  2321. // endpoint to unhealthy, or to set an unhealthy endpoint to healthy. The default
  2322. // value is 3.
  2323. ThresholdCount *int64 `min:"1" type:"integer"`
  2324. // The percentage of traffic to send to an AWS Region. Additional traffic is
  2325. // distributed to other endpoint groups for this listener.
  2326. //
  2327. // Use this action to increase (dial up) or decrease (dial down) traffic to
  2328. // a specific Region. The percentage is applied to the traffic that would otherwise
  2329. // have been routed to the Region based on optimal routing.
  2330. //
  2331. // The default value is 100.
  2332. TrafficDialPercentage *float64 `type:"float"`
  2333. }
  2334. // String returns the string representation
  2335. func (s EndpointGroup) String() string {
  2336. return awsutil.Prettify(s)
  2337. }
  2338. // GoString returns the string representation
  2339. func (s EndpointGroup) GoString() string {
  2340. return s.String()
  2341. }
  2342. // SetEndpointDescriptions sets the EndpointDescriptions field's value.
  2343. func (s *EndpointGroup) SetEndpointDescriptions(v []*EndpointDescription) *EndpointGroup {
  2344. s.EndpointDescriptions = v
  2345. return s
  2346. }
  2347. // SetEndpointGroupArn sets the EndpointGroupArn field's value.
  2348. func (s *EndpointGroup) SetEndpointGroupArn(v string) *EndpointGroup {
  2349. s.EndpointGroupArn = &v
  2350. return s
  2351. }
  2352. // SetEndpointGroupRegion sets the EndpointGroupRegion field's value.
  2353. func (s *EndpointGroup) SetEndpointGroupRegion(v string) *EndpointGroup {
  2354. s.EndpointGroupRegion = &v
  2355. return s
  2356. }
  2357. // SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value.
  2358. func (s *EndpointGroup) SetHealthCheckIntervalSeconds(v int64) *EndpointGroup {
  2359. s.HealthCheckIntervalSeconds = &v
  2360. return s
  2361. }
  2362. // SetHealthCheckPath sets the HealthCheckPath field's value.
  2363. func (s *EndpointGroup) SetHealthCheckPath(v string) *EndpointGroup {
  2364. s.HealthCheckPath = &v
  2365. return s
  2366. }
  2367. // SetHealthCheckPort sets the HealthCheckPort field's value.
  2368. func (s *EndpointGroup) SetHealthCheckPort(v int64) *EndpointGroup {
  2369. s.HealthCheckPort = &v
  2370. return s
  2371. }
  2372. // SetHealthCheckProtocol sets the HealthCheckProtocol field's value.
  2373. func (s *EndpointGroup) SetHealthCheckProtocol(v string) *EndpointGroup {
  2374. s.HealthCheckProtocol = &v
  2375. return s
  2376. }
  2377. // SetThresholdCount sets the ThresholdCount field's value.
  2378. func (s *EndpointGroup) SetThresholdCount(v int64) *EndpointGroup {
  2379. s.ThresholdCount = &v
  2380. return s
  2381. }
  2382. // SetTrafficDialPercentage sets the TrafficDialPercentage field's value.
  2383. func (s *EndpointGroup) SetTrafficDialPercentage(v float64) *EndpointGroup {
  2384. s.TrafficDialPercentage = &v
  2385. return s
  2386. }
  2387. // A complex type for the set of IP addresses for an accelerator.
  2388. type IpSet struct {
  2389. _ struct{} `type:"structure"`
  2390. // The array of IP addresses in the IP address set. An IP address set can have
  2391. // a maximum of two IP addresses.
  2392. IpAddresses []*string `type:"list"`
  2393. // The types of IP addresses included in this IP set.
  2394. IpFamily *string `type:"string"`
  2395. }
  2396. // String returns the string representation
  2397. func (s IpSet) String() string {
  2398. return awsutil.Prettify(s)
  2399. }
  2400. // GoString returns the string representation
  2401. func (s IpSet) GoString() string {
  2402. return s.String()
  2403. }
  2404. // SetIpAddresses sets the IpAddresses field's value.
  2405. func (s *IpSet) SetIpAddresses(v []*string) *IpSet {
  2406. s.IpAddresses = v
  2407. return s
  2408. }
  2409. // SetIpFamily sets the IpFamily field's value.
  2410. func (s *IpSet) SetIpFamily(v string) *IpSet {
  2411. s.IpFamily = &v
  2412. return s
  2413. }
  2414. type ListAcceleratorsInput struct {
  2415. _ struct{} `type:"structure"`
  2416. // The number of Global Accelerator objects that you want to return with this
  2417. // call. The default value is 10.
  2418. MaxResults *int64 `min:"1" type:"integer"`
  2419. // The token for the next set of results. You receive this token from a previous
  2420. // call.
  2421. NextToken *string `type:"string"`
  2422. }
  2423. // String returns the string representation
  2424. func (s ListAcceleratorsInput) String() string {
  2425. return awsutil.Prettify(s)
  2426. }
  2427. // GoString returns the string representation
  2428. func (s ListAcceleratorsInput) GoString() string {
  2429. return s.String()
  2430. }
  2431. // Validate inspects the fields of the type to determine if they are valid.
  2432. func (s *ListAcceleratorsInput) Validate() error {
  2433. invalidParams := request.ErrInvalidParams{Context: "ListAcceleratorsInput"}
  2434. if s.MaxResults != nil && *s.MaxResults < 1 {
  2435. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2436. }
  2437. if invalidParams.Len() > 0 {
  2438. return invalidParams
  2439. }
  2440. return nil
  2441. }
  2442. // SetMaxResults sets the MaxResults field's value.
  2443. func (s *ListAcceleratorsInput) SetMaxResults(v int64) *ListAcceleratorsInput {
  2444. s.MaxResults = &v
  2445. return s
  2446. }
  2447. // SetNextToken sets the NextToken field's value.
  2448. func (s *ListAcceleratorsInput) SetNextToken(v string) *ListAcceleratorsInput {
  2449. s.NextToken = &v
  2450. return s
  2451. }
  2452. type ListAcceleratorsOutput struct {
  2453. _ struct{} `type:"structure"`
  2454. // The list of accelerators for a customer account.
  2455. Accelerators []*Accelerator `type:"list"`
  2456. // The token for the next set of results. You receive this token from a previous
  2457. // call.
  2458. NextToken *string `type:"string"`
  2459. }
  2460. // String returns the string representation
  2461. func (s ListAcceleratorsOutput) String() string {
  2462. return awsutil.Prettify(s)
  2463. }
  2464. // GoString returns the string representation
  2465. func (s ListAcceleratorsOutput) GoString() string {
  2466. return s.String()
  2467. }
  2468. // SetAccelerators sets the Accelerators field's value.
  2469. func (s *ListAcceleratorsOutput) SetAccelerators(v []*Accelerator) *ListAcceleratorsOutput {
  2470. s.Accelerators = v
  2471. return s
  2472. }
  2473. // SetNextToken sets the NextToken field's value.
  2474. func (s *ListAcceleratorsOutput) SetNextToken(v string) *ListAcceleratorsOutput {
  2475. s.NextToken = &v
  2476. return s
  2477. }
  2478. type ListEndpointGroupsInput struct {
  2479. _ struct{} `type:"structure"`
  2480. // The Amazon Resource Name (ARN) of the listener.
  2481. //
  2482. // ListenerArn is a required field
  2483. ListenerArn *string `type:"string" required:"true"`
  2484. // The number of endpoint group objects that you want to return with this call.
  2485. // The default value is 10.
  2486. MaxResults *int64 `min:"1" type:"integer"`
  2487. // The token for the next set of results. You receive this token from a previous
  2488. // call.
  2489. NextToken *string `type:"string"`
  2490. }
  2491. // String returns the string representation
  2492. func (s ListEndpointGroupsInput) String() string {
  2493. return awsutil.Prettify(s)
  2494. }
  2495. // GoString returns the string representation
  2496. func (s ListEndpointGroupsInput) GoString() string {
  2497. return s.String()
  2498. }
  2499. // Validate inspects the fields of the type to determine if they are valid.
  2500. func (s *ListEndpointGroupsInput) Validate() error {
  2501. invalidParams := request.ErrInvalidParams{Context: "ListEndpointGroupsInput"}
  2502. if s.ListenerArn == nil {
  2503. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  2504. }
  2505. if s.MaxResults != nil && *s.MaxResults < 1 {
  2506. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2507. }
  2508. if invalidParams.Len() > 0 {
  2509. return invalidParams
  2510. }
  2511. return nil
  2512. }
  2513. // SetListenerArn sets the ListenerArn field's value.
  2514. func (s *ListEndpointGroupsInput) SetListenerArn(v string) *ListEndpointGroupsInput {
  2515. s.ListenerArn = &v
  2516. return s
  2517. }
  2518. // SetMaxResults sets the MaxResults field's value.
  2519. func (s *ListEndpointGroupsInput) SetMaxResults(v int64) *ListEndpointGroupsInput {
  2520. s.MaxResults = &v
  2521. return s
  2522. }
  2523. // SetNextToken sets the NextToken field's value.
  2524. func (s *ListEndpointGroupsInput) SetNextToken(v string) *ListEndpointGroupsInput {
  2525. s.NextToken = &v
  2526. return s
  2527. }
  2528. type ListEndpointGroupsOutput struct {
  2529. _ struct{} `type:"structure"`
  2530. // The list of the endpoint groups associated with a listener.
  2531. EndpointGroups []*EndpointGroup `type:"list"`
  2532. // The token for the next set of results. You receive this token from a previous
  2533. // call.
  2534. NextToken *string `type:"string"`
  2535. }
  2536. // String returns the string representation
  2537. func (s ListEndpointGroupsOutput) String() string {
  2538. return awsutil.Prettify(s)
  2539. }
  2540. // GoString returns the string representation
  2541. func (s ListEndpointGroupsOutput) GoString() string {
  2542. return s.String()
  2543. }
  2544. // SetEndpointGroups sets the EndpointGroups field's value.
  2545. func (s *ListEndpointGroupsOutput) SetEndpointGroups(v []*EndpointGroup) *ListEndpointGroupsOutput {
  2546. s.EndpointGroups = v
  2547. return s
  2548. }
  2549. // SetNextToken sets the NextToken field's value.
  2550. func (s *ListEndpointGroupsOutput) SetNextToken(v string) *ListEndpointGroupsOutput {
  2551. s.NextToken = &v
  2552. return s
  2553. }
  2554. type ListListenersInput struct {
  2555. _ struct{} `type:"structure"`
  2556. // The Amazon Resource Name (ARN) of the accelerator for which you want to list
  2557. // listener objects.
  2558. //
  2559. // AcceleratorArn is a required field
  2560. AcceleratorArn *string `type:"string" required:"true"`
  2561. // The number of listener objects that you want to return with this call. The
  2562. // default value is 10.
  2563. MaxResults *int64 `min:"1" type:"integer"`
  2564. // The token for the next set of results. You receive this token from a previous
  2565. // call.
  2566. NextToken *string `type:"string"`
  2567. }
  2568. // String returns the string representation
  2569. func (s ListListenersInput) String() string {
  2570. return awsutil.Prettify(s)
  2571. }
  2572. // GoString returns the string representation
  2573. func (s ListListenersInput) GoString() string {
  2574. return s.String()
  2575. }
  2576. // Validate inspects the fields of the type to determine if they are valid.
  2577. func (s *ListListenersInput) Validate() error {
  2578. invalidParams := request.ErrInvalidParams{Context: "ListListenersInput"}
  2579. if s.AcceleratorArn == nil {
  2580. invalidParams.Add(request.NewErrParamRequired("AcceleratorArn"))
  2581. }
  2582. if s.MaxResults != nil && *s.MaxResults < 1 {
  2583. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2584. }
  2585. if invalidParams.Len() > 0 {
  2586. return invalidParams
  2587. }
  2588. return nil
  2589. }
  2590. // SetAcceleratorArn sets the AcceleratorArn field's value.
  2591. func (s *ListListenersInput) SetAcceleratorArn(v string) *ListListenersInput {
  2592. s.AcceleratorArn = &v
  2593. return s
  2594. }
  2595. // SetMaxResults sets the MaxResults field's value.
  2596. func (s *ListListenersInput) SetMaxResults(v int64) *ListListenersInput {
  2597. s.MaxResults = &v
  2598. return s
  2599. }
  2600. // SetNextToken sets the NextToken field's value.
  2601. func (s *ListListenersInput) SetNextToken(v string) *ListListenersInput {
  2602. s.NextToken = &v
  2603. return s
  2604. }
  2605. type ListListenersOutput struct {
  2606. _ struct{} `type:"structure"`
  2607. // The list of listeners for an accelerator.
  2608. Listeners []*Listener `type:"list"`
  2609. // The token for the next set of results. You receive this token from a previous
  2610. // call.
  2611. NextToken *string `type:"string"`
  2612. }
  2613. // String returns the string representation
  2614. func (s ListListenersOutput) String() string {
  2615. return awsutil.Prettify(s)
  2616. }
  2617. // GoString returns the string representation
  2618. func (s ListListenersOutput) GoString() string {
  2619. return s.String()
  2620. }
  2621. // SetListeners sets the Listeners field's value.
  2622. func (s *ListListenersOutput) SetListeners(v []*Listener) *ListListenersOutput {
  2623. s.Listeners = v
  2624. return s
  2625. }
  2626. // SetNextToken sets the NextToken field's value.
  2627. func (s *ListListenersOutput) SetNextToken(v string) *ListListenersOutput {
  2628. s.NextToken = &v
  2629. return s
  2630. }
  2631. // A complex type for a listener.
  2632. type Listener struct {
  2633. _ struct{} `type:"structure"`
  2634. // Client affinity lets you direct all requests from a user to the same endpoint,
  2635. // if you have stateful applications, regardless of the port and protocol of
  2636. // the client request. Clienty affinity gives you control over whether to always
  2637. // route each client to the same specific endpoint.
  2638. //
  2639. // AWS Global Accelerator uses a consistent-flow hashing algorithm to choose
  2640. // the optimal endpoint for a connection. If client affinity is NONE, Global
  2641. // Accelerator uses the "five-tuple" (5-tuple) properties—source IP address,
  2642. // source port, destination IP address, destination port, and protocol—to select
  2643. // the hash value, and then chooses the best endpoint. However, with this setting,
  2644. // if someone uses different ports to connect to Global Accelerator, their connections
  2645. // might not be always routed to the same endpoint because the hash value changes.
  2646. //
  2647. // If you want a given client to always be routed to the same endpoint, set
  2648. // client affinity to SOURCE_IP instead. When you use the SOURCE_IP setting,
  2649. // Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client)
  2650. // IP address and destination IP address—to select the hash value.
  2651. //
  2652. // The default value is NONE.
  2653. ClientAffinity *string `type:"string" enum:"ClientAffinity"`
  2654. // The Amazon Resource Name (ARN) of the listener.
  2655. ListenerArn *string `type:"string"`
  2656. // The list of port ranges for the connections from clients to the accelerator.
  2657. PortRanges []*PortRange `min:"1" type:"list"`
  2658. // The protocol for the connections from clients to the accelerator.
  2659. Protocol *string `type:"string" enum:"Protocol"`
  2660. }
  2661. // String returns the string representation
  2662. func (s Listener) String() string {
  2663. return awsutil.Prettify(s)
  2664. }
  2665. // GoString returns the string representation
  2666. func (s Listener) GoString() string {
  2667. return s.String()
  2668. }
  2669. // SetClientAffinity sets the ClientAffinity field's value.
  2670. func (s *Listener) SetClientAffinity(v string) *Listener {
  2671. s.ClientAffinity = &v
  2672. return s
  2673. }
  2674. // SetListenerArn sets the ListenerArn field's value.
  2675. func (s *Listener) SetListenerArn(v string) *Listener {
  2676. s.ListenerArn = &v
  2677. return s
  2678. }
  2679. // SetPortRanges sets the PortRanges field's value.
  2680. func (s *Listener) SetPortRanges(v []*PortRange) *Listener {
  2681. s.PortRanges = v
  2682. return s
  2683. }
  2684. // SetProtocol sets the Protocol field's value.
  2685. func (s *Listener) SetProtocol(v string) *Listener {
  2686. s.Protocol = &v
  2687. return s
  2688. }
  2689. // A complex type for a range of ports for a listener.
  2690. type PortRange struct {
  2691. _ struct{} `type:"structure"`
  2692. // The first port in the range of ports, inclusive.
  2693. FromPort *int64 `min:"1" type:"integer"`
  2694. // The last port in the range of ports, inclusive.
  2695. ToPort *int64 `min:"1" type:"integer"`
  2696. }
  2697. // String returns the string representation
  2698. func (s PortRange) String() string {
  2699. return awsutil.Prettify(s)
  2700. }
  2701. // GoString returns the string representation
  2702. func (s PortRange) GoString() string {
  2703. return s.String()
  2704. }
  2705. // Validate inspects the fields of the type to determine if they are valid.
  2706. func (s *PortRange) Validate() error {
  2707. invalidParams := request.ErrInvalidParams{Context: "PortRange"}
  2708. if s.FromPort != nil && *s.FromPort < 1 {
  2709. invalidParams.Add(request.NewErrParamMinValue("FromPort", 1))
  2710. }
  2711. if s.ToPort != nil && *s.ToPort < 1 {
  2712. invalidParams.Add(request.NewErrParamMinValue("ToPort", 1))
  2713. }
  2714. if invalidParams.Len() > 0 {
  2715. return invalidParams
  2716. }
  2717. return nil
  2718. }
  2719. // SetFromPort sets the FromPort field's value.
  2720. func (s *PortRange) SetFromPort(v int64) *PortRange {
  2721. s.FromPort = &v
  2722. return s
  2723. }
  2724. // SetToPort sets the ToPort field's value.
  2725. func (s *PortRange) SetToPort(v int64) *PortRange {
  2726. s.ToPort = &v
  2727. return s
  2728. }
  2729. type UpdateAcceleratorAttributesInput struct {
  2730. _ struct{} `type:"structure"`
  2731. // The Amazon Resource Name (ARN) of the accelerator that you want to update.
  2732. // Attribute is required.
  2733. AcceleratorArn *string `type:"string"`
  2734. // Update whether flow logs are enabled. The default value is false. If the
  2735. // value is true, FlowLogsS3Bucket and FlowLogsS3Prefix must be specified.
  2736. //
  2737. // For more information, see Flow Logs (https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html)
  2738. // in the AWS Global Accelerator Developer Guide.
  2739. FlowLogsEnabled *bool `type:"boolean"`
  2740. // The name of the Amazon S3 bucket for the flow logs. Attribute is required
  2741. // if FlowLogsEnabled is true. The bucket must exist and have a bucket policy
  2742. // that grants AWS Global Accelerator permission to write to the bucket.
  2743. FlowLogsS3Bucket *string `type:"string"`
  2744. // Update the prefix for the location in the Amazon S3 bucket for the flow logs.
  2745. // Attribute is required if FlowLogsEnabled is true. If you don’t specify a
  2746. // prefix, the flow logs are stored in the root of the bucket.
  2747. FlowLogsS3Prefix *string `type:"string"`
  2748. }
  2749. // String returns the string representation
  2750. func (s UpdateAcceleratorAttributesInput) String() string {
  2751. return awsutil.Prettify(s)
  2752. }
  2753. // GoString returns the string representation
  2754. func (s UpdateAcceleratorAttributesInput) GoString() string {
  2755. return s.String()
  2756. }
  2757. // SetAcceleratorArn sets the AcceleratorArn field's value.
  2758. func (s *UpdateAcceleratorAttributesInput) SetAcceleratorArn(v string) *UpdateAcceleratorAttributesInput {
  2759. s.AcceleratorArn = &v
  2760. return s
  2761. }
  2762. // SetFlowLogsEnabled sets the FlowLogsEnabled field's value.
  2763. func (s *UpdateAcceleratorAttributesInput) SetFlowLogsEnabled(v bool) *UpdateAcceleratorAttributesInput {
  2764. s.FlowLogsEnabled = &v
  2765. return s
  2766. }
  2767. // SetFlowLogsS3Bucket sets the FlowLogsS3Bucket field's value.
  2768. func (s *UpdateAcceleratorAttributesInput) SetFlowLogsS3Bucket(v string) *UpdateAcceleratorAttributesInput {
  2769. s.FlowLogsS3Bucket = &v
  2770. return s
  2771. }
  2772. // SetFlowLogsS3Prefix sets the FlowLogsS3Prefix field's value.
  2773. func (s *UpdateAcceleratorAttributesInput) SetFlowLogsS3Prefix(v string) *UpdateAcceleratorAttributesInput {
  2774. s.FlowLogsS3Prefix = &v
  2775. return s
  2776. }
  2777. type UpdateAcceleratorAttributesOutput struct {
  2778. _ struct{} `type:"structure"`
  2779. // Updated attributes for the accelerator.
  2780. AcceleratorAttributes *AcceleratorAttributes `type:"structure"`
  2781. }
  2782. // String returns the string representation
  2783. func (s UpdateAcceleratorAttributesOutput) String() string {
  2784. return awsutil.Prettify(s)
  2785. }
  2786. // GoString returns the string representation
  2787. func (s UpdateAcceleratorAttributesOutput) GoString() string {
  2788. return s.String()
  2789. }
  2790. // SetAcceleratorAttributes sets the AcceleratorAttributes field's value.
  2791. func (s *UpdateAcceleratorAttributesOutput) SetAcceleratorAttributes(v *AcceleratorAttributes) *UpdateAcceleratorAttributesOutput {
  2792. s.AcceleratorAttributes = v
  2793. return s
  2794. }
  2795. type UpdateAcceleratorInput struct {
  2796. _ struct{} `type:"structure"`
  2797. // The Amazon Resource Name (ARN) of the accelerator to update.
  2798. //
  2799. // AcceleratorArn is a required field
  2800. AcceleratorArn *string `type:"string" required:"true"`
  2801. // Indicates whether an accelerator is enabled. The value is true or false.
  2802. // The default value is true.
  2803. //
  2804. // If the value is set to true, the accelerator cannot be deleted. If set to
  2805. // false, the accelerator can be deleted.
  2806. Enabled *bool `type:"boolean"`
  2807. // The value for the address type must be IPv4.
  2808. IpAddressType *string `type:"string" enum:"IpAddressType"`
  2809. // The name of the accelerator. The name can have a maximum of 32 characters,
  2810. // must contain only alphanumeric characters or hyphens (-), and must not begin
  2811. // or end with a hyphen.
  2812. Name *string `type:"string"`
  2813. }
  2814. // String returns the string representation
  2815. func (s UpdateAcceleratorInput) String() string {
  2816. return awsutil.Prettify(s)
  2817. }
  2818. // GoString returns the string representation
  2819. func (s UpdateAcceleratorInput) GoString() string {
  2820. return s.String()
  2821. }
  2822. // Validate inspects the fields of the type to determine if they are valid.
  2823. func (s *UpdateAcceleratorInput) Validate() error {
  2824. invalidParams := request.ErrInvalidParams{Context: "UpdateAcceleratorInput"}
  2825. if s.AcceleratorArn == nil {
  2826. invalidParams.Add(request.NewErrParamRequired("AcceleratorArn"))
  2827. }
  2828. if invalidParams.Len() > 0 {
  2829. return invalidParams
  2830. }
  2831. return nil
  2832. }
  2833. // SetAcceleratorArn sets the AcceleratorArn field's value.
  2834. func (s *UpdateAcceleratorInput) SetAcceleratorArn(v string) *UpdateAcceleratorInput {
  2835. s.AcceleratorArn = &v
  2836. return s
  2837. }
  2838. // SetEnabled sets the Enabled field's value.
  2839. func (s *UpdateAcceleratorInput) SetEnabled(v bool) *UpdateAcceleratorInput {
  2840. s.Enabled = &v
  2841. return s
  2842. }
  2843. // SetIpAddressType sets the IpAddressType field's value.
  2844. func (s *UpdateAcceleratorInput) SetIpAddressType(v string) *UpdateAcceleratorInput {
  2845. s.IpAddressType = &v
  2846. return s
  2847. }
  2848. // SetName sets the Name field's value.
  2849. func (s *UpdateAcceleratorInput) SetName(v string) *UpdateAcceleratorInput {
  2850. s.Name = &v
  2851. return s
  2852. }
  2853. type UpdateAcceleratorOutput struct {
  2854. _ struct{} `type:"structure"`
  2855. // Information about the updated accelerator.
  2856. Accelerator *Accelerator `type:"structure"`
  2857. }
  2858. // String returns the string representation
  2859. func (s UpdateAcceleratorOutput) String() string {
  2860. return awsutil.Prettify(s)
  2861. }
  2862. // GoString returns the string representation
  2863. func (s UpdateAcceleratorOutput) GoString() string {
  2864. return s.String()
  2865. }
  2866. // SetAccelerator sets the Accelerator field's value.
  2867. func (s *UpdateAcceleratorOutput) SetAccelerator(v *Accelerator) *UpdateAcceleratorOutput {
  2868. s.Accelerator = v
  2869. return s
  2870. }
  2871. type UpdateEndpointGroupInput struct {
  2872. _ struct{} `type:"structure"`
  2873. // The list of endpoint objects.
  2874. EndpointConfigurations []*EndpointConfiguration `type:"list"`
  2875. // The Amazon Resource Name (ARN) of the endpoint group.
  2876. //
  2877. // EndpointGroupArn is a required field
  2878. EndpointGroupArn *string `type:"string" required:"true"`
  2879. // The time—10 seconds or 30 seconds—between each health check for an endpoint.
  2880. // The default value is 30.
  2881. HealthCheckIntervalSeconds *int64 `min:"10" type:"integer"`
  2882. // If the protocol is HTTP/S, then this specifies the path that is the destination
  2883. // for health check targets. The default value is slash (/).
  2884. HealthCheckPath *string `type:"string"`
  2885. // The port that AWS Global Accelerator uses to check the health of endpoints
  2886. // that are part of this endpoint group. The default port is the listener port
  2887. // that this endpoint group is associated with. If the listener port is a list
  2888. // of ports, Global Accelerator uses the first port in the list.
  2889. HealthCheckPort *int64 `min:"1" type:"integer"`
  2890. // The protocol that AWS Global Accelerator uses to check the health of endpoints
  2891. // that are part of this endpoint group. The default value is TCP.
  2892. HealthCheckProtocol *string `type:"string" enum:"HealthCheckProtocol"`
  2893. // The number of consecutive health checks required to set the state of a healthy
  2894. // endpoint to unhealthy, or to set an unhealthy endpoint to healthy. The default
  2895. // value is 3.
  2896. ThresholdCount *int64 `min:"1" type:"integer"`
  2897. // The percentage of traffic to send to an AWS Region. Additional traffic is
  2898. // distributed to other endpoint groups for this listener.
  2899. //
  2900. // Use this action to increase (dial up) or decrease (dial down) traffic to
  2901. // a specific Region. The percentage is applied to the traffic that would otherwise
  2902. // have been routed to the Region based on optimal routing.
  2903. //
  2904. // The default value is 100.
  2905. TrafficDialPercentage *float64 `type:"float"`
  2906. }
  2907. // String returns the string representation
  2908. func (s UpdateEndpointGroupInput) String() string {
  2909. return awsutil.Prettify(s)
  2910. }
  2911. // GoString returns the string representation
  2912. func (s UpdateEndpointGroupInput) GoString() string {
  2913. return s.String()
  2914. }
  2915. // Validate inspects the fields of the type to determine if they are valid.
  2916. func (s *UpdateEndpointGroupInput) Validate() error {
  2917. invalidParams := request.ErrInvalidParams{Context: "UpdateEndpointGroupInput"}
  2918. if s.EndpointGroupArn == nil {
  2919. invalidParams.Add(request.NewErrParamRequired("EndpointGroupArn"))
  2920. }
  2921. if s.HealthCheckIntervalSeconds != nil && *s.HealthCheckIntervalSeconds < 10 {
  2922. invalidParams.Add(request.NewErrParamMinValue("HealthCheckIntervalSeconds", 10))
  2923. }
  2924. if s.HealthCheckPort != nil && *s.HealthCheckPort < 1 {
  2925. invalidParams.Add(request.NewErrParamMinValue("HealthCheckPort", 1))
  2926. }
  2927. if s.ThresholdCount != nil && *s.ThresholdCount < 1 {
  2928. invalidParams.Add(request.NewErrParamMinValue("ThresholdCount", 1))
  2929. }
  2930. if invalidParams.Len() > 0 {
  2931. return invalidParams
  2932. }
  2933. return nil
  2934. }
  2935. // SetEndpointConfigurations sets the EndpointConfigurations field's value.
  2936. func (s *UpdateEndpointGroupInput) SetEndpointConfigurations(v []*EndpointConfiguration) *UpdateEndpointGroupInput {
  2937. s.EndpointConfigurations = v
  2938. return s
  2939. }
  2940. // SetEndpointGroupArn sets the EndpointGroupArn field's value.
  2941. func (s *UpdateEndpointGroupInput) SetEndpointGroupArn(v string) *UpdateEndpointGroupInput {
  2942. s.EndpointGroupArn = &v
  2943. return s
  2944. }
  2945. // SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value.
  2946. func (s *UpdateEndpointGroupInput) SetHealthCheckIntervalSeconds(v int64) *UpdateEndpointGroupInput {
  2947. s.HealthCheckIntervalSeconds = &v
  2948. return s
  2949. }
  2950. // SetHealthCheckPath sets the HealthCheckPath field's value.
  2951. func (s *UpdateEndpointGroupInput) SetHealthCheckPath(v string) *UpdateEndpointGroupInput {
  2952. s.HealthCheckPath = &v
  2953. return s
  2954. }
  2955. // SetHealthCheckPort sets the HealthCheckPort field's value.
  2956. func (s *UpdateEndpointGroupInput) SetHealthCheckPort(v int64) *UpdateEndpointGroupInput {
  2957. s.HealthCheckPort = &v
  2958. return s
  2959. }
  2960. // SetHealthCheckProtocol sets the HealthCheckProtocol field's value.
  2961. func (s *UpdateEndpointGroupInput) SetHealthCheckProtocol(v string) *UpdateEndpointGroupInput {
  2962. s.HealthCheckProtocol = &v
  2963. return s
  2964. }
  2965. // SetThresholdCount sets the ThresholdCount field's value.
  2966. func (s *UpdateEndpointGroupInput) SetThresholdCount(v int64) *UpdateEndpointGroupInput {
  2967. s.ThresholdCount = &v
  2968. return s
  2969. }
  2970. // SetTrafficDialPercentage sets the TrafficDialPercentage field's value.
  2971. func (s *UpdateEndpointGroupInput) SetTrafficDialPercentage(v float64) *UpdateEndpointGroupInput {
  2972. s.TrafficDialPercentage = &v
  2973. return s
  2974. }
  2975. type UpdateEndpointGroupOutput struct {
  2976. _ struct{} `type:"structure"`
  2977. // The information about the endpoint group that was updated.
  2978. EndpointGroup *EndpointGroup `type:"structure"`
  2979. }
  2980. // String returns the string representation
  2981. func (s UpdateEndpointGroupOutput) String() string {
  2982. return awsutil.Prettify(s)
  2983. }
  2984. // GoString returns the string representation
  2985. func (s UpdateEndpointGroupOutput) GoString() string {
  2986. return s.String()
  2987. }
  2988. // SetEndpointGroup sets the EndpointGroup field's value.
  2989. func (s *UpdateEndpointGroupOutput) SetEndpointGroup(v *EndpointGroup) *UpdateEndpointGroupOutput {
  2990. s.EndpointGroup = v
  2991. return s
  2992. }
  2993. type UpdateListenerInput struct {
  2994. _ struct{} `type:"structure"`
  2995. // Client affinity lets you direct all requests from a user to the same endpoint,
  2996. // if you have stateful applications, regardless of the port and protocol of
  2997. // the client request. Clienty affinity gives you control over whether to always
  2998. // route each client to the same specific endpoint.
  2999. //
  3000. // AWS Global Accelerator uses a consistent-flow hashing algorithm to choose
  3001. // the optimal endpoint for a connection. If client affinity is NONE, Global
  3002. // Accelerator uses the "five-tuple" (5-tuple) properties—source IP address,
  3003. // source port, destination IP address, destination port, and protocol—to select
  3004. // the hash value, and then chooses the best endpoint. However, with this setting,
  3005. // if someone uses different ports to connect to Global Accelerator, their connections
  3006. // might not be always routed to the same endpoint because the hash value changes.
  3007. //
  3008. // If you want a given client to always be routed to the same endpoint, set
  3009. // client affinity to SOURCE_IP instead. When you use the SOURCE_IP setting,
  3010. // Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client)
  3011. // IP address and destination IP address—to select the hash value.
  3012. //
  3013. // The default value is NONE.
  3014. ClientAffinity *string `type:"string" enum:"ClientAffinity"`
  3015. // The Amazon Resource Name (ARN) of the listener to update.
  3016. //
  3017. // ListenerArn is a required field
  3018. ListenerArn *string `type:"string" required:"true"`
  3019. // The updated list of port ranges for the connections from clients to the accelerator.
  3020. PortRanges []*PortRange `min:"1" type:"list"`
  3021. // The updated protocol for the connections from clients to the accelerator.
  3022. Protocol *string `type:"string" enum:"Protocol"`
  3023. }
  3024. // String returns the string representation
  3025. func (s UpdateListenerInput) String() string {
  3026. return awsutil.Prettify(s)
  3027. }
  3028. // GoString returns the string representation
  3029. func (s UpdateListenerInput) GoString() string {
  3030. return s.String()
  3031. }
  3032. // Validate inspects the fields of the type to determine if they are valid.
  3033. func (s *UpdateListenerInput) Validate() error {
  3034. invalidParams := request.ErrInvalidParams{Context: "UpdateListenerInput"}
  3035. if s.ListenerArn == nil {
  3036. invalidParams.Add(request.NewErrParamRequired("ListenerArn"))
  3037. }
  3038. if s.PortRanges != nil && len(s.PortRanges) < 1 {
  3039. invalidParams.Add(request.NewErrParamMinLen("PortRanges", 1))
  3040. }
  3041. if s.PortRanges != nil {
  3042. for i, v := range s.PortRanges {
  3043. if v == nil {
  3044. continue
  3045. }
  3046. if err := v.Validate(); err != nil {
  3047. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PortRanges", i), err.(request.ErrInvalidParams))
  3048. }
  3049. }
  3050. }
  3051. if invalidParams.Len() > 0 {
  3052. return invalidParams
  3053. }
  3054. return nil
  3055. }
  3056. // SetClientAffinity sets the ClientAffinity field's value.
  3057. func (s *UpdateListenerInput) SetClientAffinity(v string) *UpdateListenerInput {
  3058. s.ClientAffinity = &v
  3059. return s
  3060. }
  3061. // SetListenerArn sets the ListenerArn field's value.
  3062. func (s *UpdateListenerInput) SetListenerArn(v string) *UpdateListenerInput {
  3063. s.ListenerArn = &v
  3064. return s
  3065. }
  3066. // SetPortRanges sets the PortRanges field's value.
  3067. func (s *UpdateListenerInput) SetPortRanges(v []*PortRange) *UpdateListenerInput {
  3068. s.PortRanges = v
  3069. return s
  3070. }
  3071. // SetProtocol sets the Protocol field's value.
  3072. func (s *UpdateListenerInput) SetProtocol(v string) *UpdateListenerInput {
  3073. s.Protocol = &v
  3074. return s
  3075. }
  3076. type UpdateListenerOutput struct {
  3077. _ struct{} `type:"structure"`
  3078. // Information for the updated listener.
  3079. Listener *Listener `type:"structure"`
  3080. }
  3081. // String returns the string representation
  3082. func (s UpdateListenerOutput) String() string {
  3083. return awsutil.Prettify(s)
  3084. }
  3085. // GoString returns the string representation
  3086. func (s UpdateListenerOutput) GoString() string {
  3087. return s.String()
  3088. }
  3089. // SetListener sets the Listener field's value.
  3090. func (s *UpdateListenerOutput) SetListener(v *Listener) *UpdateListenerOutput {
  3091. s.Listener = v
  3092. return s
  3093. }
  3094. const (
  3095. // AcceleratorStatusDeployed is a AcceleratorStatus enum value
  3096. AcceleratorStatusDeployed = "DEPLOYED"
  3097. // AcceleratorStatusInProgress is a AcceleratorStatus enum value
  3098. AcceleratorStatusInProgress = "IN_PROGRESS"
  3099. )
  3100. const (
  3101. // ClientAffinityNone is a ClientAffinity enum value
  3102. ClientAffinityNone = "NONE"
  3103. // ClientAffinitySourceIp is a ClientAffinity enum value
  3104. ClientAffinitySourceIp = "SOURCE_IP"
  3105. )
  3106. const (
  3107. // HealthCheckProtocolTcp is a HealthCheckProtocol enum value
  3108. HealthCheckProtocolTcp = "TCP"
  3109. // HealthCheckProtocolHttp is a HealthCheckProtocol enum value
  3110. HealthCheckProtocolHttp = "HTTP"
  3111. // HealthCheckProtocolHttps is a HealthCheckProtocol enum value
  3112. HealthCheckProtocolHttps = "HTTPS"
  3113. )
  3114. const (
  3115. // HealthStateInitial is a HealthState enum value
  3116. HealthStateInitial = "INITIAL"
  3117. // HealthStateHealthy is a HealthState enum value
  3118. HealthStateHealthy = "HEALTHY"
  3119. // HealthStateUnhealthy is a HealthState enum value
  3120. HealthStateUnhealthy = "UNHEALTHY"
  3121. )
  3122. const (
  3123. // IpAddressTypeIpv4 is a IpAddressType enum value
  3124. IpAddressTypeIpv4 = "IPV4"
  3125. )
  3126. const (
  3127. // ProtocolTcp is a Protocol enum value
  3128. ProtocolTcp = "TCP"
  3129. // ProtocolUdp is a Protocol enum value
  3130. ProtocolUdp = "UDP"
  3131. )