api.go 205 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package cloudfront provides a client for Amazon CloudFront.
  3. package cloudfront
  4. import (
  5. "fmt"
  6. "time"
  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/restxml"
  11. )
  12. const opCreateCloudFrontOriginAccessIdentity = "CreateCloudFrontOriginAccessIdentity2016_08_01"
  13. // CreateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the
  14. // client's request for the CreateCloudFrontOriginAccessIdentity operation. The "output" return
  15. // value can be used to capture response data after the request's "Send" method
  16. // is called.
  17. //
  18. // Creating a request object using this method should be used when you want to inject
  19. // custom logic into the request's lifecycle using a custom handler, or if you want to
  20. // access properties on the request object before or after sending the request. If
  21. // you just want the service response, call the CreateCloudFrontOriginAccessIdentity method directly
  22. // instead.
  23. //
  24. // Note: You must call the "Send" method on the returned request object in order
  25. // to execute the request.
  26. //
  27. // // Example sending a request using the CreateCloudFrontOriginAccessIdentityRequest method.
  28. // req, resp := client.CreateCloudFrontOriginAccessIdentityRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. func (c *CloudFront) CreateCloudFrontOriginAccessIdentityRequest(input *CreateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *CreateCloudFrontOriginAccessIdentityOutput) {
  36. op := &request.Operation{
  37. Name: opCreateCloudFrontOriginAccessIdentity,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/2016-08-01/origin-access-identity/cloudfront",
  40. }
  41. if input == nil {
  42. input = &CreateCloudFrontOriginAccessIdentityInput{}
  43. }
  44. req = c.newRequest(op, input, output)
  45. output = &CreateCloudFrontOriginAccessIdentityOutput{}
  46. req.Data = output
  47. return
  48. }
  49. // Create a new origin access identity.
  50. func (c *CloudFront) CreateCloudFrontOriginAccessIdentity(input *CreateCloudFrontOriginAccessIdentityInput) (*CreateCloudFrontOriginAccessIdentityOutput, error) {
  51. req, out := c.CreateCloudFrontOriginAccessIdentityRequest(input)
  52. err := req.Send()
  53. return out, err
  54. }
  55. const opCreateDistribution = "CreateDistribution2016_08_01"
  56. // CreateDistributionRequest generates a "aws/request.Request" representing the
  57. // client's request for the CreateDistribution operation. The "output" return
  58. // value can be used to capture response data after the request's "Send" method
  59. // is called.
  60. //
  61. // Creating a request object using this method should be used when you want to inject
  62. // custom logic into the request's lifecycle using a custom handler, or if you want to
  63. // access properties on the request object before or after sending the request. If
  64. // you just want the service response, call the CreateDistribution method directly
  65. // instead.
  66. //
  67. // Note: You must call the "Send" method on the returned request object in order
  68. // to execute the request.
  69. //
  70. // // Example sending a request using the CreateDistributionRequest method.
  71. // req, resp := client.CreateDistributionRequest(params)
  72. //
  73. // err := req.Send()
  74. // if err == nil { // resp is now filled
  75. // fmt.Println(resp)
  76. // }
  77. //
  78. func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) (req *request.Request, output *CreateDistributionOutput) {
  79. op := &request.Operation{
  80. Name: opCreateDistribution,
  81. HTTPMethod: "POST",
  82. HTTPPath: "/2016-08-01/distribution",
  83. }
  84. if input == nil {
  85. input = &CreateDistributionInput{}
  86. }
  87. req = c.newRequest(op, input, output)
  88. output = &CreateDistributionOutput{}
  89. req.Data = output
  90. return
  91. }
  92. // Create a new distribution.
  93. func (c *CloudFront) CreateDistribution(input *CreateDistributionInput) (*CreateDistributionOutput, error) {
  94. req, out := c.CreateDistributionRequest(input)
  95. err := req.Send()
  96. return out, err
  97. }
  98. const opCreateDistributionWithTags = "CreateDistributionWithTags2016_08_01"
  99. // CreateDistributionWithTagsRequest generates a "aws/request.Request" representing the
  100. // client's request for the CreateDistributionWithTags operation. The "output" return
  101. // value can be used to capture response data after the request's "Send" method
  102. // is called.
  103. //
  104. // Creating a request object using this method should be used when you want to inject
  105. // custom logic into the request's lifecycle using a custom handler, or if you want to
  106. // access properties on the request object before or after sending the request. If
  107. // you just want the service response, call the CreateDistributionWithTags method directly
  108. // instead.
  109. //
  110. // Note: You must call the "Send" method on the returned request object in order
  111. // to execute the request.
  112. //
  113. // // Example sending a request using the CreateDistributionWithTagsRequest method.
  114. // req, resp := client.CreateDistributionWithTagsRequest(params)
  115. //
  116. // err := req.Send()
  117. // if err == nil { // resp is now filled
  118. // fmt.Println(resp)
  119. // }
  120. //
  121. func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistributionWithTagsInput) (req *request.Request, output *CreateDistributionWithTagsOutput) {
  122. op := &request.Operation{
  123. Name: opCreateDistributionWithTags,
  124. HTTPMethod: "POST",
  125. HTTPPath: "/2016-08-01/distribution?WithTags",
  126. }
  127. if input == nil {
  128. input = &CreateDistributionWithTagsInput{}
  129. }
  130. req = c.newRequest(op, input, output)
  131. output = &CreateDistributionWithTagsOutput{}
  132. req.Data = output
  133. return
  134. }
  135. // Create a new distribution with tags.
  136. func (c *CloudFront) CreateDistributionWithTags(input *CreateDistributionWithTagsInput) (*CreateDistributionWithTagsOutput, error) {
  137. req, out := c.CreateDistributionWithTagsRequest(input)
  138. err := req.Send()
  139. return out, err
  140. }
  141. const opCreateInvalidation = "CreateInvalidation2016_08_01"
  142. // CreateInvalidationRequest generates a "aws/request.Request" representing the
  143. // client's request for the CreateInvalidation operation. The "output" return
  144. // value can be used to capture response data after the request's "Send" method
  145. // is called.
  146. //
  147. // Creating a request object using this method should be used when you want to inject
  148. // custom logic into the request's lifecycle using a custom handler, or if you want to
  149. // access properties on the request object before or after sending the request. If
  150. // you just want the service response, call the CreateInvalidation method directly
  151. // instead.
  152. //
  153. // Note: You must call the "Send" method on the returned request object in order
  154. // to execute the request.
  155. //
  156. // // Example sending a request using the CreateInvalidationRequest method.
  157. // req, resp := client.CreateInvalidationRequest(params)
  158. //
  159. // err := req.Send()
  160. // if err == nil { // resp is now filled
  161. // fmt.Println(resp)
  162. // }
  163. //
  164. func (c *CloudFront) CreateInvalidationRequest(input *CreateInvalidationInput) (req *request.Request, output *CreateInvalidationOutput) {
  165. op := &request.Operation{
  166. Name: opCreateInvalidation,
  167. HTTPMethod: "POST",
  168. HTTPPath: "/2016-08-01/distribution/{DistributionId}/invalidation",
  169. }
  170. if input == nil {
  171. input = &CreateInvalidationInput{}
  172. }
  173. req = c.newRequest(op, input, output)
  174. output = &CreateInvalidationOutput{}
  175. req.Data = output
  176. return
  177. }
  178. // Create a new invalidation.
  179. func (c *CloudFront) CreateInvalidation(input *CreateInvalidationInput) (*CreateInvalidationOutput, error) {
  180. req, out := c.CreateInvalidationRequest(input)
  181. err := req.Send()
  182. return out, err
  183. }
  184. const opCreateStreamingDistribution = "CreateStreamingDistribution2016_08_01"
  185. // CreateStreamingDistributionRequest generates a "aws/request.Request" representing the
  186. // client's request for the CreateStreamingDistribution operation. The "output" return
  187. // value can be used to capture response data after the request's "Send" method
  188. // is called.
  189. //
  190. // Creating a request object using this method should be used when you want to inject
  191. // custom logic into the request's lifecycle using a custom handler, or if you want to
  192. // access properties on the request object before or after sending the request. If
  193. // you just want the service response, call the CreateStreamingDistribution method directly
  194. // instead.
  195. //
  196. // Note: You must call the "Send" method on the returned request object in order
  197. // to execute the request.
  198. //
  199. // // Example sending a request using the CreateStreamingDistributionRequest method.
  200. // req, resp := client.CreateStreamingDistributionRequest(params)
  201. //
  202. // err := req.Send()
  203. // if err == nil { // resp is now filled
  204. // fmt.Println(resp)
  205. // }
  206. //
  207. func (c *CloudFront) CreateStreamingDistributionRequest(input *CreateStreamingDistributionInput) (req *request.Request, output *CreateStreamingDistributionOutput) {
  208. op := &request.Operation{
  209. Name: opCreateStreamingDistribution,
  210. HTTPMethod: "POST",
  211. HTTPPath: "/2016-08-01/streaming-distribution",
  212. }
  213. if input == nil {
  214. input = &CreateStreamingDistributionInput{}
  215. }
  216. req = c.newRequest(op, input, output)
  217. output = &CreateStreamingDistributionOutput{}
  218. req.Data = output
  219. return
  220. }
  221. // Create a new streaming distribution.
  222. func (c *CloudFront) CreateStreamingDistribution(input *CreateStreamingDistributionInput) (*CreateStreamingDistributionOutput, error) {
  223. req, out := c.CreateStreamingDistributionRequest(input)
  224. err := req.Send()
  225. return out, err
  226. }
  227. const opCreateStreamingDistributionWithTags = "CreateStreamingDistributionWithTags2016_08_01"
  228. // CreateStreamingDistributionWithTagsRequest generates a "aws/request.Request" representing the
  229. // client's request for the CreateStreamingDistributionWithTags operation. The "output" return
  230. // value can be used to capture response data after the request's "Send" method
  231. // is called.
  232. //
  233. // Creating a request object using this method should be used when you want to inject
  234. // custom logic into the request's lifecycle using a custom handler, or if you want to
  235. // access properties on the request object before or after sending the request. If
  236. // you just want the service response, call the CreateStreamingDistributionWithTags method directly
  237. // instead.
  238. //
  239. // Note: You must call the "Send" method on the returned request object in order
  240. // to execute the request.
  241. //
  242. // // Example sending a request using the CreateStreamingDistributionWithTagsRequest method.
  243. // req, resp := client.CreateStreamingDistributionWithTagsRequest(params)
  244. //
  245. // err := req.Send()
  246. // if err == nil { // resp is now filled
  247. // fmt.Println(resp)
  248. // }
  249. //
  250. func (c *CloudFront) CreateStreamingDistributionWithTagsRequest(input *CreateStreamingDistributionWithTagsInput) (req *request.Request, output *CreateStreamingDistributionWithTagsOutput) {
  251. op := &request.Operation{
  252. Name: opCreateStreamingDistributionWithTags,
  253. HTTPMethod: "POST",
  254. HTTPPath: "/2016-08-01/streaming-distribution?WithTags",
  255. }
  256. if input == nil {
  257. input = &CreateStreamingDistributionWithTagsInput{}
  258. }
  259. req = c.newRequest(op, input, output)
  260. output = &CreateStreamingDistributionWithTagsOutput{}
  261. req.Data = output
  262. return
  263. }
  264. // Create a new streaming distribution with tags.
  265. func (c *CloudFront) CreateStreamingDistributionWithTags(input *CreateStreamingDistributionWithTagsInput) (*CreateStreamingDistributionWithTagsOutput, error) {
  266. req, out := c.CreateStreamingDistributionWithTagsRequest(input)
  267. err := req.Send()
  268. return out, err
  269. }
  270. const opDeleteCloudFrontOriginAccessIdentity = "DeleteCloudFrontOriginAccessIdentity2016_08_01"
  271. // DeleteCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the
  272. // client's request for the DeleteCloudFrontOriginAccessIdentity operation. The "output" return
  273. // value can be used to capture response data after the request's "Send" method
  274. // is called.
  275. //
  276. // Creating a request object using this method should be used when you want to inject
  277. // custom logic into the request's lifecycle using a custom handler, or if you want to
  278. // access properties on the request object before or after sending the request. If
  279. // you just want the service response, call the DeleteCloudFrontOriginAccessIdentity method directly
  280. // instead.
  281. //
  282. // Note: You must call the "Send" method on the returned request object in order
  283. // to execute the request.
  284. //
  285. // // Example sending a request using the DeleteCloudFrontOriginAccessIdentityRequest method.
  286. // req, resp := client.DeleteCloudFrontOriginAccessIdentityRequest(params)
  287. //
  288. // err := req.Send()
  289. // if err == nil { // resp is now filled
  290. // fmt.Println(resp)
  291. // }
  292. //
  293. func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityRequest(input *DeleteCloudFrontOriginAccessIdentityInput) (req *request.Request, output *DeleteCloudFrontOriginAccessIdentityOutput) {
  294. op := &request.Operation{
  295. Name: opDeleteCloudFrontOriginAccessIdentity,
  296. HTTPMethod: "DELETE",
  297. HTTPPath: "/2016-08-01/origin-access-identity/cloudfront/{Id}",
  298. }
  299. if input == nil {
  300. input = &DeleteCloudFrontOriginAccessIdentityInput{}
  301. }
  302. req = c.newRequest(op, input, output)
  303. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  304. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  305. output = &DeleteCloudFrontOriginAccessIdentityOutput{}
  306. req.Data = output
  307. return
  308. }
  309. // Delete an origin access identity.
  310. func (c *CloudFront) DeleteCloudFrontOriginAccessIdentity(input *DeleteCloudFrontOriginAccessIdentityInput) (*DeleteCloudFrontOriginAccessIdentityOutput, error) {
  311. req, out := c.DeleteCloudFrontOriginAccessIdentityRequest(input)
  312. err := req.Send()
  313. return out, err
  314. }
  315. const opDeleteDistribution = "DeleteDistribution2016_08_01"
  316. // DeleteDistributionRequest generates a "aws/request.Request" representing the
  317. // client's request for the DeleteDistribution operation. The "output" return
  318. // value can be used to capture response data after the request's "Send" method
  319. // is called.
  320. //
  321. // Creating a request object using this method should be used when you want to inject
  322. // custom logic into the request's lifecycle using a custom handler, or if you want to
  323. // access properties on the request object before or after sending the request. If
  324. // you just want the service response, call the DeleteDistribution method directly
  325. // instead.
  326. //
  327. // Note: You must call the "Send" method on the returned request object in order
  328. // to execute the request.
  329. //
  330. // // Example sending a request using the DeleteDistributionRequest method.
  331. // req, resp := client.DeleteDistributionRequest(params)
  332. //
  333. // err := req.Send()
  334. // if err == nil { // resp is now filled
  335. // fmt.Println(resp)
  336. // }
  337. //
  338. func (c *CloudFront) DeleteDistributionRequest(input *DeleteDistributionInput) (req *request.Request, output *DeleteDistributionOutput) {
  339. op := &request.Operation{
  340. Name: opDeleteDistribution,
  341. HTTPMethod: "DELETE",
  342. HTTPPath: "/2016-08-01/distribution/{Id}",
  343. }
  344. if input == nil {
  345. input = &DeleteDistributionInput{}
  346. }
  347. req = c.newRequest(op, input, output)
  348. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  349. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  350. output = &DeleteDistributionOutput{}
  351. req.Data = output
  352. return
  353. }
  354. // Delete a distribution.
  355. func (c *CloudFront) DeleteDistribution(input *DeleteDistributionInput) (*DeleteDistributionOutput, error) {
  356. req, out := c.DeleteDistributionRequest(input)
  357. err := req.Send()
  358. return out, err
  359. }
  360. const opDeleteStreamingDistribution = "DeleteStreamingDistribution2016_08_01"
  361. // DeleteStreamingDistributionRequest generates a "aws/request.Request" representing the
  362. // client's request for the DeleteStreamingDistribution operation. The "output" return
  363. // value can be used to capture response data after the request's "Send" method
  364. // is called.
  365. //
  366. // Creating a request object using this method should be used when you want to inject
  367. // custom logic into the request's lifecycle using a custom handler, or if you want to
  368. // access properties on the request object before or after sending the request. If
  369. // you just want the service response, call the DeleteStreamingDistribution method directly
  370. // instead.
  371. //
  372. // Note: You must call the "Send" method on the returned request object in order
  373. // to execute the request.
  374. //
  375. // // Example sending a request using the DeleteStreamingDistributionRequest method.
  376. // req, resp := client.DeleteStreamingDistributionRequest(params)
  377. //
  378. // err := req.Send()
  379. // if err == nil { // resp is now filled
  380. // fmt.Println(resp)
  381. // }
  382. //
  383. func (c *CloudFront) DeleteStreamingDistributionRequest(input *DeleteStreamingDistributionInput) (req *request.Request, output *DeleteStreamingDistributionOutput) {
  384. op := &request.Operation{
  385. Name: opDeleteStreamingDistribution,
  386. HTTPMethod: "DELETE",
  387. HTTPPath: "/2016-08-01/streaming-distribution/{Id}",
  388. }
  389. if input == nil {
  390. input = &DeleteStreamingDistributionInput{}
  391. }
  392. req = c.newRequest(op, input, output)
  393. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  394. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  395. output = &DeleteStreamingDistributionOutput{}
  396. req.Data = output
  397. return
  398. }
  399. // Delete a streaming distribution.
  400. func (c *CloudFront) DeleteStreamingDistribution(input *DeleteStreamingDistributionInput) (*DeleteStreamingDistributionOutput, error) {
  401. req, out := c.DeleteStreamingDistributionRequest(input)
  402. err := req.Send()
  403. return out, err
  404. }
  405. const opGetCloudFrontOriginAccessIdentity = "GetCloudFrontOriginAccessIdentity2016_08_01"
  406. // GetCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the
  407. // client's request for the GetCloudFrontOriginAccessIdentity operation. The "output" return
  408. // value can be used to capture response data after the request's "Send" method
  409. // is called.
  410. //
  411. // Creating a request object using this method should be used when you want to inject
  412. // custom logic into the request's lifecycle using a custom handler, or if you want to
  413. // access properties on the request object before or after sending the request. If
  414. // you just want the service response, call the GetCloudFrontOriginAccessIdentity method directly
  415. // instead.
  416. //
  417. // Note: You must call the "Send" method on the returned request object in order
  418. // to execute the request.
  419. //
  420. // // Example sending a request using the GetCloudFrontOriginAccessIdentityRequest method.
  421. // req, resp := client.GetCloudFrontOriginAccessIdentityRequest(params)
  422. //
  423. // err := req.Send()
  424. // if err == nil { // resp is now filled
  425. // fmt.Println(resp)
  426. // }
  427. //
  428. func (c *CloudFront) GetCloudFrontOriginAccessIdentityRequest(input *GetCloudFrontOriginAccessIdentityInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityOutput) {
  429. op := &request.Operation{
  430. Name: opGetCloudFrontOriginAccessIdentity,
  431. HTTPMethod: "GET",
  432. HTTPPath: "/2016-08-01/origin-access-identity/cloudfront/{Id}",
  433. }
  434. if input == nil {
  435. input = &GetCloudFrontOriginAccessIdentityInput{}
  436. }
  437. req = c.newRequest(op, input, output)
  438. output = &GetCloudFrontOriginAccessIdentityOutput{}
  439. req.Data = output
  440. return
  441. }
  442. // Get the information about an origin access identity.
  443. func (c *CloudFront) GetCloudFrontOriginAccessIdentity(input *GetCloudFrontOriginAccessIdentityInput) (*GetCloudFrontOriginAccessIdentityOutput, error) {
  444. req, out := c.GetCloudFrontOriginAccessIdentityRequest(input)
  445. err := req.Send()
  446. return out, err
  447. }
  448. const opGetCloudFrontOriginAccessIdentityConfig = "GetCloudFrontOriginAccessIdentityConfig2016_08_01"
  449. // GetCloudFrontOriginAccessIdentityConfigRequest generates a "aws/request.Request" representing the
  450. // client's request for the GetCloudFrontOriginAccessIdentityConfig operation. The "output" return
  451. // value can be used to capture response data after the request's "Send" method
  452. // is called.
  453. //
  454. // Creating a request object using this method should be used when you want to inject
  455. // custom logic into the request's lifecycle using a custom handler, or if you want to
  456. // access properties on the request object before or after sending the request. If
  457. // you just want the service response, call the GetCloudFrontOriginAccessIdentityConfig method directly
  458. // instead.
  459. //
  460. // Note: You must call the "Send" method on the returned request object in order
  461. // to execute the request.
  462. //
  463. // // Example sending a request using the GetCloudFrontOriginAccessIdentityConfigRequest method.
  464. // req, resp := client.GetCloudFrontOriginAccessIdentityConfigRequest(params)
  465. //
  466. // err := req.Send()
  467. // if err == nil { // resp is now filled
  468. // fmt.Println(resp)
  469. // }
  470. //
  471. func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigRequest(input *GetCloudFrontOriginAccessIdentityConfigInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityConfigOutput) {
  472. op := &request.Operation{
  473. Name: opGetCloudFrontOriginAccessIdentityConfig,
  474. HTTPMethod: "GET",
  475. HTTPPath: "/2016-08-01/origin-access-identity/cloudfront/{Id}/config",
  476. }
  477. if input == nil {
  478. input = &GetCloudFrontOriginAccessIdentityConfigInput{}
  479. }
  480. req = c.newRequest(op, input, output)
  481. output = &GetCloudFrontOriginAccessIdentityConfigOutput{}
  482. req.Data = output
  483. return
  484. }
  485. // Get the configuration information about an origin access identity.
  486. func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfig(input *GetCloudFrontOriginAccessIdentityConfigInput) (*GetCloudFrontOriginAccessIdentityConfigOutput, error) {
  487. req, out := c.GetCloudFrontOriginAccessIdentityConfigRequest(input)
  488. err := req.Send()
  489. return out, err
  490. }
  491. const opGetDistribution = "GetDistribution2016_08_01"
  492. // GetDistributionRequest generates a "aws/request.Request" representing the
  493. // client's request for the GetDistribution operation. The "output" return
  494. // value can be used to capture response data after the request's "Send" method
  495. // is called.
  496. //
  497. // Creating a request object using this method should be used when you want to inject
  498. // custom logic into the request's lifecycle using a custom handler, or if you want to
  499. // access properties on the request object before or after sending the request. If
  500. // you just want the service response, call the GetDistribution method directly
  501. // instead.
  502. //
  503. // Note: You must call the "Send" method on the returned request object in order
  504. // to execute the request.
  505. //
  506. // // Example sending a request using the GetDistributionRequest method.
  507. // req, resp := client.GetDistributionRequest(params)
  508. //
  509. // err := req.Send()
  510. // if err == nil { // resp is now filled
  511. // fmt.Println(resp)
  512. // }
  513. //
  514. func (c *CloudFront) GetDistributionRequest(input *GetDistributionInput) (req *request.Request, output *GetDistributionOutput) {
  515. op := &request.Operation{
  516. Name: opGetDistribution,
  517. HTTPMethod: "GET",
  518. HTTPPath: "/2016-08-01/distribution/{Id}",
  519. }
  520. if input == nil {
  521. input = &GetDistributionInput{}
  522. }
  523. req = c.newRequest(op, input, output)
  524. output = &GetDistributionOutput{}
  525. req.Data = output
  526. return
  527. }
  528. // Get the information about a distribution.
  529. func (c *CloudFront) GetDistribution(input *GetDistributionInput) (*GetDistributionOutput, error) {
  530. req, out := c.GetDistributionRequest(input)
  531. err := req.Send()
  532. return out, err
  533. }
  534. const opGetDistributionConfig = "GetDistributionConfig2016_08_01"
  535. // GetDistributionConfigRequest generates a "aws/request.Request" representing the
  536. // client's request for the GetDistributionConfig operation. The "output" return
  537. // value can be used to capture response data after the request's "Send" method
  538. // is called.
  539. //
  540. // Creating a request object using this method should be used when you want to inject
  541. // custom logic into the request's lifecycle using a custom handler, or if you want to
  542. // access properties on the request object before or after sending the request. If
  543. // you just want the service response, call the GetDistributionConfig method directly
  544. // instead.
  545. //
  546. // Note: You must call the "Send" method on the returned request object in order
  547. // to execute the request.
  548. //
  549. // // Example sending a request using the GetDistributionConfigRequest method.
  550. // req, resp := client.GetDistributionConfigRequest(params)
  551. //
  552. // err := req.Send()
  553. // if err == nil { // resp is now filled
  554. // fmt.Println(resp)
  555. // }
  556. //
  557. func (c *CloudFront) GetDistributionConfigRequest(input *GetDistributionConfigInput) (req *request.Request, output *GetDistributionConfigOutput) {
  558. op := &request.Operation{
  559. Name: opGetDistributionConfig,
  560. HTTPMethod: "GET",
  561. HTTPPath: "/2016-08-01/distribution/{Id}/config",
  562. }
  563. if input == nil {
  564. input = &GetDistributionConfigInput{}
  565. }
  566. req = c.newRequest(op, input, output)
  567. output = &GetDistributionConfigOutput{}
  568. req.Data = output
  569. return
  570. }
  571. // Get the configuration information about a distribution.
  572. func (c *CloudFront) GetDistributionConfig(input *GetDistributionConfigInput) (*GetDistributionConfigOutput, error) {
  573. req, out := c.GetDistributionConfigRequest(input)
  574. err := req.Send()
  575. return out, err
  576. }
  577. const opGetInvalidation = "GetInvalidation2016_08_01"
  578. // GetInvalidationRequest generates a "aws/request.Request" representing the
  579. // client's request for the GetInvalidation operation. The "output" return
  580. // value can be used to capture response data after the request's "Send" method
  581. // is called.
  582. //
  583. // Creating a request object using this method should be used when you want to inject
  584. // custom logic into the request's lifecycle using a custom handler, or if you want to
  585. // access properties on the request object before or after sending the request. If
  586. // you just want the service response, call the GetInvalidation method directly
  587. // instead.
  588. //
  589. // Note: You must call the "Send" method on the returned request object in order
  590. // to execute the request.
  591. //
  592. // // Example sending a request using the GetInvalidationRequest method.
  593. // req, resp := client.GetInvalidationRequest(params)
  594. //
  595. // err := req.Send()
  596. // if err == nil { // resp is now filled
  597. // fmt.Println(resp)
  598. // }
  599. //
  600. func (c *CloudFront) GetInvalidationRequest(input *GetInvalidationInput) (req *request.Request, output *GetInvalidationOutput) {
  601. op := &request.Operation{
  602. Name: opGetInvalidation,
  603. HTTPMethod: "GET",
  604. HTTPPath: "/2016-08-01/distribution/{DistributionId}/invalidation/{Id}",
  605. }
  606. if input == nil {
  607. input = &GetInvalidationInput{}
  608. }
  609. req = c.newRequest(op, input, output)
  610. output = &GetInvalidationOutput{}
  611. req.Data = output
  612. return
  613. }
  614. // Get the information about an invalidation.
  615. func (c *CloudFront) GetInvalidation(input *GetInvalidationInput) (*GetInvalidationOutput, error) {
  616. req, out := c.GetInvalidationRequest(input)
  617. err := req.Send()
  618. return out, err
  619. }
  620. const opGetStreamingDistribution = "GetStreamingDistribution2016_08_01"
  621. // GetStreamingDistributionRequest generates a "aws/request.Request" representing the
  622. // client's request for the GetStreamingDistribution operation. The "output" return
  623. // value can be used to capture response data after the request's "Send" method
  624. // is called.
  625. //
  626. // Creating a request object using this method should be used when you want to inject
  627. // custom logic into the request's lifecycle using a custom handler, or if you want to
  628. // access properties on the request object before or after sending the request. If
  629. // you just want the service response, call the GetStreamingDistribution method directly
  630. // instead.
  631. //
  632. // Note: You must call the "Send" method on the returned request object in order
  633. // to execute the request.
  634. //
  635. // // Example sending a request using the GetStreamingDistributionRequest method.
  636. // req, resp := client.GetStreamingDistributionRequest(params)
  637. //
  638. // err := req.Send()
  639. // if err == nil { // resp is now filled
  640. // fmt.Println(resp)
  641. // }
  642. //
  643. func (c *CloudFront) GetStreamingDistributionRequest(input *GetStreamingDistributionInput) (req *request.Request, output *GetStreamingDistributionOutput) {
  644. op := &request.Operation{
  645. Name: opGetStreamingDistribution,
  646. HTTPMethod: "GET",
  647. HTTPPath: "/2016-08-01/streaming-distribution/{Id}",
  648. }
  649. if input == nil {
  650. input = &GetStreamingDistributionInput{}
  651. }
  652. req = c.newRequest(op, input, output)
  653. output = &GetStreamingDistributionOutput{}
  654. req.Data = output
  655. return
  656. }
  657. // Get the information about a streaming distribution.
  658. func (c *CloudFront) GetStreamingDistribution(input *GetStreamingDistributionInput) (*GetStreamingDistributionOutput, error) {
  659. req, out := c.GetStreamingDistributionRequest(input)
  660. err := req.Send()
  661. return out, err
  662. }
  663. const opGetStreamingDistributionConfig = "GetStreamingDistributionConfig2016_08_01"
  664. // GetStreamingDistributionConfigRequest generates a "aws/request.Request" representing the
  665. // client's request for the GetStreamingDistributionConfig operation. The "output" return
  666. // value can be used to capture response data after the request's "Send" method
  667. // is called.
  668. //
  669. // Creating a request object using this method should be used when you want to inject
  670. // custom logic into the request's lifecycle using a custom handler, or if you want to
  671. // access properties on the request object before or after sending the request. If
  672. // you just want the service response, call the GetStreamingDistributionConfig method directly
  673. // instead.
  674. //
  675. // Note: You must call the "Send" method on the returned request object in order
  676. // to execute the request.
  677. //
  678. // // Example sending a request using the GetStreamingDistributionConfigRequest method.
  679. // req, resp := client.GetStreamingDistributionConfigRequest(params)
  680. //
  681. // err := req.Send()
  682. // if err == nil { // resp is now filled
  683. // fmt.Println(resp)
  684. // }
  685. //
  686. func (c *CloudFront) GetStreamingDistributionConfigRequest(input *GetStreamingDistributionConfigInput) (req *request.Request, output *GetStreamingDistributionConfigOutput) {
  687. op := &request.Operation{
  688. Name: opGetStreamingDistributionConfig,
  689. HTTPMethod: "GET",
  690. HTTPPath: "/2016-08-01/streaming-distribution/{Id}/config",
  691. }
  692. if input == nil {
  693. input = &GetStreamingDistributionConfigInput{}
  694. }
  695. req = c.newRequest(op, input, output)
  696. output = &GetStreamingDistributionConfigOutput{}
  697. req.Data = output
  698. return
  699. }
  700. // Get the configuration information about a streaming distribution.
  701. func (c *CloudFront) GetStreamingDistributionConfig(input *GetStreamingDistributionConfigInput) (*GetStreamingDistributionConfigOutput, error) {
  702. req, out := c.GetStreamingDistributionConfigRequest(input)
  703. err := req.Send()
  704. return out, err
  705. }
  706. const opListCloudFrontOriginAccessIdentities = "ListCloudFrontOriginAccessIdentities2016_08_01"
  707. // ListCloudFrontOriginAccessIdentitiesRequest generates a "aws/request.Request" representing the
  708. // client's request for the ListCloudFrontOriginAccessIdentities operation. The "output" return
  709. // value can be used to capture response data after the request's "Send" method
  710. // is called.
  711. //
  712. // Creating a request object using this method should be used when you want to inject
  713. // custom logic into the request's lifecycle using a custom handler, or if you want to
  714. // access properties on the request object before or after sending the request. If
  715. // you just want the service response, call the ListCloudFrontOriginAccessIdentities method directly
  716. // instead.
  717. //
  718. // Note: You must call the "Send" method on the returned request object in order
  719. // to execute the request.
  720. //
  721. // // Example sending a request using the ListCloudFrontOriginAccessIdentitiesRequest method.
  722. // req, resp := client.ListCloudFrontOriginAccessIdentitiesRequest(params)
  723. //
  724. // err := req.Send()
  725. // if err == nil { // resp is now filled
  726. // fmt.Println(resp)
  727. // }
  728. //
  729. func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesRequest(input *ListCloudFrontOriginAccessIdentitiesInput) (req *request.Request, output *ListCloudFrontOriginAccessIdentitiesOutput) {
  730. op := &request.Operation{
  731. Name: opListCloudFrontOriginAccessIdentities,
  732. HTTPMethod: "GET",
  733. HTTPPath: "/2016-08-01/origin-access-identity/cloudfront",
  734. Paginator: &request.Paginator{
  735. InputTokens: []string{"Marker"},
  736. OutputTokens: []string{"CloudFrontOriginAccessIdentityList.NextMarker"},
  737. LimitToken: "MaxItems",
  738. TruncationToken: "CloudFrontOriginAccessIdentityList.IsTruncated",
  739. },
  740. }
  741. if input == nil {
  742. input = &ListCloudFrontOriginAccessIdentitiesInput{}
  743. }
  744. req = c.newRequest(op, input, output)
  745. output = &ListCloudFrontOriginAccessIdentitiesOutput{}
  746. req.Data = output
  747. return
  748. }
  749. // List origin access identities.
  750. func (c *CloudFront) ListCloudFrontOriginAccessIdentities(input *ListCloudFrontOriginAccessIdentitiesInput) (*ListCloudFrontOriginAccessIdentitiesOutput, error) {
  751. req, out := c.ListCloudFrontOriginAccessIdentitiesRequest(input)
  752. err := req.Send()
  753. return out, err
  754. }
  755. // ListCloudFrontOriginAccessIdentitiesPages iterates over the pages of a ListCloudFrontOriginAccessIdentities operation,
  756. // calling the "fn" function with the response data for each page. To stop
  757. // iterating, return false from the fn function.
  758. //
  759. // See ListCloudFrontOriginAccessIdentities method for more information on how to use this operation.
  760. //
  761. // Note: This operation can generate multiple requests to a service.
  762. //
  763. // // Example iterating over at most 3 pages of a ListCloudFrontOriginAccessIdentities operation.
  764. // pageNum := 0
  765. // err := client.ListCloudFrontOriginAccessIdentitiesPages(params,
  766. // func(page *ListCloudFrontOriginAccessIdentitiesOutput, lastPage bool) bool {
  767. // pageNum++
  768. // fmt.Println(page)
  769. // return pageNum <= 3
  770. // })
  771. //
  772. func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesPages(input *ListCloudFrontOriginAccessIdentitiesInput, fn func(p *ListCloudFrontOriginAccessIdentitiesOutput, lastPage bool) (shouldContinue bool)) error {
  773. page, _ := c.ListCloudFrontOriginAccessIdentitiesRequest(input)
  774. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  775. return page.EachPage(func(p interface{}, lastPage bool) bool {
  776. return fn(p.(*ListCloudFrontOriginAccessIdentitiesOutput), lastPage)
  777. })
  778. }
  779. const opListDistributions = "ListDistributions2016_08_01"
  780. // ListDistributionsRequest generates a "aws/request.Request" representing the
  781. // client's request for the ListDistributions operation. The "output" return
  782. // value can be used to capture response data after the request's "Send" method
  783. // is called.
  784. //
  785. // Creating a request object using this method should be used when you want to inject
  786. // custom logic into the request's lifecycle using a custom handler, or if you want to
  787. // access properties on the request object before or after sending the request. If
  788. // you just want the service response, call the ListDistributions method directly
  789. // instead.
  790. //
  791. // Note: You must call the "Send" method on the returned request object in order
  792. // to execute the request.
  793. //
  794. // // Example sending a request using the ListDistributionsRequest method.
  795. // req, resp := client.ListDistributionsRequest(params)
  796. //
  797. // err := req.Send()
  798. // if err == nil { // resp is now filled
  799. // fmt.Println(resp)
  800. // }
  801. //
  802. func (c *CloudFront) ListDistributionsRequest(input *ListDistributionsInput) (req *request.Request, output *ListDistributionsOutput) {
  803. op := &request.Operation{
  804. Name: opListDistributions,
  805. HTTPMethod: "GET",
  806. HTTPPath: "/2016-08-01/distribution",
  807. Paginator: &request.Paginator{
  808. InputTokens: []string{"Marker"},
  809. OutputTokens: []string{"DistributionList.NextMarker"},
  810. LimitToken: "MaxItems",
  811. TruncationToken: "DistributionList.IsTruncated",
  812. },
  813. }
  814. if input == nil {
  815. input = &ListDistributionsInput{}
  816. }
  817. req = c.newRequest(op, input, output)
  818. output = &ListDistributionsOutput{}
  819. req.Data = output
  820. return
  821. }
  822. // List distributions.
  823. func (c *CloudFront) ListDistributions(input *ListDistributionsInput) (*ListDistributionsOutput, error) {
  824. req, out := c.ListDistributionsRequest(input)
  825. err := req.Send()
  826. return out, err
  827. }
  828. // ListDistributionsPages iterates over the pages of a ListDistributions operation,
  829. // calling the "fn" function with the response data for each page. To stop
  830. // iterating, return false from the fn function.
  831. //
  832. // See ListDistributions method for more information on how to use this operation.
  833. //
  834. // Note: This operation can generate multiple requests to a service.
  835. //
  836. // // Example iterating over at most 3 pages of a ListDistributions operation.
  837. // pageNum := 0
  838. // err := client.ListDistributionsPages(params,
  839. // func(page *ListDistributionsOutput, lastPage bool) bool {
  840. // pageNum++
  841. // fmt.Println(page)
  842. // return pageNum <= 3
  843. // })
  844. //
  845. func (c *CloudFront) ListDistributionsPages(input *ListDistributionsInput, fn func(p *ListDistributionsOutput, lastPage bool) (shouldContinue bool)) error {
  846. page, _ := c.ListDistributionsRequest(input)
  847. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  848. return page.EachPage(func(p interface{}, lastPage bool) bool {
  849. return fn(p.(*ListDistributionsOutput), lastPage)
  850. })
  851. }
  852. const opListDistributionsByWebACLId = "ListDistributionsByWebACLId2016_08_01"
  853. // ListDistributionsByWebACLIdRequest generates a "aws/request.Request" representing the
  854. // client's request for the ListDistributionsByWebACLId operation. The "output" return
  855. // value can be used to capture response data after the request's "Send" method
  856. // is called.
  857. //
  858. // Creating a request object using this method should be used when you want to inject
  859. // custom logic into the request's lifecycle using a custom handler, or if you want to
  860. // access properties on the request object before or after sending the request. If
  861. // you just want the service response, call the ListDistributionsByWebACLId method directly
  862. // instead.
  863. //
  864. // Note: You must call the "Send" method on the returned request object in order
  865. // to execute the request.
  866. //
  867. // // Example sending a request using the ListDistributionsByWebACLIdRequest method.
  868. // req, resp := client.ListDistributionsByWebACLIdRequest(params)
  869. //
  870. // err := req.Send()
  871. // if err == nil { // resp is now filled
  872. // fmt.Println(resp)
  873. // }
  874. //
  875. func (c *CloudFront) ListDistributionsByWebACLIdRequest(input *ListDistributionsByWebACLIdInput) (req *request.Request, output *ListDistributionsByWebACLIdOutput) {
  876. op := &request.Operation{
  877. Name: opListDistributionsByWebACLId,
  878. HTTPMethod: "GET",
  879. HTTPPath: "/2016-08-01/distributionsByWebACLId/{WebACLId}",
  880. }
  881. if input == nil {
  882. input = &ListDistributionsByWebACLIdInput{}
  883. }
  884. req = c.newRequest(op, input, output)
  885. output = &ListDistributionsByWebACLIdOutput{}
  886. req.Data = output
  887. return
  888. }
  889. // List the distributions that are associated with a specified AWS WAF web ACL.
  890. func (c *CloudFront) ListDistributionsByWebACLId(input *ListDistributionsByWebACLIdInput) (*ListDistributionsByWebACLIdOutput, error) {
  891. req, out := c.ListDistributionsByWebACLIdRequest(input)
  892. err := req.Send()
  893. return out, err
  894. }
  895. const opListInvalidations = "ListInvalidations2016_08_01"
  896. // ListInvalidationsRequest generates a "aws/request.Request" representing the
  897. // client's request for the ListInvalidations operation. The "output" return
  898. // value can be used to capture response data after the request's "Send" method
  899. // is called.
  900. //
  901. // Creating a request object using this method should be used when you want to inject
  902. // custom logic into the request's lifecycle using a custom handler, or if you want to
  903. // access properties on the request object before or after sending the request. If
  904. // you just want the service response, call the ListInvalidations method directly
  905. // instead.
  906. //
  907. // Note: You must call the "Send" method on the returned request object in order
  908. // to execute the request.
  909. //
  910. // // Example sending a request using the ListInvalidationsRequest method.
  911. // req, resp := client.ListInvalidationsRequest(params)
  912. //
  913. // err := req.Send()
  914. // if err == nil { // resp is now filled
  915. // fmt.Println(resp)
  916. // }
  917. //
  918. func (c *CloudFront) ListInvalidationsRequest(input *ListInvalidationsInput) (req *request.Request, output *ListInvalidationsOutput) {
  919. op := &request.Operation{
  920. Name: opListInvalidations,
  921. HTTPMethod: "GET",
  922. HTTPPath: "/2016-08-01/distribution/{DistributionId}/invalidation",
  923. Paginator: &request.Paginator{
  924. InputTokens: []string{"Marker"},
  925. OutputTokens: []string{"InvalidationList.NextMarker"},
  926. LimitToken: "MaxItems",
  927. TruncationToken: "InvalidationList.IsTruncated",
  928. },
  929. }
  930. if input == nil {
  931. input = &ListInvalidationsInput{}
  932. }
  933. req = c.newRequest(op, input, output)
  934. output = &ListInvalidationsOutput{}
  935. req.Data = output
  936. return
  937. }
  938. // List invalidation batches.
  939. func (c *CloudFront) ListInvalidations(input *ListInvalidationsInput) (*ListInvalidationsOutput, error) {
  940. req, out := c.ListInvalidationsRequest(input)
  941. err := req.Send()
  942. return out, err
  943. }
  944. // ListInvalidationsPages iterates over the pages of a ListInvalidations operation,
  945. // calling the "fn" function with the response data for each page. To stop
  946. // iterating, return false from the fn function.
  947. //
  948. // See ListInvalidations method for more information on how to use this operation.
  949. //
  950. // Note: This operation can generate multiple requests to a service.
  951. //
  952. // // Example iterating over at most 3 pages of a ListInvalidations operation.
  953. // pageNum := 0
  954. // err := client.ListInvalidationsPages(params,
  955. // func(page *ListInvalidationsOutput, lastPage bool) bool {
  956. // pageNum++
  957. // fmt.Println(page)
  958. // return pageNum <= 3
  959. // })
  960. //
  961. func (c *CloudFront) ListInvalidationsPages(input *ListInvalidationsInput, fn func(p *ListInvalidationsOutput, lastPage bool) (shouldContinue bool)) error {
  962. page, _ := c.ListInvalidationsRequest(input)
  963. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  964. return page.EachPage(func(p interface{}, lastPage bool) bool {
  965. return fn(p.(*ListInvalidationsOutput), lastPage)
  966. })
  967. }
  968. const opListStreamingDistributions = "ListStreamingDistributions2016_08_01"
  969. // ListStreamingDistributionsRequest generates a "aws/request.Request" representing the
  970. // client's request for the ListStreamingDistributions operation. The "output" return
  971. // value can be used to capture response data after the request's "Send" method
  972. // is called.
  973. //
  974. // Creating a request object using this method should be used when you want to inject
  975. // custom logic into the request's lifecycle using a custom handler, or if you want to
  976. // access properties on the request object before or after sending the request. If
  977. // you just want the service response, call the ListStreamingDistributions method directly
  978. // instead.
  979. //
  980. // Note: You must call the "Send" method on the returned request object in order
  981. // to execute the request.
  982. //
  983. // // Example sending a request using the ListStreamingDistributionsRequest method.
  984. // req, resp := client.ListStreamingDistributionsRequest(params)
  985. //
  986. // err := req.Send()
  987. // if err == nil { // resp is now filled
  988. // fmt.Println(resp)
  989. // }
  990. //
  991. func (c *CloudFront) ListStreamingDistributionsRequest(input *ListStreamingDistributionsInput) (req *request.Request, output *ListStreamingDistributionsOutput) {
  992. op := &request.Operation{
  993. Name: opListStreamingDistributions,
  994. HTTPMethod: "GET",
  995. HTTPPath: "/2016-08-01/streaming-distribution",
  996. Paginator: &request.Paginator{
  997. InputTokens: []string{"Marker"},
  998. OutputTokens: []string{"StreamingDistributionList.NextMarker"},
  999. LimitToken: "MaxItems",
  1000. TruncationToken: "StreamingDistributionList.IsTruncated",
  1001. },
  1002. }
  1003. if input == nil {
  1004. input = &ListStreamingDistributionsInput{}
  1005. }
  1006. req = c.newRequest(op, input, output)
  1007. output = &ListStreamingDistributionsOutput{}
  1008. req.Data = output
  1009. return
  1010. }
  1011. // List streaming distributions.
  1012. func (c *CloudFront) ListStreamingDistributions(input *ListStreamingDistributionsInput) (*ListStreamingDistributionsOutput, error) {
  1013. req, out := c.ListStreamingDistributionsRequest(input)
  1014. err := req.Send()
  1015. return out, err
  1016. }
  1017. // ListStreamingDistributionsPages iterates over the pages of a ListStreamingDistributions operation,
  1018. // calling the "fn" function with the response data for each page. To stop
  1019. // iterating, return false from the fn function.
  1020. //
  1021. // See ListStreamingDistributions method for more information on how to use this operation.
  1022. //
  1023. // Note: This operation can generate multiple requests to a service.
  1024. //
  1025. // // Example iterating over at most 3 pages of a ListStreamingDistributions operation.
  1026. // pageNum := 0
  1027. // err := client.ListStreamingDistributionsPages(params,
  1028. // func(page *ListStreamingDistributionsOutput, lastPage bool) bool {
  1029. // pageNum++
  1030. // fmt.Println(page)
  1031. // return pageNum <= 3
  1032. // })
  1033. //
  1034. func (c *CloudFront) ListStreamingDistributionsPages(input *ListStreamingDistributionsInput, fn func(p *ListStreamingDistributionsOutput, lastPage bool) (shouldContinue bool)) error {
  1035. page, _ := c.ListStreamingDistributionsRequest(input)
  1036. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1037. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1038. return fn(p.(*ListStreamingDistributionsOutput), lastPage)
  1039. })
  1040. }
  1041. const opListTagsForResource = "ListTagsForResource2016_08_01"
  1042. // ListTagsForResourceRequest generates a "aws/request.Request" representing the
  1043. // client's request for the ListTagsForResource operation. The "output" return
  1044. // value can be used to capture response data after the request's "Send" method
  1045. // is called.
  1046. //
  1047. // Creating a request object using this method should be used when you want to inject
  1048. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1049. // access properties on the request object before or after sending the request. If
  1050. // you just want the service response, call the ListTagsForResource method directly
  1051. // instead.
  1052. //
  1053. // Note: You must call the "Send" method on the returned request object in order
  1054. // to execute the request.
  1055. //
  1056. // // Example sending a request using the ListTagsForResourceRequest method.
  1057. // req, resp := client.ListTagsForResourceRequest(params)
  1058. //
  1059. // err := req.Send()
  1060. // if err == nil { // resp is now filled
  1061. // fmt.Println(resp)
  1062. // }
  1063. //
  1064. func (c *CloudFront) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
  1065. op := &request.Operation{
  1066. Name: opListTagsForResource,
  1067. HTTPMethod: "GET",
  1068. HTTPPath: "/2016-08-01/tagging",
  1069. }
  1070. if input == nil {
  1071. input = &ListTagsForResourceInput{}
  1072. }
  1073. req = c.newRequest(op, input, output)
  1074. output = &ListTagsForResourceOutput{}
  1075. req.Data = output
  1076. return
  1077. }
  1078. // List tags for a CloudFront resource.
  1079. func (c *CloudFront) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
  1080. req, out := c.ListTagsForResourceRequest(input)
  1081. err := req.Send()
  1082. return out, err
  1083. }
  1084. const opTagResource = "TagResource2016_08_01"
  1085. // TagResourceRequest generates a "aws/request.Request" representing the
  1086. // client's request for the TagResource operation. The "output" return
  1087. // value can be used to capture response data after the request's "Send" method
  1088. // is called.
  1089. //
  1090. // Creating a request object using this method should be used when you want to inject
  1091. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1092. // access properties on the request object before or after sending the request. If
  1093. // you just want the service response, call the TagResource method directly
  1094. // instead.
  1095. //
  1096. // Note: You must call the "Send" method on the returned request object in order
  1097. // to execute the request.
  1098. //
  1099. // // Example sending a request using the TagResourceRequest method.
  1100. // req, resp := client.TagResourceRequest(params)
  1101. //
  1102. // err := req.Send()
  1103. // if err == nil { // resp is now filled
  1104. // fmt.Println(resp)
  1105. // }
  1106. //
  1107. func (c *CloudFront) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
  1108. op := &request.Operation{
  1109. Name: opTagResource,
  1110. HTTPMethod: "POST",
  1111. HTTPPath: "/2016-08-01/tagging?Operation=Tag",
  1112. }
  1113. if input == nil {
  1114. input = &TagResourceInput{}
  1115. }
  1116. req = c.newRequest(op, input, output)
  1117. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1118. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1119. output = &TagResourceOutput{}
  1120. req.Data = output
  1121. return
  1122. }
  1123. // Add tags to a CloudFront resource.
  1124. func (c *CloudFront) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
  1125. req, out := c.TagResourceRequest(input)
  1126. err := req.Send()
  1127. return out, err
  1128. }
  1129. const opUntagResource = "UntagResource2016_08_01"
  1130. // UntagResourceRequest generates a "aws/request.Request" representing the
  1131. // client's request for the UntagResource operation. The "output" return
  1132. // value can be used to capture response data after the request's "Send" method
  1133. // is called.
  1134. //
  1135. // Creating a request object using this method should be used when you want to inject
  1136. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1137. // access properties on the request object before or after sending the request. If
  1138. // you just want the service response, call the UntagResource method directly
  1139. // instead.
  1140. //
  1141. // Note: You must call the "Send" method on the returned request object in order
  1142. // to execute the request.
  1143. //
  1144. // // Example sending a request using the UntagResourceRequest method.
  1145. // req, resp := client.UntagResourceRequest(params)
  1146. //
  1147. // err := req.Send()
  1148. // if err == nil { // resp is now filled
  1149. // fmt.Println(resp)
  1150. // }
  1151. //
  1152. func (c *CloudFront) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
  1153. op := &request.Operation{
  1154. Name: opUntagResource,
  1155. HTTPMethod: "POST",
  1156. HTTPPath: "/2016-08-01/tagging?Operation=Untag",
  1157. }
  1158. if input == nil {
  1159. input = &UntagResourceInput{}
  1160. }
  1161. req = c.newRequest(op, input, output)
  1162. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1163. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1164. output = &UntagResourceOutput{}
  1165. req.Data = output
  1166. return
  1167. }
  1168. // Remove tags from a CloudFront resource.
  1169. func (c *CloudFront) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
  1170. req, out := c.UntagResourceRequest(input)
  1171. err := req.Send()
  1172. return out, err
  1173. }
  1174. const opUpdateCloudFrontOriginAccessIdentity = "UpdateCloudFrontOriginAccessIdentity2016_08_01"
  1175. // UpdateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the
  1176. // client's request for the UpdateCloudFrontOriginAccessIdentity operation. The "output" return
  1177. // value can be used to capture response data after the request's "Send" method
  1178. // is called.
  1179. //
  1180. // Creating a request object using this method should be used when you want to inject
  1181. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1182. // access properties on the request object before or after sending the request. If
  1183. // you just want the service response, call the UpdateCloudFrontOriginAccessIdentity method directly
  1184. // instead.
  1185. //
  1186. // Note: You must call the "Send" method on the returned request object in order
  1187. // to execute the request.
  1188. //
  1189. // // Example sending a request using the UpdateCloudFrontOriginAccessIdentityRequest method.
  1190. // req, resp := client.UpdateCloudFrontOriginAccessIdentityRequest(params)
  1191. //
  1192. // err := req.Send()
  1193. // if err == nil { // resp is now filled
  1194. // fmt.Println(resp)
  1195. // }
  1196. //
  1197. func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityRequest(input *UpdateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *UpdateCloudFrontOriginAccessIdentityOutput) {
  1198. op := &request.Operation{
  1199. Name: opUpdateCloudFrontOriginAccessIdentity,
  1200. HTTPMethod: "PUT",
  1201. HTTPPath: "/2016-08-01/origin-access-identity/cloudfront/{Id}/config",
  1202. }
  1203. if input == nil {
  1204. input = &UpdateCloudFrontOriginAccessIdentityInput{}
  1205. }
  1206. req = c.newRequest(op, input, output)
  1207. output = &UpdateCloudFrontOriginAccessIdentityOutput{}
  1208. req.Data = output
  1209. return
  1210. }
  1211. // Update an origin access identity.
  1212. func (c *CloudFront) UpdateCloudFrontOriginAccessIdentity(input *UpdateCloudFrontOriginAccessIdentityInput) (*UpdateCloudFrontOriginAccessIdentityOutput, error) {
  1213. req, out := c.UpdateCloudFrontOriginAccessIdentityRequest(input)
  1214. err := req.Send()
  1215. return out, err
  1216. }
  1217. const opUpdateDistribution = "UpdateDistribution2016_08_01"
  1218. // UpdateDistributionRequest generates a "aws/request.Request" representing the
  1219. // client's request for the UpdateDistribution operation. The "output" return
  1220. // value can be used to capture response data after the request's "Send" method
  1221. // is called.
  1222. //
  1223. // Creating a request object using this method should be used when you want to inject
  1224. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1225. // access properties on the request object before or after sending the request. If
  1226. // you just want the service response, call the UpdateDistribution method directly
  1227. // instead.
  1228. //
  1229. // Note: You must call the "Send" method on the returned request object in order
  1230. // to execute the request.
  1231. //
  1232. // // Example sending a request using the UpdateDistributionRequest method.
  1233. // req, resp := client.UpdateDistributionRequest(params)
  1234. //
  1235. // err := req.Send()
  1236. // if err == nil { // resp is now filled
  1237. // fmt.Println(resp)
  1238. // }
  1239. //
  1240. func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) (req *request.Request, output *UpdateDistributionOutput) {
  1241. op := &request.Operation{
  1242. Name: opUpdateDistribution,
  1243. HTTPMethod: "PUT",
  1244. HTTPPath: "/2016-08-01/distribution/{Id}/config",
  1245. }
  1246. if input == nil {
  1247. input = &UpdateDistributionInput{}
  1248. }
  1249. req = c.newRequest(op, input, output)
  1250. output = &UpdateDistributionOutput{}
  1251. req.Data = output
  1252. return
  1253. }
  1254. // Update a distribution.
  1255. func (c *CloudFront) UpdateDistribution(input *UpdateDistributionInput) (*UpdateDistributionOutput, error) {
  1256. req, out := c.UpdateDistributionRequest(input)
  1257. err := req.Send()
  1258. return out, err
  1259. }
  1260. const opUpdateStreamingDistribution = "UpdateStreamingDistribution2016_08_01"
  1261. // UpdateStreamingDistributionRequest generates a "aws/request.Request" representing the
  1262. // client's request for the UpdateStreamingDistribution operation. The "output" return
  1263. // value can be used to capture response data after the request's "Send" method
  1264. // is called.
  1265. //
  1266. // Creating a request object using this method should be used when you want to inject
  1267. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1268. // access properties on the request object before or after sending the request. If
  1269. // you just want the service response, call the UpdateStreamingDistribution method directly
  1270. // instead.
  1271. //
  1272. // Note: You must call the "Send" method on the returned request object in order
  1273. // to execute the request.
  1274. //
  1275. // // Example sending a request using the UpdateStreamingDistributionRequest method.
  1276. // req, resp := client.UpdateStreamingDistributionRequest(params)
  1277. //
  1278. // err := req.Send()
  1279. // if err == nil { // resp is now filled
  1280. // fmt.Println(resp)
  1281. // }
  1282. //
  1283. func (c *CloudFront) UpdateStreamingDistributionRequest(input *UpdateStreamingDistributionInput) (req *request.Request, output *UpdateStreamingDistributionOutput) {
  1284. op := &request.Operation{
  1285. Name: opUpdateStreamingDistribution,
  1286. HTTPMethod: "PUT",
  1287. HTTPPath: "/2016-08-01/streaming-distribution/{Id}/config",
  1288. }
  1289. if input == nil {
  1290. input = &UpdateStreamingDistributionInput{}
  1291. }
  1292. req = c.newRequest(op, input, output)
  1293. output = &UpdateStreamingDistributionOutput{}
  1294. req.Data = output
  1295. return
  1296. }
  1297. // Update a streaming distribution.
  1298. func (c *CloudFront) UpdateStreamingDistribution(input *UpdateStreamingDistributionInput) (*UpdateStreamingDistributionOutput, error) {
  1299. req, out := c.UpdateStreamingDistributionRequest(input)
  1300. err := req.Send()
  1301. return out, err
  1302. }
  1303. // A complex type that lists the AWS accounts, if any, that you included in
  1304. // the TrustedSigners complex type for the default cache behavior or for any
  1305. // of the other cache behaviors for this distribution. These are accounts that
  1306. // you want to allow to create signed URLs for private content.
  1307. type ActiveTrustedSigners struct {
  1308. _ struct{} `type:"structure"`
  1309. // Each active trusted signer.
  1310. Enabled *bool `type:"boolean" required:"true"`
  1311. // A complex type that contains one Signer complex type for each unique trusted
  1312. // signer that is specified in the TrustedSigners complex type, including trusted
  1313. // signers in the default cache behavior and in all of the other cache behaviors.
  1314. Items []*Signer `locationNameList:"Signer" type:"list"`
  1315. // The number of unique trusted signers included in all cache behaviors. For
  1316. // example, if three cache behaviors all list the same three AWS accounts, the
  1317. // value of Quantity for ActiveTrustedSigners will be 3.
  1318. Quantity *int64 `type:"integer" required:"true"`
  1319. }
  1320. // String returns the string representation
  1321. func (s ActiveTrustedSigners) String() string {
  1322. return awsutil.Prettify(s)
  1323. }
  1324. // GoString returns the string representation
  1325. func (s ActiveTrustedSigners) GoString() string {
  1326. return s.String()
  1327. }
  1328. // A complex type that contains information about CNAMEs (alternate domain names),
  1329. // if any, for this distribution.
  1330. type Aliases struct {
  1331. _ struct{} `type:"structure"`
  1332. // Optional: A complex type that contains CNAME elements, if any, for this distribution.
  1333. // If Quantity is 0, you can omit Items.
  1334. Items []*string `locationNameList:"CNAME" type:"list"`
  1335. // The number of CNAMEs, if any, for this distribution.
  1336. Quantity *int64 `type:"integer" required:"true"`
  1337. }
  1338. // String returns the string representation
  1339. func (s Aliases) String() string {
  1340. return awsutil.Prettify(s)
  1341. }
  1342. // GoString returns the string representation
  1343. func (s Aliases) GoString() string {
  1344. return s.String()
  1345. }
  1346. // Validate inspects the fields of the type to determine if they are valid.
  1347. func (s *Aliases) Validate() error {
  1348. invalidParams := request.ErrInvalidParams{Context: "Aliases"}
  1349. if s.Quantity == nil {
  1350. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  1351. }
  1352. if invalidParams.Len() > 0 {
  1353. return invalidParams
  1354. }
  1355. return nil
  1356. }
  1357. // A complex type that controls which HTTP methods CloudFront processes and
  1358. // forwards to your Amazon S3 bucket or your custom origin. There are three
  1359. // choices: - CloudFront forwards only GET and HEAD requests. - CloudFront forwards
  1360. // only GET, HEAD and OPTIONS requests. - CloudFront forwards GET, HEAD, OPTIONS,
  1361. // PUT, PATCH, POST, and DELETE requests. If you pick the third choice, you
  1362. // may need to restrict access to your Amazon S3 bucket or to your custom origin
  1363. // so users can't perform operations that you don't want them to. For example,
  1364. // you may not want users to have permission to delete objects from your origin.
  1365. type AllowedMethods struct {
  1366. _ struct{} `type:"structure"`
  1367. // A complex type that controls whether CloudFront caches the response to requests
  1368. // using the specified HTTP methods. There are two choices: - CloudFront caches
  1369. // responses to GET and HEAD requests. - CloudFront caches responses to GET,
  1370. // HEAD, and OPTIONS requests. If you pick the second choice for your S3 Origin,
  1371. // you may need to forward Access-Control-Request-Method, Access-Control-Request-Headers
  1372. // and Origin headers for the responses to be cached correctly.
  1373. CachedMethods *CachedMethods `type:"structure"`
  1374. // A complex type that contains the HTTP methods that you want CloudFront to
  1375. // process and forward to your origin.
  1376. Items []*string `locationNameList:"Method" type:"list" required:"true"`
  1377. // The number of HTTP methods that you want CloudFront to forward to your origin.
  1378. // Valid values are 2 (for GET and HEAD requests), 3 (for GET, HEAD and OPTIONS
  1379. // requests) and 7 (for GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests).
  1380. Quantity *int64 `type:"integer" required:"true"`
  1381. }
  1382. // String returns the string representation
  1383. func (s AllowedMethods) String() string {
  1384. return awsutil.Prettify(s)
  1385. }
  1386. // GoString returns the string representation
  1387. func (s AllowedMethods) GoString() string {
  1388. return s.String()
  1389. }
  1390. // Validate inspects the fields of the type to determine if they are valid.
  1391. func (s *AllowedMethods) Validate() error {
  1392. invalidParams := request.ErrInvalidParams{Context: "AllowedMethods"}
  1393. if s.Items == nil {
  1394. invalidParams.Add(request.NewErrParamRequired("Items"))
  1395. }
  1396. if s.Quantity == nil {
  1397. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  1398. }
  1399. if s.CachedMethods != nil {
  1400. if err := s.CachedMethods.Validate(); err != nil {
  1401. invalidParams.AddNested("CachedMethods", err.(request.ErrInvalidParams))
  1402. }
  1403. }
  1404. if invalidParams.Len() > 0 {
  1405. return invalidParams
  1406. }
  1407. return nil
  1408. }
  1409. // A complex type that describes how CloudFront processes requests. You can
  1410. // create up to 10 cache behaviors.You must create at least as many cache behaviors
  1411. // (including the default cache behavior) as you have origins if you want CloudFront
  1412. // to distribute objects from all of the origins. Each cache behavior specifies
  1413. // the one origin from which you want CloudFront to get objects. If you have
  1414. // two origins and only the default cache behavior, the default cache behavior
  1415. // will cause CloudFront to get objects from one of the origins, but the other
  1416. // origin will never be used. If you don't want to specify any cache behaviors,
  1417. // include only an empty CacheBehaviors element. Don't include an empty CacheBehavior
  1418. // element, or CloudFront returns a MalformedXML error. To delete all cache
  1419. // behaviors in an existing distribution, update the distribution configuration
  1420. // and include only an empty CacheBehaviors element. To add, change, or remove
  1421. // one or more cache behaviors, update the distribution configuration and specify
  1422. // all of the cache behaviors that you want to include in the updated distribution.
  1423. type CacheBehavior struct {
  1424. _ struct{} `type:"structure"`
  1425. // A complex type that controls which HTTP methods CloudFront processes and
  1426. // forwards to your Amazon S3 bucket or your custom origin. There are three
  1427. // choices: - CloudFront forwards only GET and HEAD requests. - CloudFront forwards
  1428. // only GET, HEAD and OPTIONS requests. - CloudFront forwards GET, HEAD, OPTIONS,
  1429. // PUT, PATCH, POST, and DELETE requests. If you pick the third choice, you
  1430. // may need to restrict access to your Amazon S3 bucket or to your custom origin
  1431. // so users can't perform operations that you don't want them to. For example,
  1432. // you may not want users to have permission to delete objects from your origin.
  1433. AllowedMethods *AllowedMethods `type:"structure"`
  1434. // Whether you want CloudFront to automatically compress content for web requests
  1435. // that include Accept-Encoding: gzip in the request header. If so, specify
  1436. // true; if not, specify false. CloudFront compresses files larger than 1000
  1437. // bytes and less than 1 megabyte for both Amazon S3 and custom origins. When
  1438. // a CloudFront edge location is unusually busy, some files might not be compressed.
  1439. // The value of the Content-Type header must be on the list of file types that
  1440. // CloudFront will compress. For the current list, see Serving Compressed Content
  1441. // (http://docs.aws.amazon.com/console/cloudfront/compressed-content) in the
  1442. // Amazon CloudFront Developer Guide. If you configure CloudFront to compress
  1443. // content, CloudFront removes the ETag response header from the objects that
  1444. // it compresses. The ETag header indicates that the version in a CloudFront
  1445. // edge cache is identical to the version on the origin server, but after compression
  1446. // the two versions are no longer identical. As a result, for compressed objects,
  1447. // CloudFront can't use the ETag header to determine whether an expired object
  1448. // in the CloudFront edge cache is still the latest version.
  1449. Compress *bool `type:"boolean"`
  1450. // If you don't configure your origin to add a Cache-Control max-age directive
  1451. // or an Expires header, DefaultTTL is the default amount of time (in seconds)
  1452. // that an object is in a CloudFront cache before CloudFront forwards another
  1453. // request to your origin to determine whether the object has been updated.
  1454. // The value that you specify applies only when your origin does not add HTTP
  1455. // headers such as Cache-Control max-age, Cache-Control s-maxage, and Expires
  1456. // to objects. You can specify a value from 0 to 3,153,600,000 seconds (100
  1457. // years).
  1458. DefaultTTL *int64 `type:"long"`
  1459. // A complex type that specifies how CloudFront handles query strings, cookies
  1460. // and headers.
  1461. ForwardedValues *ForwardedValues `type:"structure" required:"true"`
  1462. // The maximum amount of time (in seconds) that an object is in a CloudFront
  1463. // cache before CloudFront forwards another request to your origin to determine
  1464. // whether the object has been updated. The value that you specify applies only
  1465. // when your origin adds HTTP headers such as Cache-Control max-age, Cache-Control
  1466. // s-maxage, and Expires to objects. You can specify a value from 0 to 3,153,600,000
  1467. // seconds (100 years).
  1468. MaxTTL *int64 `type:"long"`
  1469. // The minimum amount of time that you want objects to stay in CloudFront caches
  1470. // before CloudFront queries your origin to see whether the object has been
  1471. // updated.You can specify a value from 0 to 3,153,600,000 seconds (100 years).
  1472. MinTTL *int64 `type:"long" required:"true"`
  1473. // The pattern (for example, images/*.jpg) that specifies which requests you
  1474. // want this cache behavior to apply to. When CloudFront receives an end-user
  1475. // request, the requested path is compared with path patterns in the order in
  1476. // which cache behaviors are listed in the distribution. The path pattern for
  1477. // the default cache behavior is * and cannot be changed. If the request for
  1478. // an object does not match the path pattern for any cache behaviors, CloudFront
  1479. // applies the behavior in the default cache behavior.
  1480. PathPattern *string `type:"string" required:"true"`
  1481. // Indicates whether you want to distribute media files in Microsoft Smooth
  1482. // Streaming format using the origin that is associated with this cache behavior.
  1483. // If so, specify true; if not, specify false.
  1484. SmoothStreaming *bool `type:"boolean"`
  1485. // The value of ID for the origin that you want CloudFront to route requests
  1486. // to when a request matches the path pattern either for a cache behavior or
  1487. // for the default cache behavior.
  1488. TargetOriginId *string `type:"string" required:"true"`
  1489. // A complex type that specifies the AWS accounts, if any, that you want to
  1490. // allow to create signed URLs for private content. If you want to require signed
  1491. // URLs in requests for objects in the target origin that match the PathPattern
  1492. // for this cache behavior, specify true for Enabled, and specify the applicable
  1493. // values for Quantity and Items. For more information, go to Using a Signed
  1494. // URL to Serve Private Content in the Amazon CloudFront Developer Guide. If
  1495. // you don't want to require signed URLs in requests for objects that match
  1496. // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items. To
  1497. // add, change, or remove one or more trusted signers, change Enabled to true
  1498. // (if it's currently false), change Quantity as applicable, and specify all
  1499. // of the trusted signers that you want to include in the updated distribution.
  1500. TrustedSigners *TrustedSigners `type:"structure" required:"true"`
  1501. // Use this element to specify the protocol that users can use to access the
  1502. // files in the origin specified by TargetOriginId when a request matches the
  1503. // path pattern in PathPattern. If you want CloudFront to allow end users to
  1504. // use any available protocol, specify allow-all. If you want CloudFront to
  1505. // require HTTPS, specify https. If you want CloudFront to respond to an HTTP
  1506. // request with an HTTP status code of 301 (Moved Permanently) and the HTTPS
  1507. // URL, specify redirect-to-https. The viewer then resubmits the request using
  1508. // the HTTPS URL.
  1509. ViewerProtocolPolicy *string `type:"string" required:"true" enum:"ViewerProtocolPolicy"`
  1510. }
  1511. // String returns the string representation
  1512. func (s CacheBehavior) String() string {
  1513. return awsutil.Prettify(s)
  1514. }
  1515. // GoString returns the string representation
  1516. func (s CacheBehavior) GoString() string {
  1517. return s.String()
  1518. }
  1519. // Validate inspects the fields of the type to determine if they are valid.
  1520. func (s *CacheBehavior) Validate() error {
  1521. invalidParams := request.ErrInvalidParams{Context: "CacheBehavior"}
  1522. if s.ForwardedValues == nil {
  1523. invalidParams.Add(request.NewErrParamRequired("ForwardedValues"))
  1524. }
  1525. if s.MinTTL == nil {
  1526. invalidParams.Add(request.NewErrParamRequired("MinTTL"))
  1527. }
  1528. if s.PathPattern == nil {
  1529. invalidParams.Add(request.NewErrParamRequired("PathPattern"))
  1530. }
  1531. if s.TargetOriginId == nil {
  1532. invalidParams.Add(request.NewErrParamRequired("TargetOriginId"))
  1533. }
  1534. if s.TrustedSigners == nil {
  1535. invalidParams.Add(request.NewErrParamRequired("TrustedSigners"))
  1536. }
  1537. if s.ViewerProtocolPolicy == nil {
  1538. invalidParams.Add(request.NewErrParamRequired("ViewerProtocolPolicy"))
  1539. }
  1540. if s.AllowedMethods != nil {
  1541. if err := s.AllowedMethods.Validate(); err != nil {
  1542. invalidParams.AddNested("AllowedMethods", err.(request.ErrInvalidParams))
  1543. }
  1544. }
  1545. if s.ForwardedValues != nil {
  1546. if err := s.ForwardedValues.Validate(); err != nil {
  1547. invalidParams.AddNested("ForwardedValues", err.(request.ErrInvalidParams))
  1548. }
  1549. }
  1550. if s.TrustedSigners != nil {
  1551. if err := s.TrustedSigners.Validate(); err != nil {
  1552. invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams))
  1553. }
  1554. }
  1555. if invalidParams.Len() > 0 {
  1556. return invalidParams
  1557. }
  1558. return nil
  1559. }
  1560. // A complex type that contains zero or more CacheBehavior elements.
  1561. type CacheBehaviors struct {
  1562. _ struct{} `type:"structure"`
  1563. // Optional: A complex type that contains cache behaviors for this distribution.
  1564. // If Quantity is 0, you can omit Items.
  1565. Items []*CacheBehavior `locationNameList:"CacheBehavior" type:"list"`
  1566. // The number of cache behaviors for this distribution.
  1567. Quantity *int64 `type:"integer" required:"true"`
  1568. }
  1569. // String returns the string representation
  1570. func (s CacheBehaviors) String() string {
  1571. return awsutil.Prettify(s)
  1572. }
  1573. // GoString returns the string representation
  1574. func (s CacheBehaviors) GoString() string {
  1575. return s.String()
  1576. }
  1577. // Validate inspects the fields of the type to determine if they are valid.
  1578. func (s *CacheBehaviors) Validate() error {
  1579. invalidParams := request.ErrInvalidParams{Context: "CacheBehaviors"}
  1580. if s.Quantity == nil {
  1581. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  1582. }
  1583. if s.Items != nil {
  1584. for i, v := range s.Items {
  1585. if v == nil {
  1586. continue
  1587. }
  1588. if err := v.Validate(); err != nil {
  1589. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  1590. }
  1591. }
  1592. }
  1593. if invalidParams.Len() > 0 {
  1594. return invalidParams
  1595. }
  1596. return nil
  1597. }
  1598. // A complex type that controls whether CloudFront caches the response to requests
  1599. // using the specified HTTP methods. There are two choices: - CloudFront caches
  1600. // responses to GET and HEAD requests. - CloudFront caches responses to GET,
  1601. // HEAD, and OPTIONS requests. If you pick the second choice for your S3 Origin,
  1602. // you may need to forward Access-Control-Request-Method, Access-Control-Request-Headers
  1603. // and Origin headers for the responses to be cached correctly.
  1604. type CachedMethods struct {
  1605. _ struct{} `type:"structure"`
  1606. // A complex type that contains the HTTP methods that you want CloudFront to
  1607. // cache responses to.
  1608. Items []*string `locationNameList:"Method" type:"list" required:"true"`
  1609. // The number of HTTP methods for which you want CloudFront to cache responses.
  1610. // Valid values are 2 (for caching responses to GET and HEAD requests) and 3
  1611. // (for caching responses to GET, HEAD, and OPTIONS requests).
  1612. Quantity *int64 `type:"integer" required:"true"`
  1613. }
  1614. // String returns the string representation
  1615. func (s CachedMethods) String() string {
  1616. return awsutil.Prettify(s)
  1617. }
  1618. // GoString returns the string representation
  1619. func (s CachedMethods) GoString() string {
  1620. return s.String()
  1621. }
  1622. // Validate inspects the fields of the type to determine if they are valid.
  1623. func (s *CachedMethods) Validate() error {
  1624. invalidParams := request.ErrInvalidParams{Context: "CachedMethods"}
  1625. if s.Items == nil {
  1626. invalidParams.Add(request.NewErrParamRequired("Items"))
  1627. }
  1628. if s.Quantity == nil {
  1629. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  1630. }
  1631. if invalidParams.Len() > 0 {
  1632. return invalidParams
  1633. }
  1634. return nil
  1635. }
  1636. // A complex type that specifies the whitelisted cookies, if any, that you want
  1637. // CloudFront to forward to your origin that is associated with this cache behavior.
  1638. type CookieNames struct {
  1639. _ struct{} `type:"structure"`
  1640. // Optional: A complex type that contains whitelisted cookies for this cache
  1641. // behavior. If Quantity is 0, you can omit Items.
  1642. Items []*string `locationNameList:"Name" type:"list"`
  1643. // The number of whitelisted cookies for this cache behavior.
  1644. Quantity *int64 `type:"integer" required:"true"`
  1645. }
  1646. // String returns the string representation
  1647. func (s CookieNames) String() string {
  1648. return awsutil.Prettify(s)
  1649. }
  1650. // GoString returns the string representation
  1651. func (s CookieNames) GoString() string {
  1652. return s.String()
  1653. }
  1654. // Validate inspects the fields of the type to determine if they are valid.
  1655. func (s *CookieNames) Validate() error {
  1656. invalidParams := request.ErrInvalidParams{Context: "CookieNames"}
  1657. if s.Quantity == nil {
  1658. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  1659. }
  1660. if invalidParams.Len() > 0 {
  1661. return invalidParams
  1662. }
  1663. return nil
  1664. }
  1665. // A complex type that specifies the cookie preferences associated with this
  1666. // cache behavior.
  1667. type CookiePreference struct {
  1668. _ struct{} `type:"structure"`
  1669. // Use this element to specify whether you want CloudFront to forward cookies
  1670. // to the origin that is associated with this cache behavior. You can specify
  1671. // all, none or whitelist. If you choose All, CloudFront forwards all cookies
  1672. // regardless of how many your application uses.
  1673. Forward *string `type:"string" required:"true" enum:"ItemSelection"`
  1674. // A complex type that specifies the whitelisted cookies, if any, that you want
  1675. // CloudFront to forward to your origin that is associated with this cache behavior.
  1676. WhitelistedNames *CookieNames `type:"structure"`
  1677. }
  1678. // String returns the string representation
  1679. func (s CookiePreference) String() string {
  1680. return awsutil.Prettify(s)
  1681. }
  1682. // GoString returns the string representation
  1683. func (s CookiePreference) GoString() string {
  1684. return s.String()
  1685. }
  1686. // Validate inspects the fields of the type to determine if they are valid.
  1687. func (s *CookiePreference) Validate() error {
  1688. invalidParams := request.ErrInvalidParams{Context: "CookiePreference"}
  1689. if s.Forward == nil {
  1690. invalidParams.Add(request.NewErrParamRequired("Forward"))
  1691. }
  1692. if s.WhitelistedNames != nil {
  1693. if err := s.WhitelistedNames.Validate(); err != nil {
  1694. invalidParams.AddNested("WhitelistedNames", err.(request.ErrInvalidParams))
  1695. }
  1696. }
  1697. if invalidParams.Len() > 0 {
  1698. return invalidParams
  1699. }
  1700. return nil
  1701. }
  1702. // The request to create a new origin access identity.
  1703. type CreateCloudFrontOriginAccessIdentityInput struct {
  1704. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"`
  1705. // The origin access identity's configuration information.
  1706. CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true"`
  1707. }
  1708. // String returns the string representation
  1709. func (s CreateCloudFrontOriginAccessIdentityInput) String() string {
  1710. return awsutil.Prettify(s)
  1711. }
  1712. // GoString returns the string representation
  1713. func (s CreateCloudFrontOriginAccessIdentityInput) GoString() string {
  1714. return s.String()
  1715. }
  1716. // Validate inspects the fields of the type to determine if they are valid.
  1717. func (s *CreateCloudFrontOriginAccessIdentityInput) Validate() error {
  1718. invalidParams := request.ErrInvalidParams{Context: "CreateCloudFrontOriginAccessIdentityInput"}
  1719. if s.CloudFrontOriginAccessIdentityConfig == nil {
  1720. invalidParams.Add(request.NewErrParamRequired("CloudFrontOriginAccessIdentityConfig"))
  1721. }
  1722. if s.CloudFrontOriginAccessIdentityConfig != nil {
  1723. if err := s.CloudFrontOriginAccessIdentityConfig.Validate(); err != nil {
  1724. invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(request.ErrInvalidParams))
  1725. }
  1726. }
  1727. if invalidParams.Len() > 0 {
  1728. return invalidParams
  1729. }
  1730. return nil
  1731. }
  1732. // The returned result of the corresponding request.
  1733. type CreateCloudFrontOriginAccessIdentityOutput struct {
  1734. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"`
  1735. // The origin access identity's information.
  1736. CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"`
  1737. // The current version of the origin access identity created.
  1738. ETag *string `location:"header" locationName:"ETag" type:"string"`
  1739. // The fully qualified URI of the new origin access identity just created. For
  1740. // example: https://cloudfront.amazonaws.com/2010-11-01/origin-access-identity/cloudfront/E74FTE3AJFJ256A.
  1741. Location *string `location:"header" locationName:"Location" type:"string"`
  1742. }
  1743. // String returns the string representation
  1744. func (s CreateCloudFrontOriginAccessIdentityOutput) String() string {
  1745. return awsutil.Prettify(s)
  1746. }
  1747. // GoString returns the string representation
  1748. func (s CreateCloudFrontOriginAccessIdentityOutput) GoString() string {
  1749. return s.String()
  1750. }
  1751. // The request to create a new distribution.
  1752. type CreateDistributionInput struct {
  1753. _ struct{} `type:"structure" payload:"DistributionConfig"`
  1754. // The distribution's configuration information.
  1755. DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true"`
  1756. }
  1757. // String returns the string representation
  1758. func (s CreateDistributionInput) String() string {
  1759. return awsutil.Prettify(s)
  1760. }
  1761. // GoString returns the string representation
  1762. func (s CreateDistributionInput) GoString() string {
  1763. return s.String()
  1764. }
  1765. // Validate inspects the fields of the type to determine if they are valid.
  1766. func (s *CreateDistributionInput) Validate() error {
  1767. invalidParams := request.ErrInvalidParams{Context: "CreateDistributionInput"}
  1768. if s.DistributionConfig == nil {
  1769. invalidParams.Add(request.NewErrParamRequired("DistributionConfig"))
  1770. }
  1771. if s.DistributionConfig != nil {
  1772. if err := s.DistributionConfig.Validate(); err != nil {
  1773. invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams))
  1774. }
  1775. }
  1776. if invalidParams.Len() > 0 {
  1777. return invalidParams
  1778. }
  1779. return nil
  1780. }
  1781. // The returned result of the corresponding request.
  1782. type CreateDistributionOutput struct {
  1783. _ struct{} `type:"structure" payload:"Distribution"`
  1784. // The distribution's information.
  1785. Distribution *Distribution `type:"structure"`
  1786. // The current version of the distribution created.
  1787. ETag *string `location:"header" locationName:"ETag" type:"string"`
  1788. // The fully qualified URI of the new distribution resource just created. For
  1789. // example: https://cloudfront.amazonaws.com/2010-11-01/distribution/EDFDVBD632BHDS5.
  1790. Location *string `location:"header" locationName:"Location" type:"string"`
  1791. }
  1792. // String returns the string representation
  1793. func (s CreateDistributionOutput) String() string {
  1794. return awsutil.Prettify(s)
  1795. }
  1796. // GoString returns the string representation
  1797. func (s CreateDistributionOutput) GoString() string {
  1798. return s.String()
  1799. }
  1800. // The request to create a new distribution with tags
  1801. type CreateDistributionWithTagsInput struct {
  1802. _ struct{} `type:"structure" payload:"DistributionConfigWithTags"`
  1803. // The distribution's configuration information.
  1804. DistributionConfigWithTags *DistributionConfigWithTags `locationName:"DistributionConfigWithTags" type:"structure" required:"true"`
  1805. }
  1806. // String returns the string representation
  1807. func (s CreateDistributionWithTagsInput) String() string {
  1808. return awsutil.Prettify(s)
  1809. }
  1810. // GoString returns the string representation
  1811. func (s CreateDistributionWithTagsInput) GoString() string {
  1812. return s.String()
  1813. }
  1814. // Validate inspects the fields of the type to determine if they are valid.
  1815. func (s *CreateDistributionWithTagsInput) Validate() error {
  1816. invalidParams := request.ErrInvalidParams{Context: "CreateDistributionWithTagsInput"}
  1817. if s.DistributionConfigWithTags == nil {
  1818. invalidParams.Add(request.NewErrParamRequired("DistributionConfigWithTags"))
  1819. }
  1820. if s.DistributionConfigWithTags != nil {
  1821. if err := s.DistributionConfigWithTags.Validate(); err != nil {
  1822. invalidParams.AddNested("DistributionConfigWithTags", err.(request.ErrInvalidParams))
  1823. }
  1824. }
  1825. if invalidParams.Len() > 0 {
  1826. return invalidParams
  1827. }
  1828. return nil
  1829. }
  1830. // The returned result of the corresponding request.
  1831. type CreateDistributionWithTagsOutput struct {
  1832. _ struct{} `type:"structure" payload:"Distribution"`
  1833. // The distribution's information.
  1834. Distribution *Distribution `type:"structure"`
  1835. // The current version of the distribution created.
  1836. ETag *string `location:"header" locationName:"ETag" type:"string"`
  1837. // The fully qualified URI of the new distribution resource just created. For
  1838. // example: https://cloudfront.amazonaws.com/2010-11-01/distribution/EDFDVBD632BHDS5.
  1839. Location *string `location:"header" locationName:"Location" type:"string"`
  1840. }
  1841. // String returns the string representation
  1842. func (s CreateDistributionWithTagsOutput) String() string {
  1843. return awsutil.Prettify(s)
  1844. }
  1845. // GoString returns the string representation
  1846. func (s CreateDistributionWithTagsOutput) GoString() string {
  1847. return s.String()
  1848. }
  1849. // The request to create an invalidation.
  1850. type CreateInvalidationInput struct {
  1851. _ struct{} `type:"structure" payload:"InvalidationBatch"`
  1852. // The distribution's id.
  1853. DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"`
  1854. // The batch information for the invalidation.
  1855. InvalidationBatch *InvalidationBatch `locationName:"InvalidationBatch" type:"structure" required:"true"`
  1856. }
  1857. // String returns the string representation
  1858. func (s CreateInvalidationInput) String() string {
  1859. return awsutil.Prettify(s)
  1860. }
  1861. // GoString returns the string representation
  1862. func (s CreateInvalidationInput) GoString() string {
  1863. return s.String()
  1864. }
  1865. // Validate inspects the fields of the type to determine if they are valid.
  1866. func (s *CreateInvalidationInput) Validate() error {
  1867. invalidParams := request.ErrInvalidParams{Context: "CreateInvalidationInput"}
  1868. if s.DistributionId == nil {
  1869. invalidParams.Add(request.NewErrParamRequired("DistributionId"))
  1870. }
  1871. if s.InvalidationBatch == nil {
  1872. invalidParams.Add(request.NewErrParamRequired("InvalidationBatch"))
  1873. }
  1874. if s.InvalidationBatch != nil {
  1875. if err := s.InvalidationBatch.Validate(); err != nil {
  1876. invalidParams.AddNested("InvalidationBatch", err.(request.ErrInvalidParams))
  1877. }
  1878. }
  1879. if invalidParams.Len() > 0 {
  1880. return invalidParams
  1881. }
  1882. return nil
  1883. }
  1884. // The returned result of the corresponding request.
  1885. type CreateInvalidationOutput struct {
  1886. _ struct{} `type:"structure" payload:"Invalidation"`
  1887. // The invalidation's information.
  1888. Invalidation *Invalidation `type:"structure"`
  1889. // The fully qualified URI of the distribution and invalidation batch request,
  1890. // including the Invalidation ID.
  1891. Location *string `location:"header" locationName:"Location" type:"string"`
  1892. }
  1893. // String returns the string representation
  1894. func (s CreateInvalidationOutput) String() string {
  1895. return awsutil.Prettify(s)
  1896. }
  1897. // GoString returns the string representation
  1898. func (s CreateInvalidationOutput) GoString() string {
  1899. return s.String()
  1900. }
  1901. // The request to create a new streaming distribution.
  1902. type CreateStreamingDistributionInput struct {
  1903. _ struct{} `type:"structure" payload:"StreamingDistributionConfig"`
  1904. // The streaming distribution's configuration information.
  1905. StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true"`
  1906. }
  1907. // String returns the string representation
  1908. func (s CreateStreamingDistributionInput) String() string {
  1909. return awsutil.Prettify(s)
  1910. }
  1911. // GoString returns the string representation
  1912. func (s CreateStreamingDistributionInput) GoString() string {
  1913. return s.String()
  1914. }
  1915. // Validate inspects the fields of the type to determine if they are valid.
  1916. func (s *CreateStreamingDistributionInput) Validate() error {
  1917. invalidParams := request.ErrInvalidParams{Context: "CreateStreamingDistributionInput"}
  1918. if s.StreamingDistributionConfig == nil {
  1919. invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig"))
  1920. }
  1921. if s.StreamingDistributionConfig != nil {
  1922. if err := s.StreamingDistributionConfig.Validate(); err != nil {
  1923. invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams))
  1924. }
  1925. }
  1926. if invalidParams.Len() > 0 {
  1927. return invalidParams
  1928. }
  1929. return nil
  1930. }
  1931. // The returned result of the corresponding request.
  1932. type CreateStreamingDistributionOutput struct {
  1933. _ struct{} `type:"structure" payload:"StreamingDistribution"`
  1934. // The current version of the streaming distribution created.
  1935. ETag *string `location:"header" locationName:"ETag" type:"string"`
  1936. // The fully qualified URI of the new streaming distribution resource just created.
  1937. // For example: https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8.
  1938. Location *string `location:"header" locationName:"Location" type:"string"`
  1939. // The streaming distribution's information.
  1940. StreamingDistribution *StreamingDistribution `type:"structure"`
  1941. }
  1942. // String returns the string representation
  1943. func (s CreateStreamingDistributionOutput) String() string {
  1944. return awsutil.Prettify(s)
  1945. }
  1946. // GoString returns the string representation
  1947. func (s CreateStreamingDistributionOutput) GoString() string {
  1948. return s.String()
  1949. }
  1950. // The request to create a new streaming distribution with tags.
  1951. type CreateStreamingDistributionWithTagsInput struct {
  1952. _ struct{} `type:"structure" payload:"StreamingDistributionConfigWithTags"`
  1953. // The streaming distribution's configuration information.
  1954. StreamingDistributionConfigWithTags *StreamingDistributionConfigWithTags `locationName:"StreamingDistributionConfigWithTags" type:"structure" required:"true"`
  1955. }
  1956. // String returns the string representation
  1957. func (s CreateStreamingDistributionWithTagsInput) String() string {
  1958. return awsutil.Prettify(s)
  1959. }
  1960. // GoString returns the string representation
  1961. func (s CreateStreamingDistributionWithTagsInput) GoString() string {
  1962. return s.String()
  1963. }
  1964. // Validate inspects the fields of the type to determine if they are valid.
  1965. func (s *CreateStreamingDistributionWithTagsInput) Validate() error {
  1966. invalidParams := request.ErrInvalidParams{Context: "CreateStreamingDistributionWithTagsInput"}
  1967. if s.StreamingDistributionConfigWithTags == nil {
  1968. invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfigWithTags"))
  1969. }
  1970. if s.StreamingDistributionConfigWithTags != nil {
  1971. if err := s.StreamingDistributionConfigWithTags.Validate(); err != nil {
  1972. invalidParams.AddNested("StreamingDistributionConfigWithTags", err.(request.ErrInvalidParams))
  1973. }
  1974. }
  1975. if invalidParams.Len() > 0 {
  1976. return invalidParams
  1977. }
  1978. return nil
  1979. }
  1980. // The returned result of the corresponding request.
  1981. type CreateStreamingDistributionWithTagsOutput struct {
  1982. _ struct{} `type:"structure" payload:"StreamingDistribution"`
  1983. // The current version of the streaming distribution created.
  1984. ETag *string `location:"header" locationName:"ETag" type:"string"`
  1985. // The fully qualified URI of the new streaming distribution resource just created.
  1986. // For example: https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8.
  1987. Location *string `location:"header" locationName:"Location" type:"string"`
  1988. // The streaming distribution's information.
  1989. StreamingDistribution *StreamingDistribution `type:"structure"`
  1990. }
  1991. // String returns the string representation
  1992. func (s CreateStreamingDistributionWithTagsOutput) String() string {
  1993. return awsutil.Prettify(s)
  1994. }
  1995. // GoString returns the string representation
  1996. func (s CreateStreamingDistributionWithTagsOutput) GoString() string {
  1997. return s.String()
  1998. }
  1999. // A complex type that describes how you'd prefer CloudFront to respond to requests
  2000. // that result in either a 4xx or 5xx response. You can control whether a custom
  2001. // error page should be displayed, what the desired response code should be
  2002. // for this error page and how long should the error response be cached by CloudFront.
  2003. // If you don't want to specify any custom error responses, include only an
  2004. // empty CustomErrorResponses element. To delete all custom error responses
  2005. // in an existing distribution, update the distribution configuration and include
  2006. // only an empty CustomErrorResponses element. To add, change, or remove one
  2007. // or more custom error responses, update the distribution configuration and
  2008. // specify all of the custom error responses that you want to include in the
  2009. // updated distribution.
  2010. type CustomErrorResponse struct {
  2011. _ struct{} `type:"structure"`
  2012. // The minimum amount of time you want HTTP error codes to stay in CloudFront
  2013. // caches before CloudFront queries your origin to see whether the object has
  2014. // been updated. You can specify a value from 0 to 31,536,000.
  2015. ErrorCachingMinTTL *int64 `type:"long"`
  2016. // The 4xx or 5xx HTTP status code that you want to customize. For a list of
  2017. // HTTP status codes that you can customize, see CloudFront documentation.
  2018. ErrorCode *int64 `type:"integer" required:"true"`
  2019. // The HTTP status code that you want CloudFront to return with the custom error
  2020. // page to the viewer. For a list of HTTP status codes that you can replace,
  2021. // see CloudFront Documentation.
  2022. ResponseCode *string `type:"string"`
  2023. // The path of the custom error page (for example, /custom_404.html). The path
  2024. // is relative to the distribution and must begin with a slash (/). If the path
  2025. // includes any non-ASCII characters or unsafe characters as defined in RFC
  2026. // 1783 (http://www.ietf.org/rfc/rfc1738.txt), URL encode those characters.
  2027. // Do not URL encode any other characters in the path, or CloudFront will not
  2028. // return the custom error page to the viewer.
  2029. ResponsePagePath *string `type:"string"`
  2030. }
  2031. // String returns the string representation
  2032. func (s CustomErrorResponse) String() string {
  2033. return awsutil.Prettify(s)
  2034. }
  2035. // GoString returns the string representation
  2036. func (s CustomErrorResponse) GoString() string {
  2037. return s.String()
  2038. }
  2039. // Validate inspects the fields of the type to determine if they are valid.
  2040. func (s *CustomErrorResponse) Validate() error {
  2041. invalidParams := request.ErrInvalidParams{Context: "CustomErrorResponse"}
  2042. if s.ErrorCode == nil {
  2043. invalidParams.Add(request.NewErrParamRequired("ErrorCode"))
  2044. }
  2045. if invalidParams.Len() > 0 {
  2046. return invalidParams
  2047. }
  2048. return nil
  2049. }
  2050. // A complex type that contains zero or more CustomErrorResponse elements.
  2051. type CustomErrorResponses struct {
  2052. _ struct{} `type:"structure"`
  2053. // Optional: A complex type that contains custom error responses for this distribution.
  2054. // If Quantity is 0, you can omit Items.
  2055. Items []*CustomErrorResponse `locationNameList:"CustomErrorResponse" type:"list"`
  2056. // The number of custom error responses for this distribution.
  2057. Quantity *int64 `type:"integer" required:"true"`
  2058. }
  2059. // String returns the string representation
  2060. func (s CustomErrorResponses) String() string {
  2061. return awsutil.Prettify(s)
  2062. }
  2063. // GoString returns the string representation
  2064. func (s CustomErrorResponses) GoString() string {
  2065. return s.String()
  2066. }
  2067. // Validate inspects the fields of the type to determine if they are valid.
  2068. func (s *CustomErrorResponses) Validate() error {
  2069. invalidParams := request.ErrInvalidParams{Context: "CustomErrorResponses"}
  2070. if s.Quantity == nil {
  2071. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  2072. }
  2073. if s.Items != nil {
  2074. for i, v := range s.Items {
  2075. if v == nil {
  2076. continue
  2077. }
  2078. if err := v.Validate(); err != nil {
  2079. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  2080. }
  2081. }
  2082. }
  2083. if invalidParams.Len() > 0 {
  2084. return invalidParams
  2085. }
  2086. return nil
  2087. }
  2088. // A complex type that contains the list of Custom Headers for each origin.
  2089. type CustomHeaders struct {
  2090. _ struct{} `type:"structure"`
  2091. // A complex type that contains the custom headers for this Origin.
  2092. Items []*OriginCustomHeader `locationNameList:"OriginCustomHeader" type:"list"`
  2093. // The number of custom headers for this origin.
  2094. Quantity *int64 `type:"integer" required:"true"`
  2095. }
  2096. // String returns the string representation
  2097. func (s CustomHeaders) String() string {
  2098. return awsutil.Prettify(s)
  2099. }
  2100. // GoString returns the string representation
  2101. func (s CustomHeaders) GoString() string {
  2102. return s.String()
  2103. }
  2104. // Validate inspects the fields of the type to determine if they are valid.
  2105. func (s *CustomHeaders) Validate() error {
  2106. invalidParams := request.ErrInvalidParams{Context: "CustomHeaders"}
  2107. if s.Quantity == nil {
  2108. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  2109. }
  2110. if s.Items != nil {
  2111. for i, v := range s.Items {
  2112. if v == nil {
  2113. continue
  2114. }
  2115. if err := v.Validate(); err != nil {
  2116. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  2117. }
  2118. }
  2119. }
  2120. if invalidParams.Len() > 0 {
  2121. return invalidParams
  2122. }
  2123. return nil
  2124. }
  2125. // A customer origin.
  2126. type CustomOriginConfig struct {
  2127. _ struct{} `type:"structure"`
  2128. // The HTTP port the custom origin listens on.
  2129. HTTPPort *int64 `type:"integer" required:"true"`
  2130. // The HTTPS port the custom origin listens on.
  2131. HTTPSPort *int64 `type:"integer" required:"true"`
  2132. // The origin protocol policy to apply to your origin.
  2133. OriginProtocolPolicy *string `type:"string" required:"true" enum:"OriginProtocolPolicy"`
  2134. // The SSL/TLS protocols that you want CloudFront to use when communicating
  2135. // with your origin over HTTPS.
  2136. OriginSslProtocols *OriginSslProtocols `type:"structure"`
  2137. }
  2138. // String returns the string representation
  2139. func (s CustomOriginConfig) String() string {
  2140. return awsutil.Prettify(s)
  2141. }
  2142. // GoString returns the string representation
  2143. func (s CustomOriginConfig) GoString() string {
  2144. return s.String()
  2145. }
  2146. // Validate inspects the fields of the type to determine if they are valid.
  2147. func (s *CustomOriginConfig) Validate() error {
  2148. invalidParams := request.ErrInvalidParams{Context: "CustomOriginConfig"}
  2149. if s.HTTPPort == nil {
  2150. invalidParams.Add(request.NewErrParamRequired("HTTPPort"))
  2151. }
  2152. if s.HTTPSPort == nil {
  2153. invalidParams.Add(request.NewErrParamRequired("HTTPSPort"))
  2154. }
  2155. if s.OriginProtocolPolicy == nil {
  2156. invalidParams.Add(request.NewErrParamRequired("OriginProtocolPolicy"))
  2157. }
  2158. if s.OriginSslProtocols != nil {
  2159. if err := s.OriginSslProtocols.Validate(); err != nil {
  2160. invalidParams.AddNested("OriginSslProtocols", err.(request.ErrInvalidParams))
  2161. }
  2162. }
  2163. if invalidParams.Len() > 0 {
  2164. return invalidParams
  2165. }
  2166. return nil
  2167. }
  2168. // A complex type that describes the default cache behavior if you do not specify
  2169. // a CacheBehavior element or if files don't match any of the values of PathPattern
  2170. // in CacheBehavior elements.You must create exactly one default cache behavior.
  2171. type DefaultCacheBehavior struct {
  2172. _ struct{} `type:"structure"`
  2173. // A complex type that controls which HTTP methods CloudFront processes and
  2174. // forwards to your Amazon S3 bucket or your custom origin. There are three
  2175. // choices: - CloudFront forwards only GET and HEAD requests. - CloudFront forwards
  2176. // only GET, HEAD and OPTIONS requests. - CloudFront forwards GET, HEAD, OPTIONS,
  2177. // PUT, PATCH, POST, and DELETE requests. If you pick the third choice, you
  2178. // may need to restrict access to your Amazon S3 bucket or to your custom origin
  2179. // so users can't perform operations that you don't want them to. For example,
  2180. // you may not want users to have permission to delete objects from your origin.
  2181. AllowedMethods *AllowedMethods `type:"structure"`
  2182. // Whether you want CloudFront to automatically compress content for web requests
  2183. // that include Accept-Encoding: gzip in the request header. If so, specify
  2184. // true; if not, specify false. CloudFront compresses files larger than 1000
  2185. // bytes and less than 1 megabyte for both Amazon S3 and custom origins. When
  2186. // a CloudFront edge location is unusually busy, some files might not be compressed.
  2187. // The value of the Content-Type header must be on the list of file types that
  2188. // CloudFront will compress. For the current list, see Serving Compressed Content
  2189. // (http://docs.aws.amazon.com/console/cloudfront/compressed-content) in the
  2190. // Amazon CloudFront Developer Guide. If you configure CloudFront to compress
  2191. // content, CloudFront removes the ETag response header from the objects that
  2192. // it compresses. The ETag header indicates that the version in a CloudFront
  2193. // edge cache is identical to the version on the origin server, but after compression
  2194. // the two versions are no longer identical. As a result, for compressed objects,
  2195. // CloudFront can't use the ETag header to determine whether an expired object
  2196. // in the CloudFront edge cache is still the latest version.
  2197. Compress *bool `type:"boolean"`
  2198. // If you don't configure your origin to add a Cache-Control max-age directive
  2199. // or an Expires header, DefaultTTL is the default amount of time (in seconds)
  2200. // that an object is in a CloudFront cache before CloudFront forwards another
  2201. // request to your origin to determine whether the object has been updated.
  2202. // The value that you specify applies only when your origin does not add HTTP
  2203. // headers such as Cache-Control max-age, Cache-Control s-maxage, and Expires
  2204. // to objects. You can specify a value from 0 to 3,153,600,000 seconds (100
  2205. // years).
  2206. DefaultTTL *int64 `type:"long"`
  2207. // A complex type that specifies how CloudFront handles query strings, cookies
  2208. // and headers.
  2209. ForwardedValues *ForwardedValues `type:"structure" required:"true"`
  2210. // The maximum amount of time (in seconds) that an object is in a CloudFront
  2211. // cache before CloudFront forwards another request to your origin to determine
  2212. // whether the object has been updated. The value that you specify applies only
  2213. // when your origin adds HTTP headers such as Cache-Control max-age, Cache-Control
  2214. // s-maxage, and Expires to objects. You can specify a value from 0 to 3,153,600,000
  2215. // seconds (100 years).
  2216. MaxTTL *int64 `type:"long"`
  2217. // The minimum amount of time that you want objects to stay in CloudFront caches
  2218. // before CloudFront queries your origin to see whether the object has been
  2219. // updated.You can specify a value from 0 to 3,153,600,000 seconds (100 years).
  2220. MinTTL *int64 `type:"long" required:"true"`
  2221. // Indicates whether you want to distribute media files in Microsoft Smooth
  2222. // Streaming format using the origin that is associated with this cache behavior.
  2223. // If so, specify true; if not, specify false.
  2224. SmoothStreaming *bool `type:"boolean"`
  2225. // The value of ID for the origin that you want CloudFront to route requests
  2226. // to when a request matches the path pattern either for a cache behavior or
  2227. // for the default cache behavior.
  2228. TargetOriginId *string `type:"string" required:"true"`
  2229. // A complex type that specifies the AWS accounts, if any, that you want to
  2230. // allow to create signed URLs for private content. If you want to require signed
  2231. // URLs in requests for objects in the target origin that match the PathPattern
  2232. // for this cache behavior, specify true for Enabled, and specify the applicable
  2233. // values for Quantity and Items. For more information, go to Using a Signed
  2234. // URL to Serve Private Content in the Amazon CloudFront Developer Guide. If
  2235. // you don't want to require signed URLs in requests for objects that match
  2236. // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items. To
  2237. // add, change, or remove one or more trusted signers, change Enabled to true
  2238. // (if it's currently false), change Quantity as applicable, and specify all
  2239. // of the trusted signers that you want to include in the updated distribution.
  2240. TrustedSigners *TrustedSigners `type:"structure" required:"true"`
  2241. // Use this element to specify the protocol that users can use to access the
  2242. // files in the origin specified by TargetOriginId when a request matches the
  2243. // path pattern in PathPattern. If you want CloudFront to allow end users to
  2244. // use any available protocol, specify allow-all. If you want CloudFront to
  2245. // require HTTPS, specify https. If you want CloudFront to respond to an HTTP
  2246. // request with an HTTP status code of 301 (Moved Permanently) and the HTTPS
  2247. // URL, specify redirect-to-https. The viewer then resubmits the request using
  2248. // the HTTPS URL.
  2249. ViewerProtocolPolicy *string `type:"string" required:"true" enum:"ViewerProtocolPolicy"`
  2250. }
  2251. // String returns the string representation
  2252. func (s DefaultCacheBehavior) String() string {
  2253. return awsutil.Prettify(s)
  2254. }
  2255. // GoString returns the string representation
  2256. func (s DefaultCacheBehavior) GoString() string {
  2257. return s.String()
  2258. }
  2259. // Validate inspects the fields of the type to determine if they are valid.
  2260. func (s *DefaultCacheBehavior) Validate() error {
  2261. invalidParams := request.ErrInvalidParams{Context: "DefaultCacheBehavior"}
  2262. if s.ForwardedValues == nil {
  2263. invalidParams.Add(request.NewErrParamRequired("ForwardedValues"))
  2264. }
  2265. if s.MinTTL == nil {
  2266. invalidParams.Add(request.NewErrParamRequired("MinTTL"))
  2267. }
  2268. if s.TargetOriginId == nil {
  2269. invalidParams.Add(request.NewErrParamRequired("TargetOriginId"))
  2270. }
  2271. if s.TrustedSigners == nil {
  2272. invalidParams.Add(request.NewErrParamRequired("TrustedSigners"))
  2273. }
  2274. if s.ViewerProtocolPolicy == nil {
  2275. invalidParams.Add(request.NewErrParamRequired("ViewerProtocolPolicy"))
  2276. }
  2277. if s.AllowedMethods != nil {
  2278. if err := s.AllowedMethods.Validate(); err != nil {
  2279. invalidParams.AddNested("AllowedMethods", err.(request.ErrInvalidParams))
  2280. }
  2281. }
  2282. if s.ForwardedValues != nil {
  2283. if err := s.ForwardedValues.Validate(); err != nil {
  2284. invalidParams.AddNested("ForwardedValues", err.(request.ErrInvalidParams))
  2285. }
  2286. }
  2287. if s.TrustedSigners != nil {
  2288. if err := s.TrustedSigners.Validate(); err != nil {
  2289. invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams))
  2290. }
  2291. }
  2292. if invalidParams.Len() > 0 {
  2293. return invalidParams
  2294. }
  2295. return nil
  2296. }
  2297. // The request to delete a origin access identity.
  2298. type DeleteCloudFrontOriginAccessIdentityInput struct {
  2299. _ struct{} `type:"structure"`
  2300. // The origin access identity's id.
  2301. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  2302. // The value of the ETag header you received from a previous GET or PUT request.
  2303. // For example: E2QWRUHAPOMQZL.
  2304. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  2305. }
  2306. // String returns the string representation
  2307. func (s DeleteCloudFrontOriginAccessIdentityInput) String() string {
  2308. return awsutil.Prettify(s)
  2309. }
  2310. // GoString returns the string representation
  2311. func (s DeleteCloudFrontOriginAccessIdentityInput) GoString() string {
  2312. return s.String()
  2313. }
  2314. // Validate inspects the fields of the type to determine if they are valid.
  2315. func (s *DeleteCloudFrontOriginAccessIdentityInput) Validate() error {
  2316. invalidParams := request.ErrInvalidParams{Context: "DeleteCloudFrontOriginAccessIdentityInput"}
  2317. if s.Id == nil {
  2318. invalidParams.Add(request.NewErrParamRequired("Id"))
  2319. }
  2320. if invalidParams.Len() > 0 {
  2321. return invalidParams
  2322. }
  2323. return nil
  2324. }
  2325. type DeleteCloudFrontOriginAccessIdentityOutput struct {
  2326. _ struct{} `type:"structure"`
  2327. }
  2328. // String returns the string representation
  2329. func (s DeleteCloudFrontOriginAccessIdentityOutput) String() string {
  2330. return awsutil.Prettify(s)
  2331. }
  2332. // GoString returns the string representation
  2333. func (s DeleteCloudFrontOriginAccessIdentityOutput) GoString() string {
  2334. return s.String()
  2335. }
  2336. // The request to delete a distribution.
  2337. type DeleteDistributionInput struct {
  2338. _ struct{} `type:"structure"`
  2339. // The distribution id.
  2340. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  2341. // The value of the ETag header you received when you disabled the distribution.
  2342. // For example: E2QWRUHAPOMQZL.
  2343. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  2344. }
  2345. // String returns the string representation
  2346. func (s DeleteDistributionInput) String() string {
  2347. return awsutil.Prettify(s)
  2348. }
  2349. // GoString returns the string representation
  2350. func (s DeleteDistributionInput) GoString() string {
  2351. return s.String()
  2352. }
  2353. // Validate inspects the fields of the type to determine if they are valid.
  2354. func (s *DeleteDistributionInput) Validate() error {
  2355. invalidParams := request.ErrInvalidParams{Context: "DeleteDistributionInput"}
  2356. if s.Id == nil {
  2357. invalidParams.Add(request.NewErrParamRequired("Id"))
  2358. }
  2359. if invalidParams.Len() > 0 {
  2360. return invalidParams
  2361. }
  2362. return nil
  2363. }
  2364. type DeleteDistributionOutput struct {
  2365. _ struct{} `type:"structure"`
  2366. }
  2367. // String returns the string representation
  2368. func (s DeleteDistributionOutput) String() string {
  2369. return awsutil.Prettify(s)
  2370. }
  2371. // GoString returns the string representation
  2372. func (s DeleteDistributionOutput) GoString() string {
  2373. return s.String()
  2374. }
  2375. // The request to delete a streaming distribution.
  2376. type DeleteStreamingDistributionInput struct {
  2377. _ struct{} `type:"structure"`
  2378. // The distribution id.
  2379. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  2380. // The value of the ETag header you received when you disabled the streaming
  2381. // distribution. For example: E2QWRUHAPOMQZL.
  2382. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  2383. }
  2384. // String returns the string representation
  2385. func (s DeleteStreamingDistributionInput) String() string {
  2386. return awsutil.Prettify(s)
  2387. }
  2388. // GoString returns the string representation
  2389. func (s DeleteStreamingDistributionInput) GoString() string {
  2390. return s.String()
  2391. }
  2392. // Validate inspects the fields of the type to determine if they are valid.
  2393. func (s *DeleteStreamingDistributionInput) Validate() error {
  2394. invalidParams := request.ErrInvalidParams{Context: "DeleteStreamingDistributionInput"}
  2395. if s.Id == nil {
  2396. invalidParams.Add(request.NewErrParamRequired("Id"))
  2397. }
  2398. if invalidParams.Len() > 0 {
  2399. return invalidParams
  2400. }
  2401. return nil
  2402. }
  2403. type DeleteStreamingDistributionOutput struct {
  2404. _ struct{} `type:"structure"`
  2405. }
  2406. // String returns the string representation
  2407. func (s DeleteStreamingDistributionOutput) String() string {
  2408. return awsutil.Prettify(s)
  2409. }
  2410. // GoString returns the string representation
  2411. func (s DeleteStreamingDistributionOutput) GoString() string {
  2412. return s.String()
  2413. }
  2414. // A distribution.
  2415. type Distribution struct {
  2416. _ struct{} `type:"structure"`
  2417. // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5,
  2418. // where 123456789012 is your AWS account Id.
  2419. ARN *string `type:"string" required:"true"`
  2420. // CloudFront automatically adds this element to the response only if you've
  2421. // set up the distribution to serve private content with signed URLs. The element
  2422. // lists the key pair IDs that CloudFront is aware of for each trusted signer.
  2423. // The Signer child element lists the AWS account number of the trusted signer
  2424. // (or an empty Self element if the signer is you). The Signer element also
  2425. // includes the IDs of any active key pairs associated with the trusted signer's
  2426. // AWS account. If no KeyPairId element appears for a Signer, that signer can't
  2427. // create working signed URLs.
  2428. ActiveTrustedSigners *ActiveTrustedSigners `type:"structure" required:"true"`
  2429. // The current configuration information for the distribution.
  2430. DistributionConfig *DistributionConfig `type:"structure" required:"true"`
  2431. // The domain name corresponding to the distribution. For example: d604721fxaaqy9.cloudfront.net.
  2432. DomainName *string `type:"string" required:"true"`
  2433. // The identifier for the distribution. For example: EDFDVBD632BHDS5.
  2434. Id *string `type:"string" required:"true"`
  2435. // The number of invalidation batches currently in progress.
  2436. InProgressInvalidationBatches *int64 `type:"integer" required:"true"`
  2437. // The date and time the distribution was last modified.
  2438. LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
  2439. // This response element indicates the current status of the distribution. When
  2440. // the status is Deployed, the distribution's information is fully propagated
  2441. // throughout the Amazon CloudFront system.
  2442. Status *string `type:"string" required:"true"`
  2443. }
  2444. // String returns the string representation
  2445. func (s Distribution) String() string {
  2446. return awsutil.Prettify(s)
  2447. }
  2448. // GoString returns the string representation
  2449. func (s Distribution) GoString() string {
  2450. return s.String()
  2451. }
  2452. // A distribution Configuration.
  2453. type DistributionConfig struct {
  2454. _ struct{} `type:"structure"`
  2455. // A complex type that contains information about CNAMEs (alternate domain names),
  2456. // if any, for this distribution.
  2457. Aliases *Aliases `type:"structure"`
  2458. // A complex type that contains zero or more CacheBehavior elements.
  2459. CacheBehaviors *CacheBehaviors `type:"structure"`
  2460. // A unique number that ensures the request can't be replayed. If the CallerReference
  2461. // is new (no matter the content of the DistributionConfig object), a new distribution
  2462. // is created. If the CallerReference is a value you already sent in a previous
  2463. // request to create a distribution, and the content of the DistributionConfig
  2464. // is identical to the original request (ignoring white space), the response
  2465. // includes the same information returned to the original request. If the CallerReference
  2466. // is a value you already sent in a previous request to create a distribution
  2467. // but the content of the DistributionConfig is different from the original
  2468. // request, CloudFront returns a DistributionAlreadyExists error.
  2469. CallerReference *string `type:"string" required:"true"`
  2470. // Any comments you want to include about the distribution.
  2471. Comment *string `type:"string" required:"true"`
  2472. // A complex type that contains zero or more CustomErrorResponse elements.
  2473. CustomErrorResponses *CustomErrorResponses `type:"structure"`
  2474. // A complex type that describes the default cache behavior if you do not specify
  2475. // a CacheBehavior element or if files don't match any of the values of PathPattern
  2476. // in CacheBehavior elements.You must create exactly one default cache behavior.
  2477. DefaultCacheBehavior *DefaultCacheBehavior `type:"structure" required:"true"`
  2478. // The object that you want CloudFront to return (for example, index.html) when
  2479. // an end user requests the root URL for your distribution (http://www.example.com)
  2480. // instead of an object in your distribution (http://www.example.com/index.html).
  2481. // Specifying a default root object avoids exposing the contents of your distribution.
  2482. // If you don't want to specify a default root object when you create a distribution,
  2483. // include an empty DefaultRootObject element. To delete the default root object
  2484. // from an existing distribution, update the distribution configuration and
  2485. // include an empty DefaultRootObject element. To replace the default root object,
  2486. // update the distribution configuration and specify the new object.
  2487. DefaultRootObject *string `type:"string"`
  2488. // Whether the distribution is enabled to accept end user requests for content.
  2489. Enabled *bool `type:"boolean" required:"true"`
  2490. // A complex type that controls whether access logs are written for the distribution.
  2491. Logging *LoggingConfig `type:"structure"`
  2492. // A complex type that contains information about origins for this distribution.
  2493. Origins *Origins `type:"structure" required:"true"`
  2494. // A complex type that contains information about price class for this distribution.
  2495. PriceClass *string `type:"string" enum:"PriceClass"`
  2496. // A complex type that identifies ways in which you want to restrict distribution
  2497. // of your content.
  2498. Restrictions *Restrictions `type:"structure"`
  2499. // A complex type that contains information about viewer certificates for this
  2500. // distribution.
  2501. ViewerCertificate *ViewerCertificate `type:"structure"`
  2502. // (Optional) If you're using AWS WAF to filter CloudFront requests, the Id
  2503. // of the AWS WAF web ACL that is associated with the distribution.
  2504. WebACLId *string `type:"string"`
  2505. }
  2506. // String returns the string representation
  2507. func (s DistributionConfig) String() string {
  2508. return awsutil.Prettify(s)
  2509. }
  2510. // GoString returns the string representation
  2511. func (s DistributionConfig) GoString() string {
  2512. return s.String()
  2513. }
  2514. // Validate inspects the fields of the type to determine if they are valid.
  2515. func (s *DistributionConfig) Validate() error {
  2516. invalidParams := request.ErrInvalidParams{Context: "DistributionConfig"}
  2517. if s.CallerReference == nil {
  2518. invalidParams.Add(request.NewErrParamRequired("CallerReference"))
  2519. }
  2520. if s.Comment == nil {
  2521. invalidParams.Add(request.NewErrParamRequired("Comment"))
  2522. }
  2523. if s.DefaultCacheBehavior == nil {
  2524. invalidParams.Add(request.NewErrParamRequired("DefaultCacheBehavior"))
  2525. }
  2526. if s.Enabled == nil {
  2527. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  2528. }
  2529. if s.Origins == nil {
  2530. invalidParams.Add(request.NewErrParamRequired("Origins"))
  2531. }
  2532. if s.Aliases != nil {
  2533. if err := s.Aliases.Validate(); err != nil {
  2534. invalidParams.AddNested("Aliases", err.(request.ErrInvalidParams))
  2535. }
  2536. }
  2537. if s.CacheBehaviors != nil {
  2538. if err := s.CacheBehaviors.Validate(); err != nil {
  2539. invalidParams.AddNested("CacheBehaviors", err.(request.ErrInvalidParams))
  2540. }
  2541. }
  2542. if s.CustomErrorResponses != nil {
  2543. if err := s.CustomErrorResponses.Validate(); err != nil {
  2544. invalidParams.AddNested("CustomErrorResponses", err.(request.ErrInvalidParams))
  2545. }
  2546. }
  2547. if s.DefaultCacheBehavior != nil {
  2548. if err := s.DefaultCacheBehavior.Validate(); err != nil {
  2549. invalidParams.AddNested("DefaultCacheBehavior", err.(request.ErrInvalidParams))
  2550. }
  2551. }
  2552. if s.Logging != nil {
  2553. if err := s.Logging.Validate(); err != nil {
  2554. invalidParams.AddNested("Logging", err.(request.ErrInvalidParams))
  2555. }
  2556. }
  2557. if s.Origins != nil {
  2558. if err := s.Origins.Validate(); err != nil {
  2559. invalidParams.AddNested("Origins", err.(request.ErrInvalidParams))
  2560. }
  2561. }
  2562. if s.Restrictions != nil {
  2563. if err := s.Restrictions.Validate(); err != nil {
  2564. invalidParams.AddNested("Restrictions", err.(request.ErrInvalidParams))
  2565. }
  2566. }
  2567. if invalidParams.Len() > 0 {
  2568. return invalidParams
  2569. }
  2570. return nil
  2571. }
  2572. // A distribution Configuration and a list of tags to be associated with the
  2573. // distribution.
  2574. type DistributionConfigWithTags struct {
  2575. _ struct{} `type:"structure"`
  2576. // A distribution Configuration.
  2577. DistributionConfig *DistributionConfig `type:"structure" required:"true"`
  2578. // A complex type that contains zero or more Tag elements.
  2579. Tags *Tags `type:"structure" required:"true"`
  2580. }
  2581. // String returns the string representation
  2582. func (s DistributionConfigWithTags) String() string {
  2583. return awsutil.Prettify(s)
  2584. }
  2585. // GoString returns the string representation
  2586. func (s DistributionConfigWithTags) GoString() string {
  2587. return s.String()
  2588. }
  2589. // Validate inspects the fields of the type to determine if they are valid.
  2590. func (s *DistributionConfigWithTags) Validate() error {
  2591. invalidParams := request.ErrInvalidParams{Context: "DistributionConfigWithTags"}
  2592. if s.DistributionConfig == nil {
  2593. invalidParams.Add(request.NewErrParamRequired("DistributionConfig"))
  2594. }
  2595. if s.Tags == nil {
  2596. invalidParams.Add(request.NewErrParamRequired("Tags"))
  2597. }
  2598. if s.DistributionConfig != nil {
  2599. if err := s.DistributionConfig.Validate(); err != nil {
  2600. invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams))
  2601. }
  2602. }
  2603. if s.Tags != nil {
  2604. if err := s.Tags.Validate(); err != nil {
  2605. invalidParams.AddNested("Tags", err.(request.ErrInvalidParams))
  2606. }
  2607. }
  2608. if invalidParams.Len() > 0 {
  2609. return invalidParams
  2610. }
  2611. return nil
  2612. }
  2613. // A distribution list.
  2614. type DistributionList struct {
  2615. _ struct{} `type:"structure"`
  2616. // A flag that indicates whether more distributions remain to be listed. If
  2617. // your results were truncated, you can make a follow-up pagination request
  2618. // using the Marker request parameter to retrieve more distributions in the
  2619. // list.
  2620. IsTruncated *bool `type:"boolean" required:"true"`
  2621. // A complex type that contains one DistributionSummary element for each distribution
  2622. // that was created by the current AWS account.
  2623. Items []*DistributionSummary `locationNameList:"DistributionSummary" type:"list"`
  2624. // The value you provided for the Marker request parameter.
  2625. Marker *string `type:"string" required:"true"`
  2626. // The value you provided for the MaxItems request parameter.
  2627. MaxItems *int64 `type:"integer" required:"true"`
  2628. // If IsTruncated is true, this element is present and contains the value you
  2629. // can use for the Marker request parameter to continue listing your distributions
  2630. // where they left off.
  2631. NextMarker *string `type:"string"`
  2632. // The number of distributions that were created by the current AWS account.
  2633. Quantity *int64 `type:"integer" required:"true"`
  2634. }
  2635. // String returns the string representation
  2636. func (s DistributionList) String() string {
  2637. return awsutil.Prettify(s)
  2638. }
  2639. // GoString returns the string representation
  2640. func (s DistributionList) GoString() string {
  2641. return s.String()
  2642. }
  2643. // A summary of the information for an Amazon CloudFront distribution.
  2644. type DistributionSummary struct {
  2645. _ struct{} `type:"structure"`
  2646. // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5,
  2647. // where 123456789012 is your AWS account Id.
  2648. ARN *string `type:"string" required:"true"`
  2649. // A complex type that contains information about CNAMEs (alternate domain names),
  2650. // if any, for this distribution.
  2651. Aliases *Aliases `type:"structure" required:"true"`
  2652. // A complex type that contains zero or more CacheBehavior elements.
  2653. CacheBehaviors *CacheBehaviors `type:"structure" required:"true"`
  2654. // The comment originally specified when this distribution was created.
  2655. Comment *string `type:"string" required:"true"`
  2656. // A complex type that contains zero or more CustomErrorResponses elements.
  2657. CustomErrorResponses *CustomErrorResponses `type:"structure" required:"true"`
  2658. // A complex type that describes the default cache behavior if you do not specify
  2659. // a CacheBehavior element or if files don't match any of the values of PathPattern
  2660. // in CacheBehavior elements.You must create exactly one default cache behavior.
  2661. DefaultCacheBehavior *DefaultCacheBehavior `type:"structure" required:"true"`
  2662. // The domain name corresponding to the distribution. For example: d604721fxaaqy9.cloudfront.net.
  2663. DomainName *string `type:"string" required:"true"`
  2664. // Whether the distribution is enabled to accept end user requests for content.
  2665. Enabled *bool `type:"boolean" required:"true"`
  2666. // The identifier for the distribution. For example: EDFDVBD632BHDS5.
  2667. Id *string `type:"string" required:"true"`
  2668. // The date and time the distribution was last modified.
  2669. LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
  2670. // A complex type that contains information about origins for this distribution.
  2671. Origins *Origins `type:"structure" required:"true"`
  2672. PriceClass *string `type:"string" required:"true" enum:"PriceClass"`
  2673. // A complex type that identifies ways in which you want to restrict distribution
  2674. // of your content.
  2675. Restrictions *Restrictions `type:"structure" required:"true"`
  2676. // This response element indicates the current status of the distribution. When
  2677. // the status is Deployed, the distribution's information is fully propagated
  2678. // throughout the Amazon CloudFront system.
  2679. Status *string `type:"string" required:"true"`
  2680. // A complex type that contains information about viewer certificates for this
  2681. // distribution.
  2682. ViewerCertificate *ViewerCertificate `type:"structure" required:"true"`
  2683. // The Web ACL Id (if any) associated with the distribution.
  2684. WebACLId *string `type:"string" required:"true"`
  2685. }
  2686. // String returns the string representation
  2687. func (s DistributionSummary) String() string {
  2688. return awsutil.Prettify(s)
  2689. }
  2690. // GoString returns the string representation
  2691. func (s DistributionSummary) GoString() string {
  2692. return s.String()
  2693. }
  2694. // A complex type that specifies how CloudFront handles query strings, cookies
  2695. // and headers.
  2696. type ForwardedValues struct {
  2697. _ struct{} `type:"structure"`
  2698. // A complex type that specifies how CloudFront handles cookies.
  2699. Cookies *CookiePreference `type:"structure" required:"true"`
  2700. // A complex type that specifies the Headers, if any, that you want CloudFront
  2701. // to vary upon for this cache behavior.
  2702. Headers *Headers `type:"structure"`
  2703. // Indicates whether you want CloudFront to forward query strings to the origin
  2704. // that is associated with this cache behavior. If so, specify true; if not,
  2705. // specify false.
  2706. QueryString *bool `type:"boolean" required:"true"`
  2707. }
  2708. // String returns the string representation
  2709. func (s ForwardedValues) String() string {
  2710. return awsutil.Prettify(s)
  2711. }
  2712. // GoString returns the string representation
  2713. func (s ForwardedValues) GoString() string {
  2714. return s.String()
  2715. }
  2716. // Validate inspects the fields of the type to determine if they are valid.
  2717. func (s *ForwardedValues) Validate() error {
  2718. invalidParams := request.ErrInvalidParams{Context: "ForwardedValues"}
  2719. if s.Cookies == nil {
  2720. invalidParams.Add(request.NewErrParamRequired("Cookies"))
  2721. }
  2722. if s.QueryString == nil {
  2723. invalidParams.Add(request.NewErrParamRequired("QueryString"))
  2724. }
  2725. if s.Cookies != nil {
  2726. if err := s.Cookies.Validate(); err != nil {
  2727. invalidParams.AddNested("Cookies", err.(request.ErrInvalidParams))
  2728. }
  2729. }
  2730. if s.Headers != nil {
  2731. if err := s.Headers.Validate(); err != nil {
  2732. invalidParams.AddNested("Headers", err.(request.ErrInvalidParams))
  2733. }
  2734. }
  2735. if invalidParams.Len() > 0 {
  2736. return invalidParams
  2737. }
  2738. return nil
  2739. }
  2740. // A complex type that controls the countries in which your content is distributed.
  2741. // For more information about geo restriction, go to Customizing Error Responses
  2742. // in the Amazon CloudFront Developer Guide. CloudFront determines the location
  2743. // of your users using MaxMind GeoIP databases. For information about the accuracy
  2744. // of these databases, see How accurate are your GeoIP databases? on the MaxMind
  2745. // website.
  2746. type GeoRestriction struct {
  2747. _ struct{} `type:"structure"`
  2748. // A complex type that contains a Location element for each country in which
  2749. // you want CloudFront either to distribute your content (whitelist) or not
  2750. // distribute your content (blacklist). The Location element is a two-letter,
  2751. // uppercase country code for a country that you want to include in your blacklist
  2752. // or whitelist. Include one Location element for each country. CloudFront and
  2753. // MaxMind both use ISO 3166 country codes. For the current list of countries
  2754. // and the corresponding codes, see ISO 3166-1-alpha-2 code on the International
  2755. // Organization for Standardization website. You can also refer to the country
  2756. // list in the CloudFront console, which includes both country names and codes.
  2757. Items []*string `locationNameList:"Location" type:"list"`
  2758. // When geo restriction is enabled, this is the number of countries in your
  2759. // whitelist or blacklist. Otherwise, when it is not enabled, Quantity is 0,
  2760. // and you can omit Items.
  2761. Quantity *int64 `type:"integer" required:"true"`
  2762. // The method that you want to use to restrict distribution of your content
  2763. // by country: - none: No geo restriction is enabled, meaning access to content
  2764. // is not restricted by client geo location. - blacklist: The Location elements
  2765. // specify the countries in which you do not want CloudFront to distribute your
  2766. // content. - whitelist: The Location elements specify the countries in which
  2767. // you want CloudFront to distribute your content.
  2768. RestrictionType *string `type:"string" required:"true" enum:"GeoRestrictionType"`
  2769. }
  2770. // String returns the string representation
  2771. func (s GeoRestriction) String() string {
  2772. return awsutil.Prettify(s)
  2773. }
  2774. // GoString returns the string representation
  2775. func (s GeoRestriction) GoString() string {
  2776. return s.String()
  2777. }
  2778. // Validate inspects the fields of the type to determine if they are valid.
  2779. func (s *GeoRestriction) Validate() error {
  2780. invalidParams := request.ErrInvalidParams{Context: "GeoRestriction"}
  2781. if s.Quantity == nil {
  2782. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  2783. }
  2784. if s.RestrictionType == nil {
  2785. invalidParams.Add(request.NewErrParamRequired("RestrictionType"))
  2786. }
  2787. if invalidParams.Len() > 0 {
  2788. return invalidParams
  2789. }
  2790. return nil
  2791. }
  2792. // The request to get an origin access identity's configuration.
  2793. type GetCloudFrontOriginAccessIdentityConfigInput struct {
  2794. _ struct{} `type:"structure"`
  2795. // The identity's id.
  2796. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  2797. }
  2798. // String returns the string representation
  2799. func (s GetCloudFrontOriginAccessIdentityConfigInput) String() string {
  2800. return awsutil.Prettify(s)
  2801. }
  2802. // GoString returns the string representation
  2803. func (s GetCloudFrontOriginAccessIdentityConfigInput) GoString() string {
  2804. return s.String()
  2805. }
  2806. // Validate inspects the fields of the type to determine if they are valid.
  2807. func (s *GetCloudFrontOriginAccessIdentityConfigInput) Validate() error {
  2808. invalidParams := request.ErrInvalidParams{Context: "GetCloudFrontOriginAccessIdentityConfigInput"}
  2809. if s.Id == nil {
  2810. invalidParams.Add(request.NewErrParamRequired("Id"))
  2811. }
  2812. if invalidParams.Len() > 0 {
  2813. return invalidParams
  2814. }
  2815. return nil
  2816. }
  2817. // The returned result of the corresponding request.
  2818. type GetCloudFrontOriginAccessIdentityConfigOutput struct {
  2819. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"`
  2820. // The origin access identity's configuration information.
  2821. CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `type:"structure"`
  2822. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  2823. ETag *string `location:"header" locationName:"ETag" type:"string"`
  2824. }
  2825. // String returns the string representation
  2826. func (s GetCloudFrontOriginAccessIdentityConfigOutput) String() string {
  2827. return awsutil.Prettify(s)
  2828. }
  2829. // GoString returns the string representation
  2830. func (s GetCloudFrontOriginAccessIdentityConfigOutput) GoString() string {
  2831. return s.String()
  2832. }
  2833. // The request to get an origin access identity's information.
  2834. type GetCloudFrontOriginAccessIdentityInput struct {
  2835. _ struct{} `type:"structure"`
  2836. // The identity's id.
  2837. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  2838. }
  2839. // String returns the string representation
  2840. func (s GetCloudFrontOriginAccessIdentityInput) String() string {
  2841. return awsutil.Prettify(s)
  2842. }
  2843. // GoString returns the string representation
  2844. func (s GetCloudFrontOriginAccessIdentityInput) GoString() string {
  2845. return s.String()
  2846. }
  2847. // Validate inspects the fields of the type to determine if they are valid.
  2848. func (s *GetCloudFrontOriginAccessIdentityInput) Validate() error {
  2849. invalidParams := request.ErrInvalidParams{Context: "GetCloudFrontOriginAccessIdentityInput"}
  2850. if s.Id == nil {
  2851. invalidParams.Add(request.NewErrParamRequired("Id"))
  2852. }
  2853. if invalidParams.Len() > 0 {
  2854. return invalidParams
  2855. }
  2856. return nil
  2857. }
  2858. // The returned result of the corresponding request.
  2859. type GetCloudFrontOriginAccessIdentityOutput struct {
  2860. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"`
  2861. // The origin access identity's information.
  2862. CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"`
  2863. // The current version of the origin access identity's information. For example:
  2864. // E2QWRUHAPOMQZL.
  2865. ETag *string `location:"header" locationName:"ETag" type:"string"`
  2866. }
  2867. // String returns the string representation
  2868. func (s GetCloudFrontOriginAccessIdentityOutput) String() string {
  2869. return awsutil.Prettify(s)
  2870. }
  2871. // GoString returns the string representation
  2872. func (s GetCloudFrontOriginAccessIdentityOutput) GoString() string {
  2873. return s.String()
  2874. }
  2875. // The request to get a distribution configuration.
  2876. type GetDistributionConfigInput struct {
  2877. _ struct{} `type:"structure"`
  2878. // The distribution's id.
  2879. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  2880. }
  2881. // String returns the string representation
  2882. func (s GetDistributionConfigInput) String() string {
  2883. return awsutil.Prettify(s)
  2884. }
  2885. // GoString returns the string representation
  2886. func (s GetDistributionConfigInput) GoString() string {
  2887. return s.String()
  2888. }
  2889. // Validate inspects the fields of the type to determine if they are valid.
  2890. func (s *GetDistributionConfigInput) Validate() error {
  2891. invalidParams := request.ErrInvalidParams{Context: "GetDistributionConfigInput"}
  2892. if s.Id == nil {
  2893. invalidParams.Add(request.NewErrParamRequired("Id"))
  2894. }
  2895. if invalidParams.Len() > 0 {
  2896. return invalidParams
  2897. }
  2898. return nil
  2899. }
  2900. // The returned result of the corresponding request.
  2901. type GetDistributionConfigOutput struct {
  2902. _ struct{} `type:"structure" payload:"DistributionConfig"`
  2903. // The distribution's configuration information.
  2904. DistributionConfig *DistributionConfig `type:"structure"`
  2905. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  2906. ETag *string `location:"header" locationName:"ETag" type:"string"`
  2907. }
  2908. // String returns the string representation
  2909. func (s GetDistributionConfigOutput) String() string {
  2910. return awsutil.Prettify(s)
  2911. }
  2912. // GoString returns the string representation
  2913. func (s GetDistributionConfigOutput) GoString() string {
  2914. return s.String()
  2915. }
  2916. // The request to get a distribution's information.
  2917. type GetDistributionInput struct {
  2918. _ struct{} `type:"structure"`
  2919. // The distribution's id.
  2920. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  2921. }
  2922. // String returns the string representation
  2923. func (s GetDistributionInput) String() string {
  2924. return awsutil.Prettify(s)
  2925. }
  2926. // GoString returns the string representation
  2927. func (s GetDistributionInput) GoString() string {
  2928. return s.String()
  2929. }
  2930. // Validate inspects the fields of the type to determine if they are valid.
  2931. func (s *GetDistributionInput) Validate() error {
  2932. invalidParams := request.ErrInvalidParams{Context: "GetDistributionInput"}
  2933. if s.Id == nil {
  2934. invalidParams.Add(request.NewErrParamRequired("Id"))
  2935. }
  2936. if invalidParams.Len() > 0 {
  2937. return invalidParams
  2938. }
  2939. return nil
  2940. }
  2941. // The returned result of the corresponding request.
  2942. type GetDistributionOutput struct {
  2943. _ struct{} `type:"structure" payload:"Distribution"`
  2944. // The distribution's information.
  2945. Distribution *Distribution `type:"structure"`
  2946. // The current version of the distribution's information. For example: E2QWRUHAPOMQZL.
  2947. ETag *string `location:"header" locationName:"ETag" type:"string"`
  2948. }
  2949. // String returns the string representation
  2950. func (s GetDistributionOutput) String() string {
  2951. return awsutil.Prettify(s)
  2952. }
  2953. // GoString returns the string representation
  2954. func (s GetDistributionOutput) GoString() string {
  2955. return s.String()
  2956. }
  2957. // The request to get an invalidation's information.
  2958. type GetInvalidationInput struct {
  2959. _ struct{} `type:"structure"`
  2960. // The distribution's id.
  2961. DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"`
  2962. // The invalidation's id.
  2963. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  2964. }
  2965. // String returns the string representation
  2966. func (s GetInvalidationInput) String() string {
  2967. return awsutil.Prettify(s)
  2968. }
  2969. // GoString returns the string representation
  2970. func (s GetInvalidationInput) GoString() string {
  2971. return s.String()
  2972. }
  2973. // Validate inspects the fields of the type to determine if they are valid.
  2974. func (s *GetInvalidationInput) Validate() error {
  2975. invalidParams := request.ErrInvalidParams{Context: "GetInvalidationInput"}
  2976. if s.DistributionId == nil {
  2977. invalidParams.Add(request.NewErrParamRequired("DistributionId"))
  2978. }
  2979. if s.Id == nil {
  2980. invalidParams.Add(request.NewErrParamRequired("Id"))
  2981. }
  2982. if invalidParams.Len() > 0 {
  2983. return invalidParams
  2984. }
  2985. return nil
  2986. }
  2987. // The returned result of the corresponding request.
  2988. type GetInvalidationOutput struct {
  2989. _ struct{} `type:"structure" payload:"Invalidation"`
  2990. // The invalidation's information.
  2991. Invalidation *Invalidation `type:"structure"`
  2992. }
  2993. // String returns the string representation
  2994. func (s GetInvalidationOutput) String() string {
  2995. return awsutil.Prettify(s)
  2996. }
  2997. // GoString returns the string representation
  2998. func (s GetInvalidationOutput) GoString() string {
  2999. return s.String()
  3000. }
  3001. // To request to get a streaming distribution configuration.
  3002. type GetStreamingDistributionConfigInput struct {
  3003. _ struct{} `type:"structure"`
  3004. // The streaming distribution's id.
  3005. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  3006. }
  3007. // String returns the string representation
  3008. func (s GetStreamingDistributionConfigInput) String() string {
  3009. return awsutil.Prettify(s)
  3010. }
  3011. // GoString returns the string representation
  3012. func (s GetStreamingDistributionConfigInput) GoString() string {
  3013. return s.String()
  3014. }
  3015. // Validate inspects the fields of the type to determine if they are valid.
  3016. func (s *GetStreamingDistributionConfigInput) Validate() error {
  3017. invalidParams := request.ErrInvalidParams{Context: "GetStreamingDistributionConfigInput"}
  3018. if s.Id == nil {
  3019. invalidParams.Add(request.NewErrParamRequired("Id"))
  3020. }
  3021. if invalidParams.Len() > 0 {
  3022. return invalidParams
  3023. }
  3024. return nil
  3025. }
  3026. // The returned result of the corresponding request.
  3027. type GetStreamingDistributionConfigOutput struct {
  3028. _ struct{} `type:"structure" payload:"StreamingDistributionConfig"`
  3029. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  3030. ETag *string `location:"header" locationName:"ETag" type:"string"`
  3031. // The streaming distribution's configuration information.
  3032. StreamingDistributionConfig *StreamingDistributionConfig `type:"structure"`
  3033. }
  3034. // String returns the string representation
  3035. func (s GetStreamingDistributionConfigOutput) String() string {
  3036. return awsutil.Prettify(s)
  3037. }
  3038. // GoString returns the string representation
  3039. func (s GetStreamingDistributionConfigOutput) GoString() string {
  3040. return s.String()
  3041. }
  3042. // The request to get a streaming distribution's information.
  3043. type GetStreamingDistributionInput struct {
  3044. _ struct{} `type:"structure"`
  3045. // The streaming distribution's id.
  3046. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  3047. }
  3048. // String returns the string representation
  3049. func (s GetStreamingDistributionInput) String() string {
  3050. return awsutil.Prettify(s)
  3051. }
  3052. // GoString returns the string representation
  3053. func (s GetStreamingDistributionInput) GoString() string {
  3054. return s.String()
  3055. }
  3056. // Validate inspects the fields of the type to determine if they are valid.
  3057. func (s *GetStreamingDistributionInput) Validate() error {
  3058. invalidParams := request.ErrInvalidParams{Context: "GetStreamingDistributionInput"}
  3059. if s.Id == nil {
  3060. invalidParams.Add(request.NewErrParamRequired("Id"))
  3061. }
  3062. if invalidParams.Len() > 0 {
  3063. return invalidParams
  3064. }
  3065. return nil
  3066. }
  3067. // The returned result of the corresponding request.
  3068. type GetStreamingDistributionOutput struct {
  3069. _ struct{} `type:"structure" payload:"StreamingDistribution"`
  3070. // The current version of the streaming distribution's information. For example:
  3071. // E2QWRUHAPOMQZL.
  3072. ETag *string `location:"header" locationName:"ETag" type:"string"`
  3073. // The streaming distribution's information.
  3074. StreamingDistribution *StreamingDistribution `type:"structure"`
  3075. }
  3076. // String returns the string representation
  3077. func (s GetStreamingDistributionOutput) String() string {
  3078. return awsutil.Prettify(s)
  3079. }
  3080. // GoString returns the string representation
  3081. func (s GetStreamingDistributionOutput) GoString() string {
  3082. return s.String()
  3083. }
  3084. // A complex type that specifies the headers that you want CloudFront to forward
  3085. // to the origin for this cache behavior. For the headers that you specify,
  3086. // CloudFront also caches separate versions of a given object based on the header
  3087. // values in viewer requests; this is known as varying on headers. For example,
  3088. // suppose viewer requests for logo.jpg contain a custom Product header that
  3089. // has a value of either Acme or Apex, and you configure CloudFront to vary
  3090. // on the Product header. CloudFront forwards the Product header to the origin
  3091. // and caches the response from the origin once for each header value.
  3092. type Headers struct {
  3093. _ struct{} `type:"structure"`
  3094. // Optional: A complex type that contains a Name element for each header that
  3095. // you want CloudFront to forward to the origin and to vary on for this cache
  3096. // behavior. If Quantity is 0, omit Items.
  3097. Items []*string `locationNameList:"Name" type:"list"`
  3098. // The number of different headers that you want CloudFront to forward to the
  3099. // origin and to vary on for this cache behavior. The maximum number of headers
  3100. // that you can specify by name is 10. If you want CloudFront to forward all
  3101. // headers to the origin and vary on all of them, specify 1 for Quantity and
  3102. // * for Name. If you don't want CloudFront to forward any additional headers
  3103. // to the origin or to vary on any headers, specify 0 for Quantity and omit
  3104. // Items.
  3105. Quantity *int64 `type:"integer" required:"true"`
  3106. }
  3107. // String returns the string representation
  3108. func (s Headers) String() string {
  3109. return awsutil.Prettify(s)
  3110. }
  3111. // GoString returns the string representation
  3112. func (s Headers) GoString() string {
  3113. return s.String()
  3114. }
  3115. // Validate inspects the fields of the type to determine if they are valid.
  3116. func (s *Headers) Validate() error {
  3117. invalidParams := request.ErrInvalidParams{Context: "Headers"}
  3118. if s.Quantity == nil {
  3119. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  3120. }
  3121. if invalidParams.Len() > 0 {
  3122. return invalidParams
  3123. }
  3124. return nil
  3125. }
  3126. // An invalidation.
  3127. type Invalidation struct {
  3128. _ struct{} `type:"structure"`
  3129. // The date and time the invalidation request was first made.
  3130. CreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
  3131. // The identifier for the invalidation request. For example: IDFDVBD632BHDS5.
  3132. Id *string `type:"string" required:"true"`
  3133. // The current invalidation information for the batch request.
  3134. InvalidationBatch *InvalidationBatch `type:"structure" required:"true"`
  3135. // The status of the invalidation request. When the invalidation batch is finished,
  3136. // the status is Completed.
  3137. Status *string `type:"string" required:"true"`
  3138. }
  3139. // String returns the string representation
  3140. func (s Invalidation) String() string {
  3141. return awsutil.Prettify(s)
  3142. }
  3143. // GoString returns the string representation
  3144. func (s Invalidation) GoString() string {
  3145. return s.String()
  3146. }
  3147. // An invalidation batch.
  3148. type InvalidationBatch struct {
  3149. _ struct{} `type:"structure"`
  3150. // A unique name that ensures the request can't be replayed. If the CallerReference
  3151. // is new (no matter the content of the Path object), a new distribution is
  3152. // created. If the CallerReference is a value you already sent in a previous
  3153. // request to create an invalidation batch, and the content of each Path element
  3154. // is identical to the original request, the response includes the same information
  3155. // returned to the original request. If the CallerReference is a value you already
  3156. // sent in a previous request to create a distribution but the content of any
  3157. // Path is different from the original request, CloudFront returns an InvalidationBatchAlreadyExists
  3158. // error.
  3159. CallerReference *string `type:"string" required:"true"`
  3160. // The path of the object to invalidate. The path is relative to the distribution
  3161. // and must begin with a slash (/). You must enclose each invalidation object
  3162. // with the Path element tags. If the path includes non-ASCII characters or
  3163. // unsafe characters as defined in RFC 1783 (http://www.ietf.org/rfc/rfc1738.txt),
  3164. // URL encode those characters. Do not URL encode any other characters in the
  3165. // path, or CloudFront will not invalidate the old version of the updated object.
  3166. Paths *Paths `type:"structure" required:"true"`
  3167. }
  3168. // String returns the string representation
  3169. func (s InvalidationBatch) String() string {
  3170. return awsutil.Prettify(s)
  3171. }
  3172. // GoString returns the string representation
  3173. func (s InvalidationBatch) GoString() string {
  3174. return s.String()
  3175. }
  3176. // Validate inspects the fields of the type to determine if they are valid.
  3177. func (s *InvalidationBatch) Validate() error {
  3178. invalidParams := request.ErrInvalidParams{Context: "InvalidationBatch"}
  3179. if s.CallerReference == nil {
  3180. invalidParams.Add(request.NewErrParamRequired("CallerReference"))
  3181. }
  3182. if s.Paths == nil {
  3183. invalidParams.Add(request.NewErrParamRequired("Paths"))
  3184. }
  3185. if s.Paths != nil {
  3186. if err := s.Paths.Validate(); err != nil {
  3187. invalidParams.AddNested("Paths", err.(request.ErrInvalidParams))
  3188. }
  3189. }
  3190. if invalidParams.Len() > 0 {
  3191. return invalidParams
  3192. }
  3193. return nil
  3194. }
  3195. // An invalidation list.
  3196. type InvalidationList struct {
  3197. _ struct{} `type:"structure"`
  3198. // A flag that indicates whether more invalidation batch requests remain to
  3199. // be listed. If your results were truncated, you can make a follow-up pagination
  3200. // request using the Marker request parameter to retrieve more invalidation
  3201. // batches in the list.
  3202. IsTruncated *bool `type:"boolean" required:"true"`
  3203. // A complex type that contains one InvalidationSummary element for each invalidation
  3204. // batch that was created by the current AWS account.
  3205. Items []*InvalidationSummary `locationNameList:"InvalidationSummary" type:"list"`
  3206. // The value you provided for the Marker request parameter.
  3207. Marker *string `type:"string" required:"true"`
  3208. // The value you provided for the MaxItems request parameter.
  3209. MaxItems *int64 `type:"integer" required:"true"`
  3210. // If IsTruncated is true, this element is present and contains the value you
  3211. // can use for the Marker request parameter to continue listing your invalidation
  3212. // batches where they left off.
  3213. NextMarker *string `type:"string"`
  3214. // The number of invalidation batches that were created by the current AWS account.
  3215. Quantity *int64 `type:"integer" required:"true"`
  3216. }
  3217. // String returns the string representation
  3218. func (s InvalidationList) String() string {
  3219. return awsutil.Prettify(s)
  3220. }
  3221. // GoString returns the string representation
  3222. func (s InvalidationList) GoString() string {
  3223. return s.String()
  3224. }
  3225. // Summary of an invalidation request.
  3226. type InvalidationSummary struct {
  3227. _ struct{} `type:"structure"`
  3228. CreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
  3229. // The unique ID for an invalidation request.
  3230. Id *string `type:"string" required:"true"`
  3231. // The status of an invalidation request.
  3232. Status *string `type:"string" required:"true"`
  3233. }
  3234. // String returns the string representation
  3235. func (s InvalidationSummary) String() string {
  3236. return awsutil.Prettify(s)
  3237. }
  3238. // GoString returns the string representation
  3239. func (s InvalidationSummary) GoString() string {
  3240. return s.String()
  3241. }
  3242. // A complex type that lists the active CloudFront key pairs, if any, that are
  3243. // associated with AwsAccountNumber.
  3244. type KeyPairIds struct {
  3245. _ struct{} `type:"structure"`
  3246. // A complex type that lists the active CloudFront key pairs, if any, that are
  3247. // associated with AwsAccountNumber.
  3248. Items []*string `locationNameList:"KeyPairId" type:"list"`
  3249. // The number of active CloudFront key pairs for AwsAccountNumber.
  3250. Quantity *int64 `type:"integer" required:"true"`
  3251. }
  3252. // String returns the string representation
  3253. func (s KeyPairIds) String() string {
  3254. return awsutil.Prettify(s)
  3255. }
  3256. // GoString returns the string representation
  3257. func (s KeyPairIds) GoString() string {
  3258. return s.String()
  3259. }
  3260. // The request to list origin access identities.
  3261. type ListCloudFrontOriginAccessIdentitiesInput struct {
  3262. _ struct{} `type:"structure"`
  3263. // Use this when paginating results to indicate where to begin in your list
  3264. // of origin access identities. The results include identities in the list that
  3265. // occur after the marker. To get the next page of results, set the Marker to
  3266. // the value of the NextMarker from the current page's response (which is also
  3267. // the ID of the last identity on that page).
  3268. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  3269. // The maximum number of origin access identities you want in the response body.
  3270. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  3271. }
  3272. // String returns the string representation
  3273. func (s ListCloudFrontOriginAccessIdentitiesInput) String() string {
  3274. return awsutil.Prettify(s)
  3275. }
  3276. // GoString returns the string representation
  3277. func (s ListCloudFrontOriginAccessIdentitiesInput) GoString() string {
  3278. return s.String()
  3279. }
  3280. // The returned result of the corresponding request.
  3281. type ListCloudFrontOriginAccessIdentitiesOutput struct {
  3282. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityList"`
  3283. // The CloudFrontOriginAccessIdentityList type.
  3284. CloudFrontOriginAccessIdentityList *OriginAccessIdentityList `type:"structure"`
  3285. }
  3286. // String returns the string representation
  3287. func (s ListCloudFrontOriginAccessIdentitiesOutput) String() string {
  3288. return awsutil.Prettify(s)
  3289. }
  3290. // GoString returns the string representation
  3291. func (s ListCloudFrontOriginAccessIdentitiesOutput) GoString() string {
  3292. return s.String()
  3293. }
  3294. // The request to list distributions that are associated with a specified AWS
  3295. // WAF web ACL.
  3296. type ListDistributionsByWebACLIdInput struct {
  3297. _ struct{} `type:"structure"`
  3298. // Use Marker and MaxItems to control pagination of results. If you have more
  3299. // than MaxItems distributions that satisfy the request, the response includes
  3300. // a NextMarker element. To get the next page of results, submit another request.
  3301. // For the value of Marker, specify the value of NextMarker from the last response.
  3302. // (For the first request, omit Marker.)
  3303. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  3304. // The maximum number of distributions that you want CloudFront to return in
  3305. // the response body. The maximum and default values are both 100.
  3306. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  3307. // The Id of the AWS WAF web ACL for which you want to list the associated distributions.
  3308. // If you specify "null" for the Id, the request returns a list of the distributions
  3309. // that aren't associated with a web ACL.
  3310. WebACLId *string `location:"uri" locationName:"WebACLId" type:"string" required:"true"`
  3311. }
  3312. // String returns the string representation
  3313. func (s ListDistributionsByWebACLIdInput) String() string {
  3314. return awsutil.Prettify(s)
  3315. }
  3316. // GoString returns the string representation
  3317. func (s ListDistributionsByWebACLIdInput) GoString() string {
  3318. return s.String()
  3319. }
  3320. // Validate inspects the fields of the type to determine if they are valid.
  3321. func (s *ListDistributionsByWebACLIdInput) Validate() error {
  3322. invalidParams := request.ErrInvalidParams{Context: "ListDistributionsByWebACLIdInput"}
  3323. if s.WebACLId == nil {
  3324. invalidParams.Add(request.NewErrParamRequired("WebACLId"))
  3325. }
  3326. if invalidParams.Len() > 0 {
  3327. return invalidParams
  3328. }
  3329. return nil
  3330. }
  3331. // The response to a request to list the distributions that are associated with
  3332. // a specified AWS WAF web ACL.
  3333. type ListDistributionsByWebACLIdOutput struct {
  3334. _ struct{} `type:"structure" payload:"DistributionList"`
  3335. // The DistributionList type.
  3336. DistributionList *DistributionList `type:"structure"`
  3337. }
  3338. // String returns the string representation
  3339. func (s ListDistributionsByWebACLIdOutput) String() string {
  3340. return awsutil.Prettify(s)
  3341. }
  3342. // GoString returns the string representation
  3343. func (s ListDistributionsByWebACLIdOutput) GoString() string {
  3344. return s.String()
  3345. }
  3346. // The request to list your distributions.
  3347. type ListDistributionsInput struct {
  3348. _ struct{} `type:"structure"`
  3349. // Use Marker and MaxItems to control pagination of results. If you have more
  3350. // than MaxItems distributions that satisfy the request, the response includes
  3351. // a NextMarker element. To get the next page of results, submit another request.
  3352. // For the value of Marker, specify the value of NextMarker from the last response.
  3353. // (For the first request, omit Marker.)
  3354. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  3355. // The maximum number of distributions that you want CloudFront to return in
  3356. // the response body. The maximum and default values are both 100.
  3357. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  3358. }
  3359. // String returns the string representation
  3360. func (s ListDistributionsInput) String() string {
  3361. return awsutil.Prettify(s)
  3362. }
  3363. // GoString returns the string representation
  3364. func (s ListDistributionsInput) GoString() string {
  3365. return s.String()
  3366. }
  3367. // The returned result of the corresponding request.
  3368. type ListDistributionsOutput struct {
  3369. _ struct{} `type:"structure" payload:"DistributionList"`
  3370. // The DistributionList type.
  3371. DistributionList *DistributionList `type:"structure"`
  3372. }
  3373. // String returns the string representation
  3374. func (s ListDistributionsOutput) String() string {
  3375. return awsutil.Prettify(s)
  3376. }
  3377. // GoString returns the string representation
  3378. func (s ListDistributionsOutput) GoString() string {
  3379. return s.String()
  3380. }
  3381. // The request to list invalidations.
  3382. type ListInvalidationsInput struct {
  3383. _ struct{} `type:"structure"`
  3384. // The distribution's id.
  3385. DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"`
  3386. // Use this parameter when paginating results to indicate where to begin in
  3387. // your list of invalidation batches. Because the results are returned in decreasing
  3388. // order from most recent to oldest, the most recent results are on the first
  3389. // page, the second page will contain earlier results, and so on. To get the
  3390. // next page of results, set the Marker to the value of the NextMarker from
  3391. // the current page's response. This value is the same as the ID of the last
  3392. // invalidation batch on that page.
  3393. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  3394. // The maximum number of invalidation batches you want in the response body.
  3395. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  3396. }
  3397. // String returns the string representation
  3398. func (s ListInvalidationsInput) String() string {
  3399. return awsutil.Prettify(s)
  3400. }
  3401. // GoString returns the string representation
  3402. func (s ListInvalidationsInput) GoString() string {
  3403. return s.String()
  3404. }
  3405. // Validate inspects the fields of the type to determine if they are valid.
  3406. func (s *ListInvalidationsInput) Validate() error {
  3407. invalidParams := request.ErrInvalidParams{Context: "ListInvalidationsInput"}
  3408. if s.DistributionId == nil {
  3409. invalidParams.Add(request.NewErrParamRequired("DistributionId"))
  3410. }
  3411. if invalidParams.Len() > 0 {
  3412. return invalidParams
  3413. }
  3414. return nil
  3415. }
  3416. // The returned result of the corresponding request.
  3417. type ListInvalidationsOutput struct {
  3418. _ struct{} `type:"structure" payload:"InvalidationList"`
  3419. // Information about invalidation batches.
  3420. InvalidationList *InvalidationList `type:"structure"`
  3421. }
  3422. // String returns the string representation
  3423. func (s ListInvalidationsOutput) String() string {
  3424. return awsutil.Prettify(s)
  3425. }
  3426. // GoString returns the string representation
  3427. func (s ListInvalidationsOutput) GoString() string {
  3428. return s.String()
  3429. }
  3430. // The request to list your streaming distributions.
  3431. type ListStreamingDistributionsInput struct {
  3432. _ struct{} `type:"structure"`
  3433. // Use this when paginating results to indicate where to begin in your list
  3434. // of streaming distributions. The results include distributions in the list
  3435. // that occur after the marker. To get the next page of results, set the Marker
  3436. // to the value of the NextMarker from the current page's response (which is
  3437. // also the ID of the last distribution on that page).
  3438. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  3439. // The maximum number of streaming distributions you want in the response body.
  3440. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  3441. }
  3442. // String returns the string representation
  3443. func (s ListStreamingDistributionsInput) String() string {
  3444. return awsutil.Prettify(s)
  3445. }
  3446. // GoString returns the string representation
  3447. func (s ListStreamingDistributionsInput) GoString() string {
  3448. return s.String()
  3449. }
  3450. // The returned result of the corresponding request.
  3451. type ListStreamingDistributionsOutput struct {
  3452. _ struct{} `type:"structure" payload:"StreamingDistributionList"`
  3453. // The StreamingDistributionList type.
  3454. StreamingDistributionList *StreamingDistributionList `type:"structure"`
  3455. }
  3456. // String returns the string representation
  3457. func (s ListStreamingDistributionsOutput) String() string {
  3458. return awsutil.Prettify(s)
  3459. }
  3460. // GoString returns the string representation
  3461. func (s ListStreamingDistributionsOutput) GoString() string {
  3462. return s.String()
  3463. }
  3464. // The request to list tags for a CloudFront resource.
  3465. type ListTagsForResourceInput struct {
  3466. _ struct{} `type:"structure"`
  3467. // An ARN of a CloudFront resource.
  3468. Resource *string `location:"querystring" locationName:"Resource" type:"string" required:"true"`
  3469. }
  3470. // String returns the string representation
  3471. func (s ListTagsForResourceInput) String() string {
  3472. return awsutil.Prettify(s)
  3473. }
  3474. // GoString returns the string representation
  3475. func (s ListTagsForResourceInput) GoString() string {
  3476. return s.String()
  3477. }
  3478. // Validate inspects the fields of the type to determine if they are valid.
  3479. func (s *ListTagsForResourceInput) Validate() error {
  3480. invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
  3481. if s.Resource == nil {
  3482. invalidParams.Add(request.NewErrParamRequired("Resource"))
  3483. }
  3484. if invalidParams.Len() > 0 {
  3485. return invalidParams
  3486. }
  3487. return nil
  3488. }
  3489. // The returned result of the corresponding request.
  3490. type ListTagsForResourceOutput struct {
  3491. _ struct{} `type:"structure" payload:"Tags"`
  3492. // A complex type that contains zero or more Tag elements.
  3493. Tags *Tags `type:"structure" required:"true"`
  3494. }
  3495. // String returns the string representation
  3496. func (s ListTagsForResourceOutput) String() string {
  3497. return awsutil.Prettify(s)
  3498. }
  3499. // GoString returns the string representation
  3500. func (s ListTagsForResourceOutput) GoString() string {
  3501. return s.String()
  3502. }
  3503. // A complex type that controls whether access logs are written for the distribution.
  3504. type LoggingConfig struct {
  3505. _ struct{} `type:"structure"`
  3506. // The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com.
  3507. Bucket *string `type:"string" required:"true"`
  3508. // Specifies whether you want CloudFront to save access logs to an Amazon S3
  3509. // bucket. If you do not want to enable logging when you create a distribution
  3510. // or if you want to disable logging for an existing distribution, specify false
  3511. // for Enabled, and specify empty Bucket and Prefix elements. If you specify
  3512. // false for Enabled but you specify values for Bucket, prefix and IncludeCookies,
  3513. // the values are automatically deleted.
  3514. Enabled *bool `type:"boolean" required:"true"`
  3515. // Specifies whether you want CloudFront to include cookies in access logs,
  3516. // specify true for IncludeCookies. If you choose to include cookies in logs,
  3517. // CloudFront logs all cookies regardless of how you configure the cache behaviors
  3518. // for this distribution. If you do not want to include cookies when you create
  3519. // a distribution or if you want to disable include cookies for an existing
  3520. // distribution, specify false for IncludeCookies.
  3521. IncludeCookies *bool `type:"boolean" required:"true"`
  3522. // An optional string that you want CloudFront to prefix to the access log filenames
  3523. // for this distribution, for example, myprefix/. If you want to enable logging,
  3524. // but you do not want to specify a prefix, you still must include an empty
  3525. // Prefix element in the Logging element.
  3526. Prefix *string `type:"string" required:"true"`
  3527. }
  3528. // String returns the string representation
  3529. func (s LoggingConfig) String() string {
  3530. return awsutil.Prettify(s)
  3531. }
  3532. // GoString returns the string representation
  3533. func (s LoggingConfig) GoString() string {
  3534. return s.String()
  3535. }
  3536. // Validate inspects the fields of the type to determine if they are valid.
  3537. func (s *LoggingConfig) Validate() error {
  3538. invalidParams := request.ErrInvalidParams{Context: "LoggingConfig"}
  3539. if s.Bucket == nil {
  3540. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  3541. }
  3542. if s.Enabled == nil {
  3543. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  3544. }
  3545. if s.IncludeCookies == nil {
  3546. invalidParams.Add(request.NewErrParamRequired("IncludeCookies"))
  3547. }
  3548. if s.Prefix == nil {
  3549. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  3550. }
  3551. if invalidParams.Len() > 0 {
  3552. return invalidParams
  3553. }
  3554. return nil
  3555. }
  3556. // A complex type that describes the Amazon S3 bucket or the HTTP server (for
  3557. // example, a web server) from which CloudFront gets your files.You must create
  3558. // at least one origin.
  3559. type Origin struct {
  3560. _ struct{} `type:"structure"`
  3561. // A complex type that contains information about the custom headers associated
  3562. // with this Origin.
  3563. CustomHeaders *CustomHeaders `type:"structure"`
  3564. // A complex type that contains information about a custom origin. If the origin
  3565. // is an Amazon S3 bucket, use the S3OriginConfig element instead.
  3566. CustomOriginConfig *CustomOriginConfig `type:"structure"`
  3567. // Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want
  3568. // CloudFront to get objects for this origin, for example, myawsbucket.s3.amazonaws.com.
  3569. // Custom origins: The DNS domain name for the HTTP server from which you want
  3570. // CloudFront to get objects for this origin, for example, www.example.com.
  3571. DomainName *string `type:"string" required:"true"`
  3572. // A unique identifier for the origin. The value of Id must be unique within
  3573. // the distribution. You use the value of Id when you create a cache behavior.
  3574. // The Id identifies the origin that CloudFront routes a request to when the
  3575. // request matches the path pattern for that cache behavior.
  3576. Id *string `type:"string" required:"true"`
  3577. // An optional element that causes CloudFront to request your content from a
  3578. // directory in your Amazon S3 bucket or your custom origin. When you include
  3579. // the OriginPath element, specify the directory name, beginning with a /. CloudFront
  3580. // appends the directory name to the value of DomainName.
  3581. OriginPath *string `type:"string"`
  3582. // A complex type that contains information about the Amazon S3 origin. If the
  3583. // origin is a custom origin, use the CustomOriginConfig element instead.
  3584. S3OriginConfig *S3OriginConfig `type:"structure"`
  3585. }
  3586. // String returns the string representation
  3587. func (s Origin) String() string {
  3588. return awsutil.Prettify(s)
  3589. }
  3590. // GoString returns the string representation
  3591. func (s Origin) GoString() string {
  3592. return s.String()
  3593. }
  3594. // Validate inspects the fields of the type to determine if they are valid.
  3595. func (s *Origin) Validate() error {
  3596. invalidParams := request.ErrInvalidParams{Context: "Origin"}
  3597. if s.DomainName == nil {
  3598. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  3599. }
  3600. if s.Id == nil {
  3601. invalidParams.Add(request.NewErrParamRequired("Id"))
  3602. }
  3603. if s.CustomHeaders != nil {
  3604. if err := s.CustomHeaders.Validate(); err != nil {
  3605. invalidParams.AddNested("CustomHeaders", err.(request.ErrInvalidParams))
  3606. }
  3607. }
  3608. if s.CustomOriginConfig != nil {
  3609. if err := s.CustomOriginConfig.Validate(); err != nil {
  3610. invalidParams.AddNested("CustomOriginConfig", err.(request.ErrInvalidParams))
  3611. }
  3612. }
  3613. if s.S3OriginConfig != nil {
  3614. if err := s.S3OriginConfig.Validate(); err != nil {
  3615. invalidParams.AddNested("S3OriginConfig", err.(request.ErrInvalidParams))
  3616. }
  3617. }
  3618. if invalidParams.Len() > 0 {
  3619. return invalidParams
  3620. }
  3621. return nil
  3622. }
  3623. // CloudFront origin access identity.
  3624. type OriginAccessIdentity struct {
  3625. _ struct{} `type:"structure"`
  3626. // The current configuration information for the identity.
  3627. CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `type:"structure"`
  3628. // The ID for the origin access identity. For example: E74FTE3AJFJ256A.
  3629. Id *string `type:"string" required:"true"`
  3630. // The Amazon S3 canonical user ID for the origin access identity, which you
  3631. // use when giving the origin access identity read permission to an object in
  3632. // Amazon S3.
  3633. S3CanonicalUserId *string `type:"string" required:"true"`
  3634. }
  3635. // String returns the string representation
  3636. func (s OriginAccessIdentity) String() string {
  3637. return awsutil.Prettify(s)
  3638. }
  3639. // GoString returns the string representation
  3640. func (s OriginAccessIdentity) GoString() string {
  3641. return s.String()
  3642. }
  3643. // Origin access identity configuration.
  3644. type OriginAccessIdentityConfig struct {
  3645. _ struct{} `type:"structure"`
  3646. // A unique number that ensures the request can't be replayed. If the CallerReference
  3647. // is new (no matter the content of the CloudFrontOriginAccessIdentityConfig
  3648. // object), a new origin access identity is created. If the CallerReference
  3649. // is a value you already sent in a previous request to create an identity,
  3650. // and the content of the CloudFrontOriginAccessIdentityConfig is identical
  3651. // to the original request (ignoring white space), the response includes the
  3652. // same information returned to the original request. If the CallerReference
  3653. // is a value you already sent in a previous request to create an identity but
  3654. // the content of the CloudFrontOriginAccessIdentityConfig is different from
  3655. // the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists
  3656. // error.
  3657. CallerReference *string `type:"string" required:"true"`
  3658. // Any comments you want to include about the origin access identity.
  3659. Comment *string `type:"string" required:"true"`
  3660. }
  3661. // String returns the string representation
  3662. func (s OriginAccessIdentityConfig) String() string {
  3663. return awsutil.Prettify(s)
  3664. }
  3665. // GoString returns the string representation
  3666. func (s OriginAccessIdentityConfig) GoString() string {
  3667. return s.String()
  3668. }
  3669. // Validate inspects the fields of the type to determine if they are valid.
  3670. func (s *OriginAccessIdentityConfig) Validate() error {
  3671. invalidParams := request.ErrInvalidParams{Context: "OriginAccessIdentityConfig"}
  3672. if s.CallerReference == nil {
  3673. invalidParams.Add(request.NewErrParamRequired("CallerReference"))
  3674. }
  3675. if s.Comment == nil {
  3676. invalidParams.Add(request.NewErrParamRequired("Comment"))
  3677. }
  3678. if invalidParams.Len() > 0 {
  3679. return invalidParams
  3680. }
  3681. return nil
  3682. }
  3683. // The CloudFrontOriginAccessIdentityList type.
  3684. type OriginAccessIdentityList struct {
  3685. _ struct{} `type:"structure"`
  3686. // A flag that indicates whether more origin access identities remain to be
  3687. // listed. If your results were truncated, you can make a follow-up pagination
  3688. // request using the Marker request parameter to retrieve more items in the
  3689. // list.
  3690. IsTruncated *bool `type:"boolean" required:"true"`
  3691. // A complex type that contains one CloudFrontOriginAccessIdentitySummary element
  3692. // for each origin access identity that was created by the current AWS account.
  3693. Items []*OriginAccessIdentitySummary `locationNameList:"CloudFrontOriginAccessIdentitySummary" type:"list"`
  3694. // The value you provided for the Marker request parameter.
  3695. Marker *string `type:"string" required:"true"`
  3696. // The value you provided for the MaxItems request parameter.
  3697. MaxItems *int64 `type:"integer" required:"true"`
  3698. // If IsTruncated is true, this element is present and contains the value you
  3699. // can use for the Marker request parameter to continue listing your origin
  3700. // access identities where they left off.
  3701. NextMarker *string `type:"string"`
  3702. // The number of CloudFront origin access identities that were created by the
  3703. // current AWS account.
  3704. Quantity *int64 `type:"integer" required:"true"`
  3705. }
  3706. // String returns the string representation
  3707. func (s OriginAccessIdentityList) String() string {
  3708. return awsutil.Prettify(s)
  3709. }
  3710. // GoString returns the string representation
  3711. func (s OriginAccessIdentityList) GoString() string {
  3712. return s.String()
  3713. }
  3714. // Summary of the information about a CloudFront origin access identity.
  3715. type OriginAccessIdentitySummary struct {
  3716. _ struct{} `type:"structure"`
  3717. // The comment for this origin access identity, as originally specified when
  3718. // created.
  3719. Comment *string `type:"string" required:"true"`
  3720. // The ID for the origin access identity. For example: E74FTE3AJFJ256A.
  3721. Id *string `type:"string" required:"true"`
  3722. // The Amazon S3 canonical user ID for the origin access identity, which you
  3723. // use when giving the origin access identity read permission to an object in
  3724. // Amazon S3.
  3725. S3CanonicalUserId *string `type:"string" required:"true"`
  3726. }
  3727. // String returns the string representation
  3728. func (s OriginAccessIdentitySummary) String() string {
  3729. return awsutil.Prettify(s)
  3730. }
  3731. // GoString returns the string representation
  3732. func (s OriginAccessIdentitySummary) GoString() string {
  3733. return s.String()
  3734. }
  3735. // A complex type that contains information related to a Header
  3736. type OriginCustomHeader struct {
  3737. _ struct{} `type:"structure"`
  3738. // The header's name.
  3739. HeaderName *string `type:"string" required:"true"`
  3740. // The header's value.
  3741. HeaderValue *string `type:"string" required:"true"`
  3742. }
  3743. // String returns the string representation
  3744. func (s OriginCustomHeader) String() string {
  3745. return awsutil.Prettify(s)
  3746. }
  3747. // GoString returns the string representation
  3748. func (s OriginCustomHeader) GoString() string {
  3749. return s.String()
  3750. }
  3751. // Validate inspects the fields of the type to determine if they are valid.
  3752. func (s *OriginCustomHeader) Validate() error {
  3753. invalidParams := request.ErrInvalidParams{Context: "OriginCustomHeader"}
  3754. if s.HeaderName == nil {
  3755. invalidParams.Add(request.NewErrParamRequired("HeaderName"))
  3756. }
  3757. if s.HeaderValue == nil {
  3758. invalidParams.Add(request.NewErrParamRequired("HeaderValue"))
  3759. }
  3760. if invalidParams.Len() > 0 {
  3761. return invalidParams
  3762. }
  3763. return nil
  3764. }
  3765. // A complex type that contains the list of SSL/TLS protocols that you want
  3766. // CloudFront to use when communicating with your origin over HTTPS.
  3767. type OriginSslProtocols struct {
  3768. _ struct{} `type:"structure"`
  3769. // A complex type that contains one SslProtocol element for each SSL/TLS protocol
  3770. // that you want to allow CloudFront to use when establishing an HTTPS connection
  3771. // with this origin.
  3772. Items []*string `locationNameList:"SslProtocol" type:"list" required:"true"`
  3773. // The number of SSL/TLS protocols that you want to allow CloudFront to use
  3774. // when establishing an HTTPS connection with this origin.
  3775. Quantity *int64 `type:"integer" required:"true"`
  3776. }
  3777. // String returns the string representation
  3778. func (s OriginSslProtocols) String() string {
  3779. return awsutil.Prettify(s)
  3780. }
  3781. // GoString returns the string representation
  3782. func (s OriginSslProtocols) GoString() string {
  3783. return s.String()
  3784. }
  3785. // Validate inspects the fields of the type to determine if they are valid.
  3786. func (s *OriginSslProtocols) Validate() error {
  3787. invalidParams := request.ErrInvalidParams{Context: "OriginSslProtocols"}
  3788. if s.Items == nil {
  3789. invalidParams.Add(request.NewErrParamRequired("Items"))
  3790. }
  3791. if s.Quantity == nil {
  3792. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  3793. }
  3794. if invalidParams.Len() > 0 {
  3795. return invalidParams
  3796. }
  3797. return nil
  3798. }
  3799. // A complex type that contains information about origins for this distribution.
  3800. type Origins struct {
  3801. _ struct{} `type:"structure"`
  3802. // A complex type that contains origins for this distribution.
  3803. Items []*Origin `locationNameList:"Origin" min:"1" type:"list"`
  3804. // The number of origins for this distribution.
  3805. Quantity *int64 `type:"integer" required:"true"`
  3806. }
  3807. // String returns the string representation
  3808. func (s Origins) String() string {
  3809. return awsutil.Prettify(s)
  3810. }
  3811. // GoString returns the string representation
  3812. func (s Origins) GoString() string {
  3813. return s.String()
  3814. }
  3815. // Validate inspects the fields of the type to determine if they are valid.
  3816. func (s *Origins) Validate() error {
  3817. invalidParams := request.ErrInvalidParams{Context: "Origins"}
  3818. if s.Items != nil && len(s.Items) < 1 {
  3819. invalidParams.Add(request.NewErrParamMinLen("Items", 1))
  3820. }
  3821. if s.Quantity == nil {
  3822. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  3823. }
  3824. if s.Items != nil {
  3825. for i, v := range s.Items {
  3826. if v == nil {
  3827. continue
  3828. }
  3829. if err := v.Validate(); err != nil {
  3830. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  3831. }
  3832. }
  3833. }
  3834. if invalidParams.Len() > 0 {
  3835. return invalidParams
  3836. }
  3837. return nil
  3838. }
  3839. // A complex type that contains information about the objects that you want
  3840. // to invalidate.
  3841. type Paths struct {
  3842. _ struct{} `type:"structure"`
  3843. // A complex type that contains a list of the objects that you want to invalidate.
  3844. Items []*string `locationNameList:"Path" type:"list"`
  3845. // The number of objects that you want to invalidate.
  3846. Quantity *int64 `type:"integer" required:"true"`
  3847. }
  3848. // String returns the string representation
  3849. func (s Paths) String() string {
  3850. return awsutil.Prettify(s)
  3851. }
  3852. // GoString returns the string representation
  3853. func (s Paths) GoString() string {
  3854. return s.String()
  3855. }
  3856. // Validate inspects the fields of the type to determine if they are valid.
  3857. func (s *Paths) Validate() error {
  3858. invalidParams := request.ErrInvalidParams{Context: "Paths"}
  3859. if s.Quantity == nil {
  3860. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  3861. }
  3862. if invalidParams.Len() > 0 {
  3863. return invalidParams
  3864. }
  3865. return nil
  3866. }
  3867. // A complex type that identifies ways in which you want to restrict distribution
  3868. // of your content.
  3869. type Restrictions struct {
  3870. _ struct{} `type:"structure"`
  3871. // A complex type that controls the countries in which your content is distributed.
  3872. // For more information about geo restriction, go to Customizing Error Responses
  3873. // in the Amazon CloudFront Developer Guide. CloudFront determines the location
  3874. // of your users using MaxMind GeoIP databases. For information about the accuracy
  3875. // of these databases, see How accurate are your GeoIP databases? on the MaxMind
  3876. // website.
  3877. GeoRestriction *GeoRestriction `type:"structure" required:"true"`
  3878. }
  3879. // String returns the string representation
  3880. func (s Restrictions) String() string {
  3881. return awsutil.Prettify(s)
  3882. }
  3883. // GoString returns the string representation
  3884. func (s Restrictions) GoString() string {
  3885. return s.String()
  3886. }
  3887. // Validate inspects the fields of the type to determine if they are valid.
  3888. func (s *Restrictions) Validate() error {
  3889. invalidParams := request.ErrInvalidParams{Context: "Restrictions"}
  3890. if s.GeoRestriction == nil {
  3891. invalidParams.Add(request.NewErrParamRequired("GeoRestriction"))
  3892. }
  3893. if s.GeoRestriction != nil {
  3894. if err := s.GeoRestriction.Validate(); err != nil {
  3895. invalidParams.AddNested("GeoRestriction", err.(request.ErrInvalidParams))
  3896. }
  3897. }
  3898. if invalidParams.Len() > 0 {
  3899. return invalidParams
  3900. }
  3901. return nil
  3902. }
  3903. // A complex type that contains information about the Amazon S3 bucket from
  3904. // which you want CloudFront to get your media files for distribution.
  3905. type S3Origin struct {
  3906. _ struct{} `type:"structure"`
  3907. // The DNS name of the S3 origin.
  3908. DomainName *string `type:"string" required:"true"`
  3909. // Your S3 origin's origin access identity.
  3910. OriginAccessIdentity *string `type:"string" required:"true"`
  3911. }
  3912. // String returns the string representation
  3913. func (s S3Origin) String() string {
  3914. return awsutil.Prettify(s)
  3915. }
  3916. // GoString returns the string representation
  3917. func (s S3Origin) GoString() string {
  3918. return s.String()
  3919. }
  3920. // Validate inspects the fields of the type to determine if they are valid.
  3921. func (s *S3Origin) Validate() error {
  3922. invalidParams := request.ErrInvalidParams{Context: "S3Origin"}
  3923. if s.DomainName == nil {
  3924. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  3925. }
  3926. if s.OriginAccessIdentity == nil {
  3927. invalidParams.Add(request.NewErrParamRequired("OriginAccessIdentity"))
  3928. }
  3929. if invalidParams.Len() > 0 {
  3930. return invalidParams
  3931. }
  3932. return nil
  3933. }
  3934. // A complex type that contains information about the Amazon S3 origin. If the
  3935. // origin is a custom origin, use the CustomOriginConfig element instead.
  3936. type S3OriginConfig struct {
  3937. _ struct{} `type:"structure"`
  3938. // The CloudFront origin access identity to associate with the origin. Use an
  3939. // origin access identity to configure the origin so that end users can only
  3940. // access objects in an Amazon S3 bucket through CloudFront. If you want end
  3941. // users to be able to access objects using either the CloudFront URL or the
  3942. // Amazon S3 URL, specify an empty OriginAccessIdentity element. To delete the
  3943. // origin access identity from an existing distribution, update the distribution
  3944. // configuration and include an empty OriginAccessIdentity element. To replace
  3945. // the origin access identity, update the distribution configuration and specify
  3946. // the new origin access identity. Use the format origin-access-identity/cloudfront/Id
  3947. // where Id is the value that CloudFront returned in the Id element when you
  3948. // created the origin access identity.
  3949. OriginAccessIdentity *string `type:"string" required:"true"`
  3950. }
  3951. // String returns the string representation
  3952. func (s S3OriginConfig) String() string {
  3953. return awsutil.Prettify(s)
  3954. }
  3955. // GoString returns the string representation
  3956. func (s S3OriginConfig) GoString() string {
  3957. return s.String()
  3958. }
  3959. // Validate inspects the fields of the type to determine if they are valid.
  3960. func (s *S3OriginConfig) Validate() error {
  3961. invalidParams := request.ErrInvalidParams{Context: "S3OriginConfig"}
  3962. if s.OriginAccessIdentity == nil {
  3963. invalidParams.Add(request.NewErrParamRequired("OriginAccessIdentity"))
  3964. }
  3965. if invalidParams.Len() > 0 {
  3966. return invalidParams
  3967. }
  3968. return nil
  3969. }
  3970. // A complex type that lists the AWS accounts that were included in the TrustedSigners
  3971. // complex type, as well as their active CloudFront key pair IDs, if any.
  3972. type Signer struct {
  3973. _ struct{} `type:"structure"`
  3974. // Specifies an AWS account that can create signed URLs. Values: self, which
  3975. // indicates that the AWS account that was used to create the distribution can
  3976. // created signed URLs, or an AWS account number. Omit the dashes in the account
  3977. // number.
  3978. AwsAccountNumber *string `type:"string"`
  3979. // A complex type that lists the active CloudFront key pairs, if any, that are
  3980. // associated with AwsAccountNumber.
  3981. KeyPairIds *KeyPairIds `type:"structure"`
  3982. }
  3983. // String returns the string representation
  3984. func (s Signer) String() string {
  3985. return awsutil.Prettify(s)
  3986. }
  3987. // GoString returns the string representation
  3988. func (s Signer) GoString() string {
  3989. return s.String()
  3990. }
  3991. // A streaming distribution.
  3992. type StreamingDistribution struct {
  3993. _ struct{} `type:"structure"`
  3994. // The ARN (Amazon Resource Name) for the streaming distribution. For example:
  3995. // arn:aws:cloudfront::123456789012:streaming-distribution/EDFDVBD632BHDS5,
  3996. // where 123456789012 is your AWS account Id.
  3997. ARN *string `type:"string" required:"true"`
  3998. // CloudFront automatically adds this element to the response only if you've
  3999. // set up the distribution to serve private content with signed URLs. The element
  4000. // lists the key pair IDs that CloudFront is aware of for each trusted signer.
  4001. // The Signer child element lists the AWS account number of the trusted signer
  4002. // (or an empty Self element if the signer is you). The Signer element also
  4003. // includes the IDs of any active key pairs associated with the trusted signer's
  4004. // AWS account. If no KeyPairId element appears for a Signer, that signer can't
  4005. // create working signed URLs.
  4006. ActiveTrustedSigners *ActiveTrustedSigners `type:"structure" required:"true"`
  4007. // The domain name corresponding to the streaming distribution. For example:
  4008. // s5c39gqb8ow64r.cloudfront.net.
  4009. DomainName *string `type:"string" required:"true"`
  4010. // The identifier for the streaming distribution. For example: EGTXBD79H29TRA8.
  4011. Id *string `type:"string" required:"true"`
  4012. // The date and time the distribution was last modified.
  4013. LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  4014. // The current status of the streaming distribution. When the status is Deployed,
  4015. // the distribution's information is fully propagated throughout the Amazon
  4016. // CloudFront system.
  4017. Status *string `type:"string" required:"true"`
  4018. // The current configuration information for the streaming distribution.
  4019. StreamingDistributionConfig *StreamingDistributionConfig `type:"structure" required:"true"`
  4020. }
  4021. // String returns the string representation
  4022. func (s StreamingDistribution) String() string {
  4023. return awsutil.Prettify(s)
  4024. }
  4025. // GoString returns the string representation
  4026. func (s StreamingDistribution) GoString() string {
  4027. return s.String()
  4028. }
  4029. // The configuration for the streaming distribution.
  4030. type StreamingDistributionConfig struct {
  4031. _ struct{} `type:"structure"`
  4032. // A complex type that contains information about CNAMEs (alternate domain names),
  4033. // if any, for this streaming distribution.
  4034. Aliases *Aliases `type:"structure"`
  4035. // A unique number that ensures the request can't be replayed. If the CallerReference
  4036. // is new (no matter the content of the StreamingDistributionConfig object),
  4037. // a new streaming distribution is created. If the CallerReference is a value
  4038. // you already sent in a previous request to create a streaming distribution,
  4039. // and the content of the StreamingDistributionConfig is identical to the original
  4040. // request (ignoring white space), the response includes the same information
  4041. // returned to the original request. If the CallerReference is a value you already
  4042. // sent in a previous request to create a streaming distribution but the content
  4043. // of the StreamingDistributionConfig is different from the original request,
  4044. // CloudFront returns a DistributionAlreadyExists error.
  4045. CallerReference *string `type:"string" required:"true"`
  4046. // Any comments you want to include about the streaming distribution.
  4047. Comment *string `type:"string" required:"true"`
  4048. // Whether the streaming distribution is enabled to accept end user requests
  4049. // for content.
  4050. Enabled *bool `type:"boolean" required:"true"`
  4051. // A complex type that controls whether access logs are written for the streaming
  4052. // distribution.
  4053. Logging *StreamingLoggingConfig `type:"structure"`
  4054. // A complex type that contains information about price class for this streaming
  4055. // distribution.
  4056. PriceClass *string `type:"string" enum:"PriceClass"`
  4057. // A complex type that contains information about the Amazon S3 bucket from
  4058. // which you want CloudFront to get your media files for distribution.
  4059. S3Origin *S3Origin `type:"structure" required:"true"`
  4060. // A complex type that specifies the AWS accounts, if any, that you want to
  4061. // allow to create signed URLs for private content. If you want to require signed
  4062. // URLs in requests for objects in the target origin that match the PathPattern
  4063. // for this cache behavior, specify true for Enabled, and specify the applicable
  4064. // values for Quantity and Items. For more information, go to Using a Signed
  4065. // URL to Serve Private Content in the Amazon CloudFront Developer Guide. If
  4066. // you don't want to require signed URLs in requests for objects that match
  4067. // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items. To
  4068. // add, change, or remove one or more trusted signers, change Enabled to true
  4069. // (if it's currently false), change Quantity as applicable, and specify all
  4070. // of the trusted signers that you want to include in the updated distribution.
  4071. TrustedSigners *TrustedSigners `type:"structure" required:"true"`
  4072. }
  4073. // String returns the string representation
  4074. func (s StreamingDistributionConfig) String() string {
  4075. return awsutil.Prettify(s)
  4076. }
  4077. // GoString returns the string representation
  4078. func (s StreamingDistributionConfig) GoString() string {
  4079. return s.String()
  4080. }
  4081. // Validate inspects the fields of the type to determine if they are valid.
  4082. func (s *StreamingDistributionConfig) Validate() error {
  4083. invalidParams := request.ErrInvalidParams{Context: "StreamingDistributionConfig"}
  4084. if s.CallerReference == nil {
  4085. invalidParams.Add(request.NewErrParamRequired("CallerReference"))
  4086. }
  4087. if s.Comment == nil {
  4088. invalidParams.Add(request.NewErrParamRequired("Comment"))
  4089. }
  4090. if s.Enabled == nil {
  4091. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  4092. }
  4093. if s.S3Origin == nil {
  4094. invalidParams.Add(request.NewErrParamRequired("S3Origin"))
  4095. }
  4096. if s.TrustedSigners == nil {
  4097. invalidParams.Add(request.NewErrParamRequired("TrustedSigners"))
  4098. }
  4099. if s.Aliases != nil {
  4100. if err := s.Aliases.Validate(); err != nil {
  4101. invalidParams.AddNested("Aliases", err.(request.ErrInvalidParams))
  4102. }
  4103. }
  4104. if s.Logging != nil {
  4105. if err := s.Logging.Validate(); err != nil {
  4106. invalidParams.AddNested("Logging", err.(request.ErrInvalidParams))
  4107. }
  4108. }
  4109. if s.S3Origin != nil {
  4110. if err := s.S3Origin.Validate(); err != nil {
  4111. invalidParams.AddNested("S3Origin", err.(request.ErrInvalidParams))
  4112. }
  4113. }
  4114. if s.TrustedSigners != nil {
  4115. if err := s.TrustedSigners.Validate(); err != nil {
  4116. invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams))
  4117. }
  4118. }
  4119. if invalidParams.Len() > 0 {
  4120. return invalidParams
  4121. }
  4122. return nil
  4123. }
  4124. // A streaming distribution Configuration and a list of tags to be associated
  4125. // with the streaming distribution.
  4126. type StreamingDistributionConfigWithTags struct {
  4127. _ struct{} `type:"structure"`
  4128. // A streaming distribution Configuration.
  4129. StreamingDistributionConfig *StreamingDistributionConfig `type:"structure" required:"true"`
  4130. // A complex type that contains zero or more Tag elements.
  4131. Tags *Tags `type:"structure" required:"true"`
  4132. }
  4133. // String returns the string representation
  4134. func (s StreamingDistributionConfigWithTags) String() string {
  4135. return awsutil.Prettify(s)
  4136. }
  4137. // GoString returns the string representation
  4138. func (s StreamingDistributionConfigWithTags) GoString() string {
  4139. return s.String()
  4140. }
  4141. // Validate inspects the fields of the type to determine if they are valid.
  4142. func (s *StreamingDistributionConfigWithTags) Validate() error {
  4143. invalidParams := request.ErrInvalidParams{Context: "StreamingDistributionConfigWithTags"}
  4144. if s.StreamingDistributionConfig == nil {
  4145. invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig"))
  4146. }
  4147. if s.Tags == nil {
  4148. invalidParams.Add(request.NewErrParamRequired("Tags"))
  4149. }
  4150. if s.StreamingDistributionConfig != nil {
  4151. if err := s.StreamingDistributionConfig.Validate(); err != nil {
  4152. invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams))
  4153. }
  4154. }
  4155. if s.Tags != nil {
  4156. if err := s.Tags.Validate(); err != nil {
  4157. invalidParams.AddNested("Tags", err.(request.ErrInvalidParams))
  4158. }
  4159. }
  4160. if invalidParams.Len() > 0 {
  4161. return invalidParams
  4162. }
  4163. return nil
  4164. }
  4165. // A streaming distribution list.
  4166. type StreamingDistributionList struct {
  4167. _ struct{} `type:"structure"`
  4168. // A flag that indicates whether more streaming distributions remain to be listed.
  4169. // If your results were truncated, you can make a follow-up pagination request
  4170. // using the Marker request parameter to retrieve more distributions in the
  4171. // list.
  4172. IsTruncated *bool `type:"boolean" required:"true"`
  4173. // A complex type that contains one StreamingDistributionSummary element for
  4174. // each distribution that was created by the current AWS account.
  4175. Items []*StreamingDistributionSummary `locationNameList:"StreamingDistributionSummary" type:"list"`
  4176. // The value you provided for the Marker request parameter.
  4177. Marker *string `type:"string" required:"true"`
  4178. // The value you provided for the MaxItems request parameter.
  4179. MaxItems *int64 `type:"integer" required:"true"`
  4180. // If IsTruncated is true, this element is present and contains the value you
  4181. // can use for the Marker request parameter to continue listing your streaming
  4182. // distributions where they left off.
  4183. NextMarker *string `type:"string"`
  4184. // The number of streaming distributions that were created by the current AWS
  4185. // account.
  4186. Quantity *int64 `type:"integer" required:"true"`
  4187. }
  4188. // String returns the string representation
  4189. func (s StreamingDistributionList) String() string {
  4190. return awsutil.Prettify(s)
  4191. }
  4192. // GoString returns the string representation
  4193. func (s StreamingDistributionList) GoString() string {
  4194. return s.String()
  4195. }
  4196. // A summary of the information for an Amazon CloudFront streaming distribution.
  4197. type StreamingDistributionSummary struct {
  4198. _ struct{} `type:"structure"`
  4199. // The ARN (Amazon Resource Name) for the streaming distribution. For example:
  4200. // arn:aws:cloudfront::123456789012:streaming-distribution/EDFDVBD632BHDS5,
  4201. // where 123456789012 is your AWS account Id.
  4202. ARN *string `type:"string" required:"true"`
  4203. // A complex type that contains information about CNAMEs (alternate domain names),
  4204. // if any, for this streaming distribution.
  4205. Aliases *Aliases `type:"structure" required:"true"`
  4206. // The comment originally specified when this distribution was created.
  4207. Comment *string `type:"string" required:"true"`
  4208. // The domain name corresponding to the distribution. For example: d604721fxaaqy9.cloudfront.net.
  4209. DomainName *string `type:"string" required:"true"`
  4210. // Whether the distribution is enabled to accept end user requests for content.
  4211. Enabled *bool `type:"boolean" required:"true"`
  4212. // The identifier for the distribution. For example: EDFDVBD632BHDS5.
  4213. Id *string `type:"string" required:"true"`
  4214. // The date and time the distribution was last modified.
  4215. LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
  4216. PriceClass *string `type:"string" required:"true" enum:"PriceClass"`
  4217. // A complex type that contains information about the Amazon S3 bucket from
  4218. // which you want CloudFront to get your media files for distribution.
  4219. S3Origin *S3Origin `type:"structure" required:"true"`
  4220. // Indicates the current status of the distribution. When the status is Deployed,
  4221. // the distribution's information is fully propagated throughout the Amazon
  4222. // CloudFront system.
  4223. Status *string `type:"string" required:"true"`
  4224. // A complex type that specifies the AWS accounts, if any, that you want to
  4225. // allow to create signed URLs for private content. If you want to require signed
  4226. // URLs in requests for objects in the target origin that match the PathPattern
  4227. // for this cache behavior, specify true for Enabled, and specify the applicable
  4228. // values for Quantity and Items. For more information, go to Using a Signed
  4229. // URL to Serve Private Content in the Amazon CloudFront Developer Guide. If
  4230. // you don't want to require signed URLs in requests for objects that match
  4231. // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items. To
  4232. // add, change, or remove one or more trusted signers, change Enabled to true
  4233. // (if it's currently false), change Quantity as applicable, and specify all
  4234. // of the trusted signers that you want to include in the updated distribution.
  4235. TrustedSigners *TrustedSigners `type:"structure" required:"true"`
  4236. }
  4237. // String returns the string representation
  4238. func (s StreamingDistributionSummary) String() string {
  4239. return awsutil.Prettify(s)
  4240. }
  4241. // GoString returns the string representation
  4242. func (s StreamingDistributionSummary) GoString() string {
  4243. return s.String()
  4244. }
  4245. // A complex type that controls whether access logs are written for this streaming
  4246. // distribution.
  4247. type StreamingLoggingConfig struct {
  4248. _ struct{} `type:"structure"`
  4249. // The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com.
  4250. Bucket *string `type:"string" required:"true"`
  4251. // Specifies whether you want CloudFront to save access logs to an Amazon S3
  4252. // bucket. If you do not want to enable logging when you create a streaming
  4253. // distribution or if you want to disable logging for an existing streaming
  4254. // distribution, specify false for Enabled, and specify empty Bucket and Prefix
  4255. // elements. If you specify false for Enabled but you specify values for Bucket
  4256. // and Prefix, the values are automatically deleted.
  4257. Enabled *bool `type:"boolean" required:"true"`
  4258. // An optional string that you want CloudFront to prefix to the access log filenames
  4259. // for this streaming distribution, for example, myprefix/. If you want to enable
  4260. // logging, but you do not want to specify a prefix, you still must include
  4261. // an empty Prefix element in the Logging element.
  4262. Prefix *string `type:"string" required:"true"`
  4263. }
  4264. // String returns the string representation
  4265. func (s StreamingLoggingConfig) String() string {
  4266. return awsutil.Prettify(s)
  4267. }
  4268. // GoString returns the string representation
  4269. func (s StreamingLoggingConfig) GoString() string {
  4270. return s.String()
  4271. }
  4272. // Validate inspects the fields of the type to determine if they are valid.
  4273. func (s *StreamingLoggingConfig) Validate() error {
  4274. invalidParams := request.ErrInvalidParams{Context: "StreamingLoggingConfig"}
  4275. if s.Bucket == nil {
  4276. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4277. }
  4278. if s.Enabled == nil {
  4279. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  4280. }
  4281. if s.Prefix == nil {
  4282. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  4283. }
  4284. if invalidParams.Len() > 0 {
  4285. return invalidParams
  4286. }
  4287. return nil
  4288. }
  4289. // A complex type that contains Tag key and Tag value.
  4290. type Tag struct {
  4291. _ struct{} `type:"structure"`
  4292. // A string that contains Tag key. The string length should be between 1 and
  4293. // 128 characters. Valid characters include a-z, A-Z, 0-9, space, and the special
  4294. // characters _ - . : / = + @.
  4295. Key *string `min:"1" type:"string" required:"true"`
  4296. // A string that contains an optional Tag value. The string length should be
  4297. // between 0 and 256 characters. Valid characters include a-z, A-Z, 0-9, space,
  4298. // and the special characters _ - . : / = + @.
  4299. Value *string `type:"string"`
  4300. }
  4301. // String returns the string representation
  4302. func (s Tag) String() string {
  4303. return awsutil.Prettify(s)
  4304. }
  4305. // GoString returns the string representation
  4306. func (s Tag) GoString() string {
  4307. return s.String()
  4308. }
  4309. // Validate inspects the fields of the type to determine if they are valid.
  4310. func (s *Tag) Validate() error {
  4311. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  4312. if s.Key == nil {
  4313. invalidParams.Add(request.NewErrParamRequired("Key"))
  4314. }
  4315. if s.Key != nil && len(*s.Key) < 1 {
  4316. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  4317. }
  4318. if invalidParams.Len() > 0 {
  4319. return invalidParams
  4320. }
  4321. return nil
  4322. }
  4323. // A complex type that contains zero or more Tag elements.
  4324. type TagKeys struct {
  4325. _ struct{} `type:"structure"`
  4326. // A complex type that contains Tag key elements
  4327. Items []*string `locationNameList:"Key" type:"list"`
  4328. }
  4329. // String returns the string representation
  4330. func (s TagKeys) String() string {
  4331. return awsutil.Prettify(s)
  4332. }
  4333. // GoString returns the string representation
  4334. func (s TagKeys) GoString() string {
  4335. return s.String()
  4336. }
  4337. // The request to add tags to a CloudFront resource.
  4338. type TagResourceInput struct {
  4339. _ struct{} `type:"structure" payload:"Tags"`
  4340. // An ARN of a CloudFront resource.
  4341. Resource *string `location:"querystring" locationName:"Resource" type:"string" required:"true"`
  4342. // A complex type that contains zero or more Tag elements.
  4343. Tags *Tags `locationName:"Tags" type:"structure" required:"true"`
  4344. }
  4345. // String returns the string representation
  4346. func (s TagResourceInput) String() string {
  4347. return awsutil.Prettify(s)
  4348. }
  4349. // GoString returns the string representation
  4350. func (s TagResourceInput) GoString() string {
  4351. return s.String()
  4352. }
  4353. // Validate inspects the fields of the type to determine if they are valid.
  4354. func (s *TagResourceInput) Validate() error {
  4355. invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
  4356. if s.Resource == nil {
  4357. invalidParams.Add(request.NewErrParamRequired("Resource"))
  4358. }
  4359. if s.Tags == nil {
  4360. invalidParams.Add(request.NewErrParamRequired("Tags"))
  4361. }
  4362. if s.Tags != nil {
  4363. if err := s.Tags.Validate(); err != nil {
  4364. invalidParams.AddNested("Tags", err.(request.ErrInvalidParams))
  4365. }
  4366. }
  4367. if invalidParams.Len() > 0 {
  4368. return invalidParams
  4369. }
  4370. return nil
  4371. }
  4372. type TagResourceOutput struct {
  4373. _ struct{} `type:"structure"`
  4374. }
  4375. // String returns the string representation
  4376. func (s TagResourceOutput) String() string {
  4377. return awsutil.Prettify(s)
  4378. }
  4379. // GoString returns the string representation
  4380. func (s TagResourceOutput) GoString() string {
  4381. return s.String()
  4382. }
  4383. // A complex type that contains zero or more Tag elements.
  4384. type Tags struct {
  4385. _ struct{} `type:"structure"`
  4386. // A complex type that contains Tag elements
  4387. Items []*Tag `locationNameList:"Tag" type:"list"`
  4388. }
  4389. // String returns the string representation
  4390. func (s Tags) String() string {
  4391. return awsutil.Prettify(s)
  4392. }
  4393. // GoString returns the string representation
  4394. func (s Tags) GoString() string {
  4395. return s.String()
  4396. }
  4397. // Validate inspects the fields of the type to determine if they are valid.
  4398. func (s *Tags) Validate() error {
  4399. invalidParams := request.ErrInvalidParams{Context: "Tags"}
  4400. if s.Items != nil {
  4401. for i, v := range s.Items {
  4402. if v == nil {
  4403. continue
  4404. }
  4405. if err := v.Validate(); err != nil {
  4406. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  4407. }
  4408. }
  4409. }
  4410. if invalidParams.Len() > 0 {
  4411. return invalidParams
  4412. }
  4413. return nil
  4414. }
  4415. // A complex type that specifies the AWS accounts, if any, that you want to
  4416. // allow to create signed URLs for private content. If you want to require signed
  4417. // URLs in requests for objects in the target origin that match the PathPattern
  4418. // for this cache behavior, specify true for Enabled, and specify the applicable
  4419. // values for Quantity and Items. For more information, go to Using a Signed
  4420. // URL to Serve Private Content in the Amazon CloudFront Developer Guide. If
  4421. // you don't want to require signed URLs in requests for objects that match
  4422. // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items. To
  4423. // add, change, or remove one or more trusted signers, change Enabled to true
  4424. // (if it's currently false), change Quantity as applicable, and specify all
  4425. // of the trusted signers that you want to include in the updated distribution.
  4426. type TrustedSigners struct {
  4427. _ struct{} `type:"structure"`
  4428. // Specifies whether you want to require end users to use signed URLs to access
  4429. // the files specified by PathPattern and TargetOriginId.
  4430. Enabled *bool `type:"boolean" required:"true"`
  4431. // Optional: A complex type that contains trusted signers for this cache behavior.
  4432. // If Quantity is 0, you can omit Items.
  4433. Items []*string `locationNameList:"AwsAccountNumber" type:"list"`
  4434. // The number of trusted signers for this cache behavior.
  4435. Quantity *int64 `type:"integer" required:"true"`
  4436. }
  4437. // String returns the string representation
  4438. func (s TrustedSigners) String() string {
  4439. return awsutil.Prettify(s)
  4440. }
  4441. // GoString returns the string representation
  4442. func (s TrustedSigners) GoString() string {
  4443. return s.String()
  4444. }
  4445. // Validate inspects the fields of the type to determine if they are valid.
  4446. func (s *TrustedSigners) Validate() error {
  4447. invalidParams := request.ErrInvalidParams{Context: "TrustedSigners"}
  4448. if s.Enabled == nil {
  4449. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  4450. }
  4451. if s.Quantity == nil {
  4452. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  4453. }
  4454. if invalidParams.Len() > 0 {
  4455. return invalidParams
  4456. }
  4457. return nil
  4458. }
  4459. // The request to remove tags from a CloudFront resource.
  4460. type UntagResourceInput struct {
  4461. _ struct{} `type:"structure" payload:"TagKeys"`
  4462. // An ARN of a CloudFront resource.
  4463. Resource *string `location:"querystring" locationName:"Resource" type:"string" required:"true"`
  4464. // A complex type that contains zero or more Tag key elements.
  4465. TagKeys *TagKeys `locationName:"TagKeys" type:"structure" required:"true"`
  4466. }
  4467. // String returns the string representation
  4468. func (s UntagResourceInput) String() string {
  4469. return awsutil.Prettify(s)
  4470. }
  4471. // GoString returns the string representation
  4472. func (s UntagResourceInput) GoString() string {
  4473. return s.String()
  4474. }
  4475. // Validate inspects the fields of the type to determine if they are valid.
  4476. func (s *UntagResourceInput) Validate() error {
  4477. invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
  4478. if s.Resource == nil {
  4479. invalidParams.Add(request.NewErrParamRequired("Resource"))
  4480. }
  4481. if s.TagKeys == nil {
  4482. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  4483. }
  4484. if invalidParams.Len() > 0 {
  4485. return invalidParams
  4486. }
  4487. return nil
  4488. }
  4489. type UntagResourceOutput struct {
  4490. _ struct{} `type:"structure"`
  4491. }
  4492. // String returns the string representation
  4493. func (s UntagResourceOutput) String() string {
  4494. return awsutil.Prettify(s)
  4495. }
  4496. // GoString returns the string representation
  4497. func (s UntagResourceOutput) GoString() string {
  4498. return s.String()
  4499. }
  4500. // The request to update an origin access identity.
  4501. type UpdateCloudFrontOriginAccessIdentityInput struct {
  4502. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"`
  4503. // The identity's configuration information.
  4504. CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true"`
  4505. // The identity's id.
  4506. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  4507. // The value of the ETag header you received when retrieving the identity's
  4508. // configuration. For example: E2QWRUHAPOMQZL.
  4509. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  4510. }
  4511. // String returns the string representation
  4512. func (s UpdateCloudFrontOriginAccessIdentityInput) String() string {
  4513. return awsutil.Prettify(s)
  4514. }
  4515. // GoString returns the string representation
  4516. func (s UpdateCloudFrontOriginAccessIdentityInput) GoString() string {
  4517. return s.String()
  4518. }
  4519. // Validate inspects the fields of the type to determine if they are valid.
  4520. func (s *UpdateCloudFrontOriginAccessIdentityInput) Validate() error {
  4521. invalidParams := request.ErrInvalidParams{Context: "UpdateCloudFrontOriginAccessIdentityInput"}
  4522. if s.CloudFrontOriginAccessIdentityConfig == nil {
  4523. invalidParams.Add(request.NewErrParamRequired("CloudFrontOriginAccessIdentityConfig"))
  4524. }
  4525. if s.Id == nil {
  4526. invalidParams.Add(request.NewErrParamRequired("Id"))
  4527. }
  4528. if s.CloudFrontOriginAccessIdentityConfig != nil {
  4529. if err := s.CloudFrontOriginAccessIdentityConfig.Validate(); err != nil {
  4530. invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(request.ErrInvalidParams))
  4531. }
  4532. }
  4533. if invalidParams.Len() > 0 {
  4534. return invalidParams
  4535. }
  4536. return nil
  4537. }
  4538. // The returned result of the corresponding request.
  4539. type UpdateCloudFrontOriginAccessIdentityOutput struct {
  4540. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"`
  4541. // The origin access identity's information.
  4542. CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"`
  4543. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  4544. ETag *string `location:"header" locationName:"ETag" type:"string"`
  4545. }
  4546. // String returns the string representation
  4547. func (s UpdateCloudFrontOriginAccessIdentityOutput) String() string {
  4548. return awsutil.Prettify(s)
  4549. }
  4550. // GoString returns the string representation
  4551. func (s UpdateCloudFrontOriginAccessIdentityOutput) GoString() string {
  4552. return s.String()
  4553. }
  4554. // The request to update a distribution.
  4555. type UpdateDistributionInput struct {
  4556. _ struct{} `type:"structure" payload:"DistributionConfig"`
  4557. // The distribution's configuration information.
  4558. DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true"`
  4559. // The distribution's id.
  4560. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  4561. // The value of the ETag header you received when retrieving the distribution's
  4562. // configuration. For example: E2QWRUHAPOMQZL.
  4563. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  4564. }
  4565. // String returns the string representation
  4566. func (s UpdateDistributionInput) String() string {
  4567. return awsutil.Prettify(s)
  4568. }
  4569. // GoString returns the string representation
  4570. func (s UpdateDistributionInput) GoString() string {
  4571. return s.String()
  4572. }
  4573. // Validate inspects the fields of the type to determine if they are valid.
  4574. func (s *UpdateDistributionInput) Validate() error {
  4575. invalidParams := request.ErrInvalidParams{Context: "UpdateDistributionInput"}
  4576. if s.DistributionConfig == nil {
  4577. invalidParams.Add(request.NewErrParamRequired("DistributionConfig"))
  4578. }
  4579. if s.Id == nil {
  4580. invalidParams.Add(request.NewErrParamRequired("Id"))
  4581. }
  4582. if s.DistributionConfig != nil {
  4583. if err := s.DistributionConfig.Validate(); err != nil {
  4584. invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams))
  4585. }
  4586. }
  4587. if invalidParams.Len() > 0 {
  4588. return invalidParams
  4589. }
  4590. return nil
  4591. }
  4592. // The returned result of the corresponding request.
  4593. type UpdateDistributionOutput struct {
  4594. _ struct{} `type:"structure" payload:"Distribution"`
  4595. // The distribution's information.
  4596. Distribution *Distribution `type:"structure"`
  4597. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  4598. ETag *string `location:"header" locationName:"ETag" type:"string"`
  4599. }
  4600. // String returns the string representation
  4601. func (s UpdateDistributionOutput) String() string {
  4602. return awsutil.Prettify(s)
  4603. }
  4604. // GoString returns the string representation
  4605. func (s UpdateDistributionOutput) GoString() string {
  4606. return s.String()
  4607. }
  4608. // The request to update a streaming distribution.
  4609. type UpdateStreamingDistributionInput struct {
  4610. _ struct{} `type:"structure" payload:"StreamingDistributionConfig"`
  4611. // The streaming distribution's id.
  4612. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  4613. // The value of the ETag header you received when retrieving the streaming distribution's
  4614. // configuration. For example: E2QWRUHAPOMQZL.
  4615. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  4616. // The streaming distribution's configuration information.
  4617. StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true"`
  4618. }
  4619. // String returns the string representation
  4620. func (s UpdateStreamingDistributionInput) String() string {
  4621. return awsutil.Prettify(s)
  4622. }
  4623. // GoString returns the string representation
  4624. func (s UpdateStreamingDistributionInput) GoString() string {
  4625. return s.String()
  4626. }
  4627. // Validate inspects the fields of the type to determine if they are valid.
  4628. func (s *UpdateStreamingDistributionInput) Validate() error {
  4629. invalidParams := request.ErrInvalidParams{Context: "UpdateStreamingDistributionInput"}
  4630. if s.Id == nil {
  4631. invalidParams.Add(request.NewErrParamRequired("Id"))
  4632. }
  4633. if s.StreamingDistributionConfig == nil {
  4634. invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig"))
  4635. }
  4636. if s.StreamingDistributionConfig != nil {
  4637. if err := s.StreamingDistributionConfig.Validate(); err != nil {
  4638. invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams))
  4639. }
  4640. }
  4641. if invalidParams.Len() > 0 {
  4642. return invalidParams
  4643. }
  4644. return nil
  4645. }
  4646. // The returned result of the corresponding request.
  4647. type UpdateStreamingDistributionOutput struct {
  4648. _ struct{} `type:"structure" payload:"StreamingDistribution"`
  4649. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  4650. ETag *string `location:"header" locationName:"ETag" type:"string"`
  4651. // The streaming distribution's information.
  4652. StreamingDistribution *StreamingDistribution `type:"structure"`
  4653. }
  4654. // String returns the string representation
  4655. func (s UpdateStreamingDistributionOutput) String() string {
  4656. return awsutil.Prettify(s)
  4657. }
  4658. // GoString returns the string representation
  4659. func (s UpdateStreamingDistributionOutput) GoString() string {
  4660. return s.String()
  4661. }
  4662. // A complex type that contains information about viewer certificates for this
  4663. // distribution.
  4664. type ViewerCertificate struct {
  4665. _ struct{} `type:"structure"`
  4666. // If you want viewers to use HTTPS to request your objects and you're using
  4667. // an alternate domain name in your object URLs (for example, https://example.com/logo.jpg),
  4668. // specify the ACM certificate ARN of the custom viewer certificate for this
  4669. // distribution. Specify either this value, IAMCertificateId, or CloudFrontDefaultCertificate.
  4670. ACMCertificateArn *string `type:"string"`
  4671. // Note: this field is deprecated. Please use one of [ACMCertificateArn, IAMCertificateId,
  4672. // CloudFrontDefaultCertificate].
  4673. Certificate *string `deprecated:"true" type:"string"`
  4674. // Note: this field is deprecated. Please use one of [ACMCertificateArn, IAMCertificateId,
  4675. // CloudFrontDefaultCertificate].
  4676. CertificateSource *string `deprecated:"true" type:"string" enum:"CertificateSource"`
  4677. // If you want viewers to use HTTPS to request your objects and you're using
  4678. // the CloudFront domain name of your distribution in your object URLs (for
  4679. // example, https://d111111abcdef8.cloudfront.net/logo.jpg), set to true. Omit
  4680. // this value if you are setting an ACMCertificateArn or IAMCertificateId.
  4681. CloudFrontDefaultCertificate *bool `type:"boolean"`
  4682. // If you want viewers to use HTTPS to request your objects and you're using
  4683. // an alternate domain name in your object URLs (for example, https://example.com/logo.jpg),
  4684. // specify the IAM certificate identifier of the custom viewer certificate for
  4685. // this distribution. Specify either this value, ACMCertificateArn, or CloudFrontDefaultCertificate.
  4686. IAMCertificateId *string `type:"string"`
  4687. // Specify the minimum version of the SSL protocol that you want CloudFront
  4688. // to use, SSLv3 or TLSv1, for HTTPS connections. CloudFront will serve your
  4689. // objects only to browsers or devices that support at least the SSL version
  4690. // that you specify. The TLSv1 protocol is more secure, so we recommend that
  4691. // you specify SSLv3 only if your users are using browsers or devices that don't
  4692. // support TLSv1. If you're using a custom certificate (if you specify a value
  4693. // for IAMCertificateId) and if you're using dedicated IP (if you specify vip
  4694. // for SSLSupportMethod), you can choose SSLv3 or TLSv1 as the MinimumProtocolVersion.
  4695. // If you're using a custom certificate (if you specify a value for IAMCertificateId)
  4696. // and if you're using SNI (if you specify sni-only for SSLSupportMethod), you
  4697. // must specify TLSv1 for MinimumProtocolVersion.
  4698. MinimumProtocolVersion *string `type:"string" enum:"MinimumProtocolVersion"`
  4699. // If you specify a value for IAMCertificateId, you must also specify how you
  4700. // want CloudFront to serve HTTPS requests. Valid values are vip and sni-only.
  4701. // If you specify vip, CloudFront uses dedicated IP addresses for your content
  4702. // and can respond to HTTPS requests from any viewer. However, you must request
  4703. // permission to use this feature, and you incur additional monthly charges.
  4704. // If you specify sni-only, CloudFront can only respond to HTTPS requests from
  4705. // viewers that support Server Name Indication (SNI). All modern browsers support
  4706. // SNI, but some browsers still in use don't support SNI. Do not specify a value
  4707. // for SSLSupportMethod if you specified true for CloudFrontDefaultCertificate.
  4708. SSLSupportMethod *string `type:"string" enum:"SSLSupportMethod"`
  4709. }
  4710. // String returns the string representation
  4711. func (s ViewerCertificate) String() string {
  4712. return awsutil.Prettify(s)
  4713. }
  4714. // GoString returns the string representation
  4715. func (s ViewerCertificate) GoString() string {
  4716. return s.String()
  4717. }
  4718. const (
  4719. // @enum CertificateSource
  4720. CertificateSourceCloudfront = "cloudfront"
  4721. // @enum CertificateSource
  4722. CertificateSourceIam = "iam"
  4723. // @enum CertificateSource
  4724. CertificateSourceAcm = "acm"
  4725. )
  4726. const (
  4727. // @enum GeoRestrictionType
  4728. GeoRestrictionTypeBlacklist = "blacklist"
  4729. // @enum GeoRestrictionType
  4730. GeoRestrictionTypeWhitelist = "whitelist"
  4731. // @enum GeoRestrictionType
  4732. GeoRestrictionTypeNone = "none"
  4733. )
  4734. const (
  4735. // @enum ItemSelection
  4736. ItemSelectionNone = "none"
  4737. // @enum ItemSelection
  4738. ItemSelectionWhitelist = "whitelist"
  4739. // @enum ItemSelection
  4740. ItemSelectionAll = "all"
  4741. )
  4742. const (
  4743. // @enum Method
  4744. MethodGet = "GET"
  4745. // @enum Method
  4746. MethodHead = "HEAD"
  4747. // @enum Method
  4748. MethodPost = "POST"
  4749. // @enum Method
  4750. MethodPut = "PUT"
  4751. // @enum Method
  4752. MethodPatch = "PATCH"
  4753. // @enum Method
  4754. MethodOptions = "OPTIONS"
  4755. // @enum Method
  4756. MethodDelete = "DELETE"
  4757. )
  4758. const (
  4759. // @enum MinimumProtocolVersion
  4760. MinimumProtocolVersionSslv3 = "SSLv3"
  4761. // @enum MinimumProtocolVersion
  4762. MinimumProtocolVersionTlsv1 = "TLSv1"
  4763. )
  4764. const (
  4765. // @enum OriginProtocolPolicy
  4766. OriginProtocolPolicyHttpOnly = "http-only"
  4767. // @enum OriginProtocolPolicy
  4768. OriginProtocolPolicyMatchViewer = "match-viewer"
  4769. // @enum OriginProtocolPolicy
  4770. OriginProtocolPolicyHttpsOnly = "https-only"
  4771. )
  4772. const (
  4773. // @enum PriceClass
  4774. PriceClassPriceClass100 = "PriceClass_100"
  4775. // @enum PriceClass
  4776. PriceClassPriceClass200 = "PriceClass_200"
  4777. // @enum PriceClass
  4778. PriceClassPriceClassAll = "PriceClass_All"
  4779. )
  4780. const (
  4781. // @enum SSLSupportMethod
  4782. SSLSupportMethodSniOnly = "sni-only"
  4783. // @enum SSLSupportMethod
  4784. SSLSupportMethodVip = "vip"
  4785. )
  4786. const (
  4787. // @enum SslProtocol
  4788. SslProtocolSslv3 = "SSLv3"
  4789. // @enum SslProtocol
  4790. SslProtocolTlsv1 = "TLSv1"
  4791. // @enum SslProtocol
  4792. SslProtocolTlsv11 = "TLSv1.1"
  4793. // @enum SslProtocol
  4794. SslProtocolTlsv12 = "TLSv1.2"
  4795. )
  4796. const (
  4797. // @enum ViewerProtocolPolicy
  4798. ViewerProtocolPolicyAllowAll = "allow-all"
  4799. // @enum ViewerProtocolPolicy
  4800. ViewerProtocolPolicyHttpsOnly = "https-only"
  4801. // @enum ViewerProtocolPolicy
  4802. ViewerProtocolPolicyRedirectToHttps = "redirect-to-https"
  4803. )