api.go 275 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831
  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_09_29"
  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. // See CreateCloudFrontOriginAccessIdentity for usage and error information.
  19. //
  20. // Creating a request object using this method should be used when you want to inject
  21. // custom logic into the request's lifecycle using a custom handler, or if you want to
  22. // access properties on the request object before or after sending the request. If
  23. // you just want the service response, call the CreateCloudFrontOriginAccessIdentity method directly
  24. // instead.
  25. //
  26. // Note: You must call the "Send" method on the returned request object in order
  27. // to execute the request.
  28. //
  29. // // Example sending a request using the CreateCloudFrontOriginAccessIdentityRequest method.
  30. // req, resp := client.CreateCloudFrontOriginAccessIdentityRequest(params)
  31. //
  32. // err := req.Send()
  33. // if err == nil { // resp is now filled
  34. // fmt.Println(resp)
  35. // }
  36. //
  37. func (c *CloudFront) CreateCloudFrontOriginAccessIdentityRequest(input *CreateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *CreateCloudFrontOriginAccessIdentityOutput) {
  38. op := &request.Operation{
  39. Name: opCreateCloudFrontOriginAccessIdentity,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/2016-09-29/origin-access-identity/cloudfront",
  42. }
  43. if input == nil {
  44. input = &CreateCloudFrontOriginAccessIdentityInput{}
  45. }
  46. req = c.newRequest(op, input, output)
  47. output = &CreateCloudFrontOriginAccessIdentityOutput{}
  48. req.Data = output
  49. return
  50. }
  51. // CreateCloudFrontOriginAccessIdentity API operation for Amazon CloudFront.
  52. //
  53. // Creates a new origin access identity. If you're using Amazon S3 for your
  54. // origin, you can use an origin access identity to require users to access
  55. // your content using a CloudFront URL instead of the Amazon S3 URL. For more
  56. // information about how to use origin access identities, see Serving Private
  57. // Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
  58. // in the Amazon CloudFront Developer Guide.
  59. //
  60. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  61. // with awserr.Error's Code and Message methods to get detailed information about
  62. // the error.
  63. //
  64. // See the AWS API reference guide for Amazon CloudFront's
  65. // API operation CreateCloudFrontOriginAccessIdentity for usage and error information.
  66. //
  67. // Returned Error Codes:
  68. // * OriginAccessIdentityAlreadyExists
  69. // If the CallerReference is a value you already sent in a previous request
  70. // to create an identity but the content of the CloudFrontOriginAccessIdentityConfig
  71. // is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists
  72. // error.
  73. //
  74. // * MissingBody
  75. // This operation requires a body. Ensure that the body is present and the Content-Type
  76. // header is set.
  77. //
  78. // * TooManyCloudFrontOriginAccessIdentities
  79. // Processing your request would cause you to exceed the maximum number of origin
  80. // access identities allowed.
  81. //
  82. // * InvalidArgument
  83. // The argument is invalid.
  84. //
  85. // * InconsistentQuantities
  86. // The value of Quantity and the size of Items do not match.
  87. //
  88. func (c *CloudFront) CreateCloudFrontOriginAccessIdentity(input *CreateCloudFrontOriginAccessIdentityInput) (*CreateCloudFrontOriginAccessIdentityOutput, error) {
  89. req, out := c.CreateCloudFrontOriginAccessIdentityRequest(input)
  90. err := req.Send()
  91. return out, err
  92. }
  93. const opCreateDistribution = "CreateDistribution2016_09_29"
  94. // CreateDistributionRequest generates a "aws/request.Request" representing the
  95. // client's request for the CreateDistribution operation. The "output" return
  96. // value can be used to capture response data after the request's "Send" method
  97. // is called.
  98. //
  99. // See CreateDistribution for usage and error information.
  100. //
  101. // Creating a request object using this method should be used when you want to inject
  102. // custom logic into the request's lifecycle using a custom handler, or if you want to
  103. // access properties on the request object before or after sending the request. If
  104. // you just want the service response, call the CreateDistribution method directly
  105. // instead.
  106. //
  107. // Note: You must call the "Send" method on the returned request object in order
  108. // to execute the request.
  109. //
  110. // // Example sending a request using the CreateDistributionRequest method.
  111. // req, resp := client.CreateDistributionRequest(params)
  112. //
  113. // err := req.Send()
  114. // if err == nil { // resp is now filled
  115. // fmt.Println(resp)
  116. // }
  117. //
  118. func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) (req *request.Request, output *CreateDistributionOutput) {
  119. op := &request.Operation{
  120. Name: opCreateDistribution,
  121. HTTPMethod: "POST",
  122. HTTPPath: "/2016-09-29/distribution",
  123. }
  124. if input == nil {
  125. input = &CreateDistributionInput{}
  126. }
  127. req = c.newRequest(op, input, output)
  128. output = &CreateDistributionOutput{}
  129. req.Data = output
  130. return
  131. }
  132. // CreateDistribution API operation for Amazon CloudFront.
  133. //
  134. // Creates a new web distribution. Send a GET request to the /CloudFront API
  135. // version/distribution/distribution ID resource.
  136. //
  137. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  138. // with awserr.Error's Code and Message methods to get detailed information about
  139. // the error.
  140. //
  141. // See the AWS API reference guide for Amazon CloudFront's
  142. // API operation CreateDistribution for usage and error information.
  143. //
  144. // Returned Error Codes:
  145. // * CNAMEAlreadyExists
  146. //
  147. // * DistributionAlreadyExists
  148. // The caller reference you attempted to create the distribution with is associated
  149. // with another distribution.
  150. //
  151. // * InvalidOrigin
  152. // The Amazon S3 origin server specified does not refer to a valid Amazon S3
  153. // bucket.
  154. //
  155. // * InvalidOriginAccessIdentity
  156. // The origin access identity is not valid or doesn't exist.
  157. //
  158. // * AccessDenied
  159. // Access denied.
  160. //
  161. // * TooManyTrustedSigners
  162. // Your request contains more trusted signers than are allowed per distribution.
  163. //
  164. // * TrustedSignerDoesNotExist
  165. // One or more of your trusted signers do not exist.
  166. //
  167. // * InvalidViewerCertificate
  168. //
  169. // * InvalidMinimumProtocolVersion
  170. //
  171. // * MissingBody
  172. // This operation requires a body. Ensure that the body is present and the Content-Type
  173. // header is set.
  174. //
  175. // * TooManyDistributionCNAMEs
  176. // Your request contains more CNAMEs than are allowed per distribution.
  177. //
  178. // * TooManyDistributions
  179. // Processing your request would cause you to exceed the maximum number of distributions
  180. // allowed.
  181. //
  182. // * InvalidDefaultRootObject
  183. // The default root object file name is too big or contains an invalid character.
  184. //
  185. // * InvalidRelativePath
  186. // The relative path is too big, is not URL-encoded, or does not begin with
  187. // a slash (/).
  188. //
  189. // * InvalidErrorCode
  190. //
  191. // * InvalidResponseCode
  192. //
  193. // * InvalidArgument
  194. // The argument is invalid.
  195. //
  196. // * InvalidRequiredProtocol
  197. // This operation requires the HTTPS protocol. Ensure that you specify the HTTPS
  198. // protocol in your request, or omit the RequiredProtocols element from your
  199. // distribution configuration.
  200. //
  201. // * NoSuchOrigin
  202. // No origin exists with the specified Origin Id.
  203. //
  204. // * TooManyOrigins
  205. // You cannot create more origins for the distribution.
  206. //
  207. // * TooManyCacheBehaviors
  208. // You cannot create more cache behaviors for the distribution.
  209. //
  210. // * TooManyCookieNamesInWhiteList
  211. // Your request contains more cookie names in the whitelist than are allowed
  212. // per cache behavior.
  213. //
  214. // * InvalidForwardCookies
  215. // Your request contains forward cookies option which doesn't match with the
  216. // expectation for the whitelisted list of cookie names. Either list of cookie
  217. // names has been specified when not allowed or list of cookie names is missing
  218. // when expected.
  219. //
  220. // * TooManyHeadersInForwardedValues
  221. //
  222. // * InvalidHeadersForS3Origin
  223. //
  224. // * InconsistentQuantities
  225. // The value of Quantity and the size of Items do not match.
  226. //
  227. // * TooManyCertificates
  228. // You cannot create anymore custom SSL/TLS certificates.
  229. //
  230. // * InvalidLocationCode
  231. //
  232. // * InvalidGeoRestrictionParameter
  233. //
  234. // * InvalidProtocolSettings
  235. // You cannot specify SSLv3 as the minimum protocol version if you only want
  236. // to support only clients that support Server Name Indication (SNI).
  237. //
  238. // * InvalidTTLOrder
  239. //
  240. // * InvalidWebACLId
  241. //
  242. // * TooManyOriginCustomHeaders
  243. //
  244. // * TooManyQueryStringParameters
  245. //
  246. // * InvalidQueryStringParameters
  247. //
  248. func (c *CloudFront) CreateDistribution(input *CreateDistributionInput) (*CreateDistributionOutput, error) {
  249. req, out := c.CreateDistributionRequest(input)
  250. err := req.Send()
  251. return out, err
  252. }
  253. const opCreateDistributionWithTags = "CreateDistributionWithTags2016_09_29"
  254. // CreateDistributionWithTagsRequest generates a "aws/request.Request" representing the
  255. // client's request for the CreateDistributionWithTags operation. The "output" return
  256. // value can be used to capture response data after the request's "Send" method
  257. // is called.
  258. //
  259. // See CreateDistributionWithTags for usage and error information.
  260. //
  261. // Creating a request object using this method should be used when you want to inject
  262. // custom logic into the request's lifecycle using a custom handler, or if you want to
  263. // access properties on the request object before or after sending the request. If
  264. // you just want the service response, call the CreateDistributionWithTags method directly
  265. // instead.
  266. //
  267. // Note: You must call the "Send" method on the returned request object in order
  268. // to execute the request.
  269. //
  270. // // Example sending a request using the CreateDistributionWithTagsRequest method.
  271. // req, resp := client.CreateDistributionWithTagsRequest(params)
  272. //
  273. // err := req.Send()
  274. // if err == nil { // resp is now filled
  275. // fmt.Println(resp)
  276. // }
  277. //
  278. func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistributionWithTagsInput) (req *request.Request, output *CreateDistributionWithTagsOutput) {
  279. op := &request.Operation{
  280. Name: opCreateDistributionWithTags,
  281. HTTPMethod: "POST",
  282. HTTPPath: "/2016-09-29/distribution?WithTags",
  283. }
  284. if input == nil {
  285. input = &CreateDistributionWithTagsInput{}
  286. }
  287. req = c.newRequest(op, input, output)
  288. output = &CreateDistributionWithTagsOutput{}
  289. req.Data = output
  290. return
  291. }
  292. // CreateDistributionWithTags API operation for Amazon CloudFront.
  293. //
  294. // Create a new distribution with tags.
  295. //
  296. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  297. // with awserr.Error's Code and Message methods to get detailed information about
  298. // the error.
  299. //
  300. // See the AWS API reference guide for Amazon CloudFront's
  301. // API operation CreateDistributionWithTags for usage and error information.
  302. //
  303. // Returned Error Codes:
  304. // * CNAMEAlreadyExists
  305. //
  306. // * DistributionAlreadyExists
  307. // The caller reference you attempted to create the distribution with is associated
  308. // with another distribution.
  309. //
  310. // * InvalidOrigin
  311. // The Amazon S3 origin server specified does not refer to a valid Amazon S3
  312. // bucket.
  313. //
  314. // * InvalidOriginAccessIdentity
  315. // The origin access identity is not valid or doesn't exist.
  316. //
  317. // * AccessDenied
  318. // Access denied.
  319. //
  320. // * TooManyTrustedSigners
  321. // Your request contains more trusted signers than are allowed per distribution.
  322. //
  323. // * TrustedSignerDoesNotExist
  324. // One or more of your trusted signers do not exist.
  325. //
  326. // * InvalidViewerCertificate
  327. //
  328. // * InvalidMinimumProtocolVersion
  329. //
  330. // * MissingBody
  331. // This operation requires a body. Ensure that the body is present and the Content-Type
  332. // header is set.
  333. //
  334. // * TooManyDistributionCNAMEs
  335. // Your request contains more CNAMEs than are allowed per distribution.
  336. //
  337. // * TooManyDistributions
  338. // Processing your request would cause you to exceed the maximum number of distributions
  339. // allowed.
  340. //
  341. // * InvalidDefaultRootObject
  342. // The default root object file name is too big or contains an invalid character.
  343. //
  344. // * InvalidRelativePath
  345. // The relative path is too big, is not URL-encoded, or does not begin with
  346. // a slash (/).
  347. //
  348. // * InvalidErrorCode
  349. //
  350. // * InvalidResponseCode
  351. //
  352. // * InvalidArgument
  353. // The argument is invalid.
  354. //
  355. // * InvalidRequiredProtocol
  356. // This operation requires the HTTPS protocol. Ensure that you specify the HTTPS
  357. // protocol in your request, or omit the RequiredProtocols element from your
  358. // distribution configuration.
  359. //
  360. // * NoSuchOrigin
  361. // No origin exists with the specified Origin Id.
  362. //
  363. // * TooManyOrigins
  364. // You cannot create more origins for the distribution.
  365. //
  366. // * TooManyCacheBehaviors
  367. // You cannot create more cache behaviors for the distribution.
  368. //
  369. // * TooManyCookieNamesInWhiteList
  370. // Your request contains more cookie names in the whitelist than are allowed
  371. // per cache behavior.
  372. //
  373. // * InvalidForwardCookies
  374. // Your request contains forward cookies option which doesn't match with the
  375. // expectation for the whitelisted list of cookie names. Either list of cookie
  376. // names has been specified when not allowed or list of cookie names is missing
  377. // when expected.
  378. //
  379. // * TooManyHeadersInForwardedValues
  380. //
  381. // * InvalidHeadersForS3Origin
  382. //
  383. // * InconsistentQuantities
  384. // The value of Quantity and the size of Items do not match.
  385. //
  386. // * TooManyCertificates
  387. // You cannot create anymore custom SSL/TLS certificates.
  388. //
  389. // * InvalidLocationCode
  390. //
  391. // * InvalidGeoRestrictionParameter
  392. //
  393. // * InvalidProtocolSettings
  394. // You cannot specify SSLv3 as the minimum protocol version if you only want
  395. // to support only clients that support Server Name Indication (SNI).
  396. //
  397. // * InvalidTTLOrder
  398. //
  399. // * InvalidWebACLId
  400. //
  401. // * TooManyOriginCustomHeaders
  402. //
  403. // * InvalidTagging
  404. //
  405. // * TooManyQueryStringParameters
  406. //
  407. // * InvalidQueryStringParameters
  408. //
  409. func (c *CloudFront) CreateDistributionWithTags(input *CreateDistributionWithTagsInput) (*CreateDistributionWithTagsOutput, error) {
  410. req, out := c.CreateDistributionWithTagsRequest(input)
  411. err := req.Send()
  412. return out, err
  413. }
  414. const opCreateInvalidation = "CreateInvalidation2016_09_29"
  415. // CreateInvalidationRequest generates a "aws/request.Request" representing the
  416. // client's request for the CreateInvalidation operation. The "output" return
  417. // value can be used to capture response data after the request's "Send" method
  418. // is called.
  419. //
  420. // See CreateInvalidation for usage and error information.
  421. //
  422. // Creating a request object using this method should be used when you want to inject
  423. // custom logic into the request's lifecycle using a custom handler, or if you want to
  424. // access properties on the request object before or after sending the request. If
  425. // you just want the service response, call the CreateInvalidation method directly
  426. // instead.
  427. //
  428. // Note: You must call the "Send" method on the returned request object in order
  429. // to execute the request.
  430. //
  431. // // Example sending a request using the CreateInvalidationRequest method.
  432. // req, resp := client.CreateInvalidationRequest(params)
  433. //
  434. // err := req.Send()
  435. // if err == nil { // resp is now filled
  436. // fmt.Println(resp)
  437. // }
  438. //
  439. func (c *CloudFront) CreateInvalidationRequest(input *CreateInvalidationInput) (req *request.Request, output *CreateInvalidationOutput) {
  440. op := &request.Operation{
  441. Name: opCreateInvalidation,
  442. HTTPMethod: "POST",
  443. HTTPPath: "/2016-09-29/distribution/{DistributionId}/invalidation",
  444. }
  445. if input == nil {
  446. input = &CreateInvalidationInput{}
  447. }
  448. req = c.newRequest(op, input, output)
  449. output = &CreateInvalidationOutput{}
  450. req.Data = output
  451. return
  452. }
  453. // CreateInvalidation API operation for Amazon CloudFront.
  454. //
  455. // Create a new invalidation.
  456. //
  457. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  458. // with awserr.Error's Code and Message methods to get detailed information about
  459. // the error.
  460. //
  461. // See the AWS API reference guide for Amazon CloudFront's
  462. // API operation CreateInvalidation for usage and error information.
  463. //
  464. // Returned Error Codes:
  465. // * AccessDenied
  466. // Access denied.
  467. //
  468. // * MissingBody
  469. // This operation requires a body. Ensure that the body is present and the Content-Type
  470. // header is set.
  471. //
  472. // * InvalidArgument
  473. // The argument is invalid.
  474. //
  475. // * NoSuchDistribution
  476. // The specified distribution does not exist.
  477. //
  478. // * BatchTooLarge
  479. //
  480. // * TooManyInvalidationsInProgress
  481. // You have exceeded the maximum number of allowable InProgress invalidation
  482. // batch requests, or invalidation objects.
  483. //
  484. // * InconsistentQuantities
  485. // The value of Quantity and the size of Items do not match.
  486. //
  487. func (c *CloudFront) CreateInvalidation(input *CreateInvalidationInput) (*CreateInvalidationOutput, error) {
  488. req, out := c.CreateInvalidationRequest(input)
  489. err := req.Send()
  490. return out, err
  491. }
  492. const opCreateStreamingDistribution = "CreateStreamingDistribution2016_09_29"
  493. // CreateStreamingDistributionRequest generates a "aws/request.Request" representing the
  494. // client's request for the CreateStreamingDistribution operation. The "output" return
  495. // value can be used to capture response data after the request's "Send" method
  496. // is called.
  497. //
  498. // See CreateStreamingDistribution for usage and error information.
  499. //
  500. // Creating a request object using this method should be used when you want to inject
  501. // custom logic into the request's lifecycle using a custom handler, or if you want to
  502. // access properties on the request object before or after sending the request. If
  503. // you just want the service response, call the CreateStreamingDistribution method directly
  504. // instead.
  505. //
  506. // Note: You must call the "Send" method on the returned request object in order
  507. // to execute the request.
  508. //
  509. // // Example sending a request using the CreateStreamingDistributionRequest method.
  510. // req, resp := client.CreateStreamingDistributionRequest(params)
  511. //
  512. // err := req.Send()
  513. // if err == nil { // resp is now filled
  514. // fmt.Println(resp)
  515. // }
  516. //
  517. func (c *CloudFront) CreateStreamingDistributionRequest(input *CreateStreamingDistributionInput) (req *request.Request, output *CreateStreamingDistributionOutput) {
  518. op := &request.Operation{
  519. Name: opCreateStreamingDistribution,
  520. HTTPMethod: "POST",
  521. HTTPPath: "/2016-09-29/streaming-distribution",
  522. }
  523. if input == nil {
  524. input = &CreateStreamingDistributionInput{}
  525. }
  526. req = c.newRequest(op, input, output)
  527. output = &CreateStreamingDistributionOutput{}
  528. req.Data = output
  529. return
  530. }
  531. // CreateStreamingDistribution API operation for Amazon CloudFront.
  532. //
  533. // Creates a new RMTP distribution. An RTMP distribution is similar to a web
  534. // distribution, but an RTMP distribution streams media files using the Adobe
  535. // Real-Time Messaging Protocol (RTMP) instead of serving files using HTTP.
  536. //
  537. // To create a new web distribution, submit a POST request to the CloudFront
  538. // API version/distribution resource. The request body must include a document
  539. // with a StreamingDistributionConfig element. The response echoes the StreamingDistributionConfig
  540. // element and returns other information about the RTMP distribution.
  541. //
  542. // To get the status of your request, use the GET StreamingDistribution API
  543. // action. When the value of Enabled is true and the value of Status is Deployed,
  544. // your distribution is ready. A distribution usually deploys in less than 15
  545. // minutes.
  546. //
  547. // For more information about web distributions, see Working with RTMP Distributions
  548. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-rtmp.html)
  549. // in the Amazon CloudFront Developer Guide.
  550. //
  551. // Beginning with the 2012-05-05 version of the CloudFront API, we made substantial
  552. // changes to the format of the XML document that you include in the request
  553. // body when you create or update a web distribution or an RTMP distribution,
  554. // and when you invalidate objects. With previous versions of the API, we discovered
  555. // that it was too easy to accidentally delete one or more values for an element
  556. // that accepts multiple values, for example, CNAMEs and trusted signers. Our
  557. // changes for the 2012-05-05 release are intended to prevent these accidental
  558. // deletions and to notify you when there's a mismatch between the number of
  559. // values you say you're specifying in the Quantity element and the number of
  560. // values specified.
  561. //
  562. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  563. // with awserr.Error's Code and Message methods to get detailed information about
  564. // the error.
  565. //
  566. // See the AWS API reference guide for Amazon CloudFront's
  567. // API operation CreateStreamingDistribution for usage and error information.
  568. //
  569. // Returned Error Codes:
  570. // * CNAMEAlreadyExists
  571. //
  572. // * StreamingDistributionAlreadyExists
  573. //
  574. // * InvalidOrigin
  575. // The Amazon S3 origin server specified does not refer to a valid Amazon S3
  576. // bucket.
  577. //
  578. // * InvalidOriginAccessIdentity
  579. // The origin access identity is not valid or doesn't exist.
  580. //
  581. // * AccessDenied
  582. // Access denied.
  583. //
  584. // * TooManyTrustedSigners
  585. // Your request contains more trusted signers than are allowed per distribution.
  586. //
  587. // * TrustedSignerDoesNotExist
  588. // One or more of your trusted signers do not exist.
  589. //
  590. // * MissingBody
  591. // This operation requires a body. Ensure that the body is present and the Content-Type
  592. // header is set.
  593. //
  594. // * TooManyStreamingDistributionCNAMEs
  595. //
  596. // * TooManyStreamingDistributions
  597. // Processing your request would cause you to exceed the maximum number of streaming
  598. // distributions allowed.
  599. //
  600. // * InvalidArgument
  601. // The argument is invalid.
  602. //
  603. // * InconsistentQuantities
  604. // The value of Quantity and the size of Items do not match.
  605. //
  606. func (c *CloudFront) CreateStreamingDistribution(input *CreateStreamingDistributionInput) (*CreateStreamingDistributionOutput, error) {
  607. req, out := c.CreateStreamingDistributionRequest(input)
  608. err := req.Send()
  609. return out, err
  610. }
  611. const opCreateStreamingDistributionWithTags = "CreateStreamingDistributionWithTags2016_09_29"
  612. // CreateStreamingDistributionWithTagsRequest generates a "aws/request.Request" representing the
  613. // client's request for the CreateStreamingDistributionWithTags operation. The "output" return
  614. // value can be used to capture response data after the request's "Send" method
  615. // is called.
  616. //
  617. // See CreateStreamingDistributionWithTags for usage and error information.
  618. //
  619. // Creating a request object using this method should be used when you want to inject
  620. // custom logic into the request's lifecycle using a custom handler, or if you want to
  621. // access properties on the request object before or after sending the request. If
  622. // you just want the service response, call the CreateStreamingDistributionWithTags method directly
  623. // instead.
  624. //
  625. // Note: You must call the "Send" method on the returned request object in order
  626. // to execute the request.
  627. //
  628. // // Example sending a request using the CreateStreamingDistributionWithTagsRequest method.
  629. // req, resp := client.CreateStreamingDistributionWithTagsRequest(params)
  630. //
  631. // err := req.Send()
  632. // if err == nil { // resp is now filled
  633. // fmt.Println(resp)
  634. // }
  635. //
  636. func (c *CloudFront) CreateStreamingDistributionWithTagsRequest(input *CreateStreamingDistributionWithTagsInput) (req *request.Request, output *CreateStreamingDistributionWithTagsOutput) {
  637. op := &request.Operation{
  638. Name: opCreateStreamingDistributionWithTags,
  639. HTTPMethod: "POST",
  640. HTTPPath: "/2016-09-29/streaming-distribution?WithTags",
  641. }
  642. if input == nil {
  643. input = &CreateStreamingDistributionWithTagsInput{}
  644. }
  645. req = c.newRequest(op, input, output)
  646. output = &CreateStreamingDistributionWithTagsOutput{}
  647. req.Data = output
  648. return
  649. }
  650. // CreateStreamingDistributionWithTags API operation for Amazon CloudFront.
  651. //
  652. // Create a new streaming distribution with tags.
  653. //
  654. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  655. // with awserr.Error's Code and Message methods to get detailed information about
  656. // the error.
  657. //
  658. // See the AWS API reference guide for Amazon CloudFront's
  659. // API operation CreateStreamingDistributionWithTags for usage and error information.
  660. //
  661. // Returned Error Codes:
  662. // * CNAMEAlreadyExists
  663. //
  664. // * StreamingDistributionAlreadyExists
  665. //
  666. // * InvalidOrigin
  667. // The Amazon S3 origin server specified does not refer to a valid Amazon S3
  668. // bucket.
  669. //
  670. // * InvalidOriginAccessIdentity
  671. // The origin access identity is not valid or doesn't exist.
  672. //
  673. // * AccessDenied
  674. // Access denied.
  675. //
  676. // * TooManyTrustedSigners
  677. // Your request contains more trusted signers than are allowed per distribution.
  678. //
  679. // * TrustedSignerDoesNotExist
  680. // One or more of your trusted signers do not exist.
  681. //
  682. // * MissingBody
  683. // This operation requires a body. Ensure that the body is present and the Content-Type
  684. // header is set.
  685. //
  686. // * TooManyStreamingDistributionCNAMEs
  687. //
  688. // * TooManyStreamingDistributions
  689. // Processing your request would cause you to exceed the maximum number of streaming
  690. // distributions allowed.
  691. //
  692. // * InvalidArgument
  693. // The argument is invalid.
  694. //
  695. // * InconsistentQuantities
  696. // The value of Quantity and the size of Items do not match.
  697. //
  698. // * InvalidTagging
  699. //
  700. func (c *CloudFront) CreateStreamingDistributionWithTags(input *CreateStreamingDistributionWithTagsInput) (*CreateStreamingDistributionWithTagsOutput, error) {
  701. req, out := c.CreateStreamingDistributionWithTagsRequest(input)
  702. err := req.Send()
  703. return out, err
  704. }
  705. const opDeleteCloudFrontOriginAccessIdentity = "DeleteCloudFrontOriginAccessIdentity2016_09_29"
  706. // DeleteCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the
  707. // client's request for the DeleteCloudFrontOriginAccessIdentity operation. The "output" return
  708. // value can be used to capture response data after the request's "Send" method
  709. // is called.
  710. //
  711. // See DeleteCloudFrontOriginAccessIdentity for usage and error information.
  712. //
  713. // Creating a request object using this method should be used when you want to inject
  714. // custom logic into the request's lifecycle using a custom handler, or if you want to
  715. // access properties on the request object before or after sending the request. If
  716. // you just want the service response, call the DeleteCloudFrontOriginAccessIdentity method directly
  717. // instead.
  718. //
  719. // Note: You must call the "Send" method on the returned request object in order
  720. // to execute the request.
  721. //
  722. // // Example sending a request using the DeleteCloudFrontOriginAccessIdentityRequest method.
  723. // req, resp := client.DeleteCloudFrontOriginAccessIdentityRequest(params)
  724. //
  725. // err := req.Send()
  726. // if err == nil { // resp is now filled
  727. // fmt.Println(resp)
  728. // }
  729. //
  730. func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityRequest(input *DeleteCloudFrontOriginAccessIdentityInput) (req *request.Request, output *DeleteCloudFrontOriginAccessIdentityOutput) {
  731. op := &request.Operation{
  732. Name: opDeleteCloudFrontOriginAccessIdentity,
  733. HTTPMethod: "DELETE",
  734. HTTPPath: "/2016-09-29/origin-access-identity/cloudfront/{Id}",
  735. }
  736. if input == nil {
  737. input = &DeleteCloudFrontOriginAccessIdentityInput{}
  738. }
  739. req = c.newRequest(op, input, output)
  740. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  741. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  742. output = &DeleteCloudFrontOriginAccessIdentityOutput{}
  743. req.Data = output
  744. return
  745. }
  746. // DeleteCloudFrontOriginAccessIdentity API operation for Amazon CloudFront.
  747. //
  748. // Delete an origin access identity.
  749. //
  750. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  751. // with awserr.Error's Code and Message methods to get detailed information about
  752. // the error.
  753. //
  754. // See the AWS API reference guide for Amazon CloudFront's
  755. // API operation DeleteCloudFrontOriginAccessIdentity for usage and error information.
  756. //
  757. // Returned Error Codes:
  758. // * AccessDenied
  759. // Access denied.
  760. //
  761. // * InvalidIfMatchVersion
  762. // The If-Match version is missing or not valid for the distribution.
  763. //
  764. // * NoSuchCloudFrontOriginAccessIdentity
  765. // The specified origin access identity does not exist.
  766. //
  767. // * PreconditionFailed
  768. // The precondition given in one or more of the request-header fields evaluated
  769. // to false.
  770. //
  771. // * OriginAccessIdentityInUse
  772. //
  773. func (c *CloudFront) DeleteCloudFrontOriginAccessIdentity(input *DeleteCloudFrontOriginAccessIdentityInput) (*DeleteCloudFrontOriginAccessIdentityOutput, error) {
  774. req, out := c.DeleteCloudFrontOriginAccessIdentityRequest(input)
  775. err := req.Send()
  776. return out, err
  777. }
  778. const opDeleteDistribution = "DeleteDistribution2016_09_29"
  779. // DeleteDistributionRequest generates a "aws/request.Request" representing the
  780. // client's request for the DeleteDistribution operation. The "output" return
  781. // value can be used to capture response data after the request's "Send" method
  782. // is called.
  783. //
  784. // See DeleteDistribution for usage and error information.
  785. //
  786. // Creating a request object using this method should be used when you want to inject
  787. // custom logic into the request's lifecycle using a custom handler, or if you want to
  788. // access properties on the request object before or after sending the request. If
  789. // you just want the service response, call the DeleteDistribution method directly
  790. // instead.
  791. //
  792. // Note: You must call the "Send" method on the returned request object in order
  793. // to execute the request.
  794. //
  795. // // Example sending a request using the DeleteDistributionRequest method.
  796. // req, resp := client.DeleteDistributionRequest(params)
  797. //
  798. // err := req.Send()
  799. // if err == nil { // resp is now filled
  800. // fmt.Println(resp)
  801. // }
  802. //
  803. func (c *CloudFront) DeleteDistributionRequest(input *DeleteDistributionInput) (req *request.Request, output *DeleteDistributionOutput) {
  804. op := &request.Operation{
  805. Name: opDeleteDistribution,
  806. HTTPMethod: "DELETE",
  807. HTTPPath: "/2016-09-29/distribution/{Id}",
  808. }
  809. if input == nil {
  810. input = &DeleteDistributionInput{}
  811. }
  812. req = c.newRequest(op, input, output)
  813. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  814. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  815. output = &DeleteDistributionOutput{}
  816. req.Data = output
  817. return
  818. }
  819. // DeleteDistribution API operation for Amazon CloudFront.
  820. //
  821. // Delete a distribution.
  822. //
  823. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  824. // with awserr.Error's Code and Message methods to get detailed information about
  825. // the error.
  826. //
  827. // See the AWS API reference guide for Amazon CloudFront's
  828. // API operation DeleteDistribution for usage and error information.
  829. //
  830. // Returned Error Codes:
  831. // * AccessDenied
  832. // Access denied.
  833. //
  834. // * DistributionNotDisabled
  835. //
  836. // * InvalidIfMatchVersion
  837. // The If-Match version is missing or not valid for the distribution.
  838. //
  839. // * NoSuchDistribution
  840. // The specified distribution does not exist.
  841. //
  842. // * PreconditionFailed
  843. // The precondition given in one or more of the request-header fields evaluated
  844. // to false.
  845. //
  846. func (c *CloudFront) DeleteDistribution(input *DeleteDistributionInput) (*DeleteDistributionOutput, error) {
  847. req, out := c.DeleteDistributionRequest(input)
  848. err := req.Send()
  849. return out, err
  850. }
  851. const opDeleteStreamingDistribution = "DeleteStreamingDistribution2016_09_29"
  852. // DeleteStreamingDistributionRequest generates a "aws/request.Request" representing the
  853. // client's request for the DeleteStreamingDistribution operation. The "output" return
  854. // value can be used to capture response data after the request's "Send" method
  855. // is called.
  856. //
  857. // See DeleteStreamingDistribution for usage and error information.
  858. //
  859. // Creating a request object using this method should be used when you want to inject
  860. // custom logic into the request's lifecycle using a custom handler, or if you want to
  861. // access properties on the request object before or after sending the request. If
  862. // you just want the service response, call the DeleteStreamingDistribution method directly
  863. // instead.
  864. //
  865. // Note: You must call the "Send" method on the returned request object in order
  866. // to execute the request.
  867. //
  868. // // Example sending a request using the DeleteStreamingDistributionRequest method.
  869. // req, resp := client.DeleteStreamingDistributionRequest(params)
  870. //
  871. // err := req.Send()
  872. // if err == nil { // resp is now filled
  873. // fmt.Println(resp)
  874. // }
  875. //
  876. func (c *CloudFront) DeleteStreamingDistributionRequest(input *DeleteStreamingDistributionInput) (req *request.Request, output *DeleteStreamingDistributionOutput) {
  877. op := &request.Operation{
  878. Name: opDeleteStreamingDistribution,
  879. HTTPMethod: "DELETE",
  880. HTTPPath: "/2016-09-29/streaming-distribution/{Id}",
  881. }
  882. if input == nil {
  883. input = &DeleteStreamingDistributionInput{}
  884. }
  885. req = c.newRequest(op, input, output)
  886. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  887. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  888. output = &DeleteStreamingDistributionOutput{}
  889. req.Data = output
  890. return
  891. }
  892. // DeleteStreamingDistribution API operation for Amazon CloudFront.
  893. //
  894. // Delete a streaming distribution. To delete an RTMP distribution using the
  895. // CloudFront API, perform the following steps.
  896. //
  897. // To delete an RTMP distribution using the CloudFront API:
  898. //
  899. // Disable the RTMP distribution.
  900. //
  901. // Submit a GET Streaming Distribution Config request to get the current configuration
  902. // and the Etag header for the distribution.
  903. //
  904. // Update the XML document that was returned in the response to your GET Streaming
  905. // Distribution Config request to change the value of Enabled to false.
  906. //
  907. // Submit a PUT Streaming Distribution Config request to update the configuration
  908. // for your distribution. In the request body, include the XML document that
  909. // you updated in Step 3. Then set the value of the HTTP If-Match header to
  910. // the value of the ETag header that CloudFront returned when you submitted
  911. // the GET Streaming Distribution Config request in Step 2.
  912. //
  913. // Review the response to the PUT Streaming Distribution Config request to confirm
  914. // that the distribution was successfully disabled.
  915. //
  916. // Submit a GET Streaming Distribution Config request to confirm that your changes
  917. // have propagated. When propagation is complete, the value of Status is Deployed.
  918. //
  919. // Submit a DELETE Streaming Distribution request. Set the value of the HTTP
  920. // If-Match header to the value of the ETag header that CloudFront returned
  921. // when you submitted the GET Streaming Distribution Config request in Step
  922. // 2.
  923. //
  924. // Review the response to your DELETE Streaming Distribution request to confirm
  925. // that the distribution was successfully deleted.
  926. //
  927. // For information about deleting a distribution using the CloudFront console,
  928. // see Deleting a Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToDeleteDistribution.html)
  929. // in the Amazon CloudFront Developer Guide.
  930. //
  931. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  932. // with awserr.Error's Code and Message methods to get detailed information about
  933. // the error.
  934. //
  935. // See the AWS API reference guide for Amazon CloudFront's
  936. // API operation DeleteStreamingDistribution for usage and error information.
  937. //
  938. // Returned Error Codes:
  939. // * AccessDenied
  940. // Access denied.
  941. //
  942. // * StreamingDistributionNotDisabled
  943. //
  944. // * InvalidIfMatchVersion
  945. // The If-Match version is missing or not valid for the distribution.
  946. //
  947. // * NoSuchStreamingDistribution
  948. // The specified streaming distribution does not exist.
  949. //
  950. // * PreconditionFailed
  951. // The precondition given in one or more of the request-header fields evaluated
  952. // to false.
  953. //
  954. func (c *CloudFront) DeleteStreamingDistribution(input *DeleteStreamingDistributionInput) (*DeleteStreamingDistributionOutput, error) {
  955. req, out := c.DeleteStreamingDistributionRequest(input)
  956. err := req.Send()
  957. return out, err
  958. }
  959. const opGetCloudFrontOriginAccessIdentity = "GetCloudFrontOriginAccessIdentity2016_09_29"
  960. // GetCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the
  961. // client's request for the GetCloudFrontOriginAccessIdentity operation. The "output" return
  962. // value can be used to capture response data after the request's "Send" method
  963. // is called.
  964. //
  965. // See GetCloudFrontOriginAccessIdentity for usage and error information.
  966. //
  967. // Creating a request object using this method should be used when you want to inject
  968. // custom logic into the request's lifecycle using a custom handler, or if you want to
  969. // access properties on the request object before or after sending the request. If
  970. // you just want the service response, call the GetCloudFrontOriginAccessIdentity method directly
  971. // instead.
  972. //
  973. // Note: You must call the "Send" method on the returned request object in order
  974. // to execute the request.
  975. //
  976. // // Example sending a request using the GetCloudFrontOriginAccessIdentityRequest method.
  977. // req, resp := client.GetCloudFrontOriginAccessIdentityRequest(params)
  978. //
  979. // err := req.Send()
  980. // if err == nil { // resp is now filled
  981. // fmt.Println(resp)
  982. // }
  983. //
  984. func (c *CloudFront) GetCloudFrontOriginAccessIdentityRequest(input *GetCloudFrontOriginAccessIdentityInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityOutput) {
  985. op := &request.Operation{
  986. Name: opGetCloudFrontOriginAccessIdentity,
  987. HTTPMethod: "GET",
  988. HTTPPath: "/2016-09-29/origin-access-identity/cloudfront/{Id}",
  989. }
  990. if input == nil {
  991. input = &GetCloudFrontOriginAccessIdentityInput{}
  992. }
  993. req = c.newRequest(op, input, output)
  994. output = &GetCloudFrontOriginAccessIdentityOutput{}
  995. req.Data = output
  996. return
  997. }
  998. // GetCloudFrontOriginAccessIdentity API operation for Amazon CloudFront.
  999. //
  1000. // Get the information about an origin access identity.
  1001. //
  1002. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1003. // with awserr.Error's Code and Message methods to get detailed information about
  1004. // the error.
  1005. //
  1006. // See the AWS API reference guide for Amazon CloudFront's
  1007. // API operation GetCloudFrontOriginAccessIdentity for usage and error information.
  1008. //
  1009. // Returned Error Codes:
  1010. // * NoSuchCloudFrontOriginAccessIdentity
  1011. // The specified origin access identity does not exist.
  1012. //
  1013. // * AccessDenied
  1014. // Access denied.
  1015. //
  1016. func (c *CloudFront) GetCloudFrontOriginAccessIdentity(input *GetCloudFrontOriginAccessIdentityInput) (*GetCloudFrontOriginAccessIdentityOutput, error) {
  1017. req, out := c.GetCloudFrontOriginAccessIdentityRequest(input)
  1018. err := req.Send()
  1019. return out, err
  1020. }
  1021. const opGetCloudFrontOriginAccessIdentityConfig = "GetCloudFrontOriginAccessIdentityConfig2016_09_29"
  1022. // GetCloudFrontOriginAccessIdentityConfigRequest generates a "aws/request.Request" representing the
  1023. // client's request for the GetCloudFrontOriginAccessIdentityConfig operation. The "output" return
  1024. // value can be used to capture response data after the request's "Send" method
  1025. // is called.
  1026. //
  1027. // See GetCloudFrontOriginAccessIdentityConfig for usage and error information.
  1028. //
  1029. // Creating a request object using this method should be used when you want to inject
  1030. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1031. // access properties on the request object before or after sending the request. If
  1032. // you just want the service response, call the GetCloudFrontOriginAccessIdentityConfig method directly
  1033. // instead.
  1034. //
  1035. // Note: You must call the "Send" method on the returned request object in order
  1036. // to execute the request.
  1037. //
  1038. // // Example sending a request using the GetCloudFrontOriginAccessIdentityConfigRequest method.
  1039. // req, resp := client.GetCloudFrontOriginAccessIdentityConfigRequest(params)
  1040. //
  1041. // err := req.Send()
  1042. // if err == nil { // resp is now filled
  1043. // fmt.Println(resp)
  1044. // }
  1045. //
  1046. func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigRequest(input *GetCloudFrontOriginAccessIdentityConfigInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityConfigOutput) {
  1047. op := &request.Operation{
  1048. Name: opGetCloudFrontOriginAccessIdentityConfig,
  1049. HTTPMethod: "GET",
  1050. HTTPPath: "/2016-09-29/origin-access-identity/cloudfront/{Id}/config",
  1051. }
  1052. if input == nil {
  1053. input = &GetCloudFrontOriginAccessIdentityConfigInput{}
  1054. }
  1055. req = c.newRequest(op, input, output)
  1056. output = &GetCloudFrontOriginAccessIdentityConfigOutput{}
  1057. req.Data = output
  1058. return
  1059. }
  1060. // GetCloudFrontOriginAccessIdentityConfig API operation for Amazon CloudFront.
  1061. //
  1062. // Get the configuration information about an origin access identity.
  1063. //
  1064. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1065. // with awserr.Error's Code and Message methods to get detailed information about
  1066. // the error.
  1067. //
  1068. // See the AWS API reference guide for Amazon CloudFront's
  1069. // API operation GetCloudFrontOriginAccessIdentityConfig for usage and error information.
  1070. //
  1071. // Returned Error Codes:
  1072. // * NoSuchCloudFrontOriginAccessIdentity
  1073. // The specified origin access identity does not exist.
  1074. //
  1075. // * AccessDenied
  1076. // Access denied.
  1077. //
  1078. func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfig(input *GetCloudFrontOriginAccessIdentityConfigInput) (*GetCloudFrontOriginAccessIdentityConfigOutput, error) {
  1079. req, out := c.GetCloudFrontOriginAccessIdentityConfigRequest(input)
  1080. err := req.Send()
  1081. return out, err
  1082. }
  1083. const opGetDistribution = "GetDistribution2016_09_29"
  1084. // GetDistributionRequest generates a "aws/request.Request" representing the
  1085. // client's request for the GetDistribution operation. The "output" return
  1086. // value can be used to capture response data after the request's "Send" method
  1087. // is called.
  1088. //
  1089. // See GetDistribution for usage and error information.
  1090. //
  1091. // Creating a request object using this method should be used when you want to inject
  1092. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1093. // access properties on the request object before or after sending the request. If
  1094. // you just want the service response, call the GetDistribution method directly
  1095. // instead.
  1096. //
  1097. // Note: You must call the "Send" method on the returned request object in order
  1098. // to execute the request.
  1099. //
  1100. // // Example sending a request using the GetDistributionRequest method.
  1101. // req, resp := client.GetDistributionRequest(params)
  1102. //
  1103. // err := req.Send()
  1104. // if err == nil { // resp is now filled
  1105. // fmt.Println(resp)
  1106. // }
  1107. //
  1108. func (c *CloudFront) GetDistributionRequest(input *GetDistributionInput) (req *request.Request, output *GetDistributionOutput) {
  1109. op := &request.Operation{
  1110. Name: opGetDistribution,
  1111. HTTPMethod: "GET",
  1112. HTTPPath: "/2016-09-29/distribution/{Id}",
  1113. }
  1114. if input == nil {
  1115. input = &GetDistributionInput{}
  1116. }
  1117. req = c.newRequest(op, input, output)
  1118. output = &GetDistributionOutput{}
  1119. req.Data = output
  1120. return
  1121. }
  1122. // GetDistribution API operation for Amazon CloudFront.
  1123. //
  1124. // Get the information about a distribution.
  1125. //
  1126. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1127. // with awserr.Error's Code and Message methods to get detailed information about
  1128. // the error.
  1129. //
  1130. // See the AWS API reference guide for Amazon CloudFront's
  1131. // API operation GetDistribution for usage and error information.
  1132. //
  1133. // Returned Error Codes:
  1134. // * NoSuchDistribution
  1135. // The specified distribution does not exist.
  1136. //
  1137. // * AccessDenied
  1138. // Access denied.
  1139. //
  1140. func (c *CloudFront) GetDistribution(input *GetDistributionInput) (*GetDistributionOutput, error) {
  1141. req, out := c.GetDistributionRequest(input)
  1142. err := req.Send()
  1143. return out, err
  1144. }
  1145. const opGetDistributionConfig = "GetDistributionConfig2016_09_29"
  1146. // GetDistributionConfigRequest generates a "aws/request.Request" representing the
  1147. // client's request for the GetDistributionConfig operation. The "output" return
  1148. // value can be used to capture response data after the request's "Send" method
  1149. // is called.
  1150. //
  1151. // See GetDistributionConfig for usage and error information.
  1152. //
  1153. // Creating a request object using this method should be used when you want to inject
  1154. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1155. // access properties on the request object before or after sending the request. If
  1156. // you just want the service response, call the GetDistributionConfig method directly
  1157. // instead.
  1158. //
  1159. // Note: You must call the "Send" method on the returned request object in order
  1160. // to execute the request.
  1161. //
  1162. // // Example sending a request using the GetDistributionConfigRequest method.
  1163. // req, resp := client.GetDistributionConfigRequest(params)
  1164. //
  1165. // err := req.Send()
  1166. // if err == nil { // resp is now filled
  1167. // fmt.Println(resp)
  1168. // }
  1169. //
  1170. func (c *CloudFront) GetDistributionConfigRequest(input *GetDistributionConfigInput) (req *request.Request, output *GetDistributionConfigOutput) {
  1171. op := &request.Operation{
  1172. Name: opGetDistributionConfig,
  1173. HTTPMethod: "GET",
  1174. HTTPPath: "/2016-09-29/distribution/{Id}/config",
  1175. }
  1176. if input == nil {
  1177. input = &GetDistributionConfigInput{}
  1178. }
  1179. req = c.newRequest(op, input, output)
  1180. output = &GetDistributionConfigOutput{}
  1181. req.Data = output
  1182. return
  1183. }
  1184. // GetDistributionConfig API operation for Amazon CloudFront.
  1185. //
  1186. // Get the configuration information about a distribution.
  1187. //
  1188. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1189. // with awserr.Error's Code and Message methods to get detailed information about
  1190. // the error.
  1191. //
  1192. // See the AWS API reference guide for Amazon CloudFront's
  1193. // API operation GetDistributionConfig for usage and error information.
  1194. //
  1195. // Returned Error Codes:
  1196. // * NoSuchDistribution
  1197. // The specified distribution does not exist.
  1198. //
  1199. // * AccessDenied
  1200. // Access denied.
  1201. //
  1202. func (c *CloudFront) GetDistributionConfig(input *GetDistributionConfigInput) (*GetDistributionConfigOutput, error) {
  1203. req, out := c.GetDistributionConfigRequest(input)
  1204. err := req.Send()
  1205. return out, err
  1206. }
  1207. const opGetInvalidation = "GetInvalidation2016_09_29"
  1208. // GetInvalidationRequest generates a "aws/request.Request" representing the
  1209. // client's request for the GetInvalidation operation. The "output" return
  1210. // value can be used to capture response data after the request's "Send" method
  1211. // is called.
  1212. //
  1213. // See GetInvalidation for usage and error information.
  1214. //
  1215. // Creating a request object using this method should be used when you want to inject
  1216. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1217. // access properties on the request object before or after sending the request. If
  1218. // you just want the service response, call the GetInvalidation method directly
  1219. // instead.
  1220. //
  1221. // Note: You must call the "Send" method on the returned request object in order
  1222. // to execute the request.
  1223. //
  1224. // // Example sending a request using the GetInvalidationRequest method.
  1225. // req, resp := client.GetInvalidationRequest(params)
  1226. //
  1227. // err := req.Send()
  1228. // if err == nil { // resp is now filled
  1229. // fmt.Println(resp)
  1230. // }
  1231. //
  1232. func (c *CloudFront) GetInvalidationRequest(input *GetInvalidationInput) (req *request.Request, output *GetInvalidationOutput) {
  1233. op := &request.Operation{
  1234. Name: opGetInvalidation,
  1235. HTTPMethod: "GET",
  1236. HTTPPath: "/2016-09-29/distribution/{DistributionId}/invalidation/{Id}",
  1237. }
  1238. if input == nil {
  1239. input = &GetInvalidationInput{}
  1240. }
  1241. req = c.newRequest(op, input, output)
  1242. output = &GetInvalidationOutput{}
  1243. req.Data = output
  1244. return
  1245. }
  1246. // GetInvalidation API operation for Amazon CloudFront.
  1247. //
  1248. // Get the information about an invalidation.
  1249. //
  1250. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1251. // with awserr.Error's Code and Message methods to get detailed information about
  1252. // the error.
  1253. //
  1254. // See the AWS API reference guide for Amazon CloudFront's
  1255. // API operation GetInvalidation for usage and error information.
  1256. //
  1257. // Returned Error Codes:
  1258. // * NoSuchInvalidation
  1259. // The specified invalidation does not exist.
  1260. //
  1261. // * NoSuchDistribution
  1262. // The specified distribution does not exist.
  1263. //
  1264. // * AccessDenied
  1265. // Access denied.
  1266. //
  1267. func (c *CloudFront) GetInvalidation(input *GetInvalidationInput) (*GetInvalidationOutput, error) {
  1268. req, out := c.GetInvalidationRequest(input)
  1269. err := req.Send()
  1270. return out, err
  1271. }
  1272. const opGetStreamingDistribution = "GetStreamingDistribution2016_09_29"
  1273. // GetStreamingDistributionRequest generates a "aws/request.Request" representing the
  1274. // client's request for the GetStreamingDistribution operation. The "output" return
  1275. // value can be used to capture response data after the request's "Send" method
  1276. // is called.
  1277. //
  1278. // See GetStreamingDistribution for usage and error information.
  1279. //
  1280. // Creating a request object using this method should be used when you want to inject
  1281. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1282. // access properties on the request object before or after sending the request. If
  1283. // you just want the service response, call the GetStreamingDistribution method directly
  1284. // instead.
  1285. //
  1286. // Note: You must call the "Send" method on the returned request object in order
  1287. // to execute the request.
  1288. //
  1289. // // Example sending a request using the GetStreamingDistributionRequest method.
  1290. // req, resp := client.GetStreamingDistributionRequest(params)
  1291. //
  1292. // err := req.Send()
  1293. // if err == nil { // resp is now filled
  1294. // fmt.Println(resp)
  1295. // }
  1296. //
  1297. func (c *CloudFront) GetStreamingDistributionRequest(input *GetStreamingDistributionInput) (req *request.Request, output *GetStreamingDistributionOutput) {
  1298. op := &request.Operation{
  1299. Name: opGetStreamingDistribution,
  1300. HTTPMethod: "GET",
  1301. HTTPPath: "/2016-09-29/streaming-distribution/{Id}",
  1302. }
  1303. if input == nil {
  1304. input = &GetStreamingDistributionInput{}
  1305. }
  1306. req = c.newRequest(op, input, output)
  1307. output = &GetStreamingDistributionOutput{}
  1308. req.Data = output
  1309. return
  1310. }
  1311. // GetStreamingDistribution API operation for Amazon CloudFront.
  1312. //
  1313. // Gets information about a specified RTMP distribution, including the distribution
  1314. // configuration.
  1315. //
  1316. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1317. // with awserr.Error's Code and Message methods to get detailed information about
  1318. // the error.
  1319. //
  1320. // See the AWS API reference guide for Amazon CloudFront's
  1321. // API operation GetStreamingDistribution for usage and error information.
  1322. //
  1323. // Returned Error Codes:
  1324. // * NoSuchStreamingDistribution
  1325. // The specified streaming distribution does not exist.
  1326. //
  1327. // * AccessDenied
  1328. // Access denied.
  1329. //
  1330. func (c *CloudFront) GetStreamingDistribution(input *GetStreamingDistributionInput) (*GetStreamingDistributionOutput, error) {
  1331. req, out := c.GetStreamingDistributionRequest(input)
  1332. err := req.Send()
  1333. return out, err
  1334. }
  1335. const opGetStreamingDistributionConfig = "GetStreamingDistributionConfig2016_09_29"
  1336. // GetStreamingDistributionConfigRequest generates a "aws/request.Request" representing the
  1337. // client's request for the GetStreamingDistributionConfig operation. The "output" return
  1338. // value can be used to capture response data after the request's "Send" method
  1339. // is called.
  1340. //
  1341. // See GetStreamingDistributionConfig for usage and error information.
  1342. //
  1343. // Creating a request object using this method should be used when you want to inject
  1344. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1345. // access properties on the request object before or after sending the request. If
  1346. // you just want the service response, call the GetStreamingDistributionConfig method directly
  1347. // instead.
  1348. //
  1349. // Note: You must call the "Send" method on the returned request object in order
  1350. // to execute the request.
  1351. //
  1352. // // Example sending a request using the GetStreamingDistributionConfigRequest method.
  1353. // req, resp := client.GetStreamingDistributionConfigRequest(params)
  1354. //
  1355. // err := req.Send()
  1356. // if err == nil { // resp is now filled
  1357. // fmt.Println(resp)
  1358. // }
  1359. //
  1360. func (c *CloudFront) GetStreamingDistributionConfigRequest(input *GetStreamingDistributionConfigInput) (req *request.Request, output *GetStreamingDistributionConfigOutput) {
  1361. op := &request.Operation{
  1362. Name: opGetStreamingDistributionConfig,
  1363. HTTPMethod: "GET",
  1364. HTTPPath: "/2016-09-29/streaming-distribution/{Id}/config",
  1365. }
  1366. if input == nil {
  1367. input = &GetStreamingDistributionConfigInput{}
  1368. }
  1369. req = c.newRequest(op, input, output)
  1370. output = &GetStreamingDistributionConfigOutput{}
  1371. req.Data = output
  1372. return
  1373. }
  1374. // GetStreamingDistributionConfig API operation for Amazon CloudFront.
  1375. //
  1376. // Get the configuration information about a streaming distribution.
  1377. //
  1378. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1379. // with awserr.Error's Code and Message methods to get detailed information about
  1380. // the error.
  1381. //
  1382. // See the AWS API reference guide for Amazon CloudFront's
  1383. // API operation GetStreamingDistributionConfig for usage and error information.
  1384. //
  1385. // Returned Error Codes:
  1386. // * NoSuchStreamingDistribution
  1387. // The specified streaming distribution does not exist.
  1388. //
  1389. // * AccessDenied
  1390. // Access denied.
  1391. //
  1392. func (c *CloudFront) GetStreamingDistributionConfig(input *GetStreamingDistributionConfigInput) (*GetStreamingDistributionConfigOutput, error) {
  1393. req, out := c.GetStreamingDistributionConfigRequest(input)
  1394. err := req.Send()
  1395. return out, err
  1396. }
  1397. const opListCloudFrontOriginAccessIdentities = "ListCloudFrontOriginAccessIdentities2016_09_29"
  1398. // ListCloudFrontOriginAccessIdentitiesRequest generates a "aws/request.Request" representing the
  1399. // client's request for the ListCloudFrontOriginAccessIdentities operation. The "output" return
  1400. // value can be used to capture response data after the request's "Send" method
  1401. // is called.
  1402. //
  1403. // See ListCloudFrontOriginAccessIdentities for usage and error information.
  1404. //
  1405. // Creating a request object using this method should be used when you want to inject
  1406. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1407. // access properties on the request object before or after sending the request. If
  1408. // you just want the service response, call the ListCloudFrontOriginAccessIdentities method directly
  1409. // instead.
  1410. //
  1411. // Note: You must call the "Send" method on the returned request object in order
  1412. // to execute the request.
  1413. //
  1414. // // Example sending a request using the ListCloudFrontOriginAccessIdentitiesRequest method.
  1415. // req, resp := client.ListCloudFrontOriginAccessIdentitiesRequest(params)
  1416. //
  1417. // err := req.Send()
  1418. // if err == nil { // resp is now filled
  1419. // fmt.Println(resp)
  1420. // }
  1421. //
  1422. func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesRequest(input *ListCloudFrontOriginAccessIdentitiesInput) (req *request.Request, output *ListCloudFrontOriginAccessIdentitiesOutput) {
  1423. op := &request.Operation{
  1424. Name: opListCloudFrontOriginAccessIdentities,
  1425. HTTPMethod: "GET",
  1426. HTTPPath: "/2016-09-29/origin-access-identity/cloudfront",
  1427. Paginator: &request.Paginator{
  1428. InputTokens: []string{"Marker"},
  1429. OutputTokens: []string{"CloudFrontOriginAccessIdentityList.NextMarker"},
  1430. LimitToken: "MaxItems",
  1431. TruncationToken: "CloudFrontOriginAccessIdentityList.IsTruncated",
  1432. },
  1433. }
  1434. if input == nil {
  1435. input = &ListCloudFrontOriginAccessIdentitiesInput{}
  1436. }
  1437. req = c.newRequest(op, input, output)
  1438. output = &ListCloudFrontOriginAccessIdentitiesOutput{}
  1439. req.Data = output
  1440. return
  1441. }
  1442. // ListCloudFrontOriginAccessIdentities API operation for Amazon CloudFront.
  1443. //
  1444. // Lists origin access identities.
  1445. //
  1446. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1447. // with awserr.Error's Code and Message methods to get detailed information about
  1448. // the error.
  1449. //
  1450. // See the AWS API reference guide for Amazon CloudFront's
  1451. // API operation ListCloudFrontOriginAccessIdentities for usage and error information.
  1452. //
  1453. // Returned Error Codes:
  1454. // * InvalidArgument
  1455. // The argument is invalid.
  1456. //
  1457. func (c *CloudFront) ListCloudFrontOriginAccessIdentities(input *ListCloudFrontOriginAccessIdentitiesInput) (*ListCloudFrontOriginAccessIdentitiesOutput, error) {
  1458. req, out := c.ListCloudFrontOriginAccessIdentitiesRequest(input)
  1459. err := req.Send()
  1460. return out, err
  1461. }
  1462. // ListCloudFrontOriginAccessIdentitiesPages iterates over the pages of a ListCloudFrontOriginAccessIdentities operation,
  1463. // calling the "fn" function with the response data for each page. To stop
  1464. // iterating, return false from the fn function.
  1465. //
  1466. // See ListCloudFrontOriginAccessIdentities method for more information on how to use this operation.
  1467. //
  1468. // Note: This operation can generate multiple requests to a service.
  1469. //
  1470. // // Example iterating over at most 3 pages of a ListCloudFrontOriginAccessIdentities operation.
  1471. // pageNum := 0
  1472. // err := client.ListCloudFrontOriginAccessIdentitiesPages(params,
  1473. // func(page *ListCloudFrontOriginAccessIdentitiesOutput, lastPage bool) bool {
  1474. // pageNum++
  1475. // fmt.Println(page)
  1476. // return pageNum <= 3
  1477. // })
  1478. //
  1479. func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesPages(input *ListCloudFrontOriginAccessIdentitiesInput, fn func(p *ListCloudFrontOriginAccessIdentitiesOutput, lastPage bool) (shouldContinue bool)) error {
  1480. page, _ := c.ListCloudFrontOriginAccessIdentitiesRequest(input)
  1481. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1482. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1483. return fn(p.(*ListCloudFrontOriginAccessIdentitiesOutput), lastPage)
  1484. })
  1485. }
  1486. const opListDistributions = "ListDistributions2016_09_29"
  1487. // ListDistributionsRequest generates a "aws/request.Request" representing the
  1488. // client's request for the ListDistributions operation. The "output" return
  1489. // value can be used to capture response data after the request's "Send" method
  1490. // is called.
  1491. //
  1492. // See ListDistributions for usage and error information.
  1493. //
  1494. // Creating a request object using this method should be used when you want to inject
  1495. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1496. // access properties on the request object before or after sending the request. If
  1497. // you just want the service response, call the ListDistributions method directly
  1498. // instead.
  1499. //
  1500. // Note: You must call the "Send" method on the returned request object in order
  1501. // to execute the request.
  1502. //
  1503. // // Example sending a request using the ListDistributionsRequest method.
  1504. // req, resp := client.ListDistributionsRequest(params)
  1505. //
  1506. // err := req.Send()
  1507. // if err == nil { // resp is now filled
  1508. // fmt.Println(resp)
  1509. // }
  1510. //
  1511. func (c *CloudFront) ListDistributionsRequest(input *ListDistributionsInput) (req *request.Request, output *ListDistributionsOutput) {
  1512. op := &request.Operation{
  1513. Name: opListDistributions,
  1514. HTTPMethod: "GET",
  1515. HTTPPath: "/2016-09-29/distribution",
  1516. Paginator: &request.Paginator{
  1517. InputTokens: []string{"Marker"},
  1518. OutputTokens: []string{"DistributionList.NextMarker"},
  1519. LimitToken: "MaxItems",
  1520. TruncationToken: "DistributionList.IsTruncated",
  1521. },
  1522. }
  1523. if input == nil {
  1524. input = &ListDistributionsInput{}
  1525. }
  1526. req = c.newRequest(op, input, output)
  1527. output = &ListDistributionsOutput{}
  1528. req.Data = output
  1529. return
  1530. }
  1531. // ListDistributions API operation for Amazon CloudFront.
  1532. //
  1533. // List distributions.
  1534. //
  1535. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1536. // with awserr.Error's Code and Message methods to get detailed information about
  1537. // the error.
  1538. //
  1539. // See the AWS API reference guide for Amazon CloudFront's
  1540. // API operation ListDistributions for usage and error information.
  1541. //
  1542. // Returned Error Codes:
  1543. // * InvalidArgument
  1544. // The argument is invalid.
  1545. //
  1546. func (c *CloudFront) ListDistributions(input *ListDistributionsInput) (*ListDistributionsOutput, error) {
  1547. req, out := c.ListDistributionsRequest(input)
  1548. err := req.Send()
  1549. return out, err
  1550. }
  1551. // ListDistributionsPages iterates over the pages of a ListDistributions operation,
  1552. // calling the "fn" function with the response data for each page. To stop
  1553. // iterating, return false from the fn function.
  1554. //
  1555. // See ListDistributions method for more information on how to use this operation.
  1556. //
  1557. // Note: This operation can generate multiple requests to a service.
  1558. //
  1559. // // Example iterating over at most 3 pages of a ListDistributions operation.
  1560. // pageNum := 0
  1561. // err := client.ListDistributionsPages(params,
  1562. // func(page *ListDistributionsOutput, lastPage bool) bool {
  1563. // pageNum++
  1564. // fmt.Println(page)
  1565. // return pageNum <= 3
  1566. // })
  1567. //
  1568. func (c *CloudFront) ListDistributionsPages(input *ListDistributionsInput, fn func(p *ListDistributionsOutput, lastPage bool) (shouldContinue bool)) error {
  1569. page, _ := c.ListDistributionsRequest(input)
  1570. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1571. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1572. return fn(p.(*ListDistributionsOutput), lastPage)
  1573. })
  1574. }
  1575. const opListDistributionsByWebACLId = "ListDistributionsByWebACLId2016_09_29"
  1576. // ListDistributionsByWebACLIdRequest generates a "aws/request.Request" representing the
  1577. // client's request for the ListDistributionsByWebACLId operation. The "output" return
  1578. // value can be used to capture response data after the request's "Send" method
  1579. // is called.
  1580. //
  1581. // See ListDistributionsByWebACLId for usage and error information.
  1582. //
  1583. // Creating a request object using this method should be used when you want to inject
  1584. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1585. // access properties on the request object before or after sending the request. If
  1586. // you just want the service response, call the ListDistributionsByWebACLId method directly
  1587. // instead.
  1588. //
  1589. // Note: You must call the "Send" method on the returned request object in order
  1590. // to execute the request.
  1591. //
  1592. // // Example sending a request using the ListDistributionsByWebACLIdRequest method.
  1593. // req, resp := client.ListDistributionsByWebACLIdRequest(params)
  1594. //
  1595. // err := req.Send()
  1596. // if err == nil { // resp is now filled
  1597. // fmt.Println(resp)
  1598. // }
  1599. //
  1600. func (c *CloudFront) ListDistributionsByWebACLIdRequest(input *ListDistributionsByWebACLIdInput) (req *request.Request, output *ListDistributionsByWebACLIdOutput) {
  1601. op := &request.Operation{
  1602. Name: opListDistributionsByWebACLId,
  1603. HTTPMethod: "GET",
  1604. HTTPPath: "/2016-09-29/distributionsByWebACLId/{WebACLId}",
  1605. }
  1606. if input == nil {
  1607. input = &ListDistributionsByWebACLIdInput{}
  1608. }
  1609. req = c.newRequest(op, input, output)
  1610. output = &ListDistributionsByWebACLIdOutput{}
  1611. req.Data = output
  1612. return
  1613. }
  1614. // ListDistributionsByWebACLId API operation for Amazon CloudFront.
  1615. //
  1616. // List the distributions that are associated with a specified AWS WAF web ACL.
  1617. //
  1618. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1619. // with awserr.Error's Code and Message methods to get detailed information about
  1620. // the error.
  1621. //
  1622. // See the AWS API reference guide for Amazon CloudFront's
  1623. // API operation ListDistributionsByWebACLId for usage and error information.
  1624. //
  1625. // Returned Error Codes:
  1626. // * InvalidArgument
  1627. // The argument is invalid.
  1628. //
  1629. // * InvalidWebACLId
  1630. //
  1631. func (c *CloudFront) ListDistributionsByWebACLId(input *ListDistributionsByWebACLIdInput) (*ListDistributionsByWebACLIdOutput, error) {
  1632. req, out := c.ListDistributionsByWebACLIdRequest(input)
  1633. err := req.Send()
  1634. return out, err
  1635. }
  1636. const opListInvalidations = "ListInvalidations2016_09_29"
  1637. // ListInvalidationsRequest generates a "aws/request.Request" representing the
  1638. // client's request for the ListInvalidations operation. The "output" return
  1639. // value can be used to capture response data after the request's "Send" method
  1640. // is called.
  1641. //
  1642. // See ListInvalidations for usage and error information.
  1643. //
  1644. // Creating a request object using this method should be used when you want to inject
  1645. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1646. // access properties on the request object before or after sending the request. If
  1647. // you just want the service response, call the ListInvalidations method directly
  1648. // instead.
  1649. //
  1650. // Note: You must call the "Send" method on the returned request object in order
  1651. // to execute the request.
  1652. //
  1653. // // Example sending a request using the ListInvalidationsRequest method.
  1654. // req, resp := client.ListInvalidationsRequest(params)
  1655. //
  1656. // err := req.Send()
  1657. // if err == nil { // resp is now filled
  1658. // fmt.Println(resp)
  1659. // }
  1660. //
  1661. func (c *CloudFront) ListInvalidationsRequest(input *ListInvalidationsInput) (req *request.Request, output *ListInvalidationsOutput) {
  1662. op := &request.Operation{
  1663. Name: opListInvalidations,
  1664. HTTPMethod: "GET",
  1665. HTTPPath: "/2016-09-29/distribution/{DistributionId}/invalidation",
  1666. Paginator: &request.Paginator{
  1667. InputTokens: []string{"Marker"},
  1668. OutputTokens: []string{"InvalidationList.NextMarker"},
  1669. LimitToken: "MaxItems",
  1670. TruncationToken: "InvalidationList.IsTruncated",
  1671. },
  1672. }
  1673. if input == nil {
  1674. input = &ListInvalidationsInput{}
  1675. }
  1676. req = c.newRequest(op, input, output)
  1677. output = &ListInvalidationsOutput{}
  1678. req.Data = output
  1679. return
  1680. }
  1681. // ListInvalidations API operation for Amazon CloudFront.
  1682. //
  1683. // Lists invalidation batches.
  1684. //
  1685. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1686. // with awserr.Error's Code and Message methods to get detailed information about
  1687. // the error.
  1688. //
  1689. // See the AWS API reference guide for Amazon CloudFront's
  1690. // API operation ListInvalidations for usage and error information.
  1691. //
  1692. // Returned Error Codes:
  1693. // * InvalidArgument
  1694. // The argument is invalid.
  1695. //
  1696. // * NoSuchDistribution
  1697. // The specified distribution does not exist.
  1698. //
  1699. // * AccessDenied
  1700. // Access denied.
  1701. //
  1702. func (c *CloudFront) ListInvalidations(input *ListInvalidationsInput) (*ListInvalidationsOutput, error) {
  1703. req, out := c.ListInvalidationsRequest(input)
  1704. err := req.Send()
  1705. return out, err
  1706. }
  1707. // ListInvalidationsPages iterates over the pages of a ListInvalidations operation,
  1708. // calling the "fn" function with the response data for each page. To stop
  1709. // iterating, return false from the fn function.
  1710. //
  1711. // See ListInvalidations method for more information on how to use this operation.
  1712. //
  1713. // Note: This operation can generate multiple requests to a service.
  1714. //
  1715. // // Example iterating over at most 3 pages of a ListInvalidations operation.
  1716. // pageNum := 0
  1717. // err := client.ListInvalidationsPages(params,
  1718. // func(page *ListInvalidationsOutput, lastPage bool) bool {
  1719. // pageNum++
  1720. // fmt.Println(page)
  1721. // return pageNum <= 3
  1722. // })
  1723. //
  1724. func (c *CloudFront) ListInvalidationsPages(input *ListInvalidationsInput, fn func(p *ListInvalidationsOutput, lastPage bool) (shouldContinue bool)) error {
  1725. page, _ := c.ListInvalidationsRequest(input)
  1726. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1727. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1728. return fn(p.(*ListInvalidationsOutput), lastPage)
  1729. })
  1730. }
  1731. const opListStreamingDistributions = "ListStreamingDistributions2016_09_29"
  1732. // ListStreamingDistributionsRequest generates a "aws/request.Request" representing the
  1733. // client's request for the ListStreamingDistributions operation. The "output" return
  1734. // value can be used to capture response data after the request's "Send" method
  1735. // is called.
  1736. //
  1737. // See ListStreamingDistributions for usage and error information.
  1738. //
  1739. // Creating a request object using this method should be used when you want to inject
  1740. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1741. // access properties on the request object before or after sending the request. If
  1742. // you just want the service response, call the ListStreamingDistributions method directly
  1743. // instead.
  1744. //
  1745. // Note: You must call the "Send" method on the returned request object in order
  1746. // to execute the request.
  1747. //
  1748. // // Example sending a request using the ListStreamingDistributionsRequest method.
  1749. // req, resp := client.ListStreamingDistributionsRequest(params)
  1750. //
  1751. // err := req.Send()
  1752. // if err == nil { // resp is now filled
  1753. // fmt.Println(resp)
  1754. // }
  1755. //
  1756. func (c *CloudFront) ListStreamingDistributionsRequest(input *ListStreamingDistributionsInput) (req *request.Request, output *ListStreamingDistributionsOutput) {
  1757. op := &request.Operation{
  1758. Name: opListStreamingDistributions,
  1759. HTTPMethod: "GET",
  1760. HTTPPath: "/2016-09-29/streaming-distribution",
  1761. Paginator: &request.Paginator{
  1762. InputTokens: []string{"Marker"},
  1763. OutputTokens: []string{"StreamingDistributionList.NextMarker"},
  1764. LimitToken: "MaxItems",
  1765. TruncationToken: "StreamingDistributionList.IsTruncated",
  1766. },
  1767. }
  1768. if input == nil {
  1769. input = &ListStreamingDistributionsInput{}
  1770. }
  1771. req = c.newRequest(op, input, output)
  1772. output = &ListStreamingDistributionsOutput{}
  1773. req.Data = output
  1774. return
  1775. }
  1776. // ListStreamingDistributions API operation for Amazon CloudFront.
  1777. //
  1778. // List streaming distributions.
  1779. //
  1780. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1781. // with awserr.Error's Code and Message methods to get detailed information about
  1782. // the error.
  1783. //
  1784. // See the AWS API reference guide for Amazon CloudFront's
  1785. // API operation ListStreamingDistributions for usage and error information.
  1786. //
  1787. // Returned Error Codes:
  1788. // * InvalidArgument
  1789. // The argument is invalid.
  1790. //
  1791. func (c *CloudFront) ListStreamingDistributions(input *ListStreamingDistributionsInput) (*ListStreamingDistributionsOutput, error) {
  1792. req, out := c.ListStreamingDistributionsRequest(input)
  1793. err := req.Send()
  1794. return out, err
  1795. }
  1796. // ListStreamingDistributionsPages iterates over the pages of a ListStreamingDistributions operation,
  1797. // calling the "fn" function with the response data for each page. To stop
  1798. // iterating, return false from the fn function.
  1799. //
  1800. // See ListStreamingDistributions method for more information on how to use this operation.
  1801. //
  1802. // Note: This operation can generate multiple requests to a service.
  1803. //
  1804. // // Example iterating over at most 3 pages of a ListStreamingDistributions operation.
  1805. // pageNum := 0
  1806. // err := client.ListStreamingDistributionsPages(params,
  1807. // func(page *ListStreamingDistributionsOutput, lastPage bool) bool {
  1808. // pageNum++
  1809. // fmt.Println(page)
  1810. // return pageNum <= 3
  1811. // })
  1812. //
  1813. func (c *CloudFront) ListStreamingDistributionsPages(input *ListStreamingDistributionsInput, fn func(p *ListStreamingDistributionsOutput, lastPage bool) (shouldContinue bool)) error {
  1814. page, _ := c.ListStreamingDistributionsRequest(input)
  1815. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  1816. return page.EachPage(func(p interface{}, lastPage bool) bool {
  1817. return fn(p.(*ListStreamingDistributionsOutput), lastPage)
  1818. })
  1819. }
  1820. const opListTagsForResource = "ListTagsForResource2016_09_29"
  1821. // ListTagsForResourceRequest generates a "aws/request.Request" representing the
  1822. // client's request for the ListTagsForResource operation. The "output" return
  1823. // value can be used to capture response data after the request's "Send" method
  1824. // is called.
  1825. //
  1826. // See ListTagsForResource for usage and error information.
  1827. //
  1828. // Creating a request object using this method should be used when you want to inject
  1829. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1830. // access properties on the request object before or after sending the request. If
  1831. // you just want the service response, call the ListTagsForResource method directly
  1832. // instead.
  1833. //
  1834. // Note: You must call the "Send" method on the returned request object in order
  1835. // to execute the request.
  1836. //
  1837. // // Example sending a request using the ListTagsForResourceRequest method.
  1838. // req, resp := client.ListTagsForResourceRequest(params)
  1839. //
  1840. // err := req.Send()
  1841. // if err == nil { // resp is now filled
  1842. // fmt.Println(resp)
  1843. // }
  1844. //
  1845. func (c *CloudFront) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
  1846. op := &request.Operation{
  1847. Name: opListTagsForResource,
  1848. HTTPMethod: "GET",
  1849. HTTPPath: "/2016-09-29/tagging",
  1850. }
  1851. if input == nil {
  1852. input = &ListTagsForResourceInput{}
  1853. }
  1854. req = c.newRequest(op, input, output)
  1855. output = &ListTagsForResourceOutput{}
  1856. req.Data = output
  1857. return
  1858. }
  1859. // ListTagsForResource API operation for Amazon CloudFront.
  1860. //
  1861. // List tags for a CloudFront resource.
  1862. //
  1863. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1864. // with awserr.Error's Code and Message methods to get detailed information about
  1865. // the error.
  1866. //
  1867. // See the AWS API reference guide for Amazon CloudFront's
  1868. // API operation ListTagsForResource for usage and error information.
  1869. //
  1870. // Returned Error Codes:
  1871. // * AccessDenied
  1872. // Access denied.
  1873. //
  1874. // * InvalidArgument
  1875. // The argument is invalid.
  1876. //
  1877. // * InvalidTagging
  1878. //
  1879. // * NoSuchResource
  1880. //
  1881. func (c *CloudFront) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
  1882. req, out := c.ListTagsForResourceRequest(input)
  1883. err := req.Send()
  1884. return out, err
  1885. }
  1886. const opTagResource = "TagResource2016_09_29"
  1887. // TagResourceRequest generates a "aws/request.Request" representing the
  1888. // client's request for the TagResource operation. The "output" return
  1889. // value can be used to capture response data after the request's "Send" method
  1890. // is called.
  1891. //
  1892. // See TagResource for usage and error information.
  1893. //
  1894. // Creating a request object using this method should be used when you want to inject
  1895. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1896. // access properties on the request object before or after sending the request. If
  1897. // you just want the service response, call the TagResource method directly
  1898. // instead.
  1899. //
  1900. // Note: You must call the "Send" method on the returned request object in order
  1901. // to execute the request.
  1902. //
  1903. // // Example sending a request using the TagResourceRequest method.
  1904. // req, resp := client.TagResourceRequest(params)
  1905. //
  1906. // err := req.Send()
  1907. // if err == nil { // resp is now filled
  1908. // fmt.Println(resp)
  1909. // }
  1910. //
  1911. func (c *CloudFront) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
  1912. op := &request.Operation{
  1913. Name: opTagResource,
  1914. HTTPMethod: "POST",
  1915. HTTPPath: "/2016-09-29/tagging?Operation=Tag",
  1916. }
  1917. if input == nil {
  1918. input = &TagResourceInput{}
  1919. }
  1920. req = c.newRequest(op, input, output)
  1921. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1922. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1923. output = &TagResourceOutput{}
  1924. req.Data = output
  1925. return
  1926. }
  1927. // TagResource API operation for Amazon CloudFront.
  1928. //
  1929. // Add tags to a CloudFront resource.
  1930. //
  1931. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1932. // with awserr.Error's Code and Message methods to get detailed information about
  1933. // the error.
  1934. //
  1935. // See the AWS API reference guide for Amazon CloudFront's
  1936. // API operation TagResource for usage and error information.
  1937. //
  1938. // Returned Error Codes:
  1939. // * AccessDenied
  1940. // Access denied.
  1941. //
  1942. // * InvalidArgument
  1943. // The argument is invalid.
  1944. //
  1945. // * InvalidTagging
  1946. //
  1947. // * NoSuchResource
  1948. //
  1949. func (c *CloudFront) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
  1950. req, out := c.TagResourceRequest(input)
  1951. err := req.Send()
  1952. return out, err
  1953. }
  1954. const opUntagResource = "UntagResource2016_09_29"
  1955. // UntagResourceRequest generates a "aws/request.Request" representing the
  1956. // client's request for the UntagResource operation. The "output" return
  1957. // value can be used to capture response data after the request's "Send" method
  1958. // is called.
  1959. //
  1960. // See UntagResource for usage and error information.
  1961. //
  1962. // Creating a request object using this method should be used when you want to inject
  1963. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1964. // access properties on the request object before or after sending the request. If
  1965. // you just want the service response, call the UntagResource method directly
  1966. // instead.
  1967. //
  1968. // Note: You must call the "Send" method on the returned request object in order
  1969. // to execute the request.
  1970. //
  1971. // // Example sending a request using the UntagResourceRequest method.
  1972. // req, resp := client.UntagResourceRequest(params)
  1973. //
  1974. // err := req.Send()
  1975. // if err == nil { // resp is now filled
  1976. // fmt.Println(resp)
  1977. // }
  1978. //
  1979. func (c *CloudFront) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
  1980. op := &request.Operation{
  1981. Name: opUntagResource,
  1982. HTTPMethod: "POST",
  1983. HTTPPath: "/2016-09-29/tagging?Operation=Untag",
  1984. }
  1985. if input == nil {
  1986. input = &UntagResourceInput{}
  1987. }
  1988. req = c.newRequest(op, input, output)
  1989. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1990. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1991. output = &UntagResourceOutput{}
  1992. req.Data = output
  1993. return
  1994. }
  1995. // UntagResource API operation for Amazon CloudFront.
  1996. //
  1997. // Remove tags from a CloudFront resource.
  1998. //
  1999. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2000. // with awserr.Error's Code and Message methods to get detailed information about
  2001. // the error.
  2002. //
  2003. // See the AWS API reference guide for Amazon CloudFront's
  2004. // API operation UntagResource for usage and error information.
  2005. //
  2006. // Returned Error Codes:
  2007. // * AccessDenied
  2008. // Access denied.
  2009. //
  2010. // * InvalidArgument
  2011. // The argument is invalid.
  2012. //
  2013. // * InvalidTagging
  2014. //
  2015. // * NoSuchResource
  2016. //
  2017. func (c *CloudFront) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
  2018. req, out := c.UntagResourceRequest(input)
  2019. err := req.Send()
  2020. return out, err
  2021. }
  2022. const opUpdateCloudFrontOriginAccessIdentity = "UpdateCloudFrontOriginAccessIdentity2016_09_29"
  2023. // UpdateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the
  2024. // client's request for the UpdateCloudFrontOriginAccessIdentity operation. The "output" return
  2025. // value can be used to capture response data after the request's "Send" method
  2026. // is called.
  2027. //
  2028. // See UpdateCloudFrontOriginAccessIdentity for usage and error information.
  2029. //
  2030. // Creating a request object using this method should be used when you want to inject
  2031. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2032. // access properties on the request object before or after sending the request. If
  2033. // you just want the service response, call the UpdateCloudFrontOriginAccessIdentity method directly
  2034. // instead.
  2035. //
  2036. // Note: You must call the "Send" method on the returned request object in order
  2037. // to execute the request.
  2038. //
  2039. // // Example sending a request using the UpdateCloudFrontOriginAccessIdentityRequest method.
  2040. // req, resp := client.UpdateCloudFrontOriginAccessIdentityRequest(params)
  2041. //
  2042. // err := req.Send()
  2043. // if err == nil { // resp is now filled
  2044. // fmt.Println(resp)
  2045. // }
  2046. //
  2047. func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityRequest(input *UpdateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *UpdateCloudFrontOriginAccessIdentityOutput) {
  2048. op := &request.Operation{
  2049. Name: opUpdateCloudFrontOriginAccessIdentity,
  2050. HTTPMethod: "PUT",
  2051. HTTPPath: "/2016-09-29/origin-access-identity/cloudfront/{Id}/config",
  2052. }
  2053. if input == nil {
  2054. input = &UpdateCloudFrontOriginAccessIdentityInput{}
  2055. }
  2056. req = c.newRequest(op, input, output)
  2057. output = &UpdateCloudFrontOriginAccessIdentityOutput{}
  2058. req.Data = output
  2059. return
  2060. }
  2061. // UpdateCloudFrontOriginAccessIdentity API operation for Amazon CloudFront.
  2062. //
  2063. // Update an origin access identity.
  2064. //
  2065. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2066. // with awserr.Error's Code and Message methods to get detailed information about
  2067. // the error.
  2068. //
  2069. // See the AWS API reference guide for Amazon CloudFront's
  2070. // API operation UpdateCloudFrontOriginAccessIdentity for usage and error information.
  2071. //
  2072. // Returned Error Codes:
  2073. // * AccessDenied
  2074. // Access denied.
  2075. //
  2076. // * IllegalUpdate
  2077. // Origin and CallerReference cannot be updated.
  2078. //
  2079. // * InvalidIfMatchVersion
  2080. // The If-Match version is missing or not valid for the distribution.
  2081. //
  2082. // * MissingBody
  2083. // This operation requires a body. Ensure that the body is present and the Content-Type
  2084. // header is set.
  2085. //
  2086. // * NoSuchCloudFrontOriginAccessIdentity
  2087. // The specified origin access identity does not exist.
  2088. //
  2089. // * PreconditionFailed
  2090. // The precondition given in one or more of the request-header fields evaluated
  2091. // to false.
  2092. //
  2093. // * InvalidArgument
  2094. // The argument is invalid.
  2095. //
  2096. // * InconsistentQuantities
  2097. // The value of Quantity and the size of Items do not match.
  2098. //
  2099. func (c *CloudFront) UpdateCloudFrontOriginAccessIdentity(input *UpdateCloudFrontOriginAccessIdentityInput) (*UpdateCloudFrontOriginAccessIdentityOutput, error) {
  2100. req, out := c.UpdateCloudFrontOriginAccessIdentityRequest(input)
  2101. err := req.Send()
  2102. return out, err
  2103. }
  2104. const opUpdateDistribution = "UpdateDistribution2016_09_29"
  2105. // UpdateDistributionRequest generates a "aws/request.Request" representing the
  2106. // client's request for the UpdateDistribution operation. The "output" return
  2107. // value can be used to capture response data after the request's "Send" method
  2108. // is called.
  2109. //
  2110. // See UpdateDistribution for usage and error information.
  2111. //
  2112. // Creating a request object using this method should be used when you want to inject
  2113. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2114. // access properties on the request object before or after sending the request. If
  2115. // you just want the service response, call the UpdateDistribution method directly
  2116. // instead.
  2117. //
  2118. // Note: You must call the "Send" method on the returned request object in order
  2119. // to execute the request.
  2120. //
  2121. // // Example sending a request using the UpdateDistributionRequest method.
  2122. // req, resp := client.UpdateDistributionRequest(params)
  2123. //
  2124. // err := req.Send()
  2125. // if err == nil { // resp is now filled
  2126. // fmt.Println(resp)
  2127. // }
  2128. //
  2129. func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) (req *request.Request, output *UpdateDistributionOutput) {
  2130. op := &request.Operation{
  2131. Name: opUpdateDistribution,
  2132. HTTPMethod: "PUT",
  2133. HTTPPath: "/2016-09-29/distribution/{Id}/config",
  2134. }
  2135. if input == nil {
  2136. input = &UpdateDistributionInput{}
  2137. }
  2138. req = c.newRequest(op, input, output)
  2139. output = &UpdateDistributionOutput{}
  2140. req.Data = output
  2141. return
  2142. }
  2143. // UpdateDistribution API operation for Amazon CloudFront.
  2144. //
  2145. // Update a distribution.
  2146. //
  2147. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2148. // with awserr.Error's Code and Message methods to get detailed information about
  2149. // the error.
  2150. //
  2151. // See the AWS API reference guide for Amazon CloudFront's
  2152. // API operation UpdateDistribution for usage and error information.
  2153. //
  2154. // Returned Error Codes:
  2155. // * AccessDenied
  2156. // Access denied.
  2157. //
  2158. // * CNAMEAlreadyExists
  2159. //
  2160. // * IllegalUpdate
  2161. // Origin and CallerReference cannot be updated.
  2162. //
  2163. // * InvalidIfMatchVersion
  2164. // The If-Match version is missing or not valid for the distribution.
  2165. //
  2166. // * MissingBody
  2167. // This operation requires a body. Ensure that the body is present and the Content-Type
  2168. // header is set.
  2169. //
  2170. // * NoSuchDistribution
  2171. // The specified distribution does not exist.
  2172. //
  2173. // * PreconditionFailed
  2174. // The precondition given in one or more of the request-header fields evaluated
  2175. // to false.
  2176. //
  2177. // * TooManyDistributionCNAMEs
  2178. // Your request contains more CNAMEs than are allowed per distribution.
  2179. //
  2180. // * InvalidDefaultRootObject
  2181. // The default root object file name is too big or contains an invalid character.
  2182. //
  2183. // * InvalidRelativePath
  2184. // The relative path is too big, is not URL-encoded, or does not begin with
  2185. // a slash (/).
  2186. //
  2187. // * InvalidErrorCode
  2188. //
  2189. // * InvalidResponseCode
  2190. //
  2191. // * InvalidArgument
  2192. // The argument is invalid.
  2193. //
  2194. // * InvalidOriginAccessIdentity
  2195. // The origin access identity is not valid or doesn't exist.
  2196. //
  2197. // * TooManyTrustedSigners
  2198. // Your request contains more trusted signers than are allowed per distribution.
  2199. //
  2200. // * TrustedSignerDoesNotExist
  2201. // One or more of your trusted signers do not exist.
  2202. //
  2203. // * InvalidViewerCertificate
  2204. //
  2205. // * InvalidMinimumProtocolVersion
  2206. //
  2207. // * InvalidRequiredProtocol
  2208. // This operation requires the HTTPS protocol. Ensure that you specify the HTTPS
  2209. // protocol in your request, or omit the RequiredProtocols element from your
  2210. // distribution configuration.
  2211. //
  2212. // * NoSuchOrigin
  2213. // No origin exists with the specified Origin Id.
  2214. //
  2215. // * TooManyOrigins
  2216. // You cannot create more origins for the distribution.
  2217. //
  2218. // * TooManyCacheBehaviors
  2219. // You cannot create more cache behaviors for the distribution.
  2220. //
  2221. // * TooManyCookieNamesInWhiteList
  2222. // Your request contains more cookie names in the whitelist than are allowed
  2223. // per cache behavior.
  2224. //
  2225. // * InvalidForwardCookies
  2226. // Your request contains forward cookies option which doesn't match with the
  2227. // expectation for the whitelisted list of cookie names. Either list of cookie
  2228. // names has been specified when not allowed or list of cookie names is missing
  2229. // when expected.
  2230. //
  2231. // * TooManyHeadersInForwardedValues
  2232. //
  2233. // * InvalidHeadersForS3Origin
  2234. //
  2235. // * InconsistentQuantities
  2236. // The value of Quantity and the size of Items do not match.
  2237. //
  2238. // * TooManyCertificates
  2239. // You cannot create anymore custom SSL/TLS certificates.
  2240. //
  2241. // * InvalidLocationCode
  2242. //
  2243. // * InvalidGeoRestrictionParameter
  2244. //
  2245. // * InvalidTTLOrder
  2246. //
  2247. // * InvalidWebACLId
  2248. //
  2249. // * TooManyOriginCustomHeaders
  2250. //
  2251. // * TooManyQueryStringParameters
  2252. //
  2253. // * InvalidQueryStringParameters
  2254. //
  2255. func (c *CloudFront) UpdateDistribution(input *UpdateDistributionInput) (*UpdateDistributionOutput, error) {
  2256. req, out := c.UpdateDistributionRequest(input)
  2257. err := req.Send()
  2258. return out, err
  2259. }
  2260. const opUpdateStreamingDistribution = "UpdateStreamingDistribution2016_09_29"
  2261. // UpdateStreamingDistributionRequest generates a "aws/request.Request" representing the
  2262. // client's request for the UpdateStreamingDistribution operation. The "output" return
  2263. // value can be used to capture response data after the request's "Send" method
  2264. // is called.
  2265. //
  2266. // See UpdateStreamingDistribution for usage and error information.
  2267. //
  2268. // Creating a request object using this method should be used when you want to inject
  2269. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2270. // access properties on the request object before or after sending the request. If
  2271. // you just want the service response, call the UpdateStreamingDistribution method directly
  2272. // instead.
  2273. //
  2274. // Note: You must call the "Send" method on the returned request object in order
  2275. // to execute the request.
  2276. //
  2277. // // Example sending a request using the UpdateStreamingDistributionRequest method.
  2278. // req, resp := client.UpdateStreamingDistributionRequest(params)
  2279. //
  2280. // err := req.Send()
  2281. // if err == nil { // resp is now filled
  2282. // fmt.Println(resp)
  2283. // }
  2284. //
  2285. func (c *CloudFront) UpdateStreamingDistributionRequest(input *UpdateStreamingDistributionInput) (req *request.Request, output *UpdateStreamingDistributionOutput) {
  2286. op := &request.Operation{
  2287. Name: opUpdateStreamingDistribution,
  2288. HTTPMethod: "PUT",
  2289. HTTPPath: "/2016-09-29/streaming-distribution/{Id}/config",
  2290. }
  2291. if input == nil {
  2292. input = &UpdateStreamingDistributionInput{}
  2293. }
  2294. req = c.newRequest(op, input, output)
  2295. output = &UpdateStreamingDistributionOutput{}
  2296. req.Data = output
  2297. return
  2298. }
  2299. // UpdateStreamingDistribution API operation for Amazon CloudFront.
  2300. //
  2301. // Update a streaming distribution.
  2302. //
  2303. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2304. // with awserr.Error's Code and Message methods to get detailed information about
  2305. // the error.
  2306. //
  2307. // See the AWS API reference guide for Amazon CloudFront's
  2308. // API operation UpdateStreamingDistribution for usage and error information.
  2309. //
  2310. // Returned Error Codes:
  2311. // * AccessDenied
  2312. // Access denied.
  2313. //
  2314. // * CNAMEAlreadyExists
  2315. //
  2316. // * IllegalUpdate
  2317. // Origin and CallerReference cannot be updated.
  2318. //
  2319. // * InvalidIfMatchVersion
  2320. // The If-Match version is missing or not valid for the distribution.
  2321. //
  2322. // * MissingBody
  2323. // This operation requires a body. Ensure that the body is present and the Content-Type
  2324. // header is set.
  2325. //
  2326. // * NoSuchStreamingDistribution
  2327. // The specified streaming distribution does not exist.
  2328. //
  2329. // * PreconditionFailed
  2330. // The precondition given in one or more of the request-header fields evaluated
  2331. // to false.
  2332. //
  2333. // * TooManyStreamingDistributionCNAMEs
  2334. //
  2335. // * InvalidArgument
  2336. // The argument is invalid.
  2337. //
  2338. // * InvalidOriginAccessIdentity
  2339. // The origin access identity is not valid or doesn't exist.
  2340. //
  2341. // * TooManyTrustedSigners
  2342. // Your request contains more trusted signers than are allowed per distribution.
  2343. //
  2344. // * TrustedSignerDoesNotExist
  2345. // One or more of your trusted signers do not exist.
  2346. //
  2347. // * InconsistentQuantities
  2348. // The value of Quantity and the size of Items do not match.
  2349. //
  2350. func (c *CloudFront) UpdateStreamingDistribution(input *UpdateStreamingDistributionInput) (*UpdateStreamingDistributionOutput, error) {
  2351. req, out := c.UpdateStreamingDistributionRequest(input)
  2352. err := req.Send()
  2353. return out, err
  2354. }
  2355. // A complex type that lists the AWS accounts, if any, that you included in
  2356. // the TrustedSigners complex type for this distribution. These are the accounts
  2357. // that you want to allow to create signed URLs for private content.
  2358. //
  2359. // The Signer complex type lists the AWS account number of the trusted signer
  2360. // or self if the signer is the AWS account that created the distribution. The
  2361. // Signer element also includes the IDs of any active CloudFront key pairs that
  2362. // are associated with the trusted signer's AWS account. If no KeyPairId element
  2363. // appears for a Signer, that signer can't create signed URLs.
  2364. //
  2365. // For more information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
  2366. // in the Amazon CloudFront Developer Guide.
  2367. type ActiveTrustedSigners struct {
  2368. _ struct{} `type:"structure"`
  2369. // Enabled is true if any of the AWS accounts listed in the TrustedSigners complex
  2370. // type for this RTMP distribution have active CloudFront key pairs. If not,
  2371. // Enabled is false.
  2372. //
  2373. // For more information, see ActiveTrustedSigners.
  2374. //
  2375. // Enabled is a required field
  2376. Enabled *bool `type:"boolean" required:"true"`
  2377. // A complex type that contains one Signer complex type for each trusted signer
  2378. // that is specified in the TrustedSigners complex type.
  2379. //
  2380. // For more information, see ActiveTrustedSigners.
  2381. Items []*Signer `locationNameList:"Signer" type:"list"`
  2382. // A complex type that contains one Signer complex type for each trusted signer
  2383. // specified in the TrustedSigners complex type.
  2384. //
  2385. // For more information, see ActiveTrustedSigners.
  2386. //
  2387. // Quantity is a required field
  2388. Quantity *int64 `type:"integer" required:"true"`
  2389. }
  2390. // String returns the string representation
  2391. func (s ActiveTrustedSigners) String() string {
  2392. return awsutil.Prettify(s)
  2393. }
  2394. // GoString returns the string representation
  2395. func (s ActiveTrustedSigners) GoString() string {
  2396. return s.String()
  2397. }
  2398. // A complex type that contains information about CNAMEs (alternate domain names),
  2399. // if any, for this distribution.
  2400. type Aliases struct {
  2401. _ struct{} `type:"structure"`
  2402. // A complex type that contains the CNAME aliases, if any, that you want to
  2403. // associate with this distribution.
  2404. Items []*string `locationNameList:"CNAME" type:"list"`
  2405. // The number of CNAME aliases, if any, that you want to associate with this
  2406. // distribution.
  2407. //
  2408. // Quantity is a required field
  2409. Quantity *int64 `type:"integer" required:"true"`
  2410. }
  2411. // String returns the string representation
  2412. func (s Aliases) String() string {
  2413. return awsutil.Prettify(s)
  2414. }
  2415. // GoString returns the string representation
  2416. func (s Aliases) GoString() string {
  2417. return s.String()
  2418. }
  2419. // Validate inspects the fields of the type to determine if they are valid.
  2420. func (s *Aliases) Validate() error {
  2421. invalidParams := request.ErrInvalidParams{Context: "Aliases"}
  2422. if s.Quantity == nil {
  2423. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  2424. }
  2425. if invalidParams.Len() > 0 {
  2426. return invalidParams
  2427. }
  2428. return nil
  2429. }
  2430. // A complex type that controls which HTTP methods CloudFront processes and
  2431. // forwards to your Amazon S3 bucket or your custom origin. There are three
  2432. // choices:
  2433. //
  2434. // * CloudFront forwards only GET and HEAD requests.
  2435. //
  2436. // * CloudFront forwards only GET, HEAD, and OPTIONS requests.
  2437. //
  2438. // * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE
  2439. // requests.
  2440. //
  2441. // If you pick the third choice, you may need to restrict access to your Amazon
  2442. // S3 bucket or to your custom origin so users can't perform operations that
  2443. // you don't want them to. For example, you might not want users to have permissions
  2444. // to delete objects from your origin.
  2445. type AllowedMethods struct {
  2446. _ struct{} `type:"structure"`
  2447. // A complex type that controls whether CloudFront caches the response to requests
  2448. // using the specified HTTP methods. There are two choices:
  2449. //
  2450. // * CloudFront caches responses to GET and HEAD requests.
  2451. //
  2452. // * CloudFront caches responses to GET, HEAD, and OPTIONS requests.
  2453. //
  2454. // If you pick the second choice for your Amazon S3 Origin, you may need to
  2455. // forward Access-Control-Request-Method, Access-Control-Request-Headers, and
  2456. // Origin headers for the responses to be cached correctly.
  2457. CachedMethods *CachedMethods `type:"structure"`
  2458. // A complex type that contains the HTTP methods that you want CloudFront to
  2459. // process and forward to your origin.
  2460. //
  2461. // Items is a required field
  2462. Items []*string `locationNameList:"Method" type:"list" required:"true"`
  2463. // The number of HTTP methods that you want CloudFront to forward to your origin.
  2464. // Valid values are 2 (for GET and HEAD requests), 3 (for GET, HEAD, and OPTIONS
  2465. // requests) and 7 (for GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests).
  2466. //
  2467. // Quantity is a required field
  2468. Quantity *int64 `type:"integer" required:"true"`
  2469. }
  2470. // String returns the string representation
  2471. func (s AllowedMethods) String() string {
  2472. return awsutil.Prettify(s)
  2473. }
  2474. // GoString returns the string representation
  2475. func (s AllowedMethods) GoString() string {
  2476. return s.String()
  2477. }
  2478. // Validate inspects the fields of the type to determine if they are valid.
  2479. func (s *AllowedMethods) Validate() error {
  2480. invalidParams := request.ErrInvalidParams{Context: "AllowedMethods"}
  2481. if s.Items == nil {
  2482. invalidParams.Add(request.NewErrParamRequired("Items"))
  2483. }
  2484. if s.Quantity == nil {
  2485. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  2486. }
  2487. if s.CachedMethods != nil {
  2488. if err := s.CachedMethods.Validate(); err != nil {
  2489. invalidParams.AddNested("CachedMethods", err.(request.ErrInvalidParams))
  2490. }
  2491. }
  2492. if invalidParams.Len() > 0 {
  2493. return invalidParams
  2494. }
  2495. return nil
  2496. }
  2497. // A complex type that describes how CloudFront processes requests.
  2498. //
  2499. // You must create at least as many cache behaviors (including the default cache
  2500. // behavior) as you have origins if you want CloudFront to distribute objects
  2501. // from all of the origins. Each cache behavior specifies the one origin from
  2502. // which you want CloudFront to get objects. If you have two origins and only
  2503. // the default cache behavior, the default cache behavior will cause CloudFront
  2504. // to get objects from one of the origins, but the other origin is never used.
  2505. //
  2506. // For the current limit on the number of cache behaviors that you can add to
  2507. // a distribution, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront)
  2508. // in the AWS General Reference.
  2509. //
  2510. // If you don't want to specify any cache behaviors, include only an empty CacheBehaviors
  2511. // element. Don't include an empty CacheBehavior element, or CloudFront returns
  2512. // a MalformedXML error.
  2513. //
  2514. // To delete all cache behaviors in an existing distribution, update the distribution
  2515. // configuration and include only an empty CacheBehaviors element.
  2516. //
  2517. // To add, change, or remove one or more cache behaviors, update the distribution
  2518. // configuration and specify all of the cache behaviors that you want to include
  2519. // in the updated distribution.
  2520. //
  2521. // For more information about cache behaviors, see Cache Behaviors (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior)
  2522. // in the Amazon CloudFront Developer Guide.
  2523. type CacheBehavior struct {
  2524. _ struct{} `type:"structure"`
  2525. // A complex type that controls which HTTP methods CloudFront processes and
  2526. // forwards to your Amazon S3 bucket or your custom origin. There are three
  2527. // choices:
  2528. //
  2529. // * CloudFront forwards only GET and HEAD requests.
  2530. //
  2531. // * CloudFront forwards only GET, HEAD, and OPTIONS requests.
  2532. //
  2533. // * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE
  2534. // requests.
  2535. //
  2536. // If you pick the third choice, you may need to restrict access to your Amazon
  2537. // S3 bucket or to your custom origin so users can't perform operations that
  2538. // you don't want them to. For example, you might not want users to have permissions
  2539. // to delete objects from your origin.
  2540. AllowedMethods *AllowedMethods `type:"structure"`
  2541. // Whether you want CloudFront to automatically compress certain files for this
  2542. // cache behavior. If so, specify true; if not, specify false. For more information,
  2543. // see Serving Compressed Files (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html)
  2544. // in the Amazon CloudFront Developer Guide.
  2545. Compress *bool `type:"boolean"`
  2546. // The default amount of time that you want objects to stay in CloudFront caches
  2547. // before CloudFront forwards another request to your origin to determine whether
  2548. // the object has been updated. The value that you specify applies only when
  2549. // your origin does not add HTTP headers such as Cache-Control max-age, Cache-Control
  2550. // s-maxage, and Expires to objects. For more information, see Specifying How
  2551. // Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html)
  2552. // in the Amazon CloudFront Developer Guide.
  2553. DefaultTTL *int64 `type:"long"`
  2554. // A complex type that specifies how CloudFront handles query strings and cookies.
  2555. //
  2556. // ForwardedValues is a required field
  2557. ForwardedValues *ForwardedValues `type:"structure" required:"true"`
  2558. // The maximum amount of time that you want objects to stay in CloudFront caches
  2559. // before CloudFront forwards another request to your origin to determine whether
  2560. // the object has been updated. The value that you specify applies only when
  2561. // your origin adds HTTP headers such as Cache-Control max-age, Cache-Control
  2562. // s-maxage, and Expires to objects. For more information, see Specifying How
  2563. // Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html)
  2564. // in the Amazon CloudFront Developer Guide.
  2565. MaxTTL *int64 `type:"long"`
  2566. // The minimum amount of time that you want objects to stay in CloudFront caches
  2567. // before CloudFront forwards another request to your origin to determine whether
  2568. // the object has been updated. For more information, see Specifying How Long
  2569. // Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html)
  2570. // in the Amazon Amazon CloudFront Developer Guide.
  2571. //
  2572. // You must specify 0 for MinTTL if you configure CloudFront to forward all
  2573. // headers to your origin (under Headers, if you specify 1 for Quantity and
  2574. // * for Name).
  2575. //
  2576. // MinTTL is a required field
  2577. MinTTL *int64 `type:"long" required:"true"`
  2578. // The pattern (for example, images/*.jpg) that specifies which requests to
  2579. // apply the behavior to. When CloudFront receives a viewer request, the requested
  2580. // path is compared with path patterns in the order in which cache behaviors
  2581. // are listed in the distribution.
  2582. //
  2583. // You can optionally include a slash (/) at the beginning of the path pattern.
  2584. // For example, /images/*.jpg. CloudFront behavior is the same with or without
  2585. // the leading /.
  2586. //
  2587. // The path pattern for the default cache behavior is * and cannot be changed.
  2588. // If the request for an object does not match the path pattern for any cache
  2589. // behaviors, CloudFront applies the behavior in the default cache behavior.
  2590. //
  2591. // For more information, see Path Pattern (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesPathPattern)
  2592. // in the Amazon CloudFront Developer Guide.
  2593. //
  2594. // PathPattern is a required field
  2595. PathPattern *string `type:"string" required:"true"`
  2596. // Indicates whether you want to distribute media files in the Microsoft Smooth
  2597. // Streaming format using the origin that is associated with this cache behavior.
  2598. // If so, specify true; if not, specify false. If you specify true for SmoothStreaming,
  2599. // you can still distribute other content using this cache behavior if the content
  2600. // matches the value of PathPattern.
  2601. SmoothStreaming *bool `type:"boolean"`
  2602. // The value of ID for the origin that you want CloudFront to route requests
  2603. // to when a request matches the path pattern either for a cache behavior or
  2604. // for the default cache behavior.
  2605. //
  2606. // TargetOriginId is a required field
  2607. TargetOriginId *string `type:"string" required:"true"`
  2608. // A complex type that specifies the AWS accounts, if any, that you want to
  2609. // allow to create signed URLs for private content.
  2610. //
  2611. // If you want to require signed URLs in requests for objects in the target
  2612. // origin that match the PathPattern for this cache behavior, specify true for
  2613. // Enabled, and specify the applicable values for Quantity and Items. For more
  2614. // information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
  2615. // in the Amazon Amazon CloudFront Developer Guide.
  2616. //
  2617. // If you don't want to require signed URLs in requests for objects that match
  2618. // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items.
  2619. //
  2620. // To add, change, or remove one or more trusted signers, change Enabled to
  2621. // true (if it's currently false), change Quantity as applicable, and specify
  2622. // all of the trusted signers that you want to include in the updated distribution.
  2623. //
  2624. // TrustedSigners is a required field
  2625. TrustedSigners *TrustedSigners `type:"structure" required:"true"`
  2626. // The protocol that viewers can use to access the files in the origin specified
  2627. // by TargetOriginId when a request matches the path pattern in PathPattern.
  2628. // You can specify the following options:
  2629. //
  2630. // * allow-all: Viewers can use HTTP or HTTPS.
  2631. //
  2632. // * redirect-to-https: If a viewer submits an HTTP request, CloudFront returns
  2633. // an HTTP status code of 301 (Moved Permanently) to the viewer along with
  2634. // the HTTPS URL. The viewer then resubmits the request using the new URL.
  2635. //
  2636. //
  2637. // * https-only: If a viewer sends an HTTP request, CloudFront returns an
  2638. // HTTP status code of 403 (Forbidden).
  2639. //
  2640. // For more information about requiring the HTTPS protocol, see Using an HTTPS
  2641. // Connection to Access Your Objects (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html)
  2642. // in the Amazon CloudFront Developer Guide.
  2643. //
  2644. // The only way to guarantee that viewers retrieve an object that was fetched
  2645. // from the origin using HTTPS is never to use any other protocol to fetch the
  2646. // object. If you have recently changed from HTTP to HTTPS, we recommend that
  2647. // you clear your objects' cache because cached objects are protocol agnostic.
  2648. // That means that an edge location will return an object from the cache regardless
  2649. // of whether the current request protocol matches the protocol used previously.
  2650. // For more information, see Specifying How Long Objects and Errors Stay in
  2651. // a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html)
  2652. // in the Amazon CloudFront Developer Guide.
  2653. //
  2654. // ViewerProtocolPolicy is a required field
  2655. ViewerProtocolPolicy *string `type:"string" required:"true" enum:"ViewerProtocolPolicy"`
  2656. }
  2657. // String returns the string representation
  2658. func (s CacheBehavior) String() string {
  2659. return awsutil.Prettify(s)
  2660. }
  2661. // GoString returns the string representation
  2662. func (s CacheBehavior) GoString() string {
  2663. return s.String()
  2664. }
  2665. // Validate inspects the fields of the type to determine if they are valid.
  2666. func (s *CacheBehavior) Validate() error {
  2667. invalidParams := request.ErrInvalidParams{Context: "CacheBehavior"}
  2668. if s.ForwardedValues == nil {
  2669. invalidParams.Add(request.NewErrParamRequired("ForwardedValues"))
  2670. }
  2671. if s.MinTTL == nil {
  2672. invalidParams.Add(request.NewErrParamRequired("MinTTL"))
  2673. }
  2674. if s.PathPattern == nil {
  2675. invalidParams.Add(request.NewErrParamRequired("PathPattern"))
  2676. }
  2677. if s.TargetOriginId == nil {
  2678. invalidParams.Add(request.NewErrParamRequired("TargetOriginId"))
  2679. }
  2680. if s.TrustedSigners == nil {
  2681. invalidParams.Add(request.NewErrParamRequired("TrustedSigners"))
  2682. }
  2683. if s.ViewerProtocolPolicy == nil {
  2684. invalidParams.Add(request.NewErrParamRequired("ViewerProtocolPolicy"))
  2685. }
  2686. if s.AllowedMethods != nil {
  2687. if err := s.AllowedMethods.Validate(); err != nil {
  2688. invalidParams.AddNested("AllowedMethods", err.(request.ErrInvalidParams))
  2689. }
  2690. }
  2691. if s.ForwardedValues != nil {
  2692. if err := s.ForwardedValues.Validate(); err != nil {
  2693. invalidParams.AddNested("ForwardedValues", err.(request.ErrInvalidParams))
  2694. }
  2695. }
  2696. if s.TrustedSigners != nil {
  2697. if err := s.TrustedSigners.Validate(); err != nil {
  2698. invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams))
  2699. }
  2700. }
  2701. if invalidParams.Len() > 0 {
  2702. return invalidParams
  2703. }
  2704. return nil
  2705. }
  2706. // A complex type that contains zero or more CacheBehavior elements.
  2707. type CacheBehaviors struct {
  2708. _ struct{} `type:"structure"`
  2709. // Optional: A complex type that contains cache behaviors for this distribution.
  2710. // If Quantity is 0, you can omit Items.
  2711. Items []*CacheBehavior `locationNameList:"CacheBehavior" type:"list"`
  2712. // The number of cache behaviors for this distribution.
  2713. //
  2714. // Quantity is a required field
  2715. Quantity *int64 `type:"integer" required:"true"`
  2716. }
  2717. // String returns the string representation
  2718. func (s CacheBehaviors) String() string {
  2719. return awsutil.Prettify(s)
  2720. }
  2721. // GoString returns the string representation
  2722. func (s CacheBehaviors) GoString() string {
  2723. return s.String()
  2724. }
  2725. // Validate inspects the fields of the type to determine if they are valid.
  2726. func (s *CacheBehaviors) Validate() error {
  2727. invalidParams := request.ErrInvalidParams{Context: "CacheBehaviors"}
  2728. if s.Quantity == nil {
  2729. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  2730. }
  2731. if s.Items != nil {
  2732. for i, v := range s.Items {
  2733. if v == nil {
  2734. continue
  2735. }
  2736. if err := v.Validate(); err != nil {
  2737. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  2738. }
  2739. }
  2740. }
  2741. if invalidParams.Len() > 0 {
  2742. return invalidParams
  2743. }
  2744. return nil
  2745. }
  2746. // A complex type that controls whether CloudFront caches the response to requests
  2747. // using the specified HTTP methods. There are two choices:
  2748. //
  2749. // * CloudFront caches responses to GET and HEAD requests.
  2750. //
  2751. // * CloudFront caches responses to GET, HEAD, and OPTIONS requests.
  2752. //
  2753. // If you pick the second choice for your Amazon S3 Origin, you may need to
  2754. // forward Access-Control-Request-Method, Access-Control-Request-Headers, and
  2755. // Origin headers for the responses to be cached correctly.
  2756. type CachedMethods struct {
  2757. _ struct{} `type:"structure"`
  2758. // A complex type that contains the HTTP methods that you want CloudFront to
  2759. // cache responses to.
  2760. //
  2761. // Items is a required field
  2762. Items []*string `locationNameList:"Method" type:"list" required:"true"`
  2763. // The number of HTTP methods for which you want CloudFront to cache responses.
  2764. // Valid values are 2 (for caching responses to GET and HEAD requests) and 3
  2765. // (for caching responses to GET, HEAD, and OPTIONS requests).
  2766. //
  2767. // Quantity is a required field
  2768. Quantity *int64 `type:"integer" required:"true"`
  2769. }
  2770. // String returns the string representation
  2771. func (s CachedMethods) String() string {
  2772. return awsutil.Prettify(s)
  2773. }
  2774. // GoString returns the string representation
  2775. func (s CachedMethods) GoString() string {
  2776. return s.String()
  2777. }
  2778. // Validate inspects the fields of the type to determine if they are valid.
  2779. func (s *CachedMethods) Validate() error {
  2780. invalidParams := request.ErrInvalidParams{Context: "CachedMethods"}
  2781. if s.Items == nil {
  2782. invalidParams.Add(request.NewErrParamRequired("Items"))
  2783. }
  2784. if s.Quantity == nil {
  2785. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  2786. }
  2787. if invalidParams.Len() > 0 {
  2788. return invalidParams
  2789. }
  2790. return nil
  2791. }
  2792. // A complex type that specifies whether you want CloudFront to forward cookies
  2793. // to the origin and, if so, which ones. For more information about forwarding
  2794. // cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies
  2795. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html)
  2796. // in the Amazon CloudFront Developer Guide.
  2797. type CookieNames struct {
  2798. _ struct{} `type:"structure"`
  2799. // A complex type that contains one Name element for each cookie that you want
  2800. // CloudFront to forward to the origin for this cache behavior.
  2801. Items []*string `locationNameList:"Name" type:"list"`
  2802. // The number of different cookies that you want CloudFront to forward to the
  2803. // origin for this cache behavior.
  2804. //
  2805. // Quantity is a required field
  2806. Quantity *int64 `type:"integer" required:"true"`
  2807. }
  2808. // String returns the string representation
  2809. func (s CookieNames) String() string {
  2810. return awsutil.Prettify(s)
  2811. }
  2812. // GoString returns the string representation
  2813. func (s CookieNames) GoString() string {
  2814. return s.String()
  2815. }
  2816. // Validate inspects the fields of the type to determine if they are valid.
  2817. func (s *CookieNames) Validate() error {
  2818. invalidParams := request.ErrInvalidParams{Context: "CookieNames"}
  2819. if s.Quantity == nil {
  2820. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  2821. }
  2822. if invalidParams.Len() > 0 {
  2823. return invalidParams
  2824. }
  2825. return nil
  2826. }
  2827. // A complex type that specifies whether you want CloudFront to forward cookies
  2828. // to the origin and, if so, which ones. For more information about forwarding
  2829. // cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies
  2830. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html)
  2831. // in the Amazon CloudFront Developer Guide.
  2832. type CookiePreference struct {
  2833. _ struct{} `type:"structure"`
  2834. // Specifies which cookies to forward to the origin for this cache behavior:
  2835. // all, none, or the list of cookies specified in the WhitelistedNames complex
  2836. // type.
  2837. //
  2838. // Amazon S3 doesn't process cookies. When the cache behavior is forwarding
  2839. // requests to an Amazon S3 origin, specify none for the Forward element.
  2840. //
  2841. // Forward is a required field
  2842. Forward *string `type:"string" required:"true" enum:"ItemSelection"`
  2843. // Required if you specify whitelist for the value of Forward:. A complex type
  2844. // that specifies how many different cookies you want CloudFront to forward
  2845. // to the origin for this cache behavior and, if you want to forward selected
  2846. // cookies, the names of those cookies.
  2847. //
  2848. // If you specify all or none for the value of Forward, omit WhitelistedNames.
  2849. // If you change the value of Forward from whitelist to all or none and you
  2850. // don't delete the WhitelistedNames element and its child elements, CloudFront
  2851. // deletes them automatically.
  2852. //
  2853. // For the current limit on the number of cookie names that you can whitelist
  2854. // for each cache behavior, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront)
  2855. // in the AWS General Reference.
  2856. WhitelistedNames *CookieNames `type:"structure"`
  2857. }
  2858. // String returns the string representation
  2859. func (s CookiePreference) String() string {
  2860. return awsutil.Prettify(s)
  2861. }
  2862. // GoString returns the string representation
  2863. func (s CookiePreference) GoString() string {
  2864. return s.String()
  2865. }
  2866. // Validate inspects the fields of the type to determine if they are valid.
  2867. func (s *CookiePreference) Validate() error {
  2868. invalidParams := request.ErrInvalidParams{Context: "CookiePreference"}
  2869. if s.Forward == nil {
  2870. invalidParams.Add(request.NewErrParamRequired("Forward"))
  2871. }
  2872. if s.WhitelistedNames != nil {
  2873. if err := s.WhitelistedNames.Validate(); err != nil {
  2874. invalidParams.AddNested("WhitelistedNames", err.(request.ErrInvalidParams))
  2875. }
  2876. }
  2877. if invalidParams.Len() > 0 {
  2878. return invalidParams
  2879. }
  2880. return nil
  2881. }
  2882. // The request to create a new origin access identity.
  2883. type CreateCloudFrontOriginAccessIdentityInput struct {
  2884. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"`
  2885. // The current configuration information for the identity.
  2886. //
  2887. // CloudFrontOriginAccessIdentityConfig is a required field
  2888. CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true"`
  2889. }
  2890. // String returns the string representation
  2891. func (s CreateCloudFrontOriginAccessIdentityInput) String() string {
  2892. return awsutil.Prettify(s)
  2893. }
  2894. // GoString returns the string representation
  2895. func (s CreateCloudFrontOriginAccessIdentityInput) GoString() string {
  2896. return s.String()
  2897. }
  2898. // Validate inspects the fields of the type to determine if they are valid.
  2899. func (s *CreateCloudFrontOriginAccessIdentityInput) Validate() error {
  2900. invalidParams := request.ErrInvalidParams{Context: "CreateCloudFrontOriginAccessIdentityInput"}
  2901. if s.CloudFrontOriginAccessIdentityConfig == nil {
  2902. invalidParams.Add(request.NewErrParamRequired("CloudFrontOriginAccessIdentityConfig"))
  2903. }
  2904. if s.CloudFrontOriginAccessIdentityConfig != nil {
  2905. if err := s.CloudFrontOriginAccessIdentityConfig.Validate(); err != nil {
  2906. invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(request.ErrInvalidParams))
  2907. }
  2908. }
  2909. if invalidParams.Len() > 0 {
  2910. return invalidParams
  2911. }
  2912. return nil
  2913. }
  2914. // The returned result of the corresponding request.
  2915. type CreateCloudFrontOriginAccessIdentityOutput struct {
  2916. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"`
  2917. // The origin access identity's information.
  2918. CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"`
  2919. // The current version of the origin access identity created.
  2920. ETag *string `location:"header" locationName:"ETag" type:"string"`
  2921. // The fully qualified URI of the new origin access identity just created. For
  2922. // example: https://cloudfront.amazonaws.com/2010-11-01/origin-access-identity/cloudfront/E74FTE3AJFJ256A.
  2923. Location *string `location:"header" locationName:"Location" type:"string"`
  2924. }
  2925. // String returns the string representation
  2926. func (s CreateCloudFrontOriginAccessIdentityOutput) String() string {
  2927. return awsutil.Prettify(s)
  2928. }
  2929. // GoString returns the string representation
  2930. func (s CreateCloudFrontOriginAccessIdentityOutput) GoString() string {
  2931. return s.String()
  2932. }
  2933. // The request to create a new distribution.
  2934. type CreateDistributionInput struct {
  2935. _ struct{} `type:"structure" payload:"DistributionConfig"`
  2936. // The distribution's configuration information.
  2937. //
  2938. // DistributionConfig is a required field
  2939. DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true"`
  2940. }
  2941. // String returns the string representation
  2942. func (s CreateDistributionInput) String() string {
  2943. return awsutil.Prettify(s)
  2944. }
  2945. // GoString returns the string representation
  2946. func (s CreateDistributionInput) GoString() string {
  2947. return s.String()
  2948. }
  2949. // Validate inspects the fields of the type to determine if they are valid.
  2950. func (s *CreateDistributionInput) Validate() error {
  2951. invalidParams := request.ErrInvalidParams{Context: "CreateDistributionInput"}
  2952. if s.DistributionConfig == nil {
  2953. invalidParams.Add(request.NewErrParamRequired("DistributionConfig"))
  2954. }
  2955. if s.DistributionConfig != nil {
  2956. if err := s.DistributionConfig.Validate(); err != nil {
  2957. invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams))
  2958. }
  2959. }
  2960. if invalidParams.Len() > 0 {
  2961. return invalidParams
  2962. }
  2963. return nil
  2964. }
  2965. // The returned result of the corresponding request.
  2966. type CreateDistributionOutput struct {
  2967. _ struct{} `type:"structure" payload:"Distribution"`
  2968. // The distribution's information.
  2969. Distribution *Distribution `type:"structure"`
  2970. // The current version of the distribution created.
  2971. ETag *string `location:"header" locationName:"ETag" type:"string"`
  2972. // The fully qualified URI of the new distribution resource just created. For
  2973. // example: https://cloudfront.amazonaws.com/2010-11-01/distribution/EDFDVBD632BHDS5.
  2974. Location *string `location:"header" locationName:"Location" type:"string"`
  2975. }
  2976. // String returns the string representation
  2977. func (s CreateDistributionOutput) String() string {
  2978. return awsutil.Prettify(s)
  2979. }
  2980. // GoString returns the string representation
  2981. func (s CreateDistributionOutput) GoString() string {
  2982. return s.String()
  2983. }
  2984. // The request to create a new distribution with tags.
  2985. type CreateDistributionWithTagsInput struct {
  2986. _ struct{} `type:"structure" payload:"DistributionConfigWithTags"`
  2987. // The distribution's configuration information.
  2988. //
  2989. // DistributionConfigWithTags is a required field
  2990. DistributionConfigWithTags *DistributionConfigWithTags `locationName:"DistributionConfigWithTags" type:"structure" required:"true"`
  2991. }
  2992. // String returns the string representation
  2993. func (s CreateDistributionWithTagsInput) String() string {
  2994. return awsutil.Prettify(s)
  2995. }
  2996. // GoString returns the string representation
  2997. func (s CreateDistributionWithTagsInput) GoString() string {
  2998. return s.String()
  2999. }
  3000. // Validate inspects the fields of the type to determine if they are valid.
  3001. func (s *CreateDistributionWithTagsInput) Validate() error {
  3002. invalidParams := request.ErrInvalidParams{Context: "CreateDistributionWithTagsInput"}
  3003. if s.DistributionConfigWithTags == nil {
  3004. invalidParams.Add(request.NewErrParamRequired("DistributionConfigWithTags"))
  3005. }
  3006. if s.DistributionConfigWithTags != nil {
  3007. if err := s.DistributionConfigWithTags.Validate(); err != nil {
  3008. invalidParams.AddNested("DistributionConfigWithTags", err.(request.ErrInvalidParams))
  3009. }
  3010. }
  3011. if invalidParams.Len() > 0 {
  3012. return invalidParams
  3013. }
  3014. return nil
  3015. }
  3016. // The returned result of the corresponding request.
  3017. type CreateDistributionWithTagsOutput struct {
  3018. _ struct{} `type:"structure" payload:"Distribution"`
  3019. // The distribution's information.
  3020. Distribution *Distribution `type:"structure"`
  3021. // The current version of the distribution created.
  3022. ETag *string `location:"header" locationName:"ETag" type:"string"`
  3023. // The fully qualified URI of the new distribution resource just created. For
  3024. // example: https://cloudfront.amazonaws.com/2010-11-01/distribution/EDFDVBD632BHDS5.
  3025. Location *string `location:"header" locationName:"Location" type:"string"`
  3026. }
  3027. // String returns the string representation
  3028. func (s CreateDistributionWithTagsOutput) String() string {
  3029. return awsutil.Prettify(s)
  3030. }
  3031. // GoString returns the string representation
  3032. func (s CreateDistributionWithTagsOutput) GoString() string {
  3033. return s.String()
  3034. }
  3035. // The request to create an invalidation.
  3036. type CreateInvalidationInput struct {
  3037. _ struct{} `type:"structure" payload:"InvalidationBatch"`
  3038. // The distribution's id.
  3039. //
  3040. // DistributionId is a required field
  3041. DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"`
  3042. // The batch information for the invalidation.
  3043. //
  3044. // InvalidationBatch is a required field
  3045. InvalidationBatch *InvalidationBatch `locationName:"InvalidationBatch" type:"structure" required:"true"`
  3046. }
  3047. // String returns the string representation
  3048. func (s CreateInvalidationInput) String() string {
  3049. return awsutil.Prettify(s)
  3050. }
  3051. // GoString returns the string representation
  3052. func (s CreateInvalidationInput) GoString() string {
  3053. return s.String()
  3054. }
  3055. // Validate inspects the fields of the type to determine if they are valid.
  3056. func (s *CreateInvalidationInput) Validate() error {
  3057. invalidParams := request.ErrInvalidParams{Context: "CreateInvalidationInput"}
  3058. if s.DistributionId == nil {
  3059. invalidParams.Add(request.NewErrParamRequired("DistributionId"))
  3060. }
  3061. if s.InvalidationBatch == nil {
  3062. invalidParams.Add(request.NewErrParamRequired("InvalidationBatch"))
  3063. }
  3064. if s.InvalidationBatch != nil {
  3065. if err := s.InvalidationBatch.Validate(); err != nil {
  3066. invalidParams.AddNested("InvalidationBatch", err.(request.ErrInvalidParams))
  3067. }
  3068. }
  3069. if invalidParams.Len() > 0 {
  3070. return invalidParams
  3071. }
  3072. return nil
  3073. }
  3074. // The returned result of the corresponding request.
  3075. type CreateInvalidationOutput struct {
  3076. _ struct{} `type:"structure" payload:"Invalidation"`
  3077. // The invalidation's information.
  3078. Invalidation *Invalidation `type:"structure"`
  3079. // The fully qualified URI of the distribution and invalidation batch request,
  3080. // including the Invalidation ID.
  3081. Location *string `location:"header" locationName:"Location" type:"string"`
  3082. }
  3083. // String returns the string representation
  3084. func (s CreateInvalidationOutput) String() string {
  3085. return awsutil.Prettify(s)
  3086. }
  3087. // GoString returns the string representation
  3088. func (s CreateInvalidationOutput) GoString() string {
  3089. return s.String()
  3090. }
  3091. // The request to create a new streaming distribution.
  3092. type CreateStreamingDistributionInput struct {
  3093. _ struct{} `type:"structure" payload:"StreamingDistributionConfig"`
  3094. // The streaming distribution's configuration information.
  3095. //
  3096. // StreamingDistributionConfig is a required field
  3097. StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true"`
  3098. }
  3099. // String returns the string representation
  3100. func (s CreateStreamingDistributionInput) String() string {
  3101. return awsutil.Prettify(s)
  3102. }
  3103. // GoString returns the string representation
  3104. func (s CreateStreamingDistributionInput) GoString() string {
  3105. return s.String()
  3106. }
  3107. // Validate inspects the fields of the type to determine if they are valid.
  3108. func (s *CreateStreamingDistributionInput) Validate() error {
  3109. invalidParams := request.ErrInvalidParams{Context: "CreateStreamingDistributionInput"}
  3110. if s.StreamingDistributionConfig == nil {
  3111. invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig"))
  3112. }
  3113. if s.StreamingDistributionConfig != nil {
  3114. if err := s.StreamingDistributionConfig.Validate(); err != nil {
  3115. invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams))
  3116. }
  3117. }
  3118. if invalidParams.Len() > 0 {
  3119. return invalidParams
  3120. }
  3121. return nil
  3122. }
  3123. // The returned result of the corresponding request.
  3124. type CreateStreamingDistributionOutput struct {
  3125. _ struct{} `type:"structure" payload:"StreamingDistribution"`
  3126. // The current version of the streaming distribution created.
  3127. ETag *string `location:"header" locationName:"ETag" type:"string"`
  3128. // The fully qualified URI of the new streaming distribution resource just created.
  3129. // For example: https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8.
  3130. Location *string `location:"header" locationName:"Location" type:"string"`
  3131. // The streaming distribution's information.
  3132. StreamingDistribution *StreamingDistribution `type:"structure"`
  3133. }
  3134. // String returns the string representation
  3135. func (s CreateStreamingDistributionOutput) String() string {
  3136. return awsutil.Prettify(s)
  3137. }
  3138. // GoString returns the string representation
  3139. func (s CreateStreamingDistributionOutput) GoString() string {
  3140. return s.String()
  3141. }
  3142. // The request to create a new streaming distribution with tags.
  3143. type CreateStreamingDistributionWithTagsInput struct {
  3144. _ struct{} `type:"structure" payload:"StreamingDistributionConfigWithTags"`
  3145. // The streaming distribution's configuration information.
  3146. //
  3147. // StreamingDistributionConfigWithTags is a required field
  3148. StreamingDistributionConfigWithTags *StreamingDistributionConfigWithTags `locationName:"StreamingDistributionConfigWithTags" type:"structure" required:"true"`
  3149. }
  3150. // String returns the string representation
  3151. func (s CreateStreamingDistributionWithTagsInput) String() string {
  3152. return awsutil.Prettify(s)
  3153. }
  3154. // GoString returns the string representation
  3155. func (s CreateStreamingDistributionWithTagsInput) GoString() string {
  3156. return s.String()
  3157. }
  3158. // Validate inspects the fields of the type to determine if they are valid.
  3159. func (s *CreateStreamingDistributionWithTagsInput) Validate() error {
  3160. invalidParams := request.ErrInvalidParams{Context: "CreateStreamingDistributionWithTagsInput"}
  3161. if s.StreamingDistributionConfigWithTags == nil {
  3162. invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfigWithTags"))
  3163. }
  3164. if s.StreamingDistributionConfigWithTags != nil {
  3165. if err := s.StreamingDistributionConfigWithTags.Validate(); err != nil {
  3166. invalidParams.AddNested("StreamingDistributionConfigWithTags", err.(request.ErrInvalidParams))
  3167. }
  3168. }
  3169. if invalidParams.Len() > 0 {
  3170. return invalidParams
  3171. }
  3172. return nil
  3173. }
  3174. // The returned result of the corresponding request.
  3175. type CreateStreamingDistributionWithTagsOutput struct {
  3176. _ struct{} `type:"structure" payload:"StreamingDistribution"`
  3177. ETag *string `location:"header" locationName:"ETag" type:"string"`
  3178. // The fully qualified URI of the new streaming distribution resource just created.
  3179. // For example: https://cloudfront.amazonaws.com/2010-11-01/streaming-distribution/EGTXBD79H29TRA8.
  3180. Location *string `location:"header" locationName:"Location" type:"string"`
  3181. // The streaming distribution's information.
  3182. StreamingDistribution *StreamingDistribution `type:"structure"`
  3183. }
  3184. // String returns the string representation
  3185. func (s CreateStreamingDistributionWithTagsOutput) String() string {
  3186. return awsutil.Prettify(s)
  3187. }
  3188. // GoString returns the string representation
  3189. func (s CreateStreamingDistributionWithTagsOutput) GoString() string {
  3190. return s.String()
  3191. }
  3192. // A complex type that controls:
  3193. //
  3194. // * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range
  3195. // with custom error messages before returning the response to the viewer.
  3196. //
  3197. //
  3198. // * How long CloudFront caches HTTP status codes in the 4xx and 5xx range.
  3199. //
  3200. // For more information about custom error pages, see Customizing Error Responses
  3201. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)
  3202. // in the Amazon CloudFront Developer Guide.
  3203. type CustomErrorResponse struct {
  3204. _ struct{} `type:"structure"`
  3205. // The minimum amount of time, in seconds, that you want CloudFront to cache
  3206. // the HTTP status code specified in ErrorCode. When this time period has elapsed,
  3207. // CloudFront queries your origin to see whether the problem that caused the
  3208. // error has been resolved and the requested object is now available.
  3209. //
  3210. // If you don't want to specify a value, include an empty element, <ErrorCachingMinTTL>,
  3211. // in the XML document.
  3212. //
  3213. // For more information, see Customizing Error Responses (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)
  3214. // in the Amazon CloudFront Developer Guide.
  3215. ErrorCachingMinTTL *int64 `type:"long"`
  3216. // The HTTP status code for which you want to specify a custom error page and/or
  3217. // a caching duration.
  3218. //
  3219. // ErrorCode is a required field
  3220. ErrorCode *int64 `type:"integer" required:"true"`
  3221. // The HTTP status code that you want CloudFront to return to the viewer along
  3222. // with the custom error page. There are a variety of reasons that you might
  3223. // want CloudFront to return a status code different from the status code that
  3224. // your origin returned to CloudFront, for example:
  3225. //
  3226. // * Some Internet devices (some firewalls and corporate proxies, for example)
  3227. // intercept HTTP 4xx and 5xx and prevent the response from being returned
  3228. // to the viewer. If you substitute 200, the response typically won't be
  3229. // intercepted.
  3230. //
  3231. // * If you don't care about distinguishing among different client errors
  3232. // or server errors, you can specify 400 or 500 as the ResponseCode for all
  3233. // 4xx or 5xx errors.
  3234. //
  3235. // * You might want to return a 200 status code (OK) and static website so
  3236. // your customers don't know that your website is down.
  3237. //
  3238. // If you specify a value for ResponseCode, you must also specify a value for
  3239. // ResponsePagePath. If you don't want to specify a value, include an empty
  3240. // element, <ResponseCode>, in the XML document.
  3241. ResponseCode *string `type:"string"`
  3242. // The path to the custom error page that you want CloudFront to return to a
  3243. // viewer when your origin returns the HTTP status code specified by ErrorCode,
  3244. // for example, /4xx-errors/403-forbidden.html. If you want to store your objects
  3245. // and your custom error pages in different locations, your distribution must
  3246. // include a cache behavior for which the following is true:
  3247. //
  3248. // * The value of PathPattern matches the path to your custom error messages.
  3249. // For example, suppose you saved custom error pages for 4xx errors in an
  3250. // Amazon S3 bucket in a directory named /4xx-errors. Your distribution must
  3251. // include a cache behavior for which the path pattern routes requests for
  3252. // your custom error pages to that location, for example, /4xx-errors/*.
  3253. //
  3254. //
  3255. // * The value of TargetOriginId specifies the value of the ID element for
  3256. // the origin that contains your custom error pages.
  3257. //
  3258. // If you specify a value for ResponsePagePath, you must also specify a value
  3259. // for ResponseCode. If you don't want to specify a value, include an empty
  3260. // element, <ResponsePagePath>, in the XML document.
  3261. //
  3262. // We recommend that you store custom error pages in an Amazon S3 bucket. If
  3263. // you store custom error pages on an HTTP server and the server starts to return
  3264. // 5xx errors, CloudFront can't get the files that you want to return to viewers
  3265. // because the origin server is unavailable.
  3266. ResponsePagePath *string `type:"string"`
  3267. }
  3268. // String returns the string representation
  3269. func (s CustomErrorResponse) String() string {
  3270. return awsutil.Prettify(s)
  3271. }
  3272. // GoString returns the string representation
  3273. func (s CustomErrorResponse) GoString() string {
  3274. return s.String()
  3275. }
  3276. // Validate inspects the fields of the type to determine if they are valid.
  3277. func (s *CustomErrorResponse) Validate() error {
  3278. invalidParams := request.ErrInvalidParams{Context: "CustomErrorResponse"}
  3279. if s.ErrorCode == nil {
  3280. invalidParams.Add(request.NewErrParamRequired("ErrorCode"))
  3281. }
  3282. if invalidParams.Len() > 0 {
  3283. return invalidParams
  3284. }
  3285. return nil
  3286. }
  3287. // A complex type that controls:
  3288. //
  3289. // * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range
  3290. // with custom error messages before returning the response to the viewer.
  3291. //
  3292. // * How long CloudFront caches HTTP status codes in the 4xx and 5xx range.
  3293. //
  3294. // For more information about custom error pages, see Customizing Error Responses
  3295. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)
  3296. // in the Amazon CloudFront Developer Guide.
  3297. type CustomErrorResponses struct {
  3298. _ struct{} `type:"structure"`
  3299. // A complex type that contains a CustomErrorResponse element for each HTTP
  3300. // status code for which you want to specify a custom error page and/or a caching
  3301. // duration.
  3302. Items []*CustomErrorResponse `locationNameList:"CustomErrorResponse" type:"list"`
  3303. // The number of HTTP status codes for which you want to specify a custom error
  3304. // page and/or a caching duration. If Quantity is 0, you can omit Items.
  3305. //
  3306. // Quantity is a required field
  3307. Quantity *int64 `type:"integer" required:"true"`
  3308. }
  3309. // String returns the string representation
  3310. func (s CustomErrorResponses) String() string {
  3311. return awsutil.Prettify(s)
  3312. }
  3313. // GoString returns the string representation
  3314. func (s CustomErrorResponses) GoString() string {
  3315. return s.String()
  3316. }
  3317. // Validate inspects the fields of the type to determine if they are valid.
  3318. func (s *CustomErrorResponses) Validate() error {
  3319. invalidParams := request.ErrInvalidParams{Context: "CustomErrorResponses"}
  3320. if s.Quantity == nil {
  3321. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  3322. }
  3323. if s.Items != nil {
  3324. for i, v := range s.Items {
  3325. if v == nil {
  3326. continue
  3327. }
  3328. if err := v.Validate(); err != nil {
  3329. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  3330. }
  3331. }
  3332. }
  3333. if invalidParams.Len() > 0 {
  3334. return invalidParams
  3335. }
  3336. return nil
  3337. }
  3338. // A complex type that contains the list of Custom Headers for each origin.
  3339. type CustomHeaders struct {
  3340. _ struct{} `type:"structure"`
  3341. // Optional: A list that contains one OriginCustomHeader element for each custom
  3342. // header that you want CloudFront to forward to the origin. If Quantity is
  3343. // 0, omit Items.
  3344. Items []*OriginCustomHeader `locationNameList:"OriginCustomHeader" type:"list"`
  3345. // The number of custom headers, if any, for this distribution.
  3346. //
  3347. // Quantity is a required field
  3348. Quantity *int64 `type:"integer" required:"true"`
  3349. }
  3350. // String returns the string representation
  3351. func (s CustomHeaders) String() string {
  3352. return awsutil.Prettify(s)
  3353. }
  3354. // GoString returns the string representation
  3355. func (s CustomHeaders) GoString() string {
  3356. return s.String()
  3357. }
  3358. // Validate inspects the fields of the type to determine if they are valid.
  3359. func (s *CustomHeaders) Validate() error {
  3360. invalidParams := request.ErrInvalidParams{Context: "CustomHeaders"}
  3361. if s.Quantity == nil {
  3362. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  3363. }
  3364. if s.Items != nil {
  3365. for i, v := range s.Items {
  3366. if v == nil {
  3367. continue
  3368. }
  3369. if err := v.Validate(); err != nil {
  3370. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  3371. }
  3372. }
  3373. }
  3374. if invalidParams.Len() > 0 {
  3375. return invalidParams
  3376. }
  3377. return nil
  3378. }
  3379. // A customer origin.
  3380. type CustomOriginConfig struct {
  3381. _ struct{} `type:"structure"`
  3382. // The HTTP port the custom origin listens on.
  3383. //
  3384. // HTTPPort is a required field
  3385. HTTPPort *int64 `type:"integer" required:"true"`
  3386. // The HTTPS port the custom origin listens on.
  3387. //
  3388. // HTTPSPort is a required field
  3389. HTTPSPort *int64 `type:"integer" required:"true"`
  3390. // The origin protocol policy to apply to your origin.
  3391. //
  3392. // OriginProtocolPolicy is a required field
  3393. OriginProtocolPolicy *string `type:"string" required:"true" enum:"OriginProtocolPolicy"`
  3394. // The SSL/TLS protocols that you want CloudFront to use when communicating
  3395. // with your origin over HTTPS.
  3396. OriginSslProtocols *OriginSslProtocols `type:"structure"`
  3397. }
  3398. // String returns the string representation
  3399. func (s CustomOriginConfig) String() string {
  3400. return awsutil.Prettify(s)
  3401. }
  3402. // GoString returns the string representation
  3403. func (s CustomOriginConfig) GoString() string {
  3404. return s.String()
  3405. }
  3406. // Validate inspects the fields of the type to determine if they are valid.
  3407. func (s *CustomOriginConfig) Validate() error {
  3408. invalidParams := request.ErrInvalidParams{Context: "CustomOriginConfig"}
  3409. if s.HTTPPort == nil {
  3410. invalidParams.Add(request.NewErrParamRequired("HTTPPort"))
  3411. }
  3412. if s.HTTPSPort == nil {
  3413. invalidParams.Add(request.NewErrParamRequired("HTTPSPort"))
  3414. }
  3415. if s.OriginProtocolPolicy == nil {
  3416. invalidParams.Add(request.NewErrParamRequired("OriginProtocolPolicy"))
  3417. }
  3418. if s.OriginSslProtocols != nil {
  3419. if err := s.OriginSslProtocols.Validate(); err != nil {
  3420. invalidParams.AddNested("OriginSslProtocols", err.(request.ErrInvalidParams))
  3421. }
  3422. }
  3423. if invalidParams.Len() > 0 {
  3424. return invalidParams
  3425. }
  3426. return nil
  3427. }
  3428. // A complex type that describes the default cache behavior if you do not specify
  3429. // a CacheBehavior element or if files don't match any of the values of PathPattern
  3430. // in CacheBehavior elements. You must create exactly one default cache behavior.
  3431. type DefaultCacheBehavior struct {
  3432. _ struct{} `type:"structure"`
  3433. // A complex type that controls which HTTP methods CloudFront processes and
  3434. // forwards to your Amazon S3 bucket or your custom origin. There are three
  3435. // choices:
  3436. //
  3437. // * CloudFront forwards only GET and HEAD requests.
  3438. //
  3439. // * CloudFront forwards only GET, HEAD, and OPTIONS requests.
  3440. //
  3441. // * CloudFront forwards GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE
  3442. // requests.
  3443. //
  3444. // If you pick the third choice, you may need to restrict access to your Amazon
  3445. // S3 bucket or to your custom origin so users can't perform operations that
  3446. // you don't want them to. For example, you might not want users to have permissions
  3447. // to delete objects from your origin.
  3448. AllowedMethods *AllowedMethods `type:"structure"`
  3449. // Whether you want CloudFront to automatically compress certain files for this
  3450. // cache behavior. If so, specify true; if not, specify false. For more information,
  3451. // see Serving Compressed Files (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html)
  3452. // in the Amazon CloudFront Developer Guide.
  3453. Compress *bool `type:"boolean"`
  3454. // The default amount of time that you want objects to stay in CloudFront caches
  3455. // before CloudFront forwards another request to your origin to determine whether
  3456. // the object has been updated. The value that you specify applies only when
  3457. // your origin does not add HTTP headers such as Cache-Control max-age, Cache-Control
  3458. // s-maxage, and Expires to objects. For more information, see Specifying How
  3459. // Long Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html)
  3460. // in the Amazon CloudFront Developer Guide.
  3461. DefaultTTL *int64 `type:"long"`
  3462. // A complex type that specifies how CloudFront handles query strings and cookies.
  3463. //
  3464. // ForwardedValues is a required field
  3465. ForwardedValues *ForwardedValues `type:"structure" required:"true"`
  3466. MaxTTL *int64 `type:"long"`
  3467. // The minimum amount of time that you want objects to stay in CloudFront caches
  3468. // before CloudFront forwards another request to your origin to determine whether
  3469. // the object has been updated. For more information, see Specifying How Long
  3470. // Objects and Errors Stay in a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html)
  3471. // in the Amazon Amazon CloudFront Developer Guide.
  3472. //
  3473. // You must specify 0 for MinTTL if you configure CloudFront to forward all
  3474. // headers to your origin (under Headers, if you specify 1 for Quantity and
  3475. // * for Name).
  3476. //
  3477. // MinTTL is a required field
  3478. MinTTL *int64 `type:"long" required:"true"`
  3479. // Indicates whether you want to distribute media files in the Microsoft Smooth
  3480. // Streaming format using the origin that is associated with this cache behavior.
  3481. // If so, specify true; if not, specify false. If you specify true for SmoothStreaming,
  3482. // you can still distribute other content using this cache behavior if the content
  3483. // matches the value of PathPattern.
  3484. SmoothStreaming *bool `type:"boolean"`
  3485. // The value of ID for the origin that you want CloudFront to route requests
  3486. // to when a request matches the path pattern either for a cache behavior or
  3487. // for the default cache behavior.
  3488. //
  3489. // TargetOriginId is a required field
  3490. TargetOriginId *string `type:"string" required:"true"`
  3491. // A complex type that specifies the AWS accounts, if any, that you want to
  3492. // allow to create signed URLs for private content.
  3493. //
  3494. // If you want to require signed URLs in requests for objects in the target
  3495. // origin that match the PathPattern for this cache behavior, specify true for
  3496. // Enabled, and specify the applicable values for Quantity and Items. For more
  3497. // information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
  3498. // in the Amazon Amazon CloudFront Developer Guide.
  3499. //
  3500. // If you don't want to require signed URLs in requests for objects that match
  3501. // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items.
  3502. //
  3503. // To add, change, or remove one or more trusted signers, change Enabled to
  3504. // true (if it's currently false), change Quantity as applicable, and specify
  3505. // all of the trusted signers that you want to include in the updated distribution.
  3506. //
  3507. // TrustedSigners is a required field
  3508. TrustedSigners *TrustedSigners `type:"structure" required:"true"`
  3509. // The protocol that viewers can use to access the files in the origin specified
  3510. // by TargetOriginId when a request matches the path pattern in PathPattern.
  3511. // You can specify the following options:
  3512. //
  3513. // * allow-all: Viewers can use HTTP or HTTPS.
  3514. //
  3515. // * redirect-to-https: If a viewer submits an HTTP request, CloudFront returns
  3516. // an HTTP status code of 301 (Moved Permanently) to the viewer along with
  3517. // the HTTPS URL. The viewer then resubmits the request using the new URL.
  3518. //
  3519. // * https-only: If a viewer sends an HTTP request, CloudFront returns an
  3520. // HTTP status code of 403 (Forbidden).
  3521. //
  3522. // For more information about requiring the HTTPS protocol, see Using an HTTPS
  3523. // Connection to Access Your Objects (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html)
  3524. // in the Amazon CloudFront Developer Guide.
  3525. //
  3526. // The only way to guarantee that viewers retrieve an object that was fetched
  3527. // from the origin using HTTPS is never to use any other protocol to fetch the
  3528. // object. If you have recently changed from HTTP to HTTPS, we recommend that
  3529. // you clear your objects' cache because cached objects are protocol agnostic.
  3530. // That means that an edge location will return an object from the cache regardless
  3531. // of whether the current request protocol matches the protocol used previously.
  3532. // For more information, see Specifying How Long Objects and Errors Stay in
  3533. // a CloudFront Edge Cache (Expiration) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html)
  3534. // in the Amazon CloudFront Developer Guide.
  3535. //
  3536. // ViewerProtocolPolicy is a required field
  3537. ViewerProtocolPolicy *string `type:"string" required:"true" enum:"ViewerProtocolPolicy"`
  3538. }
  3539. // String returns the string representation
  3540. func (s DefaultCacheBehavior) String() string {
  3541. return awsutil.Prettify(s)
  3542. }
  3543. // GoString returns the string representation
  3544. func (s DefaultCacheBehavior) GoString() string {
  3545. return s.String()
  3546. }
  3547. // Validate inspects the fields of the type to determine if they are valid.
  3548. func (s *DefaultCacheBehavior) Validate() error {
  3549. invalidParams := request.ErrInvalidParams{Context: "DefaultCacheBehavior"}
  3550. if s.ForwardedValues == nil {
  3551. invalidParams.Add(request.NewErrParamRequired("ForwardedValues"))
  3552. }
  3553. if s.MinTTL == nil {
  3554. invalidParams.Add(request.NewErrParamRequired("MinTTL"))
  3555. }
  3556. if s.TargetOriginId == nil {
  3557. invalidParams.Add(request.NewErrParamRequired("TargetOriginId"))
  3558. }
  3559. if s.TrustedSigners == nil {
  3560. invalidParams.Add(request.NewErrParamRequired("TrustedSigners"))
  3561. }
  3562. if s.ViewerProtocolPolicy == nil {
  3563. invalidParams.Add(request.NewErrParamRequired("ViewerProtocolPolicy"))
  3564. }
  3565. if s.AllowedMethods != nil {
  3566. if err := s.AllowedMethods.Validate(); err != nil {
  3567. invalidParams.AddNested("AllowedMethods", err.(request.ErrInvalidParams))
  3568. }
  3569. }
  3570. if s.ForwardedValues != nil {
  3571. if err := s.ForwardedValues.Validate(); err != nil {
  3572. invalidParams.AddNested("ForwardedValues", err.(request.ErrInvalidParams))
  3573. }
  3574. }
  3575. if s.TrustedSigners != nil {
  3576. if err := s.TrustedSigners.Validate(); err != nil {
  3577. invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams))
  3578. }
  3579. }
  3580. if invalidParams.Len() > 0 {
  3581. return invalidParams
  3582. }
  3583. return nil
  3584. }
  3585. // Deletes a origin access identity.
  3586. type DeleteCloudFrontOriginAccessIdentityInput struct {
  3587. _ struct{} `type:"structure"`
  3588. // The origin access identity's ID.
  3589. //
  3590. // Id is a required field
  3591. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  3592. // The value of the ETag header you received from a previous GET or PUT request.
  3593. // For example: E2QWRUHAPOMQZL.
  3594. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  3595. }
  3596. // String returns the string representation
  3597. func (s DeleteCloudFrontOriginAccessIdentityInput) String() string {
  3598. return awsutil.Prettify(s)
  3599. }
  3600. // GoString returns the string representation
  3601. func (s DeleteCloudFrontOriginAccessIdentityInput) GoString() string {
  3602. return s.String()
  3603. }
  3604. // Validate inspects the fields of the type to determine if they are valid.
  3605. func (s *DeleteCloudFrontOriginAccessIdentityInput) Validate() error {
  3606. invalidParams := request.ErrInvalidParams{Context: "DeleteCloudFrontOriginAccessIdentityInput"}
  3607. if s.Id == nil {
  3608. invalidParams.Add(request.NewErrParamRequired("Id"))
  3609. }
  3610. if invalidParams.Len() > 0 {
  3611. return invalidParams
  3612. }
  3613. return nil
  3614. }
  3615. type DeleteCloudFrontOriginAccessIdentityOutput struct {
  3616. _ struct{} `type:"structure"`
  3617. }
  3618. // String returns the string representation
  3619. func (s DeleteCloudFrontOriginAccessIdentityOutput) String() string {
  3620. return awsutil.Prettify(s)
  3621. }
  3622. // GoString returns the string representation
  3623. func (s DeleteCloudFrontOriginAccessIdentityOutput) GoString() string {
  3624. return s.String()
  3625. }
  3626. // This action deletes a web distribution. To delete a web distribution using
  3627. // the CloudFront API, perform the following steps.
  3628. //
  3629. // To delete a web distribution using the CloudFront API:
  3630. //
  3631. // Disable the web distribution
  3632. //
  3633. // Submit a GET Distribution Config request to get the current configuration
  3634. // and the Etag header for the distribution.
  3635. //
  3636. // Update the XML document that was returned in the response to your GET Distribution
  3637. // Config request to change the value of Enabled to false.
  3638. //
  3639. // Submit a PUT Distribution Config request to update the configuration for
  3640. // your distribution. In the request body, include the XML document that you
  3641. // updated in Step 3. Set the value of the HTTP If-Match header to the value
  3642. // of the ETag header that CloudFront returned when you submitted the GET Distribution
  3643. // Config request in Step 2.
  3644. //
  3645. // Review the response to the PUT Distribution Config request to confirm that
  3646. // the distribution was successfully disabled.
  3647. //
  3648. // Submit a GET Distribution request to confirm that your changes have propagated.
  3649. // When propagation is complete, the value of Status is Deployed.
  3650. //
  3651. // Submit a DELETE Distribution request. Set the value of the HTTP If-Match
  3652. // header to the value of the ETag header that CloudFront returned when you
  3653. // submitted the GET Distribution Config request in Step 6.
  3654. //
  3655. // Review the response to your DELETE Distribution request to confirm that the
  3656. // distribution was successfully deleted.
  3657. //
  3658. // For information about deleting a distribution using the CloudFront console,
  3659. // see Deleting a Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToDeleteDistribution.html)
  3660. // in the Amazon CloudFront Developer Guide.
  3661. type DeleteDistributionInput struct {
  3662. _ struct{} `type:"structure"`
  3663. // The distribution ID.
  3664. //
  3665. // Id is a required field
  3666. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  3667. // The value of the ETag header that you received when you disabled the distribution.
  3668. // For example: E2QWRUHAPOMQZL.
  3669. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  3670. }
  3671. // String returns the string representation
  3672. func (s DeleteDistributionInput) String() string {
  3673. return awsutil.Prettify(s)
  3674. }
  3675. // GoString returns the string representation
  3676. func (s DeleteDistributionInput) GoString() string {
  3677. return s.String()
  3678. }
  3679. // Validate inspects the fields of the type to determine if they are valid.
  3680. func (s *DeleteDistributionInput) Validate() error {
  3681. invalidParams := request.ErrInvalidParams{Context: "DeleteDistributionInput"}
  3682. if s.Id == nil {
  3683. invalidParams.Add(request.NewErrParamRequired("Id"))
  3684. }
  3685. if invalidParams.Len() > 0 {
  3686. return invalidParams
  3687. }
  3688. return nil
  3689. }
  3690. type DeleteDistributionOutput struct {
  3691. _ struct{} `type:"structure"`
  3692. }
  3693. // String returns the string representation
  3694. func (s DeleteDistributionOutput) String() string {
  3695. return awsutil.Prettify(s)
  3696. }
  3697. // GoString returns the string representation
  3698. func (s DeleteDistributionOutput) GoString() string {
  3699. return s.String()
  3700. }
  3701. // The request to delete a streaming distribution.
  3702. type DeleteStreamingDistributionInput struct {
  3703. _ struct{} `type:"structure"`
  3704. // The distribution ID.
  3705. //
  3706. // Id is a required field
  3707. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  3708. // The value of the ETag header that you received when you disabled the streaming
  3709. // distribution. For example: E2QWRUHAPOMQZL.
  3710. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  3711. }
  3712. // String returns the string representation
  3713. func (s DeleteStreamingDistributionInput) String() string {
  3714. return awsutil.Prettify(s)
  3715. }
  3716. // GoString returns the string representation
  3717. func (s DeleteStreamingDistributionInput) GoString() string {
  3718. return s.String()
  3719. }
  3720. // Validate inspects the fields of the type to determine if they are valid.
  3721. func (s *DeleteStreamingDistributionInput) Validate() error {
  3722. invalidParams := request.ErrInvalidParams{Context: "DeleteStreamingDistributionInput"}
  3723. if s.Id == nil {
  3724. invalidParams.Add(request.NewErrParamRequired("Id"))
  3725. }
  3726. if invalidParams.Len() > 0 {
  3727. return invalidParams
  3728. }
  3729. return nil
  3730. }
  3731. type DeleteStreamingDistributionOutput struct {
  3732. _ struct{} `type:"structure"`
  3733. }
  3734. // String returns the string representation
  3735. func (s DeleteStreamingDistributionOutput) String() string {
  3736. return awsutil.Prettify(s)
  3737. }
  3738. // GoString returns the string representation
  3739. func (s DeleteStreamingDistributionOutput) GoString() string {
  3740. return s.String()
  3741. }
  3742. // The distribution's information.
  3743. type Distribution struct {
  3744. _ struct{} `type:"structure"`
  3745. // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5,
  3746. // where 123456789012 is your AWS account ID.
  3747. //
  3748. // ARN is a required field
  3749. ARN *string `type:"string" required:"true"`
  3750. // CloudFront automatically adds this element to the response only if you've
  3751. // set up the distribution to serve private content with signed URLs. The element
  3752. // lists the key pair IDs that CloudFront is aware of for each trusted signer.
  3753. // The Signer child element lists the AWS account number of the trusted signer
  3754. // (or an empty Self element if the signer is you). The Signer element also
  3755. // includes the IDs of any active key pairs associated with the trusted signer's
  3756. // AWS account. If no KeyPairId element appears for a Signer, that signer can't
  3757. // create working signed URLs.
  3758. //
  3759. // ActiveTrustedSigners is a required field
  3760. ActiveTrustedSigners *ActiveTrustedSigners `type:"structure" required:"true"`
  3761. // The current configuration information for the distribution. Send a GET request
  3762. // to the /CloudFront API version/distribution ID/config resource.
  3763. //
  3764. // DistributionConfig is a required field
  3765. DistributionConfig *DistributionConfig `type:"structure" required:"true"`
  3766. // The domain name corresponding to the distribution. For example: d604721fxaaqy9.cloudfront.net.
  3767. //
  3768. // DomainName is a required field
  3769. DomainName *string `type:"string" required:"true"`
  3770. // The identifier for the distribution. For example: EDFDVBD632BHDS5.
  3771. //
  3772. // Id is a required field
  3773. Id *string `type:"string" required:"true"`
  3774. // The number of invalidation batches currently in progress.
  3775. //
  3776. // InProgressInvalidationBatches is a required field
  3777. InProgressInvalidationBatches *int64 `type:"integer" required:"true"`
  3778. // The date and time the distribution was last modified.
  3779. //
  3780. // LastModifiedTime is a required field
  3781. LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
  3782. // This response element indicates the current status of the distribution. When
  3783. // the status is Deployed, the distribution's information is fully propagated
  3784. // to all CloudFront edge locations.
  3785. //
  3786. // Status is a required field
  3787. Status *string `type:"string" required:"true"`
  3788. }
  3789. // String returns the string representation
  3790. func (s Distribution) String() string {
  3791. return awsutil.Prettify(s)
  3792. }
  3793. // GoString returns the string representation
  3794. func (s Distribution) GoString() string {
  3795. return s.String()
  3796. }
  3797. // A distribution configuration.
  3798. type DistributionConfig struct {
  3799. _ struct{} `type:"structure"`
  3800. // A complex type that contains information about CNAMEs (alternate domain names),
  3801. // if any, for this distribution.
  3802. Aliases *Aliases `type:"structure"`
  3803. // A complex type that contains zero or more CacheBehavior elements.
  3804. CacheBehaviors *CacheBehaviors `type:"structure"`
  3805. // A unique value (for example, a date-time stamp) that ensures that the request
  3806. // can't be replayed.
  3807. //
  3808. // If the value of CallerReference is new (regardless of the content of the
  3809. // DistributionConfig object), CloudFront creates a new distribution.
  3810. //
  3811. // If CallerReference is a value you already sent in a previous request to create
  3812. // a distribution, and if the content of the DistributionConfig is identical
  3813. // to the original request (ignoring white space), CloudFront returns the same
  3814. // the response that it returned to the original request.
  3815. //
  3816. // If CallerReference is a value you already sent in a previous request to create
  3817. // a distribution but the content of the DistributionConfig is different from
  3818. // the original request, CloudFront returns a DistributionAlreadyExists error.
  3819. //
  3820. // CallerReference is a required field
  3821. CallerReference *string `type:"string" required:"true"`
  3822. // Any comments you want to include about the distribution.
  3823. //
  3824. // If you don't want to specify a comment, include an empty Comment element.
  3825. //
  3826. // To delete an existing comment, update the distribution configuration and
  3827. // include an empty Comment element.
  3828. //
  3829. // To add or change a comment, update the distribution configuration and specify
  3830. // the new comment.
  3831. //
  3832. // Comment is a required field
  3833. Comment *string `type:"string" required:"true"`
  3834. // A complex type that controls the following:
  3835. //
  3836. // * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range
  3837. // with custom error messages before returning the response to the viewer.
  3838. //
  3839. // * How long CloudFront caches HTTP status codes in the 4xx and 5xx range.
  3840. //
  3841. // For more information about custom error pages, see Customizing Error Responses
  3842. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)
  3843. // in the Amazon CloudFront Developer Guide.
  3844. CustomErrorResponses *CustomErrorResponses `type:"structure"`
  3845. // A complex type that describes the default cache behavior if you do not specify
  3846. // a CacheBehavior element or if files don't match any of the values of PathPattern
  3847. // in CacheBehavior elements. You must create exactly one default cache behavior.
  3848. //
  3849. // DefaultCacheBehavior is a required field
  3850. DefaultCacheBehavior *DefaultCacheBehavior `type:"structure" required:"true"`
  3851. // The object that you want CloudFront to request from your origin (for example,
  3852. // index.html) when a viewer requests the root URL for your distribution (http://www.example.com)
  3853. // instead of an object in your distribution (http://www.example.com/product-description.html).
  3854. // Specifying a default root object avoids exposing the contents of your distribution.
  3855. //
  3856. // Specify only the object name, for example, index.html. Do not add a / before
  3857. // the object name.
  3858. //
  3859. // If you don't want to specify a default root object when you create a distribution,
  3860. // include an empty DefaultRootObject element.
  3861. //
  3862. // To delete the default root object from an existing distribution, update the
  3863. // distribution configuration and include an empty DefaultRootObject element.
  3864. //
  3865. // To replace the default root object, update the distribution configuration
  3866. // and specify the new object.
  3867. //
  3868. // For more information about the default root object, see Creating a Default
  3869. // Root Object (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html)
  3870. // in the Amazon CloudFront Developer Guide.
  3871. DefaultRootObject *string `type:"string"`
  3872. // Specifies whether you want CloudFront to save access logs to an Amazon S3
  3873. // bucket.
  3874. //
  3875. // If you do not want to enable logging when you create a distribution, or if
  3876. // you want to disable logging for an existing distribution, specify false for
  3877. // Enabled, and specify empty Bucket and Prefix elements.
  3878. //
  3879. // If you specify false for Enabled but you specify values for Bucket and Prefix,
  3880. // the values are automatically deleted.
  3881. //
  3882. // Enabled is a required field
  3883. Enabled *bool `type:"boolean" required:"true"`
  3884. // (Optional) Specify the maximum HTTP version that you want viewers to use
  3885. // to communicate with CloudFront. The default value for new web distributions
  3886. // is http2. Viewers that don't support HTTP/2 automatically use an earlier
  3887. // HTTP version.
  3888. //
  3889. // For viewers and CloudFront to use HTTP/2, viewers must support TLS 1.2 or
  3890. // later, and must support Server Name Identification (SNI).
  3891. //
  3892. // In general, configuring CloudFront to communicate with viewers using HTTP/2
  3893. // reduces latency. You can improve performance by optimizing for HTTP/2. For
  3894. // more information, do an Internet search for "http/2 optimization."
  3895. HttpVersion *string `type:"string" enum:"HttpVersion"`
  3896. // If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address
  3897. // for your distribution, specify true. If you specify false, CloudFront responds
  3898. // to IPv6 DNS requests with the DNS response code NOERROR and with no IP addresses.
  3899. // This allows viewers to submit a second request, for an IPv4 address for your
  3900. // distribution.
  3901. //
  3902. // In general, you should enable IPv6 if you have users on IPv6 networks who
  3903. // want to access your content. However, if you're using signed URLs or signed
  3904. // cookies to restrict access to your content, and if you're using a custom
  3905. // policy that includes the IpAddress parameter to restrict the IP addresses
  3906. // that can access your content, do not enable IPv6. If you want to restrict
  3907. // access to some content by IP address and not restrict access to other content
  3908. // (or restrict access but not by IP address), you can create two distributions.
  3909. // For more information, see Creating a Signed URL Using a Custom Policy (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-custom-policy.html)
  3910. // in the Amazon CloudFront Developer Guide.
  3911. //
  3912. // If you're using an Amazon Route 53 alias resource record set to route traffic
  3913. // to your CloudFront distribution, you need to create a second alias resource
  3914. // record set when both of the following are true:
  3915. //
  3916. // * You enable IPv6 for the distribution
  3917. //
  3918. // * You're using alternate domain names in the URLs for your objects
  3919. //
  3920. // For more information, see Routing Traffic to an Amazon CloudFront Web Distribution
  3921. // by Using Your Domain Name (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-cloudfront-distribution.html)
  3922. // in the Amazon Route 53 Developer Guide.
  3923. //
  3924. // If you created a CNAME resource record set, either with Amazon Route 53 or
  3925. // with another DNS service, you don't need to make any changes. A CNAME record
  3926. // will route traffic to your distribution regardless of the IP address format
  3927. // of the viewer request.
  3928. IsIPV6Enabled *bool `type:"boolean"`
  3929. // A complex type that controls whether access logs are written for the distribution.
  3930. //
  3931. // For more information about logging, see Access Logs (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html)
  3932. // in the Amazon CloudFront Developer Guide.
  3933. Logging *LoggingConfig `type:"structure"`
  3934. // A complex type that contains information about origins for this distribution.
  3935. //
  3936. // Origins is a required field
  3937. Origins *Origins `type:"structure" required:"true"`
  3938. // The price class that corresponds with the maximum price that you want to
  3939. // pay for CloudFront service. If you specify PriceClass_All, CloudFront responds
  3940. // to requests for your objects from all CloudFront edge locations.
  3941. //
  3942. // If you specify a price class other than PriceClass_All, CloudFront serves
  3943. // your objects from the CloudFront edge location that has the lowest latency
  3944. // among the edge locations in your price class. Viewers who are in or near
  3945. // regions that are excluded from your specified price class may encounter slower
  3946. // performance.
  3947. //
  3948. // For more information about price classes, see Choosing the Price Class for
  3949. // a CloudFront Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html)
  3950. // in the Amazon CloudFront Developer Guide. For information about CloudFront
  3951. // pricing, including how price classes map to CloudFront regions, see Amazon
  3952. // CloudFront Pricing (https://aws.amazon.com/cloudfront/pricing/).
  3953. PriceClass *string `type:"string" enum:"PriceClass"`
  3954. // A complex type that identifies ways in which you want to restrict distribution
  3955. // of your content.
  3956. Restrictions *Restrictions `type:"structure"`
  3957. // A complex type that specifies the following:
  3958. //
  3959. // * Which SSL/TLS certificate to use when viewers request objects using
  3960. // HTTPS
  3961. //
  3962. // * Whether you want CloudFront to use dedicated IP addresses or SNI when
  3963. // you're using alternate domain names in your object names
  3964. //
  3965. // * The minimum protocol version that you want CloudFront to use when communicating
  3966. // with viewers
  3967. //
  3968. // For more information, see Using an HTTPS Connection to Access Your Objects
  3969. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html)
  3970. // in the Amazon Amazon CloudFront Developer Guide.
  3971. ViewerCertificate *ViewerCertificate `type:"structure"`
  3972. // A unique identifier that specifies the AWS WAF web ACL, if any, to associate
  3973. // with this distribution.
  3974. //
  3975. // AWS WAF is a web application firewall that lets you monitor the HTTP and
  3976. // HTTPS requests that are forwarded to CloudFront, and lets you control access
  3977. // to your content. Based on conditions that you specify, such as the IP addresses
  3978. // that requests originate from or the values of query strings, CloudFront responds
  3979. // to requests either with the requested content or with an HTTP 403 status
  3980. // code (Forbidden). You can also configure CloudFront to return a custom error
  3981. // page when a request is blocked. For more information about AWS WAF, see the
  3982. // AWS WAF Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html).
  3983. WebACLId *string `type:"string"`
  3984. }
  3985. // String returns the string representation
  3986. func (s DistributionConfig) String() string {
  3987. return awsutil.Prettify(s)
  3988. }
  3989. // GoString returns the string representation
  3990. func (s DistributionConfig) GoString() string {
  3991. return s.String()
  3992. }
  3993. // Validate inspects the fields of the type to determine if they are valid.
  3994. func (s *DistributionConfig) Validate() error {
  3995. invalidParams := request.ErrInvalidParams{Context: "DistributionConfig"}
  3996. if s.CallerReference == nil {
  3997. invalidParams.Add(request.NewErrParamRequired("CallerReference"))
  3998. }
  3999. if s.Comment == nil {
  4000. invalidParams.Add(request.NewErrParamRequired("Comment"))
  4001. }
  4002. if s.DefaultCacheBehavior == nil {
  4003. invalidParams.Add(request.NewErrParamRequired("DefaultCacheBehavior"))
  4004. }
  4005. if s.Enabled == nil {
  4006. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  4007. }
  4008. if s.Origins == nil {
  4009. invalidParams.Add(request.NewErrParamRequired("Origins"))
  4010. }
  4011. if s.Aliases != nil {
  4012. if err := s.Aliases.Validate(); err != nil {
  4013. invalidParams.AddNested("Aliases", err.(request.ErrInvalidParams))
  4014. }
  4015. }
  4016. if s.CacheBehaviors != nil {
  4017. if err := s.CacheBehaviors.Validate(); err != nil {
  4018. invalidParams.AddNested("CacheBehaviors", err.(request.ErrInvalidParams))
  4019. }
  4020. }
  4021. if s.CustomErrorResponses != nil {
  4022. if err := s.CustomErrorResponses.Validate(); err != nil {
  4023. invalidParams.AddNested("CustomErrorResponses", err.(request.ErrInvalidParams))
  4024. }
  4025. }
  4026. if s.DefaultCacheBehavior != nil {
  4027. if err := s.DefaultCacheBehavior.Validate(); err != nil {
  4028. invalidParams.AddNested("DefaultCacheBehavior", err.(request.ErrInvalidParams))
  4029. }
  4030. }
  4031. if s.Logging != nil {
  4032. if err := s.Logging.Validate(); err != nil {
  4033. invalidParams.AddNested("Logging", err.(request.ErrInvalidParams))
  4034. }
  4035. }
  4036. if s.Origins != nil {
  4037. if err := s.Origins.Validate(); err != nil {
  4038. invalidParams.AddNested("Origins", err.(request.ErrInvalidParams))
  4039. }
  4040. }
  4041. if s.Restrictions != nil {
  4042. if err := s.Restrictions.Validate(); err != nil {
  4043. invalidParams.AddNested("Restrictions", err.(request.ErrInvalidParams))
  4044. }
  4045. }
  4046. if invalidParams.Len() > 0 {
  4047. return invalidParams
  4048. }
  4049. return nil
  4050. }
  4051. // A distribution Configuration and a list of tags to be associated with the
  4052. // distribution.
  4053. type DistributionConfigWithTags struct {
  4054. _ struct{} `type:"structure"`
  4055. // A distribution configuration.
  4056. //
  4057. // DistributionConfig is a required field
  4058. DistributionConfig *DistributionConfig `type:"structure" required:"true"`
  4059. // A complex type that contains zero or more Tag elements.
  4060. //
  4061. // Tags is a required field
  4062. Tags *Tags `type:"structure" required:"true"`
  4063. }
  4064. // String returns the string representation
  4065. func (s DistributionConfigWithTags) String() string {
  4066. return awsutil.Prettify(s)
  4067. }
  4068. // GoString returns the string representation
  4069. func (s DistributionConfigWithTags) GoString() string {
  4070. return s.String()
  4071. }
  4072. // Validate inspects the fields of the type to determine if they are valid.
  4073. func (s *DistributionConfigWithTags) Validate() error {
  4074. invalidParams := request.ErrInvalidParams{Context: "DistributionConfigWithTags"}
  4075. if s.DistributionConfig == nil {
  4076. invalidParams.Add(request.NewErrParamRequired("DistributionConfig"))
  4077. }
  4078. if s.Tags == nil {
  4079. invalidParams.Add(request.NewErrParamRequired("Tags"))
  4080. }
  4081. if s.DistributionConfig != nil {
  4082. if err := s.DistributionConfig.Validate(); err != nil {
  4083. invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams))
  4084. }
  4085. }
  4086. if s.Tags != nil {
  4087. if err := s.Tags.Validate(); err != nil {
  4088. invalidParams.AddNested("Tags", err.(request.ErrInvalidParams))
  4089. }
  4090. }
  4091. if invalidParams.Len() > 0 {
  4092. return invalidParams
  4093. }
  4094. return nil
  4095. }
  4096. // A distribution list.
  4097. type DistributionList struct {
  4098. _ struct{} `type:"structure"`
  4099. // A flag that indicates whether more distributions remain to be listed. If
  4100. // your results were truncated, you can make a follow-up pagination request
  4101. // using the Marker request parameter to retrieve more distributions in the
  4102. // list.
  4103. //
  4104. // IsTruncated is a required field
  4105. IsTruncated *bool `type:"boolean" required:"true"`
  4106. // A complex type that contains one DistributionSummary element for each distribution
  4107. // that was created by the current AWS account.
  4108. Items []*DistributionSummary `locationNameList:"DistributionSummary" type:"list"`
  4109. // The value you provided for the Marker request parameter.
  4110. //
  4111. // Marker is a required field
  4112. Marker *string `type:"string" required:"true"`
  4113. // The value you provided for the MaxItems request parameter.
  4114. //
  4115. // MaxItems is a required field
  4116. MaxItems *int64 `type:"integer" required:"true"`
  4117. // If IsTruncated is true, this element is present and contains the value you
  4118. // can use for the Marker request parameter to continue listing your distributions
  4119. // where they left off.
  4120. NextMarker *string `type:"string"`
  4121. // The number of distributions that were created by the current AWS account.
  4122. //
  4123. // Quantity is a required field
  4124. Quantity *int64 `type:"integer" required:"true"`
  4125. }
  4126. // String returns the string representation
  4127. func (s DistributionList) String() string {
  4128. return awsutil.Prettify(s)
  4129. }
  4130. // GoString returns the string representation
  4131. func (s DistributionList) GoString() string {
  4132. return s.String()
  4133. }
  4134. // A summary of the information about a CloudFront distribution.
  4135. type DistributionSummary struct {
  4136. _ struct{} `type:"structure"`
  4137. // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5,
  4138. // where 123456789012 is your AWS account ID.
  4139. //
  4140. // ARN is a required field
  4141. ARN *string `type:"string" required:"true"`
  4142. // A complex type that contains information about CNAMEs (alternate domain names),
  4143. // if any, for this distribution.
  4144. //
  4145. // Aliases is a required field
  4146. Aliases *Aliases `type:"structure" required:"true"`
  4147. // A complex type that contains zero or more CacheBehavior elements.
  4148. //
  4149. // CacheBehaviors is a required field
  4150. CacheBehaviors *CacheBehaviors `type:"structure" required:"true"`
  4151. // The comment originally specified when this distribution was created.
  4152. //
  4153. // Comment is a required field
  4154. Comment *string `type:"string" required:"true"`
  4155. // A complex type that contains zero or more CustomErrorResponses elements.
  4156. //
  4157. // CustomErrorResponses is a required field
  4158. CustomErrorResponses *CustomErrorResponses `type:"structure" required:"true"`
  4159. // A complex type that describes the default cache behavior if you do not specify
  4160. // a CacheBehavior element or if files don't match any of the values of PathPattern
  4161. // in CacheBehavior elements. You must create exactly one default cache behavior.
  4162. //
  4163. // DefaultCacheBehavior is a required field
  4164. DefaultCacheBehavior *DefaultCacheBehavior `type:"structure" required:"true"`
  4165. // The domain name that corresponds to the distribution. For example: d604721fxaaqy9.cloudfront.net.
  4166. //
  4167. // DomainName is a required field
  4168. DomainName *string `type:"string" required:"true"`
  4169. // Whether the distribution is enabled to accept user requests for content.
  4170. //
  4171. // Enabled is a required field
  4172. Enabled *bool `type:"boolean" required:"true"`
  4173. // Specify the maximum HTTP version that you want viewers to use to communicate
  4174. // with CloudFront. The default value for new web distributions is http2. Viewers
  4175. // that don't support HTTP/2 will automatically use an earlier version.
  4176. //
  4177. // HttpVersion is a required field
  4178. HttpVersion *string `type:"string" required:"true" enum:"HttpVersion"`
  4179. // The identifier for the distribution. For example: EDFDVBD632BHDS5.
  4180. //
  4181. // Id is a required field
  4182. Id *string `type:"string" required:"true"`
  4183. // Whether CloudFront responds to IPv6 DNS requests with an IPv6 address for
  4184. // your distribution.
  4185. //
  4186. // IsIPV6Enabled is a required field
  4187. IsIPV6Enabled *bool `type:"boolean" required:"true"`
  4188. // The date and time the distribution was last modified.
  4189. //
  4190. // LastModifiedTime is a required field
  4191. LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
  4192. // A complex type that contains information about origins for this distribution.
  4193. //
  4194. // Origins is a required field
  4195. Origins *Origins `type:"structure" required:"true"`
  4196. // PriceClass is a required field
  4197. PriceClass *string `type:"string" required:"true" enum:"PriceClass"`
  4198. // A complex type that identifies ways in which you want to restrict distribution
  4199. // of your content.
  4200. //
  4201. // Restrictions is a required field
  4202. Restrictions *Restrictions `type:"structure" required:"true"`
  4203. // The current status of the distribution. When the status is Deployed, the
  4204. // distribution's information is propagated to all CloudFront edge locations.
  4205. //
  4206. // Status is a required field
  4207. Status *string `type:"string" required:"true"`
  4208. // A complex type that specifies the following:
  4209. //
  4210. // * Which SSL/TLS certificate to use when viewers request objects using
  4211. // HTTPS
  4212. //
  4213. // * Whether you want CloudFront to use dedicated IP addresses or SNI when
  4214. // you're using alternate domain names in your object names
  4215. //
  4216. // * The minimum protocol version that you want CloudFront to use when communicating
  4217. // with viewers
  4218. //
  4219. // For more information, see Using an HTTPS Connection to Access Your Objects
  4220. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html)
  4221. // in the Amazon Amazon CloudFront Developer Guide.
  4222. //
  4223. // ViewerCertificate is a required field
  4224. ViewerCertificate *ViewerCertificate `type:"structure" required:"true"`
  4225. // The Web ACL Id (if any) associated with the distribution.
  4226. //
  4227. // WebACLId is a required field
  4228. WebACLId *string `type:"string" required:"true"`
  4229. }
  4230. // String returns the string representation
  4231. func (s DistributionSummary) String() string {
  4232. return awsutil.Prettify(s)
  4233. }
  4234. // GoString returns the string representation
  4235. func (s DistributionSummary) GoString() string {
  4236. return s.String()
  4237. }
  4238. // A complex type that specifies how CloudFront handles query strings and cookies.
  4239. type ForwardedValues struct {
  4240. _ struct{} `type:"structure"`
  4241. // A complex type that specifies whether you want CloudFront to forward cookies
  4242. // to the origin and, if so, which ones. For more information about forwarding
  4243. // cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies
  4244. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html)
  4245. // in the Amazon CloudFront Developer Guide.
  4246. //
  4247. // Cookies is a required field
  4248. Cookies *CookiePreference `type:"structure" required:"true"`
  4249. // A complex type that specifies the Headers, if any, that you want CloudFront
  4250. // to vary upon for this cache behavior.
  4251. Headers *Headers `type:"structure"`
  4252. // Indicates whether you want CloudFront to forward query strings to the origin
  4253. // that is associated with this cache behavior and cache based on the query
  4254. // string parameters. CloudFront behavior depends on the value of QueryString
  4255. // and on the values that you specify for QueryStringCacheKeys, if any:
  4256. //
  4257. // If you specify true for QueryString and you don't specify any values for
  4258. // QueryStringCacheKeys, CloudFront forwards all query string parameters to
  4259. // the origin and caches based on all query string parameters. Depending on
  4260. // how many query string parameters and values you have, this can adversely
  4261. // affect performance because CloudFront must forward more requests to the origin.
  4262. //
  4263. // If you specify true for QueryString and you specify one or more values for
  4264. // QueryStringCacheKeys, CloudFront forwards all query string parameters to
  4265. // the origin, but it only caches based on the query string parameters that
  4266. // you specify.
  4267. //
  4268. // If you specify false for QueryString, CloudFront doesn't forward any query
  4269. // string parameters to the origin, and doesn't cache based on query string
  4270. // parameters.
  4271. //
  4272. // For more information, see Configuring CloudFront to Cache Based on Query
  4273. // String Parameters (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/QueryStringParameters.html)
  4274. // in the Amazon CloudFront Developer Guide.
  4275. //
  4276. // QueryString is a required field
  4277. QueryString *bool `type:"boolean" required:"true"`
  4278. // A complex type that contains information about the query string parameters
  4279. // that you want CloudFront to use for caching for this cache behavior.
  4280. QueryStringCacheKeys *QueryStringCacheKeys `type:"structure"`
  4281. }
  4282. // String returns the string representation
  4283. func (s ForwardedValues) String() string {
  4284. return awsutil.Prettify(s)
  4285. }
  4286. // GoString returns the string representation
  4287. func (s ForwardedValues) GoString() string {
  4288. return s.String()
  4289. }
  4290. // Validate inspects the fields of the type to determine if they are valid.
  4291. func (s *ForwardedValues) Validate() error {
  4292. invalidParams := request.ErrInvalidParams{Context: "ForwardedValues"}
  4293. if s.Cookies == nil {
  4294. invalidParams.Add(request.NewErrParamRequired("Cookies"))
  4295. }
  4296. if s.QueryString == nil {
  4297. invalidParams.Add(request.NewErrParamRequired("QueryString"))
  4298. }
  4299. if s.Cookies != nil {
  4300. if err := s.Cookies.Validate(); err != nil {
  4301. invalidParams.AddNested("Cookies", err.(request.ErrInvalidParams))
  4302. }
  4303. }
  4304. if s.Headers != nil {
  4305. if err := s.Headers.Validate(); err != nil {
  4306. invalidParams.AddNested("Headers", err.(request.ErrInvalidParams))
  4307. }
  4308. }
  4309. if s.QueryStringCacheKeys != nil {
  4310. if err := s.QueryStringCacheKeys.Validate(); err != nil {
  4311. invalidParams.AddNested("QueryStringCacheKeys", err.(request.ErrInvalidParams))
  4312. }
  4313. }
  4314. if invalidParams.Len() > 0 {
  4315. return invalidParams
  4316. }
  4317. return nil
  4318. }
  4319. // A complex type that controls the countries in which your content is distributed.
  4320. // CloudFront determines the location of your users using MaxMind GeoIP databases.
  4321. type GeoRestriction struct {
  4322. _ struct{} `type:"structure"`
  4323. // A complex type that contains a Location element for each country in which
  4324. // you want CloudFront either to distribute your content (whitelist) or not
  4325. // distribute your content (blacklist).
  4326. //
  4327. // The Location element is a two-letter, uppercase country code for a country
  4328. // that you want to include in your blacklist or whitelist. Include one Location
  4329. // element for each country.
  4330. //
  4331. // CloudFront and MaxMind both use ISO 3166 country codes. For the current list
  4332. // of countries and the corresponding codes, see ISO 3166-1-alpha-2 code on
  4333. // the International Organization for Standardization website. You can also
  4334. // refer to the country list in the CloudFront console, which includes both
  4335. // country names and codes.
  4336. Items []*string `locationNameList:"Location" type:"list"`
  4337. // When geo restriction is enabled, this is the number of countries in your
  4338. // whitelist or blacklist. Otherwise, when it is not enabled, Quantity is 0,
  4339. // and you can omit Items.
  4340. //
  4341. // Quantity is a required field
  4342. Quantity *int64 `type:"integer" required:"true"`
  4343. // The method that you want to use to restrict distribution of your content
  4344. // by country:
  4345. //
  4346. // * none: No geo restriction is enabled, meaning access to content is not
  4347. // restricted by client geo location.
  4348. //
  4349. // * blacklist: The Location elements specify the countries in which you
  4350. // do not want CloudFront to distribute your content.
  4351. //
  4352. // * whitelist: The Location elements specify the countries in which you
  4353. // want CloudFront to distribute your content.
  4354. //
  4355. // RestrictionType is a required field
  4356. RestrictionType *string `type:"string" required:"true" enum:"GeoRestrictionType"`
  4357. }
  4358. // String returns the string representation
  4359. func (s GeoRestriction) String() string {
  4360. return awsutil.Prettify(s)
  4361. }
  4362. // GoString returns the string representation
  4363. func (s GeoRestriction) GoString() string {
  4364. return s.String()
  4365. }
  4366. // Validate inspects the fields of the type to determine if they are valid.
  4367. func (s *GeoRestriction) Validate() error {
  4368. invalidParams := request.ErrInvalidParams{Context: "GeoRestriction"}
  4369. if s.Quantity == nil {
  4370. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  4371. }
  4372. if s.RestrictionType == nil {
  4373. invalidParams.Add(request.NewErrParamRequired("RestrictionType"))
  4374. }
  4375. if invalidParams.Len() > 0 {
  4376. return invalidParams
  4377. }
  4378. return nil
  4379. }
  4380. // The origin access identity's configuration information. For more information,
  4381. // see CloudFrontOriginAccessIdentityConfigComplexType.
  4382. type GetCloudFrontOriginAccessIdentityConfigInput struct {
  4383. _ struct{} `type:"structure"`
  4384. // The identity's ID.
  4385. //
  4386. // Id is a required field
  4387. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  4388. }
  4389. // String returns the string representation
  4390. func (s GetCloudFrontOriginAccessIdentityConfigInput) String() string {
  4391. return awsutil.Prettify(s)
  4392. }
  4393. // GoString returns the string representation
  4394. func (s GetCloudFrontOriginAccessIdentityConfigInput) GoString() string {
  4395. return s.String()
  4396. }
  4397. // Validate inspects the fields of the type to determine if they are valid.
  4398. func (s *GetCloudFrontOriginAccessIdentityConfigInput) Validate() error {
  4399. invalidParams := request.ErrInvalidParams{Context: "GetCloudFrontOriginAccessIdentityConfigInput"}
  4400. if s.Id == nil {
  4401. invalidParams.Add(request.NewErrParamRequired("Id"))
  4402. }
  4403. if invalidParams.Len() > 0 {
  4404. return invalidParams
  4405. }
  4406. return nil
  4407. }
  4408. // The returned result of the corresponding request.
  4409. type GetCloudFrontOriginAccessIdentityConfigOutput struct {
  4410. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"`
  4411. // The origin access identity's configuration information.
  4412. CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `type:"structure"`
  4413. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  4414. ETag *string `location:"header" locationName:"ETag" type:"string"`
  4415. }
  4416. // String returns the string representation
  4417. func (s GetCloudFrontOriginAccessIdentityConfigOutput) String() string {
  4418. return awsutil.Prettify(s)
  4419. }
  4420. // GoString returns the string representation
  4421. func (s GetCloudFrontOriginAccessIdentityConfigOutput) GoString() string {
  4422. return s.String()
  4423. }
  4424. // The request to get an origin access identity's information.
  4425. type GetCloudFrontOriginAccessIdentityInput struct {
  4426. _ struct{} `type:"structure"`
  4427. // The identity's ID.
  4428. //
  4429. // Id is a required field
  4430. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  4431. }
  4432. // String returns the string representation
  4433. func (s GetCloudFrontOriginAccessIdentityInput) String() string {
  4434. return awsutil.Prettify(s)
  4435. }
  4436. // GoString returns the string representation
  4437. func (s GetCloudFrontOriginAccessIdentityInput) GoString() string {
  4438. return s.String()
  4439. }
  4440. // Validate inspects the fields of the type to determine if they are valid.
  4441. func (s *GetCloudFrontOriginAccessIdentityInput) Validate() error {
  4442. invalidParams := request.ErrInvalidParams{Context: "GetCloudFrontOriginAccessIdentityInput"}
  4443. if s.Id == nil {
  4444. invalidParams.Add(request.NewErrParamRequired("Id"))
  4445. }
  4446. if invalidParams.Len() > 0 {
  4447. return invalidParams
  4448. }
  4449. return nil
  4450. }
  4451. // The returned result of the corresponding request.
  4452. type GetCloudFrontOriginAccessIdentityOutput struct {
  4453. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"`
  4454. // The origin access identity's information.
  4455. CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"`
  4456. // The current version of the origin access identity's information. For example:
  4457. // E2QWRUHAPOMQZL.
  4458. ETag *string `location:"header" locationName:"ETag" type:"string"`
  4459. }
  4460. // String returns the string representation
  4461. func (s GetCloudFrontOriginAccessIdentityOutput) String() string {
  4462. return awsutil.Prettify(s)
  4463. }
  4464. // GoString returns the string representation
  4465. func (s GetCloudFrontOriginAccessIdentityOutput) GoString() string {
  4466. return s.String()
  4467. }
  4468. // The request to get a distribution configuration.
  4469. type GetDistributionConfigInput struct {
  4470. _ struct{} `type:"structure"`
  4471. // The distribution's ID.
  4472. //
  4473. // Id is a required field
  4474. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  4475. }
  4476. // String returns the string representation
  4477. func (s GetDistributionConfigInput) String() string {
  4478. return awsutil.Prettify(s)
  4479. }
  4480. // GoString returns the string representation
  4481. func (s GetDistributionConfigInput) GoString() string {
  4482. return s.String()
  4483. }
  4484. // Validate inspects the fields of the type to determine if they are valid.
  4485. func (s *GetDistributionConfigInput) Validate() error {
  4486. invalidParams := request.ErrInvalidParams{Context: "GetDistributionConfigInput"}
  4487. if s.Id == nil {
  4488. invalidParams.Add(request.NewErrParamRequired("Id"))
  4489. }
  4490. if invalidParams.Len() > 0 {
  4491. return invalidParams
  4492. }
  4493. return nil
  4494. }
  4495. // The returned result of the corresponding request.
  4496. type GetDistributionConfigOutput struct {
  4497. _ struct{} `type:"structure" payload:"DistributionConfig"`
  4498. // The distribution's configuration information.
  4499. DistributionConfig *DistributionConfig `type:"structure"`
  4500. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  4501. ETag *string `location:"header" locationName:"ETag" type:"string"`
  4502. }
  4503. // String returns the string representation
  4504. func (s GetDistributionConfigOutput) String() string {
  4505. return awsutil.Prettify(s)
  4506. }
  4507. // GoString returns the string representation
  4508. func (s GetDistributionConfigOutput) GoString() string {
  4509. return s.String()
  4510. }
  4511. // The request to get a distribution's information.
  4512. type GetDistributionInput struct {
  4513. _ struct{} `type:"structure"`
  4514. // The distribution's ID.
  4515. //
  4516. // Id is a required field
  4517. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  4518. }
  4519. // String returns the string representation
  4520. func (s GetDistributionInput) String() string {
  4521. return awsutil.Prettify(s)
  4522. }
  4523. // GoString returns the string representation
  4524. func (s GetDistributionInput) GoString() string {
  4525. return s.String()
  4526. }
  4527. // Validate inspects the fields of the type to determine if they are valid.
  4528. func (s *GetDistributionInput) Validate() error {
  4529. invalidParams := request.ErrInvalidParams{Context: "GetDistributionInput"}
  4530. if s.Id == nil {
  4531. invalidParams.Add(request.NewErrParamRequired("Id"))
  4532. }
  4533. if invalidParams.Len() > 0 {
  4534. return invalidParams
  4535. }
  4536. return nil
  4537. }
  4538. // The returned result of the corresponding request.
  4539. type GetDistributionOutput struct {
  4540. _ struct{} `type:"structure" payload:"Distribution"`
  4541. // The distribution's information.
  4542. Distribution *Distribution `type:"structure"`
  4543. // The current version of the distribution's information. For example: E2QWRUHAPOMQZL.
  4544. ETag *string `location:"header" locationName:"ETag" type:"string"`
  4545. }
  4546. // String returns the string representation
  4547. func (s GetDistributionOutput) String() string {
  4548. return awsutil.Prettify(s)
  4549. }
  4550. // GoString returns the string representation
  4551. func (s GetDistributionOutput) GoString() string {
  4552. return s.String()
  4553. }
  4554. // The request to get an invalidation's information.
  4555. type GetInvalidationInput struct {
  4556. _ struct{} `type:"structure"`
  4557. // The distribution's ID.
  4558. //
  4559. // DistributionId is a required field
  4560. DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"`
  4561. // The identifier for the invalidation request, for example, IDFDVBD632BHDS5.
  4562. //
  4563. // Id is a required field
  4564. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  4565. }
  4566. // String returns the string representation
  4567. func (s GetInvalidationInput) String() string {
  4568. return awsutil.Prettify(s)
  4569. }
  4570. // GoString returns the string representation
  4571. func (s GetInvalidationInput) GoString() string {
  4572. return s.String()
  4573. }
  4574. // Validate inspects the fields of the type to determine if they are valid.
  4575. func (s *GetInvalidationInput) Validate() error {
  4576. invalidParams := request.ErrInvalidParams{Context: "GetInvalidationInput"}
  4577. if s.DistributionId == nil {
  4578. invalidParams.Add(request.NewErrParamRequired("DistributionId"))
  4579. }
  4580. if s.Id == nil {
  4581. invalidParams.Add(request.NewErrParamRequired("Id"))
  4582. }
  4583. if invalidParams.Len() > 0 {
  4584. return invalidParams
  4585. }
  4586. return nil
  4587. }
  4588. // The returned result of the corresponding request.
  4589. type GetInvalidationOutput struct {
  4590. _ struct{} `type:"structure" payload:"Invalidation"`
  4591. // The invalidation's information. For more information, see Invalidation Complex
  4592. // Type (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/InvalidationDatatype.html).
  4593. Invalidation *Invalidation `type:"structure"`
  4594. }
  4595. // String returns the string representation
  4596. func (s GetInvalidationOutput) String() string {
  4597. return awsutil.Prettify(s)
  4598. }
  4599. // GoString returns the string representation
  4600. func (s GetInvalidationOutput) GoString() string {
  4601. return s.String()
  4602. }
  4603. // To request to get a streaming distribution configuration.
  4604. type GetStreamingDistributionConfigInput struct {
  4605. _ struct{} `type:"structure"`
  4606. // The streaming distribution's ID.
  4607. //
  4608. // Id is a required field
  4609. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  4610. }
  4611. // String returns the string representation
  4612. func (s GetStreamingDistributionConfigInput) String() string {
  4613. return awsutil.Prettify(s)
  4614. }
  4615. // GoString returns the string representation
  4616. func (s GetStreamingDistributionConfigInput) GoString() string {
  4617. return s.String()
  4618. }
  4619. // Validate inspects the fields of the type to determine if they are valid.
  4620. func (s *GetStreamingDistributionConfigInput) Validate() error {
  4621. invalidParams := request.ErrInvalidParams{Context: "GetStreamingDistributionConfigInput"}
  4622. if s.Id == nil {
  4623. invalidParams.Add(request.NewErrParamRequired("Id"))
  4624. }
  4625. if invalidParams.Len() > 0 {
  4626. return invalidParams
  4627. }
  4628. return nil
  4629. }
  4630. // The returned result of the corresponding request.
  4631. type GetStreamingDistributionConfigOutput struct {
  4632. _ struct{} `type:"structure" payload:"StreamingDistributionConfig"`
  4633. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  4634. ETag *string `location:"header" locationName:"ETag" type:"string"`
  4635. // The streaming distribution's configuration information.
  4636. StreamingDistributionConfig *StreamingDistributionConfig `type:"structure"`
  4637. }
  4638. // String returns the string representation
  4639. func (s GetStreamingDistributionConfigOutput) String() string {
  4640. return awsutil.Prettify(s)
  4641. }
  4642. // GoString returns the string representation
  4643. func (s GetStreamingDistributionConfigOutput) GoString() string {
  4644. return s.String()
  4645. }
  4646. // The request to get a streaming distribution's information.
  4647. type GetStreamingDistributionInput struct {
  4648. _ struct{} `type:"structure"`
  4649. // The streaming distribution's ID.
  4650. //
  4651. // Id is a required field
  4652. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  4653. }
  4654. // String returns the string representation
  4655. func (s GetStreamingDistributionInput) String() string {
  4656. return awsutil.Prettify(s)
  4657. }
  4658. // GoString returns the string representation
  4659. func (s GetStreamingDistributionInput) GoString() string {
  4660. return s.String()
  4661. }
  4662. // Validate inspects the fields of the type to determine if they are valid.
  4663. func (s *GetStreamingDistributionInput) Validate() error {
  4664. invalidParams := request.ErrInvalidParams{Context: "GetStreamingDistributionInput"}
  4665. if s.Id == nil {
  4666. invalidParams.Add(request.NewErrParamRequired("Id"))
  4667. }
  4668. if invalidParams.Len() > 0 {
  4669. return invalidParams
  4670. }
  4671. return nil
  4672. }
  4673. // The returned result of the corresponding request.
  4674. type GetStreamingDistributionOutput struct {
  4675. _ struct{} `type:"structure" payload:"StreamingDistribution"`
  4676. // The current version of the streaming distribution's information. For example:
  4677. // E2QWRUHAPOMQZL.
  4678. ETag *string `location:"header" locationName:"ETag" type:"string"`
  4679. // The streaming distribution's information.
  4680. StreamingDistribution *StreamingDistribution `type:"structure"`
  4681. }
  4682. // String returns the string representation
  4683. func (s GetStreamingDistributionOutput) String() string {
  4684. return awsutil.Prettify(s)
  4685. }
  4686. // GoString returns the string representation
  4687. func (s GetStreamingDistributionOutput) GoString() string {
  4688. return s.String()
  4689. }
  4690. // A complex type that specifies the headers that you want CloudFront to forward
  4691. // to the origin for this cache behavior.
  4692. //
  4693. // For the headers that you specify, CloudFront also caches separate versions
  4694. // of a specified object based on the header values in viewer requests. For
  4695. // example, suppose viewer requests for logo.jpg contain a custom Product header
  4696. // that has a value of either Acme or Apex, and you configure CloudFront to
  4697. // cache your content based on values in the Product header. CloudFront forwards
  4698. // the Product header to the origin and caches the response from the origin
  4699. // once for each header value. For more information about caching based on header
  4700. // values, see How CloudFront Forwards and Caches Headers (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html)
  4701. // in the Amazon CloudFront Developer Guide.
  4702. type Headers struct {
  4703. _ struct{} `type:"structure"`
  4704. // A complex type that contains one Name element for each header that you want
  4705. // CloudFront to forward to the origin and to vary on for this cache behavior.
  4706. // If Quantity is 0, omit Items.
  4707. Items []*string `locationNameList:"Name" type:"list"`
  4708. // The number of different headers that you want CloudFront to forward to the
  4709. // origin for this cache behavior. You can configure each cache behavior in
  4710. // a web distribution to do one of the following:
  4711. //
  4712. // * Forward all headers to your origin: Specify 1 for Quantity and * for
  4713. // Name.
  4714. //
  4715. // If you configure CloudFront to forward all headers to your origin, CloudFront
  4716. // doesn't cache the objects associated with this cache behavior. Instead,
  4717. // it sends every request to the origin.
  4718. //
  4719. // * Forward a whitelist of headers you specify: Specify the number of headers
  4720. // that you want to forward, and specify the header names in Name elements.
  4721. // CloudFront caches your objects based on the values in all of the specified
  4722. // headers. CloudFront also forwards the headers that it forwards by default,
  4723. // but it caches your objects based only on the headers that you specify.
  4724. //
  4725. //
  4726. // * Forward only the default headers: Specify 0 for Quantity and omit Items.
  4727. // In this configuration, CloudFront doesn't cache based on the values in
  4728. // the request headers.
  4729. //
  4730. // Quantity is a required field
  4731. Quantity *int64 `type:"integer" required:"true"`
  4732. }
  4733. // String returns the string representation
  4734. func (s Headers) String() string {
  4735. return awsutil.Prettify(s)
  4736. }
  4737. // GoString returns the string representation
  4738. func (s Headers) GoString() string {
  4739. return s.String()
  4740. }
  4741. // Validate inspects the fields of the type to determine if they are valid.
  4742. func (s *Headers) Validate() error {
  4743. invalidParams := request.ErrInvalidParams{Context: "Headers"}
  4744. if s.Quantity == nil {
  4745. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  4746. }
  4747. if invalidParams.Len() > 0 {
  4748. return invalidParams
  4749. }
  4750. return nil
  4751. }
  4752. // An invalidation.
  4753. type Invalidation struct {
  4754. _ struct{} `type:"structure"`
  4755. // The date and time the invalidation request was first made.
  4756. //
  4757. // CreateTime is a required field
  4758. CreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
  4759. // The identifier for the invalidation request. For example: IDFDVBD632BHDS5.
  4760. //
  4761. // Id is a required field
  4762. Id *string `type:"string" required:"true"`
  4763. // The current invalidation information for the batch request.
  4764. //
  4765. // InvalidationBatch is a required field
  4766. InvalidationBatch *InvalidationBatch `type:"structure" required:"true"`
  4767. // The status of the invalidation request. When the invalidation batch is finished,
  4768. // the status is Completed.
  4769. //
  4770. // Status is a required field
  4771. Status *string `type:"string" required:"true"`
  4772. }
  4773. // String returns the string representation
  4774. func (s Invalidation) String() string {
  4775. return awsutil.Prettify(s)
  4776. }
  4777. // GoString returns the string representation
  4778. func (s Invalidation) GoString() string {
  4779. return s.String()
  4780. }
  4781. // An invalidation batch.
  4782. type InvalidationBatch struct {
  4783. _ struct{} `type:"structure"`
  4784. // A value that you specify to uniquely identify an invalidation request. CloudFront
  4785. // uses the value to prevent you from accidentally resubmitting an identical
  4786. // request. Whenever you create a new invalidation request, you must specify
  4787. // a new value for CallerReference and change other values in the request as
  4788. // applicable. One way to ensure that the value of CallerReference is unique
  4789. // is to use a timestamp, for example, 20120301090000.
  4790. //
  4791. // If you make a second invalidation request with the same value for CallerReference,
  4792. // and if the rest of the request is the same, CloudFront doesn't create a new
  4793. // invalidation request. Instead, CloudFront returns information about the invalidation
  4794. // request that you previously created with the same CallerReference.
  4795. //
  4796. // If CallerReference is a value you already sent in a previous invalidation
  4797. // batch request but the content of any Path is different from the original
  4798. // request, CloudFront returns an InvalidationBatchAlreadyExists error.
  4799. //
  4800. // CallerReference is a required field
  4801. CallerReference *string `type:"string" required:"true"`
  4802. // A complex type that contains information about the objects that you want
  4803. // to invalidate. For more information, see Specifying the Objects to Invalidate
  4804. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects)
  4805. // in the Amazon CloudFront Developer Guide.
  4806. //
  4807. // Paths is a required field
  4808. Paths *Paths `type:"structure" required:"true"`
  4809. }
  4810. // String returns the string representation
  4811. func (s InvalidationBatch) String() string {
  4812. return awsutil.Prettify(s)
  4813. }
  4814. // GoString returns the string representation
  4815. func (s InvalidationBatch) GoString() string {
  4816. return s.String()
  4817. }
  4818. // Validate inspects the fields of the type to determine if they are valid.
  4819. func (s *InvalidationBatch) Validate() error {
  4820. invalidParams := request.ErrInvalidParams{Context: "InvalidationBatch"}
  4821. if s.CallerReference == nil {
  4822. invalidParams.Add(request.NewErrParamRequired("CallerReference"))
  4823. }
  4824. if s.Paths == nil {
  4825. invalidParams.Add(request.NewErrParamRequired("Paths"))
  4826. }
  4827. if s.Paths != nil {
  4828. if err := s.Paths.Validate(); err != nil {
  4829. invalidParams.AddNested("Paths", err.(request.ErrInvalidParams))
  4830. }
  4831. }
  4832. if invalidParams.Len() > 0 {
  4833. return invalidParams
  4834. }
  4835. return nil
  4836. }
  4837. // The InvalidationList complex type describes the list of invalidation objects.
  4838. // For more information about invalidation, see Invalidating Objects (Web Distributions
  4839. // Only) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html)
  4840. // in the Amazon CloudFront Developer Guide.
  4841. type InvalidationList struct {
  4842. _ struct{} `type:"structure"`
  4843. // A flag that indicates whether more invalidation batch requests remain to
  4844. // be listed. If your results were truncated, you can make a follow-up pagination
  4845. // request using the Marker request parameter to retrieve more invalidation
  4846. // batches in the list.
  4847. //
  4848. // IsTruncated is a required field
  4849. IsTruncated *bool `type:"boolean" required:"true"`
  4850. // A complex type that contains one InvalidationSummary element for each invalidation
  4851. // batch created by the current AWS account.
  4852. Items []*InvalidationSummary `locationNameList:"InvalidationSummary" type:"list"`
  4853. // The value that you provided for the Marker request parameter.
  4854. //
  4855. // Marker is a required field
  4856. Marker *string `type:"string" required:"true"`
  4857. // The value that you provided for the MaxItems request parameter.
  4858. //
  4859. // MaxItems is a required field
  4860. MaxItems *int64 `type:"integer" required:"true"`
  4861. // If IsTruncated is true, this element is present and contains the value that
  4862. // you can use for the Marker request parameter to continue listing your invalidation
  4863. // batches where they left off.
  4864. NextMarker *string `type:"string"`
  4865. // The number of invalidation batches that were created by the current AWS account.
  4866. //
  4867. // Quantity is a required field
  4868. Quantity *int64 `type:"integer" required:"true"`
  4869. }
  4870. // String returns the string representation
  4871. func (s InvalidationList) String() string {
  4872. return awsutil.Prettify(s)
  4873. }
  4874. // GoString returns the string representation
  4875. func (s InvalidationList) GoString() string {
  4876. return s.String()
  4877. }
  4878. // A summary of an invalidation request.
  4879. type InvalidationSummary struct {
  4880. _ struct{} `type:"structure"`
  4881. // CreateTime is a required field
  4882. CreateTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
  4883. // The unique ID for an invalidation request.
  4884. //
  4885. // Id is a required field
  4886. Id *string `type:"string" required:"true"`
  4887. // The status of an invalidation request.
  4888. //
  4889. // Status is a required field
  4890. Status *string `type:"string" required:"true"`
  4891. }
  4892. // String returns the string representation
  4893. func (s InvalidationSummary) String() string {
  4894. return awsutil.Prettify(s)
  4895. }
  4896. // GoString returns the string representation
  4897. func (s InvalidationSummary) GoString() string {
  4898. return s.String()
  4899. }
  4900. // A complex type that lists the active CloudFront key pairs, if any, that are
  4901. // associated with AwsAccountNumber.
  4902. //
  4903. // For more information, see ActiveTrustedSigners.
  4904. type KeyPairIds struct {
  4905. _ struct{} `type:"structure"`
  4906. // A complex type that lists the active CloudFront key pairs, if any, that are
  4907. // associated with AwsAccountNumber.
  4908. //
  4909. // For more information, see ActiveTrustedSigners.
  4910. Items []*string `locationNameList:"KeyPairId" type:"list"`
  4911. // The number of active CloudFront key pairs for AwsAccountNumber.
  4912. //
  4913. // For more information, see ActiveTrustedSigners.
  4914. //
  4915. // Quantity is a required field
  4916. Quantity *int64 `type:"integer" required:"true"`
  4917. }
  4918. // String returns the string representation
  4919. func (s KeyPairIds) String() string {
  4920. return awsutil.Prettify(s)
  4921. }
  4922. // GoString returns the string representation
  4923. func (s KeyPairIds) GoString() string {
  4924. return s.String()
  4925. }
  4926. // The request to list origin access identities.
  4927. type ListCloudFrontOriginAccessIdentitiesInput struct {
  4928. _ struct{} `type:"structure"`
  4929. // Use this when paginating results to indicate where to begin in your list
  4930. // of origin access identities. The results include identities in the list that
  4931. // occur after the marker. To get the next page of results, set the Marker to
  4932. // the value of the NextMarker from the current page's response (which is also
  4933. // the ID of the last identity on that page).
  4934. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  4935. // The maximum number of origin access identities you want in the response body.
  4936. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  4937. }
  4938. // String returns the string representation
  4939. func (s ListCloudFrontOriginAccessIdentitiesInput) String() string {
  4940. return awsutil.Prettify(s)
  4941. }
  4942. // GoString returns the string representation
  4943. func (s ListCloudFrontOriginAccessIdentitiesInput) GoString() string {
  4944. return s.String()
  4945. }
  4946. // The returned result of the corresponding request.
  4947. type ListCloudFrontOriginAccessIdentitiesOutput struct {
  4948. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityList"`
  4949. // The CloudFrontOriginAccessIdentityList type.
  4950. CloudFrontOriginAccessIdentityList *OriginAccessIdentityList `type:"structure"`
  4951. }
  4952. // String returns the string representation
  4953. func (s ListCloudFrontOriginAccessIdentitiesOutput) String() string {
  4954. return awsutil.Prettify(s)
  4955. }
  4956. // GoString returns the string representation
  4957. func (s ListCloudFrontOriginAccessIdentitiesOutput) GoString() string {
  4958. return s.String()
  4959. }
  4960. // The request to list distributions that are associated with a specified AWS
  4961. // WAF web ACL.
  4962. type ListDistributionsByWebACLIdInput struct {
  4963. _ struct{} `type:"structure"`
  4964. // Use Marker and MaxItems to control pagination of results. If you have more
  4965. // than MaxItems distributions that satisfy the request, the response includes
  4966. // a NextMarker element. To get the next page of results, submit another request.
  4967. // For the value of Marker, specify the value of NextMarker from the last response.
  4968. // (For the first request, omit Marker.)
  4969. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  4970. // The maximum number of distributions that you want CloudFront to return in
  4971. // the response body. The maximum and default values are both 100.
  4972. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  4973. // The ID of the AWS WAF web ACL that you want to list the associated distributions.
  4974. // If you specify "null" for the ID, the request returns a list of the distributions
  4975. // that aren't associated with a web ACL.
  4976. //
  4977. // WebACLId is a required field
  4978. WebACLId *string `location:"uri" locationName:"WebACLId" type:"string" required:"true"`
  4979. }
  4980. // String returns the string representation
  4981. func (s ListDistributionsByWebACLIdInput) String() string {
  4982. return awsutil.Prettify(s)
  4983. }
  4984. // GoString returns the string representation
  4985. func (s ListDistributionsByWebACLIdInput) GoString() string {
  4986. return s.String()
  4987. }
  4988. // Validate inspects the fields of the type to determine if they are valid.
  4989. func (s *ListDistributionsByWebACLIdInput) Validate() error {
  4990. invalidParams := request.ErrInvalidParams{Context: "ListDistributionsByWebACLIdInput"}
  4991. if s.WebACLId == nil {
  4992. invalidParams.Add(request.NewErrParamRequired("WebACLId"))
  4993. }
  4994. if invalidParams.Len() > 0 {
  4995. return invalidParams
  4996. }
  4997. return nil
  4998. }
  4999. // The response to a request to list the distributions that are associated with
  5000. // a specified AWS WAF web ACL.
  5001. type ListDistributionsByWebACLIdOutput struct {
  5002. _ struct{} `type:"structure" payload:"DistributionList"`
  5003. // The DistributionList type.
  5004. DistributionList *DistributionList `type:"structure"`
  5005. }
  5006. // String returns the string representation
  5007. func (s ListDistributionsByWebACLIdOutput) String() string {
  5008. return awsutil.Prettify(s)
  5009. }
  5010. // GoString returns the string representation
  5011. func (s ListDistributionsByWebACLIdOutput) GoString() string {
  5012. return s.String()
  5013. }
  5014. // The request to list your distributions.
  5015. type ListDistributionsInput struct {
  5016. _ struct{} `type:"structure"`
  5017. // Use this when paginating results to indicate where to begin in your list
  5018. // of distributions. The results include distributions in the list that occur
  5019. // after the marker. To get the next page of results, set the Marker to the
  5020. // value of the NextMarker from the current page's response (which is also the
  5021. // ID of the last distribution on that page).
  5022. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  5023. // The maximum number of distributions you want in the response body.
  5024. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  5025. }
  5026. // String returns the string representation
  5027. func (s ListDistributionsInput) String() string {
  5028. return awsutil.Prettify(s)
  5029. }
  5030. // GoString returns the string representation
  5031. func (s ListDistributionsInput) GoString() string {
  5032. return s.String()
  5033. }
  5034. // The returned result of the corresponding request.
  5035. type ListDistributionsOutput struct {
  5036. _ struct{} `type:"structure" payload:"DistributionList"`
  5037. // The DistributionList type.
  5038. DistributionList *DistributionList `type:"structure"`
  5039. }
  5040. // String returns the string representation
  5041. func (s ListDistributionsOutput) String() string {
  5042. return awsutil.Prettify(s)
  5043. }
  5044. // GoString returns the string representation
  5045. func (s ListDistributionsOutput) GoString() string {
  5046. return s.String()
  5047. }
  5048. // The request to list invalidations.
  5049. type ListInvalidationsInput struct {
  5050. _ struct{} `type:"structure"`
  5051. // The distribution's ID.
  5052. //
  5053. // DistributionId is a required field
  5054. DistributionId *string `location:"uri" locationName:"DistributionId" type:"string" required:"true"`
  5055. // Use this parameter when paginating results to indicate where to begin in
  5056. // your list of invalidation batches. Because the results are returned in decreasing
  5057. // order from most recent to oldest, the most recent results are on the first
  5058. // page, the second page will contain earlier results, and so on. To get the
  5059. // next page of results, set Marker to the value of the NextMarker from the
  5060. // current page's response. This value is the same as the ID of the last invalidation
  5061. // batch on that page.
  5062. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  5063. // The maximum number of invalidation batches that you want in the response
  5064. // body.
  5065. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  5066. }
  5067. // String returns the string representation
  5068. func (s ListInvalidationsInput) String() string {
  5069. return awsutil.Prettify(s)
  5070. }
  5071. // GoString returns the string representation
  5072. func (s ListInvalidationsInput) GoString() string {
  5073. return s.String()
  5074. }
  5075. // Validate inspects the fields of the type to determine if they are valid.
  5076. func (s *ListInvalidationsInput) Validate() error {
  5077. invalidParams := request.ErrInvalidParams{Context: "ListInvalidationsInput"}
  5078. if s.DistributionId == nil {
  5079. invalidParams.Add(request.NewErrParamRequired("DistributionId"))
  5080. }
  5081. if invalidParams.Len() > 0 {
  5082. return invalidParams
  5083. }
  5084. return nil
  5085. }
  5086. // The returned result of the corresponding request.
  5087. type ListInvalidationsOutput struct {
  5088. _ struct{} `type:"structure" payload:"InvalidationList"`
  5089. // Information about invalidation batches.
  5090. InvalidationList *InvalidationList `type:"structure"`
  5091. }
  5092. // String returns the string representation
  5093. func (s ListInvalidationsOutput) String() string {
  5094. return awsutil.Prettify(s)
  5095. }
  5096. // GoString returns the string representation
  5097. func (s ListInvalidationsOutput) GoString() string {
  5098. return s.String()
  5099. }
  5100. // The request to list your streaming distributions.
  5101. type ListStreamingDistributionsInput struct {
  5102. _ struct{} `type:"structure"`
  5103. // The value that you provided for the Marker request parameter.
  5104. Marker *string `location:"querystring" locationName:"Marker" type:"string"`
  5105. // The value that you provided for the MaxItems request parameter.
  5106. MaxItems *int64 `location:"querystring" locationName:"MaxItems" type:"integer"`
  5107. }
  5108. // String returns the string representation
  5109. func (s ListStreamingDistributionsInput) String() string {
  5110. return awsutil.Prettify(s)
  5111. }
  5112. // GoString returns the string representation
  5113. func (s ListStreamingDistributionsInput) GoString() string {
  5114. return s.String()
  5115. }
  5116. // The returned result of the corresponding request.
  5117. type ListStreamingDistributionsOutput struct {
  5118. _ struct{} `type:"structure" payload:"StreamingDistributionList"`
  5119. // The StreamingDistributionList type.
  5120. StreamingDistributionList *StreamingDistributionList `type:"structure"`
  5121. }
  5122. // String returns the string representation
  5123. func (s ListStreamingDistributionsOutput) String() string {
  5124. return awsutil.Prettify(s)
  5125. }
  5126. // GoString returns the string representation
  5127. func (s ListStreamingDistributionsOutput) GoString() string {
  5128. return s.String()
  5129. }
  5130. // The request to list tags for a CloudFront resource.
  5131. type ListTagsForResourceInput struct {
  5132. _ struct{} `type:"structure"`
  5133. // An ARN of a CloudFront resource.
  5134. //
  5135. // Resource is a required field
  5136. Resource *string `location:"querystring" locationName:"Resource" type:"string" required:"true"`
  5137. }
  5138. // String returns the string representation
  5139. func (s ListTagsForResourceInput) String() string {
  5140. return awsutil.Prettify(s)
  5141. }
  5142. // GoString returns the string representation
  5143. func (s ListTagsForResourceInput) GoString() string {
  5144. return s.String()
  5145. }
  5146. // Validate inspects the fields of the type to determine if they are valid.
  5147. func (s *ListTagsForResourceInput) Validate() error {
  5148. invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
  5149. if s.Resource == nil {
  5150. invalidParams.Add(request.NewErrParamRequired("Resource"))
  5151. }
  5152. if invalidParams.Len() > 0 {
  5153. return invalidParams
  5154. }
  5155. return nil
  5156. }
  5157. // The returned result of the corresponding request.
  5158. type ListTagsForResourceOutput struct {
  5159. _ struct{} `type:"structure" payload:"Tags"`
  5160. // A complex type that contains zero or more Tag elements.
  5161. //
  5162. // Tags is a required field
  5163. Tags *Tags `type:"structure" required:"true"`
  5164. }
  5165. // String returns the string representation
  5166. func (s ListTagsForResourceOutput) String() string {
  5167. return awsutil.Prettify(s)
  5168. }
  5169. // GoString returns the string representation
  5170. func (s ListTagsForResourceOutput) GoString() string {
  5171. return s.String()
  5172. }
  5173. // A complex type that controls whether access logs are written for the distribution.
  5174. type LoggingConfig struct {
  5175. _ struct{} `type:"structure"`
  5176. // The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com.
  5177. //
  5178. // Bucket is a required field
  5179. Bucket *string `type:"string" required:"true"`
  5180. // Specifies whether you want CloudFront to save access logs to an Amazon S3
  5181. // bucket. If you do not want to enable logging when you create a distribution
  5182. // or if you want to disable logging for an existing distribution, specify false
  5183. // for Enabled, and specify empty Bucket and Prefix elements. If you specify
  5184. // false for Enabled but you specify values for Bucket, prefix, and IncludeCookies,
  5185. // the values are automatically deleted.
  5186. //
  5187. // Enabled is a required field
  5188. Enabled *bool `type:"boolean" required:"true"`
  5189. // Specifies whether you want CloudFront to include cookies in access logs,
  5190. // specify true for IncludeCookies. If you choose to include cookies in logs,
  5191. // CloudFront logs all cookies regardless of how you configure the cache behaviors
  5192. // for this distribution. If you do not want to include cookies when you create
  5193. // a distribution or if you want to disable include cookies for an existing
  5194. // distribution, specify false for IncludeCookies.
  5195. //
  5196. // IncludeCookies is a required field
  5197. IncludeCookies *bool `type:"boolean" required:"true"`
  5198. // An optional string that you want CloudFront to prefix to the access log filenames
  5199. // for this distribution, for example, myprefix/. If you want to enable logging,
  5200. // but you do not want to specify a prefix, you still must include an empty
  5201. // Prefix element in the Logging element.
  5202. //
  5203. // Prefix is a required field
  5204. Prefix *string `type:"string" required:"true"`
  5205. }
  5206. // String returns the string representation
  5207. func (s LoggingConfig) String() string {
  5208. return awsutil.Prettify(s)
  5209. }
  5210. // GoString returns the string representation
  5211. func (s LoggingConfig) GoString() string {
  5212. return s.String()
  5213. }
  5214. // Validate inspects the fields of the type to determine if they are valid.
  5215. func (s *LoggingConfig) Validate() error {
  5216. invalidParams := request.ErrInvalidParams{Context: "LoggingConfig"}
  5217. if s.Bucket == nil {
  5218. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5219. }
  5220. if s.Enabled == nil {
  5221. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  5222. }
  5223. if s.IncludeCookies == nil {
  5224. invalidParams.Add(request.NewErrParamRequired("IncludeCookies"))
  5225. }
  5226. if s.Prefix == nil {
  5227. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  5228. }
  5229. if invalidParams.Len() > 0 {
  5230. return invalidParams
  5231. }
  5232. return nil
  5233. }
  5234. // A complex type that describes the Amazon S3 bucket or the HTTP server (for
  5235. // example, a web server) from which CloudFront gets your files. You must create
  5236. // at least one origin.
  5237. //
  5238. // For the current limit on the number of origins that you can create for a
  5239. // distribution, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront)
  5240. // in the AWS General Reference.
  5241. type Origin struct {
  5242. _ struct{} `type:"structure"`
  5243. // A complex type that contains names and values for the custom headers that
  5244. // you want.
  5245. CustomHeaders *CustomHeaders `type:"structure"`
  5246. // A complex type that contains information about a custom origin. If the origin
  5247. // is an Amazon S3 bucket, use the S3OriginConfig element instead.
  5248. CustomOriginConfig *CustomOriginConfig `type:"structure"`
  5249. // Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want
  5250. // CloudFront to get objects for this origin, for example, myawsbucket.s3.amazonaws.com.
  5251. //
  5252. // Constraints for Amazon S3 origins:
  5253. //
  5254. // * If you configured Amazon S3 Transfer Acceleration for your bucket, do
  5255. // not specify the s3-accelerate endpoint for DomainName.
  5256. //
  5257. // * The bucket name must be between 3 and 63 characters long (inclusive).
  5258. //
  5259. // * The bucket name must contain only lowercase characters, numbers, periods,
  5260. // underscores, and dashes.
  5261. //
  5262. // * The bucket name must not contain adjacent periods.
  5263. //
  5264. // Custom Origins: The DNS domain name for the HTTP server from which you want
  5265. // CloudFront to get objects for this origin, for example, www.example.com.
  5266. //
  5267. // Constraints for custom origins:
  5268. //
  5269. // * DomainName must be a valid DNS name that contains only a-z, A-Z, 0-9,
  5270. // dot (.), hyphen (-), or underscore (_) characters.
  5271. //
  5272. // * The name cannot exceed 128 characters.
  5273. //
  5274. // DomainName is a required field
  5275. DomainName *string `type:"string" required:"true"`
  5276. // A unique identifier for the origin. The value of Id must be unique within
  5277. // the distribution.
  5278. //
  5279. // When you specify the value of TargetOriginId for the default cache behavior
  5280. // or for another cache behavior, you indicate the origin to which you want
  5281. // the cache behavior to route requests by specifying the value of the Id element
  5282. // for that origin. When a request matches the path pattern for that cache behavior,
  5283. // CloudFront routes the request to the specified origin. For more information,
  5284. // see Cache Behavior Settings (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior)
  5285. // in the Amazon CloudFront Developer Guide.
  5286. //
  5287. // Id is a required field
  5288. Id *string `type:"string" required:"true"`
  5289. // An optional element that causes CloudFront to request your content from a
  5290. // directory in your Amazon S3 bucket or your custom origin. When you include
  5291. // the OriginPath element, specify the directory name, beginning with a /. CloudFront
  5292. // appends the directory name to the value of DomainName, for example, example.com/production.
  5293. // Do not include a / at the end of the directory name.
  5294. //
  5295. // For example, suppose you've specified the following values for your distribution:
  5296. //
  5297. // * DomainName: An Amazon S3 bucket named myawsbucket.
  5298. //
  5299. // * OriginPath: /production
  5300. //
  5301. // * CNAME: example.com
  5302. //
  5303. // When a user enters example.com/index.html in a browser, CloudFront sends
  5304. // a request to Amazon S3 for myawsbucket/production/index.html.
  5305. //
  5306. // When a user enters example.com/acme/index.html in a browser, CloudFront sends
  5307. // a request to Amazon S3 for myawsbucket/production/acme/index.html.
  5308. OriginPath *string `type:"string"`
  5309. // A complex type that contains information about the Amazon S3 origin. If the
  5310. // origin is a custom origin, use the CustomOriginConfig element instead.
  5311. S3OriginConfig *S3OriginConfig `type:"structure"`
  5312. }
  5313. // String returns the string representation
  5314. func (s Origin) String() string {
  5315. return awsutil.Prettify(s)
  5316. }
  5317. // GoString returns the string representation
  5318. func (s Origin) GoString() string {
  5319. return s.String()
  5320. }
  5321. // Validate inspects the fields of the type to determine if they are valid.
  5322. func (s *Origin) Validate() error {
  5323. invalidParams := request.ErrInvalidParams{Context: "Origin"}
  5324. if s.DomainName == nil {
  5325. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  5326. }
  5327. if s.Id == nil {
  5328. invalidParams.Add(request.NewErrParamRequired("Id"))
  5329. }
  5330. if s.CustomHeaders != nil {
  5331. if err := s.CustomHeaders.Validate(); err != nil {
  5332. invalidParams.AddNested("CustomHeaders", err.(request.ErrInvalidParams))
  5333. }
  5334. }
  5335. if s.CustomOriginConfig != nil {
  5336. if err := s.CustomOriginConfig.Validate(); err != nil {
  5337. invalidParams.AddNested("CustomOriginConfig", err.(request.ErrInvalidParams))
  5338. }
  5339. }
  5340. if s.S3OriginConfig != nil {
  5341. if err := s.S3OriginConfig.Validate(); err != nil {
  5342. invalidParams.AddNested("S3OriginConfig", err.(request.ErrInvalidParams))
  5343. }
  5344. }
  5345. if invalidParams.Len() > 0 {
  5346. return invalidParams
  5347. }
  5348. return nil
  5349. }
  5350. // CloudFront origin access identity.
  5351. type OriginAccessIdentity struct {
  5352. _ struct{} `type:"structure"`
  5353. // The current configuration information for the identity.
  5354. CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `type:"structure"`
  5355. // The ID for the origin access identity. For example: E74FTE3AJFJ256A.
  5356. //
  5357. // Id is a required field
  5358. Id *string `type:"string" required:"true"`
  5359. // The Amazon S3 canonical user ID for the origin access identity, used when
  5360. // giving the origin access identity read permission to an object in Amazon
  5361. // S3.
  5362. //
  5363. // S3CanonicalUserId is a required field
  5364. S3CanonicalUserId *string `type:"string" required:"true"`
  5365. }
  5366. // String returns the string representation
  5367. func (s OriginAccessIdentity) String() string {
  5368. return awsutil.Prettify(s)
  5369. }
  5370. // GoString returns the string representation
  5371. func (s OriginAccessIdentity) GoString() string {
  5372. return s.String()
  5373. }
  5374. // Origin access identity configuration. Send a GET request to the /CloudFront
  5375. // API version/CloudFront/identity ID/config resource.
  5376. type OriginAccessIdentityConfig struct {
  5377. _ struct{} `type:"structure"`
  5378. // A unique number that ensures the request can't be replayed.
  5379. //
  5380. // If the CallerReference is new (no matter the content of the CloudFrontOriginAccessIdentityConfig
  5381. // object), a new origin access identity is created.
  5382. //
  5383. // If the CallerReference is a value already sent in a previous identity request,
  5384. // and the content of the CloudFrontOriginAccessIdentityConfig is identical
  5385. // to the original request (ignoring white space), the response includes the
  5386. // same information returned to the original request.
  5387. //
  5388. // If the CallerReference is a value you already sent in a previous request
  5389. // to create an identity, but the content of the CloudFrontOriginAccessIdentityConfig
  5390. // is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists
  5391. // error.
  5392. //
  5393. // CallerReference is a required field
  5394. CallerReference *string `type:"string" required:"true"`
  5395. // Any comments you want to include about the origin access identity.
  5396. //
  5397. // Comment is a required field
  5398. Comment *string `type:"string" required:"true"`
  5399. }
  5400. // String returns the string representation
  5401. func (s OriginAccessIdentityConfig) String() string {
  5402. return awsutil.Prettify(s)
  5403. }
  5404. // GoString returns the string representation
  5405. func (s OriginAccessIdentityConfig) GoString() string {
  5406. return s.String()
  5407. }
  5408. // Validate inspects the fields of the type to determine if they are valid.
  5409. func (s *OriginAccessIdentityConfig) Validate() error {
  5410. invalidParams := request.ErrInvalidParams{Context: "OriginAccessIdentityConfig"}
  5411. if s.CallerReference == nil {
  5412. invalidParams.Add(request.NewErrParamRequired("CallerReference"))
  5413. }
  5414. if s.Comment == nil {
  5415. invalidParams.Add(request.NewErrParamRequired("Comment"))
  5416. }
  5417. if invalidParams.Len() > 0 {
  5418. return invalidParams
  5419. }
  5420. return nil
  5421. }
  5422. // Lists the origin access identities for CloudFront.Send a GET request to the
  5423. // /CloudFront API version/origin-access-identity/cloudfront resource. The response
  5424. // includes a CloudFrontOriginAccessIdentityList element with zero or more CloudFrontOriginAccessIdentitySummary
  5425. // child elements. By default, your entire list of origin access identities
  5426. // is returned in one single page. If the list is long, you can paginate it
  5427. // using the MaxItems and Marker parameters.
  5428. type OriginAccessIdentityList struct {
  5429. _ struct{} `type:"structure"`
  5430. // A flag that indicates whether more origin access identities remain to be
  5431. // listed. If your results were truncated, you can make a follow-up pagination
  5432. // request using the Marker request parameter to retrieve more items in the
  5433. // list.
  5434. //
  5435. // IsTruncated is a required field
  5436. IsTruncated *bool `type:"boolean" required:"true"`
  5437. // A complex type that contains one CloudFrontOriginAccessIdentitySummary element
  5438. // for each origin access identity that was created by the current AWS account.
  5439. Items []*OriginAccessIdentitySummary `locationNameList:"CloudFrontOriginAccessIdentitySummary" type:"list"`
  5440. // Use this when paginating results to indicate where to begin in your list
  5441. // of origin access identities. The results include identities in the list that
  5442. // occur after the marker. To get the next page of results, set the Marker to
  5443. // the value of the NextMarker from the current page's response (which is also
  5444. // the ID of the last identity on that page).
  5445. //
  5446. // Marker is a required field
  5447. Marker *string `type:"string" required:"true"`
  5448. // The maximum number of origin access identities you want in the response body.
  5449. //
  5450. // MaxItems is a required field
  5451. MaxItems *int64 `type:"integer" required:"true"`
  5452. // If IsTruncated is true, this element is present and contains the value you
  5453. // can use for the Marker request parameter to continue listing your origin
  5454. // access identities where they left off.
  5455. NextMarker *string `type:"string"`
  5456. // The number of CloudFront origin access identities that were created by the
  5457. // current AWS account.
  5458. //
  5459. // Quantity is a required field
  5460. Quantity *int64 `type:"integer" required:"true"`
  5461. }
  5462. // String returns the string representation
  5463. func (s OriginAccessIdentityList) String() string {
  5464. return awsutil.Prettify(s)
  5465. }
  5466. // GoString returns the string representation
  5467. func (s OriginAccessIdentityList) GoString() string {
  5468. return s.String()
  5469. }
  5470. // Summary of the information about a CloudFront origin access identity.
  5471. type OriginAccessIdentitySummary struct {
  5472. _ struct{} `type:"structure"`
  5473. // The comment for this origin access identity, as originally specified when
  5474. // created.
  5475. //
  5476. // Comment is a required field
  5477. Comment *string `type:"string" required:"true"`
  5478. // The ID for the origin access identity. For example: E74FTE3AJFJ256A.
  5479. //
  5480. // Id is a required field
  5481. Id *string `type:"string" required:"true"`
  5482. // The Amazon S3 canonical user ID for the origin access identity, which you
  5483. // use when giving the origin access identity read permission to an object in
  5484. // Amazon S3.
  5485. //
  5486. // S3CanonicalUserId is a required field
  5487. S3CanonicalUserId *string `type:"string" required:"true"`
  5488. }
  5489. // String returns the string representation
  5490. func (s OriginAccessIdentitySummary) String() string {
  5491. return awsutil.Prettify(s)
  5492. }
  5493. // GoString returns the string representation
  5494. func (s OriginAccessIdentitySummary) GoString() string {
  5495. return s.String()
  5496. }
  5497. // A complex type that contains HeaderName and HeaderValue elements, if any,
  5498. // for this distribution.
  5499. type OriginCustomHeader struct {
  5500. _ struct{} `type:"structure"`
  5501. // The name of a header that you want CloudFront to forward to your origin.
  5502. // For more information, see Forwarding Custom Headers to Your Origin (Web Distributions
  5503. // Only) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/forward-custom-headers.html)
  5504. // in the Amazon Amazon CloudFront Developer Guide.
  5505. //
  5506. // HeaderName is a required field
  5507. HeaderName *string `type:"string" required:"true"`
  5508. // The value for the header that you specified in the HeaderName field.
  5509. //
  5510. // HeaderValue is a required field
  5511. HeaderValue *string `type:"string" required:"true"`
  5512. }
  5513. // String returns the string representation
  5514. func (s OriginCustomHeader) String() string {
  5515. return awsutil.Prettify(s)
  5516. }
  5517. // GoString returns the string representation
  5518. func (s OriginCustomHeader) GoString() string {
  5519. return s.String()
  5520. }
  5521. // Validate inspects the fields of the type to determine if they are valid.
  5522. func (s *OriginCustomHeader) Validate() error {
  5523. invalidParams := request.ErrInvalidParams{Context: "OriginCustomHeader"}
  5524. if s.HeaderName == nil {
  5525. invalidParams.Add(request.NewErrParamRequired("HeaderName"))
  5526. }
  5527. if s.HeaderValue == nil {
  5528. invalidParams.Add(request.NewErrParamRequired("HeaderValue"))
  5529. }
  5530. if invalidParams.Len() > 0 {
  5531. return invalidParams
  5532. }
  5533. return nil
  5534. }
  5535. // A complex type that contains information about the SSL/TLS protocols that
  5536. // CloudFront can use when establishing an HTTPS connection with your origin.
  5537. type OriginSslProtocols struct {
  5538. _ struct{} `type:"structure"`
  5539. // A list that contains allowed SSL/TLS protocols for this distribution.
  5540. //
  5541. // Items is a required field
  5542. Items []*string `locationNameList:"SslProtocol" type:"list" required:"true"`
  5543. // The number of SSL/TLS protocols that you want to allow CloudFront to use
  5544. // when establishing an HTTPS connection with this origin.
  5545. //
  5546. // Quantity is a required field
  5547. Quantity *int64 `type:"integer" required:"true"`
  5548. }
  5549. // String returns the string representation
  5550. func (s OriginSslProtocols) String() string {
  5551. return awsutil.Prettify(s)
  5552. }
  5553. // GoString returns the string representation
  5554. func (s OriginSslProtocols) GoString() string {
  5555. return s.String()
  5556. }
  5557. // Validate inspects the fields of the type to determine if they are valid.
  5558. func (s *OriginSslProtocols) Validate() error {
  5559. invalidParams := request.ErrInvalidParams{Context: "OriginSslProtocols"}
  5560. if s.Items == nil {
  5561. invalidParams.Add(request.NewErrParamRequired("Items"))
  5562. }
  5563. if s.Quantity == nil {
  5564. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  5565. }
  5566. if invalidParams.Len() > 0 {
  5567. return invalidParams
  5568. }
  5569. return nil
  5570. }
  5571. // A complex type that contains information about origins for this distribution.
  5572. type Origins struct {
  5573. _ struct{} `type:"structure"`
  5574. // A complex type that contains origins for this distribution.
  5575. Items []*Origin `locationNameList:"Origin" min:"1" type:"list"`
  5576. // The number of origins for this distribution.
  5577. //
  5578. // Quantity is a required field
  5579. Quantity *int64 `type:"integer" required:"true"`
  5580. }
  5581. // String returns the string representation
  5582. func (s Origins) String() string {
  5583. return awsutil.Prettify(s)
  5584. }
  5585. // GoString returns the string representation
  5586. func (s Origins) GoString() string {
  5587. return s.String()
  5588. }
  5589. // Validate inspects the fields of the type to determine if they are valid.
  5590. func (s *Origins) Validate() error {
  5591. invalidParams := request.ErrInvalidParams{Context: "Origins"}
  5592. if s.Items != nil && len(s.Items) < 1 {
  5593. invalidParams.Add(request.NewErrParamMinLen("Items", 1))
  5594. }
  5595. if s.Quantity == nil {
  5596. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  5597. }
  5598. if s.Items != nil {
  5599. for i, v := range s.Items {
  5600. if v == nil {
  5601. continue
  5602. }
  5603. if err := v.Validate(); err != nil {
  5604. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  5605. }
  5606. }
  5607. }
  5608. if invalidParams.Len() > 0 {
  5609. return invalidParams
  5610. }
  5611. return nil
  5612. }
  5613. // A complex type that contains information about the objects that you want
  5614. // to invalidate. For more information, see Specifying the Objects to Invalidate
  5615. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects)
  5616. // in the Amazon CloudFront Developer Guide.
  5617. type Paths struct {
  5618. _ struct{} `type:"structure"`
  5619. // A complex type that contains a list of the paths that you want to invalidate.
  5620. Items []*string `locationNameList:"Path" type:"list"`
  5621. // The number of objects that you want to invalidate.
  5622. //
  5623. // Quantity is a required field
  5624. Quantity *int64 `type:"integer" required:"true"`
  5625. }
  5626. // String returns the string representation
  5627. func (s Paths) String() string {
  5628. return awsutil.Prettify(s)
  5629. }
  5630. // GoString returns the string representation
  5631. func (s Paths) GoString() string {
  5632. return s.String()
  5633. }
  5634. // Validate inspects the fields of the type to determine if they are valid.
  5635. func (s *Paths) Validate() error {
  5636. invalidParams := request.ErrInvalidParams{Context: "Paths"}
  5637. if s.Quantity == nil {
  5638. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  5639. }
  5640. if invalidParams.Len() > 0 {
  5641. return invalidParams
  5642. }
  5643. return nil
  5644. }
  5645. type QueryStringCacheKeys struct {
  5646. _ struct{} `type:"structure"`
  5647. // (Optional) A list that contains the query string parameters that you want
  5648. // CloudFront to use as a basis for caching for this cache behavior. If Quantity
  5649. // is 0, you can omit Items.
  5650. Items []*string `locationNameList:"Name" type:"list"`
  5651. // The number of whitelisted query string parameters for this cache behavior.
  5652. //
  5653. // Quantity is a required field
  5654. Quantity *int64 `type:"integer" required:"true"`
  5655. }
  5656. // String returns the string representation
  5657. func (s QueryStringCacheKeys) String() string {
  5658. return awsutil.Prettify(s)
  5659. }
  5660. // GoString returns the string representation
  5661. func (s QueryStringCacheKeys) GoString() string {
  5662. return s.String()
  5663. }
  5664. // Validate inspects the fields of the type to determine if they are valid.
  5665. func (s *QueryStringCacheKeys) Validate() error {
  5666. invalidParams := request.ErrInvalidParams{Context: "QueryStringCacheKeys"}
  5667. if s.Quantity == nil {
  5668. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  5669. }
  5670. if invalidParams.Len() > 0 {
  5671. return invalidParams
  5672. }
  5673. return nil
  5674. }
  5675. // A complex type that identifies ways in which you want to restrict distribution
  5676. // of your content.
  5677. type Restrictions struct {
  5678. _ struct{} `type:"structure"`
  5679. // A complex type that controls the countries in which your content is distributed.
  5680. // CloudFront determines the location of your users using MaxMind GeoIP databases.
  5681. //
  5682. // GeoRestriction is a required field
  5683. GeoRestriction *GeoRestriction `type:"structure" required:"true"`
  5684. }
  5685. // String returns the string representation
  5686. func (s Restrictions) String() string {
  5687. return awsutil.Prettify(s)
  5688. }
  5689. // GoString returns the string representation
  5690. func (s Restrictions) GoString() string {
  5691. return s.String()
  5692. }
  5693. // Validate inspects the fields of the type to determine if they are valid.
  5694. func (s *Restrictions) Validate() error {
  5695. invalidParams := request.ErrInvalidParams{Context: "Restrictions"}
  5696. if s.GeoRestriction == nil {
  5697. invalidParams.Add(request.NewErrParamRequired("GeoRestriction"))
  5698. }
  5699. if s.GeoRestriction != nil {
  5700. if err := s.GeoRestriction.Validate(); err != nil {
  5701. invalidParams.AddNested("GeoRestriction", err.(request.ErrInvalidParams))
  5702. }
  5703. }
  5704. if invalidParams.Len() > 0 {
  5705. return invalidParams
  5706. }
  5707. return nil
  5708. }
  5709. // A complex type that contains information about the Amazon S3 bucket from
  5710. // which you want CloudFront to get your media files for distribution.
  5711. type S3Origin struct {
  5712. _ struct{} `type:"structure"`
  5713. // The DNS name of the Amazon S3 origin.
  5714. //
  5715. // DomainName is a required field
  5716. DomainName *string `type:"string" required:"true"`
  5717. // The CloudFront origin access identity to associate with the RTMP distribution.
  5718. // Use an origin access identity to configure the distribution so that end users
  5719. // can only access objects in an Amazon S3 bucket through CloudFront.
  5720. //
  5721. // If you want end users to be able to access objects using either the CloudFront
  5722. // URL or the Amazon S3 URL, specify an empty OriginAccessIdentity element.
  5723. //
  5724. // To delete the origin access identity from an existing distribution, update
  5725. // the distribution configuration and include an empty OriginAccessIdentity
  5726. // element.
  5727. //
  5728. // To replace the origin access identity, update the distribution configuration
  5729. // and specify the new origin access identity.
  5730. //
  5731. // For more information, see Using an Origin Access Identity to Restrict Access
  5732. // to Your Amazon S3 Content (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html)
  5733. // in the Amazon Amazon CloudFront Developer Guide.
  5734. //
  5735. // OriginAccessIdentity is a required field
  5736. OriginAccessIdentity *string `type:"string" required:"true"`
  5737. }
  5738. // String returns the string representation
  5739. func (s S3Origin) String() string {
  5740. return awsutil.Prettify(s)
  5741. }
  5742. // GoString returns the string representation
  5743. func (s S3Origin) GoString() string {
  5744. return s.String()
  5745. }
  5746. // Validate inspects the fields of the type to determine if they are valid.
  5747. func (s *S3Origin) Validate() error {
  5748. invalidParams := request.ErrInvalidParams{Context: "S3Origin"}
  5749. if s.DomainName == nil {
  5750. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  5751. }
  5752. if s.OriginAccessIdentity == nil {
  5753. invalidParams.Add(request.NewErrParamRequired("OriginAccessIdentity"))
  5754. }
  5755. if invalidParams.Len() > 0 {
  5756. return invalidParams
  5757. }
  5758. return nil
  5759. }
  5760. // A complex type that contains information about the Amazon S3 origin. If the
  5761. // origin is a custom origin, use the CustomOriginConfig element instead.
  5762. type S3OriginConfig struct {
  5763. _ struct{} `type:"structure"`
  5764. // The CloudFront origin access identity to associate with the origin. Use an
  5765. // origin access identity to configure the origin so that viewers can only access
  5766. // objects in an Amazon S3 bucket through CloudFront. The format of the value
  5767. // is:
  5768. //
  5769. // origin-access-identity/CloudFront/ID-of-origin-access-identity
  5770. //
  5771. // where ID-of-origin-access-identity is the value that CloudFront returned
  5772. // in the ID element when you created the origin access identity.
  5773. //
  5774. // If you want viewers to be able to access objects using either the CloudFront
  5775. // URL or the Amazon S3 URL, specify an empty OriginAccessIdentity element.
  5776. //
  5777. // To delete the origin access identity from an existing distribution, update
  5778. // the distribution configuration and include an empty OriginAccessIdentity
  5779. // element.
  5780. //
  5781. // To replace the origin access identity, update the distribution configuration
  5782. // and specify the new origin access identity.
  5783. //
  5784. // For more information about the origin access identity, see Serving Private
  5785. // Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
  5786. // in the Amazon CloudFront Developer Guide.
  5787. //
  5788. // OriginAccessIdentity is a required field
  5789. OriginAccessIdentity *string `type:"string" required:"true"`
  5790. }
  5791. // String returns the string representation
  5792. func (s S3OriginConfig) String() string {
  5793. return awsutil.Prettify(s)
  5794. }
  5795. // GoString returns the string representation
  5796. func (s S3OriginConfig) GoString() string {
  5797. return s.String()
  5798. }
  5799. // Validate inspects the fields of the type to determine if they are valid.
  5800. func (s *S3OriginConfig) Validate() error {
  5801. invalidParams := request.ErrInvalidParams{Context: "S3OriginConfig"}
  5802. if s.OriginAccessIdentity == nil {
  5803. invalidParams.Add(request.NewErrParamRequired("OriginAccessIdentity"))
  5804. }
  5805. if invalidParams.Len() > 0 {
  5806. return invalidParams
  5807. }
  5808. return nil
  5809. }
  5810. // A complex type that lists the AWS accounts that were included in the TrustedSigners
  5811. // complex type, as well as their active CloudFront key pair IDs, if any.
  5812. type Signer struct {
  5813. _ struct{} `type:"structure"`
  5814. // An AWS account that is included in the TrustedSigners complex type for this
  5815. // RTMP distribution. Valid values include:
  5816. //
  5817. // * self, which is the AWS account used to create the distribution.
  5818. //
  5819. // * An AWS account number.
  5820. AwsAccountNumber *string `type:"string"`
  5821. // A complex type that lists the active CloudFront key pairs, if any, that are
  5822. // associated with AwsAccountNumber.
  5823. KeyPairIds *KeyPairIds `type:"structure"`
  5824. }
  5825. // String returns the string representation
  5826. func (s Signer) String() string {
  5827. return awsutil.Prettify(s)
  5828. }
  5829. // GoString returns the string representation
  5830. func (s Signer) GoString() string {
  5831. return s.String()
  5832. }
  5833. // A streaming distribution.
  5834. type StreamingDistribution struct {
  5835. _ struct{} `type:"structure"`
  5836. // ARN is a required field
  5837. ARN *string `type:"string" required:"true"`
  5838. // A complex type that lists the AWS accounts, if any, that you included in
  5839. // the TrustedSigners complex type for this distribution. These are the accounts
  5840. // that you want to allow to create signed URLs for private content.
  5841. //
  5842. // The Signer complex type lists the AWS account number of the trusted signer
  5843. // or self if the signer is the AWS account that created the distribution. The
  5844. // Signer element also includes the IDs of any active CloudFront key pairs that
  5845. // are associated with the trusted signer's AWS account. If no KeyPairId element
  5846. // appears for a Signer, that signer can't create signed URLs.
  5847. //
  5848. // For more information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
  5849. // in the Amazon CloudFront Developer Guide.
  5850. //
  5851. // ActiveTrustedSigners is a required field
  5852. ActiveTrustedSigners *ActiveTrustedSigners `type:"structure" required:"true"`
  5853. // The domain name that corresponds to the streaming distribution. For example:
  5854. // s5c39gqb8ow64r.cloudfront.net.
  5855. //
  5856. // DomainName is a required field
  5857. DomainName *string `type:"string" required:"true"`
  5858. // The identifier for the RTMP distribution. For example: EGTXBD79EXAMPLE.
  5859. //
  5860. // Id is a required field
  5861. Id *string `type:"string" required:"true"`
  5862. // The date and time that the distribution was last modified.
  5863. LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  5864. // The current status of the RTMP distribution. When the status is Deployed,
  5865. // the distribution's information is propagated to all CloudFront edge locations.
  5866. //
  5867. // Status is a required field
  5868. Status *string `type:"string" required:"true"`
  5869. // The current configuration information for the RTMP distribution.
  5870. //
  5871. // StreamingDistributionConfig is a required field
  5872. StreamingDistributionConfig *StreamingDistributionConfig `type:"structure" required:"true"`
  5873. }
  5874. // String returns the string representation
  5875. func (s StreamingDistribution) String() string {
  5876. return awsutil.Prettify(s)
  5877. }
  5878. // GoString returns the string representation
  5879. func (s StreamingDistribution) GoString() string {
  5880. return s.String()
  5881. }
  5882. // The RTMP distribution's configuration information.
  5883. type StreamingDistributionConfig struct {
  5884. _ struct{} `type:"structure"`
  5885. // A complex type that contains information about CNAMEs (alternate domain names),
  5886. // if any, for this streaming distribution.
  5887. Aliases *Aliases `type:"structure"`
  5888. // A unique number that ensures that the request can't be replayed. If the CallerReference
  5889. // is new (no matter the content of the StreamingDistributionConfig object),
  5890. // a new streaming distribution is created. If the CallerReference is a value
  5891. // that you already sent in a previous request to create a streaming distribution,
  5892. // and the content of the StreamingDistributionConfig is identical to the original
  5893. // request (ignoring white space), the response includes the same information
  5894. // returned to the original request. If the CallerReference is a value that
  5895. // you already sent in a previous request to create a streaming distribution
  5896. // but the content of the StreamingDistributionConfig is different from the
  5897. // original request, CloudFront returns a DistributionAlreadyExists error.
  5898. //
  5899. // CallerReference is a required field
  5900. CallerReference *string `type:"string" required:"true"`
  5901. // Any comments you want to include about the streaming distribution.
  5902. //
  5903. // Comment is a required field
  5904. Comment *string `type:"string" required:"true"`
  5905. // Whether the streaming distribution is enabled to accept user requests for
  5906. // content.
  5907. //
  5908. // Enabled is a required field
  5909. Enabled *bool `type:"boolean" required:"true"`
  5910. // A complex type that controls whether access logs are written for the streaming
  5911. // distribution.
  5912. Logging *StreamingLoggingConfig `type:"structure"`
  5913. // A complex type that contains information about price class for this streaming
  5914. // distribution.
  5915. PriceClass *string `type:"string" enum:"PriceClass"`
  5916. // A complex type that contains information about the Amazon S3 bucket from
  5917. // which you want CloudFront to get your media files for distribution.
  5918. //
  5919. // S3Origin is a required field
  5920. S3Origin *S3Origin `type:"structure" required:"true"`
  5921. // A complex type that specifies any AWS accounts that you want to permit to
  5922. // create signed URLs for private content. If you want the distribution to use
  5923. // signed URLs, include this element; if you want the distribution to use public
  5924. // URLs, remove this element. For more information, see Serving Private Content
  5925. // through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
  5926. // in the Amazon CloudFront Developer Guide.
  5927. //
  5928. // TrustedSigners is a required field
  5929. TrustedSigners *TrustedSigners `type:"structure" required:"true"`
  5930. }
  5931. // String returns the string representation
  5932. func (s StreamingDistributionConfig) String() string {
  5933. return awsutil.Prettify(s)
  5934. }
  5935. // GoString returns the string representation
  5936. func (s StreamingDistributionConfig) GoString() string {
  5937. return s.String()
  5938. }
  5939. // Validate inspects the fields of the type to determine if they are valid.
  5940. func (s *StreamingDistributionConfig) Validate() error {
  5941. invalidParams := request.ErrInvalidParams{Context: "StreamingDistributionConfig"}
  5942. if s.CallerReference == nil {
  5943. invalidParams.Add(request.NewErrParamRequired("CallerReference"))
  5944. }
  5945. if s.Comment == nil {
  5946. invalidParams.Add(request.NewErrParamRequired("Comment"))
  5947. }
  5948. if s.Enabled == nil {
  5949. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  5950. }
  5951. if s.S3Origin == nil {
  5952. invalidParams.Add(request.NewErrParamRequired("S3Origin"))
  5953. }
  5954. if s.TrustedSigners == nil {
  5955. invalidParams.Add(request.NewErrParamRequired("TrustedSigners"))
  5956. }
  5957. if s.Aliases != nil {
  5958. if err := s.Aliases.Validate(); err != nil {
  5959. invalidParams.AddNested("Aliases", err.(request.ErrInvalidParams))
  5960. }
  5961. }
  5962. if s.Logging != nil {
  5963. if err := s.Logging.Validate(); err != nil {
  5964. invalidParams.AddNested("Logging", err.(request.ErrInvalidParams))
  5965. }
  5966. }
  5967. if s.S3Origin != nil {
  5968. if err := s.S3Origin.Validate(); err != nil {
  5969. invalidParams.AddNested("S3Origin", err.(request.ErrInvalidParams))
  5970. }
  5971. }
  5972. if s.TrustedSigners != nil {
  5973. if err := s.TrustedSigners.Validate(); err != nil {
  5974. invalidParams.AddNested("TrustedSigners", err.(request.ErrInvalidParams))
  5975. }
  5976. }
  5977. if invalidParams.Len() > 0 {
  5978. return invalidParams
  5979. }
  5980. return nil
  5981. }
  5982. // A streaming distribution Configuration and a list of tags to be associated
  5983. // with the streaming distribution.
  5984. type StreamingDistributionConfigWithTags struct {
  5985. _ struct{} `type:"structure"`
  5986. // A streaming distribution Configuration.
  5987. //
  5988. // StreamingDistributionConfig is a required field
  5989. StreamingDistributionConfig *StreamingDistributionConfig `type:"structure" required:"true"`
  5990. // A complex type that contains zero or more Tag elements.
  5991. //
  5992. // Tags is a required field
  5993. Tags *Tags `type:"structure" required:"true"`
  5994. }
  5995. // String returns the string representation
  5996. func (s StreamingDistributionConfigWithTags) String() string {
  5997. return awsutil.Prettify(s)
  5998. }
  5999. // GoString returns the string representation
  6000. func (s StreamingDistributionConfigWithTags) GoString() string {
  6001. return s.String()
  6002. }
  6003. // Validate inspects the fields of the type to determine if they are valid.
  6004. func (s *StreamingDistributionConfigWithTags) Validate() error {
  6005. invalidParams := request.ErrInvalidParams{Context: "StreamingDistributionConfigWithTags"}
  6006. if s.StreamingDistributionConfig == nil {
  6007. invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig"))
  6008. }
  6009. if s.Tags == nil {
  6010. invalidParams.Add(request.NewErrParamRequired("Tags"))
  6011. }
  6012. if s.StreamingDistributionConfig != nil {
  6013. if err := s.StreamingDistributionConfig.Validate(); err != nil {
  6014. invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams))
  6015. }
  6016. }
  6017. if s.Tags != nil {
  6018. if err := s.Tags.Validate(); err != nil {
  6019. invalidParams.AddNested("Tags", err.(request.ErrInvalidParams))
  6020. }
  6021. }
  6022. if invalidParams.Len() > 0 {
  6023. return invalidParams
  6024. }
  6025. return nil
  6026. }
  6027. // A streaming distribution list.
  6028. type StreamingDistributionList struct {
  6029. _ struct{} `type:"structure"`
  6030. // A flag that indicates whether more streaming distributions remain to be listed.
  6031. // If your results were truncated, you can make a follow-up pagination request
  6032. // using the Marker request parameter to retrieve more distributions in the
  6033. // list.
  6034. //
  6035. // IsTruncated is a required field
  6036. IsTruncated *bool `type:"boolean" required:"true"`
  6037. // A complex type that contains one StreamingDistributionSummary element for
  6038. // each distribution that was created by the current AWS account.
  6039. Items []*StreamingDistributionSummary `locationNameList:"StreamingDistributionSummary" type:"list"`
  6040. // The value you provided for the Marker request parameter.
  6041. //
  6042. // Marker is a required field
  6043. Marker *string `type:"string" required:"true"`
  6044. // The value you provided for the MaxItems request parameter.
  6045. //
  6046. // MaxItems is a required field
  6047. MaxItems *int64 `type:"integer" required:"true"`
  6048. // If IsTruncated is true, this element is present and contains the value you
  6049. // can use for the Marker request parameter to continue listing your RTMP distributions
  6050. // where they left off.
  6051. NextMarker *string `type:"string"`
  6052. // The number of streaming distributions that were created by the current AWS
  6053. // account.
  6054. //
  6055. // Quantity is a required field
  6056. Quantity *int64 `type:"integer" required:"true"`
  6057. }
  6058. // String returns the string representation
  6059. func (s StreamingDistributionList) String() string {
  6060. return awsutil.Prettify(s)
  6061. }
  6062. // GoString returns the string representation
  6063. func (s StreamingDistributionList) GoString() string {
  6064. return s.String()
  6065. }
  6066. // A summary of the information for an Amazon CloudFront streaming distribution.
  6067. type StreamingDistributionSummary struct {
  6068. _ struct{} `type:"structure"`
  6069. // The ARN (Amazon Resource Name) for the streaming distribution. For example:
  6070. // arn:aws:cloudfront::123456789012:streaming-distribution/EDFDVBD632BHDS5,
  6071. // where 123456789012 is your AWS account ID.
  6072. //
  6073. // ARN is a required field
  6074. ARN *string `type:"string" required:"true"`
  6075. // A complex type that contains information about CNAMEs (alternate domain names),
  6076. // if any, for this streaming distribution.
  6077. //
  6078. // Aliases is a required field
  6079. Aliases *Aliases `type:"structure" required:"true"`
  6080. // The comment originally specified when this distribution was created.
  6081. //
  6082. // Comment is a required field
  6083. Comment *string `type:"string" required:"true"`
  6084. // The domain name corresponding to the distribution. For example: d604721fxaaqy9.cloudfront.net.
  6085. //
  6086. // DomainName is a required field
  6087. DomainName *string `type:"string" required:"true"`
  6088. // Whether the distribution is enabled to accept end user requests for content.
  6089. //
  6090. // Enabled is a required field
  6091. Enabled *bool `type:"boolean" required:"true"`
  6092. // The identifier for the distribution. For example: EDFDVBD632BHDS5.
  6093. //
  6094. // Id is a required field
  6095. Id *string `type:"string" required:"true"`
  6096. // The date and time the distribution was last modified.
  6097. //
  6098. // LastModifiedTime is a required field
  6099. LastModifiedTime *time.Time `type:"timestamp" timestampFormat:"iso8601" required:"true"`
  6100. // PriceClass is a required field
  6101. PriceClass *string `type:"string" required:"true" enum:"PriceClass"`
  6102. // A complex type that contains information about the Amazon S3 bucket from
  6103. // which you want CloudFront to get your media files for distribution.
  6104. //
  6105. // S3Origin is a required field
  6106. S3Origin *S3Origin `type:"structure" required:"true"`
  6107. // Indicates the current status of the distribution. When the status is Deployed,
  6108. // the distribution's information is fully propagated throughout the Amazon
  6109. // CloudFront system.
  6110. //
  6111. // Status is a required field
  6112. Status *string `type:"string" required:"true"`
  6113. // A complex type that specifies the AWS accounts, if any, that you want to
  6114. // allow to create signed URLs for private content. If you want to require signed
  6115. // URLs in requests for objects in the target origin that match the PathPattern
  6116. // for this cache behavior, specify true for Enabled, and specify the applicable
  6117. // values for Quantity and Items.If you don't want to require signed URLs in
  6118. // requests for objects that match PathPattern, specify false for Enabled and
  6119. // 0 for Quantity. Omit Items. To add, change, or remove one or more trusted
  6120. // signers, change Enabled to true (if it's currently false), change Quantity
  6121. // as applicable, and specify all of the trusted signers that you want to include
  6122. // in the updated distribution.
  6123. //
  6124. // TrustedSigners is a required field
  6125. TrustedSigners *TrustedSigners `type:"structure" required:"true"`
  6126. }
  6127. // String returns the string representation
  6128. func (s StreamingDistributionSummary) String() string {
  6129. return awsutil.Prettify(s)
  6130. }
  6131. // GoString returns the string representation
  6132. func (s StreamingDistributionSummary) GoString() string {
  6133. return s.String()
  6134. }
  6135. // A complex type that controls whether access logs are written for this streaming
  6136. // distribution.
  6137. type StreamingLoggingConfig struct {
  6138. _ struct{} `type:"structure"`
  6139. // The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com.
  6140. //
  6141. // Bucket is a required field
  6142. Bucket *string `type:"string" required:"true"`
  6143. // Specifies whether you want CloudFront to save access logs to an Amazon S3
  6144. // bucket. If you do not want to enable logging when you create a streaming
  6145. // distribution or if you want to disable logging for an existing streaming
  6146. // distribution, specify false for Enabled, and specify empty Bucket and Prefix
  6147. // elements. If you specify false for Enabled but you specify values for Bucket
  6148. // and Prefix, the values are automatically deleted.
  6149. //
  6150. // Enabled is a required field
  6151. Enabled *bool `type:"boolean" required:"true"`
  6152. // An optional string that you want CloudFront to prefix to the access log filenames
  6153. // for this streaming distribution, for example, myprefix/. If you want to enable
  6154. // logging, but you do not want to specify a prefix, you still must include
  6155. // an empty Prefix element in the Logging element.
  6156. //
  6157. // Prefix is a required field
  6158. Prefix *string `type:"string" required:"true"`
  6159. }
  6160. // String returns the string representation
  6161. func (s StreamingLoggingConfig) String() string {
  6162. return awsutil.Prettify(s)
  6163. }
  6164. // GoString returns the string representation
  6165. func (s StreamingLoggingConfig) GoString() string {
  6166. return s.String()
  6167. }
  6168. // Validate inspects the fields of the type to determine if they are valid.
  6169. func (s *StreamingLoggingConfig) Validate() error {
  6170. invalidParams := request.ErrInvalidParams{Context: "StreamingLoggingConfig"}
  6171. if s.Bucket == nil {
  6172. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6173. }
  6174. if s.Enabled == nil {
  6175. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  6176. }
  6177. if s.Prefix == nil {
  6178. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  6179. }
  6180. if invalidParams.Len() > 0 {
  6181. return invalidParams
  6182. }
  6183. return nil
  6184. }
  6185. // A complex type that contains Tag key and Tag value.
  6186. type Tag struct {
  6187. _ struct{} `type:"structure"`
  6188. // A string that contains Tag key.
  6189. //
  6190. // The string length should be between 1 and 128 characters. Valid characters
  6191. // include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @.
  6192. //
  6193. // Key is a required field
  6194. Key *string `min:"1" type:"string" required:"true"`
  6195. // A string that contains an optional Tag value.
  6196. //
  6197. // The string length should be between 0 and 256 characters. Valid characters
  6198. // include a-z, A-Z, 0-9, space, and the special characters _ - . : / = + @.
  6199. Value *string `type:"string"`
  6200. }
  6201. // String returns the string representation
  6202. func (s Tag) String() string {
  6203. return awsutil.Prettify(s)
  6204. }
  6205. // GoString returns the string representation
  6206. func (s Tag) GoString() string {
  6207. return s.String()
  6208. }
  6209. // Validate inspects the fields of the type to determine if they are valid.
  6210. func (s *Tag) Validate() error {
  6211. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  6212. if s.Key == nil {
  6213. invalidParams.Add(request.NewErrParamRequired("Key"))
  6214. }
  6215. if s.Key != nil && len(*s.Key) < 1 {
  6216. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6217. }
  6218. if invalidParams.Len() > 0 {
  6219. return invalidParams
  6220. }
  6221. return nil
  6222. }
  6223. // A complex type that contains zero or more Tag elements.
  6224. type TagKeys struct {
  6225. _ struct{} `type:"structure"`
  6226. // A complex type that contains Tag key elements.
  6227. Items []*string `locationNameList:"Key" type:"list"`
  6228. }
  6229. // String returns the string representation
  6230. func (s TagKeys) String() string {
  6231. return awsutil.Prettify(s)
  6232. }
  6233. // GoString returns the string representation
  6234. func (s TagKeys) GoString() string {
  6235. return s.String()
  6236. }
  6237. // The request to add tags to a CloudFront resource.
  6238. type TagResourceInput struct {
  6239. _ struct{} `type:"structure" payload:"Tags"`
  6240. // An ARN of a CloudFront resource.
  6241. //
  6242. // Resource is a required field
  6243. Resource *string `location:"querystring" locationName:"Resource" type:"string" required:"true"`
  6244. // A complex type that contains zero or more Tag elements.
  6245. //
  6246. // Tags is a required field
  6247. Tags *Tags `locationName:"Tags" type:"structure" required:"true"`
  6248. }
  6249. // String returns the string representation
  6250. func (s TagResourceInput) String() string {
  6251. return awsutil.Prettify(s)
  6252. }
  6253. // GoString returns the string representation
  6254. func (s TagResourceInput) GoString() string {
  6255. return s.String()
  6256. }
  6257. // Validate inspects the fields of the type to determine if they are valid.
  6258. func (s *TagResourceInput) Validate() error {
  6259. invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
  6260. if s.Resource == nil {
  6261. invalidParams.Add(request.NewErrParamRequired("Resource"))
  6262. }
  6263. if s.Tags == nil {
  6264. invalidParams.Add(request.NewErrParamRequired("Tags"))
  6265. }
  6266. if s.Tags != nil {
  6267. if err := s.Tags.Validate(); err != nil {
  6268. invalidParams.AddNested("Tags", err.(request.ErrInvalidParams))
  6269. }
  6270. }
  6271. if invalidParams.Len() > 0 {
  6272. return invalidParams
  6273. }
  6274. return nil
  6275. }
  6276. type TagResourceOutput struct {
  6277. _ struct{} `type:"structure"`
  6278. }
  6279. // String returns the string representation
  6280. func (s TagResourceOutput) String() string {
  6281. return awsutil.Prettify(s)
  6282. }
  6283. // GoString returns the string representation
  6284. func (s TagResourceOutput) GoString() string {
  6285. return s.String()
  6286. }
  6287. // A complex type that contains zero or more Tag elements.
  6288. type Tags struct {
  6289. _ struct{} `type:"structure"`
  6290. // A complex type that contains Tag elements.
  6291. Items []*Tag `locationNameList:"Tag" type:"list"`
  6292. }
  6293. // String returns the string representation
  6294. func (s Tags) String() string {
  6295. return awsutil.Prettify(s)
  6296. }
  6297. // GoString returns the string representation
  6298. func (s Tags) GoString() string {
  6299. return s.String()
  6300. }
  6301. // Validate inspects the fields of the type to determine if they are valid.
  6302. func (s *Tags) Validate() error {
  6303. invalidParams := request.ErrInvalidParams{Context: "Tags"}
  6304. if s.Items != nil {
  6305. for i, v := range s.Items {
  6306. if v == nil {
  6307. continue
  6308. }
  6309. if err := v.Validate(); err != nil {
  6310. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams))
  6311. }
  6312. }
  6313. }
  6314. if invalidParams.Len() > 0 {
  6315. return invalidParams
  6316. }
  6317. return nil
  6318. }
  6319. // A complex type that specifies the AWS accounts, if any, that you want to
  6320. // allow to create signed URLs for private content.
  6321. //
  6322. // If you want to require signed URLs in requests for objects in the target
  6323. // origin that match the PathPattern for this cache behavior, specify true for
  6324. // Enabled, and specify the applicable values for Quantity and Items. For more
  6325. // information, see Serving Private Content through CloudFront (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html)
  6326. // in the Amazon Amazon CloudFront Developer Guide.
  6327. //
  6328. // If you don't want to require signed URLs in requests for objects that match
  6329. // PathPattern, specify false for Enabled and 0 for Quantity. Omit Items.
  6330. //
  6331. // To add, change, or remove one or more trusted signers, change Enabled to
  6332. // true (if it's currently false), change Quantity as applicable, and specify
  6333. // all of the trusted signers that you want to include in the updated distribution.
  6334. //
  6335. // For more information about updating the distribution configuration, see DistributionConfig
  6336. // .
  6337. type TrustedSigners struct {
  6338. _ struct{} `type:"structure"`
  6339. // Specifies whether you want to require viewers to use signed URLs to access
  6340. // the files specified by PathPattern and TargetOriginId.
  6341. //
  6342. // Enabled is a required field
  6343. Enabled *bool `type:"boolean" required:"true"`
  6344. // Optional: A complex type that contains trusted signers for this cache behavior.
  6345. // If Quantity is 0, you can omit Items.
  6346. Items []*string `locationNameList:"AwsAccountNumber" type:"list"`
  6347. // The number of trusted signers for this cache behavior.
  6348. //
  6349. // Quantity is a required field
  6350. Quantity *int64 `type:"integer" required:"true"`
  6351. }
  6352. // String returns the string representation
  6353. func (s TrustedSigners) String() string {
  6354. return awsutil.Prettify(s)
  6355. }
  6356. // GoString returns the string representation
  6357. func (s TrustedSigners) GoString() string {
  6358. return s.String()
  6359. }
  6360. // Validate inspects the fields of the type to determine if they are valid.
  6361. func (s *TrustedSigners) Validate() error {
  6362. invalidParams := request.ErrInvalidParams{Context: "TrustedSigners"}
  6363. if s.Enabled == nil {
  6364. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  6365. }
  6366. if s.Quantity == nil {
  6367. invalidParams.Add(request.NewErrParamRequired("Quantity"))
  6368. }
  6369. if invalidParams.Len() > 0 {
  6370. return invalidParams
  6371. }
  6372. return nil
  6373. }
  6374. // The request to remove tags from a CloudFront resource.
  6375. type UntagResourceInput struct {
  6376. _ struct{} `type:"structure" payload:"TagKeys"`
  6377. // An ARN of a CloudFront resource.
  6378. //
  6379. // Resource is a required field
  6380. Resource *string `location:"querystring" locationName:"Resource" type:"string" required:"true"`
  6381. // A complex type that contains zero or more Tag key elements.
  6382. //
  6383. // TagKeys is a required field
  6384. TagKeys *TagKeys `locationName:"TagKeys" type:"structure" required:"true"`
  6385. }
  6386. // String returns the string representation
  6387. func (s UntagResourceInput) String() string {
  6388. return awsutil.Prettify(s)
  6389. }
  6390. // GoString returns the string representation
  6391. func (s UntagResourceInput) GoString() string {
  6392. return s.String()
  6393. }
  6394. // Validate inspects the fields of the type to determine if they are valid.
  6395. func (s *UntagResourceInput) Validate() error {
  6396. invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
  6397. if s.Resource == nil {
  6398. invalidParams.Add(request.NewErrParamRequired("Resource"))
  6399. }
  6400. if s.TagKeys == nil {
  6401. invalidParams.Add(request.NewErrParamRequired("TagKeys"))
  6402. }
  6403. if invalidParams.Len() > 0 {
  6404. return invalidParams
  6405. }
  6406. return nil
  6407. }
  6408. type UntagResourceOutput struct {
  6409. _ struct{} `type:"structure"`
  6410. }
  6411. // String returns the string representation
  6412. func (s UntagResourceOutput) String() string {
  6413. return awsutil.Prettify(s)
  6414. }
  6415. // GoString returns the string representation
  6416. func (s UntagResourceOutput) GoString() string {
  6417. return s.String()
  6418. }
  6419. // The request to update an origin access identity.
  6420. type UpdateCloudFrontOriginAccessIdentityInput struct {
  6421. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentityConfig"`
  6422. // The identity's configuration information.
  6423. //
  6424. // CloudFrontOriginAccessIdentityConfig is a required field
  6425. CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true"`
  6426. // The identity's id.
  6427. //
  6428. // Id is a required field
  6429. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  6430. // The value of the ETag header that you received when retrieving the identity's
  6431. // configuration. For example: E2QWRUHAPOMQZL.
  6432. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  6433. }
  6434. // String returns the string representation
  6435. func (s UpdateCloudFrontOriginAccessIdentityInput) String() string {
  6436. return awsutil.Prettify(s)
  6437. }
  6438. // GoString returns the string representation
  6439. func (s UpdateCloudFrontOriginAccessIdentityInput) GoString() string {
  6440. return s.String()
  6441. }
  6442. // Validate inspects the fields of the type to determine if they are valid.
  6443. func (s *UpdateCloudFrontOriginAccessIdentityInput) Validate() error {
  6444. invalidParams := request.ErrInvalidParams{Context: "UpdateCloudFrontOriginAccessIdentityInput"}
  6445. if s.CloudFrontOriginAccessIdentityConfig == nil {
  6446. invalidParams.Add(request.NewErrParamRequired("CloudFrontOriginAccessIdentityConfig"))
  6447. }
  6448. if s.Id == nil {
  6449. invalidParams.Add(request.NewErrParamRequired("Id"))
  6450. }
  6451. if s.CloudFrontOriginAccessIdentityConfig != nil {
  6452. if err := s.CloudFrontOriginAccessIdentityConfig.Validate(); err != nil {
  6453. invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(request.ErrInvalidParams))
  6454. }
  6455. }
  6456. if invalidParams.Len() > 0 {
  6457. return invalidParams
  6458. }
  6459. return nil
  6460. }
  6461. // The returned result of the corresponding request.
  6462. type UpdateCloudFrontOriginAccessIdentityOutput struct {
  6463. _ struct{} `type:"structure" payload:"CloudFrontOriginAccessIdentity"`
  6464. // The origin access identity's information.
  6465. CloudFrontOriginAccessIdentity *OriginAccessIdentity `type:"structure"`
  6466. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  6467. ETag *string `location:"header" locationName:"ETag" type:"string"`
  6468. }
  6469. // String returns the string representation
  6470. func (s UpdateCloudFrontOriginAccessIdentityOutput) String() string {
  6471. return awsutil.Prettify(s)
  6472. }
  6473. // GoString returns the string representation
  6474. func (s UpdateCloudFrontOriginAccessIdentityOutput) GoString() string {
  6475. return s.String()
  6476. }
  6477. // The request to update a distribution.
  6478. type UpdateDistributionInput struct {
  6479. _ struct{} `type:"structure" payload:"DistributionConfig"`
  6480. // The distribution's configuration information.
  6481. //
  6482. // DistributionConfig is a required field
  6483. DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true"`
  6484. // The distribution's id.
  6485. //
  6486. // Id is a required field
  6487. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  6488. // The value of the ETag header that you received when retrieving the distribution's
  6489. // configuration. For example: E2QWRUHAPOMQZL.
  6490. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  6491. }
  6492. // String returns the string representation
  6493. func (s UpdateDistributionInput) String() string {
  6494. return awsutil.Prettify(s)
  6495. }
  6496. // GoString returns the string representation
  6497. func (s UpdateDistributionInput) GoString() string {
  6498. return s.String()
  6499. }
  6500. // Validate inspects the fields of the type to determine if they are valid.
  6501. func (s *UpdateDistributionInput) Validate() error {
  6502. invalidParams := request.ErrInvalidParams{Context: "UpdateDistributionInput"}
  6503. if s.DistributionConfig == nil {
  6504. invalidParams.Add(request.NewErrParamRequired("DistributionConfig"))
  6505. }
  6506. if s.Id == nil {
  6507. invalidParams.Add(request.NewErrParamRequired("Id"))
  6508. }
  6509. if s.DistributionConfig != nil {
  6510. if err := s.DistributionConfig.Validate(); err != nil {
  6511. invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams))
  6512. }
  6513. }
  6514. if invalidParams.Len() > 0 {
  6515. return invalidParams
  6516. }
  6517. return nil
  6518. }
  6519. // The returned result of the corresponding request.
  6520. type UpdateDistributionOutput struct {
  6521. _ struct{} `type:"structure" payload:"Distribution"`
  6522. // The distribution's information.
  6523. Distribution *Distribution `type:"structure"`
  6524. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  6525. ETag *string `location:"header" locationName:"ETag" type:"string"`
  6526. }
  6527. // String returns the string representation
  6528. func (s UpdateDistributionOutput) String() string {
  6529. return awsutil.Prettify(s)
  6530. }
  6531. // GoString returns the string representation
  6532. func (s UpdateDistributionOutput) GoString() string {
  6533. return s.String()
  6534. }
  6535. // The request to update a streaming distribution.
  6536. type UpdateStreamingDistributionInput struct {
  6537. _ struct{} `type:"structure" payload:"StreamingDistributionConfig"`
  6538. // The streaming distribution's id.
  6539. //
  6540. // Id is a required field
  6541. Id *string `location:"uri" locationName:"Id" type:"string" required:"true"`
  6542. // The value of the ETag header that you received when retrieving the streaming
  6543. // distribution's configuration. For example: E2QWRUHAPOMQZL.
  6544. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  6545. // The streaming distribution's configuration information.
  6546. //
  6547. // StreamingDistributionConfig is a required field
  6548. StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true"`
  6549. }
  6550. // String returns the string representation
  6551. func (s UpdateStreamingDistributionInput) String() string {
  6552. return awsutil.Prettify(s)
  6553. }
  6554. // GoString returns the string representation
  6555. func (s UpdateStreamingDistributionInput) GoString() string {
  6556. return s.String()
  6557. }
  6558. // Validate inspects the fields of the type to determine if they are valid.
  6559. func (s *UpdateStreamingDistributionInput) Validate() error {
  6560. invalidParams := request.ErrInvalidParams{Context: "UpdateStreamingDistributionInput"}
  6561. if s.Id == nil {
  6562. invalidParams.Add(request.NewErrParamRequired("Id"))
  6563. }
  6564. if s.StreamingDistributionConfig == nil {
  6565. invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig"))
  6566. }
  6567. if s.StreamingDistributionConfig != nil {
  6568. if err := s.StreamingDistributionConfig.Validate(); err != nil {
  6569. invalidParams.AddNested("StreamingDistributionConfig", err.(request.ErrInvalidParams))
  6570. }
  6571. }
  6572. if invalidParams.Len() > 0 {
  6573. return invalidParams
  6574. }
  6575. return nil
  6576. }
  6577. // The returned result of the corresponding request.
  6578. type UpdateStreamingDistributionOutput struct {
  6579. _ struct{} `type:"structure" payload:"StreamingDistribution"`
  6580. // The current version of the configuration. For example: E2QWRUHAPOMQZL.
  6581. ETag *string `location:"header" locationName:"ETag" type:"string"`
  6582. // The streaming distribution's information.
  6583. StreamingDistribution *StreamingDistribution `type:"structure"`
  6584. }
  6585. // String returns the string representation
  6586. func (s UpdateStreamingDistributionOutput) String() string {
  6587. return awsutil.Prettify(s)
  6588. }
  6589. // GoString returns the string representation
  6590. func (s UpdateStreamingDistributionOutput) GoString() string {
  6591. return s.String()
  6592. }
  6593. // A complex type that specifies the following:
  6594. //
  6595. // * Which SSL/TLS certificate to use when viewers request objects using
  6596. // HTTPS
  6597. //
  6598. // * Whether you want CloudFront to use dedicated IP addresses or SNI when
  6599. // you're using alternate domain names in your object names
  6600. //
  6601. // * The minimum protocol version that you want CloudFront to use when communicating
  6602. // with viewers
  6603. //
  6604. // For more information, see Using an HTTPS Connection to Access Your Objects
  6605. // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html)
  6606. // in the Amazon Amazon CloudFront Developer Guide.
  6607. type ViewerCertificate struct {
  6608. _ struct{} `type:"structure"`
  6609. // If you want viewers to use HTTPS to request your objects and you're using
  6610. // an alternate domain name in your object URLs (for example, https://example.com/logo.jpg),
  6611. // specify the ACM certificate ARN of the custom viewer certificate for this
  6612. // distribution. Specify either this value, IAMCertificateId, or CloudFrontDefaultCertificate.
  6613. ACMCertificateArn *string `type:"string"`
  6614. // Include one of these values to specify the following:
  6615. //
  6616. // * Whether you want viewers to use HTTP or HTTPS to request your objects.
  6617. //
  6618. // * If you want viewers to use HTTPS, whether you're using an alternate
  6619. // domain name such as example.com or the CloudFront domain name for your
  6620. // distribution, such as d111111abcdef8.cloudfront.net.
  6621. //
  6622. // * If you're using an alternate domain name, whether AWS Certificate Manager
  6623. // (ACM) provided the certificate, or you purchased a certificate from a
  6624. // third-party certificate authority and imported it into ACM or uploaded
  6625. // it to the IAM certificate store.
  6626. //
  6627. // You must specify one (and only one) of the three values. Do not specify false
  6628. // for CloudFrontDefaultCertificate.
  6629. //
  6630. // If you want viewers to use HTTP to request your objects: Specify the following
  6631. // value:
  6632. //
  6633. // <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>
  6634. //
  6635. // In addition, specify allow-all for ViewerProtocolPolicy for all of your cache
  6636. // behaviors.
  6637. //
  6638. // If you want viewers to use HTTPS to request your objects: Choose the type
  6639. // of certificate that you want to use based on whether you're using an alternate
  6640. // domain name for your objects or the CloudFront domain name:
  6641. //
  6642. // * If you're using an alternate domain name, such as example.com: Specify
  6643. // one of the following values, depending on whether ACM provided your certificate
  6644. // or you purchased your certificate from third-party certificate authority:
  6645. //
  6646. // <ACMCertificateArn>ARN for ACM SSL/TLS certificate<ACMCertificateArn> where
  6647. // ARN for ACM SSL/TLS certificate is the ARN for the ACM SSL/TLS certificate
  6648. // that you want to use for this distribution.
  6649. //
  6650. // <IAMCertificateId>IAM certificate ID<IAMCertificateId> where IAM certificate
  6651. // ID is the ID that IAM returned when you added the certificate to the IAM
  6652. // certificate store.
  6653. //
  6654. // If you specify ACMCertificateArn or IAMCertificateId, you must also specify
  6655. // a value for SSLSupportMethod.
  6656. //
  6657. // If you choose to use an ACM certificate or a certificate in the IAM certificate
  6658. // store, we recommend that you use only an alternate domain name in your
  6659. // object URLs (https://example.com/logo.jpg). If you use the domain name
  6660. // that is associated with your CloudFront distribution (https://d111111abcdef8.cloudfront.net/logo.jpg)
  6661. // and the viewer supports SNI, then CloudFront behaves normally. However,
  6662. // if the browser does not support SNI, the user's experience depends on
  6663. // the value that you choose for SSLSupportMethod:
  6664. //
  6665. // vip: The viewer displays a warning because there is a mismatch between the
  6666. // CloudFront domain name and the domain name in your SSL/TLS certificate.
  6667. //
  6668. // sni-only: CloudFront drops the connection with the browser without returning
  6669. // the object.
  6670. //
  6671. // * If you're using the CloudFront domain name for your distribution, such
  6672. // as d111111abcdef8.cloudfront.net: Specify the following value:
  6673. //
  6674. // <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>
  6675. //
  6676. // If you want viewers to use HTTPS, you must also specify one of the following
  6677. // values in your cache behaviors:
  6678. //
  6679. // <ViewerProtocolPolicy>https-only<ViewerProtocolPolicy>
  6680. //
  6681. // <ViewerProtocolPolicy>redirect-to-https<ViewerProtocolPolicy>
  6682. //
  6683. // You can also optionally require that CloudFront use HTTPS to communicate
  6684. // with your origin by specifying one of the following values for the applicable
  6685. // origins:
  6686. //
  6687. // <OriginProtocolPolicy>https-only<OriginProtocolPolicy>
  6688. //
  6689. // <OriginProtocolPolicy>match-viewer<OriginProtocolPolicy>
  6690. //
  6691. // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS)
  6692. // in the Amazon CloudFront Developer Guide.
  6693. Certificate *string `deprecated:"true" type:"string"`
  6694. // This field is deprecated. You can use one of the following: [ACMCertificateArn,
  6695. // IAMCertificateId, or CloudFrontDefaultCertificate].
  6696. CertificateSource *string `deprecated:"true" type:"string" enum:"CertificateSource"`
  6697. // If you want viewers to use HTTPS to request your objects and you're using
  6698. // the CloudFront domain name of your distribution in your object URLs (for
  6699. // example, https://d111111abcdef8.cloudfront.net/logo.jpg), set to true. Omit
  6700. // this value if you are setting an ACMCertificateArn or IAMCertificateId.
  6701. CloudFrontDefaultCertificate *bool `type:"boolean"`
  6702. // If you want viewers to use HTTPS to request your objects and you're using
  6703. // an alternate domain name in your object URLs (for example, https://example.com/logo.jpg),
  6704. // specify the IAM certificate identifier of the custom viewer certificate for
  6705. // this distribution. Specify either this value, ACMCertificateArn, or CloudFrontDefaultCertificate.
  6706. IAMCertificateId *string `type:"string"`
  6707. // Specify the minimum version of the SSL/TLS protocol that you want CloudFront
  6708. // to use for HTTPS connections between viewers and CloudFront: SSLv3 or TLSv1.
  6709. // CloudFront serves your objects only to viewers that support SSL/TLS version
  6710. // that you specify and later versions. The TLSv1 protocol is more secure, so
  6711. // we recommend that you specify SSLv3 only if your users are using browsers
  6712. // or devices that don't support TLSv1. Note the following:
  6713. //
  6714. // * If you specify <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>,
  6715. // the minimum SSL protocol version is TLSv1 and can't be changed.
  6716. //
  6717. // * If you're using a custom certificate (if you specify a value for ACMCertificateArn
  6718. // or for IAMCertificateId) and if you're using SNI (if you specify sni-only
  6719. // for SSLSupportMethod), you must specify TLSv1 for MinimumProtocolVersion.
  6720. MinimumProtocolVersion *string `type:"string" enum:"MinimumProtocolVersion"`
  6721. // If you specify a value for ACMCertificateArn or for IAMCertificateId, you
  6722. // must also specify how you want CloudFront to serve HTTPS requests: using
  6723. // a method that works for all clients or one that works for most clients:
  6724. //
  6725. // * vip: CloudFront uses dedicated IP addresses for your content and can
  6726. // respond to HTTPS requests from any viewer. However, you must request permission
  6727. // to use this feature, and you incur additional monthly charges.
  6728. //
  6729. // * sni-only: CloudFront can respond to HTTPS requests from viewers that
  6730. // support Server Name Indication (SNI). All modern browsers support SNI,
  6731. // but some browsers still in use don't support SNI. If some of your users'
  6732. // browsers don't support SNI, we recommend that you do one of the following:
  6733. //
  6734. // Use the vip option (dedicated IP addresses) instead of sni-only.
  6735. //
  6736. // Use the CloudFront SSL/TLS certificate instead of a custom certificate. This
  6737. // requires that you use the CloudFront domain name of your distribution
  6738. // in the URLs for your objects, for example, https://d111111abcdef8.cloudfront.net/logo.png.
  6739. //
  6740. // If you can control which browser your users use, upgrade the browser to one
  6741. // that supports SNI.
  6742. //
  6743. // Use HTTP instead of HTTPS.
  6744. //
  6745. // Do not specify a value for SSLSupportMethod if you specified <CloudFrontDefaultCertificate>true<CloudFrontDefaultCertificate>.
  6746. //
  6747. // For more information, see Using Alternate Domain Names and HTTPS (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html#CNAMEsAndHTTPS.html)
  6748. // in the Amazon CloudFront Developer Guide.
  6749. SSLSupportMethod *string `type:"string" enum:"SSLSupportMethod"`
  6750. }
  6751. // String returns the string representation
  6752. func (s ViewerCertificate) String() string {
  6753. return awsutil.Prettify(s)
  6754. }
  6755. // GoString returns the string representation
  6756. func (s ViewerCertificate) GoString() string {
  6757. return s.String()
  6758. }
  6759. const (
  6760. // CertificateSourceCloudfront is a CertificateSource enum value
  6761. CertificateSourceCloudfront = "cloudfront"
  6762. // CertificateSourceIam is a CertificateSource enum value
  6763. CertificateSourceIam = "iam"
  6764. // CertificateSourceAcm is a CertificateSource enum value
  6765. CertificateSourceAcm = "acm"
  6766. )
  6767. const (
  6768. // GeoRestrictionTypeBlacklist is a GeoRestrictionType enum value
  6769. GeoRestrictionTypeBlacklist = "blacklist"
  6770. // GeoRestrictionTypeWhitelist is a GeoRestrictionType enum value
  6771. GeoRestrictionTypeWhitelist = "whitelist"
  6772. // GeoRestrictionTypeNone is a GeoRestrictionType enum value
  6773. GeoRestrictionTypeNone = "none"
  6774. )
  6775. const (
  6776. // HttpVersionHttp11 is a HttpVersion enum value
  6777. HttpVersionHttp11 = "http1.1"
  6778. // HttpVersionHttp2 is a HttpVersion enum value
  6779. HttpVersionHttp2 = "http2"
  6780. )
  6781. const (
  6782. // ItemSelectionNone is a ItemSelection enum value
  6783. ItemSelectionNone = "none"
  6784. // ItemSelectionWhitelist is a ItemSelection enum value
  6785. ItemSelectionWhitelist = "whitelist"
  6786. // ItemSelectionAll is a ItemSelection enum value
  6787. ItemSelectionAll = "all"
  6788. )
  6789. const (
  6790. // MethodGet is a Method enum value
  6791. MethodGet = "GET"
  6792. // MethodHead is a Method enum value
  6793. MethodHead = "HEAD"
  6794. // MethodPost is a Method enum value
  6795. MethodPost = "POST"
  6796. // MethodPut is a Method enum value
  6797. MethodPut = "PUT"
  6798. // MethodPatch is a Method enum value
  6799. MethodPatch = "PATCH"
  6800. // MethodOptions is a Method enum value
  6801. MethodOptions = "OPTIONS"
  6802. // MethodDelete is a Method enum value
  6803. MethodDelete = "DELETE"
  6804. )
  6805. const (
  6806. // MinimumProtocolVersionSslv3 is a MinimumProtocolVersion enum value
  6807. MinimumProtocolVersionSslv3 = "SSLv3"
  6808. // MinimumProtocolVersionTlsv1 is a MinimumProtocolVersion enum value
  6809. MinimumProtocolVersionTlsv1 = "TLSv1"
  6810. )
  6811. const (
  6812. // OriginProtocolPolicyHttpOnly is a OriginProtocolPolicy enum value
  6813. OriginProtocolPolicyHttpOnly = "http-only"
  6814. // OriginProtocolPolicyMatchViewer is a OriginProtocolPolicy enum value
  6815. OriginProtocolPolicyMatchViewer = "match-viewer"
  6816. // OriginProtocolPolicyHttpsOnly is a OriginProtocolPolicy enum value
  6817. OriginProtocolPolicyHttpsOnly = "https-only"
  6818. )
  6819. const (
  6820. // PriceClassPriceClass100 is a PriceClass enum value
  6821. PriceClassPriceClass100 = "PriceClass_100"
  6822. // PriceClassPriceClass200 is a PriceClass enum value
  6823. PriceClassPriceClass200 = "PriceClass_200"
  6824. // PriceClassPriceClassAll is a PriceClass enum value
  6825. PriceClassPriceClassAll = "PriceClass_All"
  6826. )
  6827. const (
  6828. // SSLSupportMethodSniOnly is a SSLSupportMethod enum value
  6829. SSLSupportMethodSniOnly = "sni-only"
  6830. // SSLSupportMethodVip is a SSLSupportMethod enum value
  6831. SSLSupportMethodVip = "vip"
  6832. )
  6833. const (
  6834. // SslProtocolSslv3 is a SslProtocol enum value
  6835. SslProtocolSslv3 = "SSLv3"
  6836. // SslProtocolTlsv1 is a SslProtocol enum value
  6837. SslProtocolTlsv1 = "TLSv1"
  6838. // SslProtocolTlsv11 is a SslProtocol enum value
  6839. SslProtocolTlsv11 = "TLSv1.1"
  6840. // SslProtocolTlsv12 is a SslProtocol enum value
  6841. SslProtocolTlsv12 = "TLSv1.2"
  6842. )
  6843. const (
  6844. // ViewerProtocolPolicyAllowAll is a ViewerProtocolPolicy enum value
  6845. ViewerProtocolPolicyAllowAll = "allow-all"
  6846. // ViewerProtocolPolicyHttpsOnly is a ViewerProtocolPolicy enum value
  6847. ViewerProtocolPolicyHttpsOnly = "https-only"
  6848. // ViewerProtocolPolicyRedirectToHttps is a ViewerProtocolPolicy enum value
  6849. ViewerProtocolPolicyRedirectToHttps = "redirect-to-https"
  6850. )